This commit is contained in:
a-ill 2023-06-24 16:44:16 +03:00
parent c2ed24a9b6
commit 875e5fb467
45 changed files with 5255 additions and 108 deletions

View File

@ -7,12 +7,12 @@ using Server.DatabaseSupport, Server.TemplateEditor
controller = "basic" controller = "basic"
dict_layouts = Dict( dict_layouts = Dict(
:landing => generate_layout_html("main",controller,"landing",css=["landing"]), :landing => generate_layout_html("main",controller,"landing",css=["landing"],libraries=["Leaflet"]),
:manifesto => generate_layout_html("main",controller,"manifesto"), :manifesto => generate_layout_html("main",controller,"manifesto"),
:join_us => generate_layout_html("main",controller,"join_us"), :join_us => generate_layout_html("main",controller,"join_us",libraries=["Leaflet"]),
:groups => generate_layout_html("main",controller,"groups"), :groups => generate_layout_html("main",controller,"groups",libraries=["Leaflet"]),
:cooperatives => generate_layout_html("main",controller,"cooperatives"), :cooperatives => generate_layout_html("main",controller,"cooperatives",libraries=["Leaflet"]),
:communities => generate_layout_html("main",controller,"communities"), :communities => generate_layout_html("main",controller,"communities",libraries=["Leaflet"]),
) )
#---General----------------------------------------------------- #---General-----------------------------------------------------

View File

@ -0,0 +1,39 @@
export let communities = [
{
location: ["Estonia, Kohtla-Järve",[59.409521829709504, 27.288415912535914]],
status: "forming",
members: 2,
contact: ["https://chat.whatsapp.com/BhnmUNljUxJ2AjeHUwyTKh","WhatsApp invite link"]
}
]
export function addMarkersCommunities(map) {
for (let g of communities) {
let coordinates
let text = ""
for (let field in g) {
let fieldText = field[0].toUpperCase() + field.slice(1) + ": "
if (field=="contact") {
text += fieldText + "<a href='" + g.contact[0] + "' target='_blank' rel=noreferrer>" + g.contact[1] + "</a>"
}
else if (field=="location") {
text += fieldText + g[field][0] + "<br>"
coordinates = g[field][1]
}
else {
text += fieldText + g[field] + "<br>"
}
}
var greenIcon = new L.Icon({
iconUrl: 'https://raw.githubusercontent.com/pointhi/leaflet-color-markers/master/img/marker-icon-2x-red.png',
shadowUrl: 'https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.7/images/marker-shadow.png',
iconSize: [25, 41],
iconAnchor: [12, 41],
popupAnchor: [1, -34],
shadowSize: [41, 41]
});
let marker = L.marker(coordinates, {icon: greenIcon})
marker.addTo(map).bindPopup(text)
}
}

View File

@ -0,0 +1,51 @@
export let coops = [
{
logo: "chiron_logo",
name: "Chiron Health",
location: ["Estonia, Kohtla-Järve",[59.40338782864918, 27.286240058760324]],
market: "wellness and health",
workers: 2,
status: "launch in 2 months",
website: "chrn.health",
contact: ["https://chat.whatsapp.com/BhnmUNljUxJ2AjeHUwyTKh","WhatsApp invite link"],
description: "Chiron Health is a health platform providing courses and services on the topics of nutrition, exercise, sleep and mental wellbeing.",
},
{
logo: "kuusk_logo",
name: "Kuusk",
location: ["Estonia, Kohtla-Järve",[59.405466538976185, 27.289104862336302]],
market: "herbal teas",
workers: 1,
status: "launch in TBD months",
website: "-",
contact: ["https://chat.whatsapp.com/BhnmUNljUxJ2AjeHUwyTKh","WhatsApp invite link"],
description: "Kuusk is an online store that sells herbal teas from exclusively local wild plants, as well as an online gathering course.",
}
]
export function addMarkersCoops(map) {
for (let g of coops) {
let coordinates
let text = ""
for (let field in g) {
let fieldText = "<b>" + field[0].toUpperCase() + field.slice(1) + ": " + "</b>"
if (field=="logo") {
text += "<picture><source srcset=" + "/img/coops/" + g.logo + ".webp><source srcset='/img/coops/" + g.logo + ".png'><img alt='logo' style='position: relative; max-height: 5rem; max-width: 100%; margin: auto;'></picture>" + "<br>"
}
else if (field=="contact") {
text += fieldText + "<a href='https://www." + g.contact[0] + "' target='_blank' rel=noreferrer>" + g.contact[1] + "</a>" + "<br>"
}
else if (field=="website") {
text += fieldText + "<a href='" + g.website + "' target='_blank' rel=noreferrer>" + g.website + "</a>" + "<br>"
}
else if (field=="location") {
text += fieldText + g[field][0] + "<br>"
coordinates = g[field][1]
}
else {
text += fieldText + g[field] + "<br>"
}
}
L.marker(coordinates).addTo(map).bindPopup(text)
}
}

View File

@ -0,0 +1,37 @@
export let groups = [
{
location: ["Estonia, Kohtla-Järve",[59.40629447076191, 27.280605339416322]],
members: 3,
contact: ["https://chat.whatsapp.com/BhnmUNljUxJ2AjeHUwyTKh","WhatsApp invite link"]
}
]
export function addMarkersGroups(map) {
for (let g of groups) {
let coordinates
let text = ""
for (let field in g) {
let fieldText = field[0].toUpperCase() + field.slice(1) + ": "
if (field=="contact") {
text += fieldText + "<a href='" + g.contact[0] + "' target='_blank' rel=noreferrer>" + g.contact[1] + "</a>"
}
else if (field=="location") {
text += fieldText + g[field][0] + "<br>"
coordinates = g[field][1]
}
else {
text += fieldText + g[field] + "<br>"
}
}
var greenIcon = new L.Icon({
iconUrl: 'https://raw.githubusercontent.com/pointhi/leaflet-color-markers/master/img/marker-icon-2x-green.png',
shadowUrl: 'https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.7/images/marker-shadow.png',
iconSize: [25, 41],
iconAnchor: [12, 41],
popupAnchor: [1, -34],
shadowSize: [41, 41]
});
let marker = L.marker(coordinates, {icon: greenIcon})
marker.addTo(map).bindPopup(text)
}
}

View File

@ -10,6 +10,7 @@ import watch from "rollup-plugin-watch";
const production = !process.env.ROLLUP_WATCH; const production = !process.env.ROLLUP_WATCH;
function serve() { function serve() {
let server; let server;

View File

@ -3,22 +3,99 @@
<script> <script>
// Import statements // Import statements
import { onMount } from 'svelte' import { onMount } from 'svelte'
import { communities, addMarkersCommunities } from '/js/communities.js'
// Import components // Import components
import "/js/components/map-component.js"
// Main code // Main code
function mapCallbackCommunities(createMap) {
let map = createMap([51.505, -0.09],3)
addMarkersCommunities(map)
}
onMount(() => { onMount(() => {
}) })
</script> </script>
<div id="container">
<!--<img src="img/crowd.png" id="crowd" alt="crowd">-->
<div id="text-container">
<h1>Communities</h1>
<p>We build 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 through 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.</p>
<h3>Our communities</h3>
<map-component id="map" callback={mapCallbackCommunities}></map-component>
<h4>Europe</h4>
{#each communities as community}
<div class="location-info">
<p><b>Location: </b>{community.location[0]}</p>
<p><b>Status: </b>{community.status}</p>
<p><b>Members: </b>{community.members}</p>
<p><b>Contact: </b><a href={community.contact[0]} target=;_blank; rel=noreferrer>{community.contact[1]}</a></p>
</div>
{/each}
</div>
</div>
<style> <style>
@import '/css/common.css'; @import '/css/common.css';
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> </style>

View File

@ -0,0 +1,43 @@
<svelte:options tag="map-component" />
<script>
// Import statements
import { onMount } from 'svelte'
// Import components
// Export statements
export let callback = null
// Main code
let mapContainer
function createMap(center,zoom) {
let map = L.map(mapContainer, {
center: center,
zoom: zoom
});
L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
}).addTo(map);
return map
}
onMount(() => {
callback(createMap)
})
</script>
<div bind:this={mapContainer} id="map"></div>
<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>

View File

@ -3,22 +3,131 @@
<script> <script>
// Import statements // Import statements
import { onMount } from 'svelte' import { onMount } from 'svelte'
import { coops, addMarkersCoops } from '/js/coops.js'
// Import components // Import components
import "/js/components/map-component.js"
// Main code // Main code
function mapCallbackCoops(createMap) {
let map = createMap([51.505, -0.09],3)
addMarkersCoops(map)
}
onMount(() => { onMount(() => {
}) })
</script> </script>
<div id="container">
<!--<img src="img/crowd.png" id="crowd" alt="crowd">-->
<div id="text-container">
<h1>Cooperatives</h1>
<p>We create worker cooperatives that embody a transformative business model in which the workers themselves own and democratically control the enterprise. In these cooperatives, each employee has a say in decision-making, and profits are shared based on individual contributions. This participatory structure fosters a sense of ownership, motivation, and job satisfaction among workers, resulting in a more fulfilling and empowering work experience. Moreover, worker cooperatives promote economic equity by distributing profits more equitably among all workers, challenging the concentration of wealth seen in traditional capitalist enterprises.</p>
<p>Worker cooperatives prioritize the well-being of their workers, striving for fair wages, safe working conditions, and a healthy work-life balance. By placing the needs of workers at the forefront, these cooperatives create supportive and sustainable work environments that promote social cohesion and job security. Furthermore, worker cooperatives adopt long-term perspectives and prioritize the interests of their local communities. With decision-making power vested in the workers themselves, cooperatives are less inclined to pursue short-term profit-maximization strategies that harm workers and communities. Instead, they reinvest their profits locally, contributing to the development and resilience of their communities.</p>
<h3>Our cooperatives</h3>
<map-component id="map" callback={mapCallbackCoops}></map-component>
<h4>Europe</h4>
{#each coops as coop}
<div class="location-info">
<div>
<div>
<p><b>Name: </b>{coop.name}</p>
<p><b>Location: </b>{coop.lcoation}</p>
<p><b>Market: </b>{coop.market}</p>
<p><b>Workers: </b>{coop.workers}</p>
<p><b>Status: </b>{coop.status}</p>
<p><b>Website: </b><a href={"https://www."+coop.website} target="_blank" rel=noreferrer>{coop.website}</a></p>
<p><b>Contact: </b><a href={coop.contact[0]} target=;_blank; rel=noreferrer>{coop.contact[1]}</a></p>
</div>
<picture>
<source srcset={"/img/coops/"+coop.logo+".webp"}>
<source srcset={"/img/coops/"+coop.logo+".png"}>
<img class="coop-logo" alt="logo">
</picture>
</div>
<p><b>Description: </b>{coop.description}</p>
</div>
{/each}
</div>
</div>
<style> <style>
@import '/css/common.css'; @import '/css/common.css';
.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> </style>

View File

@ -16,7 +16,7 @@
<div id="contact-us-container"> <div id="contact-us-container">
<h2>CONTACT US</h2> <h2>CONTACT US</h2>
<!--<p>Email: <a href="mailto:info@chiron.com">info@libsoc.org</a></p>--> <!--<p>Email: <a href="mailto:info@chiron.com">info@libsoc.org</a></p>-->
<p>WhatsApp: <a href="https://chat.whatsapp.com/BhnmUNljUxJ2AjeHUwyTKh" target="_blank">group invite link</a></p> <p>WhatsApp: <a href="https://chat.whatsapp.com/BhnmUNljUxJ2AjeHUwyTKh" target="_blank" rel=noreferrer>group invite link</a></p>
</div> </div>
</div> </div>
<button on:click={() => {location.href='#'}} id="footer-up" aria-label="go up"> <button on:click={() => {location.href='#'}} id="footer-up" aria-label="go up">

View File

@ -3,22 +3,91 @@
<script> <script>
// Import statements // Import statements
import { onMount } from 'svelte' import { onMount } from 'svelte'
import { groups, addMarkersGroups } from '/js/groups.js'
// Import components // Import components
import "/js/components/map-component.js"
// Main code // Main code
export function mapCallbackGroups(createMap) {
let map = createMap([51.505, -0.09],3)
addMarkersGroups(map)
}
onMount(() => { onMount(() => {
}) })
</script> </script>
<div id="container">
<!--<img src="img/crowd.png" id="crowd" alt="crowd">-->
<div id="text-container">
<h1>Groups</h1>
<p>We try to raise awareness among individuals about the detrimental impact of the current politico-economic systems on our collective well-being. Through educational initiatives, community engagement, and critical analysis, we strive to illuminate the structural flaws and inherent inequalities that permeate capitalist societies. By shedding light on these systemic issues, we empower people to question the status quo and envision alternative paths towards a more just and sustainable future.</p>
<p>However, our mission extends beyond theoretical exploration and ideological discourse. We firmly believe in the power of mutual aid and collective action to alleviate the immediate challenges and hardships faced within a capitalist framework. Through the practice of mutual aid, we actively support one another by sharing resources, knowledge, and skills, thereby fostering a sense of solidarity and resilience. Whether it's organizing community gardens, establishing local food cooperatives, or providing mutual support networks, our aim is to make life under capitalism more bearable and to cultivate pockets of resistance and alternatives within the existing system.</p>
<h3>Our groups</h3>
<map-component id="map" callback={mapCallbackGroups}></map-component>
<h4>Europe</h4>
{#each groups as group}
<div class="location-info">
<p><b>Location: </b>{group.location[0]}</p>
<p><b>Members: </b>{group.members}</p>
<p><b>Contact: </b><a href={group.contact[0]} target=;_blank; rel=noreferrer>{group.contact[1]}</a></p>
</div>
{/each}
</div>
</div>
<style> <style>
@import '/css/common.css'; @import '/css/common.css';
h4 {
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> </style>

View File

@ -3,22 +3,129 @@
<script> <script>
// Import statements // Import statements
import { onMount } from 'svelte' import { onMount } from 'svelte'
import { addMarkersGroups } from '/js/groups.js'
import { addMarkersCoops } from '/js/coops.js'
import { addMarkersCommunities } from '/js/communities.js'
// Import components // Import components
// Main code // Main code
// Import components
import "/js/components/map-component.js"
// Main code
export function mapCallback(createMap) {
let map = createMap([51.505, -0.09],3)
addMarkersGroups(map)
addMarkersCoops(map)
addMarkersCommunities(map)
}
onMount(() => { onMount(() => {
}) })
</script> </script>
Are you against exploitation of one human being by another?
Do you agree that we should cooperate and not compete with each other?
In that case, you are already a libertarian socialist. Join us
FInd our group, community or cooperative near you and join in order to make a world we both envision a reality.
None of them near you? Not a problem! Join our WhatsApp group and we will help you get started.
<div id="container">
<!--<img src="img/crowd.png" id="crowd" alt="crowd">-->
<div id="text-container">
<h1>Join us</h1>
<div id="condition-list">
<p>1. Are you against dictatorship and in favor of democracy?</p>
<p>2. Are you against exploitation of one human being by another?</p>
<p>3. Do you agree that we should cooperate and not compete with each other?</p>
<p>If the answer is <b>YES</b>, then you are already a libertarian socialist. <b>JOIN US!</b></p>
</div>
<div id="call-to-action-list">
<p>Find our</p>
<ol>
<li><a href="https://chat.whatsapp.com/BhnmUNljUxJ2AjeHUwyTKh">group</a>,</li>
<li><a href="https://chat.whatsapp.com/BhnmUNljUxJ2AjeHUwyTKh">community</a> or</li>
<li><a href="https://chat.whatsapp.com/BhnmUNljUxJ2AjeHUwyTKh">cooperative</a></li>
</ol>
<p>near you and join to help make a world we both envision a reality.</p>
</div>
<p>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.</p>
<map-component id="map" callback={mapCallback}></map-component>
</div>
</div>
<style> <style>
@import '/css/common.css'; @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
}
#container p {
font-size: 1.2rem;
text-align: justify;
}
</style> </style>

View File

@ -15,26 +15,71 @@
}) })
</script> </script>
<!--
<div id="who-we-are"> <div id="container">
<p>WHO WE ARE GOES HERE</p> <picture>
<source srcset="/img/crowd.webp">
<source srcset="/img/crowd.png">
<img id="crowd" alt="crowd">
</picture>
<div id="text-container">
<p>We are people united around a single cause of bringing down authoritarian exploitative systems represented by different forms of capitalism and replacing them with libertarian socialist systems to create a more equitable and democratic world.</p>
<div id="container-grid">
<div>
<p>GROUPS: We organize into groups for education, advocacy and mutual aid. We aim to show people how the current politico-economic systems negatively affect our wellbeing, show them the alternatives, and engage in mutual aid to make our life under capitalism easier.</p>
</div> </div>
--> <div>
<p>COMMUNITIES: We build communities according to libertarian socialist principles where people own their land, their houses, the means of production and use direct democracy to make decisions. We are growing our socialist world one community at a time.</p>
</div>
<div>
<p>COOPERATIVES: We create worker cooperatives in order to finance the functioning of our groups and communities. Economic power determines political power, therefore, establishing cooperatives is one of the first steps towards achieving socialism by providing democratic workplaces for workers instead of authoritarian capitalist businesses.</p>
</div>
</div>
</div>
</div>
<style> <style>
@import '/css/common.css'; @import '/css/common.css';
#who-we-are { #text-container {
max-width: calc(100vw - 4rem);
margin: auto;
}
#crowd {
width: 100%;
margin-bottom: 2rem;
}
#container {
margin: auto; margin: auto;
background-color: rgb(194, 194, 194);
max-width: 1200px; max-width: 1200px;
height: 10rem; margin-top: 2rem;
margin-bottom: 5rem;
} }
#who-we-are p { #container>div>p {
margin-bottom: 2rem;
}
#container p {
font-size: 1.2rem; font-size: 1.2rem;
text-align: center; text-align: justify;
} }
#container-grid {
display: grid;
grid-template-columns: 1fr 1fr 1.3fr;
grid-gap: 3rem;
}
@media only screen and (max-width: 1000px) {
#container-grid {
display: grid;
grid-template-columns: 1fr;
grid-gap: 2rem;
}
}
</style> </style>

View File

@ -3,23 +3,124 @@
<script> <script>
// Import statements // Import statements
import { onMount } from 'svelte' import { onMount } from 'svelte'
import { getData } from "/js/libraries/serverTools.js"
// Import components // Import components
// Main code // Main code
let manifesto = []
let key
const htmlDelims = ["ul","ol"]
getData("/assets/manifesto.txt",function(response) {
let splitText = response.split(/\r?\n/)
for (let j=0;j<splitText.length;j++) {
let line = splitText[j]
let delimInd = htmlDelims.map((x) => line.includes("<"+x+">")).findIndex((x) => x)
if (delimInd!=-1) {
let delim = htmlDelims[delimInd]
let obj = {}
obj[delim] = []
let delimEndTag = "</"+delim+">"
while (true) {
j += 1
line = splitText[j]
if (line.includes(delimEndTag)) {
manifesto.push(obj)
break
}
else {
obj[delim].push(line)
}
}
}
else {
manifesto.push(line)
}
}
key += 1
})
onMount(() => { onMount(() => {
}) })
</script> </script>
<div id="container">
<div id="text-container">
{#key key}
{#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 line.slice(0,3)=="###"}
<h3>{@html line.slice(4,line.length)}</h3>
{:else if line.slice(0,2)=="##"}
<h2>{@html line.slice(3,line.length)}</h2>
{:else if line[0]=="#"}
<h1>{@html line.slice(2,line.length)}</h1>
{:else}
<p class="margin-end">
{@html line}
</p>
{/if}
{/if}
{/each}
{/key}
</div>
</div>
<style> <style>
@import '/css/common.css'; @import '/css/common.css';
h1 {
margin-bottom: 1rem;
font-size: 2.5rem;
text-align: center;
}
h2 {
margin-bottom: 1rem;
text-align: center;
}
h3 {
margin-bottom: 1rem;
}
#text-container {
max-width: calc(100vw - 4rem);
margin: auto;
}
#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> </style>

View File

@ -12,7 +12,7 @@
function changeNavbar() { function changeNavbar() {
if (hambInput.checked) { if (hambInput.checked) {
navbar.style.background = "white" navbar.style.background = "white"
navbar.style.boxShadow = "0 0 0.314rem rgb(187, 187, 187)" //navbar.style.boxShadow = "0 0 0.314rem rgb(187, 187, 187)"
} }
else { else {
setTimeout(()=> { setTimeout(()=> {

View File

@ -8,6 +8,8 @@ export generate_layout_html
dict_libraries = Dict( dict_libraries = Dict(
"ECharts" => "<script src='https://cdn.jsdelivr.net/npm/echarts@5.3.2/dist/echarts.js'></script>", "ECharts" => "<script src='https://cdn.jsdelivr.net/npm/echarts@5.3.2/dist/echarts.js'></script>",
"GSAP" => "<script src='https://cdnjs.cloudflare.com/ajax/libs/gsap/3.11.0/gsap.min.js'></script>", "GSAP" => "<script src='https://cdnjs.cloudflare.com/ajax/libs/gsap/3.11.0/gsap.min.js'></script>",
"Leaflet" => "<link rel='stylesheet' href='https://unpkg.com/leaflet@1.9.4/dist/leaflet.css' integrity='sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY=' crossorigin='' />
<script src='https://unpkg.com/leaflet@1.9.4/dist/leaflet.js' integrity='sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo=' crossorigin=''></script>"
) )
function register_components() function register_components()

View File

@ -0,0 +1,100 @@
# On Capitalism and Liberal Democracy<br>Is There a Better Way?
## Capitalism
### Central Tenets
We, the workers, bear the weight of capitalism's flawed central tenets. This economic system, touted as a beacon of freedom and opportunity, reveals its true colors upon closer examination.
<b>Private Ownership of the Means of Production:</b> Our collective labor powers the wheels of production, yet the means of production—land, factories, and machinery—remain in the hands of a privileged few. This concentration of ownership creates an insidious power imbalance, where decisions affecting our lives are made by those who prioritize their own interests. The consequences ripple through society, as wealth and resources flow to the privileged few rather than being shared for the well-being of all.
<b>Exploitation of Labor:</b> We, the workers, toil day in and day out, driven by the need to survive. However, under capitalism's rule, our labor is undervalued. The capitalist class profits by extracting the surplus value we create, leaving us with meager compensation for our efforts. This exploitation deepens economic disparities and disconnects us from the fruits of our labor, as we are relegated to mere cogs in the capitalist machine.
<b>The Pursuit of Profit:</b> In the capitalist framework, profit reigns supreme. Our well-being, the health of our communities, and the environment take a backseat to the relentless pursuit of wealth accumulation. Wages are suppressed, working conditions deteriorate, and natural resources are depleted without regard for sustainability whenever possible.
<b>Competition:</b> Capitalism champions competition as a catalyst for progress and innovation. Yet, in practice, this competition often results in monopolistic power and the suppression of small businesses. We witness the consolidation of market control in the hands of a few dominant corporations, while barriers obstruct our entrepreneurial aspirations. The relentless drive to outdo one another only serves to undermine our collective well-being. Moreover, a culture of cutthroat competition erodes our sense of empathy and solidarity.
<b>Market Forces:</b> The invisible hand of market forces, often heralded as a fair and efficient mechanism, perpetuates inherent inequalities within the capitalist structure. The distribution of goods and services is dictated by supply and demand, favoring those with economic power while leaving many struggling to meet their basic needs. The resulting disparities in wealth, opportunities, and access to essential resources further entrench social divisions, eroding the notion of equal chances for all.
Just as a house needs a solid foundation to stand strong, any system that governs our lives requires a sturdy base to support its structure. Unfortunately, capitalism, with its core tenets of private ownership, labor exploitation, profit-driven motives, competition, and market forces, is built upon an inherently flawed foundation. This foundation contributes to power imbalances, economic exploitation, a compromised collective well-being, and a disconnection from meaningful work. It is clear that without addressing these foundational flaws, the system itself will always fall short in providing a just and equitable society.
### The Price We Pay
Within the intricate web of capitalism, hidden costs silently burden us, impacting our personal well-being. Let us expose the adverse effects of capitalist values and practices on us as individuals and our communities. By shining a light on these hidden costs, we aim to unravel the systemic issues ingrained within capitalism that contribute to our personal struggles and the challenges we face together.
<b>Alienation from Labor:</b> In the pursuit of profit and competition, capitalism severs our innate human connection to meaningful work, leaving us with a sense of detachment and alienation. As profit becomes the ultimate goal, we often find ourselves reduced to mere cogs in the economic machinery. This estrangement from our labor chips away at our sense of purpose and fulfillment, leaving us adrift in a sea of disconnection.
<b>Stolen Labor:</b> At the heart of capitalism lies the appropriation of our labor. By paying us wages that fail to match the value we create, capitalism extracts surplus labor from us, the working class. This exploitation perpetuates economic inequality, as we are deprived of our rightful share of the fruits of our labor. The resulting wealth gap breeds feelings of powerlessness and injustice, further deepening the divide between the haves and the have-nots.
<b>Social Fragmentation:</b> Capitalism's foundation in the relentless pursuit of individual gain often undermines the bonds of genuine social cohesion and cooperation among us. The competitive mindset fostered by capitalism places self-interest above collective well-being, fracturing the fabric of our society. In this hyper-competitive landscape, our social connections strain, empathy diminishes, and our communities become fragmented. Solidarity takes a backseat as everyone vies for their own piece of the pie.
<b>Consumerism and Materialism:</b> Within the capitalist realm, a culture of consumerism and materialism thrives, equating personal worth with the accumulation of material possessions. This relentless pursuit of material goods often leads us into excessive debt, strains our relationships, and leaves us with a hollow sense of fulfillment. The fixation on material wealth eclipses the pursuit of meaningful experiences, personal growth, and our genuine well-being, trapping us in a never-ending cycle of acquisition.
<b>Environmental Degradation:</b> Capitalism's insatiable hunger for profit frequently disregards the long-term health of our planet. Short-term economic gains take precedence over environmental sustainability. Capitalist practices contribute to resource depletion, pollution, and climate change, compromising the very foundations of our ecological well-being. These adverse environmental impacts reverberate through our communities, affecting our physical and mental well-being.
In conclusion, capitalism has a profound negative impact on our personal well-being. The values and practices entrenched within capitalism extend far beyond economic considerations, permeating every facet of our lives.
## Liberal Democracy
### The Illusion of Participation
Within the realm of democracy, we find ourselves grappling with the deceptive veil that obscures true participation. Let us explore how constrained choices, disconnectedness, and manipulation erode the foundational principles of democracy, leaving us disillusioned and detached from the political process.
<b>Disconnectedness:</b> A prevailing sense of disengagement pervades us, resulting in low voter turnout and a waning sense of ownership over decisions that profoundly shape our lives. Disillusionment with politics, skepticism towards the efficacy of electoral systems, and a lack of trust in political institutions contribute to this disconnection. When we feel alienated from the decision-making process, our voices remain unheard, and our concerns are brushed aside, dampening the democratic spirit.
<b>Manipulation:</b> Parties cunningly employ deceptive tactics, wielding misleading campaign promises and sensationalist rhetoric to sway us in their favor. Our choices are molded by calculated maneuvers, distorting our ability to make informed decisions.
<b>Low Political Literacy:</b> A prevailing lack of political literacy plagues our populace, with many voters lacking the necessary knowledge and understanding of political systems, policies, and the consequences of their choices. Without a solid grasp of the issues at hand, we unwittingly support candidates who may not genuinely uphold our interests, compromising the very essence of democracy.
<b>Constrained Choices:</b> While periodic elections punctuate our liberal democratic systems, the range of choices available to us is often woefully limited. Established political parties preselect candidates, narrowing the spectrum of options for voters. This constrained selection stifles the representation of diverse perspectives and interests, undercutting the principles of inclusivity and robust representation that lie at the heart of democracy.
In the realm of capitalism's democratic systems, these constraints—constrained choices, disconnectedness, and manipulation—foster an illusion of participation, obscuring the true essence of democracy. This systemic inefficiency deepens political inequality and undermines the very foundations upon which democracy thrives—active participation and the unfettered representation of all citizens.
### Imbalance of Power
Within the confines of representative democracy under capitalism, a profound power imbalance emerges, with the capitalist class exerting their dominion through an array of influential mechanisms. Let us expose the ways in which capitalist dominance shapes policy outcomes, perpetuating inequality within our democratic systems.
<b>Lobbying Power:</b> The capitalist class, armed with their vast financial resources and influential networks, maintains privileged access to policymakers and decision-making processes. This lopsided access perpetuates a systemic power imbalance, paving the way for policies that predominantly serve the interests of the wealthy elite. The principles of equal representation and genuine democratic participation crumble beneath the weight of this unequal access.
<b>Media Influence and Capitalist Control:</b> The capitalist class skillfully wields considerable control or influence over media outlets, effectively shaping public opinion and manipulating the political discourse to suit their agendas. This tight grip on media channels reinforces the dominance of capitalists within the democratic landscape, solidifying their power and stifling the presentation of diverse ideas and perspectives to the public.
<b>Economic Coercion:</b> Capitalists possess the ability to exert economic coercion, leveraging their influence to issue threats of relocating businesses or implementing measures that could precipitate an economic downturn. The mere specter of potential economic repercussions casts a chilling effect, prompting policymakers to shape policies that appease the capitalist class, even if it means compromising the well-being and interests of ordinary citizens.
In conclusion, the capitalist class brandishes their significant resources, forging a potent arsenal of lobbying power, media control, and economic coercion. These mechanisms of influence perpetuate inequality and mold policy outcomes in favor of the capitalist class, dealing a blow to the principles of equal representation and the collective well-being of the broader public.
## Marxism
### An Analytical Tool
In our exploration of capitalism's flaws, we turn to Marxism as a powerful analytical tool. By delving into the core tenets of Marxism, we can unravel the systemic inequalities and flaws embedded within capitalism.
Marxism, forged by the minds of Karl Marx and Friedrich Engels, is a socio-political theory that lays bare the exploitative nature of capitalism and advocates for a more just and equitable society. At its essence, Marxism seeks to dissect the relationships between the bourgeoisie (capitalist class) and the proletariat (working class), unearthing the unequal distribution of wealth and power perpetuated by capitalism.
From a Marxist standpoint, the consequences of capitalism that we have examined come into focus. The exploitation of labor, a central feature of capitalism, manifests as workers are compelled to exchange their labor power for wages that fail to reflect the value they generate. This exploitation serves as the bedrock for the capitalist class to amass wealth, leaving workers with meager compensation and a disconnection from the fruits of their labor.
Moreover, Marxism illuminates how capitalism's relentless pursuit of individual gain corrodes social cohesion and cooperation, fracturing society and prioritizing competition over collective well-being. The culture of consumerism and materialism nurtured by capitalism, where personal worth hinges on material possessions, is another facet laid bare by Marxism. Additionally, Marxism unveils how capitalism's profit-centric focus often sacrifices long-term environmental sustainability for short-term economic gains.
Marxism acknowledges that the relationships between individuals are shaped by the material circumstances in which they exist. It recognizes that the exploitation perpetrated by the capitalist class is not solely the fault of individual capitalists, but rather a consequence of the systemic material conditions intrinsic to capitalism. Capitalists are compelled by the system itself to exploit labor and extract resources to maintain their position within the capitalist framework.
By adopting a Marxist lens to scrutinize capitalism, we gain insight into the interconnected issues of labor exploitation, social fragmentation, consumerism, and environmental degradation that arise from the capitalist mode of production. This understanding empowers us to question and challenge the inequalities and injustices perpetuated by capitalism, as we strive towards a more equitable and inclusive future.
### Exploitation and Class Struggle
We will delve into the core Marxist concepts of exploitation and class struggle, shedding light on how these dynamics underpin the capitalist system. By understanding the labor theory of value and the concept of class struggle, we gain insights into the exploitative nature of capitalism and the power dynamics that perpetuate inequality.
<b>The Labor Theory of Value:</b> Labor is the primary source of value in a society. The value of a commodity, whether it's a physical product or a service, is derived from the amount of socially necessary labor time required for its production. In simpler terms, the value of a good or service is determined by the collective effort and time invested by workers in its creation.
In a capitalist system, workers exchange their labor for wages, which they rely on to meet their basic needs and sustain themselves. However, under capitalism, workers find themselves in a situation where their wages do not reflect the true value they contribute through their labor. In other words, the compensation they receive is less than the actual value they create. The surplus value generated by the workers' labor, the value that exceeds their wages, is appropriated by the capitalist class as profit. This extraction of surplus value serves as a fundamental mechanism through which capitalists accumulate wealth and power, contributing to economic inequality.
<b>Class Struggle and Power Dynamics:</b> In a capitalist system, society is divided into two main classes: the bourgeoisie and the proletariat. The bourgeoisie refers to the capitalist class, which consists of wealthy individuals who own and control the means of production, such as factories, land, and resources. Their primary motive is the pursuit of profit and the preservation of their wealth and influence. On the other hand, the proletariat refers to the working class, who must sell their labor to the bourgeoisie in order to earn a living and support themselves and their families.
The class struggle arises from the fundamental clash of interests between these two classes. The bourgeoisie seeks to maximize their profits by keeping wages low, minimizing costs, and exploiting the labor of the proletariat. They aim to maintain and increase their wealth and power at the expense of the working class. On the contrary, the proletariat, being dependent on selling their labor to survive, strive to improve their working conditions, secure higher wages, and claim a larger share of the value they create through their labor. This class struggle manifests in various forms, such as labor strikes, protests, and organized movements advocating for workers' rights.
The power dynamics between the bourgeoisie and the proletariat shape social relations within capitalist societies. The capitalist class possesses significant economic resources, influence, and control over key institutions, which they use to maintain their dominance and perpetuate their interests. This concentration of power often results in policies and systems that favor the capitalist class and contribute to wealth inequality and social divisions.
## Libertarian Socialism
### Core Principles
Libertarian socialism stands as a political and economic philosophy that offers an alternative to traditional capitalist and authoritarian socialist systems. Marxist analysis and opposition to hierarchies lie at its heart.
Libertarian socialism is built on the three following principles:
<b>Decentralization of Power:</b> We aim to dismantle centralized power structures and distribute decision-making authority to the local level, ensuring that our communities have the autonomy to govern themselves. We advocate for the active participation of each of us in the political process giving us a direct say in decision-making and policies that affect our lives.
<b>Socialist Mode of Production:</b> We strive for economic justice by challenging the concentration of wealth and power in the hands of a few enabled by the capitalist systems. We strive for socialism - a system where the means of production belong to the workers.
<b>Mutual Aid:</b> We recognize the inherent value of community and aim to foster relationships based on mutual assistance and care. Through mutual aid, we and our communities come together to meet our shared needs, whether it's through providing food, shelter, healthcare, education, or other essential resources.
### Decentralization of Power and Direct Democracy
Decentralization aims to dismantle centralized power structures and empower local communities to govern themselves autonomously, while direct democracy emphasizes the active involvement of individuals in decision-making, bypassing intermediary representatives. Both of these allow us to directly participate in shaping policies, laws, and the allocation of resources best suited for each community.
Decentralization of power based on direct democracy provides us with the following benefits:
<b>Empowerment and Ownership:</b> Direct participation instills a sense of ownership and empowerment in us. It enhances our understanding of civic responsibilities and the impact they can have on shaping our communities, fostering a stronger sense of civic duty and community cohesion.
<b>Conflict Resolution:</b> Direct democracy provides a platform for open dialogue, consensus building, and peaceful resolution of conflicts. It encourages the exchange of ideas, compromise, and negotiation, leading to decisions that enjoy broader support and minimize social divisions.
<b>Strengthened Social Cohesion:</b> Decentralization and direct democracy promote a sense of community and shared responsibility. They encourage us to come together, engage in constructive dialogue, and work collaboratively to address common challenges, fostering social cohesion and unity.
<b>Responsive Decision-Making:</b> By distributing power to the local level, decentralization leads to more responsive governance, as we, the decision-makers, are directly influenced by the consequences of our actions.
<b>Protection Against Authoritarianism:</b> Distributing power and decision-making authority prevents the concentration of power in the hands of a few individuals or institutions serving as a safeguard against authoritarianism.
In conclusion, the combination of decentralization of power and direct democracy offers numerous advantages for us. It enhances participation, empowers us, promotes responsive decision-making, facilitates conflict resolution, strengthens social cohesion, and acts as a safeguard against authoritarianism. By embracing these principles, we can foster a system that takes into account the needs and interests of all citizens.
### Socialist Mode of Production
We, as socialists, advocate for an alternative mode of production where the means of production, such as factories, land, and machinery, are owned and controlled by the workers themselves. The goal is to ensure that we, the workers, have a direct stake in our labor and a say in the decisions that affect their lives and the communities in which we live.
<b>Empowering Workers:</b> Under socialism, we become active participants in the economic process. We have a voice in determining working conditions, wages, and the distribution of resources. Socialism seeks to eliminate the exploitative relationship between capitalists and workers. This empowers us to be in control of our work and to contribute to the collective well-being of society.
<b>Challenging Exploitation:</b> In a socialist system, the surplus value created through our labor is not siphoned off by a capitalist class, but rather reinvested or distributed for the benefit of all workers. This shift challenges the inherent power imbalance and ensures that the fruits of labor are shared equitably.
<b>Collective Solidarity:</b> Socialism emphasizes the importance of collective solidarity and cooperation. By replacing competition with collaboration, socialism encourages us to come together, share knowledge, and collectively address challenges. This sense of solidarity fosters a sense of belonging and collective purpose, cultivating a more supportive and harmonious work environment.
In conclusion, socialism offers a vision of economic organization that aims to empower us, challenge exploitation, and promote collective solidarity. Through emphasis on cooperation and shared prosperity, socialism offers an alternative framework that seeks to address the systemic issues and inequalities inherent in capitalist economies.
### Mutual Aid
Mutual aid is a fundamental principle of socialist thought and practice. It emphasizes the power of collective action and cooperation in meeting our needs. In a socialist society, mutual aid becomes a cornerstone of social relationships, where we come together to provide support, assistance, and resources to one another based on the principle of solidarity.
<b>Solidarity in Action:</b> Mutual aid fosters a sense of solidarity and interconnectedness among us. It recognizes that our well-being is interdependent, and by supporting each other, we can collectively thrive.
<b>Community Empowerment:</b> Mutual aid empowers us and our communities by encouraging active participation and decision-making. Rather than relying on external institutions or hierarchical structures, mutual aid allows us to take ownership of our own lives and collectively shape the world we want to live in. By working together, we gain a sense of agency, reclaim our autonomy, and build resilient communities that can address their own needs without depending on oppressive systems.
<b>Transforming Society:</b> Mutual aid goes beyond providing immediate relief; it seeks to create sustainable alternatives to capitalist structures. By challenging the dependency on profit-driven enterprises and top-down decision-making it serves as a catalyst for radical change, actively working towards the transformation of oppressive structures and paving the way for a more just, inclusive, and compassionate world.
In conclusion, mutual aid is a vital component of socialist thought and practice. It is through the principle of mutual aid that we can build solidarity, empower ourselves, challenge exploitation, and create alternative structures that prioritize the well-being of all.
### Addressing the Hidden Costs of Capitalism and Failures of Liberal Democracy
<b>Alienation from Labor:</b> Through libertarian socialism, we shift our focus from profit-driven competition to the intrinsic value of meaningful work and human connection. We prioritize the well-being and fulfillment of individuals, fostering a sense of purpose and engagement in our labor. As workers, we assert direct control over our work environment and participate in decision-making, forging a stronger connection to the value we create and fostering a greater sense of ownership and satisfaction in our labor.
<b>Stolen Labor:</b> A core tenet of our libertarian socialist philosophy is our rejection of labor exploitation inherent in capitalist systems. Through the restructuring of the economic system, we seek to eliminate the appropriation of surplus value by a capitalist class. Instead, the fruits of our labor are shared among all workers, ensuring our proper compensation and the full realization of the value we contribute. By eradicating the extraction of surplus labor, we address the inherent injustice of capitalist appropriation and promote a fairer and more equitable distribution of wealth.
<b>Social Fragmentation:</b> Challenging the social fragmentation perpetuated by capitalism, we emphasize genuine social cohesion and cooperation. We reject the hyper-individualism that capitalism fosters and instead prioritize the collective well-being and common good. Collaboration and solidarity are encouraged among us as individuals and communities, recognizing that our individual pursuits must be balanced with the understanding that collective well-being and cooperation are vital for a just and harmonious society. Through decentralized decision-making and direct democracy, we nurture a sense of shared responsibility, fostering social integration and cooperation.
<b>Consumerism and Materialism:</b> The culture of consumerism and materialism that capitalism promotes is also a target of our libertarian socialist vision. We reject the notion that personal worth is solely determined by material possessions. Instead, we encourage a shift in values where holistic well-being, personal fulfillment, and meaningful relationships take precedence over endless consumption. By prioritizing the needs of individuals and communities over a relentless pursuit of material goods, we seek to reduce financial insecurity, debt, strained relationships, and the loss of personal fulfillment.
<b>Environmental Degradation:</b> Recognizing the importance of long-term sustainability and the well-being of future generations, we take a proactive stance against environmental degradation. We challenge the profit-driven mindset and prioritize the health of the planet. We advocate for environmentally conscious practices and policies, promoting sustainable resource usage, pollution reduction, and the transition to renewable energy sources. By addressing environmental degradation, we aim to safeguard our well-being, reduce health risks, and ensure a more sustainable future for all.
<b>Constrained Choices:</b> Moreover, we challenge the issue of constrained choices in elections by championing inclusive and participatory democracy. We encourage grassroots movements, community organizations, and local assemblies to promote direct participation. This approach fosters an inclusive democracy where power is shared among us as citizens.
<b>Disconnected:</b> By embracing the principles of decentralization and direct democracy, we address the feeling of powerlessness and societal fragmentation. Our thoughts, perspectives, and voices hold significance, and understanding one another's needs directly benefits the interests of all members of society. Libertarian socialism empowers us as individuals, bridges societal divides, and creates a framework where our collective wisdom shapes the direction of our society as a whole.
### What Can You Do Now?
<b>Education and Awareness:</b> A crucial first step is to educate oneself about libertarian socialism and its principles. By deepening our understanding of its core tenets and values, we can effectively articulate its vision to others. Engage in critical reading, attend workshops, and participate in discussions to gain knowledge and insight into libertarian socialist theory and practice.
<b>Solidarity and Mutual Aid:</b> Foster a culture of solidarity and mutual aid in your community. Engage in acts of support, cooperation, and collective care. Build networks of mutual aid that provide resources and assistance. By fostering solidarity, we strengthen the bonds of community and challenge the social fragmentation perpetuated by capitalism.
<b>Grassroots Organizing:</b> Become involved in grassroots movements and organizations that align with libertarian socialist principles. Join or form local community groups and unions that prioritize solidarity, equality, and direct democracy. Engage in collective action, advocacy, and campaigns to address social and economic issues, promote worker empowerment, and challenge oppressive structures.
<b>Participatory Democracy:</b> Promote and participate in models of participatory democracy within your community. Attend local assemblies, neighborhood meetings, or community councils that emphasize inclusive decision-making processes. Encourage others to actively engage in discussions, voice their concerns, and contribute to shaping policies and initiatives that prioritize collective well-being.
<b>Cooperative Economics:</b> Support and participate in cooperative economic initiatives. Cooperatives are enterprises owned and democratically controlled by workers, ensuring fair distribution of resources and decision-making power. Consider joining or starting worker-owned cooperatives in various sectors such as agriculture, housing, or production. By promoting cooperative economics, we challenge the capitalist mode of production and lay the foundation for a more equitable economic system.
<b>Engaging with Existing Systems:</b> While challenging the existing systems, it is also important to engage with them strategically. This includes advocating for policy changes, holding elected officials accountable, and actively participating in existing democratic processes. Work towards reforms that align with libertarian socialist principles and contribute to the broader goal of systemic transformation.
## Our Plan
Fortunately, you need not embark on the journey of implementing all the aforementioned initiatives single-handedly. Thankfully, there already exists an organization of like-minded comrades ready to join forces with you.
Our three main goals:
<b>Mutual Aid Networks:</b> We want to correct the division of society and the mentality where every person is for themselves, which not only worsens our material well-being, but also negatively affects our psychological health due to the inability to rely on other people and work together for a common goal. We are going to organize mutual help networks where people share knowledge, resources and work with each other. As a result, overall well-being will be higher than if everyone is on their own. It will also create the basis for a future socialist economy.
<b>Decentralization and the Establishment of Direct Democracy:</b> We strive to remove power from the hands of politicians and transfer it to the people and communities in which they live. We wish that decisions about how certain communities develop depend only on the people living there and that each person can contribute to decision making. We are against a bunch of people deciding how everyone else should live.
<b>End Exploitation of Workers:</b> We are for democracy in the workplace and for workers getting all the value they produce. Consequently, we are for the transfer of the means of production directly into the hands of the workers and the formation of cooperatives. Once this goal is achieved, working hours can be reduced to at least 20 hours a week without a pay cut, or wages can rise two times, depending on what people want more. This is how much of our lives is stolen by the capitalist class.

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

BIN
Server/public/img/crowd.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

View File

@ -0,0 +1,39 @@
export let communities = [
{
location: ["Estonia, Kohtla-Järve",[59.409521829709504, 27.288415912535914]],
status: "forming",
members: 2,
contact: ["https://chat.whatsapp.com/BhnmUNljUxJ2AjeHUwyTKh","WhatsApp invite link"]
}
]
export function addMarkersCommunities(map) {
for (let g of communities) {
let coordinates
let text = ""
for (let field in g) {
let fieldText = field[0].toUpperCase() + field.slice(1) + ": "
if (field=="contact") {
text += fieldText + "<a href='" + g.contact[0] + "' target='_blank' rel=noreferrer>" + g.contact[1] + "</a>"
}
else if (field=="location") {
text += fieldText + g[field][0] + "<br>"
coordinates = g[field][1]
}
else {
text += fieldText + g[field] + "<br>"
}
}
var greenIcon = new L.Icon({
iconUrl: 'https://raw.githubusercontent.com/pointhi/leaflet-color-markers/master/img/marker-icon-2x-red.png',
shadowUrl: 'https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.7/images/marker-shadow.png',
iconSize: [25, 41],
iconAnchor: [12, 41],
popupAnchor: [1, -34],
shadowSize: [41, 41]
});
let marker = L.marker(coordinates, {icon: greenIcon})
marker.addTo(map).bindPopup(text)
}
}

View File

@ -1,22 +1,229 @@
(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(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, v as validate_slots, o as onMount, n as noop } from './index-bc9d3868.js'; 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 set_custom_element_data, j as attr_dev, k as append_dev, l as detach_dev, m as destroy_each, t as text } from './index-3e97afc8.js';
import { communities, addMarkersCommunities } from '../../../../../../../../../js/communities.js';
import '../../../../../../../../../js/components/map-component.js';
/* src\communities-component.svelte generated by Svelte v3.52.0 */ /* src\communities-component.svelte generated by Svelte v3.52.0 */
function create_fragment(ctx) { 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;
}
// (31: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 = { const block = {
c: function create() { 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, 32, 19, 1709);
add_location(p0, file, 32, 16, 1706);
add_location(b1, file, 33, 19, 1774);
add_location(p1, file, 33, 16, 1771);
add_location(b2, file, 34, 19, 1832);
add_location(p2, file, 34, 16, 1829);
add_location(b3, file, 35, 19, 1892);
attr_dev(a, "href", /*community*/ ctx[1].contact[0]);
attr_dev(a, "target", ";_blank;");
attr_dev(a, "rel", "noreferrer");
add_location(a, file, 35, 35, 1908);
add_location(p3, file, 35, 16, 1889);
attr_dev(div, "class", "location-info");
add_location(div, file, 31, 12, 1661);
},
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: "(31:8) {#each communities as community}",
ctx
});
return block;
}
function create_fragment(ctx) {
let div1;
let div0;
let h1;
let t1;
let p;
let t3;
let h3;
let t5;
let map_component;
let t6;
let h4;
let t8;
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();
p = element("p");
p.textContent = "We build 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 through 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.";
t3 = space();
h3 = element("h3");
h3.textContent = "Our communities";
t5 = space();
map_component = element("map-component");
t6 = space();
h4 = element("h4");
h4.textContent = "Europe";
t8 = space();
for (let i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].c();
}
this.c = noop; this.c = noop;
add_location(h1, file, 25, 8, 612);
add_location(p, file, 26, 8, 642);
add_location(h3, file, 27, 8, 1472);
set_custom_element_data(map_component, "id", "map");
set_custom_element_data(map_component, "callback", /*mapCallbackCommunities*/ ctx[0]);
add_location(map_component, file, 28, 8, 1506);
add_location(h4, file, 29, 8, 1590);
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) { l: function claim(nodes) {
throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
}, },
m: noop, m: function mount(target, anchor) {
p: noop, insert_dev(target, div1, anchor);
append_dev(div1, div0);
append_dev(div0, h1);
append_dev(div0, t1);
append_dev(div0, p);
append_dev(div0, t3);
append_dev(div0, h3);
append_dev(div0, t5);
append_dev(div0, map_component);
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 & /*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, i: noop,
o: noop, o: noop,
d: noop d: function destroy(detaching) {
if (detaching) detach_dev(div1);
destroy_each(each_blocks, detaching);
}
}; };
dispatch_dev("SvelteRegisterBlock", { dispatch_dev("SvelteRegisterBlock", {
@ -34,6 +241,11 @@ function instance($$self, $$props, $$invalidate) {
let { $$slots: slots = {}, $$scope } = $$props; let { $$slots: slots = {}, $$scope } = $$props;
validate_slots('communities-component', slots, []); validate_slots('communities-component', slots, []);
function mapCallbackCommunities(createMap) {
let map = createMap([51.505, -0.09], 3);
addMarkersCommunities(map);
}
onMount(() => { onMount(() => {
}); });
@ -44,14 +256,20 @@ function instance($$self, $$props, $$invalidate) {
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<communities-component> was created with unknown prop '${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 }); $$self.$capture_state = () => ({
return []; onMount,
communities,
addMarkersCommunities,
mapCallbackCommunities
});
return [mapCallbackCommunities];
} }
class Communities_component extends SvelteElement { class Communities_component extends SvelteElement {
constructor(options) { constructor(options) {
super(); super();
this.shadowRoot.innerHTML = `<style>@import '/css/common.css';</style>`; this.shadowRoot.innerHTML = `<style>@import '/css/common.css';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>`;
init( init(
this, this,

View File

@ -1,6 +1,6 @@
(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(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, v as validate_slots, o as onMount, e as element, n as noop, c as add_location, f as attr_dev, g as append_dev, h as detach_dev } from './index-bc9d3868.js'; 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, j as attr_dev, k as append_dev, l as detach_dev } from './index-3e97afc8.js';
/* src\components\cookies-dialog.svelte generated by Svelte v3.52.0 */ /* src\components\cookies-dialog.svelte generated by Svelte v3.52.0 */
const file = "src\\components\\cookies-dialog.svelte"; const file = "src\\components\\cookies-dialog.svelte";

View File

@ -1,22 +1,345 @@
(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(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, v as validate_slots, o as onMount, n as noop } from './index-bc9d3868.js'; 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 set_custom_element_data, j as attr_dev, k as append_dev, l as detach_dev, m as destroy_each, t as text } from './index-3e97afc8.js';
import { coops, addMarkersCoops } from '../../../../../../../../../js/coops.js';
import '../../../../../../../../../js/components/map-component.js';
/* src\cooperatives-component.svelte generated by Svelte v3.52.0 */ /* src\cooperatives-component.svelte generated by Svelte v3.52.0 */
function create_fragment(ctx) { 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;
}
// (31: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].lcoation + "";
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 = { const block = {
c: function create() { 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, 34, 27, 2299);
add_location(p0, file, 34, 24, 2296);
add_location(b1, file, 35, 27, 2356);
add_location(p1, file, 35, 24, 2353);
add_location(b2, file, 36, 27, 2421);
add_location(p2, file, 36, 24, 2418);
add_location(b3, file, 37, 27, 2482);
add_location(p3, file, 37, 24, 2479);
add_location(b4, file, 38, 27, 2545);
add_location(p4, file, 38, 24, 2542);
add_location(b5, file, 39, 27, 2606);
attr_dev(a0, "href", "https://www." + /*coop*/ ctx[1].website);
attr_dev(a0, "target", "_blank");
attr_dev(a0, "rel", "noreferrer");
add_location(a0, file, 39, 43, 2622);
add_location(p5, file, 39, 24, 2603);
add_location(b6, file, 40, 27, 2742);
attr_dev(a1, "href", /*coop*/ ctx[1].contact[0]);
attr_dev(a1, "target", ";_blank;");
attr_dev(a1, "rel", "noreferrer");
add_location(a1, file, 40, 43, 2758);
add_location(p6, file, 40, 24, 2739);
add_location(div0, file, 33, 20, 2265);
attr_dev(source0, "srcset", "/img/coops/" + /*coop*/ ctx[1].logo + ".webp");
add_location(source0, file, 43, 24, 2925);
attr_dev(source1, "srcset", "/img/coops/" + /*coop*/ ctx[1].logo + ".png");
add_location(source1, file, 44, 24, 3000);
attr_dev(img, "class", "coop-logo");
attr_dev(img, "alt", "logo");
add_location(img, file, 45, 24, 3074);
add_location(picture, file, 42, 20, 2890);
add_location(div1, file, 32, 16, 2238);
add_location(b7, file, 48, 19, 3185);
add_location(p7, file, 48, 16, 3182);
attr_dev(div2, "class", "location-info");
add_location(div2, file, 31, 12, 2193);
},
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: "(31:8) {#each coops as coop}",
ctx
});
return block;
}
function create_fragment(ctx) {
let div1;
let div0;
let h1;
let t1;
let p0;
let t3;
let p1;
let t5;
let h3;
let t7;
let map_component;
let t8;
let h4;
let t10;
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();
p0 = element("p");
p0.textContent = "We create worker cooperatives that embody a transformative business model in which the workers themselves own and democratically control the enterprise. In these cooperatives, each employee has a say in decision-making, and profits are shared based on individual contributions. This participatory structure fosters a sense of ownership, motivation, and job satisfaction among workers, resulting in a more fulfilling and empowering work experience. Moreover, worker cooperatives promote economic equity by distributing profits more equitably among all workers, challenging the concentration of wealth seen in traditional capitalist enterprises.";
t3 = space();
p1 = element("p");
p1.textContent = "Worker cooperatives prioritize the well-being of their workers, striving for fair wages, safe working conditions, and a healthy work-life balance. By placing the needs of workers at the forefront, these cooperatives create supportive and sustainable work environments that promote social cohesion and job security. Furthermore, worker cooperatives adopt long-term perspectives and prioritize the interests of their local communities. With decision-making power vested in the workers themselves, cooperatives are less inclined to pursue short-term profit-maximization strategies that harm workers and communities. Instead, they reinvest their profits locally, contributing to the development and resilience of their communities.";
t5 = space();
h3 = element("h3");
h3.textContent = "Our cooperatives";
t7 = space();
map_component = element("map-component");
t8 = space();
h4 = element("h4");
h4.textContent = "Europe";
t10 = space();
for (let i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].c();
}
this.c = noop; this.c = noop;
add_location(h1, file, 24, 8, 585);
add_location(p0, file, 25, 8, 616);
add_location(p1, file, 26, 8, 1276);
add_location(h3, file, 27, 8, 2020);
set_custom_element_data(map_component, "id", "map");
set_custom_element_data(map_component, "callback", /*mapCallbackCoops*/ ctx[0]);
add_location(map_component, file, 28, 8, 2055);
add_location(h4, file, 29, 8, 2133);
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) { l: function claim(nodes) {
throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
}, },
m: noop, m: function mount(target, anchor) {
p: noop, insert_dev(target, div1, anchor);
append_dev(div1, div0);
append_dev(div0, h1);
append_dev(div0, t1);
append_dev(div0, p0);
append_dev(div0, t3);
append_dev(div0, p1);
append_dev(div0, t5);
append_dev(div0, h3);
append_dev(div0, t7);
append_dev(div0, map_component);
append_dev(div0, t8);
append_dev(div0, h4);
append_dev(div0, t10);
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, i: noop,
o: noop, o: noop,
d: noop d: function destroy(detaching) {
if (detaching) detach_dev(div1);
destroy_each(each_blocks, detaching);
}
}; };
dispatch_dev("SvelteRegisterBlock", { dispatch_dev("SvelteRegisterBlock", {
@ -34,6 +357,11 @@ function instance($$self, $$props, $$invalidate) {
let { $$slots: slots = {}, $$scope } = $$props; let { $$slots: slots = {}, $$scope } = $$props;
validate_slots('cooperatives-component', slots, []); validate_slots('cooperatives-component', slots, []);
function mapCallbackCoops(createMap) {
let map = createMap([51.505, -0.09], 3);
addMarkersCoops(map);
}
onMount(() => { onMount(() => {
}); });
@ -44,14 +372,20 @@ function instance($$self, $$props, $$invalidate) {
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<cooperatives-component> was created with unknown prop '${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 }); $$self.$capture_state = () => ({
return []; onMount,
coops,
addMarkersCoops,
mapCallbackCoops
});
return [mapCallbackCoops];
} }
class Cooperatives_component extends SvelteElement { class Cooperatives_component extends SvelteElement {
constructor(options) { constructor(options) {
super(); super();
this.shadowRoot.innerHTML = `<style>@import '/css/common.css';</style>`; this.shadowRoot.innerHTML = `<style>@import '/css/common.css';.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>`;
init( init(
this, this,

View File

@ -1,6 +1,6 @@
(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(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, v as validate_slots, e as element, q as space, t as text, B as svg_element, n as noop, c as add_location, f as attr_dev, g as append_dev, u as listen_dev, h as detach_dev } from './index-bc9d3868.js'; 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, j as attr_dev, k as append_dev, w as listen_dev, l as detach_dev } from './index-3e97afc8.js';
/* src\footer\footer-component.svelte generated by Svelte v3.52.0 */ /* src\footer\footer-component.svelte generated by Svelte v3.52.0 */
@ -53,6 +53,7 @@ function create_fragment(ctx) {
add_location(h2, file, 16, 16, 313); add_location(h2, file, 16, 16, 313);
attr_dev(a, "href", "https://chat.whatsapp.com/BhnmUNljUxJ2AjeHUwyTKh"); attr_dev(a, "href", "https://chat.whatsapp.com/BhnmUNljUxJ2AjeHUwyTKh");
attr_dev(a, "target", "_blank"); attr_dev(a, "target", "_blank");
attr_dev(a, "rel", "noreferrer");
add_location(a, file, 18, 29, 454); add_location(a, file, 18, 29, 454);
add_location(p0, file, 18, 16, 441); add_location(p0, file, 18, 16, 441);
attr_dev(div0, "id", "contact-us-container"); attr_dev(div0, "id", "contact-us-container");
@ -67,26 +68,26 @@ function create_fragment(ctx) {
attr_dev(rect, "rx", "5.5"); attr_dev(rect, "rx", "5.5");
attr_dev(rect, "transform", "translate(22 24)"); attr_dev(rect, "transform", "translate(22 24)");
attr_dev(rect, "fill", "#DD1C1A"); attr_dev(rect, "fill", "#DD1C1A");
add_location(rect, file, 24, 18, 907); add_location(rect, file, 24, 18, 922);
attr_dev(path, "id", "Path_1145"); attr_dev(path, "id", "Path_1145");
attr_dev(path, "data-name", "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, "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"); attr_dev(path, "fill", "#DD1C1A");
add_location(path, file, 25, 18, 1055); add_location(path, file, 25, 18, 1070);
attr_dev(g, "id", "Group_268"); attr_dev(g, "id", "Group_268");
attr_dev(g, "data-name", "Group 268"); attr_dev(g, "data-name", "Group 268");
attr_dev(g, "transform", "translate(-6.177 -2.399)"); attr_dev(g, "transform", "translate(-6.177 -2.399)");
add_location(g, file, 23, 16, 810); add_location(g, file, 23, 16, 825);
attr_dev(svg, "xmlns", "http://www.w3.org/2000/svg"); attr_dev(svg, "xmlns", "http://www.w3.org/2000/svg");
attr_dev(svg, "width", "42.545"); attr_dev(svg, "width", "42.545");
attr_dev(svg, "height", "72.601"); attr_dev(svg, "height", "72.601");
attr_dev(svg, "viewBox", "0 0 42.545 72.601"); attr_dev(svg, "viewBox", "0 0 42.545 72.601");
add_location(svg, file, 22, 12, 693); add_location(svg, file, 22, 12, 708);
attr_dev(button, "id", "footer-up"); attr_dev(button, "id", "footer-up");
attr_dev(button, "aria-label", "go up"); attr_dev(button, "aria-label", "go up");
add_location(button, file, 21, 8, 600); add_location(button, file, 21, 8, 615);
attr_dev(p1, "id", "footer-copyright"); attr_dev(p1, "id", "footer-copyright");
add_location(p1, file, 29, 8, 1374); add_location(p1, file, 29, 8, 1389);
attr_dev(div2, "id", "footer-content-container"); attr_dev(div2, "id", "footer-content-container");
add_location(div2, file, 13, 4, 150); add_location(div2, file, 13, 4, 150);
add_location(footer, file, 12, 0, 136); add_location(footer, file, 12, 0, 136);

View File

@ -1,22 +1,221 @@
(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(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, v as validate_slots, o as onMount, n as noop } from './index-bc9d3868.js'; import { S as SvelteElement, i as init, a as attribute_to_object, b as insert_dev, p 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 set_custom_element_data, j as attr_dev, k as append_dev, l as detach_dev, m as destroy_each, t as text } from './index-3e97afc8.js';
import { groups, addMarkersGroups } from '../../../../../../../../../js/groups.js';
import '../../../../../../../../../js/components/map-component.js';
/* src\groups-component.svelte generated by Svelte v3.52.0 */ /* src\groups-component.svelte generated by Svelte v3.52.0 */
function create_fragment(ctx) { 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;
}
// (30: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 = { const block = {
c: function create() { 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, 31, 19, 2027);
add_location(p0, file, 31, 16, 2024);
add_location(b1, file, 32, 19, 2088);
add_location(p1, file, 32, 16, 2085);
add_location(b2, file, 33, 19, 2144);
attr_dev(a, "href", /*group*/ ctx[1].contact[0]);
attr_dev(a, "target", ";_blank;");
attr_dev(a, "rel", "noreferrer");
add_location(a, file, 33, 35, 2160);
add_location(p2, file, 33, 16, 2141);
attr_dev(div, "class", "location-info");
add_location(div, file, 30, 12, 1979);
},
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: "(30:8) {#each groups as group}",
ctx
});
return block;
}
function create_fragment(ctx) {
let div1;
let div0;
let h1;
let t1;
let p0;
let t3;
let p1;
let t5;
let h3;
let t7;
let map_component;
let t8;
let h4;
let t10;
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();
p0 = element("p");
p0.textContent = "We try to raise awareness among individuals about the detrimental impact of the current politico-economic systems on our collective well-being. Through educational initiatives, community engagement, and critical analysis, we strive to illuminate the structural flaws and inherent inequalities that permeate capitalist societies. By shedding light on these systemic issues, we empower people to question the status quo and envision alternative paths towards a more just and sustainable future.";
t3 = space();
p1 = element("p");
p1.textContent = "However, our mission extends beyond theoretical exploration and ideological discourse. We firmly believe in the power of mutual aid and collective action to alleviate the immediate challenges and hardships faced within a capitalist framework. Through the practice of mutual aid, we actively support one another by sharing resources, knowledge, and skills, thereby fostering a sense of solidarity and resilience. Whether it's organizing community gardens, establishing local food cooperatives, or providing mutual support networks, our aim is to make life under capitalism more bearable and to cultivate pockets of resistance and alternatives within the existing system.";
t5 = space();
h3 = element("h3");
h3.textContent = "Our groups";
t7 = space();
map_component = element("map-component");
t8 = space();
h4 = element("h4");
h4.textContent = "Europe";
t10 = space();
for (let i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].c();
}
this.c = noop; this.c = noop;
add_location(h1, file, 23, 8, 589);
add_location(p0, file, 24, 8, 614);
add_location(p1, file, 25, 8, 1123);
add_location(h3, file, 26, 8, 1809);
set_custom_element_data(map_component, "id", "map");
set_custom_element_data(map_component, "callback", /*mapCallbackGroups*/ ctx[0]);
add_location(map_component, file, 27, 8, 1838);
add_location(h4, file, 28, 8, 1917);
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) { l: function claim(nodes) {
throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
}, },
m: noop, m: function mount(target, anchor) {
p: noop, insert_dev(target, div1, anchor);
append_dev(div1, div0);
append_dev(div0, h1);
append_dev(div0, t1);
append_dev(div0, p0);
append_dev(div0, t3);
append_dev(div0, p1);
append_dev(div0, t5);
append_dev(div0, h3);
append_dev(div0, t7);
append_dev(div0, map_component);
append_dev(div0, t8);
append_dev(div0, h4);
append_dev(div0, t10);
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, i: noop,
o: noop, o: noop,
d: noop d: function destroy(detaching) {
if (detaching) detach_dev(div1);
destroy_each(each_blocks, detaching);
}
}; };
dispatch_dev("SvelteRegisterBlock", { dispatch_dev("SvelteRegisterBlock", {
@ -34,6 +233,11 @@ function instance($$self, $$props, $$invalidate) {
let { $$slots: slots = {}, $$scope } = $$props; let { $$slots: slots = {}, $$scope } = $$props;
validate_slots('groups-component', slots, []); validate_slots('groups-component', slots, []);
function mapCallbackGroups(createMap) {
let map = createMap([51.505, -0.09], 3);
addMarkersGroups(map);
}
onMount(() => { onMount(() => {
}); });
@ -44,14 +248,20 @@ function instance($$self, $$props, $$invalidate) {
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<groups-component> was created with unknown prop '${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 }); $$self.$capture_state = () => ({
return []; onMount,
groups,
addMarkersGroups,
mapCallbackGroups
});
return [mapCallbackGroups];
} }
class Groups_component extends SvelteElement { class Groups_component extends SvelteElement {
constructor(options) { constructor(options) {
super(); super();
this.shadowRoot.innerHTML = `<style>@import '/css/common.css';</style>`; this.shadowRoot.innerHTML = `<style>@import '/css/common.css';h4{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>`;
init( init(
this, this,
@ -63,7 +273,7 @@ class Groups_component extends SvelteElement {
instance, instance,
create_fragment, create_fragment,
safe_not_equal, safe_not_equal,
{}, { mapCallbackGroups: 0 },
null null
); );
@ -71,10 +281,27 @@ class Groups_component extends SvelteElement {
if (options.target) { if (options.target) {
insert_dev(options.target, this, options.anchor); 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); customElements.define("groups-component", Groups_component);
export { Groups_component as default }; export { Groups_component as default };

View File

@ -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 { src_url_equal 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, set_custom_element_data as h, init as i, attr_dev as j, append_dev as k, detach_dev as l, destroy_each as m, noop as n, onMount as o, flush as p, globals as q, binding_callbacks as r, safe_not_equal as s, text as t, set_style as u, validate_each_argument as v, listen_dev as w, set_data_dev as x, getContext as y, setContext as z };

View File

@ -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 { run_all as A, svg_element as B, set_custom_element_data as C, empty as D, HtmlTag as H, SvelteElement as S, attribute_to_object as a, insert_dev as b, space as c, dispatch_dev as d, element as e, add_location as f, attr_dev as g, append_dev as h, init as i, detach_dev as j, flush as k, validate_each_argument as l, globals as m, noop as n, onMount as o, destroy_each as p, binding_callbacks as q, set_style as r, safe_not_equal as s, text as t, listen_dev as u, validate_slots as v, set_data_dev as w, getContext as x, setContext as y, src_url_equal as z };

View File

@ -0,0 +1,445 @@
(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 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 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 { run_all as A, svg_element as B, SvelteElement as S, attribute_to_object as a, insert_dev as b, space as c, dispatch_dev as d, element as e, add_location as f, attr_dev as g, append_dev as h, init as i, detach_dev as j, flush as k, validate_each_argument as l, globals as m, noop as n, onMount as o, destroy_each as p, binding_callbacks as q, set_style as r, safe_not_equal as s, text as t, listen_dev as u, validate_slots as v, set_data_dev as w, getContext as x, setContext as y, src_url_equal as z };

View File

@ -0,0 +1,486 @@
(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 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 { run_all as A, svg_element as B, empty as C, HtmlTag as H, SvelteElement as S, attribute_to_object as a, insert_dev as b, space as c, dispatch_dev as d, element as e, add_location as f, attr_dev as g, append_dev as h, init as i, detach_dev as j, flush as k, validate_each_argument as l, globals as m, noop as n, onMount as o, destroy_each as p, binding_callbacks as q, set_style as r, safe_not_equal as s, text as t, listen_dev as u, validate_slots as v, set_data_dev as w, getContext as x, setContext as y, src_url_equal as z };

View File

@ -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 { src_url_equal 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, space as c, dispatch_dev as d, element as e, add_location as f, set_custom_element_data as g, attr_dev as h, init as i, append_dev as j, detach_dev as k, flush as l, validate_each_argument as m, noop as n, onMount as o, globals as p, destroy_each as q, binding_callbacks as r, safe_not_equal as s, text as t, set_style as u, validate_slots as v, listen_dev as w, set_data_dev as x, getContext as y, setContext as z };

View File

@ -1,22 +1,203 @@
(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(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, v as validate_slots, o as onMount, n as noop } from './index-bc9d3868.js'; import { S as SvelteElement, i as init, a as attribute_to_object, b as insert_dev, p 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, j as attr_dev, h as set_custom_element_data, k as append_dev, l as detach_dev } from './index-3e97afc8.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 */ /* src\join-us-component.svelte generated by Svelte v3.52.0 */
const file = "src\\join-us-component.svelte";
function create_fragment(ctx) { 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 = { const block = {
c: function create() { 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; 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", "https://chat.whatsapp.com/BhnmUNljUxJ2AjeHUwyTKh");
add_location(a0, file, 51, 20, 1780);
add_location(li0, file, 51, 16, 1776);
attr_dev(a1, "href", "https://chat.whatsapp.com/BhnmUNljUxJ2AjeHUwyTKh");
add_location(a1, file, 52, 20, 1877);
add_location(li1, file, 52, 16, 1873);
attr_dev(a2, "href", "https://chat.whatsapp.com/BhnmUNljUxJ2AjeHUwyTKh");
add_location(a2, file, 53, 20, 1980);
add_location(li2, file, 53, 16, 1976);
add_location(ol, file, 50, 12, 1754);
add_location(p5, file, 55, 12, 2092);
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, 2241);
add_location(p6, file, 57, 8, 2191);
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, 2400);
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) { l: function claim(nodes) {
throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
}, },
m: noop, 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, p: noop,
i: noop, i: noop,
o: noop, o: noop,
d: noop d: function destroy(detaching) {
if (detaching) detach_dev(t0);
if (detaching) detach_dev(div3);
}
}; };
dispatch_dev("SvelteRegisterBlock", { dispatch_dev("SvelteRegisterBlock", {
@ -34,6 +215,13 @@ function instance($$self, $$props, $$invalidate) {
let { $$slots: slots = {}, $$scope } = $$props; let { $$slots: slots = {}, $$scope } = $$props;
validate_slots('join-us-component', slots, []); validate_slots('join-us-component', slots, []);
function mapCallback(createMap) {
let map = createMap([51.505, -0.09], 3);
addMarkersGroups(map);
addMarkersCoops(map);
addMarkersCommunities(map);
}
onMount(() => { onMount(() => {
}); });
@ -44,14 +232,23 @@ function instance($$self, $$props, $$invalidate) {
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<join-us-component> was created with unknown prop '${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 }); $$self.$capture_state = () => ({
return []; onMount,
addMarkersGroups,
addMarkersCoops,
addMarkersCommunities,
mapCallback
});
return [mapCallback];
} }
class Join_us_component extends SvelteElement { class Join_us_component extends SvelteElement {
constructor(options) { constructor(options) {
super(); super();
this.shadowRoot.innerHTML = `<style>@import '/css/common.css';</style>`;
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
}#container p{font-size:1.2rem;text-align:justify}</style>`;
init( init(
this, this,
@ -63,7 +260,7 @@ class Join_us_component extends SvelteElement {
instance, instance,
create_fragment, create_fragment,
safe_not_equal, safe_not_equal,
{}, { mapCallback: 0 },
null null
); );
@ -71,10 +268,27 @@ class Join_us_component extends SvelteElement {
if (options.target) { if (options.target) {
insert_dev(options.target, this, options.anchor); 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); customElements.define("join-us-component", Join_us_component);
export { Join_us_component as default }; export { Join_us_component as default };

View File

@ -1,22 +1,112 @@
(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(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, v as validate_slots, o as onMount, n as noop } from './index-bc9d3868.js'; 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 attr_dev, g as add_location, k as append_dev, l as detach_dev } from './index-3e97afc8.js';
/* src\landing-component.svelte generated by Svelte v3.52.0 */ /* src\landing-component.svelte generated by Svelte v3.52.0 */
const file = "src\\landing-component.svelte";
function create_fragment(ctx) { function create_fragment(ctx) {
let div5;
let picture;
let source0;
let t0;
let source1;
let t1;
let img;
let t2;
let div4;
let p0;
let t4;
let div3;
let div0;
let p1;
let t6;
let div1;
let p2;
let t8;
let div2;
let p3;
const block = { const block = {
c: function create() { c: function create() {
div5 = element("div");
picture = element("picture");
source0 = element("source");
t0 = space();
source1 = element("source");
t1 = space();
img = element("img");
t2 = space();
div4 = element("div");
p0 = element("p");
p0.textContent = "We are people united around a single cause of bringing down authoritarian exploitative systems represented by different forms of capitalism and replacing them with libertarian socialist systems to create a more equitable and democratic world.";
t4 = space();
div3 = element("div");
div0 = element("div");
p1 = element("p");
p1.textContent = "GROUPS: We organize into groups for education, advocacy and mutual aid. We aim to show people how the current politico-economic systems negatively affect our wellbeing, show them the alternatives, and engage in mutual aid to make our life under capitalism easier.";
t6 = space();
div1 = element("div");
p2 = element("p");
p2.textContent = "COMMUNITIES: We build communities according to libertarian socialist principles where people own their land, their houses, the means of production and use direct democracy to make decisions. We are growing our socialist world one community at a time.";
t8 = space();
div2 = element("div");
p3 = element("p");
p3.textContent = "COOPERATIVES: We create worker cooperatives in order to finance the functioning of our groups and communities. Economic power determines political power, therefore, establishing cooperatives is one of the first steps towards achieving socialism by providing democratic workplaces for workers instead of authoritarian capitalist businesses.";
this.c = noop; 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(img, "id", "crowd");
attr_dev(img, "alt", "crowd");
add_location(img, file, 22, 8, 359);
add_location(picture, file, 19, 4, 255);
add_location(p0, file, 26, 8, 450);
add_location(p1, file, 29, 16, 771);
add_location(div0, file, 28, 12, 748);
add_location(p2, file, 32, 16, 1098);
add_location(div1, file, 31, 12, 1075);
add_location(p3, file, 35, 16, 1412);
add_location(div2, file, 34, 12, 1389);
attr_dev(div3, "id", "container-grid");
add_location(div3, file, 27, 8, 709);
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) { l: function claim(nodes) {
throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
}, },
m: noop, 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, img);
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, p1);
append_dev(div3, t6);
append_dev(div3, div1);
append_dev(div1, p2);
append_dev(div3, t8);
append_dev(div3, div2);
append_dev(div2, p3);
},
p: noop, p: noop,
i: noop, i: noop,
o: noop, o: noop,
d: noop d: function destroy(detaching) {
if (detaching) detach_dev(div5);
}
}; };
dispatch_dev("SvelteRegisterBlock", { dispatch_dev("SvelteRegisterBlock", {
@ -51,7 +141,7 @@ function instance($$self, $$props, $$invalidate) {
class Landing_component extends SvelteElement { class Landing_component extends SvelteElement {
constructor(options) { constructor(options) {
super(); super();
this.shadowRoot.innerHTML = `<style>@import '/css/common.css';</style>`; this.shadowRoot.innerHTML = `<style>@import '/css/common.css';#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:2rem}#container p{font-size:1.2rem;text-align:justify}#container-grid{display:grid;grid-template-columns:1fr 1fr 1.3fr;grid-gap:3rem}@media only screen and (max-width: 1000px){#container-grid{display:grid;grid-template-columns:1fr;grid-gap:2rem}}</style>`;
init( init(
this, this,

View File

@ -1,6 +1,6 @@
(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(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, j as flush, s as safe_not_equal, k as validate_each_argument, d as dispatch_dev, v as validate_slots, o as onMount, l as globals, e as element, n as noop, f as attr_dev, c as add_location, h as detach_dev, m as destroy_each, p as binding_callbacks, q as space, t as text, r as set_style, g as append_dev, u as listen_dev, w as set_data_dev } from './index-bc9d3868.js'; import { S as SvelteElement, i as init, a as attribute_to_object, b as insert_dev, p as flush, s as safe_not_equal, v as validate_each_argument, d as dispatch_dev, c as validate_slots, o as onMount, q as globals, e as element, n as noop, j as attr_dev, g as add_location, l as detach_dev, m as destroy_each, r as binding_callbacks, f as space, t as text, u as set_style, k as append_dev, w as listen_dev, x as set_data_dev } from './index-3e97afc8.js';
import { pullLegendData } from '../../../../../../../../../js/predict/charts.js'; import { pullLegendData } from '../../../../../../../../../js/predict/charts.js';
/* src\components\legend-component.svelte generated by Svelte v3.52.0 */ /* src\components\legend-component.svelte generated by Svelte v3.52.0 */

View File

@ -1,6 +1,6 @@
(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(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, v as validate_slots, o as onMount, e as element, n as noop, f as attr_dev, r as set_style, c as add_location, h as detach_dev, p as binding_callbacks } from './index-bc9d3868.js'; 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, j as attr_dev, u as set_style, g as add_location, l as detach_dev, r as binding_callbacks } from './index-3e97afc8.js';
/* src\components\loadscreen-component.svelte generated by Svelte v3.52.0 */ /* src\components\loadscreen-component.svelte generated by Svelte v3.52.0 */
const file = "src\\components\\loadscreen-component.svelte"; const file = "src\\components\\loadscreen-component.svelte";

View File

@ -1,22 +1,562 @@
(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(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, v as validate_slots, o as onMount, n as noop } from './index-bc9d3868.js'; 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, q as globals, v as validate_each_argument, e as element, n as noop, j as attr_dev, g as add_location, k as append_dev, l as detach_dev, D as empty, m as destroy_each, f as space, t as text, H as HtmlTag } from './index-3e97afc8.js';
import { getData } from '../../../../../../../../../js/libraries/serverTools.js';
/* src\manifesto-component.svelte generated by Svelte v3.52.0 */ /* src\manifesto-component.svelte generated by Svelte v3.52.0 */
function create_fragment(ctx) { const { Object: Object_1 } = globals;
const file = "src\\manifesto-component.svelte";
function get_each_context(ctx, list, i) {
const child_ctx = ctx.slice();
child_ctx[3] = list[i];
return child_ctx;
}
function get_each_context_2(ctx, list, i) {
const child_ctx = ctx.slice();
child_ctx[6] = list[i];
return child_ctx;
}
function get_each_context_1(ctx, list, i) {
const child_ctx = ctx.slice();
child_ctx[6] = list[i];
return child_ctx;
}
// (54:16) {#if line!==""}
function create_if_block(ctx) {
let if_block_anchor;
function select_block_type(ctx, dirty) {
if (typeof (/*line*/ ctx[3] === 'object') && Object.keys(/*line*/ ctx[3])[0] == "ul") return create_if_block_1;
if (typeof (/*line*/ ctx[3] === 'object') && Object.keys(/*line*/ ctx[3])[0] == "ol") return create_if_block_2;
if (/*line*/ ctx[3].slice(0, 3) == "###") return create_if_block_3;
if (/*line*/ ctx[3].slice(0, 2) == "##") return create_if_block_4;
if (/*line*/ ctx[3][0] == "#") return create_if_block_5;
return create_else_block;
}
let current_block_type = select_block_type(ctx);
let if_block = current_block_type(ctx);
const block = { const block = {
c: function create() { c: function create() {
if_block.c();
if_block_anchor = empty();
},
m: function mount(target, anchor) {
if_block.m(target, anchor);
insert_dev(target, if_block_anchor, anchor);
},
p: function update(ctx, dirty) {
if_block.p(ctx, dirty);
},
d: function destroy(detaching) {
if_block.d(detaching);
if (detaching) detach_dev(if_block_anchor);
}
};
dispatch_dev("SvelteRegisterBlock", {
block,
id: create_if_block.name,
type: "if",
source: "(54:16) {#if line!==\\\"\\\"}",
ctx
});
return block;
}
// (75:20) {:else}
function create_else_block(ctx) {
let p;
let html_tag;
let raw_value = /*line*/ ctx[3] + "";
let t;
const block = {
c: function create() {
p = element("p");
html_tag = new HtmlTag(false);
t = space();
html_tag.a = t;
attr_dev(p, "class", "margin-end");
add_location(p, file, 75, 24, 2558);
},
m: function mount(target, anchor) {
insert_dev(target, p, anchor);
html_tag.m(raw_value, p);
append_dev(p, t);
},
p: noop,
d: function destroy(detaching) {
if (detaching) detach_dev(p);
}
};
dispatch_dev("SvelteRegisterBlock", {
block,
id: create_else_block.name,
type: "else",
source: "(75:20) {:else}",
ctx
});
return block;
}
// (73:43)
function create_if_block_5(ctx) {
let h1;
let raw_value = /*line*/ ctx[3].slice(2, /*line*/ ctx[3].length) + "";
const block = {
c: function create() {
h1 = element("h1");
add_location(h1, file, 73, 24, 2461);
},
m: function mount(target, anchor) {
insert_dev(target, h1, anchor);
h1.innerHTML = raw_value;
},
p: noop,
d: function destroy(detaching) {
if (detaching) detach_dev(h1);
}
};
dispatch_dev("SvelteRegisterBlock", {
block,
id: create_if_block_5.name,
type: "if",
source: "(73:43) ",
ctx
});
return block;
}
// (71:52)
function create_if_block_4(ctx) {
let h2;
let raw_value = /*line*/ ctx[3].slice(3, /*line*/ ctx[3].length) + "";
const block = {
c: function create() {
h2 = element("h2");
add_location(h2, file, 71, 24, 2348);
},
m: function mount(target, anchor) {
insert_dev(target, h2, anchor);
h2.innerHTML = raw_value;
},
p: noop,
d: function destroy(detaching) {
if (detaching) detach_dev(h2);
}
};
dispatch_dev("SvelteRegisterBlock", {
block,
id: create_if_block_4.name,
type: "if",
source: "(71:52) ",
ctx
});
return block;
}
// (69:53)
function create_if_block_3(ctx) {
let h3;
let raw_value = /*line*/ ctx[3].slice(4, /*line*/ ctx[3].length) + "";
const block = {
c: function create() {
h3 = element("h3");
add_location(h3, file, 69, 24, 2226);
},
m: function mount(target, anchor) {
insert_dev(target, h3, anchor);
h3.innerHTML = raw_value;
},
p: noop,
d: function destroy(detaching) {
if (detaching) detach_dev(h3);
}
};
dispatch_dev("SvelteRegisterBlock", {
block,
id: create_if_block_3.name,
type: "if",
source: "(69:53) ",
ctx
});
return block;
}
// (61:89)
function create_if_block_2(ctx) {
let ol;
let t;
let each_value_2 = /*line*/ ctx[3].ol;
validate_each_argument(each_value_2);
let each_blocks = [];
for (let i = 0; i < each_value_2.length; i += 1) {
each_blocks[i] = create_each_block_2(get_each_context_2(ctx, each_value_2, i));
}
const block = {
c: function create() {
ol = element("ol");
for (let i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].c();
}
t = space();
add_location(ol, file, 61, 24, 1891);
},
m: function mount(target, anchor) {
insert_dev(target, ol, anchor);
for (let i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].m(ol, null);
}
append_dev(ol, t);
},
p: function update(ctx, dirty) {
if (dirty & /*manifesto*/ 2) {
each_value_2 = /*line*/ ctx[3].ol;
validate_each_argument(each_value_2);
let i;
for (i = 0; i < each_value_2.length; i += 1) {
const child_ctx = get_each_context_2(ctx, each_value_2, i);
if (each_blocks[i]) {
each_blocks[i].p(child_ctx, dirty);
} else {
each_blocks[i] = create_each_block_2(child_ctx);
each_blocks[i].c();
each_blocks[i].m(ol, t);
}
}
for (; i < each_blocks.length; i += 1) {
each_blocks[i].d(1);
}
each_blocks.length = each_value_2.length;
}
},
d: function destroy(detaching) {
if (detaching) detach_dev(ol);
destroy_each(each_blocks, detaching);
}
};
dispatch_dev("SvelteRegisterBlock", {
block,
id: create_if_block_2.name,
type: "if",
source: "(61:89) ",
ctx
});
return block;
}
// (55:20) {#if typeof (line === 'object') && (Object.keys(line)[0]=="ul")}
function create_if_block_1(ctx) {
let ul;
let t;
let each_value_1 = /*line*/ ctx[3].ul;
validate_each_argument(each_value_1);
let each_blocks = [];
for (let i = 0; i < each_value_1.length; i += 1) {
each_blocks[i] = create_each_block_1(get_each_context_1(ctx, each_value_1, i));
}
const block = {
c: function create() {
ul = element("ul");
for (let i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].c();
}
t = space();
add_location(ul, file, 55, 24, 1598);
},
m: function mount(target, anchor) {
insert_dev(target, ul, anchor);
for (let i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].m(ul, null);
}
append_dev(ul, t);
},
p: function update(ctx, dirty) {
if (dirty & /*manifesto*/ 2) {
each_value_1 = /*line*/ ctx[3].ul;
validate_each_argument(each_value_1);
let i;
for (i = 0; i < each_value_1.length; i += 1) {
const child_ctx = get_each_context_1(ctx, each_value_1, i);
if (each_blocks[i]) {
each_blocks[i].p(child_ctx, dirty);
} else {
each_blocks[i] = create_each_block_1(child_ctx);
each_blocks[i].c();
each_blocks[i].m(ul, t);
}
}
for (; i < each_blocks.length; i += 1) {
each_blocks[i].d(1);
}
each_blocks.length = each_value_1.length;
}
},
d: function destroy(detaching) {
if (detaching) detach_dev(ul);
destroy_each(each_blocks, detaching);
}
};
dispatch_dev("SvelteRegisterBlock", {
block,
id: create_if_block_1.name,
type: "if",
source: "(55:20) {#if typeof (line === 'object') && (Object.keys(line)[0]==\\\"ul\\\")}",
ctx
});
return block;
}
// (63:28) {#each line.ol as line2}
function create_each_block_2(ctx) {
let li;
let raw_value = /*line2*/ ctx[6] + "";
const block = {
c: function create() {
li = element("li");
add_location(li, file, 63, 32, 1983);
},
m: function mount(target, anchor) {
insert_dev(target, li, anchor);
li.innerHTML = raw_value;
},
p: noop,
d: function destroy(detaching) {
if (detaching) detach_dev(li);
}
};
dispatch_dev("SvelteRegisterBlock", {
block,
id: create_each_block_2.name,
type: "each",
source: "(63:28) {#each line.ol as line2}",
ctx
});
return block;
}
// (57:28) {#each line.ul as line2}
function create_each_block_1(ctx) {
let li;
let t_value = /*line2*/ ctx[6] + "";
let t;
const block = {
c: function create() {
li = element("li");
t = text(t_value);
add_location(li, file, 57, 32, 1690);
},
m: function mount(target, anchor) {
insert_dev(target, li, anchor);
append_dev(li, t);
},
p: noop,
d: function destroy(detaching) {
if (detaching) detach_dev(li);
}
};
dispatch_dev("SvelteRegisterBlock", {
block,
id: create_each_block_1.name,
type: "each",
source: "(57:28) {#each line.ul as line2}",
ctx
});
return block;
}
// (53:12) {#each manifesto as line}
function create_each_block(ctx) {
let if_block_anchor;
let if_block = /*line*/ ctx[3] !== "" && create_if_block(ctx);
const block = {
c: function create() {
if (if_block) if_block.c();
if_block_anchor = empty();
},
m: function mount(target, anchor) {
if (if_block) if_block.m(target, anchor);
insert_dev(target, if_block_anchor, anchor);
},
p: function update(ctx, dirty) {
if (/*line*/ ctx[3] !== "") if_block.p(ctx, dirty);
},
d: function destroy(detaching) {
if (if_block) if_block.d(detaching);
if (detaching) detach_dev(if_block_anchor);
}
};
dispatch_dev("SvelteRegisterBlock", {
block,
id: create_each_block.name,
type: "each",
source: "(53:12) {#each manifesto as line}",
ctx
});
return block;
}
// (52:8) {#key key}
function create_key_block(ctx) {
let each_1_anchor;
let each_value = /*manifesto*/ ctx[1];
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() {
for (let i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].c();
}
each_1_anchor = empty();
},
m: function mount(target, anchor) {
for (let i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].m(target, anchor);
}
insert_dev(target, each_1_anchor, anchor);
},
p: function update(ctx, dirty) {
if (dirty & /*manifesto, Object*/ 2) {
each_value = /*manifesto*/ ctx[1];
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(each_1_anchor.parentNode, each_1_anchor);
}
}
for (; i < each_blocks.length; i += 1) {
each_blocks[i].d(1);
}
each_blocks.length = each_value.length;
}
},
d: function destroy(detaching) {
destroy_each(each_blocks, detaching);
if (detaching) detach_dev(each_1_anchor);
}
};
dispatch_dev("SvelteRegisterBlock", {
block,
id: create_key_block.name,
type: "key",
source: "(52:8) {#key key}",
ctx
});
return block;
}
function create_fragment(ctx) {
let div1;
let div0;
let previous_key = /*key*/ ctx[0];
let key_block = create_key_block(ctx);
const block = {
c: function create() {
div1 = element("div");
div0 = element("div");
key_block.c();
this.c = noop; this.c = noop;
attr_dev(div0, "id", "text-container");
add_location(div0, file, 50, 4, 1369);
attr_dev(div1, "id", "container");
add_location(div1, file, 49, 0, 1343);
}, },
l: function claim(nodes) { l: function claim(nodes) {
throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
}, },
m: noop, m: function mount(target, anchor) {
p: noop, insert_dev(target, div1, anchor);
append_dev(div1, div0);
key_block.m(div0, null);
},
p: function update(ctx, [dirty]) {
if (dirty & /*key*/ 1 && safe_not_equal(previous_key, previous_key = /*key*/ ctx[0])) {
key_block.d(1);
key_block = create_key_block(ctx);
key_block.c();
key_block.m(div0, null);
} else {
key_block.p(ctx, dirty);
}
},
i: noop, i: noop,
o: noop, o: noop,
d: noop d: function destroy(detaching) {
if (detaching) detach_dev(div1);
key_block.d(detaching);
}
}; };
dispatch_dev("SvelteRegisterBlock", { dispatch_dev("SvelteRegisterBlock", {
@ -33,6 +573,41 @@ function create_fragment(ctx) {
function instance($$self, $$props, $$invalidate) { function instance($$self, $$props, $$invalidate) {
let { $$slots: slots = {}, $$scope } = $$props; let { $$slots: slots = {}, $$scope } = $$props;
validate_slots('manifesto-component', slots, []); validate_slots('manifesto-component', slots, []);
let manifesto = [];
let key;
const htmlDelims = ["ul", "ol"];
getData("/assets/manifesto.txt", function (response) {
let splitText = response.split(/\r?\n/);
for (let j = 0; j < splitText.length; j++) {
let line = splitText[j];
let delimInd = htmlDelims.map(x => line.includes("<" + x + ">")).findIndex(x => x);
if (delimInd != -1) {
let delim = htmlDelims[delimInd];
let obj = {};
obj[delim] = [];
let delimEndTag = "</" + delim + ">";
while (true) {
j += 1;
line = splitText[j];
if (line.includes(delimEndTag)) {
manifesto.push(obj);
break;
} else {
obj[delim].push(line);
}
}
} else {
manifesto.push(line);
}
}
$$invalidate(0, key += 1);
});
onMount(() => { onMount(() => {
@ -40,18 +615,34 @@ function instance($$self, $$props, $$invalidate) {
const writable_props = []; const writable_props = [];
Object.keys($$props).forEach(key => { Object_1.keys($$props).forEach(key => {
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<manifesto-component> was created with unknown prop '${key}'`); if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<manifesto-component> was created with unknown prop '${key}'`);
}); });
$$self.$capture_state = () => ({ onMount }); $$self.$capture_state = () => ({
return []; onMount,
getData,
manifesto,
key,
htmlDelims
});
$$self.$inject_state = $$props => {
if ('manifesto' in $$props) $$invalidate(1, manifesto = $$props.manifesto);
if ('key' in $$props) $$invalidate(0, key = $$props.key);
};
if ($$props && "$$inject" in $$props) {
$$self.$inject_state($$props.$$inject);
}
return [key, manifesto];
} }
class Manifesto_component extends SvelteElement { class Manifesto_component extends SvelteElement {
constructor(options) { constructor(options) {
super(); super();
this.shadowRoot.innerHTML = `<style>@import '/css/common.css';</style>`; this.shadowRoot.innerHTML = `<style>@import '/css/common.css';h1{margin-bottom:1rem;font-size:2.5rem;text-align:center}h2{margin-bottom:1rem;text-align:center}h3{margin-bottom:1rem}#text-container{max-width:calc(100vw - 4rem);margin:auto}#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>`;
init( init(
this, this,

View File

@ -0,0 +1,152 @@
(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, p as flush, s as safe_not_equal, d as dispatch_dev, c as validate_slots, o as onMount, e as element, n as noop, j as attr_dev, g as add_location, l as detach_dev, r as binding_callbacks } from './index-3e97afc8.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: '&copy; <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 };

View File

@ -1,6 +1,6 @@
(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(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, v as validate_slots, o as onMount, e as element, q as space, n as noop, z as src_url_equal, f as attr_dev, c as add_location, g as append_dev, u as listen_dev, h as detach_dev, p as binding_callbacks } from './index-bc9d3868.js'; 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, A as src_url_equal, j as attr_dev, g as add_location, k as append_dev, w as listen_dev, l as detach_dev, r as binding_callbacks } from './index-3e97afc8.js';
/* src\navbar\navbar-component.svelte generated by Svelte v3.52.0 */ /* src\navbar\navbar-component.svelte generated by Svelte v3.52.0 */
const file = "src\\navbar\\navbar-component.svelte"; const file = "src\\navbar\\navbar-component.svelte";
@ -76,41 +76,41 @@ function create_fragment(ctx) {
if (!src_url_equal(img.src, img_src_value = "img/common/flag.png")) attr_dev(img, "src", img_src_value); 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, "id", "navbar-logo");
attr_dev(img, "alt", "logo"); attr_dev(img, "alt", "logo");
add_location(img, file, 37, 8, 810); add_location(img, file, 37, 8, 812);
attr_dev(span0, "id", "navbar-logo-text"); attr_dev(span0, "id", "navbar-logo-text");
add_location(span0, file, 38, 8, 879); add_location(span0, file, 38, 8, 881);
attr_dev(a0, "id", "logo-container"); attr_dev(a0, "id", "logo-container");
attr_dev(a0, "href", "/"); attr_dev(a0, "href", "/");
add_location(a0, file, 36, 4, 770); add_location(a0, file, 36, 4, 772);
attr_dev(input, "type", "checkbox"); attr_dev(input, "type", "checkbox");
attr_dev(input, "id", "side-menu"); attr_dev(input, "id", "side-menu");
add_location(input, file, 41, 4, 981); add_location(input, file, 41, 4, 983);
attr_dev(span1, "id", "hamb-line"); attr_dev(span1, "id", "hamb-line");
add_location(span1, file, 42, 37, 1104); add_location(span1, file, 42, 37, 1106);
attr_dev(label, "id", "hamb"); attr_dev(label, "id", "hamb");
attr_dev(label, "for", "side-menu"); attr_dev(label, "for", "side-menu");
add_location(label, file, 42, 4, 1071); add_location(label, file, 42, 4, 1073);
attr_dev(a1, "href", "/manifesto"); attr_dev(a1, "href", "/manifesto");
add_location(a1, file, 46, 16, 1221); add_location(a1, file, 46, 16, 1223);
add_location(li0, file, 46, 12, 1217); add_location(li0, file, 46, 12, 1219);
attr_dev(a2, "href", "/join-us"); attr_dev(a2, "href", "/join-us");
add_location(a2, file, 47, 16, 1278); add_location(a2, file, 47, 16, 1280);
add_location(li1, file, 47, 12, 1274); add_location(li1, file, 47, 12, 1276);
attr_dev(a3, "href", "/groups"); attr_dev(a3, "href", "/groups");
add_location(a3, file, 48, 16, 1331); add_location(a3, file, 48, 16, 1333);
add_location(li2, file, 48, 12, 1327); add_location(li2, file, 48, 12, 1329);
attr_dev(a4, "href", "/communities"); attr_dev(a4, "href", "/communities");
add_location(a4, file, 49, 16, 1382); add_location(a4, file, 49, 16, 1384);
add_location(li3, file, 49, 12, 1378); add_location(li3, file, 49, 12, 1380);
attr_dev(a5, "href", "/cooperatives"); attr_dev(a5, "href", "/cooperatives");
add_location(a5, file, 50, 16, 1443); add_location(a5, file, 50, 16, 1445);
add_location(li4, file, 50, 12, 1439); add_location(li4, file, 50, 12, 1441);
attr_dev(ul, "id", "menu"); attr_dev(ul, "id", "menu");
add_location(ul, file, 45, 8, 1189); add_location(ul, file, 45, 8, 1191);
attr_dev(nav, "id", "nav"); attr_dev(nav, "id", "nav");
add_location(nav, file, 44, 4, 1165); add_location(nav, file, 44, 4, 1167);
attr_dev(header, "id", "navbar"); attr_dev(header, "id", "navbar");
add_location(header, file, 34, 0, 706); add_location(header, file, 34, 0, 708);
}, },
l: function claim(nodes) { l: function claim(nodes) {
throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
@ -183,7 +183,6 @@ function instance($$self, $$props, $$invalidate) {
function changeNavbar() { function changeNavbar() {
if (hambInput.checked) { if (hambInput.checked) {
$$invalidate(1, navbar.style.background = "white", navbar); $$invalidate(1, navbar.style.background = "white", navbar);
$$invalidate(1, navbar.style.boxShadow = "0 0 0.314rem rgb(187, 187, 187)", navbar);
} else { } else {
setTimeout( setTimeout(
() => { () => {

View File

@ -1,6 +1,6 @@
(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(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, v as validate_slots, x as getContext, o as onMount, y as setContext, e as element, q as space, n as noop, f as attr_dev, c as add_location, g as append_dev, h as detach_dev, p as binding_callbacks } from './index-bc9d3868.js'; 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, y as getContext, o as onMount, z as setContext, e as element, f as space, n as noop, j as attr_dev, g as add_location, k as append_dev, l as detach_dev, r as binding_callbacks } from './index-3e97afc8.js';
import { debounce } from '../../../../../../../../../js/libraries/miscTools.js'; import { debounce } from '../../../../../../../../../js/libraries/miscTools.js';
/* src\components\pane-aligner.svelte generated by Svelte v3.52.0 */ /* src\components\pane-aligner.svelte generated by Svelte v3.52.0 */

View File

@ -1,6 +1,6 @@
(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(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, j as flush, s as safe_not_equal, d as dispatch_dev, v as validate_slots, o as onMount, k as validate_each_argument, e as element, n as noop, f as attr_dev, c as add_location, h as detach_dev, p as binding_callbacks, t as text, q as space, z as src_url_equal, r as set_style, g as append_dev, u as listen_dev, w as set_data_dev, m as destroy_each } from './index-bc9d3868.js'; import { S as SvelteElement, i as init, a as attribute_to_object, b as insert_dev, p as flush, s as safe_not_equal, d as dispatch_dev, c as validate_slots, o as onMount, v as validate_each_argument, e as element, n as noop, j as attr_dev, g as add_location, l as detach_dev, r as binding_callbacks, t as text, f as space, A as src_url_equal, u as set_style, k as append_dev, w as listen_dev, x as set_data_dev, m as destroy_each } from './index-3e97afc8.js';
import { px2rem, getTextWidth, getCanvasFont } from '../../../../../../../../../js/libraries/miscTools.js'; import { px2rem, getTextWidth, getCanvasFont } from '../../../../../../../../../js/libraries/miscTools.js';
/* src\components\select-component.svelte generated by Svelte v3.52.0 */ /* src\components\select-component.svelte generated by Svelte v3.52.0 */

View File

@ -1,6 +1,6 @@
(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(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, j as flush, s as safe_not_equal, d as dispatch_dev, v as validate_slots, o as onMount, e as element, q as space, n as noop, f as attr_dev, c as add_location, g as append_dev, u as listen_dev, h as detach_dev, A as run_all } from './index-bc9d3868.js'; import { S as SvelteElement, i as init, a as attribute_to_object, b as insert_dev, p 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, j as attr_dev, g as add_location, k as append_dev, w as listen_dev, l as detach_dev, B as run_all } from './index-3e97afc8.js';
import { px2rem, getTextWidth, getCanvasFont } from '../../../../../../../../../js/libraries/miscTools.js'; import { px2rem, getTextWidth, getCanvasFont } from '../../../../../../../../../js/libraries/miscTools.js';
/* src\components\switch-component.svelte generated by Svelte v3.52.0 */ /* src\components\switch-component.svelte generated by Svelte v3.52.0 */

51
Server/public/js/coops.js Normal file
View File

@ -0,0 +1,51 @@
export let coops = [
{
logo: "chiron_logo",
name: "Chiron Health",
location: ["Estonia, Kohtla-Järve",[59.40338782864918, 27.286240058760324]],
market: "wellness and health",
workers: 2,
status: "launch in 2 months",
website: "chrn.health",
contact: ["https://chat.whatsapp.com/BhnmUNljUxJ2AjeHUwyTKh","WhatsApp invite link"],
description: "Chiron Health is a health platform providing courses and services on the topics of nutrition, exercise, sleep and mental wellbeing.",
},
{
logo: "kuusk_logo",
name: "Kuusk",
location: ["Estonia, Kohtla-Järve",[59.405466538976185, 27.289104862336302]],
market: "herbal teas",
workers: 1,
status: "launch in TBD months",
website: "-",
contact: ["https://chat.whatsapp.com/BhnmUNljUxJ2AjeHUwyTKh","WhatsApp invite link"],
description: "Kuusk is an online store that sells herbal teas from exclusively local wild plants, as well as an online gathering course.",
}
]
export function addMarkersCoops(map) {
for (let g of coops) {
let coordinates
let text = ""
for (let field in g) {
let fieldText = "<b>" + field[0].toUpperCase() + field.slice(1) + ": " + "</b>"
if (field=="logo") {
text += "<picture><source srcset=" + "/img/coops/" + g.logo + ".webp><source srcset='/img/coops/" + g.logo + ".png'><img alt='logo' style='position: relative; max-height: 5rem; max-width: 100%; margin: auto;'></picture>" + "<br>"
}
else if (field=="contact") {
text += fieldText + "<a href='https://www." + g.contact[0] + "' target='_blank' rel=noreferrer>" + g.contact[1] + "</a>" + "<br>"
}
else if (field=="website") {
text += fieldText + "<a href='" + g.website + "' target='_blank' rel=noreferrer>" + g.website + "</a>" + "<br>"
}
else if (field=="location") {
text += fieldText + g[field][0] + "<br>"
coordinates = g[field][1]
}
else {
text += fieldText + g[field] + "<br>"
}
}
L.marker(coordinates).addTo(map).bindPopup(text)
}
}

View File

@ -0,0 +1,37 @@
export let groups = [
{
location: ["Estonia, Kohtla-Järve",[59.40629447076191, 27.280605339416322]],
members: 3,
contact: ["https://chat.whatsapp.com/BhnmUNljUxJ2AjeHUwyTKh","WhatsApp invite link"]
}
]
export function addMarkersGroups(map) {
for (let g of groups) {
let coordinates
let text = ""
for (let field in g) {
let fieldText = field[0].toUpperCase() + field.slice(1) + ": "
if (field=="contact") {
text += fieldText + "<a href='" + g.contact[0] + "' target='_blank' rel=noreferrer>" + g.contact[1] + "</a>"
}
else if (field=="location") {
text += fieldText + g[field][0] + "<br>"
coordinates = g[field][1]
}
else {
text += fieldText + g[field] + "<br>"
}
}
var greenIcon = new L.Icon({
iconUrl: 'https://raw.githubusercontent.com/pointhi/leaflet-color-markers/master/img/marker-icon-2x-green.png',
shadowUrl: 'https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.7/images/marker-shadow.png',
iconSize: [25, 41],
iconAnchor: [12, 41],
popupAnchor: [1, -34],
shadowSize: [41, 41]
});
let marker = L.marker(coordinates, {icon: greenIcon})
marker.addTo(map).bindPopup(text)
}
}