From d84e9022dbecb3ef391991a92f8486c94a8f03ea Mon Sep 17 00:00:00 2001 From: a-ill Date: Mon, 10 Jul 2023 14:09:25 +0300 Subject: [PATCH] Update --- Server/app/svelte/public/js/communities.js | 6 + .../locales/en/communities-component.json | 4 +- .../locales/ru/communities-component.json | 4 +- Server/public/js/communities.js | 6 + .../js/components/communities-component.js | 441 +---- .../public/js/components/compass-component.js | 672 +------- Server/public/js/components/cookies-dialog.js | 100 +- .../js/components/cooperatives-component.js | 592 +------ .../public/js/components/footer-component.js | 308 +--- .../public/js/components/groups-component.js | 429 +---- .../public/js/components/join-us-component.js | 517 +----- .../public/js/components/landing-component.js | 365 +---- .../public/js/components/legend-component.js | 363 +---- .../js/components/loadscreen-component.js | 116 +- .../js/components/manifesto-component.js | 1446 +---------------- Server/public/js/components/map-component.js | 157 +- .../public/js/components/navbar-component.js | 577 +------ Server/public/js/components/pane-aligner.js | 305 +--- .../js/components/partners-component.js | 454 +----- .../public/js/components/select-component.js | 594 +------ .../public/js/components/switch-component.js | 210 +-- .../locales/en/communities-component.json | 4 +- .../locales/ru/communities-component.json | 4 +- 23 files changed, 41 insertions(+), 7633 deletions(-) diff --git a/Server/app/svelte/public/js/communities.js b/Server/app/svelte/public/js/communities.js index 2da3c9c..f37f1a7 100644 --- a/Server/app/svelte/public/js/communities.js +++ b/Server/app/svelte/public/js/communities.js @@ -1,5 +1,11 @@ export let communities = [ + { + location: ["CanadaMontreal",[44.654781585774785, -63.61076905562609]], + status: "forming", + members: 2, + contact: ["https://discord.gg/xAPZmyr8B6","DiscordInviteLink"] + }, { location: ["EstoniaKohtlaJarve",[59.409521829709504, 27.288415912535914]], status: "forming", diff --git a/Server/app/svelte/public/locales/en/communities-component.json b/Server/app/svelte/public/locales/en/communities-component.json index e9e56c5..c32c2a1 100644 --- a/Server/app/svelte/public/locales/en/communities-component.json +++ b/Server/app/svelte/public/locales/en/communities-component.json @@ -9,5 +9,7 @@ "contact": "Contact", "EstoniaKohtlaJarve": "Estonia, Kohtla-Järve", "forming": "forming", - "WhatsAppInviteLink": "WhatsApp invite link" + "WhatsAppInviteLink": "WhatsApp invite link", + "DiscordInviteLink": "Discord invite link", + "CanadaMontreal": "Canada, Montreal" } \ No newline at end of file diff --git a/Server/app/svelte/public/locales/ru/communities-component.json b/Server/app/svelte/public/locales/ru/communities-component.json index 846691e..d0883f1 100644 --- a/Server/app/svelte/public/locales/ru/communities-component.json +++ b/Server/app/svelte/public/locales/ru/communities-component.json @@ -9,5 +9,7 @@ "contact": "Контакт", "EstoniaKohtlaJarve": "Эстония, Кохтла-Ярве", "forming": "формируется", - "WhatsAppInviteLink": "WhatsApp ссылка" + "WhatsAppInviteLink": "WhatsApp ссылка", + "DiscordInviteLink": "Discord ссылка", + "CanadaMontreal": "Канада, Монреаль" } \ No newline at end of file diff --git a/Server/public/js/communities.js b/Server/public/js/communities.js index 2da3c9c..f37f1a7 100644 --- a/Server/public/js/communities.js +++ b/Server/public/js/communities.js @@ -1,5 +1,11 @@ export let communities = [ + { + location: ["CanadaMontreal",[44.654781585774785, -63.61076905562609]], + status: "forming", + members: 2, + contact: ["https://discord.gg/xAPZmyr8B6","DiscordInviteLink"] + }, { location: ["EstoniaKohtlaJarve",[59.409521829709504, 27.288415912535914]], status: "forming", diff --git a/Server/public/js/components/communities-component.js b/Server/public/js/components/communities-component.js index 371112b..316730b 100644 --- a/Server/public/js/components/communities-component.js +++ b/Server/public/js/components/communities-component.js @@ -1,440 +1 @@ - -(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, c as validate_store, e as component_subscribe, o as onMount, g as globals, f as validate_each_argument, h as empty, n as noop, j as detach_dev, k as element, t as text, l as space, m as add_location, p as attr_dev, q as src_url_equal, r as set_custom_element_data, u as append_dev, w as set_data_dev, x as destroy_each } from './index-42a25c61.js'; -import { w as writable } from './index-a1c185ea.js'; -import { communities, addMarkersCommunities } from '../../../../../../../../../js/communities.js'; -import { loadLocaleContent } from '../../../../../../../../../js/libraries/serverTools.js'; -import '../../../../../../../../../js/components/map-component.js'; - -/* src\communities-component.svelte generated by Svelte v3.52.0 */ - -const { Object: Object_1 } = globals; - -const file = "src\\communities-component.svelte"; - -function get_each_context(ctx, list, i) { - const child_ctx = ctx.slice(); - child_ctx[6] = list[i]; - return child_ctx; -} - -// (30:4) {#if Object.keys($content).length!=0} -function create_if_block(ctx) { - let div1; - let div0; - let h1; - let t0_value = /*$content*/ ctx[0].heading + ""; - let t0; - let t1; - let img; - let img_src_value; - let t2; - let p; - let t3_value = /*$content*/ ctx[0].p1 + ""; - let t3; - let t4; - let h3; - let t5_value = /*$content*/ ctx[0].subheading1 + ""; - let t5; - let t6; - let map_component; - let map_component_callback_value; - let t7; - let h4; - let t8_value = /*$content*/ ctx[0].subheading2 + ""; - let t8; - let t9; - let each_value = communities; - validate_each_argument(each_value); - let each_blocks = []; - - for (let i = 0; i < each_value.length; i += 1) { - each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i)); - } - - const block = { - c: function create() { - div1 = element("div"); - div0 = element("div"); - h1 = element("h1"); - t0 = text(t0_value); - t1 = space(); - img = element("img"); - t2 = space(); - p = element("p"); - t3 = text(t3_value); - t4 = space(); - h3 = element("h3"); - t5 = text(t5_value); - t6 = space(); - map_component = element("map-component"); - t7 = space(); - h4 = element("h4"); - t8 = text(t8_value); - t9 = space(); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].c(); - } - - add_location(h1, file, 33, 16, 960); - attr_dev(img, "id", "communities-img"); - if (!src_url_equal(img.src, img_src_value = "/img/common/communities.svg")) attr_dev(img, "src", img_src_value); - attr_dev(img, "alt", "communities"); - add_location(img, file, 34, 16, 1005); - add_location(p, file, 35, 16, 1101); - add_location(h3, file, 36, 16, 1139); - set_custom_element_data(map_component, "id", "map"); - set_custom_element_data(map_component, "callback", map_component_callback_value = /*func*/ ctx[5]); - add_location(map_component, file, 37, 16, 1188); - add_location(h4, file, 38, 16, 1322); - attr_dev(div0, "id", "text-container"); - add_location(div0, file, 32, 12, 917); - attr_dev(div1, "id", "container"); - add_location(div1, file, 30, 8, 814); - }, - m: function mount(target, anchor) { - insert_dev(target, div1, anchor); - append_dev(div1, div0); - append_dev(div0, h1); - append_dev(h1, t0); - append_dev(div0, t1); - append_dev(div0, img); - append_dev(div0, t2); - append_dev(div0, p); - append_dev(p, t3); - append_dev(div0, t4); - append_dev(div0, h3); - append_dev(h3, t5); - append_dev(div0, t6); - append_dev(div0, map_component); - append_dev(div0, t7); - append_dev(div0, h4); - append_dev(h4, t8); - append_dev(div0, t9); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].m(div0, null); - } - }, - p: function update(ctx, dirty) { - if (dirty & /*$content*/ 1 && t0_value !== (t0_value = /*$content*/ ctx[0].heading + "")) set_data_dev(t0, t0_value); - if (dirty & /*$content*/ 1 && t3_value !== (t3_value = /*$content*/ ctx[0].p1 + "")) set_data_dev(t3, t3_value); - if (dirty & /*$content*/ 1 && t5_value !== (t5_value = /*$content*/ ctx[0].subheading1 + "")) set_data_dev(t5, t5_value); - - if (dirty & /*$content*/ 1 && map_component_callback_value !== (map_component_callback_value = /*func*/ ctx[5])) { - set_custom_element_data(map_component, "callback", map_component_callback_value); - } - - if (dirty & /*$content*/ 1 && t8_value !== (t8_value = /*$content*/ ctx[0].subheading2 + "")) set_data_dev(t8, t8_value); - - if (dirty & /*communities, $content*/ 1) { - 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; - } - }, - d: function destroy(detaching) { - if (detaching) detach_dev(div1); - destroy_each(each_blocks, detaching); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_if_block.name, - type: "if", - source: "(30:4) {#if Object.keys($content).length!=0}", - ctx - }); - - return block; -} - -// (40:16) {#each communities as community} -function create_each_block(ctx) { - let div; - let p0; - let b0; - let t0_value = /*$content*/ ctx[0].location + ""; - let t0; - let t1; - let t2_value = /*$content*/ ctx[0][/*community*/ ctx[6].location[0]] + ""; - let t2; - let t3; - let p1; - let b1; - let t4_value = /*$content*/ ctx[0].status + ""; - let t4; - let t5; - let t6_value = /*$content*/ ctx[0][/*community*/ ctx[6].status] + ""; - let t6; - let t7; - let p2; - let b2; - let t8_value = /*$content*/ ctx[0].members + ""; - let t8; - let t9; - let t10_value = /*community*/ ctx[6].members + ""; - let t10; - let t11; - let p3; - let b3; - let t12_value = /*$content*/ ctx[0].contact + ""; - let t12; - let t13; - let a; - let t14_value = /*$content*/ ctx[0][/*community*/ ctx[6].contact[1]] + ""; - let t14; - let t15; - - const block = { - c: function create() { - div = element("div"); - p0 = element("p"); - b0 = element("b"); - t0 = text(t0_value); - t1 = text(": "); - t2 = text(t2_value); - t3 = space(); - p1 = element("p"); - b1 = element("b"); - t4 = text(t4_value); - t5 = text(": "); - t6 = text(t6_value); - t7 = space(); - p2 = element("p"); - b2 = element("b"); - t8 = text(t8_value); - t9 = text(": "); - t10 = text(t10_value); - t11 = space(); - p3 = element("p"); - b3 = element("b"); - t12 = text(t12_value); - t13 = text(": "); - a = element("a"); - t14 = text(t14_value); - t15 = space(); - add_location(b0, file, 41, 27, 1481); - add_location(p0, file, 41, 24, 1478); - add_location(b1, file, 42, 27, 1575); - add_location(p1, file, 42, 24, 1572); - add_location(b2, file, 43, 27, 1662); - add_location(p2, file, 43, 24, 1659); - add_location(b3, file, 44, 27, 1741); - attr_dev(a, "href", /*community*/ ctx[6].contact[0]); - attr_dev(a, "target", ";_blank;"); - attr_dev(a, "rel", "noreferrer"); - add_location(a, file, 44, 54, 1768); - add_location(p3, file, 44, 24, 1738); - attr_dev(div, "class", "location-info"); - add_location(div, file, 40, 20, 1425); - }, - m: function mount(target, anchor) { - insert_dev(target, div, anchor); - append_dev(div, p0); - append_dev(p0, b0); - append_dev(b0, t0); - append_dev(b0, t1); - append_dev(p0, t2); - append_dev(div, t3); - append_dev(div, p1); - append_dev(p1, b1); - append_dev(b1, t4); - append_dev(b1, t5); - append_dev(p1, t6); - append_dev(div, t7); - append_dev(div, p2); - append_dev(p2, b2); - append_dev(b2, t8); - append_dev(b2, t9); - append_dev(p2, t10); - append_dev(div, t11); - append_dev(div, p3); - append_dev(p3, b3); - append_dev(b3, t12); - append_dev(b3, t13); - append_dev(p3, a); - append_dev(a, t14); - append_dev(div, t15); - }, - p: function update(ctx, dirty) { - if (dirty & /*$content*/ 1 && t0_value !== (t0_value = /*$content*/ ctx[0].location + "")) set_data_dev(t0, t0_value); - if (dirty & /*$content*/ 1 && t2_value !== (t2_value = /*$content*/ ctx[0][/*community*/ ctx[6].location[0]] + "")) set_data_dev(t2, t2_value); - if (dirty & /*$content*/ 1 && t4_value !== (t4_value = /*$content*/ ctx[0].status + "")) set_data_dev(t4, t4_value); - if (dirty & /*$content*/ 1 && t6_value !== (t6_value = /*$content*/ ctx[0][/*community*/ ctx[6].status] + "")) set_data_dev(t6, t6_value); - if (dirty & /*$content*/ 1 && t8_value !== (t8_value = /*$content*/ ctx[0].members + "")) set_data_dev(t8, t8_value); - if (dirty & /*$content*/ 1 && t12_value !== (t12_value = /*$content*/ ctx[0].contact + "")) set_data_dev(t12, t12_value); - if (dirty & /*$content*/ 1 && t14_value !== (t14_value = /*$content*/ ctx[0][/*community*/ ctx[6].contact[1]] + "")) set_data_dev(t14, t14_value); - }, - d: function destroy(detaching) { - if (detaching) detach_dev(div); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_each_block.name, - type: "each", - source: "(40:16) {#each communities as community}", - ctx - }); - - return block; -} - -function create_fragment(ctx) { - let show_if = Object.keys(/*$content*/ ctx[0]).length != 0; - let if_block_anchor; - let if_block = show_if && create_if_block(ctx); - - const block = { - c: function create() { - if (if_block) if_block.c(); - if_block_anchor = empty(); - this.c = noop; - }, - 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) { - if (if_block) if_block.m(target, anchor); - insert_dev(target, if_block_anchor, anchor); - }, - p: function update(ctx, [dirty]) { - if (dirty & /*$content*/ 1) show_if = Object.keys(/*$content*/ ctx[0]).length != 0; - - if (show_if) { - if (if_block) { - if_block.p(ctx, dirty); - } else { - if_block = create_if_block(ctx); - if_block.c(); - if_block.m(if_block_anchor.parentNode, if_block_anchor); - } - } else if (if_block) { - if_block.d(1); - if_block = null; - } - }, - i: noop, - o: noop, - d: function destroy(detaching) { - if (if_block) if_block.d(detaching); - if (detaching) detach_dev(if_block_anchor); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_fragment.name, - type: "component", - source: "", - ctx - }); - - return block; -} - -function instance($$self, $$props, $$invalidate) { - let $content; - let { $$slots: slots = {}, $$scope } = $$props; - validate_slots('communities-component', slots, []); - let loaded; - let content = writable({}); - validate_store(content, 'content'); - component_subscribe($$self, content, value => $$invalidate(0, $content = value)); - let locale = loadLocaleContent(content, "communities-component", loaded); - - function mapCallbackCommunities(createMap, content) { - let map = createMap([51.505, -0.09], 3); - addMarkersCommunities(map, content); - } - - onMount(() => { - - }); - - const writable_props = []; - - Object_1.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(` was created with unknown prop '${key}'`); - }); - - const func = createMap => mapCallbackCommunities(createMap, $content); - - $$self.$capture_state = () => ({ - onMount, - writable, - communities, - addMarkersCommunities, - loadLocaleContent, - loaded, - content, - locale, - mapCallbackCommunities, - $content - }); - - $$self.$inject_state = $$props => { - if ('loaded' in $$props) $$invalidate(1, loaded = $$props.loaded); - if ('content' in $$props) $$invalidate(2, content = $$props.content); - if ('locale' in $$props) $$invalidate(3, locale = $$props.locale); - }; - - if ($$props && "$$inject" in $$props) { - $$self.$inject_state($$props.$$inject); - } - - return [$content, loaded, content, locale, mapCallbackCommunities, func]; -} - -class Communities_component extends SvelteElement { - constructor(options) { - super(); - this.shadowRoot.innerHTML = ``; - - init( - this, - { - target: this.shadowRoot, - props: attribute_to_object(this.attributes), - customElement: true - }, - instance, - create_fragment, - safe_not_equal, - {}, - null - ); - - if (options) { - if (options.target) { - insert_dev(options.target, this, options.anchor); - } - } - } -} - -customElements.define("communities-component", Communities_component); - -export { Communities_component as default }; +import{S as t,i as o,a as n,b as e,s as i,e as a,n as m,d as s,c as r,o as c,f as l,t as g,g as p,h as u,j as h,k as d,l as b,m as f,p as x}from"./index-4348483d.js";import{w as j}from"./index-71440b21.js";import{communities as v,addMarkersCommunities as w}from"../../../../../../../../../js/communities.js";import{loadLocaleContent as k}from"../../../../../../../../../js/libraries/serverTools.js";import"../../../../../../../../../js/components/map-component.js";function y(t,o,n){const e=t.slice();return e[6]=o[n],e}function z(t){let o,n,i,a,m,r,c,j,w,k,z,E,O,R,T,A,C,H,L,M,N=t[0].heading+"",S=t[0].p1+"",_=t[0].subheading1+"",q=t[0].subheading2+"",B=v,F=[];for(let o=0;on(0,e=t)));let m=k(a,"communities-component",i);function s(t,o){let n=t([51.505,-.09],3);w(n,o)}c((()=>{}));return[e,i,a,m,s,t=>s(t,e)]}class R extends t{constructor(t){super(),this.shadowRoot.innerHTML="",o(this,{target:this.shadowRoot,props:n(this.attributes),customElement:!0},O,E,i,{},null),t&&t.target&&e(t.target,this,t.anchor)}}customElements.define("communities-component",R);export{R as default}; diff --git a/Server/public/js/components/compass-component.js b/Server/public/js/components/compass-component.js index 0e5f4d7..8452d79 100644 --- a/Server/public/js/components/compass-component.js +++ b/Server/public/js/components/compass-component.js @@ -1,671 +1 @@ - -(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, c as validate_store, e as component_subscribe, o as onMount, g as globals, h as empty, n as noop, j as detach_dev, k as element, t as text, l as space, m as add_location, p as attr_dev, q as src_url_equal, u as append_dev, w as set_data_dev, f as validate_each_argument, y as listen_dev, x as destroy_each, z as run_all, A as prop_dev } from './index-42a25c61.js'; -import { w as writable } from './index-a1c185ea.js'; -import { loadLocaleContent } from '../../../../../../../../../js/libraries/serverTools.js'; -import { shuffleArray } from '../../../../../../../../../js/libraries/miscTools.js'; - -/* src\compass-component.svelte generated by Svelte v3.52.0 */ - -const { Object: Object_1 } = globals; -const file = "src\\compass-component.svelte"; - -function get_each_context(ctx, list, i) { - const child_ctx = ctx.slice(); - child_ctx[18] = list[i]; - child_ctx[20] = i; - return child_ctx; -} - -// (56:4) {#if Object.keys($content).length!=0} -function create_if_block(ctx) { - let div1; - let div0; - let h1; - let t0_value = /*$content*/ ctx[5].heading + ""; - let t0; - let t1; - let img; - let img_src_value; - let t2; - let previous_key = /*qTag*/ ctx[0]; - let key_block = create_key_block(ctx); - - const block = { - c: function create() { - div1 = element("div"); - div0 = element("div"); - h1 = element("h1"); - t0 = text(t0_value); - t1 = space(); - img = element("img"); - t2 = space(); - key_block.c(); - add_location(h1, file, 58, 16, 1714); - attr_dev(img, "id", "compass-img"); - if (!src_url_equal(img.src, img_src_value = "/img/common/compass.svg")) attr_dev(img, "src", img_src_value); - attr_dev(img, "alt", "compass"); - add_location(img, file, 59, 16, 1759); - attr_dev(div0, "id", "text-container"); - add_location(div0, file, 57, 12, 1671); - attr_dev(div1, "id", "container"); - add_location(div1, file, 56, 8, 1637); - }, - m: function mount(target, anchor) { - insert_dev(target, div1, anchor); - append_dev(div1, div0); - append_dev(div0, h1); - append_dev(h1, t0); - append_dev(div0, t1); - append_dev(div0, img); - append_dev(div0, t2); - key_block.m(div0, null); - }, - p: function update(ctx, dirty) { - if (dirty & /*$content*/ 32 && t0_value !== (t0_value = /*$content*/ ctx[5].heading + "")) set_data_dev(t0, t0_value); - - if (dirty & /*qTag*/ 1 && safe_not_equal(previous_key, previous_key = /*qTag*/ 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); - } - }, - d: function destroy(detaching) { - if (detaching) detach_dev(div1); - key_block.d(detaching); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_if_block.name, - type: "if", - source: "(56:4) {#if Object.keys($content).length!=0}", - ctx - }); - - return block; -} - -// (73:16) {:else} -function create_else_block(ctx) { - let p; - let t1; - let ul; - let li0; - let t2; - let span0; - let t3; - let t4; - let t5; - let li1; - let t6; - let span1; - let t7; - let t8; - let t9; - let li2; - let t10; - let span2; - let t11; - let t12; - let t13; - let button; - let mounted; - let dispose; - - const block = { - c: function create() { - p = element("p"); - p.textContent = "You are compatible with ..."; - t1 = space(); - ul = element("ul"); - li0 = element("li"); - t2 = text("capitalism by "); - span0 = element("span"); - t3 = text(/*capitalismScore*/ ctx[2]); - t4 = text("%"); - t5 = space(); - li1 = element("li"); - t6 = text("vanguardism by "); - span1 = element("span"); - t7 = text(/*vanguardismScore*/ ctx[3]); - t8 = text("%"); - t9 = space(); - li2 = element("li"); - t10 = text("libertarian socialism by "); - span2 = element("span"); - t11 = text(/*socialismScore*/ ctx[4]); - t12 = text("%"); - t13 = space(); - button = element("button"); - button.textContent = "back"; - add_location(p, file, 73, 20, 2686); - add_location(span0, file, 75, 42, 2811); - add_location(li0, file, 75, 24, 2793); - add_location(span1, file, 76, 43, 2892); - add_location(li1, file, 76, 24, 2873); - add_location(span2, file, 77, 53, 2984); - add_location(li2, file, 77, 24, 2955); - attr_dev(ul, "class", "results-list"); - add_location(ul, file, 74, 20, 2742); - attr_dev(button, "class", "quiz-buttons"); - add_location(button, file, 79, 20, 3068); - }, - m: function mount(target, anchor) { - insert_dev(target, p, anchor); - insert_dev(target, t1, anchor); - insert_dev(target, ul, anchor); - append_dev(ul, li0); - append_dev(li0, t2); - append_dev(li0, span0); - append_dev(span0, t3); - append_dev(li0, t4); - append_dev(ul, t5); - append_dev(ul, li1); - append_dev(li1, t6); - append_dev(li1, span1); - append_dev(span1, t7); - append_dev(li1, t8); - append_dev(ul, t9); - append_dev(ul, li2); - append_dev(li2, t10); - append_dev(li2, span2); - append_dev(span2, t11); - append_dev(li2, t12); - insert_dev(target, t13, anchor); - insert_dev(target, button, anchor); - - if (!mounted) { - dispose = listen_dev(button, "click", /*click_handler_3*/ ctx[15], false, false, false); - mounted = true; - } - }, - p: function update(ctx, dirty) { - if (dirty & /*capitalismScore*/ 4) set_data_dev(t3, /*capitalismScore*/ ctx[2]); - if (dirty & /*vanguardismScore*/ 8) set_data_dev(t7, /*vanguardismScore*/ ctx[3]); - if (dirty & /*socialismScore*/ 16) set_data_dev(t11, /*socialismScore*/ ctx[4]); - }, - d: function destroy(detaching) { - if (detaching) detach_dev(p); - if (detaching) detach_dev(t1); - if (detaching) detach_dev(ul); - if (detaching) detach_dev(t13); - if (detaching) detach_dev(button); - mounted = false; - dispose(); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_else_block.name, - type: "else", - source: "(73:16) {:else}", - ctx - }); - - return block; -} - -// (62:16) {#if qTag!=$content.qs.length} -function create_if_block_1(ctx) { - let p; - let t0_value = /*$content*/ ctx[5].qs[/*qTag*/ ctx[0]].q + ""; - let t0; - let t1; - let div; - let t2; - let button0; - let button1; - let mounted; - let dispose; - let each_value = /*$content*/ ctx[5].qs[/*qTag*/ ctx[0]].as; - 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() { - p = element("p"); - t0 = text(t0_value); - t1 = space(); - div = element("div"); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].c(); - } - - t2 = space(); - button0 = element("button"); - button0.textContent = "back"; - button1 = element("button"); - button1.textContent = "next"; - add_location(p, file, 62, 20, 1924); - attr_dev(div, "class", "quiz-inputs"); - add_location(div, file, 63, 20, 1974); - attr_dev(button0, "class", "quiz-buttons"); - add_location(button0, file, 71, 20, 2499); - attr_dev(button1, "class", "quiz-buttons"); - add_location(button1, file, 71, 90, 2569); - }, - m: function mount(target, anchor) { - insert_dev(target, p, anchor); - append_dev(p, t0); - insert_dev(target, t1, anchor); - insert_dev(target, div, anchor); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].m(div, null); - } - - insert_dev(target, t2, anchor); - insert_dev(target, button0, anchor); - insert_dev(target, button1, anchor); - - if (!mounted) { - dispose = [ - listen_dev(button0, "click", /*click_handler_1*/ ctx[13], false, false, false), - listen_dev(button1, "click", /*click_handler_2*/ ctx[14], false, false, false) - ]; - - mounted = true; - } - }, - p: function update(ctx, dirty) { - if (dirty & /*$content, qTag*/ 33 && t0_value !== (t0_value = /*$content*/ ctx[5].qs[/*qTag*/ ctx[0]].q + "")) set_data_dev(t0, t0_value); - - if (dirty & /*answers, qTag, $content*/ 35) { - each_value = /*$content*/ ctx[5].qs[/*qTag*/ ctx[0]].as; - validate_each_argument(each_value); - let i; - - for (i = 0; i < each_value.length; i += 1) { - const child_ctx = get_each_context(ctx, each_value, i); - - if (each_blocks[i]) { - each_blocks[i].p(child_ctx, dirty); - } else { - each_blocks[i] = create_each_block(child_ctx); - each_blocks[i].c(); - each_blocks[i].m(div, null); - } - } - - for (; i < each_blocks.length; i += 1) { - each_blocks[i].d(1); - } - - each_blocks.length = each_value.length; - } - }, - d: function destroy(detaching) { - if (detaching) detach_dev(p); - if (detaching) detach_dev(t1); - if (detaching) detach_dev(div); - destroy_each(each_blocks, detaching); - if (detaching) detach_dev(t2); - if (detaching) detach_dev(button0); - if (detaching) detach_dev(button1); - mounted = false; - run_all(dispose); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_if_block_1.name, - type: "if", - source: "(62:16) {#if qTag!=$content.qs.length}", - ctx - }); - - return block; -} - -// (65:24) {#each $content.qs[qTag].as as a,i} -function create_each_block(ctx) { - let div; - let input; - let input_value_value; - let t0; - let button; - let t1_value = /*a*/ ctx[18][0] + ""; - let t1; - let t2; - let mounted; - let dispose; - - function click_handler() { - return /*click_handler*/ ctx[12](/*a*/ ctx[18]); - } - - const block = { - c: function create() { - div = element("div"); - input = element("input"); - t0 = space(); - button = element("button"); - t1 = text(t1_value); - t2 = space(); - attr_dev(input, "type", "radio"); - attr_dev(input, "id", "option" + /*i*/ ctx[20]); - attr_dev(input, "name", "options"); - input.__value = input_value_value = /*a*/ ctx[18][1]; - input.value = input.__value; - /*$$binding_groups*/ ctx[11][0].push(input); - add_location(input, file, 66, 32, 2153); - attr_dev(button, "class", "input-label"); - attr_dev(button, "for", "option" + /*i*/ ctx[20]); - add_location(button, file, 67, 32, 2278); - attr_dev(div, "class", "radio-container"); - add_location(div, file, 65, 28, 2090); - }, - m: function mount(target, anchor) { - insert_dev(target, div, anchor); - append_dev(div, input); - input.checked = input.__value === /*answers*/ ctx[1][/*qTag*/ ctx[0]]; - append_dev(div, t0); - append_dev(div, button); - append_dev(button, t1); - append_dev(div, t2); - - if (!mounted) { - dispose = [ - listen_dev(input, "change", /*input_change_handler*/ ctx[10]), - listen_dev(button, "click", click_handler, false, false, false) - ]; - - mounted = true; - } - }, - p: function update(new_ctx, dirty) { - ctx = new_ctx; - - if (dirty & /*$content, qTag*/ 33 && input_value_value !== (input_value_value = /*a*/ ctx[18][1])) { - prop_dev(input, "__value", input_value_value); - input.value = input.__value; - } - - if (dirty & /*answers, qTag*/ 3) { - input.checked = input.__value === /*answers*/ ctx[1][/*qTag*/ ctx[0]]; - } - - if (dirty & /*$content, qTag*/ 33 && t1_value !== (t1_value = /*a*/ ctx[18][0] + "")) set_data_dev(t1, t1_value); - }, - d: function destroy(detaching) { - if (detaching) detach_dev(div); - /*$$binding_groups*/ ctx[11][0].splice(/*$$binding_groups*/ ctx[11][0].indexOf(input), 1); - mounted = false; - run_all(dispose); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_each_block.name, - type: "each", - source: "(65:24) {#each $content.qs[qTag].as as a,i}", - ctx - }); - - return block; -} - -// (61:16) {#key qTag} -function create_key_block(ctx) { - let if_block_anchor; - - function select_block_type(ctx, dirty) { - if (/*qTag*/ ctx[0] != /*$content*/ ctx[5].qs.length) return create_if_block_1; - return create_else_block; - } - - let current_block_type = select_block_type(ctx); - let if_block = current_block_type(ctx); - - const block = { - 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 (current_block_type === (current_block_type = select_block_type(ctx)) && if_block) { - if_block.p(ctx, dirty); - } else { - if_block.d(1); - if_block = current_block_type(ctx); - - if (if_block) { - if_block.c(); - if_block.m(if_block_anchor.parentNode, if_block_anchor); - } - } - }, - d: function destroy(detaching) { - if_block.d(detaching); - if (detaching) detach_dev(if_block_anchor); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_key_block.name, - type: "key", - source: "(61:16) {#key qTag}", - ctx - }); - - return block; -} - -function create_fragment(ctx) { - let show_if = Object.keys(/*$content*/ ctx[5]).length != 0; - let if_block_anchor; - let if_block = show_if && create_if_block(ctx); - - const block = { - c: function create() { - if (if_block) if_block.c(); - if_block_anchor = empty(); - this.c = noop; - }, - 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) { - if (if_block) if_block.m(target, anchor); - insert_dev(target, if_block_anchor, anchor); - }, - p: function update(ctx, [dirty]) { - if (dirty & /*$content*/ 32) show_if = Object.keys(/*$content*/ ctx[5]).length != 0; - - if (show_if) { - if (if_block) { - if_block.p(ctx, dirty); - } else { - if_block = create_if_block(ctx); - if_block.c(); - if_block.m(if_block_anchor.parentNode, if_block_anchor); - } - } else if (if_block) { - if_block.d(1); - if_block = null; - } - }, - i: noop, - o: noop, - d: function destroy(detaching) { - if (if_block) if_block.d(detaching); - if (detaching) detach_dev(if_block_anchor); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_fragment.name, - type: "component", - source: "", - ctx - }); - - return block; -} - -function instance($$self, $$props, $$invalidate) { - let $content; - let { $$slots: slots = {}, $$scope } = $$props; - validate_slots('compass-component', slots, []); - let loaded; - let content = writable({}); - validate_store(content, 'content'); - component_subscribe($$self, content, value => $$invalidate(5, $content = value)); - let locale = loadLocaleContent(content, "compass-component", loaded, contentCallback); - let qTag = 0; - let answers = []; - let capitalismScore = ""; - let vanguardismScore = ""; - let socialismScore = ""; - - function contentCallback(content) { - for (let q of content.qs) { - shuffleArray(q.as); - } - } - - function next(i) { - if (answers[i] != undefined) { - if (qTag < $content.qs.length) { - if (qTag == $content.qs.length - 1) { - $$invalidate(2, capitalismScore = Math.round(answers.map(x => x.includes("C")).filter(Boolean).length * 100 / answers.length).toString()); - $$invalidate(3, vanguardismScore = Math.round(answers.map(x => x.includes("V")).filter(Boolean).length * 100 / answers.length).toString()); - $$invalidate(4, socialismScore = Math.round(answers.map(x => x.includes("LS")).filter(Boolean).length * 100 / answers.length).toString()); - } - - $$invalidate(0, qTag = qTag + 1); - } - } - } - - function back(i) { - if (qTag != 0) { - $$invalidate(0, qTag = qTag - 1); - } - } - - onMount(() => { - - }); - - const writable_props = []; - - Object_1.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(` was created with unknown prop '${key}'`); - }); - - const $$binding_groups = [[]]; - - function input_change_handler() { - answers[qTag] = this.__value; - $$invalidate(1, answers); - } - - const click_handler = a => $$invalidate(1, answers[qTag] = a[1], answers); - const click_handler_1 = () => back(); - const click_handler_2 = () => next(qTag); - const click_handler_3 = () => back(); - - $$self.$capture_state = () => ({ - onMount, - writable, - loadLocaleContent, - shuffleArray, - loaded, - content, - locale, - qTag, - answers, - capitalismScore, - vanguardismScore, - socialismScore, - contentCallback, - next, - back, - $content - }); - - $$self.$inject_state = $$props => { - if ('loaded' in $$props) $$invalidate(6, loaded = $$props.loaded); - if ('content' in $$props) $$invalidate(7, content = $$props.content); - if ('locale' in $$props) locale = $$props.locale; - if ('qTag' in $$props) $$invalidate(0, qTag = $$props.qTag); - if ('answers' in $$props) $$invalidate(1, answers = $$props.answers); - if ('capitalismScore' in $$props) $$invalidate(2, capitalismScore = $$props.capitalismScore); - if ('vanguardismScore' in $$props) $$invalidate(3, vanguardismScore = $$props.vanguardismScore); - if ('socialismScore' in $$props) $$invalidate(4, socialismScore = $$props.socialismScore); - }; - - if ($$props && "$$inject" in $$props) { - $$self.$inject_state($$props.$$inject); - } - - return [ - qTag, - answers, - capitalismScore, - vanguardismScore, - socialismScore, - $content, - loaded, - content, - next, - back, - input_change_handler, - $$binding_groups, - click_handler, - click_handler_1, - click_handler_2, - click_handler_3 - ]; -} - -class Compass_component extends SvelteElement { - constructor(options) { - super(); - this.shadowRoot.innerHTML = ``; - - init( - this, - { - target: this.shadowRoot, - props: attribute_to_object(this.attributes), - customElement: true - }, - instance, - create_fragment, - safe_not_equal, - {}, - null - ); - - if (options) { - if (options.target) { - insert_dev(options.target, this, options.anchor); - } - } - } -} - -customElements.define("compass-component", Compass_component); - -export { Compass_component as default }; +import{S as t,i as n,a as e,b as i,s as o,e as s,n as r,d as a,c as l,o as m,f as c,t as u,g as p,h as d,j as g,l as h,m as f,q as b,p as v,r as q}from"./index-4348483d.js";import{w as x}from"./index-71440b21.js";import{loadLocaleContent as _}from"../../../../../../../../../js/libraries/serverTools.js";import{shuffleArray as y}from"../../../../../../../../../js/libraries/miscTools.js";function z(t,n,e){const i=t.slice();return i[18]=n[e],i[20]=e,i}function k(t){let n,e,s,r,l,m,b,v,q=t[5].heading+"",x=t[0],_=S(t);return{c(){n=c("div"),e=c("div"),s=c("h1"),r=u(q),l=p(),m=c("img"),v=p(),_.c(),d(m,"id","compass-img"),g(m.src,b="/img/common/compass.svg")||d(m,"src","/img/common/compass.svg"),d(m,"alt","compass"),d(e,"id","text-container"),d(n,"id","container")},m(t,o){i(t,n,o),h(n,e),h(e,s),h(s,r),h(e,l),h(e,m),h(e,v),_.m(e,null)},p(t,n){32&n&&q!==(q=t[5].heading+"")&&f(r,q),1&n&&o(x,x=t[0])?(_.d(1),_=S(t),_.c(),_.m(e,null)):_.p(t,n)},d(t){t&&a(n),_.d(t)}}}function w(t){let n,e,o,s,r,l,m,g,v,q,x,_,y,z,k,w,j,C,S,B,M,O,T,D;return{c(){n=c("p"),n.textContent="You are compatible with ...",e=p(),o=c("ul"),s=c("li"),r=u("capitalism by "),l=c("span"),m=u(t[2]),g=u("%"),v=p(),q=c("li"),x=u("vanguardism by "),_=c("span"),y=u(t[3]),z=u("%"),k=p(),w=c("li"),j=u("libertarian socialism by "),C=c("span"),S=u(t[4]),B=u("%"),M=p(),O=c("button"),O.textContent="back",d(o,"class","results-list"),d(O,"class","quiz-buttons")},m(a,c){i(a,n,c),i(a,e,c),i(a,o,c),h(o,s),h(s,r),h(s,l),h(l,m),h(s,g),h(o,v),h(o,q),h(q,x),h(q,_),h(_,y),h(q,z),h(o,k),h(o,w),h(w,j),h(w,C),h(C,S),h(w,B),i(a,M,c),i(a,O,c),T||(D=b(O,"click",t[15]),T=!0)},p(t,n){4&n&&f(m,t[2]),8&n&&f(y,t[3]),16&n&&f(S,t[4])},d(t){t&&a(n),t&&a(e),t&&a(o),t&&a(M),t&&a(O),T=!1,D()}}}function j(t){let n,e,o,s,r,l,m,g,x,_=t[5].qs[t[0]].q+"",y=t[5].qs[t[0]].as,k=[];for(let n=0;ne(5,i=t))),_(s,"compass-component",o,(function(t){for(let n of t.qs)y(n.as)}));let r=0,a=[],c="",u="",p="";function d(t){null!=a[t]&&rt.includes("C"))).filter(Boolean).length/a.length).toString()),e(3,u=Math.round(100*a.map((t=>t.includes("V"))).filter(Boolean).length/a.length).toString()),e(4,p=Math.round(100*a.map((t=>t.includes("LS"))).filter(Boolean).length/a.length).toString())),e(0,r+=1))}function g(t){0!=r&&e(0,r-=1)}m((()=>{}));return[r,a,c,u,p,i,o,s,d,g,function(){a[r]=this.__value,e(1,a)},[[]],t=>e(1,a[r]=t[1],a),()=>g(),()=>d(r),()=>g()]}class O extends t{constructor(t){super(),this.shadowRoot.innerHTML="",n(this,{target:this.shadowRoot,props:e(this.attributes),customElement:!0},M,B,o,{},null),t&&t.target&&i(t.target,this,t.anchor)}}customElements.define("compass-component",O);export{O as default}; diff --git a/Server/public/js/components/cookies-dialog.js b/Server/public/js/components/cookies-dialog.js index 75210d7..79c9c70 100644 --- a/Server/public/js/components/cookies-dialog.js +++ b/Server/public/js/components/cookies-dialog.js @@ -1,99 +1 @@ - -(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, k as element, n as noop, m as add_location, p as attr_dev, u as append_dev, j as detach_dev } from './index-42a25c61.js'; - -/* src\components\cookies-dialog.svelte generated by Svelte v3.52.0 */ -const file = "src\\components\\cookies-dialog.svelte"; - -function create_fragment(ctx) { - let div1; - let div0; - let p; - - const block = { - c: function create() { - div1 = element("div"); - div0 = element("div"); - p = element("p"); - p.textContent = "We use cookies to improve your experience, personalise your content and analyse site usage. By clicking “OK”, you agree to the use of cookies."; - this.c = noop; - add_location(p, file, 19, 8, 248); - add_location(div0, file, 18, 4, 233); - attr_dev(div1, "id", "wrapper"); - add_location(div1, file, 17, 0, 209); - }, - l: function claim(nodes) { - throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); - }, - m: function mount(target, anchor) { - insert_dev(target, div1, anchor); - append_dev(div1, div0); - append_dev(div0, p); - }, - p: noop, - i: noop, - o: noop, - d: function destroy(detaching) { - if (detaching) detach_dev(div1); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_fragment.name, - type: "component", - source: "", - ctx - }); - - return block; -} - -function instance($$self, $$props, $$invalidate) { - let { $$slots: slots = {}, $$scope } = $$props; - validate_slots('cookies-dialog', slots, []); - - onMount(() => { - - }); - - const writable_props = []; - - Object.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(` was created with unknown prop '${key}'`); - }); - - $$self.$capture_state = () => ({ onMount }); - return []; -} - -class Cookies_dialog extends SvelteElement { - constructor(options) { - super(); - this.shadowRoot.innerHTML = ``; - - init( - this, - { - target: this.shadowRoot, - props: attribute_to_object(this.attributes), - customElement: true - }, - instance, - create_fragment, - safe_not_equal, - {}, - null - ); - - if (options) { - if (options.target) { - insert_dev(options.target, this, options.anchor); - } - } - } -} - -customElements.define("cookies-dialog", Cookies_dialog); - -export { Cookies_dialog as default }; +import{S as e,i as s,a as t,b as o,s as i,f as a,n as r,h as n,d as c,o as d}from"./index-4348483d.js";function p(e){let s;return{c(){s=a("div"),s.innerHTML="

We use cookies to improve your experience, personalise your content and analyse site usage. By clicking “OK”, you agree to the use of cookies.

",this.c=r,n(s,"id","wrapper")},m(e,t){o(e,s,t)},p:r,i:r,o:r,d(e){e&&c(s)}}}function u(e){return d((()=>{})),[]}class h extends e{constructor(e){super(),this.shadowRoot.innerHTML="",s(this,{target:this.shadowRoot,props:t(this.attributes),customElement:!0},u,p,i,{},null),e&&e.target&&o(e.target,this,e.anchor)}}customElements.define("cookies-dialog",h);export{h as default}; diff --git a/Server/public/js/components/cooperatives-component.js b/Server/public/js/components/cooperatives-component.js index 9d00c6d..0bfd95f 100644 --- a/Server/public/js/components/cooperatives-component.js +++ b/Server/public/js/components/cooperatives-component.js @@ -1,591 +1 @@ - -(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, c as validate_store, e as component_subscribe, o as onMount, g as globals, f as validate_each_argument, h as empty, n as noop, j as detach_dev, k as element, t as text, l as space, m as add_location, p as attr_dev, q as src_url_equal, r as set_custom_element_data, u as append_dev, w as set_data_dev, x as destroy_each } from './index-42a25c61.js'; -import { w as writable } from './index-a1c185ea.js'; -import { coops, addMarkersCoops } from '../../../../../../../../../js/coops.js'; -import { loadLocaleContent } from '../../../../../../../../../js/libraries/serverTools.js'; -import '../../../../../../../../../js/components/map-component.js'; - -/* src\cooperatives-component.svelte generated by Svelte v3.52.0 */ - -const { Object: Object_1 } = globals; - -const file = "src\\cooperatives-component.svelte"; - -function get_each_context(ctx, list, i) { - const child_ctx = ctx.slice(); - child_ctx[6] = list[i]; - return child_ctx; -} - -// (30:4) {#if Object.keys($content).length!=0} -function create_if_block(ctx) { - let div1; - let div0; - let h1; - let t0_value = /*$content*/ ctx[0].heading + ""; - let t0; - let t1; - let img; - let img_src_value; - let t2; - let p0; - let t3_value = /*$content*/ ctx[0].p1 + ""; - let t3; - let t4; - let p1; - let t5_value = /*$content*/ ctx[0].p2 + ""; - let t5; - let t6; - let h3; - let t7_value = /*$content*/ ctx[0].subheading1 + ""; - let t7; - let t8; - let map_component; - let map_component_callback_value; - let t9; - let h4; - let t10_value = /*$content*/ ctx[0].subheading2 + ""; - let t10; - let t11; - let each_value = coops; - validate_each_argument(each_value); - let each_blocks = []; - - for (let i = 0; i < each_value.length; i += 1) { - each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i)); - } - - const block = { - c: function create() { - div1 = element("div"); - div0 = element("div"); - h1 = element("h1"); - t0 = text(t0_value); - t1 = space(); - img = element("img"); - t2 = space(); - p0 = element("p"); - t3 = text(t3_value); - t4 = space(); - p1 = element("p"); - t5 = text(t5_value); - t6 = space(); - h3 = element("h3"); - t7 = text(t7_value); - t8 = space(); - map_component = element("map-component"); - t9 = space(); - h4 = element("h4"); - t10 = text(t10_value); - t11 = space(); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].c(); - } - - add_location(h1, file, 32, 16, 867); - attr_dev(img, "id", "coops-img"); - if (!src_url_equal(img.src, img_src_value = "/img/common/coops.svg")) attr_dev(img, "src", img_src_value); - attr_dev(img, "alt", "coops"); - add_location(img, file, 33, 16, 912); - add_location(p0, file, 34, 16, 990); - add_location(p1, file, 35, 16, 1028); - add_location(h3, file, 36, 16, 1066); - set_custom_element_data(map_component, "id", "map"); - set_custom_element_data(map_component, "callback", map_component_callback_value = /*func*/ ctx[5]); - add_location(map_component, file, 37, 16, 1115); - add_location(h4, file, 38, 16, 1243); - attr_dev(div0, "id", "text-container"); - add_location(div0, file, 31, 12, 824); - attr_dev(div1, "id", "container"); - add_location(div1, file, 30, 8, 790); - }, - m: function mount(target, anchor) { - insert_dev(target, div1, anchor); - append_dev(div1, div0); - append_dev(div0, h1); - append_dev(h1, t0); - append_dev(div0, t1); - append_dev(div0, img); - append_dev(div0, t2); - append_dev(div0, p0); - append_dev(p0, t3); - append_dev(div0, t4); - append_dev(div0, p1); - append_dev(p1, t5); - append_dev(div0, t6); - append_dev(div0, h3); - append_dev(h3, t7); - append_dev(div0, t8); - append_dev(div0, map_component); - append_dev(div0, t9); - append_dev(div0, h4); - append_dev(h4, t10); - append_dev(div0, t11); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].m(div0, null); - } - }, - p: function update(ctx, dirty) { - if (dirty & /*$content*/ 1 && t0_value !== (t0_value = /*$content*/ ctx[0].heading + "")) set_data_dev(t0, t0_value); - if (dirty & /*$content*/ 1 && t3_value !== (t3_value = /*$content*/ ctx[0].p1 + "")) set_data_dev(t3, t3_value); - if (dirty & /*$content*/ 1 && t5_value !== (t5_value = /*$content*/ ctx[0].p2 + "")) set_data_dev(t5, t5_value); - if (dirty & /*$content*/ 1 && t7_value !== (t7_value = /*$content*/ ctx[0].subheading1 + "")) set_data_dev(t7, t7_value); - - if (dirty & /*$content*/ 1 && map_component_callback_value !== (map_component_callback_value = /*func*/ ctx[5])) { - set_custom_element_data(map_component, "callback", map_component_callback_value); - } - - if (dirty & /*$content*/ 1 && t10_value !== (t10_value = /*$content*/ ctx[0].subheading2 + "")) set_data_dev(t10, t10_value); - - if (dirty & /*$content, coops*/ 1) { - 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; - } - }, - d: function destroy(detaching) { - if (detaching) detach_dev(div1); - destroy_each(each_blocks, detaching); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_if_block.name, - type: "if", - source: "(30:4) {#if Object.keys($content).length!=0}", - ctx - }); - - return block; -} - -// (40:16) {#each coops as coop} -function create_each_block(ctx) { - let div2; - let div1; - let div0; - let p0; - let b0; - let t0_value = /*$content*/ ctx[0].name + ""; - let t0; - let t1; - let t2_value = /*coop*/ ctx[6].name + ""; - let t2; - let t3; - let p1; - let b1; - let t4_value = /*$content*/ ctx[0].location + ""; - let t4; - let t5; - let t6_value = /*$content*/ ctx[0][/*coop*/ ctx[6].location[0]] + ""; - let t6; - let t7; - let p2; - let b2; - let t8_value = /*$content*/ ctx[0].market + ""; - let t8; - let t9; - let t10_value = /*$content*/ ctx[0][/*coop*/ ctx[6].market] + ""; - let t10; - let t11; - let p3; - let b3; - let t12_value = /*$content*/ ctx[0].workers + ""; - let t12; - let t13; - let t14_value = /*coop*/ ctx[6].workers + ""; - let t14; - let t15; - let p4; - let b4; - let t16_value = /*$content*/ ctx[0].status + ""; - let t16; - let t17; - let t18_value = /*$content*/ ctx[0][/*coop*/ ctx[6].status] + ""; - let t18; - let t19; - let p5; - let b5; - let t20_value = /*$content*/ ctx[0].website + ""; - let t20; - let t21; - let a0; - let t22_value = /*coop*/ ctx[6].website + ""; - let t22; - let t23; - let p6; - let b6; - let t24_value = /*$content*/ ctx[0].contact + ""; - let t24; - let t25; - let a1; - let t26_value = /*$content*/ ctx[0][/*coop*/ ctx[6].contact[1]] + ""; - let t26; - let t27; - let picture; - let source0; - let t28; - let source1; - let t29; - let img; - let t30; - let p7; - let b7; - let t31_value = /*$content*/ ctx[0].description + ""; - let t31; - let t32; - let t33_value = /*$content*/ ctx[0][/*coop*/ ctx[6].description] + ""; - let t33; - let t34; - - const block = { - c: function create() { - div2 = element("div"); - div1 = element("div"); - div0 = element("div"); - p0 = element("p"); - b0 = element("b"); - t0 = text(t0_value); - t1 = text(": "); - t2 = text(t2_value); - t3 = space(); - p1 = element("p"); - b1 = element("b"); - t4 = text(t4_value); - t5 = text(": "); - t6 = text(t6_value); - t7 = space(); - p2 = element("p"); - b2 = element("b"); - t8 = text(t8_value); - t9 = text(": "); - t10 = text(t10_value); - t11 = space(); - p3 = element("p"); - b3 = element("b"); - t12 = text(t12_value); - t13 = text(": "); - t14 = text(t14_value); - t15 = space(); - p4 = element("p"); - b4 = element("b"); - t16 = text(t16_value); - t17 = text(": "); - t18 = text(t18_value); - t19 = space(); - p5 = element("p"); - b5 = element("b"); - t20 = text(t20_value); - t21 = text(": "); - a0 = element("a"); - t22 = text(t22_value); - t23 = space(); - p6 = element("p"); - b6 = element("b"); - t24 = text(t24_value); - t25 = text(": "); - a1 = element("a"); - t26 = text(t26_value); - t27 = space(); - picture = element("picture"); - source0 = element("source"); - t28 = space(); - source1 = element("source"); - t29 = space(); - img = element("img"); - t30 = space(); - p7 = element("p"); - b7 = element("b"); - t31 = text(t31_value); - t32 = text(": "); - t33 = text(t33_value); - t34 = space(); - add_location(b0, file, 43, 35, 1490); - add_location(p0, file, 43, 32, 1487); - add_location(b1, file, 44, 35, 1566); - add_location(p1, file, 44, 32, 1563); - add_location(b2, file, 45, 35, 1663); - add_location(p2, file, 45, 32, 1660); - add_location(b3, file, 46, 35, 1753); - add_location(p3, file, 46, 32, 1750); - add_location(b4, file, 47, 35, 1835); - add_location(p4, file, 47, 32, 1832); - add_location(b5, file, 48, 35, 1925); - attr_dev(a0, "href", "https://www." + /*coop*/ ctx[6].website); - attr_dev(a0, "target", "_blank"); - attr_dev(a0, "rel", "noreferrer"); - add_location(a0, file, 48, 62, 1952); - add_location(p5, file, 48, 32, 1922); - add_location(b6, file, 49, 35, 2080); - attr_dev(a1, "href", /*coop*/ ctx[6].contact[0]); - attr_dev(a1, "target", ";_blank;"); - attr_dev(a1, "rel", "noreferrer"); - add_location(a1, file, 49, 62, 2107); - add_location(p6, file, 49, 32, 2077); - add_location(div0, file, 42, 28, 1448); - attr_dev(source0, "srcset", "/img/coops/" + /*coop*/ ctx[6].logo + ".webp"); - add_location(source0, file, 52, 32, 2308); - attr_dev(source1, "srcset", "/img/coops/" + /*coop*/ ctx[6].logo + ".png"); - add_location(source1, file, 53, 32, 2391); - attr_dev(img, "class", "coop-logo"); - attr_dev(img, "alt", "logo"); - add_location(img, file, 54, 32, 2473); - add_location(picture, file, 51, 28, 2265); - attr_dev(div1, "class", "img-general-info"); - add_location(div1, file, 41, 24, 1388); - add_location(b7, file, 57, 27, 2608); - add_location(p7, file, 57, 24, 2605); - attr_dev(div2, "class", "location-info"); - add_location(div2, file, 40, 20, 1335); - }, - 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(b0, t0); - append_dev(b0, t1); - append_dev(p0, t2); - append_dev(div0, t3); - append_dev(div0, p1); - append_dev(p1, b1); - append_dev(b1, t4); - append_dev(b1, t5); - append_dev(p1, t6); - append_dev(div0, t7); - append_dev(div0, p2); - append_dev(p2, b2); - append_dev(b2, t8); - append_dev(b2, t9); - append_dev(p2, t10); - append_dev(div0, t11); - append_dev(div0, p3); - append_dev(p3, b3); - append_dev(b3, t12); - append_dev(b3, t13); - append_dev(p3, t14); - append_dev(div0, t15); - append_dev(div0, p4); - append_dev(p4, b4); - append_dev(b4, t16); - append_dev(b4, t17); - append_dev(p4, t18); - append_dev(div0, t19); - append_dev(div0, p5); - append_dev(p5, b5); - append_dev(b5, t20); - append_dev(b5, t21); - append_dev(p5, a0); - append_dev(a0, t22); - append_dev(div0, t23); - append_dev(div0, p6); - append_dev(p6, b6); - append_dev(b6, t24); - append_dev(b6, t25); - append_dev(p6, a1); - append_dev(a1, t26); - append_dev(div1, t27); - append_dev(div1, picture); - append_dev(picture, source0); - append_dev(picture, t28); - append_dev(picture, source1); - append_dev(picture, t29); - append_dev(picture, img); - append_dev(div2, t30); - append_dev(div2, p7); - append_dev(p7, b7); - append_dev(b7, t31); - append_dev(b7, t32); - append_dev(p7, t33); - append_dev(div2, t34); - }, - p: function update(ctx, dirty) { - if (dirty & /*$content*/ 1 && t0_value !== (t0_value = /*$content*/ ctx[0].name + "")) set_data_dev(t0, t0_value); - if (dirty & /*$content*/ 1 && t4_value !== (t4_value = /*$content*/ ctx[0].location + "")) set_data_dev(t4, t4_value); - if (dirty & /*$content*/ 1 && t6_value !== (t6_value = /*$content*/ ctx[0][/*coop*/ ctx[6].location[0]] + "")) set_data_dev(t6, t6_value); - if (dirty & /*$content*/ 1 && t8_value !== (t8_value = /*$content*/ ctx[0].market + "")) set_data_dev(t8, t8_value); - if (dirty & /*$content*/ 1 && t10_value !== (t10_value = /*$content*/ ctx[0][/*coop*/ ctx[6].market] + "")) set_data_dev(t10, t10_value); - if (dirty & /*$content*/ 1 && t12_value !== (t12_value = /*$content*/ ctx[0].workers + "")) set_data_dev(t12, t12_value); - if (dirty & /*$content*/ 1 && t16_value !== (t16_value = /*$content*/ ctx[0].status + "")) set_data_dev(t16, t16_value); - if (dirty & /*$content*/ 1 && t18_value !== (t18_value = /*$content*/ ctx[0][/*coop*/ ctx[6].status] + "")) set_data_dev(t18, t18_value); - if (dirty & /*$content*/ 1 && t20_value !== (t20_value = /*$content*/ ctx[0].website + "")) set_data_dev(t20, t20_value); - if (dirty & /*$content*/ 1 && t24_value !== (t24_value = /*$content*/ ctx[0].contact + "")) set_data_dev(t24, t24_value); - if (dirty & /*$content*/ 1 && t26_value !== (t26_value = /*$content*/ ctx[0][/*coop*/ ctx[6].contact[1]] + "")) set_data_dev(t26, t26_value); - if (dirty & /*$content*/ 1 && t31_value !== (t31_value = /*$content*/ ctx[0].description + "")) set_data_dev(t31, t31_value); - if (dirty & /*$content*/ 1 && t33_value !== (t33_value = /*$content*/ ctx[0][/*coop*/ ctx[6].description] + "")) set_data_dev(t33, t33_value); - }, - d: function destroy(detaching) { - if (detaching) detach_dev(div2); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_each_block.name, - type: "each", - source: "(40:16) {#each coops as coop}", - ctx - }); - - return block; -} - -function create_fragment(ctx) { - let show_if = Object.keys(/*$content*/ ctx[0]).length != 0; - let if_block_anchor; - let if_block = show_if && create_if_block(ctx); - - const block = { - c: function create() { - if (if_block) if_block.c(); - if_block_anchor = empty(); - this.c = noop; - }, - 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) { - if (if_block) if_block.m(target, anchor); - insert_dev(target, if_block_anchor, anchor); - }, - p: function update(ctx, [dirty]) { - if (dirty & /*$content*/ 1) show_if = Object.keys(/*$content*/ ctx[0]).length != 0; - - if (show_if) { - if (if_block) { - if_block.p(ctx, dirty); - } else { - if_block = create_if_block(ctx); - if_block.c(); - if_block.m(if_block_anchor.parentNode, if_block_anchor); - } - } else if (if_block) { - if_block.d(1); - if_block = null; - } - }, - i: noop, - o: noop, - d: function destroy(detaching) { - if (if_block) if_block.d(detaching); - if (detaching) detach_dev(if_block_anchor); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_fragment.name, - type: "component", - source: "", - ctx - }); - - return block; -} - -function instance($$self, $$props, $$invalidate) { - let $content; - let { $$slots: slots = {}, $$scope } = $$props; - validate_slots('cooperatives-component', slots, []); - let loaded; - let content = writable({}); - validate_store(content, 'content'); - component_subscribe($$self, content, value => $$invalidate(0, $content = value)); - let locale = loadLocaleContent(content, "cooperatives-component", loaded); - - function mapCallbackCoops(createMap, content) { - let map = createMap([51.505, -0.09], 3); - addMarkersCoops(map, content); - } - - onMount(() => { - - }); - - const writable_props = []; - - Object_1.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(` was created with unknown prop '${key}'`); - }); - - const func = createMap => mapCallbackCoops(createMap, $content); - - $$self.$capture_state = () => ({ - onMount, - writable, - coops, - addMarkersCoops, - loadLocaleContent, - loaded, - content, - locale, - mapCallbackCoops, - $content - }); - - $$self.$inject_state = $$props => { - if ('loaded' in $$props) $$invalidate(1, loaded = $$props.loaded); - if ('content' in $$props) $$invalidate(2, content = $$props.content); - if ('locale' in $$props) $$invalidate(3, locale = $$props.locale); - }; - - if ($$props && "$$inject" in $$props) { - $$self.$inject_state($$props.$$inject); - } - - return [$content, loaded, content, locale, mapCallbackCoops, func]; -} - -class Cooperatives_component extends SvelteElement { - constructor(options) { - super(); - this.shadowRoot.innerHTML = ``; - - init( - this, - { - target: this.shadowRoot, - props: attribute_to_object(this.attributes), - customElement: true - }, - instance, - create_fragment, - safe_not_equal, - {}, - null - ); - - if (options) { - if (options.target) { - insert_dev(options.target, this, options.anchor); - } - } - } -} - -customElements.define("cooperatives-component", Cooperatives_component); - -export { Cooperatives_component as default }; +import{S as t,i as e,a as o,b as n,s as i,e as a,n as r,d as s,c,o as m,f as l,t as p,g,h as d,j as h,k as f,l as b,m as u,p as w}from"./index-4348483d.js";import{w as x}from"./index-71440b21.js";import{coops as v,addMarkersCoops as k}from"../../../../../../../../../js/coops.js";import{loadLocaleContent as j}from"../../../../../../../../../js/libraries/serverTools.js";import"../../../../../../../../../js/components/map-component.js";function y(t,e,o){const n=t.slice();return n[6]=e[o],n}function z(t){let e,o,i,a,r,c,m,x,k,j,z,E,O,R,T,_,A,C,H,L,M,N,S,q=t[0].heading+"",B=t[0].p1+"",F=t[0].p2+"",G=t[0].subheading1+"",I=t[0].subheading2+"",J=v,K=[];for(let e=0;eo(0,n=t)));let r=j(a,"cooperatives-component",i);function s(t,e){let o=t([51.505,-.09],3);k(o,e)}m((()=>{}));return[n,i,a,r,s,t=>s(t,n)]}class R extends t{constructor(t){super(),this.shadowRoot.innerHTML="",e(this,{target:this.shadowRoot,props:o(this.attributes),customElement:!0},O,E,i,{},null),t&&t.target&&n(t.target,this,t.anchor)}}customElements.define("cooperatives-component",R);export{R as default}; diff --git a/Server/public/js/components/footer-component.js b/Server/public/js/components/footer-component.js index 7dddfcc..297f1c3 100644 --- a/Server/public/js/components/footer-component.js +++ b/Server/public/js/components/footer-component.js @@ -1,307 +1 @@ - -(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, c as validate_store, e as component_subscribe, g as globals, h as empty, n as noop, j as detach_dev, k as element, t as text, l as space, G as svg_element, m as add_location, p as attr_dev, D as set_style, u as append_dev, y as listen_dev, w as set_data_dev } from './index-42a25c61.js'; -import { w as writable } from './index-a1c185ea.js'; -import { loadLocaleContent } from '../../../../../../../../../js/libraries/serverTools.js'; - -/* src\footer\footer-component.svelte generated by Svelte v3.52.0 */ - -const { Object: Object_1 } = globals; -const file = "src\\footer\\footer-component.svelte"; - -// (20:4) {#if Object.keys($content).length!=0} -function create_if_block(ctx) { - let footer; - let div2; - let div1; - let div0; - let h2; - let t0_value = /*$content*/ ctx[0].contactUs + ""; - let t0; - let t1; - let p0; - let t2; - let a0; - let t3_value = /*$content*/ ctx[0].inviteLink + ""; - let t3; - let t4; - let p1; - let t5; - let a1; - let t6_value = /*$content*/ ctx[0].inviteLink + ""; - let t6; - let t7; - let button; - let svg; - let g; - let rect; - let path; - let t8; - let p2; - let t9; - let a2; - let mounted; - let dispose; - - const block = { - c: function create() { - footer = element("footer"); - div2 = element("div"); - div1 = element("div"); - div0 = element("div"); - h2 = element("h2"); - t0 = text(t0_value); - t1 = space(); - p0 = element("p"); - t2 = text("WhatsApp: "); - a0 = element("a"); - t3 = text(t3_value); - t4 = space(); - p1 = element("p"); - t5 = text("Discord: "); - a1 = element("a"); - t6 = text(t6_value); - t7 = space(); - button = element("button"); - svg = svg_element("svg"); - g = svg_element("g"); - rect = svg_element("rect"); - path = svg_element("path"); - t8 = space(); - p2 = element("p"); - t9 = text("Licensed under a Creative Commons "); - a2 = element("a"); - a2.textContent = "CC BY 4.0 license."; - add_location(h2, file, 24, 24, 660); - attr_dev(a0, "href", "https://chat.whatsapp.com/BhnmUNljUxJ2AjeHUwyTKh"); - attr_dev(a0, "target", "_blank"); - attr_dev(a0, "rel", "noreferrer"); - set_style(a0, "margin-left", "0.5rem"); - add_location(a0, file, 26, 37, 827); - add_location(p0, file, 26, 24, 814); - attr_dev(a1, "href", "https://discord.gg/xAPZmyr8B6"); - attr_dev(a1, "target", "_blank"); - attr_dev(a1, "rel", "noreferrer"); - set_style(a1, "margin-left", "1.8rem"); - add_location(a1, file, 27, 36, 1013); - add_location(p1, file, 27, 24, 1001); - attr_dev(div0, "id", "contact-us-container"); - add_location(div0, file, 23, 20, 603); - attr_dev(div1, "id", "footer-grid-content-container"); - attr_dev(div1, "class", "logged"); - add_location(div1, file, 22, 16, 526); - attr_dev(rect, "id", "Rectangle_146"); - attr_dev(rect, "data-name", "Rectangle 146"); - attr_dev(rect, "width", "11"); - attr_dev(rect, "height", "51"); - attr_dev(rect, "rx", "5.5"); - attr_dev(rect, "transform", "translate(22 24)"); - attr_dev(rect, "fill", "#cb1816"); - add_location(rect, file, 33, 24, 1541); - attr_dev(path, "id", "Path_1145"); - attr_dev(path, "data-name", "Path 1145"); - attr_dev(path, "d", "M23.814,4.021a5,5,0,0,1,7.372,0l16.134,17.6c2.94,3.207,1.046,10.4-3.686,8.379S28.02,14.081,28.391,13.524,16.544,27.976,11.366,30,4.741,24.828,7.68,21.621Z"); - attr_dev(path, "fill", "#DD1C1A"); - add_location(path, file, 34, 24, 1695); - attr_dev(g, "id", "Group_268"); - attr_dev(g, "data-name", "Group 268"); - attr_dev(g, "transform", "translate(-6.177 -2.399)"); - add_location(g, file, 32, 24, 1438); - attr_dev(svg, "xmlns", "http://www.w3.org/2000/svg"); - attr_dev(svg, "width", "42.545"); - attr_dev(svg, "height", "72.601"); - attr_dev(svg, "viewBox", "0 0 42.545 72.601"); - add_location(svg, file, 31, 20, 1313); - attr_dev(button, "id", "footer-up"); - attr_dev(button, "aria-label", "go up"); - add_location(button, file, 30, 16, 1212); - attr_dev(a2, "href", "https://creativecommons.org/licenses/by/4.0/legalcode "); - attr_dev(a2, "target", "_blank"); - attr_dev(a2, "rel", "noreferrer"); - add_location(a2, file, 38, 75, 2105); - attr_dev(p2, "id", "footer-copyright"); - add_location(p2, file, 38, 16, 2046); - attr_dev(div2, "id", "footer-content-container"); - add_location(div2, file, 21, 12, 473); - add_location(footer, file, 20, 8, 451); - }, - m: function mount(target, anchor) { - insert_dev(target, footer, anchor); - append_dev(footer, div2); - append_dev(div2, div1); - append_dev(div1, div0); - append_dev(div0, h2); - append_dev(h2, t0); - append_dev(div0, t1); - append_dev(div0, p0); - append_dev(p0, t2); - append_dev(p0, a0); - append_dev(a0, t3); - append_dev(div0, t4); - append_dev(div0, p1); - append_dev(p1, t5); - append_dev(p1, a1); - append_dev(a1, t6); - append_dev(div2, t7); - append_dev(div2, button); - append_dev(button, svg); - append_dev(svg, g); - append_dev(g, rect); - append_dev(g, path); - append_dev(div2, t8); - append_dev(div2, p2); - append_dev(p2, t9); - append_dev(p2, a2); - - if (!mounted) { - dispose = listen_dev(button, "click", /*click_handler*/ ctx[3], false, false, false); - mounted = true; - } - }, - p: function update(ctx, dirty) { - if (dirty & /*$content*/ 1 && t0_value !== (t0_value = /*$content*/ ctx[0].contactUs + "")) set_data_dev(t0, t0_value); - if (dirty & /*$content*/ 1 && t3_value !== (t3_value = /*$content*/ ctx[0].inviteLink + "")) set_data_dev(t3, t3_value); - if (dirty & /*$content*/ 1 && t6_value !== (t6_value = /*$content*/ ctx[0].inviteLink + "")) set_data_dev(t6, t6_value); - }, - d: function destroy(detaching) { - if (detaching) detach_dev(footer); - mounted = false; - dispose(); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_if_block.name, - type: "if", - source: "(20:4) {#if Object.keys($content).length!=0}", - ctx - }); - - return block; -} - -function create_fragment(ctx) { - let show_if = Object.keys(/*$content*/ ctx[0]).length != 0; - let if_block_anchor; - let if_block = show_if && create_if_block(ctx); - - const block = { - c: function create() { - if (if_block) if_block.c(); - if_block_anchor = empty(); - this.c = noop; - }, - 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) { - if (if_block) if_block.m(target, anchor); - insert_dev(target, if_block_anchor, anchor); - }, - p: function update(ctx, [dirty]) { - if (dirty & /*$content*/ 1) show_if = Object.keys(/*$content*/ ctx[0]).length != 0; - - if (show_if) { - if (if_block) { - if_block.p(ctx, dirty); - } else { - if_block = create_if_block(ctx); - if_block.c(); - if_block.m(if_block_anchor.parentNode, if_block_anchor); - } - } else if (if_block) { - if_block.d(1); - if_block = null; - } - }, - i: noop, - o: noop, - d: function destroy(detaching) { - if (if_block) if_block.d(detaching); - if (detaching) detach_dev(if_block_anchor); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_fragment.name, - type: "component", - source: "", - ctx - }); - - return block; -} - -function instance($$self, $$props, $$invalidate) { - let $content; - let { $$slots: slots = {}, $$scope } = $$props; - validate_slots('footer-component', slots, []); - let loaded; - let content = writable({}); - validate_store(content, 'content'); - component_subscribe($$self, content, value => $$invalidate(0, $content = value)); - let locale = loadLocaleContent(content, "footer-component", loaded); - const writable_props = []; - - Object_1.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(` was created with unknown prop '${key}'`); - }); - - const click_handler = () => { - location.href = '#'; - }; - - $$self.$capture_state = () => ({ - writable, - loadLocaleContent, - loaded, - content, - locale, - $content - }); - - $$self.$inject_state = $$props => { - if ('loaded' in $$props) $$invalidate(1, loaded = $$props.loaded); - if ('content' in $$props) $$invalidate(2, content = $$props.content); - if ('locale' in $$props) locale = $$props.locale; - }; - - if ($$props && "$$inject" in $$props) { - $$self.$inject_state($$props.$$inject); - } - - return [$content, loaded, content, click_handler]; -} - -class Footer_component extends SvelteElement { - constructor(options) { - super(); - this.shadowRoot.innerHTML = ``; - - init( - this, - { - target: this.shadowRoot, - props: attribute_to_object(this.attributes), - customElement: true - }, - instance, - create_fragment, - safe_not_equal, - {}, - null - ); - - if (options) { - if (options.target) { - insert_dev(options.target, this, options.anchor); - } - } - } -} - -customElements.define("footer-component", Footer_component); - -export { Footer_component as default }; +import{S as t,i as e,a as o,b as r,s as a,e as i,n,d as s,c as m,f as c,t as f,g as l,h as d,v as g,l as h,q as p,m as u}from"./index-4348483d.js";import{w as b}from"./index-71440b21.js";import{loadLocaleContent as w}from"../../../../../../../../../js/libraries/serverTools.js";function v(t){let e,o,a,i,n,m,b,w,v,y,k,x,j,L,_,z,B,C,T,U,A,H,M=t[0].contactUs+"",R=t[0].inviteLink+"",D=t[0].inviteLink+"";return{c(){e=c("footer"),o=c("div"),a=c("div"),i=c("div"),n=c("h2"),m=f(M),b=l(),w=c("p"),v=f("WhatsApp: "),y=c("a"),k=f(R),x=l(),j=c("p"),L=f("Discord: "),_=c("a"),z=f(D),B=l(),C=c("button"),C.innerHTML='',T=l(),U=c("p"),U.innerHTML='Licensed under a Creative Commons CC BY 4.0 license.',d(y,"href","https://chat.whatsapp.com/BhnmUNljUxJ2AjeHUwyTKh"),d(y,"target","_blank"),d(y,"rel","noreferrer"),g(y,"margin-left","0.5rem"),d(_,"href","https://discord.gg/xAPZmyr8B6"),d(_,"target","_blank"),d(_,"rel","noreferrer"),g(_,"margin-left","1.8rem"),d(i,"id","contact-us-container"),d(a,"id","footer-grid-content-container"),d(a,"class","logged"),d(C,"id","footer-up"),d(C,"aria-label","go up"),d(U,"id","footer-copyright"),d(o,"id","footer-content-container")},m(s,c){r(s,e,c),h(e,o),h(o,a),h(a,i),h(i,n),h(n,m),h(i,b),h(i,w),h(w,v),h(w,y),h(y,k),h(i,x),h(i,j),h(j,L),h(j,_),h(_,z),h(o,B),h(o,C),h(o,T),h(o,U),A||(H=p(C,"click",t[3]),A=!0)},p(t,e){1&e&&M!==(M=t[0].contactUs+"")&&u(m,M),1&e&&R!==(R=t[0].inviteLink+"")&&u(k,R),1&e&&D!==(D=t[0].inviteLink+"")&&u(z,D)},d(t){t&&s(e),A=!1,H()}}}function y(t){let e,o=0!=Object.keys(t[0]).length,a=o&&v(t);return{c(){a&&a.c(),e=i(),this.c=n},m(t,o){a&&a.m(t,o),r(t,e,o)},p(t,[r]){1&r&&(o=0!=Object.keys(t[0]).length),o?a?a.p(t,r):(a=v(t),a.c(),a.m(e.parentNode,e)):a&&(a.d(1),a=null)},i:n,o:n,d(t){a&&a.d(t),t&&s(e)}}}function k(t,e,o){let r,a,i=b({});m(t,i,(t=>o(0,r=t))),w(i,"footer-component",a);return[r,a,i,()=>{location.href="#"}]}class x extends t{constructor(t){super(),this.shadowRoot.innerHTML="",e(this,{target:this.shadowRoot,props:o(this.attributes),customElement:!0},k,y,a,{},null),t&&t.target&&r(t.target,this,t.anchor)}}customElements.define("footer-component",x);export{x as default}; diff --git a/Server/public/js/components/groups-component.js b/Server/public/js/components/groups-component.js index 0d2b2cd..b298430 100644 --- a/Server/public/js/components/groups-component.js +++ b/Server/public/js/components/groups-component.js @@ -1,428 +1 @@ - -(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, c as validate_store, e as component_subscribe, o as onMount, g as globals, f as validate_each_argument, h as empty, n as noop, j as detach_dev, k as element, t as text, l as space, m as add_location, p as attr_dev, q as src_url_equal, r as set_custom_element_data, u as append_dev, w as set_data_dev, x as destroy_each } from './index-42a25c61.js'; -import { w as writable } from './index-a1c185ea.js'; -import { groups, addMarkersGroups } from '../../../../../../../../../js/groups.js'; -import { loadLocaleContent } from '../../../../../../../../../js/libraries/serverTools.js'; -import '../../../../../../../../../js/components/map-component.js'; - -/* src\groups-component.svelte generated by Svelte v3.52.0 */ - -const { Object: Object_1 } = globals; - -const file = "src\\groups-component.svelte"; - -function get_each_context(ctx, list, i) { - const child_ctx = ctx.slice(); - child_ctx[6] = list[i]; - return child_ctx; -} - -// (30:4) {#if Object.keys($content).length!=0} -function create_if_block(ctx) { - let div1; - let div0; - let h1; - let t0_value = /*$content*/ ctx[0].heading + ""; - let t0; - let t1; - let img; - let img_src_value; - let t2; - let p0; - let t3_value = /*$content*/ ctx[0].p1 + ""; - let t3; - let t4; - let p1; - let t5_value = /*$content*/ ctx[0].p2 + ""; - let t5; - let t6; - let h3; - let t7_value = /*$content*/ ctx[0].subheading1 + ""; - let t7; - let t8; - let map_component; - let map_component_callback_value; - let t9; - let h4; - let t10_value = /*$content*/ ctx[0].subheading2 + ""; - let t10; - let t11; - let each_value = groups; - validate_each_argument(each_value); - let each_blocks = []; - - for (let i = 0; i < each_value.length; i += 1) { - each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i)); - } - - const block = { - c: function create() { - div1 = element("div"); - div0 = element("div"); - h1 = element("h1"); - t0 = text(t0_value); - t1 = space(); - img = element("img"); - t2 = space(); - p0 = element("p"); - t3 = text(t3_value); - t4 = space(); - p1 = element("p"); - t5 = text(t5_value); - t6 = space(); - h3 = element("h3"); - t7 = text(t7_value); - t8 = space(); - map_component = element("map-component"); - t9 = space(); - h4 = element("h4"); - t10 = text(t10_value); - t11 = space(); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].c(); - } - - add_location(h1, file, 33, 16, 932); - attr_dev(img, "id", "groups-img"); - if (!src_url_equal(img.src, img_src_value = "/img/common/groups.svg")) attr_dev(img, "src", img_src_value); - attr_dev(img, "alt", "groups"); - add_location(img, file, 34, 16, 977); - add_location(p0, file, 35, 16, 1058); - add_location(p1, file, 36, 16, 1096); - add_location(h3, file, 37, 16, 1134); - set_custom_element_data(map_component, "id", "map"); - set_custom_element_data(map_component, "callback", map_component_callback_value = /*func*/ ctx[5]); - add_location(map_component, file, 38, 16, 1183); - add_location(h4, file, 39, 16, 1312); - attr_dev(div0, "id", "text-container"); - add_location(div0, file, 32, 12, 889); - attr_dev(div1, "id", "container"); - add_location(div1, file, 30, 8, 786); - }, - m: function mount(target, anchor) { - insert_dev(target, div1, anchor); - append_dev(div1, div0); - append_dev(div0, h1); - append_dev(h1, t0); - append_dev(div0, t1); - append_dev(div0, img); - append_dev(div0, t2); - append_dev(div0, p0); - append_dev(p0, t3); - append_dev(div0, t4); - append_dev(div0, p1); - append_dev(p1, t5); - append_dev(div0, t6); - append_dev(div0, h3); - append_dev(h3, t7); - append_dev(div0, t8); - append_dev(div0, map_component); - append_dev(div0, t9); - append_dev(div0, h4); - append_dev(h4, t10); - append_dev(div0, t11); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].m(div0, null); - } - }, - p: function update(ctx, dirty) { - if (dirty & /*$content*/ 1 && t0_value !== (t0_value = /*$content*/ ctx[0].heading + "")) set_data_dev(t0, t0_value); - if (dirty & /*$content*/ 1 && t3_value !== (t3_value = /*$content*/ ctx[0].p1 + "")) set_data_dev(t3, t3_value); - if (dirty & /*$content*/ 1 && t5_value !== (t5_value = /*$content*/ ctx[0].p2 + "")) set_data_dev(t5, t5_value); - if (dirty & /*$content*/ 1 && t7_value !== (t7_value = /*$content*/ ctx[0].subheading1 + "")) set_data_dev(t7, t7_value); - - if (dirty & /*$content*/ 1 && map_component_callback_value !== (map_component_callback_value = /*func*/ ctx[5])) { - set_custom_element_data(map_component, "callback", map_component_callback_value); - } - - if (dirty & /*$content*/ 1 && t10_value !== (t10_value = /*$content*/ ctx[0].subheading2 + "")) set_data_dev(t10, t10_value); - - if (dirty & /*groups, $content*/ 1) { - 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; - } - }, - d: function destroy(detaching) { - if (detaching) detach_dev(div1); - destroy_each(each_blocks, detaching); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_if_block.name, - type: "if", - source: "(30:4) {#if Object.keys($content).length!=0}", - ctx - }); - - return block; -} - -// (41:16) {#each groups as group} -function create_each_block(ctx) { - let div; - let p0; - let b0; - let t0_value = /*$content*/ ctx[0].location + ""; - let t0; - let t1; - let t2_value = /*$content*/ ctx[0][/*group*/ ctx[6].location[0]] + ""; - let t2; - let t3; - let p1; - let b1; - let t4_value = /*$content*/ ctx[0].members + ""; - let t4; - let t5; - let t6_value = /*group*/ ctx[6].members + ""; - let t6; - let t7; - let p2; - let b2; - let t8_value = /*$content*/ ctx[0].contact + ""; - let t8; - let t9; - let a; - let t10_value = /*$content*/ ctx[0][/*group*/ ctx[6].contact[1]] + ""; - let t10; - let t11; - - const block = { - c: function create() { - div = element("div"); - p0 = element("p"); - b0 = element("b"); - t0 = text(t0_value); - t1 = text(": "); - t2 = text(t2_value); - t3 = space(); - p1 = element("p"); - b1 = element("b"); - t4 = text(t4_value); - t5 = text(": "); - t6 = text(t6_value); - t7 = space(); - p2 = element("p"); - b2 = element("b"); - t8 = text(t8_value); - t9 = text(": "); - a = element("a"); - t10 = text(t10_value); - t11 = space(); - add_location(b0, file, 42, 27, 1462); - add_location(p0, file, 42, 24, 1459); - add_location(b1, file, 43, 27, 1552); - add_location(p1, file, 43, 24, 1549); - add_location(b2, file, 44, 27, 1627); - attr_dev(a, "href", /*group*/ ctx[6].contact[0]); - attr_dev(a, "target", ";_blank;"); - attr_dev(a, "rel", "noreferrer"); - add_location(a, file, 44, 54, 1654); - add_location(p2, file, 44, 24, 1624); - attr_dev(div, "class", "location-info"); - add_location(div, file, 41, 20, 1406); - }, - m: function mount(target, anchor) { - insert_dev(target, div, anchor); - append_dev(div, p0); - append_dev(p0, b0); - append_dev(b0, t0); - append_dev(b0, t1); - append_dev(p0, t2); - append_dev(div, t3); - append_dev(div, p1); - append_dev(p1, b1); - append_dev(b1, t4); - append_dev(b1, t5); - append_dev(p1, t6); - append_dev(div, t7); - append_dev(div, p2); - append_dev(p2, b2); - append_dev(b2, t8); - append_dev(b2, t9); - append_dev(p2, a); - append_dev(a, t10); - append_dev(div, t11); - }, - p: function update(ctx, dirty) { - if (dirty & /*$content*/ 1 && t0_value !== (t0_value = /*$content*/ ctx[0].location + "")) set_data_dev(t0, t0_value); - if (dirty & /*$content*/ 1 && t2_value !== (t2_value = /*$content*/ ctx[0][/*group*/ ctx[6].location[0]] + "")) set_data_dev(t2, t2_value); - if (dirty & /*$content*/ 1 && t4_value !== (t4_value = /*$content*/ ctx[0].members + "")) set_data_dev(t4, t4_value); - if (dirty & /*$content*/ 1 && t8_value !== (t8_value = /*$content*/ ctx[0].contact + "")) set_data_dev(t8, t8_value); - if (dirty & /*$content*/ 1 && t10_value !== (t10_value = /*$content*/ ctx[0][/*group*/ ctx[6].contact[1]] + "")) set_data_dev(t10, t10_value); - }, - d: function destroy(detaching) { - if (detaching) detach_dev(div); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_each_block.name, - type: "each", - source: "(41:16) {#each groups as group}", - ctx - }); - - return block; -} - -function create_fragment(ctx) { - let show_if = Object.keys(/*$content*/ ctx[0]).length != 0; - let if_block_anchor; - let if_block = show_if && create_if_block(ctx); - - const block = { - c: function create() { - if (if_block) if_block.c(); - if_block_anchor = empty(); - this.c = noop; - }, - 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) { - if (if_block) if_block.m(target, anchor); - insert_dev(target, if_block_anchor, anchor); - }, - p: function update(ctx, [dirty]) { - if (dirty & /*$content*/ 1) show_if = Object.keys(/*$content*/ ctx[0]).length != 0; - - if (show_if) { - if (if_block) { - if_block.p(ctx, dirty); - } else { - if_block = create_if_block(ctx); - if_block.c(); - if_block.m(if_block_anchor.parentNode, if_block_anchor); - } - } else if (if_block) { - if_block.d(1); - if_block = null; - } - }, - i: noop, - o: noop, - d: function destroy(detaching) { - if (if_block) if_block.d(detaching); - if (detaching) detach_dev(if_block_anchor); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_fragment.name, - type: "component", - source: "", - ctx - }); - - return block; -} - -function instance($$self, $$props, $$invalidate) { - let $content; - let { $$slots: slots = {}, $$scope } = $$props; - validate_slots('groups-component', slots, []); - let loaded; - let content = writable({}); - validate_store(content, 'content'); - component_subscribe($$self, content, value => $$invalidate(0, $content = value)); - let locale = loadLocaleContent(content, "groups-component", loaded); - - function mapCallbackGroups(createMap, content) { - let map = createMap([51.505, -0.09], 3); - addMarkersGroups(map, content); - } - - onMount(() => { - - }); - - const writable_props = []; - - Object_1.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(` was created with unknown prop '${key}'`); - }); - - const func = createMap => mapCallbackGroups(createMap, $content); - - $$self.$capture_state = () => ({ - onMount, - writable, - groups, - addMarkersGroups, - loadLocaleContent, - loaded, - content, - locale, - mapCallbackGroups, - $content - }); - - $$self.$inject_state = $$props => { - if ('loaded' in $$props) $$invalidate(1, loaded = $$props.loaded); - if ('content' in $$props) $$invalidate(2, content = $$props.content); - if ('locale' in $$props) $$invalidate(3, locale = $$props.locale); - }; - - if ($$props && "$$inject" in $$props) { - $$self.$inject_state($$props.$$inject); - } - - return [$content, loaded, content, locale, mapCallbackGroups, func]; -} - -class Groups_component extends SvelteElement { - constructor(options) { - super(); - this.shadowRoot.innerHTML = ``; - - init( - this, - { - target: this.shadowRoot, - props: attribute_to_object(this.attributes), - customElement: true - }, - instance, - create_fragment, - safe_not_equal, - {}, - null - ); - - if (options) { - if (options.target) { - insert_dev(options.target, this, options.anchor); - } - } - } -} - -customElements.define("groups-component", Groups_component); - -export { Groups_component as default }; +import{S as t,i as o,a as n,b as e,s as r,e as a,n as i,d as s,c as m,o as c,f as l,t as p,g,h,j as u,k as d,l as b,m as f,p as x}from"./index-4348483d.js";import{w as j}from"./index-71440b21.js";import{groups as v,addMarkersGroups as w}from"../../../../../../../../../js/groups.js";import{loadLocaleContent as k}from"../../../../../../../../../js/libraries/serverTools.js";import"../../../../../../../../../js/components/map-component.js";function y(t,o,n){const e=t.slice();return e[6]=o[n],e}function z(t){let o,n,r,a,i,m,c,j,w,k,z,E,O,R,T,A,C,H,L,M,N,S,_,q=t[0].heading+"",B=t[0].p1+"",F=t[0].p2+"",G=t[0].subheading1+"",I=t[0].subheading2+"",J=v,K=[];for(let o=0;on(0,e=t)));let i=k(a,"groups-component",r);function s(t,o){let n=t([51.505,-.09],3);w(n,o)}c((()=>{}));return[e,r,a,i,s,t=>s(t,e)]}class R extends t{constructor(t){super(),this.shadowRoot.innerHTML="",o(this,{target:this.shadowRoot,props:n(this.attributes),customElement:!0},O,E,r,{},null),t&&t.target&&e(t.target,this,t.anchor)}}customElements.define("groups-component",R);export{R as default}; diff --git a/Server/public/js/components/join-us-component.js b/Server/public/js/components/join-us-component.js index 677c3eb..fe73a9f 100644 --- a/Server/public/js/components/join-us-component.js +++ b/Server/public/js/components/join-us-component.js @@ -1,516 +1 @@ - -(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, c as validate_store, e as component_subscribe, o as onMount, g as globals, h as empty, n as noop, j as detach_dev, k as element, t as text, l as space, m as add_location, q as src_url_equal, p as attr_dev, r as set_custom_element_data, u as append_dev, w as set_data_dev } from './index-42a25c61.js'; -import { w as writable } from './index-a1c185ea.js'; -import { addMarkersGroups } from '../../../../../../../../../js/groups.js'; -import { addMarkersCoops } from '../../../../../../../../../js/coops.js'; -import { addMarkersCommunities } from '../../../../../../../../../js/communities.js'; -import { loadLocaleContent } from '../../../../../../../../../js/libraries/serverTools.js'; -import '../../../../../../../../../js/components/map-component.js'; - -/* src\join-us-component.svelte generated by Svelte v3.52.0 */ - -const { Object: Object_1 } = globals; - -const file = "src\\join-us-component.svelte"; - -// (34:4) {#if Object.keys($content).length!=0} -function create_if_block(ctx) { - let div2; - let div1; - let h1; - let t0_value = /*$content*/ ctx[0].heading + ""; - let t0; - let t1; - let img; - let img_src_value; - let t2; - let ol0; - let li0; - let t3_value = /*$content*/ ctx[0].condition1 + ""; - let t3; - let t4; - let li1; - let t5_value = /*$content*/ ctx[0].condition2 + ""; - let t5; - let t6; - let li2; - let t7_value = /*$content*/ ctx[0].condition3 + ""; - let t7; - let t8; - let p0; - let raw_value = /*$content*/ ctx[0].conditionsOutcome + ""; - let t9; - let h20; - let t10_value = /*$content*/ ctx[0].subheading1 + ""; - let t10; - let t11; - let ol1; - let li3; - let t12_value = /*$content*/ ctx[0].valueProposition1 + ""; - let t12; - let t13; - let li4; - let t14_value = /*$content*/ ctx[0].valueProposition2 + ""; - let t14; - let t15; - let li5; - let t16_value = /*$content*/ ctx[0].valueProposition3 + ""; - let t16; - let t17; - let li6; - let t18_value = /*$content*/ ctx[0].valueProposition4 + ""; - let t18; - let t19; - let p1; - let t20_value = /*$content*/ ctx[0].valueProposition5 + ""; - let t20; - let t21; - let h21; - let t22_value = /*$content*/ ctx[0].subheading2 + ""; - let t22; - let t23; - let div0; - let p2; - let t24_value = /*$content*/ ctx[0].findOur + ""; - let t24; - let t25; - let ol2; - let li7; - let a0; - let t26_value = /*$content*/ ctx[0].group + ""; - let t26; - let t27; - let t28; - let li8; - let a1; - let t29_value = /*$content*/ ctx[0].community + ""; - let t29; - let t30; - let t31_value = /*$content*/ ctx[0].or + ""; - let t31; - let t32; - let li9; - let a2; - let t33_value = /*$content*/ ctx[0].cooperative + ""; - let t33; - let t34; - let p3; - let t35_value = /*$content*/ ctx[0].nearYou + ""; - let t35; - let t36; - let p4; - let t37_value = /*$content*/ ctx[0].noneNear + ""; - let t37; - let t38; - let a3; - let t39_value = /*$content*/ ctx[0].WhatsAppGroup + ""; - let t39; - let t40; - let t41_value = /*$content*/ ctx[0].or + ""; - let t41; - let t42; - let a4; - let t43_value = /*$content*/ ctx[0].DiscordServer + ""; - let t43; - let t44_value = /*$content*/ ctx[0].helpStart + ""; - let t44; - let t45; - let map_component; - let map_component_callback_value; - - const block = { - c: function create() { - div2 = element("div"); - div1 = element("div"); - h1 = element("h1"); - t0 = text(t0_value); - t1 = space(); - img = element("img"); - t2 = space(); - ol0 = element("ol"); - li0 = element("li"); - t3 = text(t3_value); - t4 = space(); - li1 = element("li"); - t5 = text(t5_value); - t6 = space(); - li2 = element("li"); - t7 = text(t7_value); - t8 = space(); - p0 = element("p"); - t9 = space(); - h20 = element("h2"); - t10 = text(t10_value); - t11 = space(); - ol1 = element("ol"); - li3 = element("li"); - t12 = text(t12_value); - t13 = space(); - li4 = element("li"); - t14 = text(t14_value); - t15 = space(); - li5 = element("li"); - t16 = text(t16_value); - t17 = space(); - li6 = element("li"); - t18 = text(t18_value); - t19 = space(); - p1 = element("p"); - t20 = text(t20_value); - t21 = space(); - h21 = element("h2"); - t22 = text(t22_value); - t23 = space(); - div0 = element("div"); - p2 = element("p"); - t24 = text(t24_value); - t25 = space(); - ol2 = element("ol"); - li7 = element("li"); - a0 = element("a"); - t26 = text(t26_value); - t27 = text(","); - t28 = space(); - li8 = element("li"); - a1 = element("a"); - t29 = text(t29_value); - t30 = space(); - t31 = text(t31_value); - t32 = space(); - li9 = element("li"); - a2 = element("a"); - t33 = text(t33_value); - t34 = space(); - p3 = element("p"); - t35 = text(t35_value); - t36 = space(); - p4 = element("p"); - t37 = text(t37_value); - t38 = space(); - a3 = element("a"); - t39 = text(t39_value); - t40 = space(); - t41 = text(t41_value); - t42 = space(); - a4 = element("a"); - t43 = text(t43_value); - t44 = text(t44_value); - t45 = space(); - map_component = element("map-component"); - add_location(h1, file, 36, 16, 1066); - if (!src_url_equal(img.src, img_src_value = "/img/common/join-group.svg")) attr_dev(img, "src", img_src_value); - attr_dev(img, "id", "join-group"); - attr_dev(img, "alt", "join group"); - add_location(img, file, 37, 16, 1111); - add_location(li0, file, 39, 20, 1246); - add_location(li1, file, 40, 20, 1298); - add_location(li2, file, 41, 20, 1350); - add_location(p0, file, 42, 20, 1402); - attr_dev(ol0, "id", "condition-list"); - add_location(ol0, file, 38, 16, 1200); - add_location(h20, file, 44, 16, 1484); - add_location(li3, file, 46, 20, 1587); - add_location(li4, file, 47, 20, 1646); - add_location(li5, file, 48, 20, 1705); - add_location(li6, file, 49, 20, 1764); - add_location(p1, file, 50, 20, 1823); - attr_dev(ol1, "id", "value-proposition-list"); - add_location(ol1, file, 45, 16, 1533); - add_location(h21, file, 52, 16, 1899); - add_location(p2, file, 54, 20, 2000); - attr_dev(a0, "href", "/" + /*locale*/ ctx[3] + "/groups"); - add_location(a0, file, 56, 28, 2081); - add_location(li7, file, 56, 24, 2077); - attr_dev(a1, "href", "/" + /*locale*/ ctx[3] + "/communities"); - add_location(a1, file, 57, 28, 2173); - add_location(li8, file, 57, 24, 2169); - attr_dev(a2, "href", "/" + /*locale*/ ctx[3] + "/cooperatives"); - add_location(a2, file, 58, 28, 2287); - add_location(li9, file, 58, 24, 2283); - add_location(ol2, file, 55, 20, 2047); - add_location(p3, file, 60, 20, 2408); - attr_dev(div0, "id", "call-to-action-list"); - add_location(div0, file, 53, 16, 1948); - attr_dev(a3, "href", "https://chat.whatsapp.com/BhnmUNljUxJ2AjeHUwyTKh"); - attr_dev(a3, "target", "_blank"); - attr_dev(a3, "rel", "noreferrer"); - add_location(a3, file, 62, 39, 2498); - attr_dev(a4, "href", "https://discord.gg/xAPZmyr8B6"); - attr_dev(a4, "target", "_blank"); - attr_dev(a4, "rel", "noreferrer"); - add_location(a4, file, 62, 172, 2631); - add_location(p4, file, 62, 16, 2475); - set_custom_element_data(map_component, "id", "map"); - set_custom_element_data(map_component, "callback", map_component_callback_value = /*func*/ ctx[5]); - add_location(map_component, file, 63, 16, 2772); - attr_dev(div1, "id", "text-container"); - add_location(div1, file, 35, 12, 1023); - attr_dev(div2, "id", "container"); - add_location(div2, file, 34, 8, 989); - }, - m: function mount(target, anchor) { - insert_dev(target, div2, anchor); - append_dev(div2, div1); - append_dev(div1, h1); - append_dev(h1, t0); - append_dev(div1, t1); - append_dev(div1, img); - append_dev(div1, t2); - append_dev(div1, ol0); - append_dev(ol0, li0); - append_dev(li0, t3); - append_dev(ol0, t4); - append_dev(ol0, li1); - append_dev(li1, t5); - append_dev(ol0, t6); - append_dev(ol0, li2); - append_dev(li2, t7); - append_dev(ol0, t8); - append_dev(ol0, p0); - p0.innerHTML = raw_value; - append_dev(div1, t9); - append_dev(div1, h20); - append_dev(h20, t10); - append_dev(div1, t11); - append_dev(div1, ol1); - append_dev(ol1, li3); - append_dev(li3, t12); - append_dev(ol1, t13); - append_dev(ol1, li4); - append_dev(li4, t14); - append_dev(ol1, t15); - append_dev(ol1, li5); - append_dev(li5, t16); - append_dev(ol1, t17); - append_dev(ol1, li6); - append_dev(li6, t18); - append_dev(ol1, t19); - append_dev(ol1, p1); - append_dev(p1, t20); - append_dev(div1, t21); - append_dev(div1, h21); - append_dev(h21, t22); - append_dev(div1, t23); - append_dev(div1, div0); - append_dev(div0, p2); - append_dev(p2, t24); - append_dev(div0, t25); - append_dev(div0, ol2); - append_dev(ol2, li7); - append_dev(li7, a0); - append_dev(a0, t26); - append_dev(li7, t27); - append_dev(ol2, t28); - append_dev(ol2, li8); - append_dev(li8, a1); - append_dev(a1, t29); - append_dev(li8, t30); - append_dev(li8, t31); - append_dev(ol2, t32); - append_dev(ol2, li9); - append_dev(li9, a2); - append_dev(a2, t33); - append_dev(div0, t34); - append_dev(div0, p3); - append_dev(p3, t35); - append_dev(div1, t36); - append_dev(div1, p4); - append_dev(p4, t37); - append_dev(p4, t38); - append_dev(p4, a3); - append_dev(a3, t39); - append_dev(p4, t40); - append_dev(p4, t41); - append_dev(p4, t42); - append_dev(p4, a4); - append_dev(a4, t43); - append_dev(p4, t44); - append_dev(div1, t45); - append_dev(div1, map_component); - }, - p: function update(ctx, dirty) { - if (dirty & /*$content*/ 1 && t0_value !== (t0_value = /*$content*/ ctx[0].heading + "")) set_data_dev(t0, t0_value); - if (dirty & /*$content*/ 1 && t3_value !== (t3_value = /*$content*/ ctx[0].condition1 + "")) set_data_dev(t3, t3_value); - if (dirty & /*$content*/ 1 && t5_value !== (t5_value = /*$content*/ ctx[0].condition2 + "")) set_data_dev(t5, t5_value); - if (dirty & /*$content*/ 1 && t7_value !== (t7_value = /*$content*/ ctx[0].condition3 + "")) set_data_dev(t7, t7_value); - if (dirty & /*$content*/ 1 && raw_value !== (raw_value = /*$content*/ ctx[0].conditionsOutcome + "")) p0.innerHTML = raw_value; if (dirty & /*$content*/ 1 && t10_value !== (t10_value = /*$content*/ ctx[0].subheading1 + "")) set_data_dev(t10, t10_value); - if (dirty & /*$content*/ 1 && t12_value !== (t12_value = /*$content*/ ctx[0].valueProposition1 + "")) set_data_dev(t12, t12_value); - if (dirty & /*$content*/ 1 && t14_value !== (t14_value = /*$content*/ ctx[0].valueProposition2 + "")) set_data_dev(t14, t14_value); - if (dirty & /*$content*/ 1 && t16_value !== (t16_value = /*$content*/ ctx[0].valueProposition3 + "")) set_data_dev(t16, t16_value); - if (dirty & /*$content*/ 1 && t18_value !== (t18_value = /*$content*/ ctx[0].valueProposition4 + "")) set_data_dev(t18, t18_value); - if (dirty & /*$content*/ 1 && t20_value !== (t20_value = /*$content*/ ctx[0].valueProposition5 + "")) set_data_dev(t20, t20_value); - if (dirty & /*$content*/ 1 && t22_value !== (t22_value = /*$content*/ ctx[0].subheading2 + "")) set_data_dev(t22, t22_value); - if (dirty & /*$content*/ 1 && t24_value !== (t24_value = /*$content*/ ctx[0].findOur + "")) set_data_dev(t24, t24_value); - if (dirty & /*$content*/ 1 && t26_value !== (t26_value = /*$content*/ ctx[0].group + "")) set_data_dev(t26, t26_value); - if (dirty & /*$content*/ 1 && t29_value !== (t29_value = /*$content*/ ctx[0].community + "")) set_data_dev(t29, t29_value); - if (dirty & /*$content*/ 1 && t31_value !== (t31_value = /*$content*/ ctx[0].or + "")) set_data_dev(t31, t31_value); - if (dirty & /*$content*/ 1 && t33_value !== (t33_value = /*$content*/ ctx[0].cooperative + "")) set_data_dev(t33, t33_value); - if (dirty & /*$content*/ 1 && t35_value !== (t35_value = /*$content*/ ctx[0].nearYou + "")) set_data_dev(t35, t35_value); - if (dirty & /*$content*/ 1 && t37_value !== (t37_value = /*$content*/ ctx[0].noneNear + "")) set_data_dev(t37, t37_value); - if (dirty & /*$content*/ 1 && t39_value !== (t39_value = /*$content*/ ctx[0].WhatsAppGroup + "")) set_data_dev(t39, t39_value); - if (dirty & /*$content*/ 1 && t41_value !== (t41_value = /*$content*/ ctx[0].or + "")) set_data_dev(t41, t41_value); - if (dirty & /*$content*/ 1 && t43_value !== (t43_value = /*$content*/ ctx[0].DiscordServer + "")) set_data_dev(t43, t43_value); - if (dirty & /*$content*/ 1 && t44_value !== (t44_value = /*$content*/ ctx[0].helpStart + "")) set_data_dev(t44, t44_value); - - if (dirty & /*$content*/ 1 && map_component_callback_value !== (map_component_callback_value = /*func*/ ctx[5])) { - set_custom_element_data(map_component, "callback", map_component_callback_value); - } - }, - d: function destroy(detaching) { - if (detaching) detach_dev(div2); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_if_block.name, - type: "if", - source: "(34:4) {#if Object.keys($content).length!=0}", - ctx - }); - - return block; -} - -function create_fragment(ctx) { - let show_if = Object.keys(/*$content*/ ctx[0]).length != 0; - let if_block_anchor; - let if_block = show_if && create_if_block(ctx); - - const block = { - c: function create() { - if (if_block) if_block.c(); - if_block_anchor = empty(); - this.c = noop; - }, - 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) { - if (if_block) if_block.m(target, anchor); - insert_dev(target, if_block_anchor, anchor); - }, - p: function update(ctx, [dirty]) { - if (dirty & /*$content*/ 1) show_if = Object.keys(/*$content*/ ctx[0]).length != 0; - - if (show_if) { - if (if_block) { - if_block.p(ctx, dirty); - } else { - if_block = create_if_block(ctx); - if_block.c(); - if_block.m(if_block_anchor.parentNode, if_block_anchor); - } - } else if (if_block) { - if_block.d(1); - if_block = null; - } - }, - i: noop, - o: noop, - d: function destroy(detaching) { - if (if_block) if_block.d(detaching); - if (detaching) detach_dev(if_block_anchor); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_fragment.name, - type: "component", - source: "", - ctx - }); - - return block; -} - -function instance($$self, $$props, $$invalidate) { - let $content; - let { $$slots: slots = {}, $$scope } = $$props; - validate_slots('join-us-component', slots, []); - let loaded; - let content = writable({}); - validate_store(content, 'content'); - component_subscribe($$self, content, value => $$invalidate(0, $content = value)); - let locale = loadLocaleContent(content, "join-us-component", loaded); - - function mapCallback(createMap, content, locale) { - let map = createMap([51.505, -0.09], 3); - addMarkersGroups(map, content, locale); - addMarkersCoops(map, content, locale); - addMarkersCommunities(map, content, locale); - } - - onMount(() => { - - }); - - const writable_props = []; - - Object_1.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(` was created with unknown prop '${key}'`); - }); - - const func = createMap => mapCallback(createMap, $content, locale); - - $$self.$capture_state = () => ({ - onMount, - writable, - addMarkersGroups, - addMarkersCoops, - addMarkersCommunities, - loadLocaleContent, - loaded, - content, - locale, - mapCallback, - $content - }); - - $$self.$inject_state = $$props => { - if ('loaded' in $$props) $$invalidate(1, loaded = $$props.loaded); - if ('content' in $$props) $$invalidate(2, content = $$props.content); - if ('locale' in $$props) $$invalidate(3, locale = $$props.locale); - }; - - if ($$props && "$$inject" in $$props) { - $$self.$inject_state($$props.$$inject); - } - - return [$content, loaded, content, locale, mapCallback, func]; -} - -class Join_us_component extends SvelteElement { - constructor(options) { - super(); - - this.shadowRoot.innerHTML = ``; - - init( - this, - { - target: this.shadowRoot, - props: attribute_to_object(this.attributes), - customElement: true - }, - instance, - create_fragment, - safe_not_equal, - {}, - null - ); - - if (options) { - if (options.target) { - insert_dev(options.target, this, options.anchor); - } - } - } -} - -customElements.define("join-us-component", Join_us_component); - -export { Join_us_component as default }; +import{S as o,i as t,a as i,b as r,s as n,e,n as a,d as s,c as m,o as l,f as c,t as p,g as u,j as d,h as g,k as h,l as f,m as v}from"./index-4348483d.js";import{w as b}from"./index-71440b21.js";import{addMarkersGroups as j}from"../../../../../../../../../js/groups.js";import{addMarkersCoops as x}from"../../../../../../../../../js/coops.js";import{addMarkersCommunities as y}from"../../../../../../../../../js/communities.js";import{loadLocaleContent as P}from"../../../../../../../../../js/libraries/serverTools.js";import"../../../../../../../../../js/components/map-component.js";function w(o){let t,i,n,e,a,m,l,b,j,x,y,P,w,k,O,A,S,T,D,H,N,L,M,U,z,B,E,G,R,W,Y,_,C,J,K,Z,q,F,I,Q,V,X,$,oo,to,io,ro,no,eo,ao,so,mo,lo,co,po,uo,go,ho,fo,vo,bo,jo,xo,yo,Po,wo,ko,Oo,Ao,So,To,Do,Ho,No,Lo,Mo,Uo,zo,Bo,Eo=o[0].heading+"",Go=o[0].condition1+"",Ro=o[0].condition2+"",Wo=o[0].condition3+"",Yo=o[0].conditionsOutcome+"",_o=o[0].subheading1+"",Co=o[0].valueProposition1+"",Jo=o[0].valueProposition2+"",Ko=o[0].valueProposition3+"",Zo=o[0].valueProposition4+"",qo=o[0].valueProposition5+"",Fo=o[0].subheading2+"",Io=o[0].findOur+"",Qo=o[0].group+"",Vo=o[0].community+"",Xo=o[0].or+"",$o=o[0].cooperative+"",ot=o[0].nearYou+"",tt=o[0].noneNear+"",it=o[0].WhatsAppGroup+"",rt=o[0].or+"",nt=o[0].DiscordServer+"",et=o[0].helpStart+"";return{c(){t=c("div"),i=c("div"),n=c("h1"),e=p(Eo),a=u(),m=c("img"),b=u(),j=c("ol"),x=c("li"),y=p(Go),P=u(),w=c("li"),k=p(Ro),O=u(),A=c("li"),S=p(Wo),T=u(),D=c("p"),H=u(),N=c("h2"),L=p(_o),M=u(),U=c("ol"),z=c("li"),B=p(Co),E=u(),G=c("li"),R=p(Jo),W=u(),Y=c("li"),_=p(Ko),C=u(),J=c("li"),K=p(Zo),Z=u(),q=c("p"),F=p(qo),I=u(),Q=c("h2"),V=p(Fo),X=u(),$=c("div"),oo=c("p"),to=p(Io),io=u(),ro=c("ol"),no=c("li"),eo=c("a"),ao=p(Qo),so=p(","),mo=u(),lo=c("li"),co=c("a"),po=p(Vo),uo=u(),go=p(Xo),ho=u(),fo=c("li"),vo=c("a"),bo=p($o),jo=u(),xo=c("p"),yo=p(ot),Po=u(),wo=c("p"),ko=p(tt),Oo=u(),Ao=c("a"),So=p(it),To=u(),Do=p(rt),Ho=u(),No=c("a"),Lo=p(nt),Mo=p(et),Uo=u(),zo=c("map-component"),d(m.src,l="/img/common/join-group.svg")||g(m,"src","/img/common/join-group.svg"),g(m,"id","join-group"),g(m,"alt","join group"),g(j,"id","condition-list"),g(U,"id","value-proposition-list"),g(eo,"href","/"+o[3]+"/groups"),g(co,"href","/"+o[3]+"/communities"),g(vo,"href","/"+o[3]+"/cooperatives"),g($,"id","call-to-action-list"),g(Ao,"href","https://chat.whatsapp.com/BhnmUNljUxJ2AjeHUwyTKh"),g(Ao,"target","_blank"),g(Ao,"rel","noreferrer"),g(No,"href","https://discord.gg/xAPZmyr8B6"),g(No,"target","_blank"),g(No,"rel","noreferrer"),h(zo,"id","map"),h(zo,"callback",Bo=o[5]),g(i,"id","text-container"),g(t,"id","container")},m(o,s){r(o,t,s),f(t,i),f(i,n),f(n,e),f(i,a),f(i,m),f(i,b),f(i,j),f(j,x),f(x,y),f(j,P),f(j,w),f(w,k),f(j,O),f(j,A),f(A,S),f(j,T),f(j,D),D.innerHTML=Yo,f(i,H),f(i,N),f(N,L),f(i,M),f(i,U),f(U,z),f(z,B),f(U,E),f(U,G),f(G,R),f(U,W),f(U,Y),f(Y,_),f(U,C),f(U,J),f(J,K),f(U,Z),f(U,q),f(q,F),f(i,I),f(i,Q),f(Q,V),f(i,X),f(i,$),f($,oo),f(oo,to),f($,io),f($,ro),f(ro,no),f(no,eo),f(eo,ao),f(no,so),f(ro,mo),f(ro,lo),f(lo,co),f(co,po),f(lo,uo),f(lo,go),f(ro,ho),f(ro,fo),f(fo,vo),f(vo,bo),f($,jo),f($,xo),f(xo,yo),f(i,Po),f(i,wo),f(wo,ko),f(wo,Oo),f(wo,Ao),f(Ao,So),f(wo,To),f(wo,Do),f(wo,Ho),f(wo,No),f(No,Lo),f(wo,Mo),f(i,Uo),f(i,zo)},p(o,t){1&t&&Eo!==(Eo=o[0].heading+"")&&v(e,Eo),1&t&&Go!==(Go=o[0].condition1+"")&&v(y,Go),1&t&&Ro!==(Ro=o[0].condition2+"")&&v(k,Ro),1&t&&Wo!==(Wo=o[0].condition3+"")&&v(S,Wo),1&t&&Yo!==(Yo=o[0].conditionsOutcome+"")&&(D.innerHTML=Yo),1&t&&_o!==(_o=o[0].subheading1+"")&&v(L,_o),1&t&&Co!==(Co=o[0].valueProposition1+"")&&v(B,Co),1&t&&Jo!==(Jo=o[0].valueProposition2+"")&&v(R,Jo),1&t&&Ko!==(Ko=o[0].valueProposition3+"")&&v(_,Ko),1&t&&Zo!==(Zo=o[0].valueProposition4+"")&&v(K,Zo),1&t&&qo!==(qo=o[0].valueProposition5+"")&&v(F,qo),1&t&&Fo!==(Fo=o[0].subheading2+"")&&v(V,Fo),1&t&&Io!==(Io=o[0].findOur+"")&&v(to,Io),1&t&&Qo!==(Qo=o[0].group+"")&&v(ao,Qo),1&t&&Vo!==(Vo=o[0].community+"")&&v(po,Vo),1&t&&Xo!==(Xo=o[0].or+"")&&v(go,Xo),1&t&&$o!==($o=o[0].cooperative+"")&&v(bo,$o),1&t&&ot!==(ot=o[0].nearYou+"")&&v(yo,ot),1&t&&tt!==(tt=o[0].noneNear+"")&&v(ko,tt),1&t&&it!==(it=o[0].WhatsAppGroup+"")&&v(So,it),1&t&&rt!==(rt=o[0].or+"")&&v(Do,rt),1&t&&nt!==(nt=o[0].DiscordServer+"")&&v(Lo,nt),1&t&&et!==(et=o[0].helpStart+"")&&v(Mo,et),1&t&&Bo!==(Bo=o[5])&&h(zo,"callback",Bo)},d(o){o&&s(t)}}}function k(o){let t,i=0!=Object.keys(o[0]).length,n=i&&w(o);return{c(){n&&n.c(),t=e(),this.c=a},m(o,i){n&&n.m(o,i),r(o,t,i)},p(o,[r]){1&r&&(i=0!=Object.keys(o[0]).length),i?n?n.p(o,r):(n=w(o),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null)},i:a,o:a,d(o){n&&n.d(o),o&&s(t)}}}function O(o,t,i){let r,n,e=b({});m(o,e,(o=>i(0,r=o)));let a=P(e,"join-us-component",n);function s(o,t,i){let r=o([51.505,-.09],3);j(r,t,i),x(r,t,i),y(r,t,i)}l((()=>{}));return[r,n,e,a,s,o=>s(o,r,a)]}class A extends o{constructor(o){super(),this.shadowRoot.innerHTML="",t(this,{target:this.shadowRoot,props:i(this.attributes),customElement:!0},O,k,n,{},null),o&&o.target&&r(o.target,this,o.anchor)}}customElements.define("join-us-component",A);export{A as default}; diff --git a/Server/public/js/components/landing-component.js b/Server/public/js/components/landing-component.js index 11dff3e..9f0028d 100644 --- a/Server/public/js/components/landing-component.js +++ b/Server/public/js/components/landing-component.js @@ -1,364 +1 @@ - -(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, c as validate_store, e as component_subscribe, o as onMount, g as globals, h as empty, n as noop, j as detach_dev, C as binding_callbacks, k as element, l as space, t as text, p as attr_dev, m as add_location, q as src_url_equal, D as set_style, u as append_dev, w as set_data_dev } from './index-42a25c61.js'; -import { loadLocaleContent } from '../../../../../../../../../js/libraries/serverTools.js'; -import { w as writable } from './index-a1c185ea.js'; - -/* src\landing-component.svelte generated by Svelte v3.52.0 */ - -const { Object: Object_1 } = globals; -const file = "src\\landing-component.svelte"; - -// (36:4) {#if Object.keys($content).length!=0} -function create_if_block(ctx) { - let div5; - let picture; - let source0; - let t0; - let source1; - let t1; - let img0; - let t2; - let div4; - let p0; - let t3_value = /*$content*/ ctx[2].top + ""; - let t3; - let t4; - let div3; - let div0; - let h20; - let t5_value = /*$content*/ ctx[2].groupsTitle + ""; - let t5; - let t6; - let img1; - let img1_src_value; - let t7; - let p1; - let t8_value = /*$content*/ ctx[2].groupsText + ""; - let t8; - let t9; - let div1; - let h21; - let t10_value = /*$content*/ ctx[2].communitiesTitle + ""; - let t10; - let t11; - let img2; - let img2_src_value; - let t12; - let p2; - let t13_value = /*$content*/ ctx[2].communitiesText + ""; - let t13; - let t14; - let div2; - let h22; - let t15_value = /*$content*/ ctx[2].cooperativesTitle + ""; - let t15; - let t16; - let img3; - let img3_src_value; - let t17; - let p3; - let t18_value = /*$content*/ ctx[2].cooperativesText + ""; - let t18; - - const block = { - c: function create() { - div5 = element("div"); - picture = element("picture"); - source0 = element("source"); - t0 = space(); - source1 = element("source"); - t1 = space(); - img0 = element("img"); - t2 = space(); - div4 = element("div"); - p0 = element("p"); - t3 = text(t3_value); - t4 = space(); - div3 = element("div"); - div0 = element("div"); - h20 = element("h2"); - t5 = text(t5_value); - t6 = space(); - img1 = element("img"); - t7 = space(); - p1 = element("p"); - t8 = text(t8_value); - t9 = space(); - div1 = element("div"); - h21 = element("h2"); - t10 = text(t10_value); - t11 = space(); - img2 = element("img"); - t12 = space(); - p2 = element("p"); - t13 = text(t13_value); - t14 = space(); - div2 = element("div"); - h22 = element("h2"); - t15 = text(t15_value); - t16 = space(); - img3 = element("img"); - t17 = space(); - p3 = element("p"); - t18 = text(t18_value); - attr_dev(source0, "srcset", "/img/crowd.webp"); - add_location(source0, file, 38, 16, 855); - attr_dev(source1, "srcset", "/img/crowd.png"); - add_location(source1, file, 39, 16, 906); - attr_dev(img0, "id", "crowd"); - attr_dev(img0, "alt", "crowd"); - add_location(img0, file, 40, 16, 956); - add_location(picture, file, 37, 12, 828); - add_location(p0, file, 44, 16, 1079); - add_location(h20, file, 47, 24, 1247); - attr_dev(img1, "id", "groups-img"); - if (!src_url_equal(img1.src, img1_src_value = "/img/common/groups.svg")) attr_dev(img1, "src", img1_src_value); - attr_dev(img1, "alt", "groups"); - add_location(img1, file, 48, 24, 1304); - add_location(p1, file, 49, 24, 1393); - add_location(div0, file, 46, 20, 1216); - add_location(h21, file, 52, 24, 1502); - attr_dev(img2, "id", "communities-img"); - if (!src_url_equal(img2.src, img2_src_value = "/img/common/communities.svg")) attr_dev(img2, "src", img2_src_value); - attr_dev(img2, "alt", "communities"); - add_location(img2, file, 53, 24, 1564); - add_location(p2, file, 54, 24, 1668); - add_location(div1, file, 51, 20, 1471); - add_location(h22, file, 57, 24, 1782); - attr_dev(img3, "id", "coops-img"); - if (!src_url_equal(img3.src, img3_src_value = "/img/common/coops.svg")) attr_dev(img3, "src", img3_src_value); - attr_dev(img3, "alt", "coops"); - add_location(img3, file, 58, 24, 1845); - add_location(p3, file, 59, 24, 1931); - add_location(div2, file, 56, 20, 1751); - attr_dev(div3, "id", "container-grid"); - set_style(div3, "--grid-width", /*gridWidth*/ ctx[1]); - add_location(div3, file, 45, 16, 1118); - attr_dev(div4, "id", "text-container"); - add_location(div4, file, 43, 12, 1036); - attr_dev(div5, "id", "container"); - add_location(div5, file, 36, 8, 794); - }, - m: function mount(target, anchor) { - insert_dev(target, div5, anchor); - append_dev(div5, picture); - append_dev(picture, source0); - append_dev(picture, t0); - append_dev(picture, source1); - append_dev(picture, t1); - append_dev(picture, img0); - append_dev(div5, t2); - append_dev(div5, div4); - append_dev(div4, p0); - append_dev(p0, t3); - append_dev(div4, t4); - append_dev(div4, div3); - append_dev(div3, div0); - append_dev(div0, h20); - append_dev(h20, t5); - append_dev(div0, t6); - append_dev(div0, img1); - append_dev(div0, t7); - append_dev(div0, p1); - append_dev(p1, t8); - append_dev(div3, t9); - append_dev(div3, div1); - append_dev(div1, h21); - append_dev(h21, t10); - append_dev(div1, t11); - append_dev(div1, img2); - append_dev(div1, t12); - append_dev(div1, p2); - append_dev(p2, t13); - append_dev(div3, t14); - append_dev(div3, div2); - append_dev(div2, h22); - append_dev(h22, t15); - append_dev(div2, t16); - append_dev(div2, img3); - append_dev(div2, t17); - append_dev(div2, p3); - append_dev(p3, t18); - /*div3_binding*/ ctx[5](div3); - }, - p: function update(ctx, dirty) { - if (dirty & /*$content*/ 4 && t3_value !== (t3_value = /*$content*/ ctx[2].top + "")) set_data_dev(t3, t3_value); - if (dirty & /*$content*/ 4 && t5_value !== (t5_value = /*$content*/ ctx[2].groupsTitle + "")) set_data_dev(t5, t5_value); - if (dirty & /*$content*/ 4 && t8_value !== (t8_value = /*$content*/ ctx[2].groupsText + "")) set_data_dev(t8, t8_value); - if (dirty & /*$content*/ 4 && t10_value !== (t10_value = /*$content*/ ctx[2].communitiesTitle + "")) set_data_dev(t10, t10_value); - if (dirty & /*$content*/ 4 && t13_value !== (t13_value = /*$content*/ ctx[2].communitiesText + "")) set_data_dev(t13, t13_value); - if (dirty & /*$content*/ 4 && t15_value !== (t15_value = /*$content*/ ctx[2].cooperativesTitle + "")) set_data_dev(t15, t15_value); - if (dirty & /*$content*/ 4 && t18_value !== (t18_value = /*$content*/ ctx[2].cooperativesText + "")) set_data_dev(t18, t18_value); - - if (dirty & /*gridWidth*/ 2) { - set_style(div3, "--grid-width", /*gridWidth*/ ctx[1]); - } - }, - d: function destroy(detaching) { - if (detaching) detach_dev(div5); - /*div3_binding*/ ctx[5](null); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_if_block.name, - type: "if", - source: "(36:4) {#if Object.keys($content).length!=0}", - ctx - }); - - return block; -} - -function create_fragment(ctx) { - let show_if = Object.keys(/*$content*/ ctx[2]).length != 0; - let if_block_anchor; - let if_block = show_if && create_if_block(ctx); - - const block = { - c: function create() { - if (if_block) if_block.c(); - if_block_anchor = empty(); - this.c = noop; - }, - 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) { - if (if_block) if_block.m(target, anchor); - insert_dev(target, if_block_anchor, anchor); - }, - p: function update(ctx, [dirty]) { - if (dirty & /*$content*/ 4) show_if = Object.keys(/*$content*/ ctx[2]).length != 0; - - if (show_if) { - if (if_block) { - if_block.p(ctx, dirty); - } else { - if_block = create_if_block(ctx); - if_block.c(); - if_block.m(if_block_anchor.parentNode, if_block_anchor); - } - } else if (if_block) { - if_block.d(1); - if_block = null; - } - }, - i: noop, - o: noop, - d: function destroy(detaching) { - if (if_block) if_block.d(detaching); - if (detaching) detach_dev(if_block_anchor); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_fragment.name, - type: "component", - source: "", - ctx - }); - - return block; -} - -function instance($$self, $$props, $$invalidate) { - let $content; - let { $$slots: slots = {}, $$scope } = $$props; - validate_slots('landing-component', slots, []); - let grid; - let gridWidth; - let loaded; - let content = writable({}); - validate_store(content, 'content'); - component_subscribe($$self, content, value => $$invalidate(2, $content = value)); - - function changeWidth(locale) { - if (locale == "ru") { - $$invalidate(1, gridWidth = "1.2fr 1.05fr 1fr"); - } else { - $$invalidate(1, gridWidth = "1.2fr 1.1fr 1fr"); - } - } - - let locale = loadLocaleContent(content, "landing-component", loaded, changeWidth); - changeWidth(locale); - - onMount(() => { - - }); - - const writable_props = []; - - Object_1.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(` was created with unknown prop '${key}'`); - }); - - function div3_binding($$value) { - binding_callbacks[$$value ? 'unshift' : 'push'](() => { - grid = $$value; - $$invalidate(0, grid); - }); - } - - $$self.$capture_state = () => ({ - onMount, - loadLocaleContent, - writable, - grid, - gridWidth, - loaded, - content, - changeWidth, - locale, - $content - }); - - $$self.$inject_state = $$props => { - if ('grid' in $$props) $$invalidate(0, grid = $$props.grid); - if ('gridWidth' in $$props) $$invalidate(1, gridWidth = $$props.gridWidth); - if ('loaded' in $$props) $$invalidate(3, loaded = $$props.loaded); - if ('content' in $$props) $$invalidate(4, content = $$props.content); - if ('locale' in $$props) locale = $$props.locale; - }; - - if ($$props && "$$inject" in $$props) { - $$self.$inject_state($$props.$$inject); - } - - return [grid, gridWidth, $content, loaded, content, div3_binding]; -} - -class Landing_component extends SvelteElement { - constructor(options) { - super(); - this.shadowRoot.innerHTML = ``; - - init( - this, - { - target: this.shadowRoot, - props: attribute_to_object(this.attributes), - customElement: true - }, - instance, - create_fragment, - safe_not_equal, - {}, - null - ); - - if (options) { - if (options.target) { - insert_dev(options.target, this, options.anchor); - } - } - } -} - -customElements.define("landing-component", Landing_component); - -export { Landing_component as default }; +import{S as i,i as t,a as o,b as e,s as r,e as s,n,d as m,c as a,o as c,f as g,g as d,t as p,h as l,j as u,v as h,l as v,m as f,w as x}from"./index-4348483d.js";import{loadLocaleContent as w}from"../../../../../../../../../js/libraries/serverTools.js";import{w as T}from"./index-71440b21.js";function b(i){let t,o,r,s,n,a,c,x,w,T,b,y,j,k,z,E,H,L,M,O,R,N,S,q,A,B,C,D,F,G,I,J,K,P,Q,U,V,W=i[2].top+"",X=i[2].groupsTitle+"",Y=i[2].groupsText+"",Z=i[2].communitiesTitle+"",$=i[2].communitiesText+"",_=i[2].cooperativesTitle+"",ii=i[2].cooperativesText+"";return{c(){t=g("div"),o=g("picture"),o.innerHTML=' \n \n crowd',r=d(),s=g("div"),n=g("p"),a=p(W),c=d(),x=g("div"),w=g("div"),T=g("h2"),b=p(X),y=d(),j=g("img"),z=d(),E=g("p"),H=p(Y),L=d(),M=g("div"),O=g("h2"),R=p(Z),N=d(),S=g("img"),A=d(),B=g("p"),C=p($),D=d(),F=g("div"),G=g("h2"),I=p(_),J=d(),K=g("img"),Q=d(),U=g("p"),V=p(ii),l(j,"id","groups-img"),u(j.src,k="/img/common/groups.svg")||l(j,"src","/img/common/groups.svg"),l(j,"alt","groups"),l(S,"id","communities-img"),u(S.src,q="/img/common/communities.svg")||l(S,"src","/img/common/communities.svg"),l(S,"alt","communities"),l(K,"id","coops-img"),u(K.src,P="/img/common/coops.svg")||l(K,"src","/img/common/coops.svg"),l(K,"alt","coops"),l(x,"id","container-grid"),h(x,"--grid-width",i[1]),l(s,"id","text-container"),l(t,"id","container")},m(m,g){e(m,t,g),v(t,o),v(t,r),v(t,s),v(s,n),v(n,a),v(s,c),v(s,x),v(x,w),v(w,T),v(T,b),v(w,y),v(w,j),v(w,z),v(w,E),v(E,H),v(x,L),v(x,M),v(M,O),v(O,R),v(M,N),v(M,S),v(M,A),v(M,B),v(B,C),v(x,D),v(x,F),v(F,G),v(G,I),v(F,J),v(F,K),v(F,Q),v(F,U),v(U,V),i[5](x)},p(i,t){4&t&&W!==(W=i[2].top+"")&&f(a,W),4&t&&X!==(X=i[2].groupsTitle+"")&&f(b,X),4&t&&Y!==(Y=i[2].groupsText+"")&&f(H,Y),4&t&&Z!==(Z=i[2].communitiesTitle+"")&&f(R,Z),4&t&&$!==($=i[2].communitiesText+"")&&f(C,$),4&t&&_!==(_=i[2].cooperativesTitle+"")&&f(I,_),4&t&&ii!==(ii=i[2].cooperativesText+"")&&f(V,ii),2&t&&h(x,"--grid-width",i[1])},d(o){o&&m(t),i[5](null)}}}function y(i){let t,o=0!=Object.keys(i[2]).length,r=o&&b(i);return{c(){r&&r.c(),t=s(),this.c=n},m(i,o){r&&r.m(i,o),e(i,t,o)},p(i,[e]){4&e&&(o=0!=Object.keys(i[2]).length),o?r?r.p(i,e):(r=b(i),r.c(),r.m(t.parentNode,t)):r&&(r.d(1),r=null)},i:n,o:n,d(i){r&&r.d(i),i&&m(t)}}}function j(i,t,o){let e,r,s,n,m=T({});function g(i){o(1,s="ru"==i?"1.2fr 1.05fr 1fr":"1.2fr 1.1fr 1fr")}return a(i,m,(i=>o(2,e=i))),g(w(m,"landing-component",n,g)),c((()=>{})),[r,s,e,n,m,function(i){x[i?"unshift":"push"]((()=>{r=i,o(0,r)}))}]}class k extends i{constructor(i){super(),this.shadowRoot.innerHTML="",t(this,{target:this.shadowRoot,props:o(this.attributes),customElement:!0},j,y,r,{},null),i&&i.target&&e(i.target,this,i.anchor)}}customElements.define("landing-component",k);export{k as default}; diff --git a/Server/public/js/components/legend-component.js b/Server/public/js/components/legend-component.js index ca4e8cb..6a643c7 100644 --- a/Server/public/js/components/legend-component.js +++ b/Server/public/js/components/legend-component.js @@ -1,362 +1 @@ - -(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, B as flush, s as safe_not_equal, f as validate_each_argument, d as dispatch_dev, v as validate_slots, o as onMount, g as globals, k as element, n as noop, p as attr_dev, m as add_location, j as detach_dev, x as destroy_each, C as binding_callbacks, l as space, t as text, D as set_style, u as append_dev, y as listen_dev, w as set_data_dev } from './index-42a25c61.js'; -import { pullLegendData } from '../../../../../../../../../js/predict/charts.js'; - -/* src\components\legend-component.svelte generated by Svelte v3.52.0 */ - -const { Object: Object_1 } = globals; -const file = "src\\components\\legend-component.svelte"; - -function get_each_context(ctx, list, i) { - const child_ctx = ctx.slice(); - child_ctx[10] = list[i]; - child_ctx[11] = list; - child_ctx[12] = i; - return child_ctx; -} - -// (69:4) {#each legendData as item, i} -function create_each_block(ctx) { - let button; - let div; - let t0; - let span; - let t1_value = /*item*/ ctx[10].name + ""; - let t1; - let t2; - let i = /*i*/ ctx[12]; - let mounted; - let dispose; - const assign_button = () => /*button_binding*/ ctx[6](button, i); - const unassign_button = () => /*button_binding*/ ctx[6](null, i); - - function click_handler() { - return /*click_handler*/ ctx[7](/*i*/ ctx[12]); - } - - const block = { - c: function create() { - button = element("button"); - div = element("div"); - t0 = space(); - span = element("span"); - t1 = text(t1_value); - t2 = space(); - attr_dev(div, "class", "marker"); - set_style(div, "background-color", /*item*/ ctx[10].color); - add_location(div, file, 70, 12, 1892); - add_location(span, file, 71, 12, 1971); - add_location(button, file, 69, 8, 1814); - }, - m: function mount(target, anchor) { - insert_dev(target, button, anchor); - append_dev(button, div); - append_dev(button, t0); - append_dev(button, span); - append_dev(span, t1); - append_dev(button, t2); - assign_button(); - - if (!mounted) { - dispose = listen_dev(button, "click", click_handler, false, false, false); - mounted = true; - } - }, - p: function update(new_ctx, dirty) { - ctx = new_ctx; - - if (dirty & /*legendData*/ 1) { - set_style(div, "background-color", /*item*/ ctx[10].color); - } - - if (dirty & /*legendData*/ 1 && t1_value !== (t1_value = /*item*/ ctx[10].name + "")) set_data_dev(t1, t1_value); - - if (i !== /*i*/ ctx[12]) { - unassign_button(); - i = /*i*/ ctx[12]; - assign_button(); - } - }, - d: function destroy(detaching) { - if (detaching) detach_dev(button); - unassign_button(); - mounted = false; - dispose(); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_each_block.name, - type: "each", - source: "(69:4) {#each legendData as item, i}", - ctx - }); - - return block; -} - -function create_fragment(ctx) { - let div; - let each_value = /*legendData*/ ctx[0]; - validate_each_argument(each_value); - let each_blocks = []; - - for (let i = 0; i < each_value.length; i += 1) { - each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i)); - } - - const block = { - c: function create() { - div = element("div"); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].c(); - } - - this.c = noop; - attr_dev(div, "class", "legend"); - add_location(div, file, 67, 0, 1749); - }, - l: function claim(nodes) { - throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); - }, - m: function mount(target, anchor) { - insert_dev(target, div, anchor); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].m(div, null); - } - }, - p: function update(ctx, [dirty]) { - if (dirty & /*buttons, toggleSeries, legendData*/ 7) { - each_value = /*legendData*/ ctx[0]; - validate_each_argument(each_value); - let i; - - for (i = 0; i < each_value.length; i += 1) { - const child_ctx = get_each_context(ctx, each_value, i); - - if (each_blocks[i]) { - each_blocks[i].p(child_ctx, dirty); - } else { - each_blocks[i] = create_each_block(child_ctx); - each_blocks[i].c(); - each_blocks[i].m(div, null); - } - } - - for (; i < each_blocks.length; i += 1) { - each_blocks[i].d(1); - } - - each_blocks.length = each_value.length; - } - }, - i: noop, - o: noop, - d: function destroy(detaching) { - if (detaching) detach_dev(div); - destroy_each(each_blocks, detaching); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_fragment.name, - type: "component", - source: "", - ctx - }); - - return block; -} - -function instance($$self, $$props, $$invalidate) { - let { $$slots: slots = {}, $$scope } = $$props; - validate_slots('legend-component', slots, []); - let { option = null } = $$props; - let { chart = null } = $$props; - let { data = {} } = $$props; - - // Main code - let legendData = []; - - let buttons = []; - let dataKeys; - - function init() { - if (option == null || option == undefined || chart == null || chart == undefined) { - setTimeout(init, 100); - } else { - $$invalidate(0, legendData = pullLegendData(legendData, option)); - - for (let obj of legendData) { - $$invalidate(3, data[obj.name] = true, data); - } - - dataKeys = Object.keys(data); - } - } - - function toggleSeries(i) { - $$invalidate(3, data[dataKeys[i]] = !data[dataKeys[i]], data); - let inds = []; - let ids = option.series.map(x => x._id); - let id = ids[i]; - - for (let j = 0; j < ids.length; j++) { - if (ids[j] == id) { - inds.push(j); - } - } - - for (let i of inds) { - let series = option.series[i]; - - if (!series.tooltip.show) { - series.lineStyle.opacity = 1; - series.itemStyle.opacity = 1; - series.tooltip.show = true; - $$invalidate(1, buttons[inds[0]].style.opacity = 1, buttons); - } else { - series.lineStyle.opacity = 0; - series.itemStyle.opacity = 0; - series.tooltip.show = false; - $$invalidate(1, buttons[inds[0]].style.opacity = 0.5, buttons); - } - } - - chart.setOption(option); - } - - onMount(() => { - init(); - }); - - const writable_props = ['option', 'chart', 'data']; - - Object_1.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(` was created with unknown prop '${key}'`); - }); - - function button_binding($$value, i) { - binding_callbacks[$$value ? 'unshift' : 'push'](() => { - buttons[i] = $$value; - $$invalidate(1, buttons); - }); - } - - const click_handler = i => toggleSeries(i); - - $$self.$$set = $$props => { - if ('option' in $$props) $$invalidate(4, option = $$props.option); - if ('chart' in $$props) $$invalidate(5, chart = $$props.chart); - if ('data' in $$props) $$invalidate(3, data = $$props.data); - }; - - $$self.$capture_state = () => ({ - onMount, - pullLegendData, - option, - chart, - data, - legendData, - buttons, - dataKeys, - init, - toggleSeries - }); - - $$self.$inject_state = $$props => { - if ('option' in $$props) $$invalidate(4, option = $$props.option); - if ('chart' in $$props) $$invalidate(5, chart = $$props.chart); - if ('data' in $$props) $$invalidate(3, data = $$props.data); - if ('legendData' in $$props) $$invalidate(0, legendData = $$props.legendData); - if ('buttons' in $$props) $$invalidate(1, buttons = $$props.buttons); - if ('dataKeys' in $$props) dataKeys = $$props.dataKeys; - }; - - if ($$props && "$$inject" in $$props) { - $$self.$inject_state($$props.$$inject); - } - - return [ - legendData, - buttons, - toggleSeries, - data, - option, - chart, - button_binding, - click_handler - ]; -} - -class Legend_component extends SvelteElement { - constructor(options) { - super(); - this.shadowRoot.innerHTML = ``; - - init( - this, - { - target: this.shadowRoot, - props: attribute_to_object(this.attributes), - customElement: true - }, - instance, - create_fragment, - safe_not_equal, - { option: 4, chart: 5, data: 3 }, - null - ); - - if (options) { - if (options.target) { - insert_dev(options.target, this, options.anchor); - } - - if (options.props) { - this.$set(options.props); - flush(); - } - } - } - - static get observedAttributes() { - return ["option", "chart", "data"]; - } - - get option() { - return this.$$.ctx[4]; - } - - set option(option) { - this.$$set({ option }); - flush(); - } - - get chart() { - return this.$$.ctx[5]; - } - - set chart(chart) { - this.$$set({ chart }); - flush(); - } - - get data() { - return this.$$.ctx[3]; - } - - set data(data) { - this.$$set({ data }); - flush(); - } -} - -customElements.define("legend-component", Legend_component); - -export { Legend_component as default }; +import{S as t,i as e,a as s,b as o,u as n,s as r,f as i,n as a,h as l,d as c,p,o as u,g as h,t as d,v as m,l as f,q as g,m as y,w as $}from"./index-4348483d.js";import{pullLegendData as b}from"../../../../../../../../../js/predict/charts.js";function w(t,e,s){const o=t.slice();return o[10]=e[s],o[11]=e,o[12]=s,o}function x(t){let e,s,n,r,a,p,u,$,b=t[10].name+"",w=t[12];const x=()=>t[6](e,w),k=()=>t[6](null,w);function v(){return t[7](t[12])}return{c(){e=i("button"),s=i("div"),n=h(),r=i("span"),a=d(b),p=h(),l(s,"class","marker"),m(s,"background-color",t[10].color)},m(t,i){o(t,e,i),f(e,s),f(e,n),f(e,r),f(r,a),f(e,p),x(),u||($=g(e,"click",v),u=!0)},p(e,o){t=e,1&o&&m(s,"background-color",t[10].color),1&o&&b!==(b=t[10].name+"")&&y(a,b),w!==t[12]&&(k(),w=t[12],x())},d(t){t&&c(e),k(),u=!1,$()}}}function k(t){let e,s=t[0],n=[];for(let e=0;et._id)),c=a[t];for(let t=0;t{c()}));return t.$$set=t=>{"option"in t&&s(4,n=t.option),"chart"in t&&s(5,r=t.chart),"data"in t&&s(3,i=t.data)},[a,l,p,i,n,r,function(t,e){$[t?"unshift":"push"]((()=>{l[e]=t,s(1,l)}))},t=>p(t)]}class j extends t{constructor(t){super(),this.shadowRoot.innerHTML="",e(this,{target:this.shadowRoot,props:s(this.attributes),customElement:!0},v,k,r,{option:4,chart:5,data:3},null),t&&(t.target&&o(t.target,this,t.anchor),t.props&&(this.$set(t.props),n()))}static get observedAttributes(){return["option","chart","data"]}get option(){return this.$$.ctx[4]}set option(t){this.$$set({option:t}),n()}get chart(){return this.$$.ctx[5]}set chart(t){this.$$set({chart:t}),n()}get data(){return this.$$.ctx[3]}set data(t){this.$$set({data:t}),n()}}customElements.define("legend-component",j);export{j as default}; diff --git a/Server/public/js/components/loadscreen-component.js b/Server/public/js/components/loadscreen-component.js index bd3c58a..4feb1ba 100644 --- a/Server/public/js/components/loadscreen-component.js +++ b/Server/public/js/components/loadscreen-component.js @@ -1,115 +1 @@ - -(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, k as element, n as noop, p as attr_dev, D as set_style, m as add_location, j as detach_dev, C as binding_callbacks } from './index-42a25c61.js'; - -/* src\components\loadscreen-component.svelte generated by Svelte v3.52.0 */ -const file = "src\\components\\loadscreen-component.svelte"; - -function create_fragment(ctx) { - let div; - - const block = { - c: function create() { - div = element("div"); - this.c = noop; - attr_dev(div, "id", "loadscreen"); - set_style(div, "width", "100%"); - set_style(div, "height", "100%"); - set_style(div, "background", "white"); - set_style(div, "position", "absolute"); - set_style(div, "z-index", "100000"); - add_location(div, file, 20, 0, 366); - }, - l: function claim(nodes) { - throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); - }, - m: function mount(target, anchor) { - insert_dev(target, div, anchor); - /*div_binding*/ ctx[1](div); - }, - p: noop, - i: noop, - o: noop, - d: function destroy(detaching) { - if (detaching) detach_dev(div); - /*div_binding*/ ctx[1](null); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_fragment.name, - type: "component", - source: "", - ctx - }); - - return block; -} - -function instance($$self, $$props, $$invalidate) { - let { $$slots: slots = {}, $$scope } = $$props; - validate_slots('loadscreen-component', slots, []); - let loadscreen; - - onMount(() => { - window.addEventListener('load', function () { - $$invalidate(0, loadscreen.parentNode.host.style.display = "none", loadscreen); - }); - }); - - const writable_props = []; - - Object.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(` was created with unknown prop '${key}'`); - }); - - function div_binding($$value) { - binding_callbacks[$$value ? 'unshift' : 'push'](() => { - loadscreen = $$value; - $$invalidate(0, loadscreen); - }); - } - - $$self.$capture_state = () => ({ onMount, loadscreen }); - - $$self.$inject_state = $$props => { - if ('loadscreen' in $$props) $$invalidate(0, loadscreen = $$props.loadscreen); - }; - - if ($$props && "$$inject" in $$props) { - $$self.$inject_state($$props.$$inject); - } - - return [loadscreen, div_binding]; -} - -class Loadscreen_component extends SvelteElement { - constructor(options) { - super(); - - init( - this, - { - target: this.shadowRoot, - props: attribute_to_object(this.attributes), - customElement: true - }, - instance, - create_fragment, - safe_not_equal, - {}, - null - ); - - if (options) { - if (options.target) { - insert_dev(options.target, this, options.anchor); - } - } - } -} - -customElements.define("loadscreen-component", Loadscreen_component); - -export { Loadscreen_component as default }; +import{S as t,i as s,a as e,b as n,s as o,f as a,n as i,h as d,v as r,d as u,o as c,w as l}from"./index-4348483d.js";function h(t){let s;return{c(){s=a("div"),this.c=i,d(s,"id","loadscreen"),r(s,"width","100%"),r(s,"height","100%"),r(s,"background","white"),r(s,"position","absolute"),r(s,"z-index","100000")},m(e,o){n(e,s,o),t[1](s)},p:i,i:i,o:i,d(e){e&&u(s),t[1](null)}}}function p(t,s,e){let n;return c((()=>{window.addEventListener("load",(function(){e(0,n.parentNode.host.style.display="none",n)}))})),[n,function(t){l[t?"unshift":"push"]((()=>{n=t,e(0,n)}))}]}class f extends t{constructor(t){super(),s(this,{target:this.shadowRoot,props:e(this.attributes),customElement:!0},p,h,o,{},null),t&&t.target&&n(t.target,this,t.anchor)}}customElements.define("loadscreen-component",f);export{f as default}; diff --git a/Server/public/js/components/manifesto-component.js b/Server/public/js/components/manifesto-component.js index 96e88df..0e99468 100644 --- a/Server/public/js/components/manifesto-component.js +++ b/Server/public/js/components/manifesto-component.js @@ -1,1445 +1 @@ - -(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, c as validate_store, e as component_subscribe, o as onMount, g as globals, f as validate_each_argument, h as empty, n as noop, j as detach_dev, C as binding_callbacks, k as element, p as attr_dev, m as add_location, u as append_dev, t as text, l as space, q as src_url_equal, D as set_style, y as listen_dev, w as set_data_dev, x as destroy_each, H as is_function, I as HtmlTag } from './index-42a25c61.js'; -import { w as writable } from './index-a1c185ea.js'; -import { loadLocaleContent, getData } from '../../../../../../../../../js/libraries/serverTools.js'; -import { px2rem } from '../../../../../../../../../js/libraries/miscTools.js'; - -/* src\manifesto-component.svelte generated by Svelte v3.52.0 */ - -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[32] = list[i]; - child_ctx[33] = list; - child_ctx[34] = i; - return child_ctx; -} - -function get_each_context_2(ctx, list, i) { - const child_ctx = ctx.slice(); - child_ctx[35] = list[i]; - return child_ctx; -} - -function get_each_context_1(ctx, list, i) { - const child_ctx = ctx.slice(); - child_ctx[35] = list[i]; - return child_ctx; -} - -function get_each_context_3(ctx, list, i) { - const child_ctx = ctx.slice(); - child_ctx[40] = list[i]; - child_ctx[41] = list; - child_ctx[42] = i; - return child_ctx; -} - -function get_each_context_4(ctx, list, i) { - const child_ctx = ctx.slice(); - child_ctx[43] = list[i]; - child_ctx[44] = list; - child_ctx[45] = i; - return child_ctx; -} - -// (168:4) {#if Object.keys($content).length!=0} -function create_if_block(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(); - attr_dev(div0, "id", "text-container"); - add_location(div0, file, 169, 12, 6016); - attr_dev(div1, "id", "container"); - add_location(div1, file, 168, 8, 5965); - }, - m: function mount(target, anchor) { - insert_dev(target, div1, anchor); - append_dev(div1, div0); - key_block.m(div0, null); - /*div1_binding_1*/ ctx[27](div1); - }, - p: function update(ctx, dirty) { - if (dirty[0] & /*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); - } - }, - d: function destroy(detaching) { - if (detaching) detach_dev(div1); - key_block.d(detaching); - /*div1_binding_1*/ ctx[27](null); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_if_block.name, - type: "if", - source: "(168:4) {#if Object.keys($content).length!=0}", - ctx - }); - - return block; -} - -// (187:32) {:else} -function create_else_block_1(ctx) { - let div; - let button; - let t0_value = /*obj*/ ctx[40].name + ""; - let t0; - let obj = /*obj*/ ctx[40]; - let t1; - let mounted; - let dispose; - const assign_button = () => /*button_binding_2*/ ctx[20](button, obj); - const unassign_button = () => /*button_binding_2*/ ctx[20](null, obj); - - function click_handler_2() { - return /*click_handler_2*/ ctx[21](/*obj*/ ctx[40]); - } - - const block = { - c: function create() { - div = element("div"); - button = element("button"); - t0 = text(t0_value); - t1 = space(); - attr_dev(button, "class", "level0 heading-button"); - add_location(button, file, 188, 40, 7353); - attr_dev(div, "class", "heading-button-wrapper"); - add_location(div, file, 187, 36, 7275); - }, - m: function mount(target, anchor) { - insert_dev(target, div, anchor); - append_dev(div, button); - append_dev(button, t0); - assign_button(); - append_dev(div, t1); - - if (!mounted) { - dispose = listen_dev(button, "click", click_handler_2, false, false, false); - mounted = true; - } - }, - p: function update(new_ctx, dirty) { - ctx = new_ctx; - - if (obj !== /*obj*/ ctx[40]) { - unassign_button(); - obj = /*obj*/ ctx[40]; - assign_button(); - } - }, - d: function destroy(detaching) { - if (detaching) detach_dev(div); - unassign_button(); - mounted = false; - dispose(); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_else_block_1.name, - type: "else", - source: "(187:32) {:else}", - ctx - }); - - return block; -} - -// (179:32) {#if Array.isArray(obj)} -function create_if_block_8(ctx) { - let each_1_anchor; - let each_value_4 = /*obj*/ ctx[40]; - validate_each_argument(each_value_4); - let each_blocks = []; - - for (let i = 0; i < each_value_4.length; i += 1) { - each_blocks[i] = create_each_block_4(get_each_context_4(ctx, each_value_4, 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[0] & /*buttons, contentHeadings, goToChapter*/ 18448) { - each_value_4 = /*obj*/ ctx[40]; - validate_each_argument(each_value_4); - let i; - - for (i = 0; i < each_value_4.length; i += 1) { - const child_ctx = get_each_context_4(ctx, each_value_4, i); - - if (each_blocks[i]) { - each_blocks[i].p(child_ctx, dirty); - } else { - each_blocks[i] = create_each_block_4(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_4.length; - } - }, - d: function destroy(detaching) { - destroy_each(each_blocks, detaching); - if (detaching) detach_dev(each_1_anchor); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_if_block_8.name, - type: "if", - source: "(179:32) {#if Array.isArray(obj)}", - ctx - }); - - return block; -} - -// (180:36) {#each obj as obj2} -function create_each_block_4(ctx) { - let div; - let button; - let t0_value = /*obj2*/ ctx[43].name + ""; - let t0; - let obj2 = /*obj2*/ ctx[43]; - let t1; - let mounted; - let dispose; - const assign_button = () => /*button_binding_1*/ ctx[18](button, obj2); - const unassign_button = () => /*button_binding_1*/ ctx[18](null, obj2); - - function click_handler_1() { - return /*click_handler_1*/ ctx[19](/*obj2*/ ctx[43]); - } - - const block = { - c: function create() { - div = element("div"); - button = element("button"); - t0 = text(t0_value); - t1 = space(); - attr_dev(button, "class", "level1 heading-button"); - add_location(button, file, 181, 40, 6891); - attr_dev(div, "class", "heading-button-wrapper"); - add_location(div, file, 180, 36, 6813); - }, - m: function mount(target, anchor) { - insert_dev(target, div, anchor); - append_dev(div, button); - append_dev(button, t0); - assign_button(); - append_dev(div, t1); - - if (!mounted) { - dispose = listen_dev(button, "click", click_handler_1, false, false, false); - mounted = true; - } - }, - p: function update(new_ctx, dirty) { - ctx = new_ctx; - - if (obj2 !== /*obj2*/ ctx[43]) { - unassign_button(); - obj2 = /*obj2*/ ctx[43]; - assign_button(); - } - }, - d: function destroy(detaching) { - if (detaching) detach_dev(div); - unassign_button(); - mounted = false; - dispose(); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_each_block_4.name, - type: "each", - source: "(180:36) {#each obj as obj2}", - ctx - }); - - return block; -} - -// (178:28) {#each contentHeadings as obj} -function create_each_block_3(ctx) { - let if_block_anchor; - - function select_block_type(ctx, dirty) { - if (Array.isArray(/*obj*/ ctx[40])) return create_if_block_8; - return create_else_block_1; - } - - let current_block_type = select_block_type(ctx); - let if_block = current_block_type(ctx); - - const block = { - 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_each_block_3.name, - type: "each", - source: "(178:28) {#each contentHeadings as obj}", - ctx - }); - - return block; -} - -// (199:28) {#if line!==""} -function create_if_block_1(ctx) { - let if_block_anchor; - - function select_block_type_2(ctx, dirty) { - if (typeof (/*line*/ ctx[32] === 'object') && Object.keys(/*line*/ ctx[32])[0] == "ul") return create_if_block_2; - if (typeof (/*line*/ ctx[32] === 'object') && Object.keys(/*line*/ ctx[32])[0] == "ol") return create_if_block_3; - if (typeof (/*line*/ ctx[32] === 'object') && /*line*/ ctx[32].type == "h3") return create_if_block_4; - if (typeof (/*line*/ ctx[32] === 'object') && /*line*/ ctx[32].type == "h2") return create_if_block_5; - if (/*line*/ ctx[32][0] == "#") return create_if_block_6; - return create_else_block; - } - - let current_block_type = select_block_type_2(ctx); - let if_block = current_block_type(ctx); - - const block = { - 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_1.name, - type: "if", - source: "(199:28) {#if line!==\\\"\\\"}", - ctx - }); - - return block; -} - -// (224:32) {:else} -function create_else_block(ctx) { - let p; - let html_tag; - let raw_value = /*line*/ ctx[32] + ""; - 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, 224, 36, 9751); - }, - 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: "(224:32) {:else}", - ctx - }); - - return block; -} - -// (222:55) -function create_if_block_6(ctx) { - let h1; - let raw_value = /*line*/ ctx[32].slice(2, /*line*/ ctx[32].length) + ""; - - const block = { - c: function create() { - h1 = element("h1"); - add_location(h1, file, 222, 36, 9630); - }, - 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_6.name, - type: "if", - source: "(222:55) ", - ctx - }); - - return block; -} - -// (218:90) -function create_if_block_5(ctx) { - let button; - let h2; - let raw_value = /*line*/ ctx[32].line + ""; - let line = /*line*/ ctx[32]; - let t; - let mounted; - let dispose; - const assign_h2 = () => /*h2_binding*/ ctx[25](h2, line); - const unassign_h2 = () => /*h2_binding*/ ctx[25](null, line); - - const block = { - c: function create() { - button = element("button"); - h2 = element("h2"); - t = space(); - attr_dev(h2, "id", /*line*/ ctx[32].id); - add_location(h2, file, 219, 40, 9412); - set_style(button, "display", "block"); - set_style(button, "width", "100%"); - add_location(button, file, 218, 36, 9259); - }, - m: function mount(target, anchor) { - insert_dev(target, button, anchor); - append_dev(button, h2); - h2.innerHTML = raw_value; - assign_h2(); - append_dev(button, t); - - if (!mounted) { - dispose = listen_dev( - button, - "click", - function () { - if (is_function(/*contentTable*/ ctx[6].scrollIntoView({ block: 'start' }, true))) /*contentTable*/ ctx[6].scrollIntoView({ block: 'start' }, true).apply(this, arguments); - }, - false, - false, - false - ); - - mounted = true; - } - }, - p: function update(new_ctx, dirty) { - ctx = new_ctx; - - if (line !== /*line*/ ctx[32]) { - unassign_h2(); - line = /*line*/ ctx[32]; - assign_h2(); - } - }, - d: function destroy(detaching) { - if (detaching) detach_dev(button); - unassign_h2(); - mounted = false; - dispose(); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_if_block_5.name, - type: "if", - source: "(218:90) ", - ctx - }); - - return block; -} - -// (214:90) -function create_if_block_4(ctx) { - let button; - let h3; - let raw_value = /*line*/ ctx[32].line + ""; - let line = /*line*/ ctx[32]; - let t; - let mounted; - let dispose; - const assign_h3 = () => /*h3_binding*/ ctx[24](h3, line); - const unassign_h3 = () => /*h3_binding*/ ctx[24](null, line); - - const block = { - c: function create() { - button = element("button"); - h3 = element("h3"); - t = space(); - attr_dev(h3, "id", /*line*/ ctx[32].id); - add_location(h3, file, 215, 40, 9006); - set_style(button, "display", "block"); - set_style(button, "width", "100%"); - add_location(button, file, 214, 36, 8853); - }, - m: function mount(target, anchor) { - insert_dev(target, button, anchor); - append_dev(button, h3); - h3.innerHTML = raw_value; - assign_h3(); - append_dev(button, t); - - if (!mounted) { - dispose = listen_dev( - button, - "click", - function () { - if (is_function(/*contentTable*/ ctx[6].scrollIntoView({ block: 'start' }, true))) /*contentTable*/ ctx[6].scrollIntoView({ block: 'start' }, true).apply(this, arguments); - }, - false, - false, - false - ); - - mounted = true; - } - }, - p: function update(new_ctx, dirty) { - ctx = new_ctx; - - if (line !== /*line*/ ctx[32]) { - unassign_h3(); - line = /*line*/ ctx[32]; - assign_h3(); - } - }, - d: function destroy(detaching) { - if (detaching) detach_dev(button); - unassign_h3(); - mounted = false; - dispose(); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_if_block_4.name, - type: "if", - source: "(214:90) ", - ctx - }); - - return block; -} - -// (206:101) -function create_if_block_3(ctx) { - let ol; - let t; - let each_value_2 = /*line*/ ctx[32].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, 206, 36, 8397); - }, - 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[0] & /*manifesto*/ 1024) { - each_value_2 = /*line*/ ctx[32].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_3.name, - type: "if", - source: "(206:101) ", - ctx - }); - - return block; -} - -// (200:32) {#if typeof (line === 'object') && (Object.keys(line)[0]=="ul")} -function create_if_block_2(ctx) { - let ul; - let t; - let each_value_1 = /*line*/ ctx[32].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, 200, 36, 8032); - }, - 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[0] & /*manifesto*/ 1024) { - each_value_1 = /*line*/ ctx[32].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_2.name, - type: "if", - source: "(200:32) {#if typeof (line === 'object') && (Object.keys(line)[0]==\\\"ul\\\")}", - ctx - }); - - return block; -} - -// (208:40) {#each line.ol as line2} -function create_each_block_2(ctx) { - let li; - let raw_value = /*line2*/ ctx[35] + ""; - - const block = { - c: function create() { - li = element("li"); - add_location(li, file, 208, 44, 8513); - }, - 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: "(208:40) {#each line.ol as line2}", - ctx - }); - - return block; -} - -// (202:40) {#each line.ul as line2} -function create_each_block_1(ctx) { - let li; - let t_value = /*line2*/ ctx[35] + ""; - let t; - - const block = { - c: function create() { - li = element("li"); - t = text(t_value); - add_location(li, file, 202, 44, 8148); - }, - 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: "(202:40) {#each line.ul as line2}", - ctx - }); - - return block; -} - -// (198:24) {#each manifesto as line} -function create_each_block(ctx) { - let if_block_anchor; - - function select_block_type_1(ctx, dirty) { - if (/*line*/ ctx[32] !== "") return create_if_block_1; - } - - let current_block_type = select_block_type_1(ctx); - let if_block = current_block_type && current_block_type(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 (if_block) 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: "(198:24) {#each manifesto as line}", - ctx - }); - - return block; -} - -// (171:16) {#key key} -function create_key_block(ctx) { - let div1; - let button; - let t0_value = /*$content*/ ctx[9].tableOfContents + ""; - let t0; - let t1; - let img; - let img_src_value; - let t2; - let div0; - let t3; - let div2; - let mounted; - let dispose; - let each_value_3 = /*contentHeadings*/ ctx[11]; - validate_each_argument(each_value_3); - let each_blocks_1 = []; - - for (let i = 0; i < each_value_3.length; i += 1) { - each_blocks_1[i] = create_each_block_3(get_each_context_3(ctx, each_value_3, i)); - } - - let each_value = /*manifesto*/ ctx[10]; - 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"); - button = element("button"); - t0 = text(t0_value); - t1 = space(); - img = element("img"); - t2 = space(); - div0 = element("div"); - - for (let i = 0; i < each_blocks_1.length; i += 1) { - each_blocks_1[i].c(); - } - - t3 = space(); - div2 = element("div"); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].c(); - } - - if (!src_url_equal(img.src, img_src_value = "../assets/arrow_down.svg")) attr_dev(img, "src", img_src_value); - attr_dev(img, "alt", "arrow down"); - set_style(img, "transform", "scaleY(-1)"); - add_location(img, file, 174, 28, 6360); - attr_dev(button, "id", "toggle-content"); - add_location(button, file, 172, 24, 6166); - attr_dev(div0, "class", "module"); - set_style(div0, "display", "initial"); - add_location(div0, file, 176, 24, 6529); - attr_dev(div1, "id", "table-content"); - add_location(div1, file, 171, 20, 6091); - attr_dev(div2, "id", "main"); - add_location(div2, file, 196, 20, 7768); - }, - m: function mount(target, anchor) { - insert_dev(target, div1, anchor); - append_dev(div1, button); - append_dev(button, t0); - append_dev(button, t1); - append_dev(button, img); - /*img_binding*/ ctx[15](img); - /*button_binding*/ ctx[16](button); - append_dev(div1, t2); - append_dev(div1, div0); - - for (let i = 0; i < each_blocks_1.length; i += 1) { - each_blocks_1[i].m(div0, null); - } - - /*div0_binding*/ ctx[22](div0); - /*div1_binding*/ ctx[23](div1); - insert_dev(target, t3, anchor); - insert_dev(target, div2, anchor); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].m(div2, null); - } - - /*div2_binding*/ ctx[26](div2); - - if (!mounted) { - dispose = listen_dev(button, "click", /*click_handler*/ ctx[17], false, false, false); - mounted = true; - } - }, - p: function update(ctx, dirty) { - if (dirty[0] & /*$content*/ 512 && t0_value !== (t0_value = /*$content*/ ctx[9].tableOfContents + "")) set_data_dev(t0, t0_value); - - if (dirty[0] & /*contentHeadings, buttons, goToChapter*/ 18448) { - each_value_3 = /*contentHeadings*/ ctx[11]; - validate_each_argument(each_value_3); - let i; - - for (i = 0; i < each_value_3.length; i += 1) { - const child_ctx = get_each_context_3(ctx, each_value_3, i); - - if (each_blocks_1[i]) { - each_blocks_1[i].p(child_ctx, dirty); - } else { - each_blocks_1[i] = create_each_block_3(child_ctx); - each_blocks_1[i].c(); - each_blocks_1[i].m(div0, null); - } - } - - for (; i < each_blocks_1.length; i += 1) { - each_blocks_1[i].d(1); - } - - each_blocks_1.length = each_value_3.length; - } - - if (dirty[0] & /*manifesto, contentTable, headingsObjects*/ 1120) { - each_value = /*manifesto*/ ctx[10]; - 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(div2, null); - } - } - - for (; i < each_blocks.length; i += 1) { - each_blocks[i].d(1); - } - - each_blocks.length = each_value.length; - } - }, - d: function destroy(detaching) { - if (detaching) detach_dev(div1); - /*img_binding*/ ctx[15](null); - /*button_binding*/ ctx[16](null); - destroy_each(each_blocks_1, detaching); - /*div0_binding*/ ctx[22](null); - /*div1_binding*/ ctx[23](null); - if (detaching) detach_dev(t3); - if (detaching) detach_dev(div2); - destroy_each(each_blocks, detaching); - /*div2_binding*/ ctx[26](null); - mounted = false; - dispose(); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_key_block.name, - type: "key", - source: "(171:16) {#key key}", - ctx - }); - - return block; -} - -function create_fragment(ctx) { - let show_if = Object.keys(/*$content*/ ctx[9]).length != 0; - let if_block_anchor; - let if_block = show_if && create_if_block(ctx); - - const block = { - c: function create() { - if (if_block) if_block.c(); - if_block_anchor = empty(); - this.c = noop; - }, - 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) { - if (if_block) if_block.m(target, anchor); - insert_dev(target, if_block_anchor, anchor); - }, - p: function update(ctx, dirty) { - if (dirty[0] & /*$content*/ 512) show_if = Object.keys(/*$content*/ ctx[9]).length != 0; - - if (show_if) { - if (if_block) { - if_block.p(ctx, dirty); - } else { - if_block = create_if_block(ctx); - if_block.c(); - if_block.m(if_block_anchor.parentNode, if_block_anchor); - } - } else if (if_block) { - if_block.d(1); - if_block = null; - } - }, - i: noop, - o: noop, - d: function destroy(detaching) { - if (if_block) if_block.d(detaching); - if (detaching) detach_dev(if_block_anchor); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_fragment.name, - type: "component", - source: "", - ctx - }); - - return block; -} - -function hideBlock(arrow, block) { - if (block.style.display == "none" || block.style.display == "") { - block.style.display = "initial"; - arrow.style.transform = "scaleY(-1)"; - localStorage.setItem("manifesto-hide-content", "false"); - } else { - block.style.display = "none"; - arrow.style.transform = ""; - localStorage.setItem("manifesto-hide-content", "true"); - } -} - -function instance($$self, $$props, $$invalidate) { - let $content; - let { $$slots: slots = {}, $$scope } = $$props; - validate_slots('manifesto-component', slots, []); - let manifesto = []; - let key; - let contentButton; - let contentArrow; - let contentBlock; - let buttons = []; - let headingsObjects = {}; - let contentHeadings = []; - let contentTable; - let lastTop = 0; - let margin = 0; - let root; - let main; - let loaded; - let content = writable({}); - validate_store(content, 'content'); - component_subscribe($$self, content, value => $$invalidate(9, $content = value)); - let locale = loadLocaleContent(content, "manifesto-component", loaded); - const htmlDelims = ["ul", "ol"]; - - getData("/locales/" + locale + "/manifesto.txt", function (response) { - let splitText = response.split(/\r?\n/); - let currentChapter; - let cnt = 0; - - 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 = ""; - - while (true) { - j += 1; - line = splitText[j]; - - if (line.includes(delimEndTag)) { - manifesto.push(obj); - break; - } else { - obj[delim].push(line); - } - } - } else { - if (line.slice(0, 3) == "###") { - let heading = line.slice(4, line.length); - let id = heading.toLowerCase().trim().replaceAll(" ", "-"); - currentChapter.push({ id, name: heading, index: cnt }); - cnt += 1; - - manifesto.push({ - type: "h3", - id, - line: heading, - index: cnt - }); - } else if (line.slice(0, 2) == "##") { - let heading = line.slice(3, line.length); - let id = heading.toLowerCase().trim().replaceAll(" ", "-"); - - contentHeadings.push({ - id: heading.toLowerCase().trim().replaceAll(" ", "-"), - name: heading, - index: cnt - }); - - cnt += 1; - currentChapter = []; - contentHeadings.push(currentChapter); - - manifesto.push({ - type: "h2", - id, - line: heading, - index: cnt - }); - } else { - manifesto.push(line); - } - } - } - - $$invalidate(0, key += 1); - }); - - function goToChapter(id) { - headingsObjects[id].scrollIntoView({ block: 'start' }, true); - } - - addEventListener("scroll", event => { - if (window.innerWidth > 1080) { - let top = px2rem(window.scrollY); - let textBottom = px2rem(root.getBoundingClientRect().bottom + window.scrollY); - let tableBottom = px2rem(contentTable.getBoundingClientRect().bottom + window.scrollY); - - if (top > lastTop && top < 5 || top < lastTop && top < 5) { - margin = -Math.min(px2rem(window.scrollY), 5); - } else if (tableBottom >= textBottom - 1.5) { - margin = margin - (tableBottom - (textBottom - 1.5)); - } else { - if (margin > -5) { - margin = -5; - } - - if (top < 5 && top != 0) { - let dif = px2rem(contentTable.offsetHeight - window.innerHeight); - margin = -Math.min(px2rem(window.scrollY), 5 + dif + 2.5); - } else if (top < lastTop || margin == 0) { - if (margin < -5) { - margin = margin + (lastTop - top); - } else { - margin = -5; - } - } else { - if (contentTable.offsetHeight > window.innerHeight) { - let dif = px2rem(contentTable.offsetHeight) - px2rem(window.innerHeight); - - if (margin > -(dif + 8)) { - margin = margin + (lastTop - top); - } else { - margin = -(dif + 8); - } - } - } - } - - $$invalidate(6, contentTable.style.marginTop = margin + "rem", contentTable); - lastTop = px2rem(window.scrollY); - } else { - $$invalidate(6, contentTable.style.marginTop = "0rem", contentTable); - } - }); - - onMount(() => { - let hideBool = localStorage.getItem("manifesto-hide-content"); - - if (hideBool != undefined && hideBool != null) { - if (hideBool == "true") { - hideBlock(contentArrow, contentBlock); - } - } - }); - - const writable_props = []; - - Object_1.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(` was created with unknown prop '${key}'`); - }); - - function img_binding($$value) { - binding_callbacks[$$value ? 'unshift' : 'push'](() => { - contentArrow = $$value; - $$invalidate(2, contentArrow); - }); - } - - function button_binding($$value) { - binding_callbacks[$$value ? 'unshift' : 'push'](() => { - contentButton = $$value; - $$invalidate(1, contentButton); - }); - } - - const click_handler = () => hideBlock(contentArrow, contentBlock); - - function button_binding_1($$value, obj2) { - binding_callbacks[$$value ? 'unshift' : 'push'](() => { - buttons[obj2.index] = $$value; - $$invalidate(4, buttons); - }); - } - - const click_handler_1 = obj2 => goToChapter(obj2.id); - - function button_binding_2($$value, obj) { - binding_callbacks[$$value ? 'unshift' : 'push'](() => { - buttons[obj.index] = $$value; - $$invalidate(4, buttons); - }); - } - - const click_handler_2 = obj => goToChapter(obj.id); - - function div0_binding($$value) { - binding_callbacks[$$value ? 'unshift' : 'push'](() => { - contentBlock = $$value; - $$invalidate(3, contentBlock); - }); - } - - function div1_binding($$value) { - binding_callbacks[$$value ? 'unshift' : 'push'](() => { - contentTable = $$value; - $$invalidate(6, contentTable); - }); - } - - function h3_binding($$value, line) { - binding_callbacks[$$value ? 'unshift' : 'push'](() => { - headingsObjects[line.id] = $$value; - $$invalidate(5, headingsObjects); - }); - } - - function h2_binding($$value, line) { - binding_callbacks[$$value ? 'unshift' : 'push'](() => { - headingsObjects[line.id] = $$value; - $$invalidate(5, headingsObjects); - }); - } - - function div2_binding($$value) { - binding_callbacks[$$value ? 'unshift' : 'push'](() => { - main = $$value; - $$invalidate(8, main); - }); - } - - function div1_binding_1($$value) { - binding_callbacks[$$value ? 'unshift' : 'push'](() => { - root = $$value; - $$invalidate(7, root); - }); - } - - $$self.$capture_state = () => ({ - onMount, - writable, - getData, - px2rem, - loadLocaleContent, - manifesto, - key, - contentButton, - contentArrow, - contentBlock, - buttons, - headingsObjects, - contentHeadings, - contentTable, - lastTop, - margin, - root, - main, - loaded, - content, - locale, - htmlDelims, - hideBlock, - goToChapter, - $content - }); - - $$self.$inject_state = $$props => { - if ('manifesto' in $$props) $$invalidate(10, manifesto = $$props.manifesto); - if ('key' in $$props) $$invalidate(0, key = $$props.key); - if ('contentButton' in $$props) $$invalidate(1, contentButton = $$props.contentButton); - if ('contentArrow' in $$props) $$invalidate(2, contentArrow = $$props.contentArrow); - if ('contentBlock' in $$props) $$invalidate(3, contentBlock = $$props.contentBlock); - if ('buttons' in $$props) $$invalidate(4, buttons = $$props.buttons); - if ('headingsObjects' in $$props) $$invalidate(5, headingsObjects = $$props.headingsObjects); - if ('contentHeadings' in $$props) $$invalidate(11, contentHeadings = $$props.contentHeadings); - if ('contentTable' in $$props) $$invalidate(6, contentTable = $$props.contentTable); - if ('lastTop' in $$props) lastTop = $$props.lastTop; - if ('margin' in $$props) margin = $$props.margin; - if ('root' in $$props) $$invalidate(7, root = $$props.root); - if ('main' in $$props) $$invalidate(8, main = $$props.main); - if ('loaded' in $$props) $$invalidate(12, loaded = $$props.loaded); - if ('content' in $$props) $$invalidate(13, content = $$props.content); - if ('locale' in $$props) locale = $$props.locale; - }; - - if ($$props && "$$inject" in $$props) { - $$self.$inject_state($$props.$$inject); - } - - return [ - key, - contentButton, - contentArrow, - contentBlock, - buttons, - headingsObjects, - contentTable, - root, - main, - $content, - manifesto, - contentHeadings, - loaded, - content, - goToChapter, - img_binding, - button_binding, - click_handler, - button_binding_1, - click_handler_1, - button_binding_2, - click_handler_2, - div0_binding, - div1_binding, - h3_binding, - h2_binding, - div2_binding, - div1_binding_1 - ]; -} - -class Manifesto_component extends SvelteElement { - constructor(options) { - super(); - this.shadowRoot.innerHTML = ``; - - init( - this, - { - target: this.shadowRoot, - props: attribute_to_object(this.attributes), - customElement: true - }, - instance, - create_fragment, - safe_not_equal, - {}, - null, - [-1, -1] - ); - - if (options) { - if (options.target) { - insert_dev(options.target, this, options.anchor); - } - } - } -} - -customElements.define("manifesto-component", Manifesto_component); - -export { Manifesto_component as default }; +import{S as t,i as e,a as n,b as i,s as l,e as o,n as r,d as s,c as a,o as c,f as d,h as m,l as u,t as f,g as h,j as g,v as p,q as w,m as b,p as x,w as y,y as v,H as k}from"./index-4348483d.js";import{w as j}from"./index-71440b21.js";import{loadLocaleContent as H,getData as I}from"../../../../../../../../../js/libraries/serverTools.js";import{px2rem as L}from"../../../../../../../../../js/libraries/miscTools.js";function T(t,e,n){const i=t.slice();return i[32]=e[n],i[33]=e,i[34]=n,i}function Y(t,e,n){const i=t.slice();return i[35]=e[n],i}function C(t,e,n){const i=t.slice();return i[35]=e[n],i}function M(t,e,n){const i=t.slice();return i[40]=e[n],i[41]=e,i[42]=n,i}function O(t,e,n){const i=t.slice();return i[43]=e[n],i[44]=e,i[45]=n,i}function z(t){let e,n,o=t[0],r=K(t);return{c(){e=d("div"),n=d("div"),r.c(),m(n,"id","text-container"),m(e,"id","container")},m(l,o){i(l,e,o),u(e,n),r.m(n,null),t[27](e)},p(t,e){1&e[0]&&l(o,o=t[0])?(r.d(1),r=K(t),r.c(),r.m(n,null)):r.p(t,e)},d(n){n&&s(e),r.d(n),t[27](null)}}}function A(t){let e,n,l,o,r,a,c=t[40].name+"",g=t[40];const p=()=>t[20](n,g),b=()=>t[20](null,g);function x(){return t[21](t[40])}return{c(){e=d("div"),n=d("button"),l=f(c),o=h(),m(n,"class","level0 heading-button"),m(e,"class","heading-button-wrapper")},m(t,s){i(t,e,s),u(e,n),u(n,l),p(),u(e,o),r||(a=w(n,"click",x),r=!0)},p(e,n){g!==(t=e)[40]&&(b(),g=t[40],p())},d(t){t&&s(e),b(),r=!1,a()}}}function V(t){let e,n=t[40],l=[];for(let e=0;et[18](n,g),b=()=>t[18](null,g);function x(){return t[19](t[43])}return{c(){e=d("div"),n=d("button"),l=f(c),o=h(),m(n,"class","level1 heading-button"),m(e,"class","heading-button-wrapper")},m(t,s){i(t,e,s),u(e,n),u(n,l),p(),u(e,o),r||(a=w(n,"click",x),r=!0)},p(e,n){g!==(t=e)[43]&&(b(),g=t[43],p())},d(t){t&&s(e),b(),r=!1,a()}}}function S(t){let e;let n=function(t,e){return Array.isArray(t[40])?V:A}(t),l=n(t);return{c(){l.c(),e=o()},m(t,n){l.m(t,n),i(t,e,n)},p(t,e){l.p(t,e)},d(t){l.d(t),t&&s(e)}}}function E(t){let e;let n=function(t,e){return t[32],"ul"==Object.keys(t[32])[0]?D:(t[32],"ol"==Object.keys(t[32])[0]?W:(t[32],"h3"==t[32].type?q:(t[32],"h2"==t[32].type?_:"#"==t[32][0]?N:B)))}(t),l=n(t);return{c(){l.c(),e=o()},m(t,n){l.m(t,n),i(t,e,n)},p(t,e){l.p(t,e)},d(t){l.d(t),t&&s(e)}}}function B(t){let e,n,l,o=t[32]+"";return{c(){e=d("p"),n=new k(!1),l=h(),n.a=l,m(e,"class","margin-end")},m(t,r){i(t,e,r),n.m(o,e),u(e,l)},p:r,d(t){t&&s(e)}}}function N(t){let e,n=t[32].slice(2,t[32].length)+"";return{c(){e=d("h1")},m(t,l){i(t,e,l),e.innerHTML=n},p:r,d(t){t&&s(e)}}}function _(t){let e,n,l,o,r,a=t[32].line+"",c=t[32];const f=()=>t[25](n,c),g=()=>t[25](null,c);return{c(){e=d("button"),n=d("h2"),l=h(),m(n,"id",t[32].id),p(e,"display","block"),p(e,"width","100%")},m(s,c){i(s,e,c),u(e,n),n.innerHTML=a,f(),u(e,l),o||(r=w(e,"click",(function(){v(t[6].scrollIntoView({block:"start"},!0))&&t[6].scrollIntoView({block:"start"},!0).apply(this,arguments)})),o=!0)},p(e,n){c!==(t=e)[32]&&(g(),c=t[32],f())},d(t){t&&s(e),g(),o=!1,r()}}}function q(t){let e,n,l,o,r,a=t[32].line+"",c=t[32];const f=()=>t[24](n,c),g=()=>t[24](null,c);return{c(){e=d("button"),n=d("h3"),l=h(),m(n,"id",t[32].id),p(e,"display","block"),p(e,"width","100%")},m(s,c){i(s,e,c),u(e,n),n.innerHTML=a,f(),u(e,l),o||(r=w(e,"click",(function(){v(t[6].scrollIntoView({block:"start"},!0))&&t[6].scrollIntoView({block:"start"},!0).apply(this,arguments)})),o=!0)},p(e,n){c!==(t=e)[32]&&(g(),c=t[32],f())},d(t){t&&s(e),g(),o=!1,r()}}}function W(t){let e,n,l=t[32].ol,o=[];for(let e=0;en(9,i=t)));let k=H(v,"manifesto-component",f);const T=["ul","ol"];function Y(t){p[t].scrollIntoView({block:"start"},!0)}I("/locales/"+k+"/manifesto.txt",(function(t){let e,i=t.split(/\r?\n/),o=0;for(let t=0;tn.includes("<"+t+">"))).findIndex((t=>t));if(-1!=l){let e=T[l],o={};o[e]=[];let r="";for(;;){if(t+=1,n=i[t],n.includes(r)){h.push(o);break}o[e].push(n)}}else if("###"==n.slice(0,3)){let t=n.slice(4,n.length),i=t.toLowerCase().trim().replaceAll(" ","-");e.push({id:i,name:t,index:o}),o+=1,h.push({type:"h3",id:i,line:t,index:o})}else if("##"==n.slice(0,2)){let t=n.slice(3,n.length),i=t.toLowerCase().trim().replaceAll(" ","-");w.push({id:t.toLowerCase().trim().replaceAll(" ","-"),name:t,index:o}),o+=1,e=[],w.push(e),h.push({type:"h2",id:i,line:t,index:o})}else h.push(n)}n(0,l+=1)})),addEventListener("scroll",(t=>{if(window.innerWidth>1080){let t=L(window.scrollY),e=L(m.getBoundingClientRect().bottom+window.scrollY),i=L(d.getBoundingClientRect().bottom+window.scrollY);if(t>b&&t<5||t=e-1.5)x-=i-(e-1.5);else if(x>-5&&(x=-5),t<5&&0!=t){let t=L(d.offsetHeight-window.innerHeight);x=-Math.min(L(window.scrollY),5+t+2.5)}else if(twindow.innerHeight){let e=L(d.offsetHeight)-L(window.innerHeight);x>-(e+8)?x+=b-t:x=-(e+8)}n(6,d.style.marginTop=x+"rem",d),b=L(window.scrollY)}else n(6,d.style.marginTop="0rem",d)})),c((()=>{let t=localStorage.getItem("manifesto-hide-content");null!=t&&null!=t&&"true"==t&&Q(r,s)}));return[l,o,r,s,g,p,d,m,u,i,h,w,f,v,Y,function(t){y[t?"unshift":"push"]((()=>{r=t,n(2,r)}))},function(t){y[t?"unshift":"push"]((()=>{o=t,n(1,o)}))},()=>Q(r,s),function(t,e){y[t?"unshift":"push"]((()=>{g[e.index]=t,n(4,g)}))},t=>Y(t.id),function(t,e){y[t?"unshift":"push"]((()=>{g[e.index]=t,n(4,g)}))},t=>Y(t.id),function(t){y[t?"unshift":"push"]((()=>{s=t,n(3,s)}))},function(t){y[t?"unshift":"push"]((()=>{d=t,n(6,d)}))},function(t,e){y[t?"unshift":"push"]((()=>{p[e.id]=t,n(5,p)}))},function(t,e){y[t?"unshift":"push"]((()=>{p[e.id]=t,n(5,p)}))},function(t){y[t?"unshift":"push"]((()=>{u=t,n(8,u)}))},function(t){y[t?"unshift":"push"]((()=>{m=t,n(7,m)}))}]}class X extends t{constructor(t){super(),this.shadowRoot.innerHTML="",e(this,{target:this.shadowRoot,props:n(this.attributes),customElement:!0},U,P,l,{},null,[-1,-1]),t&&t.target&&i(t.target,this,t.anchor)}}customElements.define("manifesto-component",X);export{X as default}; diff --git a/Server/public/js/components/map-component.js b/Server/public/js/components/map-component.js index fdce6a0..6ba5414 100644 --- a/Server/public/js/components/map-component.js +++ b/Server/public/js/components/map-component.js @@ -1,156 +1 @@ - -(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, B as flush, s as safe_not_equal, d as dispatch_dev, v as validate_slots, o as onMount, k as element, n as noop, p as attr_dev, m as add_location, j as detach_dev, C as binding_callbacks } from './index-42a25c61.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, 34, 0, 836); - }, - 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: '© OpenStreetMap contributors', - minNativeZoom: 2, - minZoom: 2, - maxNativeZoom: 16, - maxZoom: 16 - }).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(` 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 = ``; - - 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 }; +import{S as t,i as a,a as e,b as s,u as o,s as r,f as i,n,h as c,d as l,o as p,w as m}from"./index-4348483d.js";function h(t){let a;return{c(){a=i("div"),this.c=n,c(a,"id","map")},m(e,o){s(e,a,o),t[2](a)},p:n,i:n,o:n,d(e){e&&l(a),t[2](null)}}}function u(t,a,e){let s,{callback:o=null}=a;function r(t,a){let e=L.map(s,{center:t,zoom:a});return L.tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'© OpenStreetMap contributors',minNativeZoom:2,minZoom:2,maxNativeZoom:16,maxZoom:16}).addTo(e),e}return p((()=>{o(r)})),t.$$set=t=>{"callback"in t&&e(1,o=t.callback)},[s,o,function(t){m[t?"unshift":"push"]((()=>{s=t,e(0,s)}))}]}class d extends t{constructor(t){super(),this.shadowRoot.innerHTML="",a(this,{target:this.shadowRoot,props:e(this.attributes),customElement:!0},u,h,r,{callback:1},null),t&&(t.target&&s(t.target,this,t.anchor),t.props&&(this.$set(t.props),o()))}static get observedAttributes(){return["callback"]}get callback(){return this.$$.ctx[1]}set callback(t){this.$$set({callback:t}),o()}}customElements.define("map-component",d);export{d as default}; diff --git a/Server/public/js/components/navbar-component.js b/Server/public/js/components/navbar-component.js index d0fc35c..65ed88a 100644 --- a/Server/public/js/components/navbar-component.js +++ b/Server/public/js/components/navbar-component.js @@ -1,576 +1 @@ - -(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, c as validate_store, e as component_subscribe, o as onMount, E as getContext, g as globals, f as validate_each_argument, h as empty, n as noop, j as detach_dev, C as binding_callbacks, k as element, l as space, t as text, p as attr_dev, m as add_location, q as src_url_equal, u as append_dev, y as listen_dev, w as set_data_dev, x as destroy_each, z as run_all } from './index-42a25c61.js'; -import { w as writable } from './index-a1c185ea.js'; -import { loadLocaleContent, locales } from '../../../../../../../../../js/libraries/serverTools.js'; - -/* src\navbar\navbar-component.svelte generated by Svelte v3.52.0 */ - -const { Object: Object_1 } = globals; -const file = "src\\navbar\\navbar-component.svelte"; - -function get_each_context(ctx, list, i) { - const child_ctx = ctx.slice(); - child_ctx[14] = list[i][0]; - child_ctx[15] = list[i][1]; - return child_ctx; -} - -// (61:4) {#if Object.keys($content).length!=0} -function create_if_block(ctx) { - let header; - let input; - let t0; - let label; - let span0; - let t1; - let a0; - let img0; - let img0_src_value; - let t2; - let span1; - let t3_value = /*$content*/ ctx[3].orgName + ""; - let t3; - let t4; - let nav; - let ul; - let li0; - let a1; - let t5_value = /*$content*/ ctx[3].manifesto + ""; - let t5; - let t6; - let li1; - let a2; - let t7_value = /*$content*/ ctx[3].joinUs + ""; - let t7; - let t8; - let li2; - let a3; - let t9_value = /*$content*/ ctx[3].groups + ""; - let t9; - let t10; - let li3; - let a4; - let t11_value = /*$content*/ ctx[3].communities + ""; - let t11; - let t12; - let li4; - let a5; - let t13_value = /*$content*/ ctx[3].cooperatives + ""; - let t13; - let t14; - let li5; - let a6; - let t15_value = /*$content*/ ctx[3].partners + ""; - let t15; - let t16; - let li6; - let button; - let picture; - let source0; - let t17; - let source1; - let t18; - let img1; - let t19; - let div; - let mounted; - let dispose; - let each_value = Object.entries(locales); - 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() { - header = element("header"); - input = element("input"); - t0 = space(); - label = element("label"); - span0 = element("span"); - t1 = space(); - a0 = element("a"); - img0 = element("img"); - t2 = space(); - span1 = element("span"); - t3 = text(t3_value); - t4 = space(); - nav = element("nav"); - ul = element("ul"); - li0 = element("li"); - a1 = element("a"); - t5 = text(t5_value); - t6 = space(); - li1 = element("li"); - a2 = element("a"); - t7 = text(t7_value); - t8 = space(); - li2 = element("li"); - a3 = element("a"); - t9 = text(t9_value); - t10 = space(); - li3 = element("li"); - a4 = element("a"); - t11 = text(t11_value); - t12 = space(); - li4 = element("li"); - a5 = element("a"); - t13 = text(t13_value); - t14 = space(); - li5 = element("li"); - a6 = element("a"); - t15 = text(t15_value); - t16 = space(); - li6 = element("li"); - button = element("button"); - picture = element("picture"); - source0 = element("source"); - t17 = space(); - source1 = element("source"); - t18 = space(); - img1 = element("img"); - t19 = space(); - div = element("div"); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].c(); - } - - attr_dev(input, "type", "checkbox"); - attr_dev(input, "id", "side-menu"); - add_location(input, file, 63, 12, 1785); - attr_dev(span0, "id", "hamb-line"); - add_location(span0, file, 64, 45, 1916); - attr_dev(label, "id", "hamb"); - attr_dev(label, "for", "side-menu"); - add_location(label, file, 64, 12, 1883); - if (!src_url_equal(img0.src, img0_src_value = "/img/common/flag.png")) attr_dev(img0, "src", img0_src_value); - attr_dev(img0, "id", "navbar-logo"); - attr_dev(img0, "alt", "logo"); - add_location(img0, file, 67, 16, 2058); - attr_dev(span1, "id", "navbar-logo-text"); - add_location(span1, file, 68, 16, 2136); - attr_dev(a0, "id", "logo-container"); - attr_dev(a0, "href", "/" + /*locale*/ ctx[6] + "/"); - add_location(a0, file, 66, 12, 1993); - attr_dev(a1, "href", "/" + /*locale*/ ctx[6] + "/manifesto"); - add_location(a1, file, 73, 24, 2320); - add_location(li0, file, 73, 20, 2316); - attr_dev(a2, "href", "/" + /*locale*/ ctx[6] + "/join-us"); - add_location(a2, file, 74, 24, 2409); - add_location(li1, file, 74, 20, 2405); - attr_dev(a3, "href", "/" + /*locale*/ ctx[6] + "/groups"); - add_location(a3, file, 75, 24, 2493); - add_location(li2, file, 75, 20, 2489); - attr_dev(a4, "href", "/" + /*locale*/ ctx[6] + "/communities"); - add_location(a4, file, 76, 24, 2576); - add_location(li3, file, 76, 20, 2572); - attr_dev(a5, "href", "/" + /*locale*/ ctx[6] + "/cooperatives"); - add_location(a5, file, 77, 24, 2669); - add_location(li4, file, 77, 20, 2665); - attr_dev(a6, "href", "/" + /*locale*/ ctx[6] + "/partners"); - add_location(a6, file, 78, 24, 2764); - add_location(li5, file, 78, 20, 2760); - attr_dev(source0, "srcset", "/img/common/globe.webp"); - add_location(source0, file, 82, 32, 2994); - attr_dev(source1, "srcset", "/img/common/globe.png"); - add_location(source1, file, 83, 32, 3068); - attr_dev(img1, "id", "locales-img"); - attr_dev(img1, "alt", "globe"); - add_location(img1, file, 84, 32, 3141); - add_location(picture, file, 81, 28, 2951); - add_location(button, file, 80, 24, 2890); - attr_dev(li6, "id", "locales"); - add_location(li6, file, 79, 20, 2847); - attr_dev(div, "id", "locales-dropdown"); - add_location(div, file, 88, 20, 3299); - attr_dev(ul, "id", "menu"); - add_location(ul, file, 72, 16, 2280); - attr_dev(nav, "id", "nav"); - add_location(nav, file, 71, 12, 2248); - attr_dev(header, "id", "navbar"); - add_location(header, file, 61, 8, 1695); - }, - m: function mount(target, anchor) { - insert_dev(target, header, anchor); - append_dev(header, input); - /*input_binding*/ ctx[10](input); - append_dev(header, t0); - append_dev(header, label); - append_dev(label, span0); - append_dev(header, t1); - append_dev(header, a0); - append_dev(a0, img0); - append_dev(a0, t2); - append_dev(a0, span1); - append_dev(span1, t3); - append_dev(header, t4); - append_dev(header, nav); - append_dev(nav, ul); - append_dev(ul, li0); - append_dev(li0, a1); - append_dev(a1, t5); - append_dev(ul, t6); - append_dev(ul, li1); - append_dev(li1, a2); - append_dev(a2, t7); - append_dev(ul, t8); - append_dev(ul, li2); - append_dev(li2, a3); - append_dev(a3, t9); - append_dev(ul, t10); - append_dev(ul, li3); - append_dev(li3, a4); - append_dev(a4, t11); - append_dev(ul, t12); - append_dev(ul, li4); - append_dev(li4, a5); - append_dev(a5, t13); - append_dev(ul, t14); - append_dev(ul, li5); - append_dev(li5, a6); - append_dev(a6, t15); - append_dev(ul, t16); - append_dev(ul, li6); - append_dev(li6, button); - append_dev(button, picture); - append_dev(picture, source0); - append_dev(picture, t17); - append_dev(picture, source1); - append_dev(picture, t18); - append_dev(picture, img1); - append_dev(ul, t19); - append_dev(ul, div); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].m(div, null); - } - - /*div_binding*/ ctx[12](div); - /*header_binding*/ ctx[13](header); - - if (!mounted) { - dispose = [ - listen_dev(input, "click", /*changeNavbar*/ ctx[7], false, false, false), - listen_dev(button, "click", /*showLocales*/ ctx[8], false, false, false) - ]; - - mounted = true; - } - }, - p: function update(ctx, dirty) { - if (dirty & /*$content*/ 8 && t3_value !== (t3_value = /*$content*/ ctx[3].orgName + "")) set_data_dev(t3, t3_value); - if (dirty & /*$content*/ 8 && t5_value !== (t5_value = /*$content*/ ctx[3].manifesto + "")) set_data_dev(t5, t5_value); - if (dirty & /*$content*/ 8 && t7_value !== (t7_value = /*$content*/ ctx[3].joinUs + "")) set_data_dev(t7, t7_value); - if (dirty & /*$content*/ 8 && t9_value !== (t9_value = /*$content*/ ctx[3].groups + "")) set_data_dev(t9, t9_value); - if (dirty & /*$content*/ 8 && t11_value !== (t11_value = /*$content*/ ctx[3].communities + "")) set_data_dev(t11, t11_value); - if (dirty & /*$content*/ 8 && t13_value !== (t13_value = /*$content*/ ctx[3].cooperatives + "")) set_data_dev(t13, t13_value); - if (dirty & /*$content*/ 8 && t15_value !== (t15_value = /*$content*/ ctx[3].partners + "")) set_data_dev(t15, t15_value); - - if (dirty & /*changeLocale, Object, locales*/ 512) { - each_value = Object.entries(locales); - validate_each_argument(each_value); - let i; - - for (i = 0; i < each_value.length; i += 1) { - const child_ctx = get_each_context(ctx, each_value, i); - - if (each_blocks[i]) { - each_blocks[i].p(child_ctx, dirty); - } else { - each_blocks[i] = create_each_block(child_ctx); - each_blocks[i].c(); - each_blocks[i].m(div, null); - } - } - - for (; i < each_blocks.length; i += 1) { - each_blocks[i].d(1); - } - - each_blocks.length = each_value.length; - } - }, - d: function destroy(detaching) { - if (detaching) detach_dev(header); - /*input_binding*/ ctx[10](null); - destroy_each(each_blocks, detaching); - /*div_binding*/ ctx[12](null); - /*header_binding*/ ctx[13](null); - mounted = false; - run_all(dispose); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_if_block.name, - type: "if", - source: "(61:4) {#if Object.keys($content).length!=0}", - ctx - }); - - return block; -} - -// (90:24) {#each Object.entries(locales) as [loc,name]} -function create_each_block(ctx) { - let button; - let t_value = /*name*/ ctx[15] + ""; - let t; - let mounted; - let dispose; - - function click_handler() { - return /*click_handler*/ ctx[11](/*loc*/ ctx[14]); - } - - const block = { - c: function create() { - button = element("button"); - t = text(t_value); - add_location(button, file, 90, 28, 3455); - }, - m: function mount(target, anchor) { - insert_dev(target, button, anchor); - append_dev(button, t); - - if (!mounted) { - dispose = listen_dev(button, "click", click_handler, false, false, false); - mounted = true; - } - }, - p: function update(new_ctx, dirty) { - ctx = new_ctx; - }, - d: function destroy(detaching) { - if (detaching) detach_dev(button); - mounted = false; - dispose(); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_each_block.name, - type: "each", - source: "(90:24) {#each Object.entries(locales) as [loc,name]}", - ctx - }); - - return block; -} - -function create_fragment(ctx) { - let show_if = Object.keys(/*$content*/ ctx[3]).length != 0; - let if_block_anchor; - let if_block = show_if && create_if_block(ctx); - - const block = { - c: function create() { - if (if_block) if_block.c(); - if_block_anchor = empty(); - this.c = noop; - }, - 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) { - if (if_block) if_block.m(target, anchor); - insert_dev(target, if_block_anchor, anchor); - }, - p: function update(ctx, [dirty]) { - if (dirty & /*$content*/ 8) show_if = Object.keys(/*$content*/ ctx[3]).length != 0; - - if (show_if) { - if (if_block) { - if_block.p(ctx, dirty); - } else { - if_block = create_if_block(ctx); - if_block.c(); - if_block.m(if_block_anchor.parentNode, if_block_anchor); - } - } else if (if_block) { - if_block.d(1); - if_block = null; - } - }, - i: noop, - o: noop, - d: function destroy(detaching) { - if (if_block) if_block.d(detaching); - if (detaching) detach_dev(if_block_anchor); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_fragment.name, - type: "component", - source: "", - ctx - }); - - return block; -} - -function instance($$self, $$props, $$invalidate) { - let $content; - let { $$slots: slots = {}, $$scope } = $$props; - validate_slots('navbar-component', slots, []); - let hambInput; - let navbar; - let localesDropdown; - let loaded; - let content = writable({}); - validate_store(content, 'content'); - component_subscribe($$self, content, value => $$invalidate(3, $content = value)); - let locale = loadLocaleContent(content, "navbar-component", loaded); - - function changeNavbar() { - if (hambInput.checked) { - $$invalidate(1, navbar.style.background = "white", navbar); - } else { - setTimeout( - () => { - $$invalidate(1, navbar.style.position = "relative", navbar); - $$invalidate(1, navbar.style.background = "", navbar); - $$invalidate(1, navbar.style.boxShadow = "", navbar); - }, - 510 - ); - } - } - - function showLocales() { - if (localesDropdown.style.display == "block") { - $$invalidate(2, localesDropdown.style.display = "none", localesDropdown); - } else { - $$invalidate(2, localesDropdown.style.display = "block", localesDropdown); - } - } - - function changeLocale(lang) { - localStorage.setItem("locale", lang); - let locSplit = location.href.split("/"); - let localesSymbols = Object.keys(locales); - locSplit = locSplit.filter(x => !localesSymbols.includes(x)); - let loc = locSplit.slice(0, locSplit.length - 1).join("/") + "/" + lang + "/" + locSplit[locSplit.length - 1]; - location.href = loc; - } - - onMount(() => { - - }); - - const writable_props = []; - - Object_1.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(` was created with unknown prop '${key}'`); - }); - - function input_binding($$value) { - binding_callbacks[$$value ? 'unshift' : 'push'](() => { - hambInput = $$value; - $$invalidate(0, hambInput); - }); - } - - const click_handler = loc => changeLocale(loc); - - function div_binding($$value) { - binding_callbacks[$$value ? 'unshift' : 'push'](() => { - localesDropdown = $$value; - $$invalidate(2, localesDropdown); - }); - } - - function header_binding($$value) { - binding_callbacks[$$value ? 'unshift' : 'push'](() => { - navbar = $$value; - $$invalidate(1, navbar); - }); - } - - $$self.$capture_state = () => ({ - onMount, - getContext, - writable, - loadLocaleContent, - locales, - hambInput, - navbar, - localesDropdown, - loaded, - content, - locale, - changeNavbar, - showLocales, - changeLocale, - $content - }); - - $$self.$inject_state = $$props => { - if ('hambInput' in $$props) $$invalidate(0, hambInput = $$props.hambInput); - if ('navbar' in $$props) $$invalidate(1, navbar = $$props.navbar); - if ('localesDropdown' in $$props) $$invalidate(2, localesDropdown = $$props.localesDropdown); - if ('loaded' in $$props) $$invalidate(4, loaded = $$props.loaded); - if ('content' in $$props) $$invalidate(5, content = $$props.content); - if ('locale' in $$props) $$invalidate(6, locale = $$props.locale); - }; - - if ($$props && "$$inject" in $$props) { - $$self.$inject_state($$props.$$inject); - } - - return [ - hambInput, - navbar, - localesDropdown, - $content, - loaded, - content, - locale, - changeNavbar, - showLocales, - changeLocale, - input_binding, - click_handler, - div_binding, - header_binding - ]; -} - -class Navbar_component extends SvelteElement { - constructor(options) { - super(); - this.shadowRoot.innerHTML = ``; - - init( - this, - { - target: this.shadowRoot, - props: attribute_to_object(this.attributes), - customElement: true - }, - instance, - create_fragment, - safe_not_equal, - {}, - null - ); - - if (options) { - if (options.target) { - insert_dev(options.target, this, options.anchor); - } - } - } -} - -customElements.define("navbar-component", Navbar_component); - -export { Navbar_component as default }; +import{S as e,i as o,a as t,b as n,s as i,e as a,n as r,d as l,c as s,o as c,f as d,g as m,t as h,h as p,j as g,l as u,q as f,m as b,p as v,r as k,w}from"./index-4348483d.js";import{w as y}from"./index-71440b21.js";import{loadLocaleContent as x,locales as j}from"../../../../../../../../../js/libraries/serverTools.js";function z(e,o,t){const n=e.slice();return n[14]=o[t][0],n[15]=o[t][1],n}function O(e){let o,t,i,a,r,s,c,w,y,x,O,H,L,M,N,S,E,R,U,q,I,X,A,B,C,D,F,G,J,K,P,Q,V,W,Y,Z,$,_,ee,oe,te,ne,ie,ae,re=e[3].orgName+"",le=e[3].manifesto+"",se=e[3].joinUs+"",ce=e[3].groups+"",de=e[3].communities+"",me=e[3].cooperatives+"",he=e[3].partners+"",pe=Object.entries(j),ge=[];for(let o=0;o',r=m(),s=d("a"),c=d("img"),y=m(),x=d("span"),O=h(re),H=m(),L=d("nav"),M=d("ul"),N=d("li"),S=d("a"),E=h(le),R=m(),U=d("li"),q=d("a"),I=h(se),X=m(),A=d("li"),B=d("a"),C=h(ce),D=m(),F=d("li"),G=d("a"),J=h(de),K=m(),P=d("li"),Q=d("a"),V=h(me),W=m(),Y=d("li"),Z=d("a"),$=h(he),_=m(),ee=d("li"),oe=d("button"),oe.innerHTML=' \n \n globe',te=m(),ne=d("div");for(let e=0;et(3,n=e)));let m=x(d,"navbar-component",l);function h(e){localStorage.setItem("locale",e);let o=location.href.split("/"),t=Object.keys(j);o=o.filter((e=>!t.includes(e)));let n=o.slice(0,o.length-1).join("/")+"/"+e+"/"+o[o.length-1];location.href=n}c((()=>{}));return[i,a,r,n,l,d,m,function(){i.checked?t(1,a.style.background="white",a):setTimeout((()=>{t(1,a.style.position="relative",a),t(1,a.style.background="",a),t(1,a.style.boxShadow="",a)}),510)},function(){"block"==r.style.display?t(2,r.style.display="none",r):t(2,r.style.display="block",r)},h,function(e){w[e?"unshift":"push"]((()=>{i=e,t(0,i)}))},e=>h(e),function(e){w[e?"unshift":"push"]((()=>{r=e,t(2,r)}))},function(e){w[e?"unshift":"push"]((()=>{a=e,t(1,a)}))}]}class M extends e{constructor(e){super(),this.shadowRoot.innerHTML="",o(this,{target:this.shadowRoot,props:t(this.attributes),customElement:!0},L,H,i,{},null),e&&e.target&&n(e.target,this,e.anchor)}}customElements.define("navbar-component",M);export{M as default}; diff --git a/Server/public/js/components/pane-aligner.js b/Server/public/js/components/pane-aligner.js index d0b4c9a..784b939 100644 --- a/Server/public/js/components/pane-aligner.js +++ b/Server/public/js/components/pane-aligner.js @@ -1,304 +1 @@ - -(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 getContext, o as onMount, F as setContext, k as element, l as space, n as noop, p as attr_dev, m as add_location, u as append_dev, j as detach_dev, C as binding_callbacks } from './index-42a25c61.js'; -import { debounce } from '../../../../../../../../../js/libraries/miscTools.js'; - -/* src\components\pane-aligner.svelte generated by Svelte v3.52.0 */ -const file = "src\\components\\pane-aligner.svelte"; - -function create_fragment(ctx) { - let div6; - let div5; - let div2; - let div0; - let slot0; - let t0; - let div1; - let slot1; - let t1; - let div3; - let slot2; - let t2; - let div4; - let slot3; - - const block = { - c: function create() { - div6 = element("div"); - div5 = element("div"); - div2 = element("div"); - div0 = element("div"); - slot0 = element("slot"); - t0 = space(); - div1 = element("div"); - slot1 = element("slot"); - t1 = space(); - div3 = element("div"); - slot2 = element("slot"); - t2 = space(); - div4 = element("div"); - slot3 = element("slot"); - this.c = noop; - attr_dev(slot0, "name", "sidebar-left"); - add_location(slot0, file, 74, 16, 2567); - attr_dev(div0, "id", "sidebar-left"); - attr_dev(div0, "class", "pane"); - add_location(div0, file, 73, 12, 2489); - attr_dev(slot1, "name", "sidebar-left2"); - add_location(slot1, file, 77, 16, 2714); - attr_dev(div1, "id", "sidebar-left2"); - attr_dev(div1, "class", "pane"); - add_location(div1, file, 76, 12, 2634); - attr_dev(div2, "id", "sidebars-left"); - attr_dev(div2, "class", "sidebar"); - add_location(div2, file, 72, 8, 2435); - attr_dev(slot2, "name", "sidebar-right"); - add_location(slot2, file, 81, 12, 2879); - attr_dev(div3, "id", "sidebar-right"); - attr_dev(div3, "class", "pane sidebar"); - add_location(div3, file, 80, 8, 2794); - attr_dev(slot3, "name", "main"); - attr_dev(slot3, "id", "main-slot"); - add_location(slot3, file, 84, 12, 3007); - attr_dev(div4, "id", "main-pane"); - attr_dev(div4, "class", "pane"); - add_location(div4, file, 83, 8, 2939); - attr_dev(div5, "class", "pane-container"); - add_location(div5, file, 71, 4, 2397); - attr_dev(div6, "id", "root"); - attr_dev(div6, "class", "pane-centering"); - add_location(div6, file, 70, 0, 2336); - }, - l: function claim(nodes) { - throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); - }, - m: function mount(target, anchor) { - insert_dev(target, div6, anchor); - append_dev(div6, div5); - append_dev(div5, div2); - append_dev(div2, div0); - append_dev(div0, slot0); - /*div0_binding*/ ctx[5](div0); - append_dev(div2, t0); - append_dev(div2, div1); - append_dev(div1, slot1); - /*div1_binding*/ ctx[6](div1); - append_dev(div5, t1); - append_dev(div5, div3); - append_dev(div3, slot2); - /*div3_binding*/ ctx[7](div3); - append_dev(div5, t2); - append_dev(div5, div4); - append_dev(div4, slot3); - /*div4_binding*/ ctx[8](div4); - /*div6_binding*/ ctx[9](div6); - }, - p: noop, - i: noop, - o: noop, - d: function destroy(detaching) { - if (detaching) detach_dev(div6); - /*div0_binding*/ ctx[5](null); - /*div1_binding*/ ctx[6](null); - /*div3_binding*/ ctx[7](null); - /*div4_binding*/ ctx[8](null); - /*div6_binding*/ ctx[9](null); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_fragment.name, - type: "component", - source: "", - ctx - }); - - return block; -} - -function instance($$self, $$props, $$invalidate) { - let { $$slots: slots = {}, $$scope } = $$props; - validate_slots('pane-aligner', slots, []); - let root; - let mainPane; - let sidebarLeft; - let sidebarLeft2; - let sidebarRight; - let parentProps = getContext("alignerParent"); - - let switchView = parentProps != undefined - ? getContext("alignerParent").switchView - : undefined; - - let leftReplaced = false; - let left2Replaced = false; - let rightReplaced = false; - let switchViewReplaced = false; - - function adjustSlotted() { - if (root.parentNode != null) { - let slotted = root.parentNode.host.childNodes; - - if (slotted.length == 0) { - setTimeout(adjustSlotted, 50); - } else { - let changed = false; - let html = root.parentNode.innerHTML; - - for (let item of slotted) { - if (item.slot == "sidebar-left" && !leftReplaced) { - html = html.replace("#sidebar-left{display:none}", ""); - leftReplaced = true; - changed = true; - } else if (item.slot == "sidebar-left2" && !left2Replaced) { - html = html.replace("#sidebar-left2{display:none}", ""); - left2Replaced = true; - changed = true; - } else if (item.slot == "sidebar-right" && !rightReplaced) { - html = html.replace("#sidebar-right{display:none;", "#sidebar-right{"); - rightReplaced = true; - changed = true; - } - } - - if (switchView != undefined && !switchViewReplaced) { - html = html.replace("1880px", switchView); - changed = true; - } - - if (changed) { - $$invalidate(0, root.parentNode.innerHTML = html, root); - } - } - } - } - - window.addEventListener("resize", debounce(adjustSlotted, 100)); - - onMount(() => { - adjustSlotted(); - }); - - const writable_props = []; - - Object.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(` was created with unknown prop '${key}'`); - }); - - function div0_binding($$value) { - binding_callbacks[$$value ? 'unshift' : 'push'](() => { - sidebarLeft = $$value; - $$invalidate(2, sidebarLeft); - }); - } - - function div1_binding($$value) { - binding_callbacks[$$value ? 'unshift' : 'push'](() => { - sidebarLeft2 = $$value; - $$invalidate(3, sidebarLeft2); - }); - } - - function div3_binding($$value) { - binding_callbacks[$$value ? 'unshift' : 'push'](() => { - sidebarRight = $$value; - $$invalidate(4, sidebarRight); - }); - } - - function div4_binding($$value) { - binding_callbacks[$$value ? 'unshift' : 'push'](() => { - mainPane = $$value; - $$invalidate(1, mainPane); - }); - } - - function div6_binding($$value) { - binding_callbacks[$$value ? 'unshift' : 'push'](() => { - root = $$value; - $$invalidate(0, root); - }); - } - - $$self.$capture_state = () => ({ - getContext, - setContext, - onMount, - debounce, - root, - mainPane, - sidebarLeft, - sidebarLeft2, - sidebarRight, - parentProps, - switchView, - leftReplaced, - left2Replaced, - rightReplaced, - switchViewReplaced, - adjustSlotted - }); - - $$self.$inject_state = $$props => { - if ('root' in $$props) $$invalidate(0, root = $$props.root); - if ('mainPane' in $$props) $$invalidate(1, mainPane = $$props.mainPane); - if ('sidebarLeft' in $$props) $$invalidate(2, sidebarLeft = $$props.sidebarLeft); - if ('sidebarLeft2' in $$props) $$invalidate(3, sidebarLeft2 = $$props.sidebarLeft2); - if ('sidebarRight' in $$props) $$invalidate(4, sidebarRight = $$props.sidebarRight); - if ('parentProps' in $$props) parentProps = $$props.parentProps; - if ('switchView' in $$props) switchView = $$props.switchView; - if ('leftReplaced' in $$props) leftReplaced = $$props.leftReplaced; - if ('left2Replaced' in $$props) left2Replaced = $$props.left2Replaced; - if ('rightReplaced' in $$props) rightReplaced = $$props.rightReplaced; - if ('switchViewReplaced' in $$props) switchViewReplaced = $$props.switchViewReplaced; - }; - - if ($$props && "$$inject" in $$props) { - $$self.$inject_state($$props.$$inject); - } - - return [ - root, - mainPane, - sidebarLeft, - sidebarLeft2, - sidebarRight, - div0_binding, - div1_binding, - div3_binding, - div4_binding, - div6_binding - ]; -} - -class Pane_aligner extends SvelteElement { - constructor(options) { - super(); - this.shadowRoot.innerHTML = ``; - - init( - this, - { - target: this.shadowRoot, - props: attribute_to_object(this.attributes), - customElement: true - }, - instance, - create_fragment, - safe_not_equal, - {}, - null - ); - - if (options) { - if (options.target) { - insert_dev(options.target, this, options.anchor); - } - } - } -} - -customElements.define("pane-aligner", Pane_aligner); - -export { Pane_aligner as default }; +import{S as i,i as e,a,b as t,s as n,f as r,g as s,n as d,h as o,l,d as m,x as p,o as h,w as g}from"./index-4348483d.js";import{debounce as c}from"../../../../../../../../../js/libraries/miscTools.js";function f(i){let e,a,n,p,h,g,c,f,u,b;return{c(){e=r("div"),a=r("div"),n=r("div"),p=r("div"),p.innerHTML='',h=s(),g=r("div"),g.innerHTML='',c=s(),f=r("div"),f.innerHTML='',u=s(),b=r("div"),b.innerHTML='',this.c=d,o(p,"id","sidebar-left"),o(p,"class","pane"),o(g,"id","sidebar-left2"),o(g,"class","pane"),o(n,"id","sidebars-left"),o(n,"class","sidebar"),o(f,"id","sidebar-right"),o(f,"class","pane sidebar"),o(b,"id","main-pane"),o(b,"class","pane"),o(a,"class","pane-container"),o(e,"id","root"),o(e,"class","pane-centering")},m(r,s){t(r,e,s),l(e,a),l(a,n),l(n,p),i[5](p),l(n,h),l(n,g),i[6](g),l(a,c),l(a,f),i[7](f),l(a,u),l(a,b),i[8](b),i[9](e)},p:d,i:d,o:d,d(a){a&&m(e),i[5](null),i[6](null),i[7](null),i[8](null),i[9](null)}}}function u(i,e,a){let t,n,r,s,d,o=null!=p("alignerParent")?p("alignerParent").switchView:void 0,l=!1,m=!1,f=!1;function u(){if(null!=t.parentNode){let i=t.parentNode.host.childNodes;if(0==i.length)setTimeout(u,50);else{let e=!1,n=t.parentNode.innerHTML;for(let a of i)"sidebar-left"!=a.slot||l?"sidebar-left2"!=a.slot||m?"sidebar-right"!=a.slot||f||(n=n.replace("#sidebar-right{display:none;","#sidebar-right{"),f=!0,e=!0):(n=n.replace("#sidebar-left2{display:none}",""),m=!0,e=!0):(n=n.replace("#sidebar-left{display:none}",""),l=!0,e=!0);null!=o&&(n=n.replace("1880px",o),e=!0),e&&a(0,t.parentNode.innerHTML=n,t)}}}return window.addEventListener("resize",c(u,100)),h((()=>{u()})),[t,n,r,s,d,function(i){g[i?"unshift":"push"]((()=>{r=i,a(2,r)}))},function(i){g[i?"unshift":"push"]((()=>{s=i,a(3,s)}))},function(i){g[i?"unshift":"push"]((()=>{d=i,a(4,d)}))},function(i){g[i?"unshift":"push"]((()=>{n=i,a(1,n)}))},function(i){g[i?"unshift":"push"]((()=>{t=i,a(0,t)}))}]}class b extends i{constructor(i){super(),this.shadowRoot.innerHTML="",e(this,{target:this.shadowRoot,props:a(this.attributes),customElement:!0},u,f,n,{},null),i&&i.target&&t(i.target,this,i.anchor)}}customElements.define("pane-aligner",b);export{b as default}; diff --git a/Server/public/js/components/partners-component.js b/Server/public/js/components/partners-component.js index e2d1909..486a214 100644 --- a/Server/public/js/components/partners-component.js +++ b/Server/public/js/components/partners-component.js @@ -1,453 +1 @@ - -(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, c as validate_store, e as component_subscribe, o as onMount, g as globals, f as validate_each_argument, h as empty, n as noop, j as detach_dev, k as element, t as text, l as space, m as add_location, p as attr_dev, q as src_url_equal, u as append_dev, w as set_data_dev, x as destroy_each } from './index-42a25c61.js'; -import { w as writable } from './index-a1c185ea.js'; -import { loadLocaleContent } from '../../../../../../../../../js/libraries/serverTools.js'; -import { partners } from '../../../../../../../../../js/partners.js'; -import '../../../../../../../../../js/components/map-component.js'; - -/* src\partners-component.svelte generated by Svelte v3.52.0 */ - -const { Object: Object_1 } = globals; - -const file = "src\\partners-component.svelte"; - -function get_each_context(ctx, list, i) { - const child_ctx = ctx.slice(); - child_ctx[4] = list[i]; - return child_ctx; -} - -// (25:4) {#if Object.keys($content).length!=0} -function create_if_block(ctx) { - let div1; - let div0; - let h1; - let t0_value = /*$content*/ ctx[0].heading + ""; - let t0; - let t1; - let img; - let img_src_value; - let t2; - let p; - let t3_value = /*$content*/ ctx[0].p1 + ""; - let t3; - let t4; - let h3; - let t5_value = /*$content*/ ctx[0].subheading1 + ""; - let t5; - let t6; - let h4; - let t7_value = /*$content*/ ctx[0].subheading2 + ""; - let t7; - let t8; - let each_value = partners; - 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"); - t0 = text(t0_value); - t1 = space(); - img = element("img"); - t2 = space(); - p = element("p"); - t3 = text(t3_value); - t4 = space(); - h3 = element("h3"); - t5 = text(t5_value); - t6 = space(); - h4 = element("h4"); - t7 = text(t7_value); - t8 = space(); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].c(); - } - - add_location(h1, file, 28, 16, 766); - attr_dev(img, "id", "hands-img"); - if (!src_url_equal(img.src, img_src_value = "/img/common/handshake.svg")) attr_dev(img, "src", img_src_value); - attr_dev(img, "alt", "hands"); - add_location(img, file, 29, 16, 811); - add_location(p, file, 30, 16, 893); - add_location(h3, file, 31, 16, 931); - add_location(h4, file, 32, 16, 980); - attr_dev(div0, "id", "text-container"); - add_location(div0, file, 27, 12, 723); - attr_dev(div1, "id", "container"); - add_location(div1, file, 25, 8, 620); - }, - m: function mount(target, anchor) { - insert_dev(target, div1, anchor); - append_dev(div1, div0); - append_dev(div0, h1); - append_dev(h1, t0); - append_dev(div0, t1); - append_dev(div0, img); - append_dev(div0, t2); - append_dev(div0, p); - append_dev(p, t3); - append_dev(div0, t4); - append_dev(div0, h3); - append_dev(h3, t5); - append_dev(div0, t6); - append_dev(div0, h4); - append_dev(h4, t7); - 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 & /*$content*/ 1 && t0_value !== (t0_value = /*$content*/ ctx[0].heading + "")) set_data_dev(t0, t0_value); - if (dirty & /*$content*/ 1 && t3_value !== (t3_value = /*$content*/ ctx[0].p1 + "")) set_data_dev(t3, t3_value); - if (dirty & /*$content*/ 1 && t5_value !== (t5_value = /*$content*/ ctx[0].subheading1 + "")) set_data_dev(t5, t5_value); - if (dirty & /*$content*/ 1 && t7_value !== (t7_value = /*$content*/ ctx[0].subheading2 + "")) set_data_dev(t7, t7_value); - - if (dirty & /*$content, partners*/ 1) { - each_value = partners; - 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; - } - }, - d: function destroy(detaching) { - if (detaching) detach_dev(div1); - destroy_each(each_blocks, detaching); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_if_block.name, - type: "if", - source: "(25:4) {#if Object.keys($content).length!=0}", - ctx - }); - - return block; -} - -// (34:16) {#each partners as partner} -function create_each_block(ctx) { - let div2; - let div1; - let picture; - let source0; - let t0; - let source1; - let t1; - let img; - let t2; - let div0; - let p0; - let b0; - let t3_value = /*$content*/ ctx[0].name + ""; - let t3; - let t4; - let t5_value = /*partner*/ ctx[4].name + ""; - let t5; - let t6; - let p1; - let b1; - let t7_value = /*$content*/ ctx[0].type + ""; - let t7; - let t8; - let t9_value = /*$content*/ ctx[0][/*partner*/ ctx[4].type] + ""; - let t9; - let t10; - let p2; - let b2; - let t11_value = /*$content*/ ctx[0].link + ""; - let t11; - let t12; - let a; - let t13_value = /*partner*/ ctx[4].link + ""; - let t13; - let t14; - let p3; - let b3; - let t15_value = /*$content*/ ctx[0].description + ""; - let t15; - let t16; - let t17_value = /*$content*/ ctx[0][/*partner*/ ctx[4].description] + ""; - let t17; - let t18; - - const block = { - c: function create() { - div2 = element("div"); - div1 = element("div"); - picture = element("picture"); - source0 = element("source"); - t0 = space(); - source1 = element("source"); - t1 = space(); - img = element("img"); - t2 = space(); - div0 = element("div"); - p0 = element("p"); - b0 = element("b"); - t3 = text(t3_value); - t4 = text(": "); - t5 = text(t5_value); - t6 = space(); - p1 = element("p"); - b1 = element("b"); - t7 = text(t7_value); - t8 = text(": "); - t9 = text(t9_value); - t10 = space(); - p2 = element("p"); - b2 = element("b"); - t11 = text(t11_value); - t12 = text(": "); - a = element("a"); - t13 = text(t13_value); - t14 = space(); - p3 = element("p"); - b3 = element("b"); - t15 = text(t15_value); - t16 = text(": "); - t17 = text(t17_value); - t18 = space(); - attr_dev(source0, "srcset", "/img/partners/" + /*partner*/ ctx[4].logo + ".webp"); - add_location(source0, file, 37, 32, 1234); - attr_dev(source1, "srcset", "/img/partners/" + /*partner*/ ctx[4].logo + ".jpg"); - add_location(source1, file, 38, 32, 1323); - attr_dev(img, "class", "partner-logo"); - attr_dev(img, "alt", "logo"); - add_location(img, file, 39, 32, 1411); - add_location(picture, file, 36, 28, 1191); - add_location(b0, file, 42, 35, 1560); - add_location(p0, file, 42, 32, 1557); - add_location(b1, file, 43, 35, 1639); - add_location(p1, file, 43, 32, 1636); - add_location(b2, file, 44, 35, 1728); - attr_dev(a, "href", /*partner*/ ctx[4].link); - attr_dev(a, "target", ";_blank;"); - attr_dev(a, "rel", "noreferrer"); - add_location(a, file, 44, 59, 1752); - add_location(p2, file, 44, 32, 1725); - add_location(div0, file, 41, 28, 1518); - attr_dev(div1, "class", "img-general-info"); - add_location(div1, file, 35, 24, 1131); - add_location(b3, file, 47, 27, 1925); - add_location(p3, file, 47, 24, 1922); - attr_dev(div2, "class", "location-info"); - add_location(div2, file, 34, 20, 1078); - }, - m: function mount(target, anchor) { - insert_dev(target, div2, anchor); - append_dev(div2, div1); - append_dev(div1, picture); - append_dev(picture, source0); - append_dev(picture, t0); - append_dev(picture, source1); - append_dev(picture, t1); - append_dev(picture, img); - append_dev(div1, t2); - append_dev(div1, div0); - append_dev(div0, p0); - append_dev(p0, b0); - append_dev(b0, t3); - append_dev(b0, t4); - append_dev(p0, t5); - append_dev(div0, t6); - append_dev(div0, p1); - append_dev(p1, b1); - append_dev(b1, t7); - append_dev(b1, t8); - append_dev(p1, t9); - append_dev(div0, t10); - append_dev(div0, p2); - append_dev(p2, b2); - append_dev(b2, t11); - append_dev(b2, t12); - append_dev(p2, a); - append_dev(a, t13); - append_dev(div2, t14); - append_dev(div2, p3); - append_dev(p3, b3); - append_dev(b3, t15); - append_dev(b3, t16); - append_dev(p3, t17); - append_dev(div2, t18); - }, - p: function update(ctx, dirty) { - if (dirty & /*$content*/ 1 && t3_value !== (t3_value = /*$content*/ ctx[0].name + "")) set_data_dev(t3, t3_value); - if (dirty & /*$content*/ 1 && t7_value !== (t7_value = /*$content*/ ctx[0].type + "")) set_data_dev(t7, t7_value); - if (dirty & /*$content*/ 1 && t9_value !== (t9_value = /*$content*/ ctx[0][/*partner*/ ctx[4].type] + "")) set_data_dev(t9, t9_value); - if (dirty & /*$content*/ 1 && t11_value !== (t11_value = /*$content*/ ctx[0].link + "")) set_data_dev(t11, t11_value); - if (dirty & /*$content*/ 1 && t15_value !== (t15_value = /*$content*/ ctx[0].description + "")) set_data_dev(t15, t15_value); - if (dirty & /*$content*/ 1 && t17_value !== (t17_value = /*$content*/ ctx[0][/*partner*/ ctx[4].description] + "")) set_data_dev(t17, t17_value); - }, - d: function destroy(detaching) { - if (detaching) detach_dev(div2); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_each_block.name, - type: "each", - source: "(34:16) {#each partners as partner}", - ctx - }); - - return block; -} - -function create_fragment(ctx) { - let show_if = Object.keys(/*$content*/ ctx[0]).length != 0; - let if_block_anchor; - let if_block = show_if && create_if_block(ctx); - - const block = { - c: function create() { - if (if_block) if_block.c(); - if_block_anchor = empty(); - this.c = noop; - }, - 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) { - if (if_block) if_block.m(target, anchor); - insert_dev(target, if_block_anchor, anchor); - }, - p: function update(ctx, [dirty]) { - if (dirty & /*$content*/ 1) show_if = Object.keys(/*$content*/ ctx[0]).length != 0; - - if (show_if) { - if (if_block) { - if_block.p(ctx, dirty); - } else { - if_block = create_if_block(ctx); - if_block.c(); - if_block.m(if_block_anchor.parentNode, if_block_anchor); - } - } else if (if_block) { - if_block.d(1); - if_block = null; - } - }, - i: noop, - o: noop, - d: function destroy(detaching) { - if (if_block) if_block.d(detaching); - if (detaching) detach_dev(if_block_anchor); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_fragment.name, - type: "component", - source: "", - ctx - }); - - return block; -} - -function instance($$self, $$props, $$invalidate) { - let $content; - let { $$slots: slots = {}, $$scope } = $$props; - validate_slots('partners-component', slots, []); - let loaded; - let content = writable({}); - validate_store(content, 'content'); - component_subscribe($$self, content, value => $$invalidate(0, $content = value)); - let locale = loadLocaleContent(content, "partners-component", loaded); - - onMount(() => { - - }); - - const writable_props = []; - - Object_1.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(` was created with unknown prop '${key}'`); - }); - - $$self.$capture_state = () => ({ - onMount, - writable, - loadLocaleContent, - partners, - loaded, - content, - locale, - $content - }); - - $$self.$inject_state = $$props => { - if ('loaded' in $$props) $$invalidate(1, loaded = $$props.loaded); - if ('content' in $$props) $$invalidate(2, content = $$props.content); - if ('locale' in $$props) locale = $$props.locale; - }; - - if ($$props && "$$inject" in $$props) { - $$self.$inject_state($$props.$$inject); - } - - return [$content, loaded, content]; -} - -class Partners_component extends SvelteElement { - constructor(options) { - super(); - this.shadowRoot.innerHTML = ``; - - init( - this, - { - target: this.shadowRoot, - props: attribute_to_object(this.attributes), - customElement: true - }, - instance, - create_fragment, - safe_not_equal, - {}, - null - ); - - if (options) { - if (options.target) { - insert_dev(options.target, this, options.anchor); - } - } - } -} - -customElements.define("partners-component", Partners_component); - -export { Partners_component as default }; +import{S as t,i as e,a as n,b as i,s as o,e as r,n as a,d as s,c as m,o as l,f as c,t as g,g as p,h as d,j as h,l as f,m as u,p as b}from"./index-4348483d.js";import{w as x}from"./index-71440b21.js";import{loadLocaleContent as w}from"../../../../../../../../../js/libraries/serverTools.js";import{partners as j}from"../../../../../../../../../js/partners.js";import"../../../../../../../../../js/components/map-component.js";function y(t,e,n){const i=t.slice();return i[4]=e[n],i}function v(t){let e,n,o,r,a,m,l,x,w,v,z,D,E,O,R,T,A,C=t[0].heading+"",H=t[0].p1+"",L=t[0].subheading1+"",M=t[0].subheading2+"",N=j,S=[];for(let e=0;en(0,i=t))),w(r,"partners-component",o),l((()=>{})),[i,o,r]}class E extends t{constructor(t){super(),this.shadowRoot.innerHTML="",e(this,{target:this.shadowRoot,props:n(this.attributes),customElement:!0},D,z,o,{},null),t&&t.target&&i(t.target,this,t.anchor)}}customElements.define("partners-component",E);export{E as default}; diff --git a/Server/public/js/components/select-component.js b/Server/public/js/components/select-component.js index 459f13d..df38f5d 100644 --- a/Server/public/js/components/select-component.js +++ b/Server/public/js/components/select-component.js @@ -1,593 +1 @@ - -(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, B as flush, s as safe_not_equal, d as dispatch_dev, v as validate_slots, o as onMount, f as validate_each_argument, k as element, n as noop, p as attr_dev, m as add_location, j as detach_dev, C as binding_callbacks, t as text, l as space, q as src_url_equal, D as set_style, u as append_dev, y as listen_dev, w as set_data_dev, x as destroy_each } from './index-42a25c61.js'; -import { px2rem, getTextWidth, getCanvasFont } from '../../../../../../../../../js/libraries/miscTools.js'; - -/* src\components\select-component.svelte generated by Svelte v3.52.0 */ -const file = "src\\components\\select-component.svelte"; - -function get_each_context(ctx, list, i) { - const child_ctx = ctx.slice(); - child_ctx[26] = list[i]; - child_ctx[27] = list; - child_ctx[28] = i; - return child_ctx; -} - -// (135:12) {#each options as option, i} -function create_each_block(ctx) { - let button; - let span; - let t0_value = /*option*/ ctx[26] + ""; - let t0; - let t1; - let i = /*i*/ ctx[28]; - let mounted; - let dispose; - const assign_button = () => /*button_binding_1*/ ctx[14](button, i); - const unassign_button = () => /*button_binding_1*/ ctx[14](null, i); - - function click_handler() { - return /*click_handler*/ ctx[15](/*i*/ ctx[28]); - } - - const block = { - c: function create() { - button = element("button"); - span = element("span"); - t0 = text(t0_value); - t1 = space(); - add_location(span, file, 136, 20, 4826); - button.value = /*i*/ ctx[28]; - add_location(button, file, 135, 16, 4715); - }, - m: function mount(target, anchor) { - insert_dev(target, button, anchor); - append_dev(button, span); - append_dev(span, t0); - append_dev(button, t1); - assign_button(); - - if (!mounted) { - dispose = listen_dev(button, "click", click_handler, false, false, false); - mounted = true; - } - }, - p: function update(new_ctx, dirty) { - ctx = new_ctx; - if (dirty & /*options*/ 4 && t0_value !== (t0_value = /*option*/ ctx[26] + "")) set_data_dev(t0, t0_value); - - if (i !== /*i*/ ctx[28]) { - unassign_button(); - i = /*i*/ ctx[28]; - assign_button(); - } - }, - d: function destroy(detaching) { - if (detaching) detach_dev(button); - unassign_button(); - mounted = false; - dispose(); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_each_block.name, - type: "each", - source: "(135:12) {#each options as option, i}", - ctx - }); - - return block; -} - -// (127:4) {#key key} -function create_key_block(ctx) { - let button; - let div0; - let span; - let t0_value = (/*value*/ ctx[0] != null ? /*value*/ ctx[0] : "") + ""; - let t0; - let t1; - let img; - let img_src_value; - let t2; - let div1; - let mounted; - let dispose; - let each_value = /*options*/ ctx[2]; - 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() { - button = element("button"); - div0 = element("div"); - span = element("span"); - t0 = text(t0_value); - t1 = space(); - img = element("img"); - t2 = space(); - div1 = element("div"); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].c(); - } - - attr_dev(span, "id", "current-options-span"); - add_location(span, file, 129, 16, 4359); - attr_dev(div0, "id", "current-options-div"); - add_location(div0, file, 128, 12, 4311); - attr_dev(img, "id", "arrow-down"); - if (!src_url_equal(img.src, img_src_value = "../assets/arrow_down.svg")) attr_dev(img, "src", img_src_value); - attr_dev(img, "alt", "arrow down"); - add_location(img, file, 131, 12, 4484); - attr_dev(button, "id", "current-option-button"); - add_location(button, file, 127, 8, 4202); - attr_dev(div1, "id", "options-holder"); - set_style(div1, "display", "none"); - add_location(div1, file, 133, 8, 4582); - }, - m: function mount(target, anchor) { - insert_dev(target, button, anchor); - append_dev(button, div0); - append_dev(div0, span); - append_dev(span, t0); - /*span_binding*/ ctx[12](span); - append_dev(button, t1); - append_dev(button, img); - /*button_binding*/ ctx[13](button); - insert_dev(target, t2, anchor); - insert_dev(target, div1, anchor); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].m(div1, null); - } - - /*div1_binding*/ ctx[16](div1); - - if (!mounted) { - dispose = listen_dev(button, "click", /*changeVisibility*/ ctx[9], false, false, false); - mounted = true; - } - }, - p: function update(ctx, dirty) { - if (dirty & /*value*/ 1 && t0_value !== (t0_value = (/*value*/ ctx[0] != null ? /*value*/ ctx[0] : "") + "")) set_data_dev(t0, t0_value); - - if (dirty & /*optionButtons, changeOption, callback, options*/ 1062) { - each_value = /*options*/ ctx[2]; - 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(div1, null); - } - } - - for (; i < each_blocks.length; i += 1) { - each_blocks[i].d(1); - } - - each_blocks.length = each_value.length; - } - }, - d: function destroy(detaching) { - if (detaching) detach_dev(button); - /*span_binding*/ ctx[12](null); - /*button_binding*/ ctx[13](null); - if (detaching) detach_dev(t2); - if (detaching) detach_dev(div1); - destroy_each(each_blocks, detaching); - /*div1_binding*/ ctx[16](null); - mounted = false; - dispose(); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_key_block.name, - type: "key", - source: "(127:4) {#key key}", - ctx - }); - - return block; -} - -function create_fragment(ctx) { - let div; - let previous_key = /*key*/ ctx[8]; - let key_block = create_key_block(ctx); - - const block = { - c: function create() { - div = element("div"); - key_block.c(); - this.c = noop; - attr_dev(div, "class", "select"); - add_location(div, file, 125, 0, 4137); - }, - 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); - key_block.m(div, null); - /*div_binding*/ ctx[17](div); - }, - p: function update(ctx, [dirty]) { - if (dirty & /*key*/ 256 && safe_not_equal(previous_key, previous_key = /*key*/ ctx[8])) { - key_block.d(1); - key_block = create_key_block(ctx); - key_block.c(); - key_block.m(div, null); - } else { - key_block.p(ctx, dirty); - } - }, - i: noop, - o: noop, - d: function destroy(detaching) { - if (detaching) detach_dev(div); - key_block.d(detaching); - /*div_binding*/ ctx[17](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('select-component', slots, []); - let { callback = null } = $$props; - let { options = [""] } = $$props; - let { value = null } = $$props; - let { valueindex = null } = $$props; - - // Main code - let root = arguments[0]; - - let select; - let optionsHolder; - let optionButtons = []; - let currentOption; - let currentOptionButton; - let init = false; - let key = 0; - let obs = null; - - function setKeyValue(value, options) { - if (value !== null) { - if (options.includes(value)) { - let index = options.findIndex(element => element == value); - $$invalidate(6, currentOption.innerHTML = value, currentOption); - $$invalidate(5, optionButtons[index].style.display = "none", optionButtons); - $$invalidate(11, valueindex = index); - } - - $$invalidate(8, key += 1); - } - } - - function setKeyIndex(valueindex, options) { - if (valueindex != null && options != undefined && options[valueindex] != value) { - $$invalidate(0, value = options[valueindex]); - $$invalidate(8, key += 1); - } - } - - function indexToValue(index) { - $$invalidate(0, value = options[index]); - } - - function changeVisibility() { - if (optionsHolder.style.display == "none") { - $$invalidate(4, optionsHolder.style.display = "initial", optionsHolder); - } else { - $$invalidate(4, optionsHolder.style.display = "none", optionsHolder); - } - } - - function changeOption(index, callback) { - $$invalidate(11, valueindex = index); - $$invalidate(0, value = options[index]); - - if (callback != undefined && callback != null) { - callback(index); - } - } - - function hideSelect() { - $$invalidate(4, optionsHolder.style.display = "none", optionsHolder); - } - - function changeOptionsWidth(select, optionsHolder) { - let selectWidth; - - if (select != undefined && optionsHolder != undefined) { - let selectWidthText = getComputedStyle(select).getPropertyValue('--width'); - - if (isNaN(selectWidthText) || selectWidthText == "") { - if (obs == null) { - obs = new ResizeObserver(() => changeOptionsWidth(select, optionsHolder)); - obs.observe(currentOptionButton); - return; - } else { - selectWidthText = getComputedStyle(currentOptionButton).getPropertyValue('width'); - selectWidth = px2rem(parseFloat(selectWidthText.slice(0, selectWidthText.length - 2))); - } - } else { - selectWidth = parseFloat(selectWidthText.slice(0, selectWidthText.length - 2)); - } - - let spanWidths = []; - - for (let i = 0; i < optionsHolder.children.length; i++) { - let span = optionsHolder.children[i].children[0]; - let spanWidth = getTextWidth(span.innerHTML, getCanvasFont(span)); - spanWidths.push(spanWidth); - } - - let maxOptionsWidth = px2rem(Math.max(...spanWidths)); - - if (maxOptionsWidth > selectWidth) { - let width = 1.1 * maxOptionsWidth + "rem"; - optionsHolder.style.width = width; - - for (let i = 0; i < optionsHolder.children.length; i++) { - let button = optionsHolder.children[i]; - button.style.width = width; - } - - optionsHolder.style.marginLeft = -(1.1 * maxOptionsWidth - selectWidth) / 2 - 0.05 + "rem"; - } else { - let width = selectWidth + 0.1 + "rem"; - - for (let i = 0; i < optionsHolder.children.length; i++) { - let button = optionsHolder.children[i]; - button.style.width = width; - } - } - } - } - - onMount(() => { - init = true; - root.addEventListener('focusout', hideSelect); - }); - - const writable_props = ['callback', 'options', 'value', 'valueindex']; - - Object.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(` was created with unknown prop '${key}'`); - }); - - function span_binding($$value) { - binding_callbacks[$$value ? 'unshift' : 'push'](() => { - currentOption = $$value; - $$invalidate(6, currentOption); - }); - } - - function button_binding($$value) { - binding_callbacks[$$value ? 'unshift' : 'push'](() => { - currentOptionButton = $$value; - $$invalidate(7, currentOptionButton); - }); - } - - function button_binding_1($$value, i) { - binding_callbacks[$$value ? 'unshift' : 'push'](() => { - optionButtons[i] = $$value; - $$invalidate(5, optionButtons); - }); - } - - const click_handler = i => changeOption(i, callback); - - function div1_binding($$value) { - binding_callbacks[$$value ? 'unshift' : 'push'](() => { - optionsHolder = $$value; - $$invalidate(4, optionsHolder); - }); - } - - function div_binding($$value) { - binding_callbacks[$$value ? 'unshift' : 'push'](() => { - select = $$value; - $$invalidate(3, select); - }); - } - - $$self.$$set = $$props => { - if ('callback' in $$props) $$invalidate(1, callback = $$props.callback); - if ('options' in $$props) $$invalidate(2, options = $$props.options); - if ('value' in $$props) $$invalidate(0, value = $$props.value); - if ('valueindex' in $$props) $$invalidate(11, valueindex = $$props.valueindex); - }; - - $$self.$capture_state = () => ({ - onMount, - px2rem, - getTextWidth, - getCanvasFont, - callback, - options, - value, - valueindex, - root, - select, - optionsHolder, - optionButtons, - currentOption, - currentOptionButton, - init, - key, - obs, - setKeyValue, - setKeyIndex, - indexToValue, - changeVisibility, - changeOption, - hideSelect, - changeOptionsWidth - }); - - $$self.$inject_state = $$props => { - if ('callback' in $$props) $$invalidate(1, callback = $$props.callback); - if ('options' in $$props) $$invalidate(2, options = $$props.options); - if ('value' in $$props) $$invalidate(0, value = $$props.value); - if ('valueindex' in $$props) $$invalidate(11, valueindex = $$props.valueindex); - if ('root' in $$props) root = $$props.root; - if ('select' in $$props) $$invalidate(3, select = $$props.select); - if ('optionsHolder' in $$props) $$invalidate(4, optionsHolder = $$props.optionsHolder); - if ('optionButtons' in $$props) $$invalidate(5, optionButtons = $$props.optionButtons); - if ('currentOption' in $$props) $$invalidate(6, currentOption = $$props.currentOption); - if ('currentOptionButton' in $$props) $$invalidate(7, currentOptionButton = $$props.currentOptionButton); - if ('init' in $$props) init = $$props.init; - if ('key' in $$props) $$invalidate(8, key = $$props.key); - if ('obs' in $$props) obs = $$props.obs; - }; - - if ($$props && "$$inject" in $$props) { - $$self.$inject_state($$props.$$inject); - } - - $$self.$$.update = () => { - if ($$self.$$.dirty & /*value, options*/ 5) { - setKeyValue(value, options); - } - - if ($$self.$$.dirty & /*valueindex, options*/ 2052) { - setKeyIndex(valueindex, options); - } - - if ($$self.$$.dirty & /*select, optionsHolder*/ 24) { - changeOptionsWidth(select, optionsHolder); - } - }; - - return [ - value, - callback, - options, - select, - optionsHolder, - optionButtons, - currentOption, - currentOptionButton, - key, - changeVisibility, - changeOption, - valueindex, - span_binding, - button_binding, - button_binding_1, - click_handler, - div1_binding, - div_binding - ]; -} - -class Select_component extends SvelteElement { - constructor(options) { - super(); - this.shadowRoot.innerHTML = ``; - - init( - this, - { - target: this.shadowRoot, - props: attribute_to_object(this.attributes), - customElement: true - }, - instance, - create_fragment, - safe_not_equal, - { - callback: 1, - options: 2, - value: 0, - valueindex: 11 - }, - 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", "options", "value", "valueindex"]; - } - - get callback() { - return this.$$.ctx[1]; - } - - set callback(callback) { - this.$$set({ callback }); - flush(); - } - - get options() { - return this.$$.ctx[2]; - } - - set options(options) { - this.$$set({ options }); - flush(); - } - - get value() { - return this.$$.ctx[0]; - } - - set value(value) { - this.$$set({ value }); - flush(); - } - - get valueindex() { - return this.$$.ctx[11]; - } - - set valueindex(valueindex) { - this.$$set({ valueindex }); - flush(); - } -} - -customElements.define("select-component", Select_component); - -export { Select_component as default }; +import{S as t,i as e,a as r,b as i,u as o,s as n,f as l,n as s,h as a,d,o as u,t as c,g as h,j as p,v as f,l as m,q as v,m as b,p as g,w}from"./index-4348483d.js";import{px2rem as y,getTextWidth as x,getCanvasFont as $}from"../../../../../../../../../js/libraries/miscTools.js";function k(t,e,r){const i=t.slice();return i[26]=e[r],i[27]=e,i[28]=r,i}function z(t){let e,r,o,n,s,a,u=t[26]+"",p=t[28];const f=()=>t[14](e,p),g=()=>t[14](null,p);function w(){return t[15](t[28])}return{c(){e=l("button"),r=l("span"),o=c(u),n=h(),e.value=t[28]},m(t,l){i(t,e,l),m(e,r),m(r,o),m(e,n),f(),s||(a=v(e,"click",w),s=!0)},p(e,r){t=e,4&r&&u!==(u=t[26]+"")&&b(o,u),p!==t[28]&&(g(),p=t[28],f())},d(t){t&&d(e),g(),s=!1,a()}}}function L(t){let e,r,o,n,s,u,w,y,x,$,L,j=(null!=t[0]?t[0]:"")+"",M=t[2],T=[];for(let e=0;ee==t));r(6,n.innerHTML=t,n),r(5,p[i].style.display="none",p),r(11,c=i)}r(8,f+=1)}}function b(t,e){null!=t&&null!=e&&e[t]!=d&&(r(0,d=e[t]),r(8,f+=1))}function g(){"none"==o.style.display?r(4,o.style.display="initial",o):r(4,o.style.display="none",o)}function k(t,e){r(11,c=t),r(0,d=a[t]),null!=e&&null!=e&&e(t)}function z(){r(4,o.style.display="none",o)}function L(t,e){let r;if(null!=t&&null!=e){let i=getComputedStyle(t).getPropertyValue("--width");if(isNaN(i)||""==i){if(null==m)return m=new ResizeObserver((()=>L(t,e))),void m.observe(l);i=getComputedStyle(l).getPropertyValue("width"),r=y(parseFloat(i.slice(0,i.length-2)))}else r=parseFloat(i.slice(0,i.length-2));let o=[];for(let t=0;tr){let t=1.1*n+"rem";e.style.width=t;for(let r=0;r{n=t,r(6,n)}))}function M(t){w[t?"unshift":"push"]((()=>{l=t,r(7,l)}))}function T(t,e){w[t?"unshift":"push"]((()=>{p[e]=t,r(5,p)}))}u((()=>{h.addEventListener("focusout",z)}));const E=t=>k(t,s);function H(t){w[t?"unshift":"push"]((()=>{o=t,r(4,o)}))}function R(t){w[t?"unshift":"push"]((()=>{i=t,r(3,i)}))}return t.$$set=t=>{"callback"in t&&r(1,s=t.callback),"options"in t&&r(2,a=t.options),"value"in t&&r(0,d=t.value),"valueindex"in t&&r(11,c=t.valueindex)},t.$$.update=()=>{5&t.$$.dirty&&v(d,a),2052&t.$$.dirty&&b(c,a),24&t.$$.dirty&&L(i,o)},[d,s,a,i,o,p,n,l,f,g,k,c,j,M,T,E,H,R]}class T extends t{constructor(t){super(),this.shadowRoot.innerHTML="",e(this,{target:this.shadowRoot,props:r(this.attributes),customElement:!0},M,j,n,{callback:1,options:2,value:0,valueindex:11},null),t&&(t.target&&i(t.target,this,t.anchor),t.props&&(this.$set(t.props),o()))}static get observedAttributes(){return["callback","options","value","valueindex"]}get callback(){return this.$$.ctx[1]}set callback(t){this.$$set({callback:t}),o()}get options(){return this.$$.ctx[2]}set options(t){this.$$set({options:t}),o()}get value(){return this.$$.ctx[0]}set value(t){this.$$set({value:t}),o()}get valueindex(){return this.$$.ctx[11]}set valueindex(t){this.$$set({valueindex:t}),o()}}customElements.define("select-component",T);export{T as default}; diff --git a/Server/public/js/components/switch-component.js b/Server/public/js/components/switch-component.js index 604223b..bd960dc 100644 --- a/Server/public/js/components/switch-component.js +++ b/Server/public/js/components/switch-component.js @@ -1,209 +1 @@ - -(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, B as flush, s as safe_not_equal, d as dispatch_dev, v as validate_slots, o as onMount, k as element, l as space, n as noop, p as attr_dev, m as add_location, u as append_dev, y as listen_dev, j as detach_dev, z as run_all } from './index-42a25c61.js'; -import { px2rem, getTextWidth, getCanvasFont } from '../../../../../../../../../js/libraries/miscTools.js'; - -/* src\components\switch-component.svelte generated by Svelte v3.52.0 */ -const file = "src\\components\\switch-component.svelte"; - -function create_fragment(ctx) { - let label; - let input; - let t; - let span; - let mounted; - let dispose; - - const block = { - c: function create() { - label = element("label"); - input = element("input"); - t = space(); - span = element("span"); - this.c = noop; - attr_dev(input, "type", "checkbox"); - add_location(input, file, 39, 4, 804); - attr_dev(span, "class", "switch-span"); - add_location(span, file, 40, 4, 880); - attr_dev(label, "class", "switch"); - add_location(label, file, 38, 0, 776); - }, - l: function claim(nodes) { - throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); - }, - m: function mount(target, anchor) { - insert_dev(target, label, anchor); - append_dev(label, input); - input.checked = /*checked*/ ctx[0]; - append_dev(label, t); - append_dev(label, span); - - if (!mounted) { - dispose = [ - listen_dev(input, "change", /*input_change_handler*/ ctx[4]), - listen_dev(input, "click", /*toggleClick*/ ctx[1], false, false, false) - ]; - - mounted = true; - } - }, - p: function update(ctx, [dirty]) { - if (dirty & /*checked*/ 1) { - input.checked = /*checked*/ ctx[0]; - } - }, - i: noop, - o: noop, - d: function destroy(detaching) { - if (detaching) detach_dev(label); - mounted = false; - run_all(dispose); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_fragment.name, - type: "component", - source: "", - ctx - }); - - return block; -} - -function instance($$self, $$props, $$invalidate) { - let { $$slots: slots = {}, $$scope } = $$props; - validate_slots('switch-component', slots, []); - let { callback = null } = $$props; - let { checked = false } = $$props; - - const toggle = () => { - let f = () => { - if (callback != null) { - $$invalidate(0, checked = !checked); - callback(); - } else { - toggle(); - } - }; - - setTimeout(f, 100); - }; - - function toggleClick() { - if (callback != null) { - $$invalidate(0, checked = !checked); - callback(); - } - } - - // Main code - onMount(() => { - - }); - - const writable_props = ['callback', 'checked']; - - Object.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(` was created with unknown prop '${key}'`); - }); - - function input_change_handler() { - checked = this.checked; - $$invalidate(0, checked); - } - - $$self.$$set = $$props => { - if ('callback' in $$props) $$invalidate(2, callback = $$props.callback); - if ('checked' in $$props) $$invalidate(0, checked = $$props.checked); - }; - - $$self.$capture_state = () => ({ - onMount, - px2rem, - getTextWidth, - getCanvasFont, - callback, - checked, - toggle, - toggleClick - }); - - $$self.$inject_state = $$props => { - if ('callback' in $$props) $$invalidate(2, callback = $$props.callback); - if ('checked' in $$props) $$invalidate(0, checked = $$props.checked); - }; - - if ($$props && "$$inject" in $$props) { - $$self.$inject_state($$props.$$inject); - } - - return [checked, toggleClick, callback, toggle, input_change_handler]; -} - -class Switch_component extends SvelteElement { - constructor(options) { - super(); - this.shadowRoot.innerHTML = ``; - - init( - this, - { - target: this.shadowRoot, - props: attribute_to_object(this.attributes), - customElement: true - }, - instance, - create_fragment, - safe_not_equal, - { callback: 2, checked: 0, toggle: 3 }, - null - ); - - if (options) { - if (options.target) { - insert_dev(options.target, this, options.anchor); - } - - if (options.props) { - this.$set(options.props); - flush(); - } - } - } - - static get observedAttributes() { - return ["callback", "checked", "toggle"]; - } - - get callback() { - return this.$$.ctx[2]; - } - - set callback(callback) { - this.$$set({ callback }); - flush(); - } - - get checked() { - return this.$$.ctx[0]; - } - - set checked(checked) { - this.$$set({ checked }); - flush(); - } - - get toggle() { - return this.$$.ctx[3]; - } - - set toggle(value) { - throw new Error(": Cannot set read-only property 'toggle'"); - } -} - -customElements.define("switch-component", Switch_component); - -export { Switch_component as default }; +import{S as t,i as e,a as s,b as c,u as i,s as a,f as r,g as o,n as h,h as n,l,q as d,d as u,r as p,o as b}from"./index-4348483d.js";import"../../../../../../../../../js/libraries/miscTools.js";function k(t){let e,s,i,a,b,k;return{c(){e=r("label"),s=r("input"),i=o(),a=r("span"),this.c=h,n(s,"type","checkbox"),n(a,"class","switch-span"),n(e,"class","switch")},m(r,o){c(r,e,o),l(e,s),s.checked=t[0],l(e,i),l(e,a),b||(k=[d(s,"change",t[4]),d(s,"click",t[1])],b=!0)},p(t,[e]){1&e&&(s.checked=t[0])},i:h,o:h,d(t){t&&u(e),b=!1,p(k)}}}function g(t,e,s){let{callback:c=null}=e,{checked:i=!1}=e;const a=()=>{setTimeout((()=>{null!=c?(s(0,i=!i),c()):a()}),100)};return b((()=>{})),t.$$set=t=>{"callback"in t&&s(2,c=t.callback),"checked"in t&&s(0,i=t.checked)},[i,function(){null!=c&&(s(0,i=!i),c())},c,a,function(){i=this.checked,s(0,i)}]}class m extends t{constructor(t){super(),this.shadowRoot.innerHTML="",e(this,{target:this.shadowRoot,props:s(this.attributes),customElement:!0},g,k,a,{callback:2,checked:0,toggle:3},null),t&&(t.target&&c(t.target,this,t.anchor),t.props&&(this.$set(t.props),i()))}static get observedAttributes(){return["callback","checked","toggle"]}get callback(){return this.$$.ctx[2]}set callback(t){this.$$set({callback:t}),i()}get checked(){return this.$$.ctx[0]}set checked(t){this.$$set({checked:t}),i()}get toggle(){return this.$$.ctx[3]}}customElements.define("switch-component",m);export{m as default}; diff --git a/Server/public/locales/en/communities-component.json b/Server/public/locales/en/communities-component.json index e9e56c5..c32c2a1 100644 --- a/Server/public/locales/en/communities-component.json +++ b/Server/public/locales/en/communities-component.json @@ -9,5 +9,7 @@ "contact": "Contact", "EstoniaKohtlaJarve": "Estonia, Kohtla-Järve", "forming": "forming", - "WhatsAppInviteLink": "WhatsApp invite link" + "WhatsAppInviteLink": "WhatsApp invite link", + "DiscordInviteLink": "Discord invite link", + "CanadaMontreal": "Canada, Montreal" } \ No newline at end of file diff --git a/Server/public/locales/ru/communities-component.json b/Server/public/locales/ru/communities-component.json index 846691e..d0883f1 100644 --- a/Server/public/locales/ru/communities-component.json +++ b/Server/public/locales/ru/communities-component.json @@ -9,5 +9,7 @@ "contact": "Контакт", "EstoniaKohtlaJarve": "Эстония, Кохтла-Ярве", "forming": "формируется", - "WhatsAppInviteLink": "WhatsApp ссылка" + "WhatsAppInviteLink": "WhatsApp ссылка", + "DiscordInviteLink": "Discord ссылка", + "CanadaMontreal": "Канада, Монреаль" } \ No newline at end of file