Update
This commit is contained in:
parent
b061db906d
commit
b9db39443a
|
@ -126,7 +126,7 @@ span {
|
|||
|
||||
p {
|
||||
font-family: var(--serif, serif);
|
||||
font-size: 1.2rem;
|
||||
font-size: 1.1rem;
|
||||
line-height: 170%;
|
||||
}
|
||||
|
||||
|
@ -138,7 +138,7 @@ b,i,s {
|
|||
|
||||
label {
|
||||
font-family: var(--serif, serif);
|
||||
font-size: 1.2rem;
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
|
||||
sup {
|
||||
|
|
|
@ -65,7 +65,7 @@ footer h2 {
|
|||
|
||||
footer a {
|
||||
font-size: 1.2rem;
|
||||
color: #d8d8d8;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
footer p, footer label {
|
||||
|
|
|
@ -105,7 +105,7 @@
|
|||
}
|
||||
|
||||
a {
|
||||
font-size: 1.2rem;
|
||||
font-size: 1.15rem;
|
||||
color: #DD1C1A;
|
||||
}
|
||||
|
||||
|
@ -142,7 +142,7 @@
|
|||
}
|
||||
|
||||
#container p {
|
||||
font-size: 1.2rem;
|
||||
font-size: 1.15rem;
|
||||
text-align: justify;
|
||||
}
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
}
|
||||
|
||||
a {
|
||||
font-size: 1.2rem;
|
||||
font-size: 1.15rem;
|
||||
color: #DD1C1A;
|
||||
}
|
||||
|
||||
|
@ -108,7 +108,7 @@
|
|||
}
|
||||
|
||||
#container p {
|
||||
font-size: 1.2rem;
|
||||
font-size: 1.15rem;
|
||||
text-align: justify;
|
||||
}
|
||||
|
||||
|
|
|
@ -103,7 +103,7 @@
|
|||
}
|
||||
|
||||
a {
|
||||
font-size: 1.2rem;
|
||||
font-size: 1.15rem;
|
||||
color: #DD1C1A;
|
||||
}
|
||||
|
||||
|
@ -140,7 +140,7 @@
|
|||
}
|
||||
|
||||
#container p {
|
||||
font-size: 1.2rem;
|
||||
font-size: 1.15rem;
|
||||
text-align: justify;
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,8 @@
|
|||
<div id="contact-us-container">
|
||||
<h2>CONTACT US</h2>
|
||||
<!--<p>Email: <a href="mailto:info@chiron.com">info@libsoc.org</a></p>-->
|
||||
<p>WhatsApp: <a href="https://chat.whatsapp.com/BhnmUNljUxJ2AjeHUwyTKh" target="_blank" rel=noreferrer>group invite link</a></p>
|
||||
<p>WhatsApp: <a href="https://chat.whatsapp.com/BhnmUNljUxJ2AjeHUwyTKh" target="_blank" rel=noreferrer style="margin-left: 0.5rem;">invite link</a></p>
|
||||
<p>Discord: <a href="https://discord.gg/xAPZmyr8B6" target="_blank" rel=noreferrer style="margin-left: 2rem;">invite link</a></p>
|
||||
</div>
|
||||
</div>
|
||||
<button on:click={() => {location.href='#'}} id="footer-up" aria-label="go up">
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
}
|
||||
|
||||
a {
|
||||
font-size: 1.2rem;
|
||||
font-size: 1.15rem;
|
||||
color: #DD1C1A;
|
||||
}
|
||||
|
||||
|
@ -105,7 +105,7 @@
|
|||
}
|
||||
|
||||
#container p {
|
||||
font-size: 1.2rem;
|
||||
font-size: 1.15rem;
|
||||
text-align: justify;
|
||||
}
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ None of them near you? Not a problem! Join our WhatsApp group and we will help y
|
|||
|
||||
ol>li {
|
||||
position: relative;
|
||||
font-size: 1.2rem;
|
||||
font-size: 1.15rem;
|
||||
font-family: var(--serif,serif);
|
||||
left: 3rem;
|
||||
}
|
||||
|
@ -119,12 +119,12 @@ None of them near you? Not a problem! Join our WhatsApp group and we will help y
|
|||
}
|
||||
|
||||
#text-container a {
|
||||
font-size: 1.2rem;
|
||||
font-size: 1.15rem;
|
||||
color: #DD1C1A
|
||||
}
|
||||
|
||||
#container p {
|
||||
font-size: 1.2rem;
|
||||
font-size: 1.15rem;
|
||||
text-align: justify;
|
||||
}
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@
|
|||
}
|
||||
|
||||
#container p {
|
||||
font-size: 1.2rem;
|
||||
font-size: 1.15rem;
|
||||
text-align: justify;
|
||||
}
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
// Import statements
|
||||
import { onMount } from 'svelte'
|
||||
import { getData } from "/js/libraries/serverTools.js"
|
||||
import { px2rem } from "/js/libraries/miscTools.js"
|
||||
|
||||
// Import components
|
||||
|
||||
|
@ -94,6 +95,11 @@
|
|||
headingsObjects[id].scrollIntoView({block: 'start'}, true);
|
||||
}
|
||||
|
||||
|
||||
addEventListener("scroll", (event) => {
|
||||
contentTable.style.marginTop = -Math.min(px2rem(window.pageYOffset),5) + "rem"
|
||||
})
|
||||
|
||||
onMount(() => {
|
||||
let hideBool = localStorage.getItem("manifesto-hide-content")
|
||||
if (hideBool!=undefined && hideBool!=null) {
|
||||
|
@ -112,7 +118,7 @@
|
|||
TABLE OF CONTENTS
|
||||
<img bind:this={contentArrow} src="../assets/arrow_down.svg" alt="arrow down" style="transform: scaleY(-1)">
|
||||
</button>
|
||||
<div bind:this={contentBlock} class="module" style="display: initial;">
|
||||
<div bind:this={contentBlock} class="module">
|
||||
{#each contentHeadings as obj}
|
||||
{#if Array.isArray(obj)}
|
||||
{#each obj as obj2}
|
||||
|
@ -132,39 +138,41 @@
|
|||
{/each}
|
||||
</div>
|
||||
</div>
|
||||
{#each manifesto as line}
|
||||
{#if line!==""}
|
||||
{#if typeof (line === 'object') && (Object.keys(line)[0]=="ul")}
|
||||
<ul>
|
||||
{#each line.ul as line2}
|
||||
<li>{line2}</li>
|
||||
{/each}
|
||||
</ul>
|
||||
{:else if typeof (line === 'object') && (Object.keys(line)[0]=="ol")}
|
||||
<ol>
|
||||
{#each line.ol as line2}
|
||||
<li>
|
||||
{@html line2}
|
||||
</li>
|
||||
{/each}
|
||||
</ol>
|
||||
{:else if typeof (line === 'object') && (line.type=="h3")}
|
||||
<button on:click ={contentTable.scrollIntoView({block: 'start'}, true)} style="display: block;">
|
||||
<h3 bind:this={headingsObjects[line.id]} id={line.id}>{@html line.line}</h3>
|
||||
</button>
|
||||
{:else if typeof (line === 'object') && (line.type=="h2")}
|
||||
<button on:click ={contentTable.scrollIntoView({block: 'start'}, true)} style="display: block; width: 100%;">
|
||||
<h2 bind:this={headingsObjects[line.id]} id={line.id}>{@html line.line}</h2>
|
||||
</button>
|
||||
{:else if line[0]=="#"}
|
||||
<h1>{@html line.slice(2,line.length)}</h1>
|
||||
{:else}
|
||||
<p class="margin-end">
|
||||
{@html line}
|
||||
</p>
|
||||
<div id="main">
|
||||
{#each manifesto as line}
|
||||
{#if line!==""}
|
||||
{#if typeof (line === 'object') && (Object.keys(line)[0]=="ul")}
|
||||
<ul>
|
||||
{#each line.ul as line2}
|
||||
<li>{line2}</li>
|
||||
{/each}
|
||||
</ul>
|
||||
{:else if typeof (line === 'object') && (Object.keys(line)[0]=="ol")}
|
||||
<ol>
|
||||
{#each line.ol as line2}
|
||||
<li>
|
||||
{@html line2}
|
||||
</li>
|
||||
{/each}
|
||||
</ol>
|
||||
{:else if typeof (line === 'object') && (line.type=="h3")}
|
||||
<button on:click ={contentTable.scrollIntoView({block: 'start'}, true)} style="display: block; width: 100%;">
|
||||
<h3 bind:this={headingsObjects[line.id]} id={line.id}>{@html line.line}</h3>
|
||||
</button>
|
||||
{:else if typeof (line === 'object') && (line.type=="h2")}
|
||||
<button on:click ={contentTable.scrollIntoView({block: 'start'}, true)} style="display: block; width: 100%;">
|
||||
<h2 bind:this={headingsObjects[line.id]} id={line.id}>{@html line.line}</h2>
|
||||
</button>
|
||||
{:else if line[0]=="#"}
|
||||
<h1>{@html line.slice(2,line.length)}</h1>
|
||||
{:else}
|
||||
<p class="margin-end">
|
||||
{@html line}
|
||||
</p>
|
||||
{/if}
|
||||
{/if}
|
||||
{/if}
|
||||
{/each}
|
||||
{/each}
|
||||
</div>
|
||||
{/key}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -174,11 +182,18 @@
|
|||
@import '/css/common.css';
|
||||
|
||||
#table-content {
|
||||
position: fixed;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
border: #a9a9a9 0.1rem solid;
|
||||
border-radius: 1rem;
|
||||
padding: 2rem;
|
||||
padding-right: 0.8rem;
|
||||
padding-bottom: 1.5rem;
|
||||
margin-bottom: 2rem;
|
||||
width: 20rem;
|
||||
height: max-content;
|
||||
max-height: calc(100vh - 2.5rem);
|
||||
}
|
||||
|
||||
#toggle-content {
|
||||
|
@ -194,14 +209,19 @@
|
|||
#toggle-content img {
|
||||
position: absolute;
|
||||
top: 0rem;
|
||||
right: 0rem;
|
||||
right: 0.8rem;
|
||||
width: 1.5rem;
|
||||
}
|
||||
|
||||
.module {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
overflow-y: scroll;
|
||||
overflow-x: visible;
|
||||
height: max-content;
|
||||
max-height: 100%;
|
||||
padding-right: 1.2rem;
|
||||
}
|
||||
|
||||
.heading-button-wrapper {
|
||||
|
@ -229,6 +249,8 @@
|
|||
position: relative;
|
||||
padding-left: 1.5rem;
|
||||
z-index: 1;
|
||||
margin-left: 1rem;
|
||||
border-left: #a9a9a9 0.1rem solid;
|
||||
}
|
||||
|
||||
.heading-button:hover {
|
||||
|
@ -255,24 +277,61 @@
|
|||
}
|
||||
|
||||
#text-container {
|
||||
position: relative;
|
||||
display: grid;
|
||||
grid-template-columns: 20rem 800px 20rem;
|
||||
grid-gap: 2rem;
|
||||
max-width: calc(100vw - 4rem);
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
#container {
|
||||
display: flex;
|
||||
align-content: center;
|
||||
margin: auto;
|
||||
max-width: 1200px;
|
||||
max-width: min(1800px,100vw);
|
||||
margin-top: 1rem;
|
||||
margin-bottom: 4rem;
|
||||
}
|
||||
|
||||
#container>div>p {
|
||||
#main {
|
||||
grid-column: 2;
|
||||
}
|
||||
|
||||
#main>p {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
#container p {
|
||||
font-size: 1.2rem;
|
||||
font-size: 1.15rem;
|
||||
text-align: justify;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 1220px) {
|
||||
|
||||
#text-container {
|
||||
position: relative;
|
||||
display: grid;
|
||||
grid-template-columns: auto;
|
||||
grid-gap: 2rem;
|
||||
max-width: calc(100vw - 4rem);
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
#table-content {
|
||||
position: relative;
|
||||
border: #a9a9a9 0.1rem solid;
|
||||
border-radius: 1rem;
|
||||
padding: 2rem;
|
||||
padding-bottom: 1.5rem;
|
||||
margin-bottom: 2rem;
|
||||
height: max-content;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#main {
|
||||
grid-column: 1;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
|
@ -126,7 +126,7 @@ span {
|
|||
|
||||
p {
|
||||
font-family: var(--serif, serif);
|
||||
font-size: 1.2rem;
|
||||
font-size: 1.1rem;
|
||||
line-height: 170%;
|
||||
}
|
||||
|
||||
|
@ -138,7 +138,7 @@ b,i,s {
|
|||
|
||||
label {
|
||||
font-family: var(--serif, serif);
|
||||
font-size: 1.2rem;
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
|
||||
sup {
|
||||
|
|
|
@ -65,7 +65,7 @@ footer h2 {
|
|||
|
||||
footer a {
|
||||
font-size: 1.2rem;
|
||||
color: #d8d8d8;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
footer p, footer label {
|
||||
|
|
|
@ -1 +1,344 @@
|
|||
import{S as t,i as e,a as i,b as n,s as o,e as a,c as s,n as r,d as l,f as m,g as c,h,j as d,o as g,t as f}from"./index-95aedb1a.js";import"../../../../../../../../../js/components/map-component.js";function p(t,e,i){const n=t.slice();return n[1]=e[i],n}function u(t){let e,i,o,m,d,g,p,u,b,x,w,v,y,k,C,z,j,D,T,A,E,F,G,L,O,R,S,W=t[1].name+"",_=t[1].type+"",q=t[1].link+"",H=t[1].description+"";return{c(){e=a("div"),i=a("div"),o=a("div"),m=a("p"),d=a("b"),d.textContent="Name: ",g=f(W),p=s(),u=a("p"),b=a("b"),b.textContent="Type: ",x=f(_),w=s(),v=a("p"),y=a("b"),y.textContent="Link: ",k=a("a"),C=f(q),z=s(),j=a("picture"),D=a("source"),T=s(),A=a("source"),E=s(),F=a("img"),G=s(),L=a("p"),O=a("b"),O.textContent="Description: ",R=f(H),S=s(),l(k,"href",t[1].link),l(k,"target",";_blank;"),l(k,"rel","noreferrer"),l(D,"srcset","/img/affiliates/"+t[1].logo+".webp"),l(A,"srcset","/img/affiliates/"+t[1].logo+".png"),l(F,"class","affiliate-logo"),l(F,"alt","logo"),l(e,"class","location-info")},m(t,a){n(t,e,a),c(e,i),c(i,o),c(o,m),c(m,d),c(m,g),c(o,p),c(o,u),c(u,b),c(u,x),c(o,w),c(o,v),c(v,y),c(v,k),c(k,C),c(i,z),c(i,j),c(j,D),c(j,T),c(j,A),c(j,E),c(j,F),c(e,G),c(e,L),c(L,O),c(L,R),c(e,S)},p:r,d(t){t&&h(e)}}}function b(t){let e,i,o,g,f,b,x,w,v,y,k,C,z,j=t[0],D=[];for(let e=0;e<j.length;e+=1)D[e]=u(p(t,j,e));return{c(){e=a("div"),i=a("div"),o=a("h1"),o.textContent="Affiliates",g=s(),f=a("img"),x=s(),w=a("p"),w.textContent="We affiliate with organizations and initiatives that align with our mission. Together, we are a united force driven by a shared worldview where there is no place for authoritarian exploitative systems, but where systems promoting equity and democracy thrive.",v=s(),y=a("h3"),y.textContent="Our affiliates",k=s(),C=a("h4"),C.textContent="Online",z=s();for(let t=0;t<D.length;t+=1)D[t].c();this.c=r,l(f,"id","hands-img"),m(f.src,b="/img/common/handshake.svg")||l(f,"src","/img/common/handshake.svg"),l(f,"alt","hands"),l(i,"id","text-container"),l(e,"id","container")},m(t,a){n(t,e,a),c(e,i),c(i,o),c(i,g),c(i,f),c(i,x),c(i,w),c(i,v),c(i,y),c(i,k),c(i,C),c(i,z);for(let t=0;t<D.length;t+=1)D[t].m(i,null)},p(t,[e]){if(1&e){let n;for(j=t[0],n=0;n<j.length;n+=1){const o=p(t,j,n);D[n]?D[n].p(o,e):(D[n]=u(o),D[n].c(),D[n].m(i,null))}for(;n<D.length;n+=1)D[n].d(1);D.length=j.length}},i:r,o:r,d(t){t&&h(e),d(D,t)}}}function x(t){return g((()=>{})),[[{name:"Gaia's Fall",type:"a place to discuss and organize",link:"https://discord.libsoc.org",description:"Gaia's Fall is a server that promotes Solarpunk ideals, environmentalism, anarchism, and anti-capitalism. We encourage civil debates, discussions of theories and possibilities, and the creation of communities focused on shaping a better world. It is our official Discord server where we organize and work together.",logo:"gaias_fall"}]]}class w extends t{constructor(t){super(),this.shadowRoot.innerHTML="<style>@import '/css/common.css';#hands-img{position:absolute;width:10.5rem;left:50%;transform:translate(-50%);z-index:0;opacity:0.2}#text-container>:nth-child(3){margin-top:8rem}.location-info>:first-child{display:flex;align-content:center;width:100%;justify-content:space-between;gap:3rem;align-items:center}.location-info>:first-child>:first-child{flex:none}.affiliate-logo{position:relative;right:0;max-height:6rem;max-width:100%;border-radius:1rem}h4{margin-bottom:2rem}.location-info{position:relative;margin-bottom:2rem}.location-info p{margin-bottom:0}a{font-size:1.2rem;color:#DD1C1A}#text-container{max-width:calc(100vw - 4rem);margin:auto}h1{margin-bottom:1rem;font-size:2.5rem;text-align:center}h3{margin-bottom:2rem}#container{margin:auto;max-width:1200px;margin-top:1rem;margin-bottom:4rem}#container>div>p{margin-bottom:1rem}#container p{font-size:1.2rem;text-align:justify}</style>",e(this,{target:this.shadowRoot,props:i(this.attributes),customElement:!0},x,b,o,{},null),t&&t.target&&n(t.target,this,t.anchor)}}customElements.define("affiliates-component",w);export{w as default};
|
||||
|
||||
(function(l, r) { if (!l || l.getElementById('livereloadscript')) return; r = l.createElement('script'); r.async = 1; r.src = '//' + (self.location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1'; r.id = 'livereloadscript'; l.getElementsByTagName('head')[0].appendChild(r) })(self.document);
|
||||
import { S as SvelteElement, i as init, a as attribute_to_object, b as insert_dev, s as safe_not_equal, v as validate_each_argument, d as dispatch_dev, c as validate_slots, o as onMount, e as element, f as space, n as noop, g as add_location, h as attr_dev, j as src_url_equal, k as append_dev, l as detach_dev, m as destroy_each, t as text } from './index-3b678a7c.js';
|
||||
import '../../../../../../../../../js/components/map-component.js';
|
||||
|
||||
/* src\affiliates-component.svelte generated by Svelte v3.52.0 */
|
||||
|
||||
const file = "src\\affiliates-component.svelte";
|
||||
|
||||
function get_each_context(ctx, list, i) {
|
||||
const child_ctx = ctx.slice();
|
||||
child_ctx[1] = list[i];
|
||||
return child_ctx;
|
||||
}
|
||||
|
||||
// (36:8) {#each affiliates as affiliate}
|
||||
function create_each_block(ctx) {
|
||||
let div2;
|
||||
let div1;
|
||||
let div0;
|
||||
let p0;
|
||||
let b0;
|
||||
let t1_value = /*affiliate*/ ctx[1].name + "";
|
||||
let t1;
|
||||
let t2;
|
||||
let p1;
|
||||
let b1;
|
||||
let t4_value = /*affiliate*/ ctx[1].type + "";
|
||||
let t4;
|
||||
let t5;
|
||||
let p2;
|
||||
let b2;
|
||||
let a;
|
||||
let t7_value = /*affiliate*/ ctx[1].link + "";
|
||||
let t7;
|
||||
let t8;
|
||||
let picture;
|
||||
let source0;
|
||||
let t9;
|
||||
let source1;
|
||||
let t10;
|
||||
let img;
|
||||
let t11;
|
||||
let p3;
|
||||
let b3;
|
||||
let t13_value = /*affiliate*/ ctx[1].description + "";
|
||||
let t13;
|
||||
let t14;
|
||||
|
||||
const block = {
|
||||
c: function create() {
|
||||
div2 = element("div");
|
||||
div1 = element("div");
|
||||
div0 = element("div");
|
||||
p0 = element("p");
|
||||
b0 = element("b");
|
||||
b0.textContent = "Name: ";
|
||||
t1 = text(t1_value);
|
||||
t2 = space();
|
||||
p1 = element("p");
|
||||
b1 = element("b");
|
||||
b1.textContent = "Type: ";
|
||||
t4 = text(t4_value);
|
||||
t5 = space();
|
||||
p2 = element("p");
|
||||
b2 = element("b");
|
||||
b2.textContent = "Link: ";
|
||||
a = element("a");
|
||||
t7 = text(t7_value);
|
||||
t8 = space();
|
||||
picture = element("picture");
|
||||
source0 = element("source");
|
||||
t9 = space();
|
||||
source1 = element("source");
|
||||
t10 = space();
|
||||
img = element("img");
|
||||
t11 = space();
|
||||
p3 = element("p");
|
||||
b3 = element("b");
|
||||
b3.textContent = "Description: ";
|
||||
t13 = text(t13_value);
|
||||
t14 = space();
|
||||
add_location(b0, file, 39, 27, 1593);
|
||||
add_location(p0, file, 39, 24, 1590);
|
||||
add_location(b1, file, 40, 27, 1655);
|
||||
add_location(p1, file, 40, 24, 1652);
|
||||
add_location(b2, file, 41, 27, 1717);
|
||||
attr_dev(a, "href", /*affiliate*/ ctx[1].link);
|
||||
attr_dev(a, "target", ";_blank;");
|
||||
attr_dev(a, "rel", "noreferrer");
|
||||
add_location(a, file, 41, 40, 1730);
|
||||
add_location(p2, file, 41, 24, 1714);
|
||||
add_location(div0, file, 38, 20, 1559);
|
||||
attr_dev(source0, "srcset", "/img/affiliates/" + /*affiliate*/ ctx[1].logo + ".webp");
|
||||
add_location(source0, file, 44, 24, 1895);
|
||||
attr_dev(source1, "srcset", "/img/affiliates/" + /*affiliate*/ ctx[1].logo + ".png");
|
||||
add_location(source1, file, 45, 24, 1980);
|
||||
attr_dev(img, "class", "affiliate-logo");
|
||||
attr_dev(img, "alt", "logo");
|
||||
add_location(img, file, 46, 24, 2064);
|
||||
add_location(picture, file, 43, 20, 1860);
|
||||
add_location(div1, file, 37, 16, 1532);
|
||||
add_location(b3, file, 49, 19, 2180);
|
||||
add_location(p3, file, 49, 16, 2177);
|
||||
attr_dev(div2, "class", "location-info");
|
||||
add_location(div2, file, 36, 12, 1487);
|
||||
},
|
||||
m: function mount(target, anchor) {
|
||||
insert_dev(target, div2, anchor);
|
||||
append_dev(div2, div1);
|
||||
append_dev(div1, div0);
|
||||
append_dev(div0, p0);
|
||||
append_dev(p0, b0);
|
||||
append_dev(p0, t1);
|
||||
append_dev(div0, t2);
|
||||
append_dev(div0, p1);
|
||||
append_dev(p1, b1);
|
||||
append_dev(p1, t4);
|
||||
append_dev(div0, t5);
|
||||
append_dev(div0, p2);
|
||||
append_dev(p2, b2);
|
||||
append_dev(p2, a);
|
||||
append_dev(a, t7);
|
||||
append_dev(div1, t8);
|
||||
append_dev(div1, picture);
|
||||
append_dev(picture, source0);
|
||||
append_dev(picture, t9);
|
||||
append_dev(picture, source1);
|
||||
append_dev(picture, t10);
|
||||
append_dev(picture, img);
|
||||
append_dev(div2, t11);
|
||||
append_dev(div2, p3);
|
||||
append_dev(p3, b3);
|
||||
append_dev(p3, t13);
|
||||
append_dev(div2, t14);
|
||||
},
|
||||
p: noop,
|
||||
d: function destroy(detaching) {
|
||||
if (detaching) detach_dev(div2);
|
||||
}
|
||||
};
|
||||
|
||||
dispatch_dev("SvelteRegisterBlock", {
|
||||
block,
|
||||
id: create_each_block.name,
|
||||
type: "each",
|
||||
source: "(36:8) {#each affiliates as affiliate}",
|
||||
ctx
|
||||
});
|
||||
|
||||
return block;
|
||||
}
|
||||
|
||||
function create_fragment(ctx) {
|
||||
let div1;
|
||||
let div0;
|
||||
let h1;
|
||||
let t1;
|
||||
let img;
|
||||
let img_src_value;
|
||||
let t2;
|
||||
let p;
|
||||
let t4;
|
||||
let h3;
|
||||
let t6;
|
||||
let h4;
|
||||
let t8;
|
||||
let each_value = /*affiliates*/ ctx[0];
|
||||
validate_each_argument(each_value);
|
||||
let each_blocks = [];
|
||||
|
||||
for (let i = 0; i < each_value.length; i += 1) {
|
||||
each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i));
|
||||
}
|
||||
|
||||
const block = {
|
||||
c: function create() {
|
||||
div1 = element("div");
|
||||
div0 = element("div");
|
||||
h1 = element("h1");
|
||||
h1.textContent = "Affiliates";
|
||||
t1 = space();
|
||||
img = element("img");
|
||||
t2 = space();
|
||||
p = element("p");
|
||||
p.textContent = "We affiliate with organizations and initiatives that align with our mission. Together, we are a united force driven by a shared worldview where there is no place for authoritarian exploitative systems, but where systems promoting equity and democracy thrive.";
|
||||
t4 = space();
|
||||
h3 = element("h3");
|
||||
h3.textContent = "Our affiliates";
|
||||
t6 = space();
|
||||
h4 = element("h4");
|
||||
h4.textContent = "Online";
|
||||
t8 = space();
|
||||
|
||||
for (let i = 0; i < each_blocks.length; i += 1) {
|
||||
each_blocks[i].c();
|
||||
}
|
||||
|
||||
this.c = noop;
|
||||
add_location(h1, file, 30, 8, 1006);
|
||||
attr_dev(img, "id", "hands-img");
|
||||
if (!src_url_equal(img.src, img_src_value = "/img/common/handshake.svg")) attr_dev(img, "src", img_src_value);
|
||||
attr_dev(img, "alt", "hands");
|
||||
add_location(img, file, 31, 8, 1035);
|
||||
add_location(p, file, 32, 8, 1109);
|
||||
add_location(h3, file, 33, 8, 1384);
|
||||
add_location(h4, file, 34, 8, 1417);
|
||||
attr_dev(div0, "id", "text-container");
|
||||
add_location(div0, file, 29, 4, 971);
|
||||
attr_dev(div1, "id", "container");
|
||||
add_location(div1, file, 27, 0, 884);
|
||||
},
|
||||
l: function claim(nodes) {
|
||||
throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
|
||||
},
|
||||
m: function mount(target, anchor) {
|
||||
insert_dev(target, div1, anchor);
|
||||
append_dev(div1, div0);
|
||||
append_dev(div0, h1);
|
||||
append_dev(div0, t1);
|
||||
append_dev(div0, img);
|
||||
append_dev(div0, t2);
|
||||
append_dev(div0, p);
|
||||
append_dev(div0, t4);
|
||||
append_dev(div0, h3);
|
||||
append_dev(div0, t6);
|
||||
append_dev(div0, h4);
|
||||
append_dev(div0, t8);
|
||||
|
||||
for (let i = 0; i < each_blocks.length; i += 1) {
|
||||
each_blocks[i].m(div0, null);
|
||||
}
|
||||
},
|
||||
p: function update(ctx, [dirty]) {
|
||||
if (dirty & /*affiliates*/ 1) {
|
||||
each_value = /*affiliates*/ ctx[0];
|
||||
validate_each_argument(each_value);
|
||||
let i;
|
||||
|
||||
for (i = 0; i < each_value.length; i += 1) {
|
||||
const child_ctx = get_each_context(ctx, each_value, i);
|
||||
|
||||
if (each_blocks[i]) {
|
||||
each_blocks[i].p(child_ctx, dirty);
|
||||
} else {
|
||||
each_blocks[i] = create_each_block(child_ctx);
|
||||
each_blocks[i].c();
|
||||
each_blocks[i].m(div0, null);
|
||||
}
|
||||
}
|
||||
|
||||
for (; i < each_blocks.length; i += 1) {
|
||||
each_blocks[i].d(1);
|
||||
}
|
||||
|
||||
each_blocks.length = each_value.length;
|
||||
}
|
||||
},
|
||||
i: noop,
|
||||
o: noop,
|
||||
d: function destroy(detaching) {
|
||||
if (detaching) detach_dev(div1);
|
||||
destroy_each(each_blocks, detaching);
|
||||
}
|
||||
};
|
||||
|
||||
dispatch_dev("SvelteRegisterBlock", {
|
||||
block,
|
||||
id: create_fragment.name,
|
||||
type: "component",
|
||||
source: "",
|
||||
ctx
|
||||
});
|
||||
|
||||
return block;
|
||||
}
|
||||
|
||||
function instance($$self, $$props, $$invalidate) {
|
||||
let { $$slots: slots = {}, $$scope } = $$props;
|
||||
validate_slots('affiliates-component', slots, []);
|
||||
|
||||
let affiliates = [
|
||||
{
|
||||
name: "Gaia's Fall",
|
||||
type: "a place to discuss and organize",
|
||||
link: "https://discord.libsoc.org",
|
||||
description: "Gaia's Fall is a server that promotes Solarpunk ideals, environmentalism, anarchism, and anti-capitalism. We encourage civil debates, discussions of theories and possibilities, and the creation of communities focused on shaping a better world. It is our official Discord server where we organize and work together.",
|
||||
logo: "gaias_fall"
|
||||
}
|
||||
];
|
||||
|
||||
onMount(() => {
|
||||
|
||||
});
|
||||
|
||||
const writable_props = [];
|
||||
|
||||
Object.keys($$props).forEach(key => {
|
||||
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<affiliates-component> was created with unknown prop '${key}'`);
|
||||
});
|
||||
|
||||
$$self.$capture_state = () => ({ onMount, affiliates });
|
||||
|
||||
$$self.$inject_state = $$props => {
|
||||
if ('affiliates' in $$props) $$invalidate(0, affiliates = $$props.affiliates);
|
||||
};
|
||||
|
||||
if ($$props && "$$inject" in $$props) {
|
||||
$$self.$inject_state($$props.$$inject);
|
||||
}
|
||||
|
||||
return [affiliates];
|
||||
}
|
||||
|
||||
class Affiliates_component extends SvelteElement {
|
||||
constructor(options) {
|
||||
super();
|
||||
this.shadowRoot.innerHTML = `<style>@import '/css/common.css';#hands-img{position:absolute;width:10.5rem;left:50%;transform:translate(-50%);z-index:0;opacity:0.2}#text-container>:nth-child(3){margin-top:8rem}.location-info>:first-child{display:flex;align-content:center;width:100%;justify-content:space-between;gap:3rem;align-items:center}.location-info>:first-child>:first-child{flex:none}.affiliate-logo{position:relative;right:0;max-height:6rem;max-width:100%;border-radius:1rem}h4{margin-bottom:2rem}.location-info{position:relative;margin-bottom:2rem}.location-info p{margin-bottom:0}a{font-size:1.15rem;color:#DD1C1A}#text-container{max-width:calc(100vw - 4rem);margin:auto}h1{margin-bottom:1rem;font-size:2.5rem;text-align:center}h3{margin-bottom:2rem}#container{margin:auto;max-width:1200px;margin-top:1rem;margin-bottom:4rem}#container>div>p{margin-bottom:1rem}#container p{font-size:1.15rem;text-align:justify}</style>`;
|
||||
|
||||
init(
|
||||
this,
|
||||
{
|
||||
target: this.shadowRoot,
|
||||
props: attribute_to_object(this.attributes),
|
||||
customElement: true
|
||||
},
|
||||
instance,
|
||||
create_fragment,
|
||||
safe_not_equal,
|
||||
{},
|
||||
null
|
||||
);
|
||||
|
||||
if (options) {
|
||||
if (options.target) {
|
||||
insert_dev(options.target, this, options.anchor);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
customElements.define("affiliates-component", Affiliates_component);
|
||||
|
||||
export { Affiliates_component as default };
|
||||
|
|
|
@ -1 +1,309 @@
|
|||
import{S as t,i as e,a as n,b as o,s as i,e as a,c as s,n as m,d as r,f as c,k as l,g as h,h as u,j as d,o as g,t as p}from"./index-95aedb1a.js";import{communities as f,addMarkersCommunities as b}from"../../../../../../../../../js/communities.js";import"../../../../../../../../../js/components/map-component.js";function w(t,e,n){const o=t.slice();return o[1]=e[n],o}function x(t){let e,n,i,c,l,d,g,f,b,w,x,v,y,C,j,z,k,E,D=t[1].location[0]+"",L=t[1].status+"",M=t[1].members+"",R=t[1].contact[1]+"";return{c(){e=a("div"),n=a("p"),i=a("b"),i.textContent="Location: ",c=p(D),l=s(),d=a("p"),g=a("b"),g.textContent="Status: ",f=p(L),b=s(),w=a("p"),x=a("b"),x.textContent="Members: ",v=p(M),y=s(),C=a("p"),j=a("b"),j.textContent="Contact: ",z=a("a"),k=p(R),E=s(),r(z,"href",t[1].contact[0]),r(z,"target",";_blank;"),r(z,"rel","noreferrer"),r(e,"class","location-info")},m(t,a){o(t,e,a),h(e,n),h(n,i),h(n,c),h(e,l),h(e,d),h(d,g),h(d,f),h(e,b),h(e,w),h(w,x),h(w,v),h(e,y),h(e,C),h(C,j),h(C,z),h(z,k),h(e,E)},p:m,d(t){t&&u(e)}}}function v(t){let e,n,i,g,p,b,v,y,C,j,z,k,E,D,L,M=f,R=[];for(let e=0;e<M.length;e+=1)R[e]=x(w(t,M,e));return{c(){e=a("div"),n=a("div"),i=a("h1"),i.textContent="Communities",g=s(),p=a("img"),v=s(),y=a("p"),y.textContent="We establish libertarian socialist communities by buying land, housing and the means of production which are then owned by the members of these communities. There is no private property within the communities and, therefore, exploitation and suffering that comes with it. Decisions are made using direct democracy with a focus on consensus, ensuring that each community member has power over decisions that affect their life. Communities try to establish their own cooperatives in order to finance their development becoming financially independent and sustainable, which allows for their survival and growth. Within communities the gift economy is utilized whenever possible. Each community is a small beacon of socialism within the dark capitalist world showing us how good life can be if only we achieve our goal.",C=s(),j=a("h3"),j.textContent="Our communities",z=s(),k=a("map-component"),E=s(),D=a("h4"),D.textContent="Europe",L=s();for(let t=0;t<R.length;t+=1)R[t].c();this.c=m,r(p,"id","communities-img"),c(p.src,b="/img/common/communities.svg")||r(p,"src","/img/common/communities.svg"),r(p,"alt","communities"),l(k,"id","map"),l(k,"callback",t[0]),r(n,"id","text-container"),r(e,"id","container")},m(t,a){o(t,e,a),h(e,n),h(n,i),h(n,g),h(n,p),h(n,v),h(n,y),h(n,C),h(n,j),h(n,z),h(n,k),h(n,E),h(n,D),h(n,L);for(let t=0;t<R.length;t+=1)R[t].m(n,null)},p(t,[e]){if(0&e){let o;for(M=f,o=0;o<M.length;o+=1){const i=w(t,M,o);R[o]?R[o].p(i,e):(R[o]=x(i),R[o].c(),R[o].m(n,null))}for(;o<R.length;o+=1)R[o].d(1);R.length=M.length}},i:m,o:m,d(t){t&&u(e),d(R,t)}}}function y(t){return g((()=>{})),[function(t){let e=t([51.505,-.09],3);b(e)}]}class C extends t{constructor(t){super(),this.shadowRoot.innerHTML="<style>@import '/css/common.css';#communities-img{position:absolute;width:11rem;left:50%;transform:translate(-50%);z-index:0;opacity:0.2}#text-container>:nth-child(3){margin-top:8rem}h4{margin-bottom:2rem}.location-info{position:relative;margin-bottom:2rem}.location-info p{margin-bottom:0}a{font-size:1.2rem;color:#DD1C1A}#map{--height:30rem;--width:100%;--margin-bottom:3rem}#text-container{max-width:calc(100vw - 4rem);margin:auto}h1{margin-bottom:1rem;font-size:2.5rem;text-align:center}h3{margin-bottom:1rem}#container{margin:auto;max-width:1200px;margin-top:1rem;margin-bottom:4rem}#container>div>p{margin-bottom:1rem}#container p{font-size:1.2rem;text-align:justify}</style>",e(this,{target:this.shadowRoot,props:n(this.attributes),customElement:!0},y,v,i,{},null),t&&t.target&&o(t.target,this,t.anchor)}}customElements.define("communities-component",C);export{C as default};
|
||||
|
||||
(function(l, r) { if (!l || l.getElementById('livereloadscript')) return; r = l.createElement('script'); r.async = 1; r.src = '//' + (self.location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1'; r.id = 'livereloadscript'; l.getElementsByTagName('head')[0].appendChild(r) })(self.document);
|
||||
import { S as SvelteElement, i as init, a as attribute_to_object, b as insert_dev, s as safe_not_equal, v as validate_each_argument, d as dispatch_dev, c as validate_slots, o as onMount, e as element, f as space, n as noop, g as add_location, h as attr_dev, j as src_url_equal, p as set_custom_element_data, k as append_dev, l as detach_dev, m as destroy_each, t as text } from './index-3b678a7c.js';
|
||||
import { communities, addMarkersCommunities } from '../../../../../../../../../js/communities.js';
|
||||
import '../../../../../../../../../js/components/map-component.js';
|
||||
|
||||
/* src\communities-component.svelte generated by Svelte v3.52.0 */
|
||||
|
||||
const file = "src\\communities-component.svelte";
|
||||
|
||||
function get_each_context(ctx, list, i) {
|
||||
const child_ctx = ctx.slice();
|
||||
child_ctx[1] = list[i];
|
||||
return child_ctx;
|
||||
}
|
||||
|
||||
// (32:8) {#each communities as community}
|
||||
function create_each_block(ctx) {
|
||||
let div;
|
||||
let p0;
|
||||
let b0;
|
||||
let t1_value = /*community*/ ctx[1].location[0] + "";
|
||||
let t1;
|
||||
let t2;
|
||||
let p1;
|
||||
let b1;
|
||||
let t4_value = /*community*/ ctx[1].status + "";
|
||||
let t4;
|
||||
let t5;
|
||||
let p2;
|
||||
let b2;
|
||||
let t7_value = /*community*/ ctx[1].members + "";
|
||||
let t7;
|
||||
let t8;
|
||||
let p3;
|
||||
let b3;
|
||||
let a;
|
||||
let t10_value = /*community*/ ctx[1].contact[1] + "";
|
||||
let t10;
|
||||
let t11;
|
||||
|
||||
const block = {
|
||||
c: function create() {
|
||||
div = element("div");
|
||||
p0 = element("p");
|
||||
b0 = element("b");
|
||||
b0.textContent = "Location: ";
|
||||
t1 = text(t1_value);
|
||||
t2 = space();
|
||||
p1 = element("p");
|
||||
b1 = element("b");
|
||||
b1.textContent = "Status: ";
|
||||
t4 = text(t4_value);
|
||||
t5 = space();
|
||||
p2 = element("p");
|
||||
b2 = element("b");
|
||||
b2.textContent = "Members: ";
|
||||
t7 = text(t7_value);
|
||||
t8 = space();
|
||||
p3 = element("p");
|
||||
b3 = element("b");
|
||||
b3.textContent = "Contact: ";
|
||||
a = element("a");
|
||||
t10 = text(t10_value);
|
||||
t11 = space();
|
||||
add_location(b0, file, 33, 19, 1800);
|
||||
add_location(p0, file, 33, 16, 1797);
|
||||
add_location(b1, file, 34, 19, 1865);
|
||||
add_location(p1, file, 34, 16, 1862);
|
||||
add_location(b2, file, 35, 19, 1923);
|
||||
add_location(p2, file, 35, 16, 1920);
|
||||
add_location(b3, file, 36, 19, 1983);
|
||||
attr_dev(a, "href", /*community*/ ctx[1].contact[0]);
|
||||
attr_dev(a, "target", ";_blank;");
|
||||
attr_dev(a, "rel", "noreferrer");
|
||||
add_location(a, file, 36, 35, 1999);
|
||||
add_location(p3, file, 36, 16, 1980);
|
||||
attr_dev(div, "class", "location-info");
|
||||
add_location(div, file, 32, 12, 1752);
|
||||
},
|
||||
m: function mount(target, anchor) {
|
||||
insert_dev(target, div, anchor);
|
||||
append_dev(div, p0);
|
||||
append_dev(p0, b0);
|
||||
append_dev(p0, t1);
|
||||
append_dev(div, t2);
|
||||
append_dev(div, p1);
|
||||
append_dev(p1, b1);
|
||||
append_dev(p1, t4);
|
||||
append_dev(div, t5);
|
||||
append_dev(div, p2);
|
||||
append_dev(p2, b2);
|
||||
append_dev(p2, t7);
|
||||
append_dev(div, t8);
|
||||
append_dev(div, p3);
|
||||
append_dev(p3, b3);
|
||||
append_dev(p3, a);
|
||||
append_dev(a, t10);
|
||||
append_dev(div, t11);
|
||||
},
|
||||
p: noop,
|
||||
d: function destroy(detaching) {
|
||||
if (detaching) detach_dev(div);
|
||||
}
|
||||
};
|
||||
|
||||
dispatch_dev("SvelteRegisterBlock", {
|
||||
block,
|
||||
id: create_each_block.name,
|
||||
type: "each",
|
||||
source: "(32:8) {#each communities as community}",
|
||||
ctx
|
||||
});
|
||||
|
||||
return block;
|
||||
}
|
||||
|
||||
function create_fragment(ctx) {
|
||||
let div1;
|
||||
let div0;
|
||||
let h1;
|
||||
let t1;
|
||||
let img;
|
||||
let img_src_value;
|
||||
let t2;
|
||||
let p;
|
||||
let t4;
|
||||
let h3;
|
||||
let t6;
|
||||
let map_component;
|
||||
let t7;
|
||||
let h4;
|
||||
let t9;
|
||||
let each_value = communities;
|
||||
validate_each_argument(each_value);
|
||||
let each_blocks = [];
|
||||
|
||||
for (let i = 0; i < each_value.length; i += 1) {
|
||||
each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i));
|
||||
}
|
||||
|
||||
const block = {
|
||||
c: function create() {
|
||||
div1 = element("div");
|
||||
div0 = element("div");
|
||||
h1 = element("h1");
|
||||
h1.textContent = "Communities";
|
||||
t1 = space();
|
||||
img = element("img");
|
||||
t2 = space();
|
||||
p = element("p");
|
||||
p.textContent = "We establish libertarian socialist communities by buying land, housing and the means of production which are then owned by the members of these communities. There is no private property within the communities and, therefore, exploitation and suffering that comes with it. Decisions are made using direct democracy with a focus on consensus, ensuring that each community member has power over decisions that affect their life. Communities try to establish their own cooperatives in order to finance their development becoming financially independent and sustainable, which allows for their survival and growth. Within communities the gift economy is utilized whenever possible. Each community is a small beacon of socialism within the dark capitalist world showing us how good life can be if only we achieve our goal.";
|
||||
t4 = space();
|
||||
h3 = element("h3");
|
||||
h3.textContent = "Our communities";
|
||||
t6 = space();
|
||||
map_component = element("map-component");
|
||||
t7 = space();
|
||||
h4 = element("h4");
|
||||
h4.textContent = "Europe";
|
||||
t9 = space();
|
||||
|
||||
for (let i = 0; i < each_blocks.length; i += 1) {
|
||||
each_blocks[i].c();
|
||||
}
|
||||
|
||||
this.c = noop;
|
||||
add_location(h1, file, 25, 8, 612);
|
||||
attr_dev(img, "id", "communities-img");
|
||||
if (!src_url_equal(img.src, img_src_value = "/img/common/communities.svg")) attr_dev(img, "src", img_src_value);
|
||||
attr_dev(img, "alt", "communities");
|
||||
add_location(img, file, 26, 8, 642);
|
||||
add_location(p, file, 27, 8, 730);
|
||||
add_location(h3, file, 28, 8, 1563);
|
||||
set_custom_element_data(map_component, "id", "map");
|
||||
set_custom_element_data(map_component, "callback", /*mapCallbackCommunities*/ ctx[0]);
|
||||
add_location(map_component, file, 29, 8, 1597);
|
||||
add_location(h4, file, 30, 8, 1681);
|
||||
attr_dev(div0, "id", "text-container");
|
||||
add_location(div0, file, 24, 4, 577);
|
||||
attr_dev(div1, "id", "container");
|
||||
add_location(div1, file, 22, 0, 490);
|
||||
},
|
||||
l: function claim(nodes) {
|
||||
throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
|
||||
},
|
||||
m: function mount(target, anchor) {
|
||||
insert_dev(target, div1, anchor);
|
||||
append_dev(div1, div0);
|
||||
append_dev(div0, h1);
|
||||
append_dev(div0, t1);
|
||||
append_dev(div0, img);
|
||||
append_dev(div0, t2);
|
||||
append_dev(div0, p);
|
||||
append_dev(div0, t4);
|
||||
append_dev(div0, h3);
|
||||
append_dev(div0, t6);
|
||||
append_dev(div0, map_component);
|
||||
append_dev(div0, t7);
|
||||
append_dev(div0, h4);
|
||||
append_dev(div0, t9);
|
||||
|
||||
for (let i = 0; i < each_blocks.length; i += 1) {
|
||||
each_blocks[i].m(div0, null);
|
||||
}
|
||||
},
|
||||
p: function update(ctx, [dirty]) {
|
||||
if (dirty & /*communities*/ 0) {
|
||||
each_value = communities;
|
||||
validate_each_argument(each_value);
|
||||
let i;
|
||||
|
||||
for (i = 0; i < each_value.length; i += 1) {
|
||||
const child_ctx = get_each_context(ctx, each_value, i);
|
||||
|
||||
if (each_blocks[i]) {
|
||||
each_blocks[i].p(child_ctx, dirty);
|
||||
} else {
|
||||
each_blocks[i] = create_each_block(child_ctx);
|
||||
each_blocks[i].c();
|
||||
each_blocks[i].m(div0, null);
|
||||
}
|
||||
}
|
||||
|
||||
for (; i < each_blocks.length; i += 1) {
|
||||
each_blocks[i].d(1);
|
||||
}
|
||||
|
||||
each_blocks.length = each_value.length;
|
||||
}
|
||||
},
|
||||
i: noop,
|
||||
o: noop,
|
||||
d: function destroy(detaching) {
|
||||
if (detaching) detach_dev(div1);
|
||||
destroy_each(each_blocks, detaching);
|
||||
}
|
||||
};
|
||||
|
||||
dispatch_dev("SvelteRegisterBlock", {
|
||||
block,
|
||||
id: create_fragment.name,
|
||||
type: "component",
|
||||
source: "",
|
||||
ctx
|
||||
});
|
||||
|
||||
return block;
|
||||
}
|
||||
|
||||
function instance($$self, $$props, $$invalidate) {
|
||||
let { $$slots: slots = {}, $$scope } = $$props;
|
||||
validate_slots('communities-component', slots, []);
|
||||
|
||||
function mapCallbackCommunities(createMap) {
|
||||
let map = createMap([51.505, -0.09], 3);
|
||||
addMarkersCommunities(map);
|
||||
}
|
||||
|
||||
onMount(() => {
|
||||
|
||||
});
|
||||
|
||||
const writable_props = [];
|
||||
|
||||
Object.keys($$props).forEach(key => {
|
||||
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<communities-component> was created with unknown prop '${key}'`);
|
||||
});
|
||||
|
||||
$$self.$capture_state = () => ({
|
||||
onMount,
|
||||
communities,
|
||||
addMarkersCommunities,
|
||||
mapCallbackCommunities
|
||||
});
|
||||
|
||||
return [mapCallbackCommunities];
|
||||
}
|
||||
|
||||
class Communities_component extends SvelteElement {
|
||||
constructor(options) {
|
||||
super();
|
||||
this.shadowRoot.innerHTML = `<style>@import '/css/common.css';#communities-img{position:absolute;width:11rem;left:50%;transform:translate(-50%);z-index:0;opacity:0.2}#text-container>:nth-child(3){margin-top:8rem}h4{margin-bottom:2rem}.location-info{position:relative;margin-bottom:2rem}.location-info p{margin-bottom:0}a{font-size:1.15rem;color:#DD1C1A}#map{--height:30rem;--width:100%;--margin-bottom:3rem}#text-container{max-width:calc(100vw - 4rem);margin:auto}h1{margin-bottom:1rem;font-size:2.5rem;text-align:center}h3{margin-bottom:1rem}#container{margin:auto;max-width:1200px;margin-top:1rem;margin-bottom:4rem}#container>div>p{margin-bottom:1rem}#container p{font-size:1.15rem;text-align:justify}</style>`;
|
||||
|
||||
init(
|
||||
this,
|
||||
{
|
||||
target: this.shadowRoot,
|
||||
props: attribute_to_object(this.attributes),
|
||||
customElement: true
|
||||
},
|
||||
instance,
|
||||
create_fragment,
|
||||
safe_not_equal,
|
||||
{},
|
||||
null
|
||||
);
|
||||
|
||||
if (options) {
|
||||
if (options.target) {
|
||||
insert_dev(options.target, this, options.anchor);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
customElements.define("communities-component", Communities_component);
|
||||
|
||||
export { Communities_component as default };
|
||||
|
|
|
@ -1 +1,99 @@
|
|||
import{S as e,i as s,a as t,b as o,s as i,e as a,n as r,d as n,h as c,o as d}from"./index-95aedb1a.js";function p(e){let s;return{c(){s=a("div"),s.innerHTML="<div><p>We use cookies to improve your experience, personalise your content and analyse site usage. By clicking “OK”, you agree to the use of cookies.</p></div>",this.c=r,n(s,"id","wrapper")},m(e,t){o(e,s,t)},p:r,i:r,o:r,d(e){e&&c(s)}}}function u(e){return d((()=>{})),[]}class h extends e{constructor(e){super(),this.shadowRoot.innerHTML="<style>@import '/css/common.css';#wrapper{display:none;position:relative;height:5rem;width:100%;background:white;box-shadow:0 0 0.314rem rgb(187, 187, 187);;}</style>",s(this,{target:this.shadowRoot,props:t(this.attributes),customElement:!0},u,p,i,{},null),e&&e.target&&o(e.target,this,e.anchor)}}customElements.define("cookies-dialog",h);export{h as default};
|
||||
|
||||
(function(l, r) { if (!l || l.getElementById('livereloadscript')) return; r = l.createElement('script'); r.async = 1; r.src = '//' + (self.location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1'; r.id = 'livereloadscript'; l.getElementsByTagName('head')[0].appendChild(r) })(self.document);
|
||||
import { S as SvelteElement, i as init, a as attribute_to_object, b as insert_dev, s as safe_not_equal, d as dispatch_dev, c as validate_slots, o as onMount, e as element, n as noop, g as add_location, h as attr_dev, k as append_dev, l as detach_dev } from './index-3b678a7c.js';
|
||||
|
||||
/* src\components\cookies-dialog.svelte generated by Svelte v3.52.0 */
|
||||
const file = "src\\components\\cookies-dialog.svelte";
|
||||
|
||||
function create_fragment(ctx) {
|
||||
let div1;
|
||||
let div0;
|
||||
let p;
|
||||
|
||||
const block = {
|
||||
c: function create() {
|
||||
div1 = element("div");
|
||||
div0 = element("div");
|
||||
p = element("p");
|
||||
p.textContent = "We use cookies to improve your experience, personalise your content and analyse site usage. By clicking “OK”, you agree to the use of cookies.";
|
||||
this.c = noop;
|
||||
add_location(p, file, 19, 8, 248);
|
||||
add_location(div0, file, 18, 4, 233);
|
||||
attr_dev(div1, "id", "wrapper");
|
||||
add_location(div1, file, 17, 0, 209);
|
||||
},
|
||||
l: function claim(nodes) {
|
||||
throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
|
||||
},
|
||||
m: function mount(target, anchor) {
|
||||
insert_dev(target, div1, anchor);
|
||||
append_dev(div1, div0);
|
||||
append_dev(div0, p);
|
||||
},
|
||||
p: noop,
|
||||
i: noop,
|
||||
o: noop,
|
||||
d: function destroy(detaching) {
|
||||
if (detaching) detach_dev(div1);
|
||||
}
|
||||
};
|
||||
|
||||
dispatch_dev("SvelteRegisterBlock", {
|
||||
block,
|
||||
id: create_fragment.name,
|
||||
type: "component",
|
||||
source: "",
|
||||
ctx
|
||||
});
|
||||
|
||||
return block;
|
||||
}
|
||||
|
||||
function instance($$self, $$props, $$invalidate) {
|
||||
let { $$slots: slots = {}, $$scope } = $$props;
|
||||
validate_slots('cookies-dialog', slots, []);
|
||||
|
||||
onMount(() => {
|
||||
|
||||
});
|
||||
|
||||
const writable_props = [];
|
||||
|
||||
Object.keys($$props).forEach(key => {
|
||||
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<cookies-dialog> was created with unknown prop '${key}'`);
|
||||
});
|
||||
|
||||
$$self.$capture_state = () => ({ onMount });
|
||||
return [];
|
||||
}
|
||||
|
||||
class Cookies_dialog extends SvelteElement {
|
||||
constructor(options) {
|
||||
super();
|
||||
this.shadowRoot.innerHTML = `<style>@import '/css/common.css';#wrapper{display:none;position:relative;height:5rem;width:100%;background:white;box-shadow:0 0 0.314rem rgb(187, 187, 187);;}</style>`;
|
||||
|
||||
init(
|
||||
this,
|
||||
{
|
||||
target: this.shadowRoot,
|
||||
props: attribute_to_object(this.attributes),
|
||||
customElement: true
|
||||
},
|
||||
instance,
|
||||
create_fragment,
|
||||
safe_not_equal,
|
||||
{},
|
||||
null
|
||||
);
|
||||
|
||||
if (options) {
|
||||
if (options.target) {
|
||||
insert_dev(options.target, this, options.anchor);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
customElements.define("cookies-dialog", Cookies_dialog);
|
||||
|
||||
export { Cookies_dialog as default };
|
||||
|
|
|
@ -1 +1,425 @@
|
|||
import{S as t,i as e,a as o,b as n,s as i,e as r,c as s,n as a,d as c,f as m,k as l,g as p,h as g,j as h,o as d,t as f}from"./index-95aedb1a.js";import{coops as u,addMarkersCoops as b}from"../../../../../../../../../js/coops.js";import"../../../../../../../../../js/components/map-component.js";function x(t,e,o){const n=t.slice();return n[1]=e[o],n}function w(t){let e,o,i,m,l,h,d,u,b,x,w,v,k,C,y,j,z,W,E,D,L,M,R,S,T,_,A,B,H,N,O,q,F,G,I,J,K,P,Q,U,V,X,Y,Z,$=t[1].name+"",tt=t[1].location[0]+"",et=t[1].market+"",ot=t[1].workers+"",nt=t[1].status+"",it=t[1].website+"",rt=t[1].contact[1]+"",st=t[1].description+"";return{c(){e=r("div"),o=r("div"),i=r("div"),m=r("p"),l=r("b"),l.textContent="Name: ",h=f($),d=s(),u=r("p"),b=r("b"),b.textContent="Location: ",x=f(tt),w=s(),v=r("p"),k=r("b"),k.textContent="Market: ",C=f(et),y=s(),j=r("p"),z=r("b"),z.textContent="Workers: ",W=f(ot),E=s(),D=r("p"),L=r("b"),L.textContent="Status: ",M=f(nt),R=s(),S=r("p"),T=r("b"),T.textContent="Website: ",_=r("a"),A=f(it),B=s(),H=r("p"),N=r("b"),N.textContent="Contact: ",O=r("a"),q=f(rt),F=s(),G=r("picture"),I=r("source"),J=s(),K=r("source"),P=s(),Q=r("img"),U=s(),V=r("p"),X=r("b"),X.textContent="Description: ",Y=f(st),Z=s(),c(_,"href","https://www."+t[1].website),c(_,"target","_blank"),c(_,"rel","noreferrer"),c(O,"href",t[1].contact[0]),c(O,"target",";_blank;"),c(O,"rel","noreferrer"),c(I,"srcset","/img/coops/"+t[1].logo+".webp"),c(K,"srcset","/img/coops/"+t[1].logo+".png"),c(Q,"class","coop-logo"),c(Q,"alt","logo"),c(e,"class","location-info")},m(t,r){n(t,e,r),p(e,o),p(o,i),p(i,m),p(m,l),p(m,h),p(i,d),p(i,u),p(u,b),p(u,x),p(i,w),p(i,v),p(v,k),p(v,C),p(i,y),p(i,j),p(j,z),p(j,W),p(i,E),p(i,D),p(D,L),p(D,M),p(i,R),p(i,S),p(S,T),p(S,_),p(_,A),p(i,B),p(i,H),p(H,N),p(H,O),p(O,q),p(o,F),p(o,G),p(G,I),p(G,J),p(G,K),p(G,P),p(G,Q),p(e,U),p(e,V),p(V,X),p(V,Y),p(e,Z)},p:a,d(t){t&&g(e)}}}function v(t){let e,o,i,d,f,b,v,k,C,y,j,z,W,E,D,L,M,R=u,S=[];for(let e=0;e<R.length;e+=1)S[e]=w(x(t,R,e));return{c(){e=r("div"),o=r("div"),i=r("h1"),i.textContent="Cooperatives",d=s(),f=r("img"),v=s(),k=r("p"),k.textContent="We establish worker cooperatives that embody a transformative business model where employees own and control the enterprise. Each worker has a voice in decision-making, and profits are distributed based on individual contributions. This participatory structure fosters ownership, motivation, and job satisfaction, creating a more fulfilling work experience as well as challenging the wealth concentration in traditional capitalist businesses.",C=s(),y=r("p"),y.textContent="By focusing on employees' needs, our cooperatives create supportive and sustainable work environments that foster social cohesion and job security. We also prioritize the interests of local communities, taking a long-term perspective. With workers making decisions, we avoid harmful short-term profit-driven strategies and instead reinvest our profits, contributing to community development and resilience.",j=s(),z=r("h3"),z.textContent="Our cooperatives",W=s(),E=r("map-component"),D=s(),L=r("h4"),L.textContent="Europe",M=s();for(let t=0;t<S.length;t+=1)S[t].c();this.c=a,c(f,"id","coops-img"),m(f.src,b="/img/common/coops.svg")||c(f,"src","/img/common/coops.svg"),c(f,"alt","coops"),l(E,"id","map"),l(E,"callback",t[0]),c(o,"id","text-container"),c(e,"id","container")},m(t,r){n(t,e,r),p(e,o),p(o,i),p(o,d),p(o,f),p(o,v),p(o,k),p(o,C),p(o,y),p(o,j),p(o,z),p(o,W),p(o,E),p(o,D),p(o,L),p(o,M);for(let t=0;t<S.length;t+=1)S[t].m(o,null)},p(t,[e]){if(0&e){let n;for(R=u,n=0;n<R.length;n+=1){const i=x(t,R,n);S[n]?S[n].p(i,e):(S[n]=w(i),S[n].c(),S[n].m(o,null))}for(;n<S.length;n+=1)S[n].d(1);S.length=R.length}},i:a,o:a,d(t){t&&g(e),h(S,t)}}}function k(t){return d((()=>{})),[function(t){let e=t([51.505,-.09],3);b(e)}]}class C extends t{constructor(t){super(),this.shadowRoot.innerHTML="<style>@import '/css/common.css';#coops-img{position:absolute;width:10.5rem;left:50%;transform:translate(-50%);z-index:0;opacity:0.2}#text-container>:nth-child(3){margin-top:8rem}.location-info>:first-child{display:flex;align-content:center;width:100%;justify-content:space-between;gap:3rem;align-items:center}.location-info>:first-child>:first-child{flex:none}.coop-logo{position:relative;right:0;max-height:8rem;max-width:100%}h4{margin-bottom:2rem}.location-info{position:relative;margin-bottom:2rem}.location-info p{margin-bottom:0}a{font-size:1.2rem;color:#DD1C1A}#map{--height:30rem;--width:100%;--margin-bottom:3rem}#text-container{max-width:calc(100vw - 4rem);margin:auto}h1{margin-bottom:1rem;font-size:2.5rem;text-align:center}h3{margin-bottom:1rem}#container{margin:auto;max-width:1200px;margin-top:1rem;margin-bottom:4rem}#container>div>p{margin-bottom:1rem}#container p{font-size:1.2rem;text-align:justify}</style>",e(this,{target:this.shadowRoot,props:o(this.attributes),customElement:!0},k,v,i,{},null),t&&t.target&&n(t.target,this,t.anchor)}}customElements.define("cooperatives-component",C);export{C as default};
|
||||
|
||||
(function(l, r) { if (!l || l.getElementById('livereloadscript')) return; r = l.createElement('script'); r.async = 1; r.src = '//' + (self.location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1'; r.id = 'livereloadscript'; l.getElementsByTagName('head')[0].appendChild(r) })(self.document);
|
||||
import { S as SvelteElement, i as init, a as attribute_to_object, b as insert_dev, s as safe_not_equal, v as validate_each_argument, d as dispatch_dev, c as validate_slots, o as onMount, e as element, f as space, n as noop, g as add_location, h as attr_dev, j as src_url_equal, p as set_custom_element_data, k as append_dev, l as detach_dev, m as destroy_each, t as text } from './index-3b678a7c.js';
|
||||
import { coops, addMarkersCoops } from '../../../../../../../../../js/coops.js';
|
||||
import '../../../../../../../../../js/components/map-component.js';
|
||||
|
||||
/* src\cooperatives-component.svelte generated by Svelte v3.52.0 */
|
||||
|
||||
const file = "src\\cooperatives-component.svelte";
|
||||
|
||||
function get_each_context(ctx, list, i) {
|
||||
const child_ctx = ctx.slice();
|
||||
child_ctx[1] = list[i];
|
||||
return child_ctx;
|
||||
}
|
||||
|
||||
// (32:8) {#each coops as coop}
|
||||
function create_each_block(ctx) {
|
||||
let div2;
|
||||
let div1;
|
||||
let div0;
|
||||
let p0;
|
||||
let b0;
|
||||
let t1_value = /*coop*/ ctx[1].name + "";
|
||||
let t1;
|
||||
let t2;
|
||||
let p1;
|
||||
let b1;
|
||||
let t4_value = /*coop*/ ctx[1].location[0] + "";
|
||||
let t4;
|
||||
let t5;
|
||||
let p2;
|
||||
let b2;
|
||||
let t7_value = /*coop*/ ctx[1].market + "";
|
||||
let t7;
|
||||
let t8;
|
||||
let p3;
|
||||
let b3;
|
||||
let t10_value = /*coop*/ ctx[1].workers + "";
|
||||
let t10;
|
||||
let t11;
|
||||
let p4;
|
||||
let b4;
|
||||
let t13_value = /*coop*/ ctx[1].status + "";
|
||||
let t13;
|
||||
let t14;
|
||||
let p5;
|
||||
let b5;
|
||||
let a0;
|
||||
let t16_value = /*coop*/ ctx[1].website + "";
|
||||
let t16;
|
||||
let t17;
|
||||
let p6;
|
||||
let b6;
|
||||
let a1;
|
||||
let t19_value = /*coop*/ ctx[1].contact[1] + "";
|
||||
let t19;
|
||||
let t20;
|
||||
let picture;
|
||||
let source0;
|
||||
let t21;
|
||||
let source1;
|
||||
let t22;
|
||||
let img;
|
||||
let t23;
|
||||
let p7;
|
||||
let b7;
|
||||
let t25_value = /*coop*/ ctx[1].description + "";
|
||||
let t25;
|
||||
let t26;
|
||||
|
||||
const block = {
|
||||
c: function create() {
|
||||
div2 = element("div");
|
||||
div1 = element("div");
|
||||
div0 = element("div");
|
||||
p0 = element("p");
|
||||
b0 = element("b");
|
||||
b0.textContent = "Name: ";
|
||||
t1 = text(t1_value);
|
||||
t2 = space();
|
||||
p1 = element("p");
|
||||
b1 = element("b");
|
||||
b1.textContent = "Location: ";
|
||||
t4 = text(t4_value);
|
||||
t5 = space();
|
||||
p2 = element("p");
|
||||
b2 = element("b");
|
||||
b2.textContent = "Market: ";
|
||||
t7 = text(t7_value);
|
||||
t8 = space();
|
||||
p3 = element("p");
|
||||
b3 = element("b");
|
||||
b3.textContent = "Workers: ";
|
||||
t10 = text(t10_value);
|
||||
t11 = space();
|
||||
p4 = element("p");
|
||||
b4 = element("b");
|
||||
b4.textContent = "Status: ";
|
||||
t13 = text(t13_value);
|
||||
t14 = space();
|
||||
p5 = element("p");
|
||||
b5 = element("b");
|
||||
b5.textContent = "Website: ";
|
||||
a0 = element("a");
|
||||
t16 = text(t16_value);
|
||||
t17 = space();
|
||||
p6 = element("p");
|
||||
b6 = element("b");
|
||||
b6.textContent = "Contact: ";
|
||||
a1 = element("a");
|
||||
t19 = text(t19_value);
|
||||
t20 = space();
|
||||
picture = element("picture");
|
||||
source0 = element("source");
|
||||
t21 = space();
|
||||
source1 = element("source");
|
||||
t22 = space();
|
||||
img = element("img");
|
||||
t23 = space();
|
||||
p7 = element("p");
|
||||
b7 = element("b");
|
||||
b7.textContent = "Description: ";
|
||||
t25 = text(t25_value);
|
||||
t26 = space();
|
||||
add_location(b0, file, 35, 27, 1847);
|
||||
add_location(p0, file, 35, 24, 1844);
|
||||
add_location(b1, file, 36, 27, 1904);
|
||||
add_location(p1, file, 36, 24, 1901);
|
||||
add_location(b2, file, 37, 27, 1972);
|
||||
add_location(p2, file, 37, 24, 1969);
|
||||
add_location(b3, file, 38, 27, 2033);
|
||||
add_location(p3, file, 38, 24, 2030);
|
||||
add_location(b4, file, 39, 27, 2096);
|
||||
add_location(p4, file, 39, 24, 2093);
|
||||
add_location(b5, file, 40, 27, 2157);
|
||||
attr_dev(a0, "href", "https://www." + /*coop*/ ctx[1].website);
|
||||
attr_dev(a0, "target", "_blank");
|
||||
attr_dev(a0, "rel", "noreferrer");
|
||||
add_location(a0, file, 40, 43, 2173);
|
||||
add_location(p5, file, 40, 24, 2154);
|
||||
add_location(b6, file, 41, 27, 2293);
|
||||
attr_dev(a1, "href", /*coop*/ ctx[1].contact[0]);
|
||||
attr_dev(a1, "target", ";_blank;");
|
||||
attr_dev(a1, "rel", "noreferrer");
|
||||
add_location(a1, file, 41, 43, 2309);
|
||||
add_location(p6, file, 41, 24, 2290);
|
||||
add_location(div0, file, 34, 20, 1813);
|
||||
attr_dev(source0, "srcset", "/img/coops/" + /*coop*/ ctx[1].logo + ".webp");
|
||||
add_location(source0, file, 44, 24, 2476);
|
||||
attr_dev(source1, "srcset", "/img/coops/" + /*coop*/ ctx[1].logo + ".png");
|
||||
add_location(source1, file, 45, 24, 2551);
|
||||
attr_dev(img, "class", "coop-logo");
|
||||
attr_dev(img, "alt", "logo");
|
||||
add_location(img, file, 46, 24, 2625);
|
||||
add_location(picture, file, 43, 20, 2441);
|
||||
add_location(div1, file, 33, 16, 1786);
|
||||
add_location(b7, file, 49, 19, 2736);
|
||||
add_location(p7, file, 49, 16, 2733);
|
||||
attr_dev(div2, "class", "location-info");
|
||||
add_location(div2, file, 32, 12, 1741);
|
||||
},
|
||||
m: function mount(target, anchor) {
|
||||
insert_dev(target, div2, anchor);
|
||||
append_dev(div2, div1);
|
||||
append_dev(div1, div0);
|
||||
append_dev(div0, p0);
|
||||
append_dev(p0, b0);
|
||||
append_dev(p0, t1);
|
||||
append_dev(div0, t2);
|
||||
append_dev(div0, p1);
|
||||
append_dev(p1, b1);
|
||||
append_dev(p1, t4);
|
||||
append_dev(div0, t5);
|
||||
append_dev(div0, p2);
|
||||
append_dev(p2, b2);
|
||||
append_dev(p2, t7);
|
||||
append_dev(div0, t8);
|
||||
append_dev(div0, p3);
|
||||
append_dev(p3, b3);
|
||||
append_dev(p3, t10);
|
||||
append_dev(div0, t11);
|
||||
append_dev(div0, p4);
|
||||
append_dev(p4, b4);
|
||||
append_dev(p4, t13);
|
||||
append_dev(div0, t14);
|
||||
append_dev(div0, p5);
|
||||
append_dev(p5, b5);
|
||||
append_dev(p5, a0);
|
||||
append_dev(a0, t16);
|
||||
append_dev(div0, t17);
|
||||
append_dev(div0, p6);
|
||||
append_dev(p6, b6);
|
||||
append_dev(p6, a1);
|
||||
append_dev(a1, t19);
|
||||
append_dev(div1, t20);
|
||||
append_dev(div1, picture);
|
||||
append_dev(picture, source0);
|
||||
append_dev(picture, t21);
|
||||
append_dev(picture, source1);
|
||||
append_dev(picture, t22);
|
||||
append_dev(picture, img);
|
||||
append_dev(div2, t23);
|
||||
append_dev(div2, p7);
|
||||
append_dev(p7, b7);
|
||||
append_dev(p7, t25);
|
||||
append_dev(div2, t26);
|
||||
},
|
||||
p: noop,
|
||||
d: function destroy(detaching) {
|
||||
if (detaching) detach_dev(div2);
|
||||
}
|
||||
};
|
||||
|
||||
dispatch_dev("SvelteRegisterBlock", {
|
||||
block,
|
||||
id: create_each_block.name,
|
||||
type: "each",
|
||||
source: "(32:8) {#each coops as coop}",
|
||||
ctx
|
||||
});
|
||||
|
||||
return block;
|
||||
}
|
||||
|
||||
function create_fragment(ctx) {
|
||||
let div1;
|
||||
let div0;
|
||||
let h1;
|
||||
let t1;
|
||||
let img;
|
||||
let img_src_value;
|
||||
let t2;
|
||||
let p0;
|
||||
let t4;
|
||||
let p1;
|
||||
let t6;
|
||||
let h3;
|
||||
let t8;
|
||||
let map_component;
|
||||
let t9;
|
||||
let h4;
|
||||
let t11;
|
||||
let each_value = coops;
|
||||
validate_each_argument(each_value);
|
||||
let each_blocks = [];
|
||||
|
||||
for (let i = 0; i < each_value.length; i += 1) {
|
||||
each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i));
|
||||
}
|
||||
|
||||
const block = {
|
||||
c: function create() {
|
||||
div1 = element("div");
|
||||
div0 = element("div");
|
||||
h1 = element("h1");
|
||||
h1.textContent = "Cooperatives";
|
||||
t1 = space();
|
||||
img = element("img");
|
||||
t2 = space();
|
||||
p0 = element("p");
|
||||
p0.textContent = "We establish worker cooperatives that embody a transformative business model where employees own and control the enterprise. Each worker has a voice in decision-making, and profits are distributed based on individual contributions. This participatory structure fosters ownership, motivation, and job satisfaction, creating a more fulfilling work experience as well as challenging the wealth concentration in traditional capitalist businesses.";
|
||||
t4 = space();
|
||||
p1 = element("p");
|
||||
p1.textContent = "By focusing on employees' needs, our cooperatives create supportive and sustainable work environments that foster social cohesion and job security. We also prioritize the interests of local communities, taking a long-term perspective. With workers making decisions, we avoid harmful short-term profit-driven strategies and instead reinvest our profits, contributing to community development and resilience.";
|
||||
t6 = space();
|
||||
h3 = element("h3");
|
||||
h3.textContent = "Our cooperatives";
|
||||
t8 = space();
|
||||
map_component = element("map-component");
|
||||
t9 = space();
|
||||
h4 = element("h4");
|
||||
h4.textContent = "Europe";
|
||||
t11 = space();
|
||||
|
||||
for (let i = 0; i < each_blocks.length; i += 1) {
|
||||
each_blocks[i].c();
|
||||
}
|
||||
|
||||
this.c = noop;
|
||||
add_location(h1, file, 24, 8, 585);
|
||||
attr_dev(img, "id", "coops-img");
|
||||
if (!src_url_equal(img.src, img_src_value = "/img/common/coops.svg")) attr_dev(img, "src", img_src_value);
|
||||
attr_dev(img, "alt", "coops");
|
||||
add_location(img, file, 25, 8, 616);
|
||||
add_location(p0, file, 26, 8, 686);
|
||||
add_location(p1, file, 27, 8, 1145);
|
||||
add_location(h3, file, 28, 8, 1568);
|
||||
set_custom_element_data(map_component, "id", "map");
|
||||
set_custom_element_data(map_component, "callback", /*mapCallbackCoops*/ ctx[0]);
|
||||
add_location(map_component, file, 29, 8, 1603);
|
||||
add_location(h4, file, 30, 8, 1681);
|
||||
attr_dev(div0, "id", "text-container");
|
||||
add_location(div0, file, 23, 4, 550);
|
||||
attr_dev(div1, "id", "container");
|
||||
add_location(div1, file, 21, 0, 463);
|
||||
},
|
||||
l: function claim(nodes) {
|
||||
throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
|
||||
},
|
||||
m: function mount(target, anchor) {
|
||||
insert_dev(target, div1, anchor);
|
||||
append_dev(div1, div0);
|
||||
append_dev(div0, h1);
|
||||
append_dev(div0, t1);
|
||||
append_dev(div0, img);
|
||||
append_dev(div0, t2);
|
||||
append_dev(div0, p0);
|
||||
append_dev(div0, t4);
|
||||
append_dev(div0, p1);
|
||||
append_dev(div0, t6);
|
||||
append_dev(div0, h3);
|
||||
append_dev(div0, t8);
|
||||
append_dev(div0, map_component);
|
||||
append_dev(div0, t9);
|
||||
append_dev(div0, h4);
|
||||
append_dev(div0, t11);
|
||||
|
||||
for (let i = 0; i < each_blocks.length; i += 1) {
|
||||
each_blocks[i].m(div0, null);
|
||||
}
|
||||
},
|
||||
p: function update(ctx, [dirty]) {
|
||||
if (dirty & /*coops*/ 0) {
|
||||
each_value = coops;
|
||||
validate_each_argument(each_value);
|
||||
let i;
|
||||
|
||||
for (i = 0; i < each_value.length; i += 1) {
|
||||
const child_ctx = get_each_context(ctx, each_value, i);
|
||||
|
||||
if (each_blocks[i]) {
|
||||
each_blocks[i].p(child_ctx, dirty);
|
||||
} else {
|
||||
each_blocks[i] = create_each_block(child_ctx);
|
||||
each_blocks[i].c();
|
||||
each_blocks[i].m(div0, null);
|
||||
}
|
||||
}
|
||||
|
||||
for (; i < each_blocks.length; i += 1) {
|
||||
each_blocks[i].d(1);
|
||||
}
|
||||
|
||||
each_blocks.length = each_value.length;
|
||||
}
|
||||
},
|
||||
i: noop,
|
||||
o: noop,
|
||||
d: function destroy(detaching) {
|
||||
if (detaching) detach_dev(div1);
|
||||
destroy_each(each_blocks, detaching);
|
||||
}
|
||||
};
|
||||
|
||||
dispatch_dev("SvelteRegisterBlock", {
|
||||
block,
|
||||
id: create_fragment.name,
|
||||
type: "component",
|
||||
source: "",
|
||||
ctx
|
||||
});
|
||||
|
||||
return block;
|
||||
}
|
||||
|
||||
function instance($$self, $$props, $$invalidate) {
|
||||
let { $$slots: slots = {}, $$scope } = $$props;
|
||||
validate_slots('cooperatives-component', slots, []);
|
||||
|
||||
function mapCallbackCoops(createMap) {
|
||||
let map = createMap([51.505, -0.09], 3);
|
||||
addMarkersCoops(map);
|
||||
}
|
||||
|
||||
onMount(() => {
|
||||
|
||||
});
|
||||
|
||||
const writable_props = [];
|
||||
|
||||
Object.keys($$props).forEach(key => {
|
||||
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<cooperatives-component> was created with unknown prop '${key}'`);
|
||||
});
|
||||
|
||||
$$self.$capture_state = () => ({
|
||||
onMount,
|
||||
coops,
|
||||
addMarkersCoops,
|
||||
mapCallbackCoops
|
||||
});
|
||||
|
||||
return [mapCallbackCoops];
|
||||
}
|
||||
|
||||
class Cooperatives_component extends SvelteElement {
|
||||
constructor(options) {
|
||||
super();
|
||||
this.shadowRoot.innerHTML = `<style>@import '/css/common.css';#coops-img{position:absolute;width:10.5rem;left:50%;transform:translate(-50%);z-index:0;opacity:0.2}#text-container>:nth-child(3){margin-top:8rem}.location-info>:first-child{display:flex;align-content:center;width:100%;justify-content:space-between;gap:3rem;align-items:center}.location-info>:first-child>:first-child{flex:none}.coop-logo{position:relative;right:0;max-height:8rem;max-width:100%}h4{margin-bottom:2rem}.location-info{position:relative;margin-bottom:2rem}.location-info p{margin-bottom:0}a{font-size:1.15rem;color:#DD1C1A}#map{--height:30rem;--width:100%;--margin-bottom:3rem}#text-container{max-width:calc(100vw - 4rem);margin:auto}h1{margin-bottom:1rem;font-size:2.5rem;text-align:center}h3{margin-bottom:1rem}#container{margin:auto;max-width:1200px;margin-top:1rem;margin-bottom:4rem}#container>div>p{margin-bottom:1rem}#container p{font-size:1.15rem;text-align:justify}</style>`;
|
||||
|
||||
init(
|
||||
this,
|
||||
{
|
||||
target: this.shadowRoot,
|
||||
props: attribute_to_object(this.attributes),
|
||||
customElement: true
|
||||
},
|
||||
instance,
|
||||
create_fragment,
|
||||
safe_not_equal,
|
||||
{},
|
||||
null
|
||||
);
|
||||
|
||||
if (options) {
|
||||
if (options.target) {
|
||||
insert_dev(options.target, this, options.anchor);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
customElements.define("cooperatives-component", Cooperatives_component);
|
||||
|
||||
export { Cooperatives_component as default };
|
||||
|
|
|
@ -1 +1,208 @@
|
|||
import{S as t,i as a,a as e,b as o,s,e as n,c as r,n as i,d as c,g as h,p as l,h as d}from"./index-95aedb1a.js";function p(t){let a,e,s,p,g,f,m,u,w;return{c(){a=n("footer"),e=n("div"),s=n("div"),s.innerHTML='<div id="contact-us-container"><h2>CONTACT US</h2> \n \n <p>WhatsApp: <a href="https://chat.whatsapp.com/BhnmUNljUxJ2AjeHUwyTKh" target="_blank" rel="noreferrer">group invite link</a></p></div>',p=r(),g=n("button"),g.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="42.545" height="72.601" viewBox="0 0 42.545 72.601"><g id="Group_268" data-name="Group 268" transform="translate(-6.177 -2.399)"><rect id="Rectangle_146" data-name="Rectangle 146" width="11" height="51" rx="5.5" transform="translate(22 24)" fill="#DD1C1A"></rect><path id="Path_1145" data-name="Path 1145" d="M23.814,4.021a5,5,0,0,1,7.372,0l16.134,17.6c2.94,3.207,1.046,10.4-3.686,8.379S28.02,14.081,28.391,13.524,16.544,27.976,11.366,30,4.741,24.828,7.68,21.621Z" fill="#DD1C1A"></path></g></svg>',f=r(),m=n("p"),m.textContent="© 2023 A global network of Libertarian Socialists",this.c=i,c(s,"id","footer-grid-content-container"),c(s,"class","logged"),c(g,"id","footer-up"),c(g,"aria-label","go up"),c(m,"id","footer-copyright"),c(e,"id","footer-content-container")},m(n,r){o(n,a,r),h(a,e),h(e,s),h(e,p),h(e,g),h(e,f),h(e,m),u||(w=l(g,"click",t[0]),u=!0)},p:i,i:i,o:i,d(t){t&&d(a),u=!1,w()}}}function g(t){return[()=>{location.href="#"}]}class f extends t{constructor(t){super(),this.shadowRoot.innerHTML="<style>@import '/css/common.css';@import '/css/footer.css';</style>",a(this,{target:this.shadowRoot,props:e(this.attributes),customElement:!0},g,p,s,{},null),t&&t.target&&o(t.target,this,t.anchor)}}customElements.define("footer-component",f);export{f as default};
|
||||
|
||||
(function(l, r) { if (!l || l.getElementById('livereloadscript')) return; r = l.createElement('script'); r.async = 1; r.src = '//' + (self.location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1'; r.id = 'livereloadscript'; l.getElementsByTagName('head')[0].appendChild(r) })(self.document);
|
||||
import { S as SvelteElement, i as init, a as attribute_to_object, b as insert_dev, s as safe_not_equal, d as dispatch_dev, c as validate_slots, e as element, f as space, t as text, C as svg_element, n as noop, g as add_location, h as attr_dev, w as set_style, k as append_dev, x as listen_dev, l as detach_dev } from './index-3b678a7c.js';
|
||||
|
||||
/* src\footer\footer-component.svelte generated by Svelte v3.52.0 */
|
||||
|
||||
const file = "src\\footer\\footer-component.svelte";
|
||||
|
||||
function create_fragment(ctx) {
|
||||
let footer;
|
||||
let div2;
|
||||
let div1;
|
||||
let div0;
|
||||
let h2;
|
||||
let t1;
|
||||
let p0;
|
||||
let t2;
|
||||
let a0;
|
||||
let t4;
|
||||
let p1;
|
||||
let t5;
|
||||
let a1;
|
||||
let t7;
|
||||
let button;
|
||||
let svg;
|
||||
let g;
|
||||
let rect;
|
||||
let path;
|
||||
let t8;
|
||||
let p2;
|
||||
let mounted;
|
||||
let dispose;
|
||||
|
||||
const block = {
|
||||
c: function create() {
|
||||
footer = element("footer");
|
||||
div2 = element("div");
|
||||
div1 = element("div");
|
||||
div0 = element("div");
|
||||
h2 = element("h2");
|
||||
h2.textContent = "CONTACT US";
|
||||
t1 = space();
|
||||
p0 = element("p");
|
||||
t2 = text("WhatsApp: ");
|
||||
a0 = element("a");
|
||||
a0.textContent = "invite link";
|
||||
t4 = space();
|
||||
p1 = element("p");
|
||||
t5 = text("Discord: ");
|
||||
a1 = element("a");
|
||||
a1.textContent = "invite link";
|
||||
t7 = space();
|
||||
button = element("button");
|
||||
svg = svg_element("svg");
|
||||
g = svg_element("g");
|
||||
rect = svg_element("rect");
|
||||
path = svg_element("path");
|
||||
t8 = space();
|
||||
p2 = element("p");
|
||||
p2.textContent = "© 2023 A global network of Libertarian Socialists";
|
||||
this.c = noop;
|
||||
add_location(h2, file, 16, 16, 313);
|
||||
attr_dev(a0, "href", "https://chat.whatsapp.com/BhnmUNljUxJ2AjeHUwyTKh");
|
||||
attr_dev(a0, "target", "_blank");
|
||||
attr_dev(a0, "rel", "noreferrer");
|
||||
set_style(a0, "margin-left", "0.5rem");
|
||||
add_location(a0, file, 18, 29, 454);
|
||||
add_location(p0, file, 18, 16, 441);
|
||||
attr_dev(a1, "href", "https://discord.gg/xAPZmyr8B6");
|
||||
attr_dev(a1, "target", "_blank");
|
||||
attr_dev(a1, "rel", "noreferrer");
|
||||
set_style(a1, "margin-left", "2rem");
|
||||
add_location(a1, file, 19, 28, 622);
|
||||
add_location(p1, file, 19, 16, 610);
|
||||
attr_dev(div0, "id", "contact-us-container");
|
||||
add_location(div0, file, 15, 12, 264);
|
||||
attr_dev(div1, "id", "footer-grid-content-container");
|
||||
attr_dev(div1, "class", "logged");
|
||||
add_location(div1, file, 14, 8, 195);
|
||||
attr_dev(rect, "id", "Rectangle_146");
|
||||
attr_dev(rect, "data-name", "Rectangle 146");
|
||||
attr_dev(rect, "width", "11");
|
||||
attr_dev(rect, "height", "51");
|
||||
attr_dev(rect, "rx", "5.5");
|
||||
attr_dev(rect, "transform", "translate(22 24)");
|
||||
attr_dev(rect, "fill", "#DD1C1A");
|
||||
add_location(rect, file, 25, 18, 1092);
|
||||
attr_dev(path, "id", "Path_1145");
|
||||
attr_dev(path, "data-name", "Path 1145");
|
||||
attr_dev(path, "d", "M23.814,4.021a5,5,0,0,1,7.372,0l16.134,17.6c2.94,3.207,1.046,10.4-3.686,8.379S28.02,14.081,28.391,13.524,16.544,27.976,11.366,30,4.741,24.828,7.68,21.621Z");
|
||||
attr_dev(path, "fill", "#DD1C1A");
|
||||
add_location(path, file, 26, 18, 1240);
|
||||
attr_dev(g, "id", "Group_268");
|
||||
attr_dev(g, "data-name", "Group 268");
|
||||
attr_dev(g, "transform", "translate(-6.177 -2.399)");
|
||||
add_location(g, file, 24, 16, 995);
|
||||
attr_dev(svg, "xmlns", "http://www.w3.org/2000/svg");
|
||||
attr_dev(svg, "width", "42.545");
|
||||
attr_dev(svg, "height", "72.601");
|
||||
attr_dev(svg, "viewBox", "0 0 42.545 72.601");
|
||||
add_location(svg, file, 23, 12, 878);
|
||||
attr_dev(button, "id", "footer-up");
|
||||
attr_dev(button, "aria-label", "go up");
|
||||
add_location(button, file, 22, 8, 785);
|
||||
attr_dev(p2, "id", "footer-copyright");
|
||||
add_location(p2, file, 30, 8, 1559);
|
||||
attr_dev(div2, "id", "footer-content-container");
|
||||
add_location(div2, file, 13, 4, 150);
|
||||
add_location(footer, file, 12, 0, 136);
|
||||
},
|
||||
l: function claim(nodes) {
|
||||
throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
|
||||
},
|
||||
m: function mount(target, anchor) {
|
||||
insert_dev(target, footer, anchor);
|
||||
append_dev(footer, div2);
|
||||
append_dev(div2, div1);
|
||||
append_dev(div1, div0);
|
||||
append_dev(div0, h2);
|
||||
append_dev(div0, t1);
|
||||
append_dev(div0, p0);
|
||||
append_dev(p0, t2);
|
||||
append_dev(p0, a0);
|
||||
append_dev(div0, t4);
|
||||
append_dev(div0, p1);
|
||||
append_dev(p1, t5);
|
||||
append_dev(p1, a1);
|
||||
append_dev(div2, t7);
|
||||
append_dev(div2, button);
|
||||
append_dev(button, svg);
|
||||
append_dev(svg, g);
|
||||
append_dev(g, rect);
|
||||
append_dev(g, path);
|
||||
append_dev(div2, t8);
|
||||
append_dev(div2, p2);
|
||||
|
||||
if (!mounted) {
|
||||
dispose = listen_dev(button, "click", /*click_handler*/ ctx[0], false, false, false);
|
||||
mounted = true;
|
||||
}
|
||||
},
|
||||
p: noop,
|
||||
i: noop,
|
||||
o: noop,
|
||||
d: function destroy(detaching) {
|
||||
if (detaching) detach_dev(footer);
|
||||
mounted = false;
|
||||
dispose();
|
||||
}
|
||||
};
|
||||
|
||||
dispatch_dev("SvelteRegisterBlock", {
|
||||
block,
|
||||
id: create_fragment.name,
|
||||
type: "component",
|
||||
source: "",
|
||||
ctx
|
||||
});
|
||||
|
||||
return block;
|
||||
}
|
||||
|
||||
function instance($$self, $$props) {
|
||||
let { $$slots: slots = {}, $$scope } = $$props;
|
||||
validate_slots('footer-component', slots, []);
|
||||
const writable_props = [];
|
||||
|
||||
Object.keys($$props).forEach(key => {
|
||||
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<footer-component> was created with unknown prop '${key}'`);
|
||||
});
|
||||
|
||||
const click_handler = () => {
|
||||
location.href = '#';
|
||||
};
|
||||
|
||||
return [click_handler];
|
||||
}
|
||||
|
||||
class Footer_component extends SvelteElement {
|
||||
constructor(options) {
|
||||
super();
|
||||
this.shadowRoot.innerHTML = `<style>@import '/css/common.css';@import '/css/footer.css';</style>`;
|
||||
|
||||
init(
|
||||
this,
|
||||
{
|
||||
target: this.shadowRoot,
|
||||
props: attribute_to_object(this.attributes),
|
||||
customElement: true
|
||||
},
|
||||
instance,
|
||||
create_fragment,
|
||||
safe_not_equal,
|
||||
{},
|
||||
null
|
||||
);
|
||||
|
||||
if (options) {
|
||||
if (options.target) {
|
||||
insert_dev(options.target, this, options.anchor);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
customElements.define("footer-component", Footer_component);
|
||||
|
||||
export { Footer_component as default };
|
||||
|
|
|
@ -1 +1,318 @@
|
|||
import{S as t,i as e,a as o,b as n,l as a,s as i,e as s,c as r,n as m,d as c,f as l,k as p,g as u,h as g,j as h,o as d,t as f}from"./index-95aedb1a.js";import{groups as b,addMarkersGroups as x}from"../../../../../../../../../js/groups.js";import"../../../../../../../../../js/components/map-component.js";function w(t,e,o){const n=t.slice();return n[1]=e[o],n}function v(t){let e,o,a,i,l,p,h,d,b,x,w,v,y,C,k=t[1].location[0]+"",j=t[1].members+"",z=t[1].contact[1]+"";return{c(){e=s("div"),o=s("p"),a=s("b"),a.textContent="Location: ",i=f(k),l=r(),p=s("p"),h=s("b"),h.textContent="Members: ",d=f(j),b=r(),x=s("p"),w=s("b"),w.textContent="Contact: ",v=s("a"),y=f(z),C=r(),c(v,"href",t[1].contact[0]),c(v,"target",";_blank;"),c(v,"rel","noreferrer"),c(e,"class","location-info")},m(t,s){n(t,e,s),u(e,o),u(o,a),u(o,i),u(e,l),u(e,p),u(p,h),u(p,d),u(e,b),u(e,x),u(x,w),u(x,v),u(v,y),u(e,C)},p:m,d(t){t&&g(e)}}}function y(t){let e,o,a,i,d,f,x,y,C,k,j,z,G,q,E,T,W,$=b,A=[];for(let e=0;e<$.length;e+=1)A[e]=v(w(t,$,e));return{c(){e=s("div"),o=s("div"),a=s("h1"),a.textContent="Groups",i=r(),d=s("img"),x=r(),y=s("p"),y.textContent="We aim to raise awareness about the negative impact of current politico-economic systems on our well-being. Through education, community engagement, and analysis, we reveal the flaws and inequalities in capitalist societies. By highlighting these issues, we empower people to question the status quo and imagine fairer and more sustainable alternatives.",C=r(),k=s("p"),k.textContent="But our mission goes beyond theory. We believe in mutual aid and collective action to address immediate challenges within capitalism. Through mutual aid, we support each other by sharing resources, knowledge, and skills, fostering solidarity and resilience. Whether it's community gardens, food cooperatives, or support networks, our goal is to make life under capitalism more bearable and create pockets of resistance and alternatives within the system.",j=r(),z=s("h3"),z.textContent="Our groups",G=r(),q=s("map-component"),E=r(),T=s("h4"),T.textContent="Europe",W=r();for(let t=0;t<A.length;t+=1)A[t].c();this.c=m,c(d,"id","groups-img"),l(d.src,f="/img/common/groups.svg")||c(d,"src","/img/common/groups.svg"),c(d,"alt","groups"),p(q,"id","map"),p(q,"callback",t[0]),c(o,"id","text-container"),c(e,"id","container")},m(t,s){n(t,e,s),u(e,o),u(o,a),u(o,i),u(o,d),u(o,x),u(o,y),u(o,C),u(o,k),u(o,j),u(o,z),u(o,G),u(o,q),u(o,E),u(o,T),u(o,W);for(let t=0;t<A.length;t+=1)A[t].m(o,null)},p(t,[e]){if(0&e){let n;for($=b,n=0;n<$.length;n+=1){const a=w(t,$,n);A[n]?A[n].p(a,e):(A[n]=v(a),A[n].c(),A[n].m(o,null))}for(;n<A.length;n+=1)A[n].d(1);A.length=$.length}},i:m,o:m,d(t){t&&g(e),h(A,t)}}}function C(t,e,o){return d((()=>{})),[function(t){let e=t([51.505,-.09],3);x(e)}]}class k extends t{constructor(t){super(),this.shadowRoot.innerHTML="<style>@import '/css/common.css';#groups-img{position:absolute;width:14rem;left:50%;transform:translate(-50%);z-index:0;opacity:0.2}#text-container>:nth-child(3){margin-top:8rem}h4{margin-bottom:2rem}.location-info{margin-bottom:2rem}.location-info p{margin-bottom:0}a{font-size:1.2rem;color:#DD1C1A}#map{--height:30rem;--width:100%;--margin-bottom:3rem}#text-container{position:relative;max-width:calc(100vw - 4rem);margin:auto}h1{margin-bottom:1rem;font-size:2.5rem;text-align:center}h3{margin-bottom:1rem}#container{margin:auto;max-width:1200px;margin-top:1rem;margin-bottom:4rem}#container>div>p{margin-bottom:1rem}#container p{font-size:1.2rem;text-align:justify}</style>",e(this,{target:this.shadowRoot,props:o(this.attributes),customElement:!0},C,y,i,{mapCallbackGroups:0},null),t&&(t.target&&n(t.target,this,t.anchor),t.props&&(this.$set(t.props),a()))}static get observedAttributes(){return["mapCallbackGroups"]}get mapCallbackGroups(){return this.$$.ctx[0]}}customElements.define("groups-component",k);export{k as default};
|
||||
|
||||
(function(l, r) { if (!l || l.getElementById('livereloadscript')) return; r = l.createElement('script'); r.async = 1; r.src = '//' + (self.location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1'; r.id = 'livereloadscript'; l.getElementsByTagName('head')[0].appendChild(r) })(self.document);
|
||||
import { S as SvelteElement, i as init, a as attribute_to_object, b as insert_dev, q as flush, s as safe_not_equal, v as validate_each_argument, d as dispatch_dev, c as validate_slots, o as onMount, e as element, f as space, n as noop, g as add_location, h as attr_dev, j as src_url_equal, p as set_custom_element_data, k as append_dev, l as detach_dev, m as destroy_each, t as text } from './index-3b678a7c.js';
|
||||
import { groups, addMarkersGroups } from '../../../../../../../../../js/groups.js';
|
||||
import '../../../../../../../../../js/components/map-component.js';
|
||||
|
||||
/* src\groups-component.svelte generated by Svelte v3.52.0 */
|
||||
|
||||
const file = "src\\groups-component.svelte";
|
||||
|
||||
function get_each_context(ctx, list, i) {
|
||||
const child_ctx = ctx.slice();
|
||||
child_ctx[1] = list[i];
|
||||
return child_ctx;
|
||||
}
|
||||
|
||||
// (31:8) {#each groups as group}
|
||||
function create_each_block(ctx) {
|
||||
let div;
|
||||
let p0;
|
||||
let b0;
|
||||
let t1_value = /*group*/ ctx[1].location[0] + "";
|
||||
let t1;
|
||||
let t2;
|
||||
let p1;
|
||||
let b1;
|
||||
let t4_value = /*group*/ ctx[1].members + "";
|
||||
let t4;
|
||||
let t5;
|
||||
let p2;
|
||||
let b2;
|
||||
let a;
|
||||
let t7_value = /*group*/ ctx[1].contact[1] + "";
|
||||
let t7;
|
||||
let t8;
|
||||
|
||||
const block = {
|
||||
c: function create() {
|
||||
div = element("div");
|
||||
p0 = element("p");
|
||||
b0 = element("b");
|
||||
b0.textContent = "Location: ";
|
||||
t1 = text(t1_value);
|
||||
t2 = space();
|
||||
p1 = element("p");
|
||||
b1 = element("b");
|
||||
b1.textContent = "Members: ";
|
||||
t4 = text(t4_value);
|
||||
t5 = space();
|
||||
p2 = element("p");
|
||||
b2 = element("b");
|
||||
b2.textContent = "Contact: ";
|
||||
a = element("a");
|
||||
t7 = text(t7_value);
|
||||
t8 = space();
|
||||
add_location(b0, file, 32, 19, 1746);
|
||||
add_location(p0, file, 32, 16, 1743);
|
||||
add_location(b1, file, 33, 19, 1807);
|
||||
add_location(p1, file, 33, 16, 1804);
|
||||
add_location(b2, file, 34, 19, 1863);
|
||||
attr_dev(a, "href", /*group*/ ctx[1].contact[0]);
|
||||
attr_dev(a, "target", ";_blank;");
|
||||
attr_dev(a, "rel", "noreferrer");
|
||||
add_location(a, file, 34, 35, 1879);
|
||||
add_location(p2, file, 34, 16, 1860);
|
||||
attr_dev(div, "class", "location-info");
|
||||
add_location(div, file, 31, 12, 1698);
|
||||
},
|
||||
m: function mount(target, anchor) {
|
||||
insert_dev(target, div, anchor);
|
||||
append_dev(div, p0);
|
||||
append_dev(p0, b0);
|
||||
append_dev(p0, t1);
|
||||
append_dev(div, t2);
|
||||
append_dev(div, p1);
|
||||
append_dev(p1, b1);
|
||||
append_dev(p1, t4);
|
||||
append_dev(div, t5);
|
||||
append_dev(div, p2);
|
||||
append_dev(p2, b2);
|
||||
append_dev(p2, a);
|
||||
append_dev(a, t7);
|
||||
append_dev(div, t8);
|
||||
},
|
||||
p: noop,
|
||||
d: function destroy(detaching) {
|
||||
if (detaching) detach_dev(div);
|
||||
}
|
||||
};
|
||||
|
||||
dispatch_dev("SvelteRegisterBlock", {
|
||||
block,
|
||||
id: create_each_block.name,
|
||||
type: "each",
|
||||
source: "(31:8) {#each groups as group}",
|
||||
ctx
|
||||
});
|
||||
|
||||
return block;
|
||||
}
|
||||
|
||||
function create_fragment(ctx) {
|
||||
let div1;
|
||||
let div0;
|
||||
let h1;
|
||||
let t1;
|
||||
let img;
|
||||
let img_src_value;
|
||||
let t2;
|
||||
let p0;
|
||||
let t4;
|
||||
let p1;
|
||||
let t6;
|
||||
let h3;
|
||||
let t8;
|
||||
let map_component;
|
||||
let t9;
|
||||
let h4;
|
||||
let t11;
|
||||
let each_value = groups;
|
||||
validate_each_argument(each_value);
|
||||
let each_blocks = [];
|
||||
|
||||
for (let i = 0; i < each_value.length; i += 1) {
|
||||
each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i));
|
||||
}
|
||||
|
||||
const block = {
|
||||
c: function create() {
|
||||
div1 = element("div");
|
||||
div0 = element("div");
|
||||
h1 = element("h1");
|
||||
h1.textContent = "Groups";
|
||||
t1 = space();
|
||||
img = element("img");
|
||||
t2 = space();
|
||||
p0 = element("p");
|
||||
p0.textContent = "We aim to raise awareness about the negative impact of current politico-economic systems on our well-being. Through education, community engagement, and analysis, we reveal the flaws and inequalities in capitalist societies. By highlighting these issues, we empower people to question the status quo and imagine fairer and more sustainable alternatives.";
|
||||
t4 = space();
|
||||
p1 = element("p");
|
||||
p1.textContent = "But our mission goes beyond theory. We believe in mutual aid and collective action to address immediate challenges within capitalism. Through mutual aid, we support each other by sharing resources, knowledge, and skills, fostering solidarity and resilience. Whether it's community gardens, food cooperatives, or support networks, our goal is to make life under capitalism more bearable and create pockets of resistance and alternatives within the system.";
|
||||
t6 = space();
|
||||
h3 = element("h3");
|
||||
h3.textContent = "Our groups";
|
||||
t8 = space();
|
||||
map_component = element("map-component");
|
||||
t9 = space();
|
||||
h4 = element("h4");
|
||||
h4.textContent = "Europe";
|
||||
t11 = space();
|
||||
|
||||
for (let i = 0; i < each_blocks.length; i += 1) {
|
||||
each_blocks[i].c();
|
||||
}
|
||||
|
||||
this.c = noop;
|
||||
add_location(h1, file, 23, 8, 589);
|
||||
attr_dev(img, "id", "groups-img");
|
||||
if (!src_url_equal(img.src, img_src_value = "/img/common/groups.svg")) attr_dev(img, "src", img_src_value);
|
||||
attr_dev(img, "alt", "groups");
|
||||
add_location(img, file, 24, 8, 614);
|
||||
add_location(p0, file, 25, 8, 687);
|
||||
add_location(p1, file, 26, 8, 1057);
|
||||
add_location(h3, file, 27, 8, 1528);
|
||||
set_custom_element_data(map_component, "id", "map");
|
||||
set_custom_element_data(map_component, "callback", /*mapCallbackGroups*/ ctx[0]);
|
||||
add_location(map_component, file, 28, 8, 1557);
|
||||
add_location(h4, file, 29, 8, 1636);
|
||||
attr_dev(div0, "id", "text-container");
|
||||
add_location(div0, file, 22, 4, 554);
|
||||
attr_dev(div1, "id", "container");
|
||||
add_location(div1, file, 20, 0, 467);
|
||||
},
|
||||
l: function claim(nodes) {
|
||||
throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
|
||||
},
|
||||
m: function mount(target, anchor) {
|
||||
insert_dev(target, div1, anchor);
|
||||
append_dev(div1, div0);
|
||||
append_dev(div0, h1);
|
||||
append_dev(div0, t1);
|
||||
append_dev(div0, img);
|
||||
append_dev(div0, t2);
|
||||
append_dev(div0, p0);
|
||||
append_dev(div0, t4);
|
||||
append_dev(div0, p1);
|
||||
append_dev(div0, t6);
|
||||
append_dev(div0, h3);
|
||||
append_dev(div0, t8);
|
||||
append_dev(div0, map_component);
|
||||
append_dev(div0, t9);
|
||||
append_dev(div0, h4);
|
||||
append_dev(div0, t11);
|
||||
|
||||
for (let i = 0; i < each_blocks.length; i += 1) {
|
||||
each_blocks[i].m(div0, null);
|
||||
}
|
||||
},
|
||||
p: function update(ctx, [dirty]) {
|
||||
if (dirty & /*groups*/ 0) {
|
||||
each_value = groups;
|
||||
validate_each_argument(each_value);
|
||||
let i;
|
||||
|
||||
for (i = 0; i < each_value.length; i += 1) {
|
||||
const child_ctx = get_each_context(ctx, each_value, i);
|
||||
|
||||
if (each_blocks[i]) {
|
||||
each_blocks[i].p(child_ctx, dirty);
|
||||
} else {
|
||||
each_blocks[i] = create_each_block(child_ctx);
|
||||
each_blocks[i].c();
|
||||
each_blocks[i].m(div0, null);
|
||||
}
|
||||
}
|
||||
|
||||
for (; i < each_blocks.length; i += 1) {
|
||||
each_blocks[i].d(1);
|
||||
}
|
||||
|
||||
each_blocks.length = each_value.length;
|
||||
}
|
||||
},
|
||||
i: noop,
|
||||
o: noop,
|
||||
d: function destroy(detaching) {
|
||||
if (detaching) detach_dev(div1);
|
||||
destroy_each(each_blocks, detaching);
|
||||
}
|
||||
};
|
||||
|
||||
dispatch_dev("SvelteRegisterBlock", {
|
||||
block,
|
||||
id: create_fragment.name,
|
||||
type: "component",
|
||||
source: "",
|
||||
ctx
|
||||
});
|
||||
|
||||
return block;
|
||||
}
|
||||
|
||||
function instance($$self, $$props, $$invalidate) {
|
||||
let { $$slots: slots = {}, $$scope } = $$props;
|
||||
validate_slots('groups-component', slots, []);
|
||||
|
||||
function mapCallbackGroups(createMap) {
|
||||
let map = createMap([51.505, -0.09], 3);
|
||||
addMarkersGroups(map);
|
||||
}
|
||||
|
||||
onMount(() => {
|
||||
|
||||
});
|
||||
|
||||
const writable_props = [];
|
||||
|
||||
Object.keys($$props).forEach(key => {
|
||||
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<groups-component> was created with unknown prop '${key}'`);
|
||||
});
|
||||
|
||||
$$self.$capture_state = () => ({
|
||||
onMount,
|
||||
groups,
|
||||
addMarkersGroups,
|
||||
mapCallbackGroups
|
||||
});
|
||||
|
||||
return [mapCallbackGroups];
|
||||
}
|
||||
|
||||
class Groups_component extends SvelteElement {
|
||||
constructor(options) {
|
||||
super();
|
||||
this.shadowRoot.innerHTML = `<style>@import '/css/common.css';#groups-img{position:absolute;width:14rem;left:50%;transform:translate(-50%);z-index:0;opacity:0.2}#text-container>:nth-child(3){margin-top:8rem}h4{margin-bottom:2rem}.location-info{margin-bottom:2rem}.location-info p{margin-bottom:0}a{font-size:1.15rem;color:#DD1C1A}#map{--height:30rem;--width:100%;--margin-bottom:3rem}#text-container{position:relative;max-width:calc(100vw - 4rem);margin:auto}h1{margin-bottom:1rem;font-size:2.5rem;text-align:center}h3{margin-bottom:1rem}#container{margin:auto;max-width:1200px;margin-top:1rem;margin-bottom:4rem}#container>div>p{margin-bottom:1rem}#container p{font-size:1.15rem;text-align:justify}</style>`;
|
||||
|
||||
init(
|
||||
this,
|
||||
{
|
||||
target: this.shadowRoot,
|
||||
props: attribute_to_object(this.attributes),
|
||||
customElement: true
|
||||
},
|
||||
instance,
|
||||
create_fragment,
|
||||
safe_not_equal,
|
||||
{ mapCallbackGroups: 0 },
|
||||
null
|
||||
);
|
||||
|
||||
if (options) {
|
||||
if (options.target) {
|
||||
insert_dev(options.target, this, options.anchor);
|
||||
}
|
||||
|
||||
if (options.props) {
|
||||
this.$set(options.props);
|
||||
flush();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static get observedAttributes() {
|
||||
return ["mapCallbackGroups"];
|
||||
}
|
||||
|
||||
get mapCallbackGroups() {
|
||||
return this.$$.ctx[0];
|
||||
}
|
||||
|
||||
set mapCallbackGroups(value) {
|
||||
throw new Error("<groups-component>: Cannot set read-only property 'mapCallbackGroups'");
|
||||
}
|
||||
}
|
||||
|
||||
customElements.define("groups-component", Groups_component);
|
||||
|
||||
export { Groups_component as default };
|
||||
|
|
|
@ -0,0 +1,494 @@
|
|||
|
||||
(function(l, r) { if (!l || l.getElementById('livereloadscript')) return; r = l.createElement('script'); r.async = 1; r.src = '//' + (self.location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1'; r.id = 'livereloadscript'; l.getElementsByTagName('head')[0].appendChild(r) })(self.document);
|
||||
function noop() { }
|
||||
function add_location(element, file, line, column, char) {
|
||||
element.__svelte_meta = {
|
||||
loc: { file, line, column, char }
|
||||
};
|
||||
}
|
||||
function run(fn) {
|
||||
return fn();
|
||||
}
|
||||
function blank_object() {
|
||||
return Object.create(null);
|
||||
}
|
||||
function run_all(fns) {
|
||||
fns.forEach(run);
|
||||
}
|
||||
function is_function(thing) {
|
||||
return typeof thing === 'function';
|
||||
}
|
||||
function safe_not_equal(a, b) {
|
||||
return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');
|
||||
}
|
||||
let src_url_equal_anchor;
|
||||
function src_url_equal(element_src, url) {
|
||||
if (!src_url_equal_anchor) {
|
||||
src_url_equal_anchor = document.createElement('a');
|
||||
}
|
||||
src_url_equal_anchor.href = url;
|
||||
return element_src === src_url_equal_anchor.href;
|
||||
}
|
||||
function is_empty(obj) {
|
||||
return Object.keys(obj).length === 0;
|
||||
}
|
||||
function append(target, node) {
|
||||
target.appendChild(node);
|
||||
}
|
||||
function insert(target, node, anchor) {
|
||||
target.insertBefore(node, anchor || null);
|
||||
}
|
||||
function detach(node) {
|
||||
node.parentNode.removeChild(node);
|
||||
}
|
||||
function destroy_each(iterations, detaching) {
|
||||
for (let i = 0; i < iterations.length; i += 1) {
|
||||
if (iterations[i])
|
||||
iterations[i].d(detaching);
|
||||
}
|
||||
}
|
||||
function element(name) {
|
||||
return document.createElement(name);
|
||||
}
|
||||
function svg_element(name) {
|
||||
return document.createElementNS('http://www.w3.org/2000/svg', name);
|
||||
}
|
||||
function text(data) {
|
||||
return document.createTextNode(data);
|
||||
}
|
||||
function space() {
|
||||
return text(' ');
|
||||
}
|
||||
function empty() {
|
||||
return text('');
|
||||
}
|
||||
function listen(node, event, handler, options) {
|
||||
node.addEventListener(event, handler, options);
|
||||
return () => node.removeEventListener(event, handler, options);
|
||||
}
|
||||
function attr(node, attribute, value) {
|
||||
if (value == null)
|
||||
node.removeAttribute(attribute);
|
||||
else if (node.getAttribute(attribute) !== value)
|
||||
node.setAttribute(attribute, value);
|
||||
}
|
||||
function set_custom_element_data(node, prop, value) {
|
||||
if (prop in node) {
|
||||
node[prop] = typeof node[prop] === 'boolean' && value === '' ? true : value;
|
||||
}
|
||||
else {
|
||||
attr(node, prop, value);
|
||||
}
|
||||
}
|
||||
function children(element) {
|
||||
return Array.from(element.childNodes);
|
||||
}
|
||||
function set_style(node, key, value, important) {
|
||||
if (value === null) {
|
||||
node.style.removeProperty(key);
|
||||
}
|
||||
else {
|
||||
node.style.setProperty(key, value, important ? 'important' : '');
|
||||
}
|
||||
}
|
||||
function custom_event(type, detail, { bubbles = false, cancelable = false } = {}) {
|
||||
const e = document.createEvent('CustomEvent');
|
||||
e.initCustomEvent(type, bubbles, cancelable, detail);
|
||||
return e;
|
||||
}
|
||||
class HtmlTag {
|
||||
constructor(is_svg = false) {
|
||||
this.is_svg = false;
|
||||
this.is_svg = is_svg;
|
||||
this.e = this.n = null;
|
||||
}
|
||||
c(html) {
|
||||
this.h(html);
|
||||
}
|
||||
m(html, target, anchor = null) {
|
||||
if (!this.e) {
|
||||
if (this.is_svg)
|
||||
this.e = svg_element(target.nodeName);
|
||||
else
|
||||
this.e = element(target.nodeName);
|
||||
this.t = target;
|
||||
this.c(html);
|
||||
}
|
||||
this.i(anchor);
|
||||
}
|
||||
h(html) {
|
||||
this.e.innerHTML = html;
|
||||
this.n = Array.from(this.e.childNodes);
|
||||
}
|
||||
i(anchor) {
|
||||
for (let i = 0; i < this.n.length; i += 1) {
|
||||
insert(this.t, this.n[i], anchor);
|
||||
}
|
||||
}
|
||||
p(html) {
|
||||
this.d();
|
||||
this.h(html);
|
||||
this.i(this.a);
|
||||
}
|
||||
d() {
|
||||
this.n.forEach(detach);
|
||||
}
|
||||
}
|
||||
function attribute_to_object(attributes) {
|
||||
const result = {};
|
||||
for (const attribute of attributes) {
|
||||
result[attribute.name] = attribute.value;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
let current_component;
|
||||
function set_current_component(component) {
|
||||
current_component = component;
|
||||
}
|
||||
function get_current_component() {
|
||||
if (!current_component)
|
||||
throw new Error('Function called outside component initialization');
|
||||
return current_component;
|
||||
}
|
||||
/**
|
||||
* The `onMount` function schedules a callback to run as soon as the component has been mounted to the DOM.
|
||||
* It must be called during the component's initialisation (but doesn't need to live *inside* the component;
|
||||
* it can be called from an external module).
|
||||
*
|
||||
* `onMount` does not run inside a [server-side component](/docs#run-time-server-side-component-api).
|
||||
*
|
||||
* https://svelte.dev/docs#run-time-svelte-onmount
|
||||
*/
|
||||
function onMount(fn) {
|
||||
get_current_component().$$.on_mount.push(fn);
|
||||
}
|
||||
/**
|
||||
* Associates an arbitrary `context` object with the current component and the specified `key`
|
||||
* and returns that object. The context is then available to children of the component
|
||||
* (including slotted content) with `getContext`.
|
||||
*
|
||||
* Like lifecycle functions, this must be called during component initialisation.
|
||||
*
|
||||
* https://svelte.dev/docs#run-time-svelte-setcontext
|
||||
*/
|
||||
function setContext(key, context) {
|
||||
get_current_component().$$.context.set(key, context);
|
||||
return context;
|
||||
}
|
||||
/**
|
||||
* Retrieves the context that belongs to the closest parent component with the specified `key`.
|
||||
* Must be called during component initialisation.
|
||||
*
|
||||
* https://svelte.dev/docs#run-time-svelte-getcontext
|
||||
*/
|
||||
function getContext(key) {
|
||||
return get_current_component().$$.context.get(key);
|
||||
}
|
||||
|
||||
const dirty_components = [];
|
||||
const binding_callbacks = [];
|
||||
const render_callbacks = [];
|
||||
const flush_callbacks = [];
|
||||
const resolved_promise = Promise.resolve();
|
||||
let update_scheduled = false;
|
||||
function schedule_update() {
|
||||
if (!update_scheduled) {
|
||||
update_scheduled = true;
|
||||
resolved_promise.then(flush);
|
||||
}
|
||||
}
|
||||
function add_render_callback(fn) {
|
||||
render_callbacks.push(fn);
|
||||
}
|
||||
// flush() calls callbacks in this order:
|
||||
// 1. All beforeUpdate callbacks, in order: parents before children
|
||||
// 2. All bind:this callbacks, in reverse order: children before parents.
|
||||
// 3. All afterUpdate callbacks, in order: parents before children. EXCEPT
|
||||
// for afterUpdates called during the initial onMount, which are called in
|
||||
// reverse order: children before parents.
|
||||
// Since callbacks might update component values, which could trigger another
|
||||
// call to flush(), the following steps guard against this:
|
||||
// 1. During beforeUpdate, any updated components will be added to the
|
||||
// dirty_components array and will cause a reentrant call to flush(). Because
|
||||
// the flush index is kept outside the function, the reentrant call will pick
|
||||
// up where the earlier call left off and go through all dirty components. The
|
||||
// current_component value is saved and restored so that the reentrant call will
|
||||
// not interfere with the "parent" flush() call.
|
||||
// 2. bind:this callbacks cannot trigger new flush() calls.
|
||||
// 3. During afterUpdate, any updated components will NOT have their afterUpdate
|
||||
// callback called a second time; the seen_callbacks set, outside the flush()
|
||||
// function, guarantees this behavior.
|
||||
const seen_callbacks = new Set();
|
||||
let flushidx = 0; // Do *not* move this inside the flush() function
|
||||
function flush() {
|
||||
const saved_component = current_component;
|
||||
do {
|
||||
// first, call beforeUpdate functions
|
||||
// and update components
|
||||
while (flushidx < dirty_components.length) {
|
||||
const component = dirty_components[flushidx];
|
||||
flushidx++;
|
||||
set_current_component(component);
|
||||
update(component.$$);
|
||||
}
|
||||
set_current_component(null);
|
||||
dirty_components.length = 0;
|
||||
flushidx = 0;
|
||||
while (binding_callbacks.length)
|
||||
binding_callbacks.pop()();
|
||||
// then, once components are updated, call
|
||||
// afterUpdate functions. This may cause
|
||||
// subsequent updates...
|
||||
for (let i = 0; i < render_callbacks.length; i += 1) {
|
||||
const callback = render_callbacks[i];
|
||||
if (!seen_callbacks.has(callback)) {
|
||||
// ...so guard against infinite loops
|
||||
seen_callbacks.add(callback);
|
||||
callback();
|
||||
}
|
||||
}
|
||||
render_callbacks.length = 0;
|
||||
} while (dirty_components.length);
|
||||
while (flush_callbacks.length) {
|
||||
flush_callbacks.pop()();
|
||||
}
|
||||
update_scheduled = false;
|
||||
seen_callbacks.clear();
|
||||
set_current_component(saved_component);
|
||||
}
|
||||
function update($$) {
|
||||
if ($$.fragment !== null) {
|
||||
$$.update();
|
||||
run_all($$.before_update);
|
||||
const dirty = $$.dirty;
|
||||
$$.dirty = [-1];
|
||||
$$.fragment && $$.fragment.p($$.ctx, dirty);
|
||||
$$.after_update.forEach(add_render_callback);
|
||||
}
|
||||
}
|
||||
const outroing = new Set();
|
||||
function transition_in(block, local) {
|
||||
if (block && block.i) {
|
||||
outroing.delete(block);
|
||||
block.i(local);
|
||||
}
|
||||
}
|
||||
|
||||
const globals = (typeof window !== 'undefined'
|
||||
? window
|
||||
: typeof globalThis !== 'undefined'
|
||||
? globalThis
|
||||
: global);
|
||||
function mount_component(component, target, anchor, customElement) {
|
||||
const { fragment, after_update } = component.$$;
|
||||
fragment && fragment.m(target, anchor);
|
||||
if (!customElement) {
|
||||
// onMount happens before the initial afterUpdate
|
||||
add_render_callback(() => {
|
||||
const new_on_destroy = component.$$.on_mount.map(run).filter(is_function);
|
||||
// if the component was destroyed immediately
|
||||
// it will update the `$$.on_destroy` reference to `null`.
|
||||
// the destructured on_destroy may still reference to the old array
|
||||
if (component.$$.on_destroy) {
|
||||
component.$$.on_destroy.push(...new_on_destroy);
|
||||
}
|
||||
else {
|
||||
// Edge case - component was destroyed immediately,
|
||||
// most likely as a result of a binding initialising
|
||||
run_all(new_on_destroy);
|
||||
}
|
||||
component.$$.on_mount = [];
|
||||
});
|
||||
}
|
||||
after_update.forEach(add_render_callback);
|
||||
}
|
||||
function destroy_component(component, detaching) {
|
||||
const $$ = component.$$;
|
||||
if ($$.fragment !== null) {
|
||||
run_all($$.on_destroy);
|
||||
$$.fragment && $$.fragment.d(detaching);
|
||||
// TODO null out other refs, including component.$$ (but need to
|
||||
// preserve final state?)
|
||||
$$.on_destroy = $$.fragment = null;
|
||||
$$.ctx = [];
|
||||
}
|
||||
}
|
||||
function make_dirty(component, i) {
|
||||
if (component.$$.dirty[0] === -1) {
|
||||
dirty_components.push(component);
|
||||
schedule_update();
|
||||
component.$$.dirty.fill(0);
|
||||
}
|
||||
component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31));
|
||||
}
|
||||
function init(component, options, instance, create_fragment, not_equal, props, append_styles, dirty = [-1]) {
|
||||
const parent_component = current_component;
|
||||
set_current_component(component);
|
||||
const $$ = component.$$ = {
|
||||
fragment: null,
|
||||
ctx: [],
|
||||
// state
|
||||
props,
|
||||
update: noop,
|
||||
not_equal,
|
||||
bound: blank_object(),
|
||||
// lifecycle
|
||||
on_mount: [],
|
||||
on_destroy: [],
|
||||
on_disconnect: [],
|
||||
before_update: [],
|
||||
after_update: [],
|
||||
context: new Map(options.context || (parent_component ? parent_component.$$.context : [])),
|
||||
// everything else
|
||||
callbacks: blank_object(),
|
||||
dirty,
|
||||
skip_bound: false,
|
||||
root: options.target || parent_component.$$.root
|
||||
};
|
||||
append_styles && append_styles($$.root);
|
||||
let ready = false;
|
||||
$$.ctx = instance
|
||||
? instance(component, options.props || {}, (i, ret, ...rest) => {
|
||||
const value = rest.length ? rest[0] : ret;
|
||||
if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) {
|
||||
if (!$$.skip_bound && $$.bound[i])
|
||||
$$.bound[i](value);
|
||||
if (ready)
|
||||
make_dirty(component, i);
|
||||
}
|
||||
return ret;
|
||||
})
|
||||
: [];
|
||||
$$.update();
|
||||
ready = true;
|
||||
run_all($$.before_update);
|
||||
// `false` as a special case of no DOM component
|
||||
$$.fragment = create_fragment ? create_fragment($$.ctx) : false;
|
||||
if (options.target) {
|
||||
if (options.hydrate) {
|
||||
const nodes = children(options.target);
|
||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||
$$.fragment && $$.fragment.l(nodes);
|
||||
nodes.forEach(detach);
|
||||
}
|
||||
else {
|
||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||
$$.fragment && $$.fragment.c();
|
||||
}
|
||||
if (options.intro)
|
||||
transition_in(component.$$.fragment);
|
||||
mount_component(component, options.target, options.anchor, options.customElement);
|
||||
flush();
|
||||
}
|
||||
set_current_component(parent_component);
|
||||
}
|
||||
let SvelteElement;
|
||||
if (typeof HTMLElement === 'function') {
|
||||
SvelteElement = class extends HTMLElement {
|
||||
constructor() {
|
||||
super();
|
||||
this.attachShadow({ mode: 'open' });
|
||||
}
|
||||
connectedCallback() {
|
||||
const { on_mount } = this.$$;
|
||||
this.$$.on_disconnect = on_mount.map(run).filter(is_function);
|
||||
// @ts-ignore todo: improve typings
|
||||
for (const key in this.$$.slotted) {
|
||||
// @ts-ignore todo: improve typings
|
||||
this.appendChild(this.$$.slotted[key]);
|
||||
}
|
||||
}
|
||||
attributeChangedCallback(attr, _oldValue, newValue) {
|
||||
this[attr] = newValue;
|
||||
}
|
||||
disconnectedCallback() {
|
||||
run_all(this.$$.on_disconnect);
|
||||
}
|
||||
$destroy() {
|
||||
destroy_component(this, 1);
|
||||
this.$destroy = noop;
|
||||
}
|
||||
$on(type, callback) {
|
||||
// TODO should this delegate to addEventListener?
|
||||
if (!is_function(callback)) {
|
||||
return noop;
|
||||
}
|
||||
const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));
|
||||
callbacks.push(callback);
|
||||
return () => {
|
||||
const index = callbacks.indexOf(callback);
|
||||
if (index !== -1)
|
||||
callbacks.splice(index, 1);
|
||||
};
|
||||
}
|
||||
$set($$props) {
|
||||
if (this.$$set && !is_empty($$props)) {
|
||||
this.$$.skip_bound = true;
|
||||
this.$$set($$props);
|
||||
this.$$.skip_bound = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function dispatch_dev(type, detail) {
|
||||
document.dispatchEvent(custom_event(type, Object.assign({ version: '3.52.0' }, detail), { bubbles: true }));
|
||||
}
|
||||
function append_dev(target, node) {
|
||||
dispatch_dev('SvelteDOMInsert', { target, node });
|
||||
append(target, node);
|
||||
}
|
||||
function insert_dev(target, node, anchor) {
|
||||
dispatch_dev('SvelteDOMInsert', { target, node, anchor });
|
||||
insert(target, node, anchor);
|
||||
}
|
||||
function detach_dev(node) {
|
||||
dispatch_dev('SvelteDOMRemove', { node });
|
||||
detach(node);
|
||||
}
|
||||
function listen_dev(node, event, handler, options, has_prevent_default, has_stop_propagation) {
|
||||
const modifiers = options === true ? ['capture'] : options ? Array.from(Object.keys(options)) : [];
|
||||
if (has_prevent_default)
|
||||
modifiers.push('preventDefault');
|
||||
if (has_stop_propagation)
|
||||
modifiers.push('stopPropagation');
|
||||
dispatch_dev('SvelteDOMAddEventListener', { node, event, handler, modifiers });
|
||||
const dispose = listen(node, event, handler, options);
|
||||
return () => {
|
||||
dispatch_dev('SvelteDOMRemoveEventListener', { node, event, handler, modifiers });
|
||||
dispose();
|
||||
};
|
||||
}
|
||||
function attr_dev(node, attribute, value) {
|
||||
attr(node, attribute, value);
|
||||
if (value == null)
|
||||
dispatch_dev('SvelteDOMRemoveAttribute', { node, attribute });
|
||||
else
|
||||
dispatch_dev('SvelteDOMSetAttribute', { node, attribute, value });
|
||||
}
|
||||
function set_data_dev(text, data) {
|
||||
data = '' + data;
|
||||
if (text.wholeText === data)
|
||||
return;
|
||||
dispatch_dev('SvelteDOMSetData', { node: text, data });
|
||||
text.data = data;
|
||||
}
|
||||
function validate_each_argument(arg) {
|
||||
if (typeof arg !== 'string' && !(arg && typeof arg === 'object' && 'length' in arg)) {
|
||||
let msg = '{#each} only iterates over array-like objects.';
|
||||
if (typeof Symbol === 'function' && arg && Symbol.iterator in arg) {
|
||||
msg += ' You can use a spread to convert this iterable into an array.';
|
||||
}
|
||||
throw new Error(msg);
|
||||
}
|
||||
}
|
||||
function validate_slots(name, slot, keys) {
|
||||
for (const slot_key of Object.keys(slot)) {
|
||||
if (!~keys.indexOf(slot_key)) {
|
||||
console.warn(`<${name}> received an unexpected slot "${slot_key}".`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export { setContext as A, run_all as B, svg_element as C, empty as D, HtmlTag as H, SvelteElement as S, attribute_to_object as a, insert_dev as b, validate_slots as c, dispatch_dev as d, element as e, space as f, add_location as g, attr_dev as h, init as i, src_url_equal as j, append_dev as k, detach_dev as l, destroy_each as m, noop as n, onMount as o, set_custom_element_data as p, flush as q, globals as r, safe_not_equal as s, text as t, binding_callbacks as u, validate_each_argument as v, set_style as w, listen_dev as x, set_data_dev as y, getContext as z };
|
|
@ -0,0 +1,456 @@
|
|||
|
||||
(function(l, r) { if (!l || l.getElementById('livereloadscript')) return; r = l.createElement('script'); r.async = 1; r.src = '//' + (self.location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1'; r.id = 'livereloadscript'; l.getElementsByTagName('head')[0].appendChild(r) })(self.document);
|
||||
function noop() { }
|
||||
function add_location(element, file, line, column, char) {
|
||||
element.__svelte_meta = {
|
||||
loc: { file, line, column, char }
|
||||
};
|
||||
}
|
||||
function run(fn) {
|
||||
return fn();
|
||||
}
|
||||
function blank_object() {
|
||||
return Object.create(null);
|
||||
}
|
||||
function run_all(fns) {
|
||||
fns.forEach(run);
|
||||
}
|
||||
function is_function(thing) {
|
||||
return typeof thing === 'function';
|
||||
}
|
||||
function safe_not_equal(a, b) {
|
||||
return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');
|
||||
}
|
||||
let src_url_equal_anchor;
|
||||
function src_url_equal(element_src, url) {
|
||||
if (!src_url_equal_anchor) {
|
||||
src_url_equal_anchor = document.createElement('a');
|
||||
}
|
||||
src_url_equal_anchor.href = url;
|
||||
return element_src === src_url_equal_anchor.href;
|
||||
}
|
||||
function is_empty(obj) {
|
||||
return Object.keys(obj).length === 0;
|
||||
}
|
||||
function append(target, node) {
|
||||
target.appendChild(node);
|
||||
}
|
||||
function insert(target, node, anchor) {
|
||||
target.insertBefore(node, anchor || null);
|
||||
}
|
||||
function detach(node) {
|
||||
node.parentNode.removeChild(node);
|
||||
}
|
||||
function destroy_each(iterations, detaching) {
|
||||
for (let i = 0; i < iterations.length; i += 1) {
|
||||
if (iterations[i])
|
||||
iterations[i].d(detaching);
|
||||
}
|
||||
}
|
||||
function element(name) {
|
||||
return document.createElement(name);
|
||||
}
|
||||
function svg_element(name) {
|
||||
return document.createElementNS('http://www.w3.org/2000/svg', name);
|
||||
}
|
||||
function text(data) {
|
||||
return document.createTextNode(data);
|
||||
}
|
||||
function space() {
|
||||
return text(' ');
|
||||
}
|
||||
function empty() {
|
||||
return text('');
|
||||
}
|
||||
function listen(node, event, handler, options) {
|
||||
node.addEventListener(event, handler, options);
|
||||
return () => node.removeEventListener(event, handler, options);
|
||||
}
|
||||
function attr(node, attribute, value) {
|
||||
if (value == null)
|
||||
node.removeAttribute(attribute);
|
||||
else if (node.getAttribute(attribute) !== value)
|
||||
node.setAttribute(attribute, value);
|
||||
}
|
||||
function set_custom_element_data(node, prop, value) {
|
||||
if (prop in node) {
|
||||
node[prop] = typeof node[prop] === 'boolean' && value === '' ? true : value;
|
||||
}
|
||||
else {
|
||||
attr(node, prop, value);
|
||||
}
|
||||
}
|
||||
function children(element) {
|
||||
return Array.from(element.childNodes);
|
||||
}
|
||||
function set_style(node, key, value, important) {
|
||||
if (value === null) {
|
||||
node.style.removeProperty(key);
|
||||
}
|
||||
else {
|
||||
node.style.setProperty(key, value, important ? 'important' : '');
|
||||
}
|
||||
}
|
||||
function custom_event(type, detail, { bubbles = false, cancelable = false } = {}) {
|
||||
const e = document.createEvent('CustomEvent');
|
||||
e.initCustomEvent(type, bubbles, cancelable, detail);
|
||||
return e;
|
||||
}
|
||||
function attribute_to_object(attributes) {
|
||||
const result = {};
|
||||
for (const attribute of attributes) {
|
||||
result[attribute.name] = attribute.value;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
let current_component;
|
||||
function set_current_component(component) {
|
||||
current_component = component;
|
||||
}
|
||||
function get_current_component() {
|
||||
if (!current_component)
|
||||
throw new Error('Function called outside component initialization');
|
||||
return current_component;
|
||||
}
|
||||
/**
|
||||
* The `onMount` function schedules a callback to run as soon as the component has been mounted to the DOM.
|
||||
* It must be called during the component's initialisation (but doesn't need to live *inside* the component;
|
||||
* it can be called from an external module).
|
||||
*
|
||||
* `onMount` does not run inside a [server-side component](/docs#run-time-server-side-component-api).
|
||||
*
|
||||
* https://svelte.dev/docs#run-time-svelte-onmount
|
||||
*/
|
||||
function onMount(fn) {
|
||||
get_current_component().$$.on_mount.push(fn);
|
||||
}
|
||||
/**
|
||||
* Associates an arbitrary `context` object with the current component and the specified `key`
|
||||
* and returns that object. The context is then available to children of the component
|
||||
* (including slotted content) with `getContext`.
|
||||
*
|
||||
* Like lifecycle functions, this must be called during component initialisation.
|
||||
*
|
||||
* https://svelte.dev/docs#run-time-svelte-setcontext
|
||||
*/
|
||||
function setContext(key, context) {
|
||||
get_current_component().$$.context.set(key, context);
|
||||
return context;
|
||||
}
|
||||
/**
|
||||
* Retrieves the context that belongs to the closest parent component with the specified `key`.
|
||||
* Must be called during component initialisation.
|
||||
*
|
||||
* https://svelte.dev/docs#run-time-svelte-getcontext
|
||||
*/
|
||||
function getContext(key) {
|
||||
return get_current_component().$$.context.get(key);
|
||||
}
|
||||
|
||||
const dirty_components = [];
|
||||
const binding_callbacks = [];
|
||||
const render_callbacks = [];
|
||||
const flush_callbacks = [];
|
||||
const resolved_promise = Promise.resolve();
|
||||
let update_scheduled = false;
|
||||
function schedule_update() {
|
||||
if (!update_scheduled) {
|
||||
update_scheduled = true;
|
||||
resolved_promise.then(flush);
|
||||
}
|
||||
}
|
||||
function add_render_callback(fn) {
|
||||
render_callbacks.push(fn);
|
||||
}
|
||||
// flush() calls callbacks in this order:
|
||||
// 1. All beforeUpdate callbacks, in order: parents before children
|
||||
// 2. All bind:this callbacks, in reverse order: children before parents.
|
||||
// 3. All afterUpdate callbacks, in order: parents before children. EXCEPT
|
||||
// for afterUpdates called during the initial onMount, which are called in
|
||||
// reverse order: children before parents.
|
||||
// Since callbacks might update component values, which could trigger another
|
||||
// call to flush(), the following steps guard against this:
|
||||
// 1. During beforeUpdate, any updated components will be added to the
|
||||
// dirty_components array and will cause a reentrant call to flush(). Because
|
||||
// the flush index is kept outside the function, the reentrant call will pick
|
||||
// up where the earlier call left off and go through all dirty components. The
|
||||
// current_component value is saved and restored so that the reentrant call will
|
||||
// not interfere with the "parent" flush() call.
|
||||
// 2. bind:this callbacks cannot trigger new flush() calls.
|
||||
// 3. During afterUpdate, any updated components will NOT have their afterUpdate
|
||||
// callback called a second time; the seen_callbacks set, outside the flush()
|
||||
// function, guarantees this behavior.
|
||||
const seen_callbacks = new Set();
|
||||
let flushidx = 0; // Do *not* move this inside the flush() function
|
||||
function flush() {
|
||||
const saved_component = current_component;
|
||||
do {
|
||||
// first, call beforeUpdate functions
|
||||
// and update components
|
||||
while (flushidx < dirty_components.length) {
|
||||
const component = dirty_components[flushidx];
|
||||
flushidx++;
|
||||
set_current_component(component);
|
||||
update(component.$$);
|
||||
}
|
||||
set_current_component(null);
|
||||
dirty_components.length = 0;
|
||||
flushidx = 0;
|
||||
while (binding_callbacks.length)
|
||||
binding_callbacks.pop()();
|
||||
// then, once components are updated, call
|
||||
// afterUpdate functions. This may cause
|
||||
// subsequent updates...
|
||||
for (let i = 0; i < render_callbacks.length; i += 1) {
|
||||
const callback = render_callbacks[i];
|
||||
if (!seen_callbacks.has(callback)) {
|
||||
// ...so guard against infinite loops
|
||||
seen_callbacks.add(callback);
|
||||
callback();
|
||||
}
|
||||
}
|
||||
render_callbacks.length = 0;
|
||||
} while (dirty_components.length);
|
||||
while (flush_callbacks.length) {
|
||||
flush_callbacks.pop()();
|
||||
}
|
||||
update_scheduled = false;
|
||||
seen_callbacks.clear();
|
||||
set_current_component(saved_component);
|
||||
}
|
||||
function update($$) {
|
||||
if ($$.fragment !== null) {
|
||||
$$.update();
|
||||
run_all($$.before_update);
|
||||
const dirty = $$.dirty;
|
||||
$$.dirty = [-1];
|
||||
$$.fragment && $$.fragment.p($$.ctx, dirty);
|
||||
$$.after_update.forEach(add_render_callback);
|
||||
}
|
||||
}
|
||||
const outroing = new Set();
|
||||
function transition_in(block, local) {
|
||||
if (block && block.i) {
|
||||
outroing.delete(block);
|
||||
block.i(local);
|
||||
}
|
||||
}
|
||||
|
||||
const globals = (typeof window !== 'undefined'
|
||||
? window
|
||||
: typeof globalThis !== 'undefined'
|
||||
? globalThis
|
||||
: global);
|
||||
function mount_component(component, target, anchor, customElement) {
|
||||
const { fragment, after_update } = component.$$;
|
||||
fragment && fragment.m(target, anchor);
|
||||
if (!customElement) {
|
||||
// onMount happens before the initial afterUpdate
|
||||
add_render_callback(() => {
|
||||
const new_on_destroy = component.$$.on_mount.map(run).filter(is_function);
|
||||
// if the component was destroyed immediately
|
||||
// it will update the `$$.on_destroy` reference to `null`.
|
||||
// the destructured on_destroy may still reference to the old array
|
||||
if (component.$$.on_destroy) {
|
||||
component.$$.on_destroy.push(...new_on_destroy);
|
||||
}
|
||||
else {
|
||||
// Edge case - component was destroyed immediately,
|
||||
// most likely as a result of a binding initialising
|
||||
run_all(new_on_destroy);
|
||||
}
|
||||
component.$$.on_mount = [];
|
||||
});
|
||||
}
|
||||
after_update.forEach(add_render_callback);
|
||||
}
|
||||
function destroy_component(component, detaching) {
|
||||
const $$ = component.$$;
|
||||
if ($$.fragment !== null) {
|
||||
run_all($$.on_destroy);
|
||||
$$.fragment && $$.fragment.d(detaching);
|
||||
// TODO null out other refs, including component.$$ (but need to
|
||||
// preserve final state?)
|
||||
$$.on_destroy = $$.fragment = null;
|
||||
$$.ctx = [];
|
||||
}
|
||||
}
|
||||
function make_dirty(component, i) {
|
||||
if (component.$$.dirty[0] === -1) {
|
||||
dirty_components.push(component);
|
||||
schedule_update();
|
||||
component.$$.dirty.fill(0);
|
||||
}
|
||||
component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31));
|
||||
}
|
||||
function init(component, options, instance, create_fragment, not_equal, props, append_styles, dirty = [-1]) {
|
||||
const parent_component = current_component;
|
||||
set_current_component(component);
|
||||
const $$ = component.$$ = {
|
||||
fragment: null,
|
||||
ctx: [],
|
||||
// state
|
||||
props,
|
||||
update: noop,
|
||||
not_equal,
|
||||
bound: blank_object(),
|
||||
// lifecycle
|
||||
on_mount: [],
|
||||
on_destroy: [],
|
||||
on_disconnect: [],
|
||||
before_update: [],
|
||||
after_update: [],
|
||||
context: new Map(options.context || (parent_component ? parent_component.$$.context : [])),
|
||||
// everything else
|
||||
callbacks: blank_object(),
|
||||
dirty,
|
||||
skip_bound: false,
|
||||
root: options.target || parent_component.$$.root
|
||||
};
|
||||
append_styles && append_styles($$.root);
|
||||
let ready = false;
|
||||
$$.ctx = instance
|
||||
? instance(component, options.props || {}, (i, ret, ...rest) => {
|
||||
const value = rest.length ? rest[0] : ret;
|
||||
if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) {
|
||||
if (!$$.skip_bound && $$.bound[i])
|
||||
$$.bound[i](value);
|
||||
if (ready)
|
||||
make_dirty(component, i);
|
||||
}
|
||||
return ret;
|
||||
})
|
||||
: [];
|
||||
$$.update();
|
||||
ready = true;
|
||||
run_all($$.before_update);
|
||||
// `false` as a special case of no DOM component
|
||||
$$.fragment = create_fragment ? create_fragment($$.ctx) : false;
|
||||
if (options.target) {
|
||||
if (options.hydrate) {
|
||||
const nodes = children(options.target);
|
||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||
$$.fragment && $$.fragment.l(nodes);
|
||||
nodes.forEach(detach);
|
||||
}
|
||||
else {
|
||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||
$$.fragment && $$.fragment.c();
|
||||
}
|
||||
if (options.intro)
|
||||
transition_in(component.$$.fragment);
|
||||
mount_component(component, options.target, options.anchor, options.customElement);
|
||||
flush();
|
||||
}
|
||||
set_current_component(parent_component);
|
||||
}
|
||||
let SvelteElement;
|
||||
if (typeof HTMLElement === 'function') {
|
||||
SvelteElement = class extends HTMLElement {
|
||||
constructor() {
|
||||
super();
|
||||
this.attachShadow({ mode: 'open' });
|
||||
}
|
||||
connectedCallback() {
|
||||
const { on_mount } = this.$$;
|
||||
this.$$.on_disconnect = on_mount.map(run).filter(is_function);
|
||||
// @ts-ignore todo: improve typings
|
||||
for (const key in this.$$.slotted) {
|
||||
// @ts-ignore todo: improve typings
|
||||
this.appendChild(this.$$.slotted[key]);
|
||||
}
|
||||
}
|
||||
attributeChangedCallback(attr, _oldValue, newValue) {
|
||||
this[attr] = newValue;
|
||||
}
|
||||
disconnectedCallback() {
|
||||
run_all(this.$$.on_disconnect);
|
||||
}
|
||||
$destroy() {
|
||||
destroy_component(this, 1);
|
||||
this.$destroy = noop;
|
||||
}
|
||||
$on(type, callback) {
|
||||
// TODO should this delegate to addEventListener?
|
||||
if (!is_function(callback)) {
|
||||
return noop;
|
||||
}
|
||||
const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));
|
||||
callbacks.push(callback);
|
||||
return () => {
|
||||
const index = callbacks.indexOf(callback);
|
||||
if (index !== -1)
|
||||
callbacks.splice(index, 1);
|
||||
};
|
||||
}
|
||||
$set($$props) {
|
||||
if (this.$$set && !is_empty($$props)) {
|
||||
this.$$.skip_bound = true;
|
||||
this.$$set($$props);
|
||||
this.$$.skip_bound = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function dispatch_dev(type, detail) {
|
||||
document.dispatchEvent(custom_event(type, Object.assign({ version: '3.52.0' }, detail), { bubbles: true }));
|
||||
}
|
||||
function append_dev(target, node) {
|
||||
dispatch_dev('SvelteDOMInsert', { target, node });
|
||||
append(target, node);
|
||||
}
|
||||
function insert_dev(target, node, anchor) {
|
||||
dispatch_dev('SvelteDOMInsert', { target, node, anchor });
|
||||
insert(target, node, anchor);
|
||||
}
|
||||
function detach_dev(node) {
|
||||
dispatch_dev('SvelteDOMRemove', { node });
|
||||
detach(node);
|
||||
}
|
||||
function listen_dev(node, event, handler, options, has_prevent_default, has_stop_propagation) {
|
||||
const modifiers = options === true ? ['capture'] : options ? Array.from(Object.keys(options)) : [];
|
||||
if (has_prevent_default)
|
||||
modifiers.push('preventDefault');
|
||||
if (has_stop_propagation)
|
||||
modifiers.push('stopPropagation');
|
||||
dispatch_dev('SvelteDOMAddEventListener', { node, event, handler, modifiers });
|
||||
const dispose = listen(node, event, handler, options);
|
||||
return () => {
|
||||
dispatch_dev('SvelteDOMRemoveEventListener', { node, event, handler, modifiers });
|
||||
dispose();
|
||||
};
|
||||
}
|
||||
function attr_dev(node, attribute, value) {
|
||||
attr(node, attribute, value);
|
||||
if (value == null)
|
||||
dispatch_dev('SvelteDOMRemoveAttribute', { node, attribute });
|
||||
else
|
||||
dispatch_dev('SvelteDOMSetAttribute', { node, attribute, value });
|
||||
}
|
||||
function set_data_dev(text, data) {
|
||||
data = '' + data;
|
||||
if (text.wholeText === data)
|
||||
return;
|
||||
dispatch_dev('SvelteDOMSetData', { node: text, data });
|
||||
text.data = data;
|
||||
}
|
||||
function validate_each_argument(arg) {
|
||||
if (typeof arg !== 'string' && !(arg && typeof arg === 'object' && 'length' in arg)) {
|
||||
let msg = '{#each} only iterates over array-like objects.';
|
||||
if (typeof Symbol === 'function' && arg && Symbol.iterator in arg) {
|
||||
msg += ' You can use a spread to convert this iterable into an array.';
|
||||
}
|
||||
throw new Error(msg);
|
||||
}
|
||||
}
|
||||
function validate_slots(name, slot, keys) {
|
||||
for (const slot_key of Object.keys(slot)) {
|
||||
if (!~keys.indexOf(slot_key)) {
|
||||
console.warn(`<${name}> received an unexpected slot "${slot_key}".`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export { setContext as A, run_all as B, svg_element as C, empty as D, SvelteElement as S, attribute_to_object as a, insert_dev as b, validate_slots as c, dispatch_dev as d, element as e, space as f, add_location as g, attr_dev as h, init as i, src_url_equal as j, append_dev as k, detach_dev as l, destroy_each as m, noop as n, onMount as o, set_custom_element_data as p, flush as q, globals as r, safe_not_equal as s, text as t, binding_callbacks as u, validate_each_argument as v, set_style as w, listen_dev as x, set_data_dev as y, getContext as z };
|
|
@ -1 +1,294 @@
|
|||
import{S as t,i as o,a as e,b as a,l as n,s as i,t as r,e as s,c as m,n as l,d as p,k as c,g as h,h as u,o as d}from"./index-95aedb1a.js";import{addMarkersGroups as g}from"../../../../../../../../../js/groups.js";import{addMarkersCoops as b}from"../../../../../../../../../js/coops.js";import{addMarkersCommunities as f}from"../../../../../../../../../js/communities.js";import"../../../../../../../../../js/components/map-component.js";function y(t){let o,e,n,i,d,g,b,f,y,w,x,j;return{c(){o=r("Are you against exploitation of one human being by another?\r\nDo you agree that we should cooperate and not compete with each other?\r\nIn that case, you are already a libertarian socialist. Join us \r\n\r\nFInd our group, community or cooperative near you and join in order to make a world we both envision a reality. \r\n\r\nNone of them near you? Not a problem! Join our WhatsApp group and we will help you get started.\r\n"),e=s("div"),n=s("div"),i=s("h1"),i.textContent="Join us",d=m(),g=s("div"),g.innerHTML="<p>1. Are you against dictatorship and in favor of democracy?</p> \n <p>2. Are you against exploitation of one human being by another?</p> \n <p>3. Do you agree that we should cooperate and not compete with each other?</p> \n <p>If the answer is <b>YES</b>, then you are already a libertarian socialist. <b>JOIN US!</b></p>",b=m(),f=s("div"),f.innerHTML='<p>Find our</p> \n <ol><li><a href="/groups">group</a>,</li> \n <li><a href="/communities">community</a> or</li> \n <li><a href="/cooperatives">cooperative</a></li></ol> \n <p>near you and join to help make a world we both envision a reality.</p>',y=m(),w=s("p"),w.innerHTML='None of them near you? Not a problem! Join our <a href="https://chat.whatsapp.com/BhnmUNljUxJ2AjeHUwyTKh" target="_blank" rel="noreferrer">WhatsApp group</a> and we will help you start your own.',x=m(),j=s("map-component"),this.c=l,p(g,"id","condition-list"),p(f,"id","call-to-action-list"),c(j,"id","map"),c(j,"callback",t[0]),p(n,"id","text-container"),p(e,"id","container")},m(t,r){a(t,o,r),a(t,e,r),h(e,n),h(n,i),h(n,d),h(n,g),h(n,b),h(n,f),h(n,y),h(n,w),h(n,x),h(n,j)},p:l,i:l,o:l,d(t){t&&u(o),t&&u(e)}}}function w(t,o,e){return d((()=>{})),[function(t){let o=t([51.505,-.09],3);g(o),b(o),f(o)}]}class x extends t{constructor(t){super(),this.shadowRoot.innerHTML="<style>@import '/css/common.css';#map{--height:30rem;--width:100%;--margin-bottom:3rem}ol>li{position:relative;font-size:1.2rem;font-family:var(--serif,serif);left:3rem}#condition-list{margin-bottom:2rem}#condition-list>p{margin-bottom:1rem}#text-container{max-width:calc(100vw - 4rem);margin:auto}h1{margin-bottom:1rem;font-size:2.5rem;text-align:center}#container{margin:auto;max-width:1200px;margin-top:1rem;margin-bottom:4rem}#container>div>p{margin-bottom:1rem}#call-to-action-list>p{margin-bottom:1rem}#call-to-action-list>:nth-child(2){margin-bottom:0rem}#call-to-action-list>ol>li{margin-bottom:0.5rem}#text-container a{font-size:1.2rem;color:#DD1C1A\n }#container p{font-size:1.2rem;text-align:justify}</style>",o(this,{target:this.shadowRoot,props:e(this.attributes),customElement:!0},w,y,i,{mapCallback:0},null),t&&(t.target&&a(t.target,this,t.anchor),t.props&&(this.$set(t.props),n()))}static get observedAttributes(){return["mapCallback"]}get mapCallback(){return this.$$.ctx[0]}}customElements.define("join-us-component",x);export{x as default};
|
||||
|
||||
(function(l, r) { if (!l || l.getElementById('livereloadscript')) return; r = l.createElement('script'); r.async = 1; r.src = '//' + (self.location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1'; r.id = 'livereloadscript'; l.getElementsByTagName('head')[0].appendChild(r) })(self.document);
|
||||
import { S as SvelteElement, i as init, a as attribute_to_object, b as insert_dev, q as flush, s as safe_not_equal, d as dispatch_dev, c as validate_slots, o as onMount, t as text, e as element, f as space, n as noop, g as add_location, h as attr_dev, p as set_custom_element_data, k as append_dev, l as detach_dev } from './index-3b678a7c.js';
|
||||
import { addMarkersGroups } from '../../../../../../../../../js/groups.js';
|
||||
import { addMarkersCoops } from '../../../../../../../../../js/coops.js';
|
||||
import { addMarkersCommunities } from '../../../../../../../../../js/communities.js';
|
||||
import '../../../../../../../../../js/components/map-component.js';
|
||||
|
||||
/* src\join-us-component.svelte generated by Svelte v3.52.0 */
|
||||
|
||||
const file = "src\\join-us-component.svelte";
|
||||
|
||||
function create_fragment(ctx) {
|
||||
let t0;
|
||||
let div3;
|
||||
let div2;
|
||||
let h1;
|
||||
let t2;
|
||||
let div0;
|
||||
let p0;
|
||||
let t4;
|
||||
let p1;
|
||||
let t6;
|
||||
let p2;
|
||||
let t8;
|
||||
let p3;
|
||||
let t9;
|
||||
let b0;
|
||||
let t11;
|
||||
let b1;
|
||||
let t13;
|
||||
let div1;
|
||||
let p4;
|
||||
let t15;
|
||||
let ol;
|
||||
let li0;
|
||||
let a0;
|
||||
let t17;
|
||||
let t18;
|
||||
let li1;
|
||||
let a1;
|
||||
let t20;
|
||||
let t21;
|
||||
let li2;
|
||||
let a2;
|
||||
let t23;
|
||||
let p5;
|
||||
let t25;
|
||||
let p6;
|
||||
let t26;
|
||||
let a3;
|
||||
let t28;
|
||||
let t29;
|
||||
let map_component;
|
||||
|
||||
const block = {
|
||||
c: function create() {
|
||||
t0 = text("Are you against exploitation of one human being by another?\r\nDo you agree that we should cooperate and not compete with each other?\r\nIn that case, you are already a libertarian socialist. Join us \r\n\r\nFInd our group, community or cooperative near you and join in order to make a world we both envision a reality. \r\n\r\nNone of them near you? Not a problem! Join our WhatsApp group and we will help you get started.\r\n");
|
||||
div3 = element("div");
|
||||
div2 = element("div");
|
||||
h1 = element("h1");
|
||||
h1.textContent = "Join us";
|
||||
t2 = space();
|
||||
div0 = element("div");
|
||||
p0 = element("p");
|
||||
p0.textContent = "1. Are you against dictatorship and in favor of democracy?";
|
||||
t4 = space();
|
||||
p1 = element("p");
|
||||
p1.textContent = "2. Are you against exploitation of one human being by another?";
|
||||
t6 = space();
|
||||
p2 = element("p");
|
||||
p2.textContent = "3. Do you agree that we should cooperate and not compete with each other?";
|
||||
t8 = space();
|
||||
p3 = element("p");
|
||||
t9 = text("If the answer is ");
|
||||
b0 = element("b");
|
||||
b0.textContent = "YES";
|
||||
t11 = text(", then you are already a libertarian socialist. ");
|
||||
b1 = element("b");
|
||||
b1.textContent = "JOIN US!";
|
||||
t13 = space();
|
||||
div1 = element("div");
|
||||
p4 = element("p");
|
||||
p4.textContent = "Find our";
|
||||
t15 = space();
|
||||
ol = element("ol");
|
||||
li0 = element("li");
|
||||
a0 = element("a");
|
||||
a0.textContent = "group";
|
||||
t17 = text(",");
|
||||
t18 = space();
|
||||
li1 = element("li");
|
||||
a1 = element("a");
|
||||
a1.textContent = "community";
|
||||
t20 = text(" or");
|
||||
t21 = space();
|
||||
li2 = element("li");
|
||||
a2 = element("a");
|
||||
a2.textContent = "cooperative";
|
||||
t23 = space();
|
||||
p5 = element("p");
|
||||
p5.textContent = "near you and join to help make a world we both envision a reality.";
|
||||
t25 = space();
|
||||
p6 = element("p");
|
||||
t26 = text("None of them near you? Not a problem! Join our ");
|
||||
a3 = element("a");
|
||||
a3.textContent = "WhatsApp group";
|
||||
t28 = text(" and we will help you start your own.");
|
||||
t29 = space();
|
||||
map_component = element("map-component");
|
||||
this.c = noop;
|
||||
add_location(h1, file, 41, 8, 1237);
|
||||
add_location(p0, file, 43, 12, 1302);
|
||||
add_location(p1, file, 44, 12, 1381);
|
||||
add_location(p2, file, 45, 12, 1464);
|
||||
add_location(b0, file, 46, 32, 1578);
|
||||
add_location(b1, file, 46, 90, 1636);
|
||||
add_location(p3, file, 46, 12, 1558);
|
||||
attr_dev(div0, "id", "condition-list");
|
||||
add_location(div0, file, 42, 8, 1263);
|
||||
add_location(p4, file, 49, 12, 1725);
|
||||
attr_dev(a0, "href", "/groups");
|
||||
add_location(a0, file, 51, 20, 1780);
|
||||
add_location(li0, file, 51, 16, 1776);
|
||||
attr_dev(a1, "href", "/communities");
|
||||
add_location(a1, file, 52, 20, 1836);
|
||||
add_location(li1, file, 52, 16, 1832);
|
||||
attr_dev(a2, "href", "/cooperatives");
|
||||
add_location(a2, file, 53, 20, 1903);
|
||||
add_location(li2, file, 53, 16, 1899);
|
||||
add_location(ol, file, 50, 12, 1754);
|
||||
add_location(p5, file, 55, 12, 1980);
|
||||
attr_dev(div1, "id", "call-to-action-list");
|
||||
add_location(div1, file, 48, 8, 1681);
|
||||
attr_dev(a3, "href", "https://chat.whatsapp.com/BhnmUNljUxJ2AjeHUwyTKh");
|
||||
attr_dev(a3, "target", "_blank");
|
||||
attr_dev(a3, "rel", "noreferrer");
|
||||
add_location(a3, file, 57, 58, 2129);
|
||||
add_location(p6, file, 57, 8, 2079);
|
||||
set_custom_element_data(map_component, "id", "map");
|
||||
set_custom_element_data(map_component, "callback", /*mapCallback*/ ctx[0]);
|
||||
add_location(map_component, file, 58, 8, 2288);
|
||||
attr_dev(div2, "id", "text-container");
|
||||
add_location(div2, file, 40, 4, 1202);
|
||||
attr_dev(div3, "id", "container");
|
||||
add_location(div3, file, 38, 0, 1115);
|
||||
},
|
||||
l: function claim(nodes) {
|
||||
throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
|
||||
},
|
||||
m: function mount(target, anchor) {
|
||||
insert_dev(target, t0, anchor);
|
||||
insert_dev(target, div3, anchor);
|
||||
append_dev(div3, div2);
|
||||
append_dev(div2, h1);
|
||||
append_dev(div2, t2);
|
||||
append_dev(div2, div0);
|
||||
append_dev(div0, p0);
|
||||
append_dev(div0, t4);
|
||||
append_dev(div0, p1);
|
||||
append_dev(div0, t6);
|
||||
append_dev(div0, p2);
|
||||
append_dev(div0, t8);
|
||||
append_dev(div0, p3);
|
||||
append_dev(p3, t9);
|
||||
append_dev(p3, b0);
|
||||
append_dev(p3, t11);
|
||||
append_dev(p3, b1);
|
||||
append_dev(div2, t13);
|
||||
append_dev(div2, div1);
|
||||
append_dev(div1, p4);
|
||||
append_dev(div1, t15);
|
||||
append_dev(div1, ol);
|
||||
append_dev(ol, li0);
|
||||
append_dev(li0, a0);
|
||||
append_dev(li0, t17);
|
||||
append_dev(ol, t18);
|
||||
append_dev(ol, li1);
|
||||
append_dev(li1, a1);
|
||||
append_dev(li1, t20);
|
||||
append_dev(ol, t21);
|
||||
append_dev(ol, li2);
|
||||
append_dev(li2, a2);
|
||||
append_dev(div1, t23);
|
||||
append_dev(div1, p5);
|
||||
append_dev(div2, t25);
|
||||
append_dev(div2, p6);
|
||||
append_dev(p6, t26);
|
||||
append_dev(p6, a3);
|
||||
append_dev(p6, t28);
|
||||
append_dev(div2, t29);
|
||||
append_dev(div2, map_component);
|
||||
},
|
||||
p: noop,
|
||||
i: noop,
|
||||
o: noop,
|
||||
d: function destroy(detaching) {
|
||||
if (detaching) detach_dev(t0);
|
||||
if (detaching) detach_dev(div3);
|
||||
}
|
||||
};
|
||||
|
||||
dispatch_dev("SvelteRegisterBlock", {
|
||||
block,
|
||||
id: create_fragment.name,
|
||||
type: "component",
|
||||
source: "",
|
||||
ctx
|
||||
});
|
||||
|
||||
return block;
|
||||
}
|
||||
|
||||
function instance($$self, $$props, $$invalidate) {
|
||||
let { $$slots: slots = {}, $$scope } = $$props;
|
||||
validate_slots('join-us-component', slots, []);
|
||||
|
||||
function mapCallback(createMap) {
|
||||
let map = createMap([51.505, -0.09], 3);
|
||||
addMarkersGroups(map);
|
||||
addMarkersCoops(map);
|
||||
addMarkersCommunities(map);
|
||||
}
|
||||
|
||||
onMount(() => {
|
||||
|
||||
});
|
||||
|
||||
const writable_props = [];
|
||||
|
||||
Object.keys($$props).forEach(key => {
|
||||
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<join-us-component> was created with unknown prop '${key}'`);
|
||||
});
|
||||
|
||||
$$self.$capture_state = () => ({
|
||||
onMount,
|
||||
addMarkersGroups,
|
||||
addMarkersCoops,
|
||||
addMarkersCommunities,
|
||||
mapCallback
|
||||
});
|
||||
|
||||
return [mapCallback];
|
||||
}
|
||||
|
||||
class Join_us_component extends SvelteElement {
|
||||
constructor(options) {
|
||||
super();
|
||||
|
||||
this.shadowRoot.innerHTML = `<style>@import '/css/common.css';#map{--height:30rem;--width:100%;--margin-bottom:3rem}ol>li{position:relative;font-size:1.15rem;font-family:var(--serif,serif);left:3rem}#condition-list{margin-bottom:2rem}#condition-list>p{margin-bottom:1rem}#text-container{max-width:calc(100vw - 4rem);margin:auto}h1{margin-bottom:1rem;font-size:2.5rem;text-align:center}#container{margin:auto;max-width:1200px;margin-top:1rem;margin-bottom:4rem}#container>div>p{margin-bottom:1rem}#call-to-action-list>p{margin-bottom:1rem}#call-to-action-list>:nth-child(2){margin-bottom:0rem}#call-to-action-list>ol>li{margin-bottom:0.5rem}#text-container a{font-size:1.15rem;color:#DD1C1A
|
||||
}#container p{font-size:1.15rem;text-align:justify}</style>`;
|
||||
|
||||
init(
|
||||
this,
|
||||
{
|
||||
target: this.shadowRoot,
|
||||
props: attribute_to_object(this.attributes),
|
||||
customElement: true
|
||||
},
|
||||
instance,
|
||||
create_fragment,
|
||||
safe_not_equal,
|
||||
{ mapCallback: 0 },
|
||||
null
|
||||
);
|
||||
|
||||
if (options) {
|
||||
if (options.target) {
|
||||
insert_dev(options.target, this, options.anchor);
|
||||
}
|
||||
|
||||
if (options.props) {
|
||||
this.$set(options.props);
|
||||
flush();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static get observedAttributes() {
|
||||
return ["mapCallback"];
|
||||
}
|
||||
|
||||
get mapCallback() {
|
||||
return this.$$.ctx[0];
|
||||
}
|
||||
|
||||
set mapCallback(value) {
|
||||
throw new Error("<join-us-component>: Cannot set read-only property 'mapCallback'");
|
||||
}
|
||||
}
|
||||
|
||||
customElements.define("join-us-component", Join_us_component);
|
||||
|
||||
export { Join_us_component as default };
|
||||
|
|
|
@ -1 +1,227 @@
|
|||
import{S as i,i as e,a as t,b as o,s as n,e as a,n as r,d as s,h as m,o as c}from"./index-95aedb1a.js";function d(i){let e;return{c(){e=a("div"),e.innerHTML='<picture><source srcset="/img/crowd.webp"/> \n <source srcset="/img/crowd.png"/> \n <img id="crowd" alt="crowd"/></picture> \n \n <div id="text-container"><p>We are people united around a singular cause: bringing down authoritarian exploitative systems represented by various forms of capitalism and replacing them with libertarian socialist systems, with the goal of creating a more equitable and democratic world.</p> \n <div id="container-grid"><div><h2>GROUPS</h2> \n <img id="groups-img" src="/img/common/groups.svg" alt="groups"/> \n <p>We organize groups for the purposes of education, advocacy, and mutual aid. Our objective is to demonstrate to people how the current politico-economic systems detrimentally impact our well-being, present them with alternative approaches, and engage in mutual aid to alleviate the challenges of living under capitalism.</p></div> \n <div><h2>COMMUNITIES</h2> \n <img id="communities-img" src="/img/common/communities.svg" alt="communities"/> \n <p>We establish communities based on libertarian socialist principles, where individuals have ownership of their land, houses, and the means of production as well as make decisions using direct democracy. We are gradually expanding our socialist world, one community at a time.</p></div> \n <div><h2>COOPERATIVES</h2> \n <img id="coops-img" src="/img/common/coops.svg" alt="coops"/> \n <p>We form worker cooperatives to finance the operations of our groups and communities. Recognizing that economic power influences political power, we consider the establishment of cooperatives to be one of the initial steps towards achieving socialism.</p></div></div></div>',this.c=r,s(e,"id","container")},m(i,t){o(i,e,t)},p:r,i:r,o:r,d(i){i&&m(e)}}}function p(i){return c((()=>{})),[]}class l extends i{constructor(i){super(),this.shadowRoot.innerHTML="<style>@import '/css/common.css';#container-grid>div>h2{text-align:center}#groups-img{position:absolute;width:14rem;left:50%;transform:translate(-50%);z-index:0;opacity:0.2}#communities-img{position:absolute;width:11rem;left:50%;transform:translate(-50%);z-index:0;opacity:0.2}#coops-img{position:absolute;width:10.5rem;left:50%;transform:translate(-50%);z-index:0;opacity:0.2}#text-container{max-width:calc(100vw - 4rem);margin:auto}#crowd{width:100%;margin-bottom:2rem}#container{margin:auto;max-width:1200px;margin-top:2rem;margin-bottom:5rem}#container>div>p{margin-bottom:1rem}#container p{font-size:1.2rem;text-align:justify}#container-grid{display:grid;grid-template-columns:1.2fr 1.05fr 1fr;grid-gap:4rem}#container-grid>div{position:relative}#container-grid>div>p{position:relative;margin-top:7rem;z-index:2}@media only screen and (max-width: 1000px){#container-grid{display:grid;grid-template-columns:1fr;grid-gap:2rem}}</style>",e(this,{target:this.shadowRoot,props:t(this.attributes),customElement:!0},p,d,n,{},null),i&&i.target&&o(i.target,this,i.anchor)}}customElements.define("landing-component",l);export{l as default};
|
||||
|
||||
(function(l, r) { if (!l || l.getElementById('livereloadscript')) return; r = l.createElement('script'); r.async = 1; r.src = '//' + (self.location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1'; r.id = 'livereloadscript'; l.getElementsByTagName('head')[0].appendChild(r) })(self.document);
|
||||
import { S as SvelteElement, i as init, a as attribute_to_object, b as insert_dev, s as safe_not_equal, d as dispatch_dev, c as validate_slots, o as onMount, e as element, f as space, n as noop, h as attr_dev, g as add_location, j as src_url_equal, k as append_dev, l as detach_dev } from './index-3b678a7c.js';
|
||||
|
||||
/* src\landing-component.svelte generated by Svelte v3.52.0 */
|
||||
const file = "src\\landing-component.svelte";
|
||||
|
||||
function create_fragment(ctx) {
|
||||
let div5;
|
||||
let picture;
|
||||
let source0;
|
||||
let t0;
|
||||
let source1;
|
||||
let t1;
|
||||
let img0;
|
||||
let t2;
|
||||
let div4;
|
||||
let p0;
|
||||
let t4;
|
||||
let div3;
|
||||
let div0;
|
||||
let h20;
|
||||
let t6;
|
||||
let img1;
|
||||
let img1_src_value;
|
||||
let t7;
|
||||
let p1;
|
||||
let t9;
|
||||
let div1;
|
||||
let h21;
|
||||
let t11;
|
||||
let img2;
|
||||
let img2_src_value;
|
||||
let t12;
|
||||
let p2;
|
||||
let t14;
|
||||
let div2;
|
||||
let h22;
|
||||
let t16;
|
||||
let img3;
|
||||
let img3_src_value;
|
||||
let t17;
|
||||
let p3;
|
||||
|
||||
const block = {
|
||||
c: function create() {
|
||||
div5 = element("div");
|
||||
picture = element("picture");
|
||||
source0 = element("source");
|
||||
t0 = space();
|
||||
source1 = element("source");
|
||||
t1 = space();
|
||||
img0 = element("img");
|
||||
t2 = space();
|
||||
div4 = element("div");
|
||||
p0 = element("p");
|
||||
p0.textContent = "We are people united around a singular cause: bringing down authoritarian exploitative systems represented by various forms of capitalism and replacing them with libertarian socialist systems, with the goal of creating a more equitable and democratic world.";
|
||||
t4 = space();
|
||||
div3 = element("div");
|
||||
div0 = element("div");
|
||||
h20 = element("h2");
|
||||
h20.textContent = "GROUPS";
|
||||
t6 = space();
|
||||
img1 = element("img");
|
||||
t7 = space();
|
||||
p1 = element("p");
|
||||
p1.textContent = "We organize groups for the purposes of education, advocacy, and mutual aid. Our objective is to demonstrate to people how the current politico-economic systems detrimentally impact our well-being, present them with alternative approaches, and engage in mutual aid to alleviate the challenges of living under capitalism.";
|
||||
t9 = space();
|
||||
div1 = element("div");
|
||||
h21 = element("h2");
|
||||
h21.textContent = "COMMUNITIES";
|
||||
t11 = space();
|
||||
img2 = element("img");
|
||||
t12 = space();
|
||||
p2 = element("p");
|
||||
p2.textContent = "We establish communities based on libertarian socialist principles, where individuals have ownership of their land, houses, and the means of production as well as make decisions using direct democracy. We are gradually expanding our socialist world, one community at a time.";
|
||||
t14 = space();
|
||||
div2 = element("div");
|
||||
h22 = element("h2");
|
||||
h22.textContent = "COOPERATIVES";
|
||||
t16 = space();
|
||||
img3 = element("img");
|
||||
t17 = space();
|
||||
p3 = element("p");
|
||||
p3.textContent = "We form worker cooperatives to finance the operations of our groups and communities. Recognizing that economic power influences political power, we consider the establishment of cooperatives to be one of the initial steps towards achieving socialism.";
|
||||
this.c = noop;
|
||||
attr_dev(source0, "srcset", "/img/crowd.webp");
|
||||
add_location(source0, file, 20, 8, 274);
|
||||
attr_dev(source1, "srcset", "/img/crowd.png");
|
||||
add_location(source1, file, 21, 8, 317);
|
||||
attr_dev(img0, "id", "crowd");
|
||||
attr_dev(img0, "alt", "crowd");
|
||||
add_location(img0, file, 22, 8, 359);
|
||||
add_location(picture, file, 19, 4, 255);
|
||||
add_location(p0, file, 26, 8, 450);
|
||||
add_location(h20, file, 29, 16, 786);
|
||||
attr_dev(img1, "id", "groups-img");
|
||||
if (!src_url_equal(img1.src, img1_src_value = "/img/common/groups.svg")) attr_dev(img1, "src", img1_src_value);
|
||||
attr_dev(img1, "alt", "groups");
|
||||
add_location(img1, file, 30, 16, 819);
|
||||
add_location(p1, file, 31, 16, 900);
|
||||
add_location(div0, file, 28, 12, 763);
|
||||
add_location(h21, file, 34, 16, 1283);
|
||||
attr_dev(img2, "id", "communities-img");
|
||||
if (!src_url_equal(img2.src, img2_src_value = "/img/common/communities.svg")) attr_dev(img2, "src", img2_src_value);
|
||||
attr_dev(img2, "alt", "communities");
|
||||
add_location(img2, file, 35, 16, 1321);
|
||||
add_location(p2, file, 36, 16, 1417);
|
||||
add_location(div1, file, 33, 12, 1260);
|
||||
add_location(h22, file, 39, 16, 1755);
|
||||
attr_dev(img3, "id", "coops-img");
|
||||
if (!src_url_equal(img3.src, img3_src_value = "/img/common/coops.svg")) attr_dev(img3, "src", img3_src_value);
|
||||
attr_dev(img3, "alt", "coops");
|
||||
add_location(img3, file, 40, 16, 1794);
|
||||
add_location(p3, file, 41, 16, 1872);
|
||||
add_location(div2, file, 38, 12, 1732);
|
||||
attr_dev(div3, "id", "container-grid");
|
||||
add_location(div3, file, 27, 8, 724);
|
||||
attr_dev(div4, "id", "text-container");
|
||||
add_location(div4, file, 25, 4, 415);
|
||||
attr_dev(div5, "id", "container");
|
||||
add_location(div5, file, 18, 0, 229);
|
||||
},
|
||||
l: function claim(nodes) {
|
||||
throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
|
||||
},
|
||||
m: function mount(target, anchor) {
|
||||
insert_dev(target, div5, anchor);
|
||||
append_dev(div5, picture);
|
||||
append_dev(picture, source0);
|
||||
append_dev(picture, t0);
|
||||
append_dev(picture, source1);
|
||||
append_dev(picture, t1);
|
||||
append_dev(picture, img0);
|
||||
append_dev(div5, t2);
|
||||
append_dev(div5, div4);
|
||||
append_dev(div4, p0);
|
||||
append_dev(div4, t4);
|
||||
append_dev(div4, div3);
|
||||
append_dev(div3, div0);
|
||||
append_dev(div0, h20);
|
||||
append_dev(div0, t6);
|
||||
append_dev(div0, img1);
|
||||
append_dev(div0, t7);
|
||||
append_dev(div0, p1);
|
||||
append_dev(div3, t9);
|
||||
append_dev(div3, div1);
|
||||
append_dev(div1, h21);
|
||||
append_dev(div1, t11);
|
||||
append_dev(div1, img2);
|
||||
append_dev(div1, t12);
|
||||
append_dev(div1, p2);
|
||||
append_dev(div3, t14);
|
||||
append_dev(div3, div2);
|
||||
append_dev(div2, h22);
|
||||
append_dev(div2, t16);
|
||||
append_dev(div2, img3);
|
||||
append_dev(div2, t17);
|
||||
append_dev(div2, p3);
|
||||
},
|
||||
p: noop,
|
||||
i: noop,
|
||||
o: noop,
|
||||
d: function destroy(detaching) {
|
||||
if (detaching) detach_dev(div5);
|
||||
}
|
||||
};
|
||||
|
||||
dispatch_dev("SvelteRegisterBlock", {
|
||||
block,
|
||||
id: create_fragment.name,
|
||||
type: "component",
|
||||
source: "",
|
||||
ctx
|
||||
});
|
||||
|
||||
return block;
|
||||
}
|
||||
|
||||
function instance($$self, $$props, $$invalidate) {
|
||||
let { $$slots: slots = {}, $$scope } = $$props;
|
||||
validate_slots('landing-component', slots, []);
|
||||
|
||||
onMount(() => {
|
||||
|
||||
});
|
||||
|
||||
const writable_props = [];
|
||||
|
||||
Object.keys($$props).forEach(key => {
|
||||
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<landing-component> was created with unknown prop '${key}'`);
|
||||
});
|
||||
|
||||
$$self.$capture_state = () => ({ onMount });
|
||||
return [];
|
||||
}
|
||||
|
||||
class Landing_component extends SvelteElement {
|
||||
constructor(options) {
|
||||
super();
|
||||
this.shadowRoot.innerHTML = `<style>@import '/css/common.css';#container-grid>div>h2{text-align:center}#groups-img{position:absolute;width:14rem;left:50%;transform:translate(-50%);z-index:0;opacity:0.2}#communities-img{position:absolute;width:11rem;left:50%;transform:translate(-50%);z-index:0;opacity:0.2}#coops-img{position:absolute;width:10.5rem;left:50%;transform:translate(-50%);z-index:0;opacity:0.2}#text-container{max-width:calc(100vw - 4rem);margin:auto}#crowd{width:100%;margin-bottom:2rem}#container{margin:auto;max-width:1200px;margin-top:2rem;margin-bottom:5rem}#container>div>p{margin-bottom:1rem}#container p{font-size:1.15rem;text-align:justify}#container-grid{display:grid;grid-template-columns:1.2fr 1.05fr 1fr;grid-gap:4rem}#container-grid>div{position:relative}#container-grid>div>p{position:relative;margin-top:7rem;z-index:2}@media only screen and (max-width: 1000px){#container-grid{display:grid;grid-template-columns:1fr;grid-gap:2rem}}</style>`;
|
||||
|
||||
init(
|
||||
this,
|
||||
{
|
||||
target: this.shadowRoot,
|
||||
props: attribute_to_object(this.attributes),
|
||||
customElement: true
|
||||
},
|
||||
instance,
|
||||
create_fragment,
|
||||
safe_not_equal,
|
||||
{},
|
||||
null
|
||||
);
|
||||
|
||||
if (options) {
|
||||
if (options.target) {
|
||||
insert_dev(options.target, this, options.anchor);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
customElements.define("landing-component", Landing_component);
|
||||
|
||||
export { Landing_component as default };
|
||||
|
|
|
@ -1 +1,362 @@
|
|||
import{S as t,i as e,a as s,b as o,l as n,s as r,e as i,n as a,d as l,h as c,j as p,o as u,c as h,t as d,m,g as f,p as g,q as y,r as $}from"./index-95aedb1a.js";import{pullLegendData as b}from"../../../../../../../../../js/predict/charts.js";function w(t,e,s){const o=t.slice();return o[10]=e[s],o[11]=e,o[12]=s,o}function x(t){let e,s,n,r,a,p,u,$,b=t[10].name+"",w=t[12];const x=()=>t[6](e,w),k=()=>t[6](null,w);function j(){return t[7](t[12])}return{c(){e=i("button"),s=i("div"),n=h(),r=i("span"),a=d(b),p=h(),l(s,"class","marker"),m(s,"background-color",t[10].color)},m(t,i){o(t,e,i),f(e,s),f(e,n),f(e,r),f(r,a),f(e,p),x(),u||($=g(e,"click",j),u=!0)},p(e,o){t=e,1&o&&m(s,"background-color",t[10].color),1&o&&b!==(b=t[10].name+"")&&y(a,b),w!==t[12]&&(k(),w=t[12],x())},d(t){t&&c(e),k(),u=!1,$()}}}function k(t){let e,s=t[0],n=[];for(let e=0;e<s.length;e+=1)n[e]=x(w(t,s,e));return{c(){e=i("div");for(let t=0;t<n.length;t+=1)n[t].c();this.c=a,l(e,"class","legend")},m(t,s){o(t,e,s);for(let t=0;t<n.length;t+=1)n[t].m(e,null)},p(t,[o]){if(7&o){let r;for(s=t[0],r=0;r<s.length;r+=1){const i=w(t,s,r);n[r]?n[r].p(i,o):(n[r]=x(i),n[r].c(),n[r].m(e,null))}for(;r<n.length;r+=1)n[r].d(1);n.length=s.length}},i:a,o:a,d(t){t&&c(e),p(n,t)}}}function j(t,e,s){let o,{option:n=null}=e,{chart:r=null}=e,{data:i={}}=e,a=[],l=[];function c(){if(null==n||null==n||null==r||null==r)setTimeout(c,100);else{s(0,a=b(a,n));for(let t of a)s(3,i[t.name]=!0,i);o=Object.keys(i)}}function p(t){s(3,i[o[t]]=!i[o[t]],i);let e=[],a=n.series.map((t=>t._id)),c=a[t];for(let t=0;t<a.length;t++)a[t]==c&&e.push(t);for(let t of e){let o=n.series[t];o.tooltip.show?(o.lineStyle.opacity=0,o.itemStyle.opacity=0,o.tooltip.show=!1,s(1,l[e[0]].style.opacity=.5,l)):(o.lineStyle.opacity=1,o.itemStyle.opacity=1,o.tooltip.show=!0,s(1,l[e[0]].style.opacity=1,l))}r.setOption(n)}u((()=>{c()}));return t.$$set=t=>{"option"in t&&s(4,n=t.option),"chart"in t&&s(5,r=t.chart),"data"in t&&s(3,i=t.data)},[a,l,p,i,n,r,function(t,e){$[t?"unshift":"push"]((()=>{l[e]=t,s(1,l)}))},t=>p(t)]}class v extends t{constructor(t){super(),this.shadowRoot.innerHTML="<style>@import '/css/common.css';@import '/css/test-basic.css';button{cursor:pointer}.legend{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:center;gap:1rem}.legend *{font-family:var(--sans-serif)}.marker{position:relative;display:inline-block;margin-right:0.5rem;top:0.1rem;width:1rem;height:1rem;border-radius:1rem}</style>",e(this,{target:this.shadowRoot,props:s(this.attributes),customElement:!0},j,k,r,{option:4,chart:5,data:3},null),t&&(t.target&&o(t.target,this,t.anchor),t.props&&(this.$set(t.props),n()))}static get observedAttributes(){return["option","chart","data"]}get option(){return this.$$.ctx[4]}set option(t){this.$$set({option:t}),n()}get chart(){return this.$$.ctx[5]}set chart(t){this.$$set({chart:t}),n()}get data(){return this.$$.ctx[3]}set data(t){this.$$set({data:t}),n()}}customElements.define("legend-component",v);export{v as default};
|
||||
|
||||
(function(l, r) { if (!l || l.getElementById('livereloadscript')) return; r = l.createElement('script'); r.async = 1; r.src = '//' + (self.location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1'; r.id = 'livereloadscript'; l.getElementsByTagName('head')[0].appendChild(r) })(self.document);
|
||||
import { S as SvelteElement, i as init, a as attribute_to_object, b as insert_dev, q as flush, s as safe_not_equal, v as validate_each_argument, d as dispatch_dev, c as validate_slots, o as onMount, r as globals, e as element, n as noop, h as attr_dev, g as add_location, l as detach_dev, m as destroy_each, u as binding_callbacks, f as space, t as text, w as set_style, k as append_dev, x as listen_dev, y as set_data_dev } from './index-3b678a7c.js';
|
||||
import { pullLegendData } from '../../../../../../../../../js/predict/charts.js';
|
||||
|
||||
/* src\components\legend-component.svelte generated by Svelte v3.52.0 */
|
||||
|
||||
const { Object: Object_1 } = globals;
|
||||
const file = "src\\components\\legend-component.svelte";
|
||||
|
||||
function get_each_context(ctx, list, i) {
|
||||
const child_ctx = ctx.slice();
|
||||
child_ctx[10] = list[i];
|
||||
child_ctx[11] = list;
|
||||
child_ctx[12] = i;
|
||||
return child_ctx;
|
||||
}
|
||||
|
||||
// (69:4) {#each legendData as item, i}
|
||||
function create_each_block(ctx) {
|
||||
let button;
|
||||
let div;
|
||||
let t0;
|
||||
let span;
|
||||
let t1_value = /*item*/ ctx[10].name + "";
|
||||
let t1;
|
||||
let t2;
|
||||
let i = /*i*/ ctx[12];
|
||||
let mounted;
|
||||
let dispose;
|
||||
const assign_button = () => /*button_binding*/ ctx[6](button, i);
|
||||
const unassign_button = () => /*button_binding*/ ctx[6](null, i);
|
||||
|
||||
function click_handler() {
|
||||
return /*click_handler*/ ctx[7](/*i*/ ctx[12]);
|
||||
}
|
||||
|
||||
const block = {
|
||||
c: function create() {
|
||||
button = element("button");
|
||||
div = element("div");
|
||||
t0 = space();
|
||||
span = element("span");
|
||||
t1 = text(t1_value);
|
||||
t2 = space();
|
||||
attr_dev(div, "class", "marker");
|
||||
set_style(div, "background-color", /*item*/ ctx[10].color);
|
||||
add_location(div, file, 70, 12, 1892);
|
||||
add_location(span, file, 71, 12, 1971);
|
||||
add_location(button, file, 69, 8, 1814);
|
||||
},
|
||||
m: function mount(target, anchor) {
|
||||
insert_dev(target, button, anchor);
|
||||
append_dev(button, div);
|
||||
append_dev(button, t0);
|
||||
append_dev(button, span);
|
||||
append_dev(span, t1);
|
||||
append_dev(button, t2);
|
||||
assign_button();
|
||||
|
||||
if (!mounted) {
|
||||
dispose = listen_dev(button, "click", click_handler, false, false, false);
|
||||
mounted = true;
|
||||
}
|
||||
},
|
||||
p: function update(new_ctx, dirty) {
|
||||
ctx = new_ctx;
|
||||
|
||||
if (dirty & /*legendData*/ 1) {
|
||||
set_style(div, "background-color", /*item*/ ctx[10].color);
|
||||
}
|
||||
|
||||
if (dirty & /*legendData*/ 1 && t1_value !== (t1_value = /*item*/ ctx[10].name + "")) set_data_dev(t1, t1_value);
|
||||
|
||||
if (i !== /*i*/ ctx[12]) {
|
||||
unassign_button();
|
||||
i = /*i*/ ctx[12];
|
||||
assign_button();
|
||||
}
|
||||
},
|
||||
d: function destroy(detaching) {
|
||||
if (detaching) detach_dev(button);
|
||||
unassign_button();
|
||||
mounted = false;
|
||||
dispose();
|
||||
}
|
||||
};
|
||||
|
||||
dispatch_dev("SvelteRegisterBlock", {
|
||||
block,
|
||||
id: create_each_block.name,
|
||||
type: "each",
|
||||
source: "(69:4) {#each legendData as item, i}",
|
||||
ctx
|
||||
});
|
||||
|
||||
return block;
|
||||
}
|
||||
|
||||
function create_fragment(ctx) {
|
||||
let div;
|
||||
let each_value = /*legendData*/ ctx[0];
|
||||
validate_each_argument(each_value);
|
||||
let each_blocks = [];
|
||||
|
||||
for (let i = 0; i < each_value.length; i += 1) {
|
||||
each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i));
|
||||
}
|
||||
|
||||
const block = {
|
||||
c: function create() {
|
||||
div = element("div");
|
||||
|
||||
for (let i = 0; i < each_blocks.length; i += 1) {
|
||||
each_blocks[i].c();
|
||||
}
|
||||
|
||||
this.c = noop;
|
||||
attr_dev(div, "class", "legend");
|
||||
add_location(div, file, 67, 0, 1749);
|
||||
},
|
||||
l: function claim(nodes) {
|
||||
throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
|
||||
},
|
||||
m: function mount(target, anchor) {
|
||||
insert_dev(target, div, anchor);
|
||||
|
||||
for (let i = 0; i < each_blocks.length; i += 1) {
|
||||
each_blocks[i].m(div, null);
|
||||
}
|
||||
},
|
||||
p: function update(ctx, [dirty]) {
|
||||
if (dirty & /*buttons, toggleSeries, legendData*/ 7) {
|
||||
each_value = /*legendData*/ ctx[0];
|
||||
validate_each_argument(each_value);
|
||||
let i;
|
||||
|
||||
for (i = 0; i < each_value.length; i += 1) {
|
||||
const child_ctx = get_each_context(ctx, each_value, i);
|
||||
|
||||
if (each_blocks[i]) {
|
||||
each_blocks[i].p(child_ctx, dirty);
|
||||
} else {
|
||||
each_blocks[i] = create_each_block(child_ctx);
|
||||
each_blocks[i].c();
|
||||
each_blocks[i].m(div, null);
|
||||
}
|
||||
}
|
||||
|
||||
for (; i < each_blocks.length; i += 1) {
|
||||
each_blocks[i].d(1);
|
||||
}
|
||||
|
||||
each_blocks.length = each_value.length;
|
||||
}
|
||||
},
|
||||
i: noop,
|
||||
o: noop,
|
||||
d: function destroy(detaching) {
|
||||
if (detaching) detach_dev(div);
|
||||
destroy_each(each_blocks, detaching);
|
||||
}
|
||||
};
|
||||
|
||||
dispatch_dev("SvelteRegisterBlock", {
|
||||
block,
|
||||
id: create_fragment.name,
|
||||
type: "component",
|
||||
source: "",
|
||||
ctx
|
||||
});
|
||||
|
||||
return block;
|
||||
}
|
||||
|
||||
function instance($$self, $$props, $$invalidate) {
|
||||
let { $$slots: slots = {}, $$scope } = $$props;
|
||||
validate_slots('legend-component', slots, []);
|
||||
let { option = null } = $$props;
|
||||
let { chart = null } = $$props;
|
||||
let { data = {} } = $$props;
|
||||
|
||||
// Main code
|
||||
let legendData = [];
|
||||
|
||||
let buttons = [];
|
||||
let dataKeys;
|
||||
|
||||
function init() {
|
||||
if (option == null || option == undefined || chart == null || chart == undefined) {
|
||||
setTimeout(init, 100);
|
||||
} else {
|
||||
$$invalidate(0, legendData = pullLegendData(legendData, option));
|
||||
|
||||
for (let obj of legendData) {
|
||||
$$invalidate(3, data[obj.name] = true, data);
|
||||
}
|
||||
|
||||
dataKeys = Object.keys(data);
|
||||
}
|
||||
}
|
||||
|
||||
function toggleSeries(i) {
|
||||
$$invalidate(3, data[dataKeys[i]] = !data[dataKeys[i]], data);
|
||||
let inds = [];
|
||||
let ids = option.series.map(x => x._id);
|
||||
let id = ids[i];
|
||||
|
||||
for (let j = 0; j < ids.length; j++) {
|
||||
if (ids[j] == id) {
|
||||
inds.push(j);
|
||||
}
|
||||
}
|
||||
|
||||
for (let i of inds) {
|
||||
let series = option.series[i];
|
||||
|
||||
if (!series.tooltip.show) {
|
||||
series.lineStyle.opacity = 1;
|
||||
series.itemStyle.opacity = 1;
|
||||
series.tooltip.show = true;
|
||||
$$invalidate(1, buttons[inds[0]].style.opacity = 1, buttons);
|
||||
} else {
|
||||
series.lineStyle.opacity = 0;
|
||||
series.itemStyle.opacity = 0;
|
||||
series.tooltip.show = false;
|
||||
$$invalidate(1, buttons[inds[0]].style.opacity = 0.5, buttons);
|
||||
}
|
||||
}
|
||||
|
||||
chart.setOption(option);
|
||||
}
|
||||
|
||||
onMount(() => {
|
||||
init();
|
||||
});
|
||||
|
||||
const writable_props = ['option', 'chart', 'data'];
|
||||
|
||||
Object_1.keys($$props).forEach(key => {
|
||||
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<legend-component> was created with unknown prop '${key}'`);
|
||||
});
|
||||
|
||||
function button_binding($$value, i) {
|
||||
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
||||
buttons[i] = $$value;
|
||||
$$invalidate(1, buttons);
|
||||
});
|
||||
}
|
||||
|
||||
const click_handler = i => toggleSeries(i);
|
||||
|
||||
$$self.$$set = $$props => {
|
||||
if ('option' in $$props) $$invalidate(4, option = $$props.option);
|
||||
if ('chart' in $$props) $$invalidate(5, chart = $$props.chart);
|
||||
if ('data' in $$props) $$invalidate(3, data = $$props.data);
|
||||
};
|
||||
|
||||
$$self.$capture_state = () => ({
|
||||
onMount,
|
||||
pullLegendData,
|
||||
option,
|
||||
chart,
|
||||
data,
|
||||
legendData,
|
||||
buttons,
|
||||
dataKeys,
|
||||
init,
|
||||
toggleSeries
|
||||
});
|
||||
|
||||
$$self.$inject_state = $$props => {
|
||||
if ('option' in $$props) $$invalidate(4, option = $$props.option);
|
||||
if ('chart' in $$props) $$invalidate(5, chart = $$props.chart);
|
||||
if ('data' in $$props) $$invalidate(3, data = $$props.data);
|
||||
if ('legendData' in $$props) $$invalidate(0, legendData = $$props.legendData);
|
||||
if ('buttons' in $$props) $$invalidate(1, buttons = $$props.buttons);
|
||||
if ('dataKeys' in $$props) dataKeys = $$props.dataKeys;
|
||||
};
|
||||
|
||||
if ($$props && "$$inject" in $$props) {
|
||||
$$self.$inject_state($$props.$$inject);
|
||||
}
|
||||
|
||||
return [
|
||||
legendData,
|
||||
buttons,
|
||||
toggleSeries,
|
||||
data,
|
||||
option,
|
||||
chart,
|
||||
button_binding,
|
||||
click_handler
|
||||
];
|
||||
}
|
||||
|
||||
class Legend_component extends SvelteElement {
|
||||
constructor(options) {
|
||||
super();
|
||||
this.shadowRoot.innerHTML = `<style>@import '/css/common.css';@import '/css/test-basic.css';button{cursor:pointer}.legend{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:center;gap:1rem}.legend *{font-family:var(--sans-serif)}.marker{position:relative;display:inline-block;margin-right:0.5rem;top:0.1rem;width:1rem;height:1rem;border-radius:1rem}</style>`;
|
||||
|
||||
init(
|
||||
this,
|
||||
{
|
||||
target: this.shadowRoot,
|
||||
props: attribute_to_object(this.attributes),
|
||||
customElement: true
|
||||
},
|
||||
instance,
|
||||
create_fragment,
|
||||
safe_not_equal,
|
||||
{ option: 4, chart: 5, data: 3 },
|
||||
null
|
||||
);
|
||||
|
||||
if (options) {
|
||||
if (options.target) {
|
||||
insert_dev(options.target, this, options.anchor);
|
||||
}
|
||||
|
||||
if (options.props) {
|
||||
this.$set(options.props);
|
||||
flush();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static get observedAttributes() {
|
||||
return ["option", "chart", "data"];
|
||||
}
|
||||
|
||||
get option() {
|
||||
return this.$$.ctx[4];
|
||||
}
|
||||
|
||||
set option(option) {
|
||||
this.$$set({ option });
|
||||
flush();
|
||||
}
|
||||
|
||||
get chart() {
|
||||
return this.$$.ctx[5];
|
||||
}
|
||||
|
||||
set chart(chart) {
|
||||
this.$$set({ chart });
|
||||
flush();
|
||||
}
|
||||
|
||||
get data() {
|
||||
return this.$$.ctx[3];
|
||||
}
|
||||
|
||||
set data(data) {
|
||||
this.$$set({ data });
|
||||
flush();
|
||||
}
|
||||
}
|
||||
|
||||
customElements.define("legend-component", Legend_component);
|
||||
|
||||
export { Legend_component as default };
|
||||
|
|
|
@ -1 +1,115 @@
|
|||
import{S as t,i as s,a as e,b as n,s as a,e as o,n as i,d as r,m as d,h as u,o as c,r as l}from"./index-95aedb1a.js";function h(t){let s;return{c(){s=o("div"),this.c=i,r(s,"id","loadscreen"),d(s,"width","100%"),d(s,"height","100%"),d(s,"background","white"),d(s,"position","absolute"),d(s,"z-index","100000")},m(e,a){n(e,s,a),t[1](s)},p:i,i:i,o:i,d(e){e&&u(s),t[1](null)}}}function p(t,s,e){let n;return c((()=>{window.addEventListener("load",(function(){e(0,n.parentNode.host.style.display="none",n)}))})),[n,function(t){l[t?"unshift":"push"]((()=>{n=t,e(0,n)}))}]}class m extends t{constructor(t){super(),s(this,{target:this.shadowRoot,props:e(this.attributes),customElement:!0},p,h,a,{},null),t&&t.target&&n(t.target,this,t.anchor)}}customElements.define("loadscreen-component",m);export{m as default};
|
||||
|
||||
(function(l, r) { if (!l || l.getElementById('livereloadscript')) return; r = l.createElement('script'); r.async = 1; r.src = '//' + (self.location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1'; r.id = 'livereloadscript'; l.getElementsByTagName('head')[0].appendChild(r) })(self.document);
|
||||
import { S as SvelteElement, i as init, a as attribute_to_object, b as insert_dev, s as safe_not_equal, d as dispatch_dev, c as validate_slots, o as onMount, e as element, n as noop, h as attr_dev, w as set_style, g as add_location, l as detach_dev, u as binding_callbacks } from './index-3b678a7c.js';
|
||||
|
||||
/* src\components\loadscreen-component.svelte generated by Svelte v3.52.0 */
|
||||
const file = "src\\components\\loadscreen-component.svelte";
|
||||
|
||||
function create_fragment(ctx) {
|
||||
let div;
|
||||
|
||||
const block = {
|
||||
c: function create() {
|
||||
div = element("div");
|
||||
this.c = noop;
|
||||
attr_dev(div, "id", "loadscreen");
|
||||
set_style(div, "width", "100%");
|
||||
set_style(div, "height", "100%");
|
||||
set_style(div, "background", "white");
|
||||
set_style(div, "position", "absolute");
|
||||
set_style(div, "z-index", "100000");
|
||||
add_location(div, file, 20, 0, 366);
|
||||
},
|
||||
l: function claim(nodes) {
|
||||
throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
|
||||
},
|
||||
m: function mount(target, anchor) {
|
||||
insert_dev(target, div, anchor);
|
||||
/*div_binding*/ ctx[1](div);
|
||||
},
|
||||
p: noop,
|
||||
i: noop,
|
||||
o: noop,
|
||||
d: function destroy(detaching) {
|
||||
if (detaching) detach_dev(div);
|
||||
/*div_binding*/ ctx[1](null);
|
||||
}
|
||||
};
|
||||
|
||||
dispatch_dev("SvelteRegisterBlock", {
|
||||
block,
|
||||
id: create_fragment.name,
|
||||
type: "component",
|
||||
source: "",
|
||||
ctx
|
||||
});
|
||||
|
||||
return block;
|
||||
}
|
||||
|
||||
function instance($$self, $$props, $$invalidate) {
|
||||
let { $$slots: slots = {}, $$scope } = $$props;
|
||||
validate_slots('loadscreen-component', slots, []);
|
||||
let loadscreen;
|
||||
|
||||
onMount(() => {
|
||||
window.addEventListener('load', function () {
|
||||
$$invalidate(0, loadscreen.parentNode.host.style.display = "none", loadscreen);
|
||||
});
|
||||
});
|
||||
|
||||
const writable_props = [];
|
||||
|
||||
Object.keys($$props).forEach(key => {
|
||||
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<loadscreen-component> was created with unknown prop '${key}'`);
|
||||
});
|
||||
|
||||
function div_binding($$value) {
|
||||
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
||||
loadscreen = $$value;
|
||||
$$invalidate(0, loadscreen);
|
||||
});
|
||||
}
|
||||
|
||||
$$self.$capture_state = () => ({ onMount, loadscreen });
|
||||
|
||||
$$self.$inject_state = $$props => {
|
||||
if ('loadscreen' in $$props) $$invalidate(0, loadscreen = $$props.loadscreen);
|
||||
};
|
||||
|
||||
if ($$props && "$$inject" in $$props) {
|
||||
$$self.$inject_state($$props.$$inject);
|
||||
}
|
||||
|
||||
return [loadscreen, div_binding];
|
||||
}
|
||||
|
||||
class Loadscreen_component extends SvelteElement {
|
||||
constructor(options) {
|
||||
super();
|
||||
|
||||
init(
|
||||
this,
|
||||
{
|
||||
target: this.shadowRoot,
|
||||
props: attribute_to_object(this.attributes),
|
||||
customElement: true
|
||||
},
|
||||
instance,
|
||||
create_fragment,
|
||||
safe_not_equal,
|
||||
{},
|
||||
null
|
||||
);
|
||||
|
||||
if (options) {
|
||||
if (options.target) {
|
||||
insert_dev(options.target, this, options.anchor);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
customElements.define("loadscreen-component", Loadscreen_component);
|
||||
|
||||
export { Loadscreen_component as default };
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1 +1,152 @@
|
|||
import{S as t,i as a,a as e,b as s,l as r,s as o,e as n,n as i,d as l,h as c,o as p,r as h}from"./index-95aedb1a.js";function u(t){let a;return{c(){a=n("div"),this.c=i,l(a,"id","map")},m(e,r){s(e,a,r),t[2](a)},p:i,i:i,o:i,d(e){e&&c(a),t[2](null)}}}function m(t,a,e){let s,{callback:r=null}=a;function o(t,a){let e=L.map(s,{center:t,zoom:a});return L.tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'}).addTo(e),e}return p((()=>{r(o)})),t.$$set=t=>{"callback"in t&&e(1,r=t.callback)},[s,r,function(t){h[t?"unshift":"push"]((()=>{s=t,e(0,s)}))}]}class b extends t{constructor(t){super(),this.shadowRoot.innerHTML="<style>@import 'https://unpkg.com/leaflet@1.9.4/dist/leaflet.css';#map{height:var(--height);width:var(--width,100%);margin-bottom:var(--margin-bottom,0)\n }</style>",a(this,{target:this.shadowRoot,props:e(this.attributes),customElement:!0},m,u,o,{callback:1},null),t&&(t.target&&s(t.target,this,t.anchor),t.props&&(this.$set(t.props),r()))}static get observedAttributes(){return["callback"]}get callback(){return this.$$.ctx[1]}set callback(t){this.$$set({callback:t}),r()}}customElements.define("map-component",b);export{b as default};
|
||||
|
||||
(function(l, r) { if (!l || l.getElementById('livereloadscript')) return; r = l.createElement('script'); r.async = 1; r.src = '//' + (self.location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1'; r.id = 'livereloadscript'; l.getElementsByTagName('head')[0].appendChild(r) })(self.document);
|
||||
import { S as SvelteElement, i as init, a as attribute_to_object, b as insert_dev, q as flush, s as safe_not_equal, d as dispatch_dev, c as validate_slots, o as onMount, e as element, n as noop, h as attr_dev, g as add_location, l as detach_dev, u as binding_callbacks } from './index-3b678a7c.js';
|
||||
|
||||
/* src\components\map-component.svelte generated by Svelte v3.52.0 */
|
||||
const file = "src\\components\\map-component.svelte";
|
||||
|
||||
function create_fragment(ctx) {
|
||||
let div;
|
||||
|
||||
const block = {
|
||||
c: function create() {
|
||||
div = element("div");
|
||||
this.c = noop;
|
||||
attr_dev(div, "id", "map");
|
||||
add_location(div, file, 30, 0, 720);
|
||||
},
|
||||
l: function claim(nodes) {
|
||||
throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
|
||||
},
|
||||
m: function mount(target, anchor) {
|
||||
insert_dev(target, div, anchor);
|
||||
/*div_binding*/ ctx[2](div);
|
||||
},
|
||||
p: noop,
|
||||
i: noop,
|
||||
o: noop,
|
||||
d: function destroy(detaching) {
|
||||
if (detaching) detach_dev(div);
|
||||
/*div_binding*/ ctx[2](null);
|
||||
}
|
||||
};
|
||||
|
||||
dispatch_dev("SvelteRegisterBlock", {
|
||||
block,
|
||||
id: create_fragment.name,
|
||||
type: "component",
|
||||
source: "",
|
||||
ctx
|
||||
});
|
||||
|
||||
return block;
|
||||
}
|
||||
|
||||
function instance($$self, $$props, $$invalidate) {
|
||||
let { $$slots: slots = {}, $$scope } = $$props;
|
||||
validate_slots('map-component', slots, []);
|
||||
let { callback = null } = $$props;
|
||||
|
||||
// Main code
|
||||
let mapContainer;
|
||||
|
||||
function createMap(center, zoom) {
|
||||
let map = L.map(mapContainer, { center, zoom });
|
||||
|
||||
L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
||||
}).addTo(map);
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
onMount(() => {
|
||||
callback(createMap);
|
||||
});
|
||||
|
||||
const writable_props = ['callback'];
|
||||
|
||||
Object.keys($$props).forEach(key => {
|
||||
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<map-component> was created with unknown prop '${key}'`);
|
||||
});
|
||||
|
||||
function div_binding($$value) {
|
||||
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
||||
mapContainer = $$value;
|
||||
$$invalidate(0, mapContainer);
|
||||
});
|
||||
}
|
||||
|
||||
$$self.$$set = $$props => {
|
||||
if ('callback' in $$props) $$invalidate(1, callback = $$props.callback);
|
||||
};
|
||||
|
||||
$$self.$capture_state = () => ({
|
||||
onMount,
|
||||
callback,
|
||||
mapContainer,
|
||||
createMap
|
||||
});
|
||||
|
||||
$$self.$inject_state = $$props => {
|
||||
if ('callback' in $$props) $$invalidate(1, callback = $$props.callback);
|
||||
if ('mapContainer' in $$props) $$invalidate(0, mapContainer = $$props.mapContainer);
|
||||
};
|
||||
|
||||
if ($$props && "$$inject" in $$props) {
|
||||
$$self.$inject_state($$props.$$inject);
|
||||
}
|
||||
|
||||
return [mapContainer, callback, div_binding];
|
||||
}
|
||||
|
||||
class Map_component extends SvelteElement {
|
||||
constructor(options) {
|
||||
super();
|
||||
|
||||
this.shadowRoot.innerHTML = `<style>@import 'https://unpkg.com/leaflet@1.9.4/dist/leaflet.css';#map{height:var(--height);width:var(--width,100%);margin-bottom:var(--margin-bottom,0)
|
||||
}</style>`;
|
||||
|
||||
init(
|
||||
this,
|
||||
{
|
||||
target: this.shadowRoot,
|
||||
props: attribute_to_object(this.attributes),
|
||||
customElement: true
|
||||
},
|
||||
instance,
|
||||
create_fragment,
|
||||
safe_not_equal,
|
||||
{ callback: 1 },
|
||||
null
|
||||
);
|
||||
|
||||
if (options) {
|
||||
if (options.target) {
|
||||
insert_dev(options.target, this, options.anchor);
|
||||
}
|
||||
|
||||
if (options.props) {
|
||||
this.$set(options.props);
|
||||
flush();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static get observedAttributes() {
|
||||
return ["callback"];
|
||||
}
|
||||
|
||||
get callback() {
|
||||
return this.$$.ctx[1];
|
||||
}
|
||||
|
||||
set callback(callback) {
|
||||
this.$$set({ callback });
|
||||
flush();
|
||||
}
|
||||
}
|
||||
|
||||
customElements.define("map-component", Map_component);
|
||||
|
||||
export { Map_component as default };
|
||||
|
|
|
@ -1 +1,278 @@
|
|||
import{S as a,i,a as s,b as n,s as e,e as t,c as o,n as r,d as l,g as u,p as c,h,o as m,r as d}from"./index-95aedb1a.js";function f(a){let i,s,e,m,d,f,p,b,g,v;return{c(){i=t("header"),s=t("a"),s.innerHTML='<img src="img/common/flag.png" id="navbar-logo" alt="logo"/> \n <span id="navbar-logo-text">Libertarian socialists</span>',e=o(),m=t("input"),d=o(),f=t("label"),f.innerHTML='<span id="hamb-line"></span>',p=o(),b=t("nav"),b.innerHTML='<ul id="menu"><li><a href="/manifesto">Manifesto</a></li> \n <li><a href="/join-us">Join us</a></li> \n <li><a href="/groups">Groups</a></li> \n <li><a href="/communities">Communities</a></li> \n <li><a href="/cooperatives">Cooperatives</a></li> \n <li><a href="/affiliates">Affiliates</a></li></ul>',this.c=r,l(s,"id","logo-container"),l(s,"href","/"),l(m,"type","checkbox"),l(m,"id","side-menu"),l(f,"id","hamb"),l(f,"for","side-menu"),l(b,"id","nav"),l(i,"id","navbar")},m(t,o){n(t,i,o),u(i,s),u(i,e),u(i,m),a[3](m),u(i,d),u(i,f),u(i,p),u(i,b),a[4](i),g||(v=c(m,"click",a[2]),g=!0)},p:r,i:r,o:r,d(s){s&&h(i),a[3](null),a[4](null),g=!1,v()}}}function p(a,i,s){let n,e;return m((()=>{})),[n,e,function(){n.checked?s(1,e.style.background="white",e):setTimeout((()=>{s(1,e.style.position="relative",e),s(1,e.style.background="",e),s(1,e.style.boxShadow="",e)}),510)},function(a){d[a?"unshift":"push"]((()=>{n=a,s(0,n)}))},function(a){d[a?"unshift":"push"]((()=>{e=a,s(1,e)}))}]}class b extends a{constructor(a){super(),this.shadowRoot.innerHTML="<style>@import '/css/common.css';@import '/css/navbar.css';</style>",i(this,{target:this.shadowRoot,props:s(this.attributes),customElement:!0},p,f,e,{},null),a&&a.target&&n(a.target,this,a.anchor)}}customElements.define("navbar-component",b);export{b as default};
|
||||
|
||||
(function(l, r) { if (!l || l.getElementById('livereloadscript')) return; r = l.createElement('script'); r.async = 1; r.src = '//' + (self.location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1'; r.id = 'livereloadscript'; l.getElementsByTagName('head')[0].appendChild(r) })(self.document);
|
||||
import { S as SvelteElement, i as init, a as attribute_to_object, b as insert_dev, s as safe_not_equal, d as dispatch_dev, c as validate_slots, o as onMount, e as element, f as space, n as noop, j as src_url_equal, h as attr_dev, g as add_location, k as append_dev, x as listen_dev, l as detach_dev, u as binding_callbacks } from './index-3b678a7c.js';
|
||||
|
||||
/* src\navbar\navbar-component.svelte generated by Svelte v3.52.0 */
|
||||
const file = "src\\navbar\\navbar-component.svelte";
|
||||
|
||||
function create_fragment(ctx) {
|
||||
let header;
|
||||
let a0;
|
||||
let img;
|
||||
let img_src_value;
|
||||
let t0;
|
||||
let span0;
|
||||
let t2;
|
||||
let input;
|
||||
let t3;
|
||||
let label;
|
||||
let span1;
|
||||
let t4;
|
||||
let nav;
|
||||
let ul;
|
||||
let li0;
|
||||
let a1;
|
||||
let t6;
|
||||
let li1;
|
||||
let a2;
|
||||
let t8;
|
||||
let li2;
|
||||
let a3;
|
||||
let t10;
|
||||
let li3;
|
||||
let a4;
|
||||
let t12;
|
||||
let li4;
|
||||
let a5;
|
||||
let t14;
|
||||
let li5;
|
||||
let a6;
|
||||
let mounted;
|
||||
let dispose;
|
||||
|
||||
const block = {
|
||||
c: function create() {
|
||||
header = element("header");
|
||||
a0 = element("a");
|
||||
img = element("img");
|
||||
t0 = space();
|
||||
span0 = element("span");
|
||||
span0.textContent = "Libertarian socialists";
|
||||
t2 = space();
|
||||
input = element("input");
|
||||
t3 = space();
|
||||
label = element("label");
|
||||
span1 = element("span");
|
||||
t4 = space();
|
||||
nav = element("nav");
|
||||
ul = element("ul");
|
||||
li0 = element("li");
|
||||
a1 = element("a");
|
||||
a1.textContent = "Manifesto";
|
||||
t6 = space();
|
||||
li1 = element("li");
|
||||
a2 = element("a");
|
||||
a2.textContent = "Join us";
|
||||
t8 = space();
|
||||
li2 = element("li");
|
||||
a3 = element("a");
|
||||
a3.textContent = "Groups";
|
||||
t10 = space();
|
||||
li3 = element("li");
|
||||
a4 = element("a");
|
||||
a4.textContent = "Communities";
|
||||
t12 = space();
|
||||
li4 = element("li");
|
||||
a5 = element("a");
|
||||
a5.textContent = "Cooperatives";
|
||||
t14 = space();
|
||||
li5 = element("li");
|
||||
a6 = element("a");
|
||||
a6.textContent = "Affiliates";
|
||||
this.c = noop;
|
||||
if (!src_url_equal(img.src, img_src_value = "img/common/flag.png")) attr_dev(img, "src", img_src_value);
|
||||
attr_dev(img, "id", "navbar-logo");
|
||||
attr_dev(img, "alt", "logo");
|
||||
add_location(img, file, 37, 8, 812);
|
||||
attr_dev(span0, "id", "navbar-logo-text");
|
||||
add_location(span0, file, 38, 8, 881);
|
||||
attr_dev(a0, "id", "logo-container");
|
||||
attr_dev(a0, "href", "/");
|
||||
add_location(a0, file, 36, 4, 772);
|
||||
attr_dev(input, "type", "checkbox");
|
||||
attr_dev(input, "id", "side-menu");
|
||||
add_location(input, file, 41, 4, 983);
|
||||
attr_dev(span1, "id", "hamb-line");
|
||||
add_location(span1, file, 42, 37, 1106);
|
||||
attr_dev(label, "id", "hamb");
|
||||
attr_dev(label, "for", "side-menu");
|
||||
add_location(label, file, 42, 4, 1073);
|
||||
attr_dev(a1, "href", "/manifesto");
|
||||
add_location(a1, file, 46, 16, 1223);
|
||||
add_location(li0, file, 46, 12, 1219);
|
||||
attr_dev(a2, "href", "/join-us");
|
||||
add_location(a2, file, 47, 16, 1280);
|
||||
add_location(li1, file, 47, 12, 1276);
|
||||
attr_dev(a3, "href", "/groups");
|
||||
add_location(a3, file, 48, 16, 1333);
|
||||
add_location(li2, file, 48, 12, 1329);
|
||||
attr_dev(a4, "href", "/communities");
|
||||
add_location(a4, file, 49, 16, 1384);
|
||||
add_location(li3, file, 49, 12, 1380);
|
||||
attr_dev(a5, "href", "/cooperatives");
|
||||
add_location(a5, file, 50, 16, 1445);
|
||||
add_location(li4, file, 50, 12, 1441);
|
||||
attr_dev(a6, "href", "/affiliates");
|
||||
add_location(a6, file, 51, 16, 1508);
|
||||
add_location(li5, file, 51, 12, 1504);
|
||||
attr_dev(ul, "id", "menu");
|
||||
add_location(ul, file, 45, 8, 1191);
|
||||
attr_dev(nav, "id", "nav");
|
||||
add_location(nav, file, 44, 4, 1167);
|
||||
attr_dev(header, "id", "navbar");
|
||||
add_location(header, file, 34, 0, 708);
|
||||
},
|
||||
l: function claim(nodes) {
|
||||
throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
|
||||
},
|
||||
m: function mount(target, anchor) {
|
||||
insert_dev(target, header, anchor);
|
||||
append_dev(header, a0);
|
||||
append_dev(a0, img);
|
||||
append_dev(a0, t0);
|
||||
append_dev(a0, span0);
|
||||
append_dev(header, t2);
|
||||
append_dev(header, input);
|
||||
/*input_binding*/ ctx[3](input);
|
||||
append_dev(header, t3);
|
||||
append_dev(header, label);
|
||||
append_dev(label, span1);
|
||||
append_dev(header, t4);
|
||||
append_dev(header, nav);
|
||||
append_dev(nav, ul);
|
||||
append_dev(ul, li0);
|
||||
append_dev(li0, a1);
|
||||
append_dev(ul, t6);
|
||||
append_dev(ul, li1);
|
||||
append_dev(li1, a2);
|
||||
append_dev(ul, t8);
|
||||
append_dev(ul, li2);
|
||||
append_dev(li2, a3);
|
||||
append_dev(ul, t10);
|
||||
append_dev(ul, li3);
|
||||
append_dev(li3, a4);
|
||||
append_dev(ul, t12);
|
||||
append_dev(ul, li4);
|
||||
append_dev(li4, a5);
|
||||
append_dev(ul, t14);
|
||||
append_dev(ul, li5);
|
||||
append_dev(li5, a6);
|
||||
/*header_binding*/ ctx[4](header);
|
||||
|
||||
if (!mounted) {
|
||||
dispose = listen_dev(input, "click", /*changeNavbar*/ ctx[2], false, false, false);
|
||||
mounted = true;
|
||||
}
|
||||
},
|
||||
p: noop,
|
||||
i: noop,
|
||||
o: noop,
|
||||
d: function destroy(detaching) {
|
||||
if (detaching) detach_dev(header);
|
||||
/*input_binding*/ ctx[3](null);
|
||||
/*header_binding*/ ctx[4](null);
|
||||
mounted = false;
|
||||
dispose();
|
||||
}
|
||||
};
|
||||
|
||||
dispatch_dev("SvelteRegisterBlock", {
|
||||
block,
|
||||
id: create_fragment.name,
|
||||
type: "component",
|
||||
source: "",
|
||||
ctx
|
||||
});
|
||||
|
||||
return block;
|
||||
}
|
||||
|
||||
function instance($$self, $$props, $$invalidate) {
|
||||
let { $$slots: slots = {}, $$scope } = $$props;
|
||||
validate_slots('navbar-component', slots, []);
|
||||
let hambInput;
|
||||
let navbar;
|
||||
|
||||
function changeNavbar() {
|
||||
if (hambInput.checked) {
|
||||
$$invalidate(1, navbar.style.background = "white", navbar);
|
||||
} else {
|
||||
setTimeout(
|
||||
() => {
|
||||
$$invalidate(1, navbar.style.position = "relative", navbar);
|
||||
$$invalidate(1, navbar.style.background = "", navbar);
|
||||
$$invalidate(1, navbar.style.boxShadow = "", navbar);
|
||||
},
|
||||
510
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
onMount(() => {
|
||||
|
||||
});
|
||||
|
||||
const writable_props = [];
|
||||
|
||||
Object.keys($$props).forEach(key => {
|
||||
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<navbar-component> was created with unknown prop '${key}'`);
|
||||
});
|
||||
|
||||
function input_binding($$value) {
|
||||
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
||||
hambInput = $$value;
|
||||
$$invalidate(0, hambInput);
|
||||
});
|
||||
}
|
||||
|
||||
function header_binding($$value) {
|
||||
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
||||
navbar = $$value;
|
||||
$$invalidate(1, navbar);
|
||||
});
|
||||
}
|
||||
|
||||
$$self.$capture_state = () => ({ onMount, hambInput, navbar, changeNavbar });
|
||||
|
||||
$$self.$inject_state = $$props => {
|
||||
if ('hambInput' in $$props) $$invalidate(0, hambInput = $$props.hambInput);
|
||||
if ('navbar' in $$props) $$invalidate(1, navbar = $$props.navbar);
|
||||
};
|
||||
|
||||
if ($$props && "$$inject" in $$props) {
|
||||
$$self.$inject_state($$props.$$inject);
|
||||
}
|
||||
|
||||
return [hambInput, navbar, changeNavbar, input_binding, header_binding];
|
||||
}
|
||||
|
||||
class Navbar_component extends SvelteElement {
|
||||
constructor(options) {
|
||||
super();
|
||||
this.shadowRoot.innerHTML = `<style>@import '/css/common.css';@import '/css/navbar.css';</style>`;
|
||||
|
||||
init(
|
||||
this,
|
||||
{
|
||||
target: this.shadowRoot,
|
||||
props: attribute_to_object(this.attributes),
|
||||
customElement: true
|
||||
},
|
||||
instance,
|
||||
create_fragment,
|
||||
safe_not_equal,
|
||||
{},
|
||||
null
|
||||
);
|
||||
|
||||
if (options) {
|
||||
if (options.target) {
|
||||
insert_dev(options.target, this, options.anchor);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
customElements.define("navbar-component", Navbar_component);
|
||||
|
||||
export { Navbar_component as default };
|
||||
|
|
|
@ -1 +1,304 @@
|
|||
import{S as e,i,a,b as t,s as n,e as r,c as s,n as d,d as o,g as l,h as m,u as p,o as h,r as g}from"./index-95aedb1a.js";import{debounce as c}from"../../../../../../../../../js/libraries/miscTools.js";function f(e){let i,a,n,p,h,g,c,f,u,b;return{c(){i=r("div"),a=r("div"),n=r("div"),p=r("div"),p.innerHTML='<slot name="sidebar-left"></slot>',h=s(),g=r("div"),g.innerHTML='<slot name="sidebar-left2"></slot>',c=s(),f=r("div"),f.innerHTML='<slot name="sidebar-right"></slot>',u=s(),b=r("div"),b.innerHTML='<slot name="main" id="main-slot"></slot>',this.c=d,o(p,"id","sidebar-left"),o(p,"class","pane"),o(g,"id","sidebar-left2"),o(g,"class","pane"),o(n,"id","sidebars-left"),o(n,"class","sidebar"),o(f,"id","sidebar-right"),o(f,"class","pane sidebar"),o(b,"id","main-pane"),o(b,"class","pane"),o(a,"class","pane-container"),o(i,"id","root"),o(i,"class","pane-centering")},m(r,s){t(r,i,s),l(i,a),l(a,n),l(n,p),e[5](p),l(n,h),l(n,g),e[6](g),l(a,c),l(a,f),e[7](f),l(a,u),l(a,b),e[8](b),e[9](i)},p:d,i:d,o:d,d(a){a&&m(i),e[5](null),e[6](null),e[7](null),e[8](null),e[9](null)}}}function u(e,i,a){let t,n,r,s,d,o=null!=p("alignerParent")?p("alignerParent").switchView:void 0,l=!1,m=!1,f=!1;function u(){if(null!=t.parentNode){let e=t.parentNode.host.childNodes;if(0==e.length)setTimeout(u,50);else{let i=!1,n=t.parentNode.innerHTML;for(let a of e)"sidebar-left"!=a.slot||l?"sidebar-left2"!=a.slot||m?"sidebar-right"!=a.slot||f||(n=n.replace("#sidebar-right{display:none;","#sidebar-right{"),f=!0,i=!0):(n=n.replace("#sidebar-left2{display:none}",""),m=!0,i=!0):(n=n.replace("#sidebar-left{display:none}",""),l=!0,i=!0);null!=o&&(n=n.replace("1880px",o),i=!0),i&&a(0,t.parentNode.innerHTML=n,t)}}}return window.addEventListener("resize",c(u,100)),h((()=>{u()})),[t,n,r,s,d,function(e){g[e?"unshift":"push"]((()=>{r=e,a(2,r)}))},function(e){g[e?"unshift":"push"]((()=>{s=e,a(3,s)}))},function(e){g[e?"unshift":"push"]((()=>{d=e,a(4,d)}))},function(e){g[e?"unshift":"push"]((()=>{n=e,a(1,n)}))},function(e){g[e?"unshift":"push"]((()=>{t=e,a(0,t)}))}]}class b extends e{constructor(e){super(),this.shadowRoot.innerHTML="<style>@import '/css/common.css';.pane-container{display:block;margin-left:var(--total-margin-left,0rem)}#root{min-height:var(--min-height,auto)}#main-pane{position:relative;padding-left:var(--padding-left,0rem);padding-right:var(--padding-right,0rem);padding-top:var(--padding-top,0rem);padding-bottom:var(--padding-bottom,0rem);text-align:justify;background:var(--background,white);box-shadow:var(--box-shadow,0 0 0.314rem rgb(187, 187, 187));margin:auto;height:min-content;max-width:var(--width-main,66rem);width:var(--width-main,66rem);z-index:1;overflow-x:var(--overflow-x,hidden)}.sidebar{position:absolute}#sidebars-left{display:flex;flex-direction:column;gap:1rem;margin-left:calc(-1*var(--width-left,22.5rem) - 1rem - 4rem);width:calc(var(--width-left,22.5rem) + 4rem)}#sidebar-left,#sidebar-left2{position:relative;background-color:white;padding:2rem 2rem}#sidebar-left{display:none}#sidebar-left2{display:none}#sidebar-right{display:none;margin-left:calc(var(--width-main,66rem) + 1rem);width:var(--width-right,auto);background-color:white;padding:2rem 2rem}@media only screen and (max-width: 1880px){#main-pane{max-width:initial;width:100%;max-width:var(--width-main,66rem);padding-left:var(--padding-left-mobile,1.8rem);padding-right:var(--padding-right-mobile,1.8rem);padding-top:var(--padding-top-mobile,1.8rem);padding-bottom:var(--padding-bottom-mobile,1.8rem)}#sidebars-left,#sidebar-right{position:relative;margin:auto;margin-top:1rem;margin-bottom:1rem;max-width:var(--width-main,66rem);width:100%}.pane-container{width:95%;justify-items:center;grid-auto-flow:row;margin-left:0}}</style>",i(this,{target:this.shadowRoot,props:a(this.attributes),customElement:!0},u,f,n,{},null),e&&e.target&&t(e.target,this,e.anchor)}}customElements.define("pane-aligner",b);export{b as default};
|
||||
|
||||
(function(l, r) { if (!l || l.getElementById('livereloadscript')) return; r = l.createElement('script'); r.async = 1; r.src = '//' + (self.location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1'; r.id = 'livereloadscript'; l.getElementsByTagName('head')[0].appendChild(r) })(self.document);
|
||||
import { S as SvelteElement, i as init, a as attribute_to_object, b as insert_dev, s as safe_not_equal, d as dispatch_dev, c as validate_slots, z as getContext, o as onMount, A as setContext, e as element, f as space, n as noop, h as attr_dev, g as add_location, k as append_dev, l as detach_dev, u as binding_callbacks } from './index-3b678a7c.js';
|
||||
import { debounce } from '../../../../../../../../../js/libraries/miscTools.js';
|
||||
|
||||
/* src\components\pane-aligner.svelte generated by Svelte v3.52.0 */
|
||||
const file = "src\\components\\pane-aligner.svelte";
|
||||
|
||||
function create_fragment(ctx) {
|
||||
let div6;
|
||||
let div5;
|
||||
let div2;
|
||||
let div0;
|
||||
let slot0;
|
||||
let t0;
|
||||
let div1;
|
||||
let slot1;
|
||||
let t1;
|
||||
let div3;
|
||||
let slot2;
|
||||
let t2;
|
||||
let div4;
|
||||
let slot3;
|
||||
|
||||
const block = {
|
||||
c: function create() {
|
||||
div6 = element("div");
|
||||
div5 = element("div");
|
||||
div2 = element("div");
|
||||
div0 = element("div");
|
||||
slot0 = element("slot");
|
||||
t0 = space();
|
||||
div1 = element("div");
|
||||
slot1 = element("slot");
|
||||
t1 = space();
|
||||
div3 = element("div");
|
||||
slot2 = element("slot");
|
||||
t2 = space();
|
||||
div4 = element("div");
|
||||
slot3 = element("slot");
|
||||
this.c = noop;
|
||||
attr_dev(slot0, "name", "sidebar-left");
|
||||
add_location(slot0, file, 74, 16, 2567);
|
||||
attr_dev(div0, "id", "sidebar-left");
|
||||
attr_dev(div0, "class", "pane");
|
||||
add_location(div0, file, 73, 12, 2489);
|
||||
attr_dev(slot1, "name", "sidebar-left2");
|
||||
add_location(slot1, file, 77, 16, 2714);
|
||||
attr_dev(div1, "id", "sidebar-left2");
|
||||
attr_dev(div1, "class", "pane");
|
||||
add_location(div1, file, 76, 12, 2634);
|
||||
attr_dev(div2, "id", "sidebars-left");
|
||||
attr_dev(div2, "class", "sidebar");
|
||||
add_location(div2, file, 72, 8, 2435);
|
||||
attr_dev(slot2, "name", "sidebar-right");
|
||||
add_location(slot2, file, 81, 12, 2879);
|
||||
attr_dev(div3, "id", "sidebar-right");
|
||||
attr_dev(div3, "class", "pane sidebar");
|
||||
add_location(div3, file, 80, 8, 2794);
|
||||
attr_dev(slot3, "name", "main");
|
||||
attr_dev(slot3, "id", "main-slot");
|
||||
add_location(slot3, file, 84, 12, 3007);
|
||||
attr_dev(div4, "id", "main-pane");
|
||||
attr_dev(div4, "class", "pane");
|
||||
add_location(div4, file, 83, 8, 2939);
|
||||
attr_dev(div5, "class", "pane-container");
|
||||
add_location(div5, file, 71, 4, 2397);
|
||||
attr_dev(div6, "id", "root");
|
||||
attr_dev(div6, "class", "pane-centering");
|
||||
add_location(div6, file, 70, 0, 2336);
|
||||
},
|
||||
l: function claim(nodes) {
|
||||
throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
|
||||
},
|
||||
m: function mount(target, anchor) {
|
||||
insert_dev(target, div6, anchor);
|
||||
append_dev(div6, div5);
|
||||
append_dev(div5, div2);
|
||||
append_dev(div2, div0);
|
||||
append_dev(div0, slot0);
|
||||
/*div0_binding*/ ctx[5](div0);
|
||||
append_dev(div2, t0);
|
||||
append_dev(div2, div1);
|
||||
append_dev(div1, slot1);
|
||||
/*div1_binding*/ ctx[6](div1);
|
||||
append_dev(div5, t1);
|
||||
append_dev(div5, div3);
|
||||
append_dev(div3, slot2);
|
||||
/*div3_binding*/ ctx[7](div3);
|
||||
append_dev(div5, t2);
|
||||
append_dev(div5, div4);
|
||||
append_dev(div4, slot3);
|
||||
/*div4_binding*/ ctx[8](div4);
|
||||
/*div6_binding*/ ctx[9](div6);
|
||||
},
|
||||
p: noop,
|
||||
i: noop,
|
||||
o: noop,
|
||||
d: function destroy(detaching) {
|
||||
if (detaching) detach_dev(div6);
|
||||
/*div0_binding*/ ctx[5](null);
|
||||
/*div1_binding*/ ctx[6](null);
|
||||
/*div3_binding*/ ctx[7](null);
|
||||
/*div4_binding*/ ctx[8](null);
|
||||
/*div6_binding*/ ctx[9](null);
|
||||
}
|
||||
};
|
||||
|
||||
dispatch_dev("SvelteRegisterBlock", {
|
||||
block,
|
||||
id: create_fragment.name,
|
||||
type: "component",
|
||||
source: "",
|
||||
ctx
|
||||
});
|
||||
|
||||
return block;
|
||||
}
|
||||
|
||||
function instance($$self, $$props, $$invalidate) {
|
||||
let { $$slots: slots = {}, $$scope } = $$props;
|
||||
validate_slots('pane-aligner', slots, []);
|
||||
let root;
|
||||
let mainPane;
|
||||
let sidebarLeft;
|
||||
let sidebarLeft2;
|
||||
let sidebarRight;
|
||||
let parentProps = getContext("alignerParent");
|
||||
|
||||
let switchView = parentProps != undefined
|
||||
? getContext("alignerParent").switchView
|
||||
: undefined;
|
||||
|
||||
let leftReplaced = false;
|
||||
let left2Replaced = false;
|
||||
let rightReplaced = false;
|
||||
let switchViewReplaced = false;
|
||||
|
||||
function adjustSlotted() {
|
||||
if (root.parentNode != null) {
|
||||
let slotted = root.parentNode.host.childNodes;
|
||||
|
||||
if (slotted.length == 0) {
|
||||
setTimeout(adjustSlotted, 50);
|
||||
} else {
|
||||
let changed = false;
|
||||
let html = root.parentNode.innerHTML;
|
||||
|
||||
for (let item of slotted) {
|
||||
if (item.slot == "sidebar-left" && !leftReplaced) {
|
||||
html = html.replace("#sidebar-left{display:none}", "");
|
||||
leftReplaced = true;
|
||||
changed = true;
|
||||
} else if (item.slot == "sidebar-left2" && !left2Replaced) {
|
||||
html = html.replace("#sidebar-left2{display:none}", "");
|
||||
left2Replaced = true;
|
||||
changed = true;
|
||||
} else if (item.slot == "sidebar-right" && !rightReplaced) {
|
||||
html = html.replace("#sidebar-right{display:none;", "#sidebar-right{");
|
||||
rightReplaced = true;
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (switchView != undefined && !switchViewReplaced) {
|
||||
html = html.replace("1880px", switchView);
|
||||
changed = true;
|
||||
}
|
||||
|
||||
if (changed) {
|
||||
$$invalidate(0, root.parentNode.innerHTML = html, root);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
window.addEventListener("resize", debounce(adjustSlotted, 100));
|
||||
|
||||
onMount(() => {
|
||||
adjustSlotted();
|
||||
});
|
||||
|
||||
const writable_props = [];
|
||||
|
||||
Object.keys($$props).forEach(key => {
|
||||
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<pane-aligner> was created with unknown prop '${key}'`);
|
||||
});
|
||||
|
||||
function div0_binding($$value) {
|
||||
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
||||
sidebarLeft = $$value;
|
||||
$$invalidate(2, sidebarLeft);
|
||||
});
|
||||
}
|
||||
|
||||
function div1_binding($$value) {
|
||||
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
||||
sidebarLeft2 = $$value;
|
||||
$$invalidate(3, sidebarLeft2);
|
||||
});
|
||||
}
|
||||
|
||||
function div3_binding($$value) {
|
||||
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
||||
sidebarRight = $$value;
|
||||
$$invalidate(4, sidebarRight);
|
||||
});
|
||||
}
|
||||
|
||||
function div4_binding($$value) {
|
||||
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
||||
mainPane = $$value;
|
||||
$$invalidate(1, mainPane);
|
||||
});
|
||||
}
|
||||
|
||||
function div6_binding($$value) {
|
||||
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
||||
root = $$value;
|
||||
$$invalidate(0, root);
|
||||
});
|
||||
}
|
||||
|
||||
$$self.$capture_state = () => ({
|
||||
getContext,
|
||||
setContext,
|
||||
onMount,
|
||||
debounce,
|
||||
root,
|
||||
mainPane,
|
||||
sidebarLeft,
|
||||
sidebarLeft2,
|
||||
sidebarRight,
|
||||
parentProps,
|
||||
switchView,
|
||||
leftReplaced,
|
||||
left2Replaced,
|
||||
rightReplaced,
|
||||
switchViewReplaced,
|
||||
adjustSlotted
|
||||
});
|
||||
|
||||
$$self.$inject_state = $$props => {
|
||||
if ('root' in $$props) $$invalidate(0, root = $$props.root);
|
||||
if ('mainPane' in $$props) $$invalidate(1, mainPane = $$props.mainPane);
|
||||
if ('sidebarLeft' in $$props) $$invalidate(2, sidebarLeft = $$props.sidebarLeft);
|
||||
if ('sidebarLeft2' in $$props) $$invalidate(3, sidebarLeft2 = $$props.sidebarLeft2);
|
||||
if ('sidebarRight' in $$props) $$invalidate(4, sidebarRight = $$props.sidebarRight);
|
||||
if ('parentProps' in $$props) parentProps = $$props.parentProps;
|
||||
if ('switchView' in $$props) switchView = $$props.switchView;
|
||||
if ('leftReplaced' in $$props) leftReplaced = $$props.leftReplaced;
|
||||
if ('left2Replaced' in $$props) left2Replaced = $$props.left2Replaced;
|
||||
if ('rightReplaced' in $$props) rightReplaced = $$props.rightReplaced;
|
||||
if ('switchViewReplaced' in $$props) switchViewReplaced = $$props.switchViewReplaced;
|
||||
};
|
||||
|
||||
if ($$props && "$$inject" in $$props) {
|
||||
$$self.$inject_state($$props.$$inject);
|
||||
}
|
||||
|
||||
return [
|
||||
root,
|
||||
mainPane,
|
||||
sidebarLeft,
|
||||
sidebarLeft2,
|
||||
sidebarRight,
|
||||
div0_binding,
|
||||
div1_binding,
|
||||
div3_binding,
|
||||
div4_binding,
|
||||
div6_binding
|
||||
];
|
||||
}
|
||||
|
||||
class Pane_aligner extends SvelteElement {
|
||||
constructor(options) {
|
||||
super();
|
||||
this.shadowRoot.innerHTML = `<style>@import '/css/common.css';.pane-container{display:block;margin-left:var(--total-margin-left,0rem)}#root{min-height:var(--min-height,auto)}#main-pane{position:relative;padding-left:var(--padding-left,0rem);padding-right:var(--padding-right,0rem);padding-top:var(--padding-top,0rem);padding-bottom:var(--padding-bottom,0rem);text-align:justify;background:var(--background,white);box-shadow:var(--box-shadow,0 0 0.314rem rgb(187, 187, 187));margin:auto;height:min-content;max-width:var(--width-main,66rem);width:var(--width-main,66rem);z-index:1;overflow-x:var(--overflow-x,hidden)}.sidebar{position:absolute}#sidebars-left{display:flex;flex-direction:column;gap:1rem;margin-left:calc(-1*var(--width-left,22.5rem) - 1rem - 4rem);width:calc(var(--width-left,22.5rem) + 4rem)}#sidebar-left,#sidebar-left2{position:relative;background-color:white;padding:2rem 2rem}#sidebar-left{display:none}#sidebar-left2{display:none}#sidebar-right{display:none;margin-left:calc(var(--width-main,66rem) + 1rem);width:var(--width-right,auto);background-color:white;padding:2rem 2rem}@media only screen and (max-width: 1880px){#main-pane{max-width:initial;width:100%;max-width:var(--width-main,66rem);padding-left:var(--padding-left-mobile,1.8rem);padding-right:var(--padding-right-mobile,1.8rem);padding-top:var(--padding-top-mobile,1.8rem);padding-bottom:var(--padding-bottom-mobile,1.8rem)}#sidebars-left,#sidebar-right{position:relative;margin:auto;margin-top:1rem;margin-bottom:1rem;max-width:var(--width-main,66rem);width:100%}.pane-container{width:95%;justify-items:center;grid-auto-flow:row;margin-left:0}}</style>`;
|
||||
|
||||
init(
|
||||
this,
|
||||
{
|
||||
target: this.shadowRoot,
|
||||
props: attribute_to_object(this.attributes),
|
||||
customElement: true
|
||||
},
|
||||
instance,
|
||||
create_fragment,
|
||||
safe_not_equal,
|
||||
{},
|
||||
null
|
||||
);
|
||||
|
||||
if (options) {
|
||||
if (options.target) {
|
||||
insert_dev(options.target, this, options.anchor);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
customElements.define("pane-aligner", Pane_aligner);
|
||||
|
||||
export { Pane_aligner as default };
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1 +1,209 @@
|
|||
import{S as t,i as e,a as s,b as c,l as a,s as i,e as r,c as o,n as h,d as n,g as l,p as d,h as p,v as u,o as b}from"./index-95aedb1a.js";import"../../../../../../../../../js/libraries/miscTools.js";function k(t){let e,s,a,i,b,k;return{c(){e=r("label"),s=r("input"),a=o(),i=r("span"),this.c=h,n(s,"type","checkbox"),n(i,"class","switch-span"),n(e,"class","switch")},m(r,o){c(r,e,o),l(e,s),s.checked=t[0],l(e,a),l(e,i),b||(k=[d(s,"change",t[4]),d(s,"click",t[1])],b=!0)},p(t,[e]){1&e&&(s.checked=t[0])},i:h,o:h,d(t){t&&p(e),b=!1,u(k)}}}function g(t,e,s){let{callback:c=null}=e,{checked:a=!1}=e;const i=()=>{setTimeout((()=>{null!=c?(s(0,a=!a),c()):i()}),100)};return b((()=>{})),t.$$set=t=>{"callback"in t&&s(2,c=t.callback),"checked"in t&&s(0,a=t.checked)},[a,function(){null!=c&&(s(0,a=!a),c())},c,i,function(){a=this.checked,s(0,a)}]}class m extends t{constructor(t){super(),this.shadowRoot.innerHTML="<style>@import '/css/common.css';.switch span{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:.4s;transition:.4s;border-radius:calc(2* 1.2rem)}.switch span:before{position:absolute;content:\"\";height:calc(var(--height) - 0.5rem);width:calc(var(--height) - 0.5rem);left:calc(0.3rem);bottom:0.25rem;background-color:white;-webkit-transition:.4s;transition:.4s;border-radius:50%}.switch input:checked+.switch-span{background-color:var(--pink)}.switch input:hover+.switch-span{box-shadow:0 0 0 var(--pink)}.switch input:checked+.switch-span:before{-webkit-transform:translateX(calc(var(--width) - var(--height)/2 - 2*0.6rem));-ms-transform:translateX(calc(var(--width) - var(--height)/2 - 2*0.6rem));transform:translateX(calc(var(--width) - var(--height)/2 - 2*0.6rem))}.switch{position:relative;display:inline-block;width:var(--width);height:var(--height)}.switch input{position:absolute;width:var(--width);height:var(--height);opacity:0}</style>",e(this,{target:this.shadowRoot,props:s(this.attributes),customElement:!0},g,k,i,{callback:2,checked:0,toggle:3},null),t&&(t.target&&c(t.target,this,t.anchor),t.props&&(this.$set(t.props),a()))}static get observedAttributes(){return["callback","checked","toggle"]}get callback(){return this.$$.ctx[2]}set callback(t){this.$$set({callback:t}),a()}get checked(){return this.$$.ctx[0]}set checked(t){this.$$set({checked:t}),a()}get toggle(){return this.$$.ctx[3]}}customElements.define("switch-component",m);export{m as default};
|
||||
|
||||
(function(l, r) { if (!l || l.getElementById('livereloadscript')) return; r = l.createElement('script'); r.async = 1; r.src = '//' + (self.location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1'; r.id = 'livereloadscript'; l.getElementsByTagName('head')[0].appendChild(r) })(self.document);
|
||||
import { S as SvelteElement, i as init, a as attribute_to_object, b as insert_dev, q as flush, s as safe_not_equal, d as dispatch_dev, c as validate_slots, o as onMount, e as element, f as space, n as noop, h as attr_dev, g as add_location, k as append_dev, x as listen_dev, l as detach_dev, B as run_all } from './index-3b678a7c.js';
|
||||
import { px2rem, getTextWidth, getCanvasFont } from '../../../../../../../../../js/libraries/miscTools.js';
|
||||
|
||||
/* src\components\switch-component.svelte generated by Svelte v3.52.0 */
|
||||
const file = "src\\components\\switch-component.svelte";
|
||||
|
||||
function create_fragment(ctx) {
|
||||
let label;
|
||||
let input;
|
||||
let t;
|
||||
let span;
|
||||
let mounted;
|
||||
let dispose;
|
||||
|
||||
const block = {
|
||||
c: function create() {
|
||||
label = element("label");
|
||||
input = element("input");
|
||||
t = space();
|
||||
span = element("span");
|
||||
this.c = noop;
|
||||
attr_dev(input, "type", "checkbox");
|
||||
add_location(input, file, 39, 4, 804);
|
||||
attr_dev(span, "class", "switch-span");
|
||||
add_location(span, file, 40, 4, 880);
|
||||
attr_dev(label, "class", "switch");
|
||||
add_location(label, file, 38, 0, 776);
|
||||
},
|
||||
l: function claim(nodes) {
|
||||
throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
|
||||
},
|
||||
m: function mount(target, anchor) {
|
||||
insert_dev(target, label, anchor);
|
||||
append_dev(label, input);
|
||||
input.checked = /*checked*/ ctx[0];
|
||||
append_dev(label, t);
|
||||
append_dev(label, span);
|
||||
|
||||
if (!mounted) {
|
||||
dispose = [
|
||||
listen_dev(input, "change", /*input_change_handler*/ ctx[4]),
|
||||
listen_dev(input, "click", /*toggleClick*/ ctx[1], false, false, false)
|
||||
];
|
||||
|
||||
mounted = true;
|
||||
}
|
||||
},
|
||||
p: function update(ctx, [dirty]) {
|
||||
if (dirty & /*checked*/ 1) {
|
||||
input.checked = /*checked*/ ctx[0];
|
||||
}
|
||||
},
|
||||
i: noop,
|
||||
o: noop,
|
||||
d: function destroy(detaching) {
|
||||
if (detaching) detach_dev(label);
|
||||
mounted = false;
|
||||
run_all(dispose);
|
||||
}
|
||||
};
|
||||
|
||||
dispatch_dev("SvelteRegisterBlock", {
|
||||
block,
|
||||
id: create_fragment.name,
|
||||
type: "component",
|
||||
source: "",
|
||||
ctx
|
||||
});
|
||||
|
||||
return block;
|
||||
}
|
||||
|
||||
function instance($$self, $$props, $$invalidate) {
|
||||
let { $$slots: slots = {}, $$scope } = $$props;
|
||||
validate_slots('switch-component', slots, []);
|
||||
let { callback = null } = $$props;
|
||||
let { checked = false } = $$props;
|
||||
|
||||
const toggle = () => {
|
||||
let f = () => {
|
||||
if (callback != null) {
|
||||
$$invalidate(0, checked = !checked);
|
||||
callback();
|
||||
} else {
|
||||
toggle();
|
||||
}
|
||||
};
|
||||
|
||||
setTimeout(f, 100);
|
||||
};
|
||||
|
||||
function toggleClick() {
|
||||
if (callback != null) {
|
||||
$$invalidate(0, checked = !checked);
|
||||
callback();
|
||||
}
|
||||
}
|
||||
|
||||
// Main code
|
||||
onMount(() => {
|
||||
|
||||
});
|
||||
|
||||
const writable_props = ['callback', 'checked'];
|
||||
|
||||
Object.keys($$props).forEach(key => {
|
||||
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<switch-component> was created with unknown prop '${key}'`);
|
||||
});
|
||||
|
||||
function input_change_handler() {
|
||||
checked = this.checked;
|
||||
$$invalidate(0, checked);
|
||||
}
|
||||
|
||||
$$self.$$set = $$props => {
|
||||
if ('callback' in $$props) $$invalidate(2, callback = $$props.callback);
|
||||
if ('checked' in $$props) $$invalidate(0, checked = $$props.checked);
|
||||
};
|
||||
|
||||
$$self.$capture_state = () => ({
|
||||
onMount,
|
||||
px2rem,
|
||||
getTextWidth,
|
||||
getCanvasFont,
|
||||
callback,
|
||||
checked,
|
||||
toggle,
|
||||
toggleClick
|
||||
});
|
||||
|
||||
$$self.$inject_state = $$props => {
|
||||
if ('callback' in $$props) $$invalidate(2, callback = $$props.callback);
|
||||
if ('checked' in $$props) $$invalidate(0, checked = $$props.checked);
|
||||
};
|
||||
|
||||
if ($$props && "$$inject" in $$props) {
|
||||
$$self.$inject_state($$props.$$inject);
|
||||
}
|
||||
|
||||
return [checked, toggleClick, callback, toggle, input_change_handler];
|
||||
}
|
||||
|
||||
class Switch_component extends SvelteElement {
|
||||
constructor(options) {
|
||||
super();
|
||||
this.shadowRoot.innerHTML = `<style>@import '/css/common.css';.switch span{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:.4s;transition:.4s;border-radius:calc(2* 1.2rem)}.switch span:before{position:absolute;content:"";height:calc(var(--height) - 0.5rem);width:calc(var(--height) - 0.5rem);left:calc(0.3rem);bottom:0.25rem;background-color:white;-webkit-transition:.4s;transition:.4s;border-radius:50%}.switch input:checked+.switch-span{background-color:var(--pink)}.switch input:hover+.switch-span{box-shadow:0 0 0 var(--pink)}.switch input:checked+.switch-span:before{-webkit-transform:translateX(calc(var(--width) - var(--height)/2 - 2*0.6rem));-ms-transform:translateX(calc(var(--width) - var(--height)/2 - 2*0.6rem));transform:translateX(calc(var(--width) - var(--height)/2 - 2*0.6rem))}.switch{position:relative;display:inline-block;width:var(--width);height:var(--height)}.switch input{position:absolute;width:var(--width);height:var(--height);opacity:0}</style>`;
|
||||
|
||||
init(
|
||||
this,
|
||||
{
|
||||
target: this.shadowRoot,
|
||||
props: attribute_to_object(this.attributes),
|
||||
customElement: true
|
||||
},
|
||||
instance,
|
||||
create_fragment,
|
||||
safe_not_equal,
|
||||
{ callback: 2, checked: 0, toggle: 3 },
|
||||
null
|
||||
);
|
||||
|
||||
if (options) {
|
||||
if (options.target) {
|
||||
insert_dev(options.target, this, options.anchor);
|
||||
}
|
||||
|
||||
if (options.props) {
|
||||
this.$set(options.props);
|
||||
flush();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static get observedAttributes() {
|
||||
return ["callback", "checked", "toggle"];
|
||||
}
|
||||
|
||||
get callback() {
|
||||
return this.$$.ctx[2];
|
||||
}
|
||||
|
||||
set callback(callback) {
|
||||
this.$$set({ callback });
|
||||
flush();
|
||||
}
|
||||
|
||||
get checked() {
|
||||
return this.$$.ctx[0];
|
||||
}
|
||||
|
||||
set checked(checked) {
|
||||
this.$$set({ checked });
|
||||
flush();
|
||||
}
|
||||
|
||||
get toggle() {
|
||||
return this.$$.ctx[3];
|
||||
}
|
||||
|
||||
set toggle(value) {
|
||||
throw new Error("<switch-component>: Cannot set read-only property 'toggle'");
|
||||
}
|
||||
}
|
||||
|
||||
customElements.define("switch-component", Switch_component);
|
||||
|
||||
export { Switch_component as default };
|
||||
|
|
Loading…
Reference in New Issue