Added a confirmation text
This commit is contained in:
parent
35b5865c25
commit
ce86b318fd
|
@ -56,6 +56,7 @@ export function sendText(route,data,callback) {
|
||||||
callback(xhr.responseText)
|
callback(xhr.responseText)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
callback(false)
|
||||||
// Oh no! There has been an error with the request!
|
// Oh no! There has been an error with the request!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
let loaded = writable(0)
|
let loaded = writable(0)
|
||||||
let content = writable({})
|
let content = writable({})
|
||||||
|
|
||||||
|
let confirmationMsg
|
||||||
let addressInput
|
let addressInput
|
||||||
let contactInput
|
let contactInput
|
||||||
let addressVec
|
let addressVec
|
||||||
|
@ -88,11 +89,24 @@
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function updateConfirmationMsg(response) {
|
||||||
|
if (response!==false) {
|
||||||
|
|
||||||
|
confirmationMsg.innerHTML = "You have been added to our database! Now go to our Discord to verify yourself."
|
||||||
|
confirmationMsg.style.color = "green"
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
confirmationMsg.innerHTML = "Something went wrong."
|
||||||
|
confirmationMsg.style.color = "red"
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
function submitLocation() {
|
function submitLocation() {
|
||||||
if (addressVec!=undefined) {
|
if (addressVec!=undefined) {
|
||||||
let data = [...addressVec,userPinLat,userPinLng,contactInput.value]
|
let data = [...addressVec,userPinLat,userPinLng,contactInput.value]
|
||||||
let url = "/" + locale + "/groups-add-post/"
|
let url = "/" + locale + "/groups-add-post/"
|
||||||
sendText(url,JSON.stringify(data))
|
sendText(url,JSON.stringify(data),updateConfirmationMsg)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -119,6 +133,7 @@
|
||||||
<label for="address-input">Location: </label><input bind:this={addressInput} id="address-input" type="text" readonly><br>
|
<label for="address-input">Location: </label><input bind:this={addressInput} id="address-input" type="text" readonly><br>
|
||||||
<label for="contact-input">Contact: </label><input bind:this={contactInput} id="contact-input" type="text">
|
<label for="contact-input">Contact: </label><input bind:this={contactInput} id="contact-input" type="text">
|
||||||
<button id="submit-button" on:click={submitLocation}>Submit</button>
|
<button id="submit-button" on:click={submitLocation}>Submit</button>
|
||||||
|
<p id="confirmation-msg" bind:this={confirmationMsg}></p>
|
||||||
<map-component id="map" callback={(createMap) => mapCallbackGroups(createMap,$content,locale)}></map-component>
|
<map-component id="map" callback={(createMap) => mapCallbackGroups(createMap,$content,locale)}></map-component>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -128,6 +143,11 @@
|
||||||
<style>
|
<style>
|
||||||
@import '/css/common.css';
|
@import '/css/common.css';
|
||||||
|
|
||||||
|
#confirmation-msg {
|
||||||
|
margin-top: 0.5rem;
|
||||||
|
margin-bottom: 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
ol li {
|
ol li {
|
||||||
margin-left: 3rem;
|
margin-left: 3rem;
|
||||||
margin-bottom: 0.5rem;
|
margin-bottom: 0.5rem;
|
||||||
|
@ -164,8 +184,8 @@
|
||||||
|
|
||||||
#submit-button {
|
#submit-button {
|
||||||
display: block;
|
display: block;
|
||||||
|
margin: auto;
|
||||||
margin-top: 2rem;
|
margin-top: 2rem;
|
||||||
margin-bottom: 2rem;
|
|
||||||
padding: 1rem 2rem;
|
padding: 1rem 2rem;
|
||||||
font-size: 1.4rem;
|
font-size: 1.4rem;
|
||||||
font-family: var(--sans-serif,sans-serif);
|
font-family: var(--sans-serif,sans-serif);
|
||||||
|
@ -215,6 +235,7 @@
|
||||||
#map {
|
#map {
|
||||||
--height: 30rem;
|
--height: 30rem;
|
||||||
--width: 100%;
|
--width: 100%;
|
||||||
|
--margin-top: 2rem;
|
||||||
--margin-bottom: 0.5rem;
|
--margin-bottom: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,99 +1 @@
|
||||||
|
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="<div><p>We use cookies to improve your experience, personalise your content and analyse site usage. By clicking “OK”, you agree to the use of cookies.</p></div>",this.c=r,n(s,"id","wrapper")},m(e,t){o(e,s,t)},p:r,i:r,o:r,d(e){e&&c(s)}}}function u(e){return d((()=>{})),[]}class h extends e{constructor(e){super(),this.shadowRoot.innerHTML="<style>@import '/css/common.css';#wrapper{display:none;position:relative;height:5rem;width:100%;background:white;box-shadow:0 0 0.314rem rgb(187, 187, 187);;}</style>",s(this,{target:this.shadowRoot,props:t(this.attributes),customElement:!0},u,p,i,{},null),e&&e.target&&o(e.target,this,e.anchor)}}customElements.define("cookies-dialog",h);export{h as default};
|
||||||
(function(l, r) { if (!l || l.getElementById('livereloadscript')) return; r = l.createElement('script'); r.async = 1; r.src = '//' + (self.location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1'; r.id = 'livereloadscript'; l.getElementsByTagName('head')[0].appendChild(r) })(self.document);
|
|
||||||
import { S as SvelteElement, i as init, a as attribute_to_object, b as insert_dev, s as safe_not_equal, d as dispatch_dev, 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, h as detach_dev } from './index-d19aafba.js';
|
|
||||||
|
|
||||||
/* src\components\cookies-dialog.svelte generated by Svelte v3.52.0 */
|
|
||||||
const file = "src\\components\\cookies-dialog.svelte";
|
|
||||||
|
|
||||||
function create_fragment(ctx) {
|
|
||||||
let div1;
|
|
||||||
let div0;
|
|
||||||
let p;
|
|
||||||
|
|
||||||
const block = {
|
|
||||||
c: function create() {
|
|
||||||
div1 = element("div");
|
|
||||||
div0 = element("div");
|
|
||||||
p = element("p");
|
|
||||||
p.textContent = "We use cookies to improve your experience, personalise your content and analyse site usage. By clicking “OK”, you agree to the use of cookies.";
|
|
||||||
this.c = noop;
|
|
||||||
add_location(p, file, 19, 8, 248);
|
|
||||||
add_location(div0, file, 18, 4, 233);
|
|
||||||
attr_dev(div1, "id", "wrapper");
|
|
||||||
add_location(div1, file, 17, 0, 209);
|
|
||||||
},
|
|
||||||
l: function claim(nodes) {
|
|
||||||
throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
|
|
||||||
},
|
|
||||||
m: function mount(target, anchor) {
|
|
||||||
insert_dev(target, div1, anchor);
|
|
||||||
append_dev(div1, div0);
|
|
||||||
append_dev(div0, p);
|
|
||||||
},
|
|
||||||
p: noop,
|
|
||||||
i: noop,
|
|
||||||
o: noop,
|
|
||||||
d: function destroy(detaching) {
|
|
||||||
if (detaching) detach_dev(div1);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
dispatch_dev("SvelteRegisterBlock", {
|
|
||||||
block,
|
|
||||||
id: create_fragment.name,
|
|
||||||
type: "component",
|
|
||||||
source: "",
|
|
||||||
ctx
|
|
||||||
});
|
|
||||||
|
|
||||||
return block;
|
|
||||||
}
|
|
||||||
|
|
||||||
function instance($$self, $$props, $$invalidate) {
|
|
||||||
let { $$slots: slots = {}, $$scope } = $$props;
|
|
||||||
validate_slots('cookies-dialog', slots, []);
|
|
||||||
|
|
||||||
onMount(() => {
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
const writable_props = [];
|
|
||||||
|
|
||||||
Object.keys($$props).forEach(key => {
|
|
||||||
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<cookies-dialog> was created with unknown prop '${key}'`);
|
|
||||||
});
|
|
||||||
|
|
||||||
$$self.$capture_state = () => ({ onMount });
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
|
|
||||||
class Cookies_dialog extends SvelteElement {
|
|
||||||
constructor(options) {
|
|
||||||
super();
|
|
||||||
this.shadowRoot.innerHTML = `<style>@import '/css/common.css';#wrapper{display:none;position:relative;height:5rem;width:100%;background:white;box-shadow:0 0 0.314rem rgb(187, 187, 187);;}</style>`;
|
|
||||||
|
|
||||||
init(
|
|
||||||
this,
|
|
||||||
{
|
|
||||||
target: this.shadowRoot,
|
|
||||||
props: attribute_to_object(this.attributes),
|
|
||||||
customElement: true
|
|
||||||
},
|
|
||||||
instance,
|
|
||||||
create_fragment,
|
|
||||||
safe_not_equal,
|
|
||||||
{},
|
|
||||||
null
|
|
||||||
);
|
|
||||||
|
|
||||||
if (options) {
|
|
||||||
if (options.target) {
|
|
||||||
insert_dev(options.target, this, options.anchor);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
customElements.define("cookies-dialog", Cookies_dialog);
|
|
||||||
|
|
||||||
export { Cookies_dialog as default };
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,347 +1 @@
|
||||||
|
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 d,h as l,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,k,y,x,L,j,z,U,_,C,T,B,H,M,R=t[1].contactUs+"",A=t[1].inviteLink+"",D=t[1].inviteLink+"";return{c(){e=c("footer"),o=c("div"),a=c("div"),i=c("div"),n=c("h2"),m=f(R),b=d(),w=c("p"),v=f("Discord: "),k=c("a"),y=f(A),x=d(),L=c("p"),j=f("WhatsApp: "),z=c("a"),U=f(D),_=d(),C=c("button"),C.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="42.545" height="72.601" viewBox="0 0 42.545 72.601"><g id="Group_268" data-name="Group 268" transform="translate(-6.177 -2.399)"><rect id="Rectangle_146" data-name="Rectangle 146" width="11" height="51" rx="5.5" transform="translate(22 24)" fill="#cb1816"></rect><path id="Path_1145" data-name="Path 1145" d="M23.814,4.021a5,5,0,0,1,7.372,0l16.134,17.6c2.94,3.207,1.046,10.4-3.686,8.379S28.02,14.081,28.391,13.524,16.544,27.976,11.366,30,4.741,24.828,7.68,21.621Z" fill="#DD1C1A"></path></g></svg>',T=d(),B=c("p"),B.innerHTML='Licensed under a Creative Commons <a href="https://creativecommons.org/licenses/by/4.0/legalcode " target="_blank" rel="noreferrer">CC BY 4.0 license</a>',l(k,"href","https://discord.gg/Qk8KUk787z"),l(k,"target","_blank"),l(k,"rel","noreferrer"),g(k,"margin-left","1.8rem"),l(z,"href","https://chat.whatsapp.com/BhnmUNljUxJ2AjeHUwyTKh"),l(z,"target","_blank"),l(z,"rel","noreferrer"),g(z,"margin-left","0.5rem"),l(i,"id","contact-us-container"),l(a,"id","footer-grid-content-container"),l(a,"class","logged"),l(C,"id","footer-up"),l(C,"aria-label","go up"),l(B,"id","footer-copyright"),l(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,k),h(k,y),h(i,x),h(i,L),h(L,j),h(L,z),h(z,U),h(o,_),h(o,C),h(o,T),h(o,B),H||(M=p(C,"click",t[4]),H=!0)},p(t,e){2&e&&R!==(R=t[1].contactUs+"")&&u(m,R),2&e&&A!==(A=t[1].inviteLink+"")&&u(y,A),2&e&&D!==(D=t[1].inviteLink+"")&&u(U,D)},d(t){t&&s(e),H=!1,M()}}}function k(t){let e,o=2==t[0]&&v(t);return{c(){o&&o.c(),e=i()},m(t,a){o&&o.m(t,a),r(t,e,a)},p(t,r){2==t[0]?o?o.p(t,r):(o=v(t),o.c(),o.m(e.parentNode,e)):o&&(o.d(1),o=null)},d(t){o&&o.d(t),t&&s(e)}}}function y(t){let e,o=t[0],m=k(t);return{c(){m.c(),e=i(),this.c=n},m(t,o){m.m(t,o),r(t,e,o)},p(t,[r]){1&r&&a(o,o=t[0])?(m.d(1),m=k(t),m.c(),m.m(e.parentNode,e)):m.p(t,r)},i:n,o:n,d(t){t&&s(e),m.d(t)}}}function x(t,e,o){let r,a,i=b(0);m(t,i,(t=>o(0,r=t)));let n=b({});m(t,n,(t=>o(1,a=t))),w(n,"countries",i),w(n,"footer-component",i);return[r,a,i,n,()=>{location.href="#"}]}class L extends t{constructor(t){super(),this.shadowRoot.innerHTML="<style>@import '/css/common.css';footer{position:relative;bottom:0;width:100%;height:auto;background:#5B6970;border-top:#cb1816 solid 0.5rem}footer p,footer a{font-family:var(--sans-serif)}#footer-content-container{position:relative;margin:auto;padding-top:2rem;max-width:116rem;width:97vw}#footer-grid-content-container{display:grid;margin-left:2rem;margin-right:2rem;margin-bottom:1rem}.logged{grid-template-columns:auto auto 2rem}footer h2{color:#ffffff;font-size:1.3rem;margin-bottom:0.5rem}#footer-copyright{position:relative;margin:auto;width:100%;bottom:0rem;height:3rem;top:0rem;margin-bottom:0;font-size:1rem;text-align:center}#footer-copyright *{font-size:1rem}footer a{font-size:1.1rem;color:#ffffff}footer p{display:block;font-size:1.1rem;color:#d8d8d8;font-family:var(--sans-serif,sans-serif);margin-bottom:0.5rem}#contact-us-container{width:16rem}#footer-up{position:absolute;width:4.8rem;height:4.8rem;border-radius:3.4rem;top:4rem;right:2rem;background:#ffffff}#footer-up svg{width:40%;height:auto}@media only screen and (max-width: 1170px){.logged{grid-template-rows:auto auto auto;grid-template-columns:auto;row-gap:2rem}#footer-copyright{height:1rem;top:-2rem}}</style>",e(this,{target:this.shadowRoot,props:o(this.attributes),customElement:!0},x,y,a,{},null),t&&t.target&&r(t.target,this,t.anchor)}}customElements.define("footer-component",L);export{L as default};
|
||||||
(function(l, r) { if (!l || l.getElementById('livereloadscript')) return; r = l.createElement('script'); r.async = 1; r.src = '//' + (self.location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1'; r.id = 'livereloadscript'; l.getElementsByTagName('head')[0].appendChild(r) })(self.document);
|
|
||||||
import { S as SvelteElement, i as init, a as attribute_to_object, b as insert_dev, s as safe_not_equal, d as dispatch_dev, v as validate_slots, c as validate_store, e as component_subscribe, f as empty, n as noop, h 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-d19aafba.js';
|
|
||||||
import { w as writable } from './index-4664ced0.js';
|
|
||||||
import { loadLocaleContent } from '../../../../../../../../../js/libraries/serverTools.js';
|
|
||||||
|
|
||||||
/* src\footer\footer-component.svelte generated by Svelte v3.52.0 */
|
|
||||||
const file = "src\\footer\\footer-component.svelte";
|
|
||||||
|
|
||||||
// (21:4) {#if $loaded==2}
|
|
||||||
function create_if_block(ctx) {
|
|
||||||
let footer;
|
|
||||||
let div2;
|
|
||||||
let div1;
|
|
||||||
let div0;
|
|
||||||
let h2;
|
|
||||||
let t0_value = /*$content*/ ctx[1].contactUs + "";
|
|
||||||
let t0;
|
|
||||||
let t1;
|
|
||||||
let p0;
|
|
||||||
let t2;
|
|
||||||
let a0;
|
|
||||||
let t3_value = /*$content*/ ctx[1].inviteLink + "";
|
|
||||||
let t3;
|
|
||||||
let t4;
|
|
||||||
let p1;
|
|
||||||
let t5;
|
|
||||||
let a1;
|
|
||||||
let t6_value = /*$content*/ ctx[1].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("Discord: ");
|
|
||||||
a0 = element("a");
|
|
||||||
t3 = text(t3_value);
|
|
||||||
t4 = space();
|
|
||||||
p1 = element("p");
|
|
||||||
t5 = text("WhatsApp: ");
|
|
||||||
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, 25, 24, 692);
|
|
||||||
attr_dev(a0, "href", "https://discord.gg/Qk8KUk787z");
|
|
||||||
attr_dev(a0, "target", "_blank");
|
|
||||||
attr_dev(a0, "rel", "noreferrer");
|
|
||||||
set_style(a0, "margin-left", "1.8rem");
|
|
||||||
add_location(a0, file, 27, 36, 858);
|
|
||||||
add_location(p0, file, 27, 24, 846);
|
|
||||||
attr_dev(a1, "href", "https://chat.whatsapp.com/BhnmUNljUxJ2AjeHUwyTKh");
|
|
||||||
attr_dev(a1, "target", "_blank");
|
|
||||||
attr_dev(a1, "rel", "noreferrer");
|
|
||||||
set_style(a1, "margin-left", "0.5rem");
|
|
||||||
add_location(a1, file, 28, 37, 1026);
|
|
||||||
add_location(p1, file, 28, 24, 1013);
|
|
||||||
attr_dev(div0, "id", "contact-us-container");
|
|
||||||
add_location(div0, file, 24, 20, 635);
|
|
||||||
attr_dev(div1, "id", "footer-grid-content-container");
|
|
||||||
attr_dev(div1, "class", "logged");
|
|
||||||
add_location(div1, file, 23, 16, 558);
|
|
||||||
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, 34, 24, 1573);
|
|
||||||
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, 35, 24, 1727);
|
|
||||||
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, 33, 24, 1470);
|
|
||||||
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, 32, 20, 1345);
|
|
||||||
attr_dev(button, "id", "footer-up");
|
|
||||||
attr_dev(button, "aria-label", "go up");
|
|
||||||
add_location(button, file, 31, 16, 1244);
|
|
||||||
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, 39, 75, 2137);
|
|
||||||
attr_dev(p2, "id", "footer-copyright");
|
|
||||||
add_location(p2, file, 39, 16, 2078);
|
|
||||||
attr_dev(div2, "id", "footer-content-container");
|
|
||||||
add_location(div2, file, 22, 12, 505);
|
|
||||||
add_location(footer, file, 21, 8, 483);
|
|
||||||
},
|
|
||||||
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[4], false, false, false);
|
|
||||||
mounted = true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
p: function update(ctx, dirty) {
|
|
||||||
if (dirty & /*$content*/ 2 && t0_value !== (t0_value = /*$content*/ ctx[1].contactUs + "")) set_data_dev(t0, t0_value);
|
|
||||||
if (dirty & /*$content*/ 2 && t3_value !== (t3_value = /*$content*/ ctx[1].inviteLink + "")) set_data_dev(t3, t3_value);
|
|
||||||
if (dirty & /*$content*/ 2 && t6_value !== (t6_value = /*$content*/ ctx[1].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: "(21:4) {#if $loaded==2}",
|
|
||||||
ctx
|
|
||||||
});
|
|
||||||
|
|
||||||
return block;
|
|
||||||
}
|
|
||||||
|
|
||||||
// (20:0) {#key $loaded}
|
|
||||||
function create_key_block(ctx) {
|
|
||||||
let if_block_anchor;
|
|
||||||
let if_block = /*$loaded*/ ctx[0] == 2 && create_if_block(ctx);
|
|
||||||
|
|
||||||
const block = {
|
|
||||||
c: function create() {
|
|
||||||
if (if_block) if_block.c();
|
|
||||||
if_block_anchor = empty();
|
|
||||||
},
|
|
||||||
m: function mount(target, anchor) {
|
|
||||||
if (if_block) if_block.m(target, anchor);
|
|
||||||
insert_dev(target, if_block_anchor, anchor);
|
|
||||||
},
|
|
||||||
p: function update(ctx, dirty) {
|
|
||||||
if (/*$loaded*/ ctx[0] == 2) {
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
d: function destroy(detaching) {
|
|
||||||
if (if_block) if_block.d(detaching);
|
|
||||||
if (detaching) detach_dev(if_block_anchor);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
dispatch_dev("SvelteRegisterBlock", {
|
|
||||||
block,
|
|
||||||
id: create_key_block.name,
|
|
||||||
type: "key",
|
|
||||||
source: "(20:0) {#key $loaded}",
|
|
||||||
ctx
|
|
||||||
});
|
|
||||||
|
|
||||||
return block;
|
|
||||||
}
|
|
||||||
|
|
||||||
function create_fragment(ctx) {
|
|
||||||
let previous_key = /*$loaded*/ ctx[0];
|
|
||||||
let key_block_anchor;
|
|
||||||
let key_block = create_key_block(ctx);
|
|
||||||
|
|
||||||
const block = {
|
|
||||||
c: function create() {
|
|
||||||
key_block.c();
|
|
||||||
key_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) {
|
|
||||||
key_block.m(target, anchor);
|
|
||||||
insert_dev(target, key_block_anchor, anchor);
|
|
||||||
},
|
|
||||||
p: function update(ctx, [dirty]) {
|
|
||||||
if (dirty & /*$loaded*/ 1 && safe_not_equal(previous_key, previous_key = /*$loaded*/ ctx[0])) {
|
|
||||||
key_block.d(1);
|
|
||||||
key_block = create_key_block(ctx);
|
|
||||||
key_block.c();
|
|
||||||
key_block.m(key_block_anchor.parentNode, key_block_anchor);
|
|
||||||
} else {
|
|
||||||
key_block.p(ctx, dirty);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
i: noop,
|
|
||||||
o: noop,
|
|
||||||
d: function destroy(detaching) {
|
|
||||||
if (detaching) detach_dev(key_block_anchor);
|
|
||||||
key_block.d(detaching);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
dispatch_dev("SvelteRegisterBlock", {
|
|
||||||
block,
|
|
||||||
id: create_fragment.name,
|
|
||||||
type: "component",
|
|
||||||
source: "",
|
|
||||||
ctx
|
|
||||||
});
|
|
||||||
|
|
||||||
return block;
|
|
||||||
}
|
|
||||||
|
|
||||||
function instance($$self, $$props, $$invalidate) {
|
|
||||||
let $loaded;
|
|
||||||
let $content;
|
|
||||||
let { $$slots: slots = {}, $$scope } = $$props;
|
|
||||||
validate_slots('footer-component', slots, []);
|
|
||||||
let loaded = writable(0);
|
|
||||||
validate_store(loaded, 'loaded');
|
|
||||||
component_subscribe($$self, loaded, value => $$invalidate(0, $loaded = value));
|
|
||||||
let content = writable({});
|
|
||||||
validate_store(content, 'content');
|
|
||||||
component_subscribe($$self, content, value => $$invalidate(1, $content = value));
|
|
||||||
loadLocaleContent(content, "countries", loaded);
|
|
||||||
loadLocaleContent(content, "footer-component", loaded);
|
|
||||||
const writable_props = [];
|
|
||||||
|
|
||||||
Object.keys($$props).forEach(key => {
|
|
||||||
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<footer-component> was created with unknown prop '${key}'`);
|
|
||||||
});
|
|
||||||
|
|
||||||
const click_handler = () => {
|
|
||||||
location.href = '#';
|
|
||||||
};
|
|
||||||
|
|
||||||
$$self.$capture_state = () => ({
|
|
||||||
writable,
|
|
||||||
loadLocaleContent,
|
|
||||||
loaded,
|
|
||||||
content,
|
|
||||||
$loaded,
|
|
||||||
$content
|
|
||||||
});
|
|
||||||
|
|
||||||
$$self.$inject_state = $$props => {
|
|
||||||
if ('loaded' in $$props) $$invalidate(2, loaded = $$props.loaded);
|
|
||||||
if ('content' in $$props) $$invalidate(3, content = $$props.content);
|
|
||||||
};
|
|
||||||
|
|
||||||
if ($$props && "$$inject" in $$props) {
|
|
||||||
$$self.$inject_state($$props.$$inject);
|
|
||||||
}
|
|
||||||
|
|
||||||
return [$loaded, $content, loaded, content, click_handler];
|
|
||||||
}
|
|
||||||
|
|
||||||
class Footer_component extends SvelteElement {
|
|
||||||
constructor(options) {
|
|
||||||
super();
|
|
||||||
this.shadowRoot.innerHTML = `<style>@import '/css/common.css';footer{position:relative;bottom:0;width:100%;height:auto;background:#5B6970;border-top:#cb1816 solid 0.5rem}footer p,footer a{font-family:var(--sans-serif)}#footer-content-container{position:relative;margin:auto;padding-top:2rem;max-width:116rem;width:97vw}#footer-grid-content-container{display:grid;margin-left:2rem;margin-right:2rem;margin-bottom:1rem}.logged{grid-template-columns:auto auto 2rem}footer h2{color:#ffffff;font-size:1.3rem;margin-bottom:0.5rem}#footer-copyright{position:relative;margin:auto;width:100%;bottom:0rem;height:3rem;top:0rem;margin-bottom:0;font-size:1rem;text-align:center}#footer-copyright *{font-size:1rem}footer a{font-size:1.1rem;color:#ffffff}footer p{display:block;font-size:1.1rem;color:#d8d8d8;font-family:var(--sans-serif,sans-serif);margin-bottom:0.5rem}#contact-us-container{width:16rem}#footer-up{position:absolute;width:4.8rem;height:4.8rem;border-radius:3.4rem;top:4rem;right:2rem;background:#ffffff}#footer-up svg{width:40%;height:auto}@media only screen and (max-width: 1170px){.logged{grid-template-rows:auto auto auto;grid-template-columns:auto;row-gap:2rem}#footer-copyright{height:1rem;top:-2rem}}</style>`;
|
|
||||||
|
|
||||||
init(
|
|
||||||
this,
|
|
||||||
{
|
|
||||||
target: this.shadowRoot,
|
|
||||||
props: attribute_to_object(this.attributes),
|
|
||||||
customElement: true
|
|
||||||
},
|
|
||||||
instance,
|
|
||||||
create_fragment,
|
|
||||||
safe_not_equal,
|
|
||||||
{},
|
|
||||||
null
|
|
||||||
);
|
|
||||||
|
|
||||||
if (options) {
|
|
||||||
if (options.target) {
|
|
||||||
insert_dev(options.target, this, options.anchor);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
customElements.define("footer-component", Footer_component);
|
|
||||||
|
|
||||||
export { Footer_component as default };
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,576 +1 @@
|
||||||
|
import{S as t,i as o,a as n,b as e,s as r,e as i,n as m,d as a,c as s,o as c,f as l,t as p,g,h as u,j as d,k as h,l as f,m as b,p as j}from"./index-4348483d.js";import{w as x}from"./index-71440b21.js";import{addMarkersGroups as v,groupsByCountry as w}from"../../../../../../../../../js/groups.js";import{loadLocaleContent as y}from"../../../../../../../../../js/libraries/serverTools.js";import"../../../../../../../../../js/components/map-component.js";function k(t,o,n){const e=t.slice();return e[9]=o[n][0],e[10]=o[n][1],e}function z(t,o,n){const e=t.slice();return e[13]=o[n],e}function D(t){let o,n,r,i,m,s,c,x,v,y,z,D,E,O,R,T,A,C,H,L,M=t[0].groups+"",S=t[0].p1+"",_=t[0].subheading1+"",q=t[0]["map-prompt"]+"",B=Object.entries(w),F=[];for(let o=0;o<B.length;o+=1)F[o]=N(k(t,B,o));return{c(){o=l("div"),n=l("div"),r=l("h1"),i=p(M),m=g(),s=l("img"),x=g(),v=l("p"),y=p(S),z=g(),D=l("h3"),E=p(_),O=g(),R=l("map-component"),A=g(),C=l("p"),H=p(q),L=g();for(let t=0;t<F.length;t+=1)F[t].c();u(s,"id","groups-img"),d(s.src,c="/img/common/groups.svg")||u(s,"src","/img/common/groups.svg"),u(s,"alt","groups"),u(v,"class","description"),h(R,"id","map"),h(R,"callback",T=t[8]),u(C,"id","add-prompt"),u(n,"id","text-container"),u(o,"id","container")},m(t,a){e(t,o,a),f(o,n),f(n,r),f(r,i),f(n,m),f(n,s),f(n,x),f(n,v),f(v,y),f(n,z),f(n,D),f(D,E),f(n,O),f(n,R),f(n,A),f(n,C),f(C,H),f(n,L);for(let t=0;t<F.length;t+=1)F[t].m(n,null)},p(t,o){if(1&o&&M!==(M=t[0].groups+"")&&b(i,M),1&o&&S!==(S=t[0].p1+"")&&b(y,S),1&o&&_!==(_=t[0].subheading1+"")&&b(E,_),1&o&&T!==(T=t[8])&&h(R,"callback",T),1&o&&q!==(q=t[0]["map-prompt"]+"")&&b(H,q),193&o){let e;for(B=Object.entries(w),e=0;e<B.length;e+=1){const r=k(t,B,e);F[e]?F[e].p(r,o):(F[e]=N(r),F[e].c(),F[e].m(n,null))}for(;e<F.length;e+=1)F[e].d(1);F.length=B.length}},d(t){t&&a(o),j(F,t)}}}function E(t){let o,n,r,i,m,s,c,d,h,j,x,v,w,y,k,z,D,E,N,O=t[0].location+"",R=t[7](t[13])+"",T=t[0].members+"",A=t[13].members+"",C=t[0].contact+"",H=t[0][t[13].contact[1]]+"";return{c(){o=l("div"),n=l("p"),r=l("b"),i=p(O),m=p(": "),s=p(R),c=g(),d=l("p"),h=l("b"),j=p(T),x=p(": "),v=p(A),w=g(),y=l("p"),k=l("b"),z=p(C),D=p(": "),E=l("a"),N=p(H),u(E,"href",t[13].contact[0]),u(E,"target",";_blank;"),u(E,"rel","noreferrer"),u(o,"class","location-info")},m(t,a){e(t,o,a),f(o,n),f(n,r),f(r,i),f(r,m),f(n,s),f(o,c),f(o,d),f(d,h),f(h,j),f(h,x),f(d,v),f(o,w),f(o,y),f(y,k),f(k,z),f(k,D),f(y,E),f(E,N)},p(t,o){1&o&&O!==(O=t[0].location+"")&&b(i,O),1&o&&T!==(T=t[0].members+"")&&b(j,T),1&o&&C!==(C=t[0].contact+"")&&b(z,C),1&o&&H!==(H=t[0][t[13].contact[1]]+"")&&b(N,H)},d(t){t&&a(o)}}}function N(t){let o,n,r,i,m,s=t[6](t[9])+"",c=t[10],d=[];for(let o=0;o<c.length;o+=1)d[o]=E(z(t,c,o));return{c(){o=l("h4"),n=p(s),r=g(),i=l("div");for(let t=0;t<d.length;t+=1)d[t].c();m=g(),u(o,"class","country-name"),u(i,"class","country-block")},m(t,a){e(t,o,a),f(o,n),e(t,r,a),e(t,i,a);for(let t=0;t<d.length;t+=1)d[t].m(i,null);f(i,m)},p(t,o){if(129&o){let n;for(c=t[10],n=0;n<c.length;n+=1){const e=z(t,c,n);d[n]?d[n].p(e,o):(d[n]=E(e),d[n].c(),d[n].m(i,m))}for(;n<d.length;n+=1)d[n].d(1);d.length=c.length}},d(t){t&&a(o),t&&a(r),t&&a(i),j(d,t)}}}function O(t){let o,n=2==t[1]&&D(t);return{c(){n&&n.c(),o=i()},m(t,r){n&&n.m(t,r),e(t,o,r)},p(t,e){2==t[1]?n?n.p(t,e):(n=D(t),n.c(),n.m(o.parentNode,o)):n&&(n.d(1),n=null)},d(t){n&&n.d(t),t&&a(o)}}}function R(t){let o,n=t[1],s=O(t);return{c(){s.c(),o=i(),this.c=m},m(t,n){s.m(t,n),e(t,o,n)},p(t,[e]){2&e&&r(n,n=t[1])?(s.d(1),s=O(t),s.c(),s.m(o.parentNode,o)):s.p(t,e)},i:m,o:m,d(t){t&&a(o),s.d(t)}}}function T(t,o,n){let e,r,i=x(0);s(t,i,(t=>n(1,r=t)));let m=x({});s(t,m,(t=>n(0,e=t)));let a=y(m,"groups-component",i);function l(t,o,n){let e=t([22,0],2);v(e,o,n)}y(m,"countries",i),c((()=>{}));return[e,r,i,m,a,l,function(t){return"en"==a?t:e[t]},function(t){return t.location[0].map((t=>"en"==a?t:e[t])).join(", ")},t=>l(t,e,a)]}class A extends t{constructor(t){super(),this.shadowRoot.innerHTML="<style>@import '/css/common.css';.description{margin-bottom:1rem}#add-prompt{margin-bottom:2rem}#groups-img{position:absolute;width:14rem;left:50%;transform:translate(-50%);z-index:0;opacity:0.2}#text-container>:nth-child(3){margin-top:8rem}.country-name{margin-bottom:0.5rem}.country-block{margin-bottom:2rem}.location-info{margin-bottom:0.75rem}.location-info p{margin-bottom:0}a{color:#DD1C1A}#map{--height:30rem;--width:100%;--margin-bottom:0.5rem}#text-container{position:relative;max-width:calc(100vw - 4rem);margin:auto}h1{margin-bottom:1rem;font-size:2.2rem;text-align:center}h3{margin-bottom:1rem}#container{margin:auto;max-width:800px;margin-top:1rem;margin-bottom:4rem}#container p{text-align:justify}</style>",o(this,{target:this.shadowRoot,props:n(this.attributes),customElement:!0},T,R,r,{},null),t&&t.target&&e(t.target,this,t.anchor)}}customElements.define("groups-component",A);export{A as default};
|
||||||
(function(l, r) { if (!l || l.getElementById('livereloadscript')) return; r = l.createElement('script'); r.async = 1; r.src = '//' + (self.location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1'; r.id = 'livereloadscript'; l.getElementsByTagName('head')[0].appendChild(r) })(self.document);
|
|
||||||
import { S as SvelteElement, i as init, a as attribute_to_object, b as insert_dev, s as safe_not_equal, d as dispatch_dev, v as validate_slots, c as validate_store, e as component_subscribe, o as onMount, g as globals, f as empty, n as noop, h as detach_dev, j as validate_each_argument, 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-d19aafba.js';
|
|
||||||
import { w as writable } from './index-4664ced0.js';
|
|
||||||
import { groupsByCountry, addMarkersGroups } from '../../../../../../../../../js/groups.js';
|
|
||||||
import { loadLocaleContent, getData, sendData } 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[9] = list[i][0];
|
|
||||||
child_ctx[10] = list[i][1];
|
|
||||||
return child_ctx;
|
|
||||||
}
|
|
||||||
|
|
||||||
function get_each_context_1(ctx, list, i) {
|
|
||||||
const child_ctx = ctx.slice();
|
|
||||||
child_ctx[13] = list[i];
|
|
||||||
return child_ctx;
|
|
||||||
}
|
|
||||||
|
|
||||||
// (39:4) {#if $loaded==2}
|
|
||||||
function create_if_block(ctx) {
|
|
||||||
let div1;
|
|
||||||
let div0;
|
|
||||||
let h1;
|
|
||||||
let t0_value = /*$content*/ ctx[0].groups + "";
|
|
||||||
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 h3;
|
|
||||||
let t5_value = /*$content*/ ctx[0].subheading1 + "";
|
|
||||||
let t5;
|
|
||||||
let t6;
|
|
||||||
let map_component;
|
|
||||||
let map_component_callback_value;
|
|
||||||
let t7;
|
|
||||||
let p1;
|
|
||||||
let t8_value = /*$content*/ ctx[0]["map-prompt"] + "";
|
|
||||||
let t8;
|
|
||||||
let t9;
|
|
||||||
let each_value = Object.entries(groupsByCountry);
|
|
||||||
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();
|
|
||||||
h3 = element("h3");
|
|
||||||
t5 = text(t5_value);
|
|
||||||
t6 = space();
|
|
||||||
map_component = element("map-component");
|
|
||||||
t7 = space();
|
|
||||||
p1 = element("p");
|
|
||||||
t8 = text(t8_value);
|
|
||||||
t9 = space();
|
|
||||||
|
|
||||||
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
||||||
each_blocks[i].c();
|
|
||||||
}
|
|
||||||
|
|
||||||
add_location(h1, file, 42, 16, 1236);
|
|
||||||
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, 43, 16, 1280);
|
|
||||||
attr_dev(p0, "class", "description");
|
|
||||||
add_location(p0, file, 44, 16, 1361);
|
|
||||||
add_location(h3, file, 45, 16, 1419);
|
|
||||||
set_custom_element_data(map_component, "id", "map");
|
|
||||||
set_custom_element_data(map_component, "callback", map_component_callback_value = /*func*/ ctx[8]);
|
|
||||||
add_location(map_component, file, 46, 16, 1468);
|
|
||||||
attr_dev(p1, "id", "add-prompt");
|
|
||||||
add_location(p1, file, 47, 16, 1597);
|
|
||||||
attr_dev(div0, "id", "text-container");
|
|
||||||
add_location(div0, file, 41, 12, 1193);
|
|
||||||
attr_dev(div1, "id", "container");
|
|
||||||
add_location(div1, file, 39, 8, 1090);
|
|
||||||
},
|
|
||||||
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, h3);
|
|
||||||
append_dev(h3, t5);
|
|
||||||
append_dev(div0, t6);
|
|
||||||
append_dev(div0, map_component);
|
|
||||||
append_dev(div0, t7);
|
|
||||||
append_dev(div0, p1);
|
|
||||||
append_dev(p1, 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].groups + "")) 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[8])) {
|
|
||||||
set_custom_element_data(map_component, "callback", map_component_callback_value);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (dirty & /*$content*/ 1 && t8_value !== (t8_value = /*$content*/ ctx[0]["map-prompt"] + "")) set_data_dev(t8, t8_value);
|
|
||||||
|
|
||||||
if (dirty & /*Object, groupsByCountry, $content, getAddress, getCountry*/ 193) {
|
|
||||||
each_value = Object.entries(groupsByCountry);
|
|
||||||
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: "(39:4) {#if $loaded==2}",
|
|
||||||
ctx
|
|
||||||
});
|
|
||||||
|
|
||||||
return block;
|
|
||||||
}
|
|
||||||
|
|
||||||
// (52:24) {#each groups as group}
|
|
||||||
function create_each_block_1(ctx) {
|
|
||||||
let div;
|
|
||||||
let p0;
|
|
||||||
let b0;
|
|
||||||
let t0_value = /*$content*/ ctx[0].location + "";
|
|
||||||
let t0;
|
|
||||||
let t1;
|
|
||||||
let t2_value = /*getAddress*/ ctx[7](/*group*/ ctx[13]) + "";
|
|
||||||
let t2;
|
|
||||||
let t3;
|
|
||||||
let p1;
|
|
||||||
let b1;
|
|
||||||
let t4_value = /*$content*/ ctx[0].members + "";
|
|
||||||
let t4;
|
|
||||||
let t5;
|
|
||||||
let t6_value = /*group*/ ctx[13].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[13].contact[1]] + "";
|
|
||||||
let t10;
|
|
||||||
|
|
||||||
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);
|
|
||||||
add_location(b0, file, 53, 35, 1980);
|
|
||||||
add_location(p0, file, 53, 32, 1977);
|
|
||||||
add_location(b1, file, 54, 35, 2068);
|
|
||||||
add_location(p1, file, 54, 32, 2065);
|
|
||||||
add_location(b2, file, 55, 35, 2151);
|
|
||||||
attr_dev(a, "href", /*group*/ ctx[13].contact[0]);
|
|
||||||
attr_dev(a, "target", ";_blank;");
|
|
||||||
attr_dev(a, "rel", "noreferrer");
|
|
||||||
add_location(a, file, 55, 62, 2178);
|
|
||||||
add_location(p2, file, 55, 32, 2148);
|
|
||||||
attr_dev(div, "class", "location-info");
|
|
||||||
add_location(div, file, 52, 28, 1916);
|
|
||||||
},
|
|
||||||
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);
|
|
||||||
},
|
|
||||||
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 && 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[13].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_1.name,
|
|
||||||
type: "each",
|
|
||||||
source: "(52:24) {#each groups as group}",
|
|
||||||
ctx
|
|
||||||
});
|
|
||||||
|
|
||||||
return block;
|
|
||||||
}
|
|
||||||
|
|
||||||
// (49:16) {#each Object.entries(groupsByCountry) as [name,groups]}
|
|
||||||
function create_each_block(ctx) {
|
|
||||||
let h4;
|
|
||||||
let t0_value = /*getCountry*/ ctx[6](/*name*/ ctx[9]) + "";
|
|
||||||
let t0;
|
|
||||||
let t1;
|
|
||||||
let div;
|
|
||||||
let t2;
|
|
||||||
let each_value_1 = /*groups*/ ctx[10];
|
|
||||||
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() {
|
|
||||||
h4 = element("h4");
|
|
||||||
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();
|
|
||||||
attr_dev(h4, "class", "country-name");
|
|
||||||
add_location(h4, file, 49, 20, 1740);
|
|
||||||
attr_dev(div, "class", "country-block");
|
|
||||||
add_location(div, file, 50, 20, 1810);
|
|
||||||
},
|
|
||||||
m: function mount(target, anchor) {
|
|
||||||
insert_dev(target, h4, anchor);
|
|
||||||
append_dev(h4, 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);
|
|
||||||
}
|
|
||||||
|
|
||||||
append_dev(div, t2);
|
|
||||||
},
|
|
||||||
p: function update(ctx, dirty) {
|
|
||||||
if (dirty & /*Object, groupsByCountry, $content, getAddress*/ 129) {
|
|
||||||
each_value_1 = /*groups*/ ctx[10];
|
|
||||||
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(div, t2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
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(h4);
|
|
||||||
if (detaching) detach_dev(t1);
|
|
||||||
if (detaching) detach_dev(div);
|
|
||||||
destroy_each(each_blocks, detaching);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
dispatch_dev("SvelteRegisterBlock", {
|
|
||||||
block,
|
|
||||||
id: create_each_block.name,
|
|
||||||
type: "each",
|
|
||||||
source: "(49:16) {#each Object.entries(groupsByCountry) as [name,groups]}",
|
|
||||||
ctx
|
|
||||||
});
|
|
||||||
|
|
||||||
return block;
|
|
||||||
}
|
|
||||||
|
|
||||||
// (38:0) {#key $loaded}
|
|
||||||
function create_key_block(ctx) {
|
|
||||||
let if_block_anchor;
|
|
||||||
let if_block = /*$loaded*/ ctx[1] == 2 && create_if_block(ctx);
|
|
||||||
|
|
||||||
const block = {
|
|
||||||
c: function create() {
|
|
||||||
if (if_block) if_block.c();
|
|
||||||
if_block_anchor = empty();
|
|
||||||
},
|
|
||||||
m: function mount(target, anchor) {
|
|
||||||
if (if_block) if_block.m(target, anchor);
|
|
||||||
insert_dev(target, if_block_anchor, anchor);
|
|
||||||
},
|
|
||||||
p: function update(ctx, dirty) {
|
|
||||||
if (/*$loaded*/ ctx[1] == 2) {
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
d: function destroy(detaching) {
|
|
||||||
if (if_block) if_block.d(detaching);
|
|
||||||
if (detaching) detach_dev(if_block_anchor);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
dispatch_dev("SvelteRegisterBlock", {
|
|
||||||
block,
|
|
||||||
id: create_key_block.name,
|
|
||||||
type: "key",
|
|
||||||
source: "(38:0) {#key $loaded}",
|
|
||||||
ctx
|
|
||||||
});
|
|
||||||
|
|
||||||
return block;
|
|
||||||
}
|
|
||||||
|
|
||||||
function create_fragment(ctx) {
|
|
||||||
let previous_key = /*$loaded*/ ctx[1];
|
|
||||||
let key_block_anchor;
|
|
||||||
let key_block = create_key_block(ctx);
|
|
||||||
|
|
||||||
const block = {
|
|
||||||
c: function create() {
|
|
||||||
key_block.c();
|
|
||||||
key_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) {
|
|
||||||
key_block.m(target, anchor);
|
|
||||||
insert_dev(target, key_block_anchor, anchor);
|
|
||||||
},
|
|
||||||
p: function update(ctx, [dirty]) {
|
|
||||||
if (dirty & /*$loaded*/ 2 && safe_not_equal(previous_key, previous_key = /*$loaded*/ ctx[1])) {
|
|
||||||
key_block.d(1);
|
|
||||||
key_block = create_key_block(ctx);
|
|
||||||
key_block.c();
|
|
||||||
key_block.m(key_block_anchor.parentNode, key_block_anchor);
|
|
||||||
} else {
|
|
||||||
key_block.p(ctx, dirty);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
i: noop,
|
|
||||||
o: noop,
|
|
||||||
d: function destroy(detaching) {
|
|
||||||
if (detaching) detach_dev(key_block_anchor);
|
|
||||||
key_block.d(detaching);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
dispatch_dev("SvelteRegisterBlock", {
|
|
||||||
block,
|
|
||||||
id: create_fragment.name,
|
|
||||||
type: "component",
|
|
||||||
source: "",
|
|
||||||
ctx
|
|
||||||
});
|
|
||||||
|
|
||||||
return block;
|
|
||||||
}
|
|
||||||
|
|
||||||
function instance($$self, $$props, $$invalidate) {
|
|
||||||
let $content;
|
|
||||||
let $loaded;
|
|
||||||
let { $$slots: slots = {}, $$scope } = $$props;
|
|
||||||
validate_slots('groups-component', slots, []);
|
|
||||||
let loaded = writable(0);
|
|
||||||
validate_store(loaded, 'loaded');
|
|
||||||
component_subscribe($$self, loaded, value => $$invalidate(1, $loaded = value));
|
|
||||||
let content = writable({});
|
|
||||||
validate_store(content, 'content');
|
|
||||||
component_subscribe($$self, content, value => $$invalidate(0, $content = value));
|
|
||||||
let locale = loadLocaleContent(content, "groups-component", loaded);
|
|
||||||
loadLocaleContent(content, "countries", loaded);
|
|
||||||
|
|
||||||
function mapCallbackGroups(createMap, content, locale) {
|
|
||||||
let map = createMap([22, 0], 2);
|
|
||||||
addMarkersGroups(map, content, locale);
|
|
||||||
}
|
|
||||||
|
|
||||||
function getCountry(name) {
|
|
||||||
return locale == "en" ? name : $content[name];
|
|
||||||
}
|
|
||||||
|
|
||||||
function getAddress(group) {
|
|
||||||
return group.location[0].map(x => locale == "en" ? x : $content[x]).join(", ");
|
|
||||||
}
|
|
||||||
|
|
||||||
onMount(() => {
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
const writable_props = [];
|
|
||||||
|
|
||||||
Object_1.keys($$props).forEach(key => {
|
|
||||||
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<groups-component> was created with unknown prop '${key}'`);
|
|
||||||
});
|
|
||||||
|
|
||||||
const func = createMap => mapCallbackGroups(createMap, $content, locale);
|
|
||||||
|
|
||||||
$$self.$capture_state = () => ({
|
|
||||||
onMount,
|
|
||||||
writable,
|
|
||||||
groupsByCountry,
|
|
||||||
addMarkersGroups,
|
|
||||||
loadLocaleContent,
|
|
||||||
getData,
|
|
||||||
sendData,
|
|
||||||
loaded,
|
|
||||||
content,
|
|
||||||
locale,
|
|
||||||
mapCallbackGroups,
|
|
||||||
getCountry,
|
|
||||||
getAddress,
|
|
||||||
$content,
|
|
||||||
$loaded
|
|
||||||
});
|
|
||||||
|
|
||||||
$$self.$inject_state = $$props => {
|
|
||||||
if ('loaded' in $$props) $$invalidate(2, loaded = $$props.loaded);
|
|
||||||
if ('content' in $$props) $$invalidate(3, content = $$props.content);
|
|
||||||
if ('locale' in $$props) $$invalidate(4, locale = $$props.locale);
|
|
||||||
};
|
|
||||||
|
|
||||||
if ($$props && "$$inject" in $$props) {
|
|
||||||
$$self.$inject_state($$props.$$inject);
|
|
||||||
}
|
|
||||||
|
|
||||||
return [
|
|
||||||
$content,
|
|
||||||
$loaded,
|
|
||||||
loaded,
|
|
||||||
content,
|
|
||||||
locale,
|
|
||||||
mapCallbackGroups,
|
|
||||||
getCountry,
|
|
||||||
getAddress,
|
|
||||||
func
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
class Groups_component extends SvelteElement {
|
|
||||||
constructor(options) {
|
|
||||||
super();
|
|
||||||
this.shadowRoot.innerHTML = `<style>@import '/css/common.css';.description{margin-bottom:1rem}#add-prompt{margin-bottom:2rem}#groups-img{position:absolute;width:14rem;left:50%;transform:translate(-50%);z-index:0;opacity:0.2}#text-container>:nth-child(3){margin-top:8rem}.country-name{margin-bottom:0.5rem}.country-block{margin-bottom:2rem}.location-info{margin-bottom:0.75rem}.location-info p{margin-bottom:0}a{color:#DD1C1A}#map{--height:30rem;--width:100%;--margin-bottom:0.5rem}#text-container{position:relative;max-width:calc(100vw - 4rem);margin:auto}h1{margin-bottom:1rem;font-size:2.2rem;text-align:center}h3{margin-bottom:1rem}#container{margin:auto;max-width:800px;margin-top:1rem;margin-bottom:4rem}#container p{text-align:justify}</style>`;
|
|
||||||
|
|
||||||
init(
|
|
||||||
this,
|
|
||||||
{
|
|
||||||
target: this.shadowRoot,
|
|
||||||
props: attribute_to_object(this.attributes),
|
|
||||||
customElement: true
|
|
||||||
},
|
|
||||||
instance,
|
|
||||||
create_fragment,
|
|
||||||
safe_not_equal,
|
|
||||||
{},
|
|
||||||
null
|
|
||||||
);
|
|
||||||
|
|
||||||
if (options) {
|
|
||||||
if (options.target) {
|
|
||||||
insert_dev(options.target, this, options.anchor);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
customElements.define("groups-component", Groups_component);
|
|
||||||
|
|
||||||
export { Groups_component as default };
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,362 +1 @@
|
||||||
|
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;e<s.length;e+=1)n[e]=x(w(t,s,e));return{c(){e=i("div");for(let t=0;t<n.length;t+=1)n[t].c();this.c=a,l(e,"class","legend")},m(t,s){o(t,e,s);for(let t=0;t<n.length;t+=1)n[t].m(e,null)},p(t,[o]){if(7&o){let r;for(s=t[0],r=0;r<s.length;r+=1){const i=w(t,s,r);n[r]?n[r].p(i,o):(n[r]=x(i),n[r].c(),n[r].m(e,null))}for(;r<n.length;r+=1)n[r].d(1);n.length=s.length}},i:a,o:a,d(t){t&&c(e),p(n,t)}}}function v(t,e,s){let o,{option:n=null}=e,{chart:r=null}=e,{data:i={}}=e,a=[],l=[];function c(){if(null==n||null==n||null==r||null==r)setTimeout(c,100);else{s(0,a=b(a,n));for(let t of a)s(3,i[t.name]=!0,i);o=Object.keys(i)}}function p(t){s(3,i[o[t]]=!i[o[t]],i);let e=[],a=n.series.map((t=>t._id)),c=a[t];for(let t=0;t<a.length;t++)a[t]==c&&e.push(t);for(let t of e){let o=n.series[t];o.tooltip.show?(o.lineStyle.opacity=0,o.itemStyle.opacity=0,o.tooltip.show=!1,s(1,l[e[0]].style.opacity=.5,l)):(o.lineStyle.opacity=1,o.itemStyle.opacity=1,o.tooltip.show=!0,s(1,l[e[0]].style.opacity=1,l))}r.setOption(n)}u((()=>{c()}));return t.$$set=t=>{"option"in t&&s(4,n=t.option),"chart"in t&&s(5,r=t.chart),"data"in t&&s(3,i=t.data)},[a,l,p,i,n,r,function(t,e){$[t?"unshift":"push"]((()=>{l[e]=t,s(1,l)}))},t=>p(t)]}class j extends t{constructor(t){super(),this.shadowRoot.innerHTML="<style>@import '/css/common.css';@import '/css/test-basic.css';button{cursor:pointer}.legend{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:center;gap:1rem}.legend *{font-family:var(--sans-serif)}.marker{position:relative;display:inline-block;margin-right:0.5rem;top:0.1rem;width:1rem;height:1rem;border-radius:1rem}</style>",e(this,{target:this.shadowRoot,props:s(this.attributes),customElement:!0},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};
|
||||||
(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, j 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, h 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-d19aafba.js';
|
|
||||||
import { pullLegendData } from '../../../../../../../../../js/predict/charts.js';
|
|
||||||
|
|
||||||
/* src\components\legend-component.svelte generated by Svelte v3.52.0 */
|
|
||||||
|
|
||||||
const { Object: Object_1 } = globals;
|
|
||||||
const file = "src\\components\\legend-component.svelte";
|
|
||||||
|
|
||||||
function get_each_context(ctx, list, i) {
|
|
||||||
const child_ctx = ctx.slice();
|
|
||||||
child_ctx[10] = list[i];
|
|
||||||
child_ctx[11] = list;
|
|
||||||
child_ctx[12] = i;
|
|
||||||
return child_ctx;
|
|
||||||
}
|
|
||||||
|
|
||||||
// (69:4) {#each legendData as item, i}
|
|
||||||
function create_each_block(ctx) {
|
|
||||||
let button;
|
|
||||||
let div;
|
|
||||||
let t0;
|
|
||||||
let span;
|
|
||||||
let t1_value = /*item*/ ctx[10].name + "";
|
|
||||||
let t1;
|
|
||||||
let t2;
|
|
||||||
let i = /*i*/ ctx[12];
|
|
||||||
let mounted;
|
|
||||||
let dispose;
|
|
||||||
const assign_button = () => /*button_binding*/ ctx[6](button, i);
|
|
||||||
const unassign_button = () => /*button_binding*/ ctx[6](null, i);
|
|
||||||
|
|
||||||
function click_handler() {
|
|
||||||
return /*click_handler*/ ctx[7](/*i*/ ctx[12]);
|
|
||||||
}
|
|
||||||
|
|
||||||
const block = {
|
|
||||||
c: function create() {
|
|
||||||
button = element("button");
|
|
||||||
div = element("div");
|
|
||||||
t0 = space();
|
|
||||||
span = element("span");
|
|
||||||
t1 = text(t1_value);
|
|
||||||
t2 = space();
|
|
||||||
attr_dev(div, "class", "marker");
|
|
||||||
set_style(div, "background-color", /*item*/ ctx[10].color);
|
|
||||||
add_location(div, file, 70, 12, 1892);
|
|
||||||
add_location(span, file, 71, 12, 1971);
|
|
||||||
add_location(button, file, 69, 8, 1814);
|
|
||||||
},
|
|
||||||
m: function mount(target, anchor) {
|
|
||||||
insert_dev(target, button, anchor);
|
|
||||||
append_dev(button, div);
|
|
||||||
append_dev(button, t0);
|
|
||||||
append_dev(button, span);
|
|
||||||
append_dev(span, t1);
|
|
||||||
append_dev(button, t2);
|
|
||||||
assign_button();
|
|
||||||
|
|
||||||
if (!mounted) {
|
|
||||||
dispose = listen_dev(button, "click", click_handler, false, false, false);
|
|
||||||
mounted = true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
p: function update(new_ctx, dirty) {
|
|
||||||
ctx = new_ctx;
|
|
||||||
|
|
||||||
if (dirty & /*legendData*/ 1) {
|
|
||||||
set_style(div, "background-color", /*item*/ ctx[10].color);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (dirty & /*legendData*/ 1 && t1_value !== (t1_value = /*item*/ ctx[10].name + "")) set_data_dev(t1, t1_value);
|
|
||||||
|
|
||||||
if (i !== /*i*/ ctx[12]) {
|
|
||||||
unassign_button();
|
|
||||||
i = /*i*/ ctx[12];
|
|
||||||
assign_button();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
d: function destroy(detaching) {
|
|
||||||
if (detaching) detach_dev(button);
|
|
||||||
unassign_button();
|
|
||||||
mounted = false;
|
|
||||||
dispose();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
dispatch_dev("SvelteRegisterBlock", {
|
|
||||||
block,
|
|
||||||
id: create_each_block.name,
|
|
||||||
type: "each",
|
|
||||||
source: "(69:4) {#each legendData as item, i}",
|
|
||||||
ctx
|
|
||||||
});
|
|
||||||
|
|
||||||
return block;
|
|
||||||
}
|
|
||||||
|
|
||||||
function create_fragment(ctx) {
|
|
||||||
let div;
|
|
||||||
let each_value = /*legendData*/ ctx[0];
|
|
||||||
validate_each_argument(each_value);
|
|
||||||
let each_blocks = [];
|
|
||||||
|
|
||||||
for (let i = 0; i < each_value.length; i += 1) {
|
|
||||||
each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i));
|
|
||||||
}
|
|
||||||
|
|
||||||
const block = {
|
|
||||||
c: function create() {
|
|
||||||
div = element("div");
|
|
||||||
|
|
||||||
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
||||||
each_blocks[i].c();
|
|
||||||
}
|
|
||||||
|
|
||||||
this.c = noop;
|
|
||||||
attr_dev(div, "class", "legend");
|
|
||||||
add_location(div, file, 67, 0, 1749);
|
|
||||||
},
|
|
||||||
l: function claim(nodes) {
|
|
||||||
throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
|
|
||||||
},
|
|
||||||
m: function mount(target, anchor) {
|
|
||||||
insert_dev(target, div, anchor);
|
|
||||||
|
|
||||||
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
||||||
each_blocks[i].m(div, null);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
p: function update(ctx, [dirty]) {
|
|
||||||
if (dirty & /*buttons, toggleSeries, legendData*/ 7) {
|
|
||||||
each_value = /*legendData*/ ctx[0];
|
|
||||||
validate_each_argument(each_value);
|
|
||||||
let i;
|
|
||||||
|
|
||||||
for (i = 0; i < each_value.length; i += 1) {
|
|
||||||
const child_ctx = get_each_context(ctx, each_value, i);
|
|
||||||
|
|
||||||
if (each_blocks[i]) {
|
|
||||||
each_blocks[i].p(child_ctx, dirty);
|
|
||||||
} else {
|
|
||||||
each_blocks[i] = create_each_block(child_ctx);
|
|
||||||
each_blocks[i].c();
|
|
||||||
each_blocks[i].m(div, null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (; i < each_blocks.length; i += 1) {
|
|
||||||
each_blocks[i].d(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
each_blocks.length = each_value.length;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
i: noop,
|
|
||||||
o: noop,
|
|
||||||
d: function destroy(detaching) {
|
|
||||||
if (detaching) detach_dev(div);
|
|
||||||
destroy_each(each_blocks, detaching);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
dispatch_dev("SvelteRegisterBlock", {
|
|
||||||
block,
|
|
||||||
id: create_fragment.name,
|
|
||||||
type: "component",
|
|
||||||
source: "",
|
|
||||||
ctx
|
|
||||||
});
|
|
||||||
|
|
||||||
return block;
|
|
||||||
}
|
|
||||||
|
|
||||||
function instance($$self, $$props, $$invalidate) {
|
|
||||||
let { $$slots: slots = {}, $$scope } = $$props;
|
|
||||||
validate_slots('legend-component', slots, []);
|
|
||||||
let { option = null } = $$props;
|
|
||||||
let { chart = null } = $$props;
|
|
||||||
let { data = {} } = $$props;
|
|
||||||
|
|
||||||
// Main code
|
|
||||||
let legendData = [];
|
|
||||||
|
|
||||||
let buttons = [];
|
|
||||||
let dataKeys;
|
|
||||||
|
|
||||||
function init() {
|
|
||||||
if (option == null || option == undefined || chart == null || chart == undefined) {
|
|
||||||
setTimeout(init, 100);
|
|
||||||
} else {
|
|
||||||
$$invalidate(0, legendData = pullLegendData(legendData, option));
|
|
||||||
|
|
||||||
for (let obj of legendData) {
|
|
||||||
$$invalidate(3, data[obj.name] = true, data);
|
|
||||||
}
|
|
||||||
|
|
||||||
dataKeys = Object.keys(data);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function toggleSeries(i) {
|
|
||||||
$$invalidate(3, data[dataKeys[i]] = !data[dataKeys[i]], data);
|
|
||||||
let inds = [];
|
|
||||||
let ids = option.series.map(x => x._id);
|
|
||||||
let id = ids[i];
|
|
||||||
|
|
||||||
for (let j = 0; j < ids.length; j++) {
|
|
||||||
if (ids[j] == id) {
|
|
||||||
inds.push(j);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (let i of inds) {
|
|
||||||
let series = option.series[i];
|
|
||||||
|
|
||||||
if (!series.tooltip.show) {
|
|
||||||
series.lineStyle.opacity = 1;
|
|
||||||
series.itemStyle.opacity = 1;
|
|
||||||
series.tooltip.show = true;
|
|
||||||
$$invalidate(1, buttons[inds[0]].style.opacity = 1, buttons);
|
|
||||||
} else {
|
|
||||||
series.lineStyle.opacity = 0;
|
|
||||||
series.itemStyle.opacity = 0;
|
|
||||||
series.tooltip.show = false;
|
|
||||||
$$invalidate(1, buttons[inds[0]].style.opacity = 0.5, buttons);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
chart.setOption(option);
|
|
||||||
}
|
|
||||||
|
|
||||||
onMount(() => {
|
|
||||||
init();
|
|
||||||
});
|
|
||||||
|
|
||||||
const writable_props = ['option', 'chart', 'data'];
|
|
||||||
|
|
||||||
Object_1.keys($$props).forEach(key => {
|
|
||||||
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<legend-component> was created with unknown prop '${key}'`);
|
|
||||||
});
|
|
||||||
|
|
||||||
function button_binding($$value, i) {
|
|
||||||
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
||||||
buttons[i] = $$value;
|
|
||||||
$$invalidate(1, buttons);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
const click_handler = i => toggleSeries(i);
|
|
||||||
|
|
||||||
$$self.$$set = $$props => {
|
|
||||||
if ('option' in $$props) $$invalidate(4, option = $$props.option);
|
|
||||||
if ('chart' in $$props) $$invalidate(5, chart = $$props.chart);
|
|
||||||
if ('data' in $$props) $$invalidate(3, data = $$props.data);
|
|
||||||
};
|
|
||||||
|
|
||||||
$$self.$capture_state = () => ({
|
|
||||||
onMount,
|
|
||||||
pullLegendData,
|
|
||||||
option,
|
|
||||||
chart,
|
|
||||||
data,
|
|
||||||
legendData,
|
|
||||||
buttons,
|
|
||||||
dataKeys,
|
|
||||||
init,
|
|
||||||
toggleSeries
|
|
||||||
});
|
|
||||||
|
|
||||||
$$self.$inject_state = $$props => {
|
|
||||||
if ('option' in $$props) $$invalidate(4, option = $$props.option);
|
|
||||||
if ('chart' in $$props) $$invalidate(5, chart = $$props.chart);
|
|
||||||
if ('data' in $$props) $$invalidate(3, data = $$props.data);
|
|
||||||
if ('legendData' in $$props) $$invalidate(0, legendData = $$props.legendData);
|
|
||||||
if ('buttons' in $$props) $$invalidate(1, buttons = $$props.buttons);
|
|
||||||
if ('dataKeys' in $$props) dataKeys = $$props.dataKeys;
|
|
||||||
};
|
|
||||||
|
|
||||||
if ($$props && "$$inject" in $$props) {
|
|
||||||
$$self.$inject_state($$props.$$inject);
|
|
||||||
}
|
|
||||||
|
|
||||||
return [
|
|
||||||
legendData,
|
|
||||||
buttons,
|
|
||||||
toggleSeries,
|
|
||||||
data,
|
|
||||||
option,
|
|
||||||
chart,
|
|
||||||
button_binding,
|
|
||||||
click_handler
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
class Legend_component extends SvelteElement {
|
|
||||||
constructor(options) {
|
|
||||||
super();
|
|
||||||
this.shadowRoot.innerHTML = `<style>@import '/css/common.css';@import '/css/test-basic.css';button{cursor:pointer}.legend{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:center;gap:1rem}.legend *{font-family:var(--sans-serif)}.marker{position:relative;display:inline-block;margin-right:0.5rem;top:0.1rem;width:1rem;height:1rem;border-radius:1rem}</style>`;
|
|
||||||
|
|
||||||
init(
|
|
||||||
this,
|
|
||||||
{
|
|
||||||
target: this.shadowRoot,
|
|
||||||
props: attribute_to_object(this.attributes),
|
|
||||||
customElement: true
|
|
||||||
},
|
|
||||||
instance,
|
|
||||||
create_fragment,
|
|
||||||
safe_not_equal,
|
|
||||||
{ option: 4, chart: 5, data: 3 },
|
|
||||||
null
|
|
||||||
);
|
|
||||||
|
|
||||||
if (options) {
|
|
||||||
if (options.target) {
|
|
||||||
insert_dev(options.target, this, options.anchor);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (options.props) {
|
|
||||||
this.$set(options.props);
|
|
||||||
flush();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static get observedAttributes() {
|
|
||||||
return ["option", "chart", "data"];
|
|
||||||
}
|
|
||||||
|
|
||||||
get option() {
|
|
||||||
return this.$$.ctx[4];
|
|
||||||
}
|
|
||||||
|
|
||||||
set option(option) {
|
|
||||||
this.$$set({ option });
|
|
||||||
flush();
|
|
||||||
}
|
|
||||||
|
|
||||||
get chart() {
|
|
||||||
return this.$$.ctx[5];
|
|
||||||
}
|
|
||||||
|
|
||||||
set chart(chart) {
|
|
||||||
this.$$set({ chart });
|
|
||||||
flush();
|
|
||||||
}
|
|
||||||
|
|
||||||
get data() {
|
|
||||||
return this.$$.ctx[3];
|
|
||||||
}
|
|
||||||
|
|
||||||
set data(data) {
|
|
||||||
this.$$set({ data });
|
|
||||||
flush();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
customElements.define("legend-component", Legend_component);
|
|
||||||
|
|
||||||
export { Legend_component as default };
|
|
||||||
|
|
|
@ -1,115 +1 @@
|
||||||
|
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};
|
||||||
(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, h as detach_dev, C as binding_callbacks } from './index-d19aafba.js';
|
|
||||||
|
|
||||||
/* src\components\loadscreen-component.svelte generated by Svelte v3.52.0 */
|
|
||||||
const file = "src\\components\\loadscreen-component.svelte";
|
|
||||||
|
|
||||||
function create_fragment(ctx) {
|
|
||||||
let div;
|
|
||||||
|
|
||||||
const block = {
|
|
||||||
c: function create() {
|
|
||||||
div = element("div");
|
|
||||||
this.c = noop;
|
|
||||||
attr_dev(div, "id", "loadscreen");
|
|
||||||
set_style(div, "width", "100%");
|
|
||||||
set_style(div, "height", "100%");
|
|
||||||
set_style(div, "background", "white");
|
|
||||||
set_style(div, "position", "absolute");
|
|
||||||
set_style(div, "z-index", "100000");
|
|
||||||
add_location(div, file, 20, 0, 366);
|
|
||||||
},
|
|
||||||
l: function claim(nodes) {
|
|
||||||
throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
|
|
||||||
},
|
|
||||||
m: function mount(target, anchor) {
|
|
||||||
insert_dev(target, div, anchor);
|
|
||||||
/*div_binding*/ ctx[1](div);
|
|
||||||
},
|
|
||||||
p: noop,
|
|
||||||
i: noop,
|
|
||||||
o: noop,
|
|
||||||
d: function destroy(detaching) {
|
|
||||||
if (detaching) detach_dev(div);
|
|
||||||
/*div_binding*/ ctx[1](null);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
dispatch_dev("SvelteRegisterBlock", {
|
|
||||||
block,
|
|
||||||
id: create_fragment.name,
|
|
||||||
type: "component",
|
|
||||||
source: "",
|
|
||||||
ctx
|
|
||||||
});
|
|
||||||
|
|
||||||
return block;
|
|
||||||
}
|
|
||||||
|
|
||||||
function instance($$self, $$props, $$invalidate) {
|
|
||||||
let { $$slots: slots = {}, $$scope } = $$props;
|
|
||||||
validate_slots('loadscreen-component', slots, []);
|
|
||||||
let loadscreen;
|
|
||||||
|
|
||||||
onMount(() => {
|
|
||||||
window.addEventListener('load', function () {
|
|
||||||
$$invalidate(0, loadscreen.parentNode.host.style.display = "none", loadscreen);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
const writable_props = [];
|
|
||||||
|
|
||||||
Object.keys($$props).forEach(key => {
|
|
||||||
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<loadscreen-component> was created with unknown prop '${key}'`);
|
|
||||||
});
|
|
||||||
|
|
||||||
function div_binding($$value) {
|
|
||||||
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
||||||
loadscreen = $$value;
|
|
||||||
$$invalidate(0, loadscreen);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
$$self.$capture_state = () => ({ onMount, loadscreen });
|
|
||||||
|
|
||||||
$$self.$inject_state = $$props => {
|
|
||||||
if ('loadscreen' in $$props) $$invalidate(0, loadscreen = $$props.loadscreen);
|
|
||||||
};
|
|
||||||
|
|
||||||
if ($$props && "$$inject" in $$props) {
|
|
||||||
$$self.$inject_state($$props.$$inject);
|
|
||||||
}
|
|
||||||
|
|
||||||
return [loadscreen, div_binding];
|
|
||||||
}
|
|
||||||
|
|
||||||
class Loadscreen_component extends SvelteElement {
|
|
||||||
constructor(options) {
|
|
||||||
super();
|
|
||||||
|
|
||||||
init(
|
|
||||||
this,
|
|
||||||
{
|
|
||||||
target: this.shadowRoot,
|
|
||||||
props: attribute_to_object(this.attributes),
|
|
||||||
customElement: true
|
|
||||||
},
|
|
||||||
instance,
|
|
||||||
create_fragment,
|
|
||||||
safe_not_equal,
|
|
||||||
{},
|
|
||||||
null
|
|
||||||
);
|
|
||||||
|
|
||||||
if (options) {
|
|
||||||
if (options.target) {
|
|
||||||
insert_dev(options.target, this, options.anchor);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
customElements.define("loadscreen-component", Loadscreen_component);
|
|
||||||
|
|
||||||
export { Loadscreen_component as default };
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,175 +1 @@
|
||||||
|
import{S as t,i as e,a as o,b as s,u as a,s as r,f as l,n,h as i,d as c,o as m,w as h}from"./index-4348483d.js";function p(t){let e;return{c(){e=l("div"),this.c=n,i(e,"id","map")},m(o,a){s(o,e,a),t[3](e)},p:n,i:n,o:n,d(o){o&&c(e),t[3](null)}}}function u(t,e,o){let s,{callback:a=null}=e,{colors:r=null}=e;function l(t,e){let o=L.map(s,{center:t,zoom:e});return L.tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',minNativeZoom:2,minZoom:2,maxNativeZoom:14,maxZoom:14}).addTo(o),o}return m((()=>{if(a(l),null!=r){let t=s.getElementsByClassName("leaflet-control-layers-overlays")[0].children;for(let e=0;e<t.length;e++)t[e].children[0].children[0].style.accentColor=r[e]}})),t.$$set=t=>{"callback"in t&&o(1,a=t.callback),"colors"in t&&o(2,r=t.colors)},[s,a,r,function(t){h[t?"unshift":"push"]((()=>{s=t,o(0,s)}))}]}class d extends t{constructor(t){super(),this.shadowRoot.innerHTML="<style>@import 'https://unpkg.com/leaflet@1.9.4/dist/leaflet.css';#map{height:var(--height);width:var(--width,100%);margin-top:var(--margin-top,0);margin-bottom:var(--margin-bottom,0)}</style>",e(this,{target:this.shadowRoot,props:o(this.attributes),customElement:!0},u,p,r,{callback:1,colors:2},null),t&&(t.target&&s(t.target,this,t.anchor),t.props&&(this.$set(t.props),a()))}static get observedAttributes(){return["callback","colors"]}get callback(){return this.$$.ctx[1]}set callback(t){this.$$set({callback:t}),a()}get colors(){return this.$$.ctx[2]}set colors(t){this.$$set({colors:t}),a()}}customElements.define("map-component",d);export{d as default};
|
||||||
(function(l, r) { if (!l || l.getElementById('livereloadscript')) return; r = l.createElement('script'); r.async = 1; r.src = '//' + (self.location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1'; r.id = 'livereloadscript'; l.getElementsByTagName('head')[0].appendChild(r) })(self.document);
|
|
||||||
import { S as SvelteElement, i as init, a as attribute_to_object, b as insert_dev, 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, h as detach_dev, C as binding_callbacks } from './index-d19aafba.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, 41, 0, 1151);
|
|
||||||
},
|
|
||||||
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[3](div);
|
|
||||||
},
|
|
||||||
p: noop,
|
|
||||||
i: noop,
|
|
||||||
o: noop,
|
|
||||||
d: function destroy(detaching) {
|
|
||||||
if (detaching) detach_dev(div);
|
|
||||||
/*div_binding*/ ctx[3](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;
|
|
||||||
let { colors = null } = $$props;
|
|
||||||
|
|
||||||
// Main code
|
|
||||||
let mapContainer;
|
|
||||||
|
|
||||||
function createMap(center, zoom) {
|
|
||||||
let map = L.map(mapContainer, { center, zoom });
|
|
||||||
|
|
||||||
L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
|
||||||
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
|
||||||
minNativeZoom: 2,
|
|
||||||
minZoom: 2,
|
|
||||||
maxNativeZoom: 14,
|
|
||||||
maxZoom: 14
|
|
||||||
}).addTo(map);
|
|
||||||
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
onMount(() => {
|
|
||||||
callback(createMap);
|
|
||||||
|
|
||||||
if (colors != null) {
|
|
||||||
let els = mapContainer.getElementsByClassName("leaflet-control-layers-overlays")[0].children;
|
|
||||||
|
|
||||||
for (let i = 0; i < els.length; i++) {
|
|
||||||
els[i].children[0].children[0].style.accentColor = colors[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
const writable_props = ['callback', 'colors'];
|
|
||||||
|
|
||||||
Object.keys($$props).forEach(key => {
|
|
||||||
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<map-component> was created with unknown prop '${key}'`);
|
|
||||||
});
|
|
||||||
|
|
||||||
function div_binding($$value) {
|
|
||||||
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
||||||
mapContainer = $$value;
|
|
||||||
$$invalidate(0, mapContainer);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
$$self.$$set = $$props => {
|
|
||||||
if ('callback' in $$props) $$invalidate(1, callback = $$props.callback);
|
|
||||||
if ('colors' in $$props) $$invalidate(2, colors = $$props.colors);
|
|
||||||
};
|
|
||||||
|
|
||||||
$$self.$capture_state = () => ({
|
|
||||||
onMount,
|
|
||||||
callback,
|
|
||||||
colors,
|
|
||||||
mapContainer,
|
|
||||||
createMap
|
|
||||||
});
|
|
||||||
|
|
||||||
$$self.$inject_state = $$props => {
|
|
||||||
if ('callback' in $$props) $$invalidate(1, callback = $$props.callback);
|
|
||||||
if ('colors' in $$props) $$invalidate(2, colors = $$props.colors);
|
|
||||||
if ('mapContainer' in $$props) $$invalidate(0, mapContainer = $$props.mapContainer);
|
|
||||||
};
|
|
||||||
|
|
||||||
if ($$props && "$$inject" in $$props) {
|
|
||||||
$$self.$inject_state($$props.$$inject);
|
|
||||||
}
|
|
||||||
|
|
||||||
return [mapContainer, callback, colors, div_binding];
|
|
||||||
}
|
|
||||||
|
|
||||||
class Map_component extends SvelteElement {
|
|
||||||
constructor(options) {
|
|
||||||
super();
|
|
||||||
this.shadowRoot.innerHTML = `<style>@import 'https://unpkg.com/leaflet@1.9.4/dist/leaflet.css';#map{height:var(--height);width:var(--width,100%);margin-top:var(--margin-top,0);margin-bottom:var(--margin-bottom,0)}</style>`;
|
|
||||||
|
|
||||||
init(
|
|
||||||
this,
|
|
||||||
{
|
|
||||||
target: this.shadowRoot,
|
|
||||||
props: attribute_to_object(this.attributes),
|
|
||||||
customElement: true
|
|
||||||
},
|
|
||||||
instance,
|
|
||||||
create_fragment,
|
|
||||||
safe_not_equal,
|
|
||||||
{ callback: 1, colors: 2 },
|
|
||||||
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", "colors"];
|
|
||||||
}
|
|
||||||
|
|
||||||
get callback() {
|
|
||||||
return this.$$.ctx[1];
|
|
||||||
}
|
|
||||||
|
|
||||||
set callback(callback) {
|
|
||||||
this.$$set({ callback });
|
|
||||||
flush();
|
|
||||||
}
|
|
||||||
|
|
||||||
get colors() {
|
|
||||||
return this.$$.ctx[2];
|
|
||||||
}
|
|
||||||
|
|
||||||
set colors(colors) {
|
|
||||||
this.$$set({ colors });
|
|
||||||
flush();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
customElements.define("map-component", Map_component);
|
|
||||||
|
|
||||||
export { Map_component as default };
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,304 +1 @@
|
||||||
|
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='<slot name="sidebar-left"></slot>',h=s(),g=r("div"),g.innerHTML='<slot name="sidebar-left2"></slot>',c=s(),f=r("div"),f.innerHTML='<slot name="sidebar-right"></slot>',u=s(),b=r("div"),b.innerHTML='<slot name="main" id="main-slot"></slot>',this.c=d,o(p,"id","sidebar-left"),o(p,"class","pane"),o(g,"id","sidebar-left2"),o(g,"class","pane"),o(n,"id","sidebars-left"),o(n,"class","sidebar"),o(f,"id","sidebar-right"),o(f,"class","pane sidebar"),o(b,"id","main-pane"),o(b,"class","pane"),o(a,"class","pane-container"),o(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="<style>@import '/css/common.css';.pane-container{display:block;margin-left:var(--total-margin-left,0rem)}#root{min-height:var(--min-height,auto)}#main-pane{position:relative;padding-left:var(--padding-left,0rem);padding-right:var(--padding-right,0rem);padding-top:var(--padding-top,0rem);padding-bottom:var(--padding-bottom,0rem);text-align:justify;background:var(--background,white);box-shadow:var(--box-shadow,0 0 0.314rem rgb(187, 187, 187));margin:auto;height:min-content;max-width:var(--width-main,66rem);width:var(--width-main,66rem);z-index:1;overflow-x:var(--overflow-x,hidden)}.sidebar{position:absolute}#sidebars-left{display:flex;flex-direction:column;gap:1rem;margin-left:calc(-1*var(--width-left,22.5rem) - 1rem - 4rem);width:calc(var(--width-left,22.5rem) + 4rem)}#sidebar-left,#sidebar-left2{position:relative;background-color:white;padding:2rem 2rem}#sidebar-left{display:none}#sidebar-left2{display:none}#sidebar-right{display:none;margin-left:calc(var(--width-main,66rem) + 1rem);width:var(--width-right,auto);background-color:white;padding:2rem 2rem}@media only screen and (max-width: 1880px){#main-pane{max-width:initial;width:100%;max-width:var(--width-main,66rem);padding-left:var(--padding-left-mobile,1.8rem);padding-right:var(--padding-right-mobile,1.8rem);padding-top:var(--padding-top-mobile,1.8rem);padding-bottom:var(--padding-bottom-mobile,1.8rem)}#sidebars-left,#sidebar-right{position:relative;margin:auto;margin-top:1rem;margin-bottom:1rem;max-width:var(--width-main,66rem);width:100%}.pane-container{width:95%;justify-items:center;grid-auto-flow:row;margin-left:0}}</style>",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};
|
||||||
(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, h as detach_dev, C as binding_callbacks } from './index-d19aafba.js';
|
|
||||||
import { debounce } from '../../../../../../../../../js/libraries/miscTools.js';
|
|
||||||
|
|
||||||
/* src\components\pane-aligner.svelte generated by Svelte v3.52.0 */
|
|
||||||
const file = "src\\components\\pane-aligner.svelte";
|
|
||||||
|
|
||||||
function create_fragment(ctx) {
|
|
||||||
let div6;
|
|
||||||
let div5;
|
|
||||||
let div2;
|
|
||||||
let div0;
|
|
||||||
let slot0;
|
|
||||||
let t0;
|
|
||||||
let div1;
|
|
||||||
let slot1;
|
|
||||||
let t1;
|
|
||||||
let div3;
|
|
||||||
let slot2;
|
|
||||||
let t2;
|
|
||||||
let div4;
|
|
||||||
let slot3;
|
|
||||||
|
|
||||||
const block = {
|
|
||||||
c: function create() {
|
|
||||||
div6 = element("div");
|
|
||||||
div5 = element("div");
|
|
||||||
div2 = element("div");
|
|
||||||
div0 = element("div");
|
|
||||||
slot0 = element("slot");
|
|
||||||
t0 = space();
|
|
||||||
div1 = element("div");
|
|
||||||
slot1 = element("slot");
|
|
||||||
t1 = space();
|
|
||||||
div3 = element("div");
|
|
||||||
slot2 = element("slot");
|
|
||||||
t2 = space();
|
|
||||||
div4 = element("div");
|
|
||||||
slot3 = element("slot");
|
|
||||||
this.c = noop;
|
|
||||||
attr_dev(slot0, "name", "sidebar-left");
|
|
||||||
add_location(slot0, file, 74, 16, 2567);
|
|
||||||
attr_dev(div0, "id", "sidebar-left");
|
|
||||||
attr_dev(div0, "class", "pane");
|
|
||||||
add_location(div0, file, 73, 12, 2489);
|
|
||||||
attr_dev(slot1, "name", "sidebar-left2");
|
|
||||||
add_location(slot1, file, 77, 16, 2714);
|
|
||||||
attr_dev(div1, "id", "sidebar-left2");
|
|
||||||
attr_dev(div1, "class", "pane");
|
|
||||||
add_location(div1, file, 76, 12, 2634);
|
|
||||||
attr_dev(div2, "id", "sidebars-left");
|
|
||||||
attr_dev(div2, "class", "sidebar");
|
|
||||||
add_location(div2, file, 72, 8, 2435);
|
|
||||||
attr_dev(slot2, "name", "sidebar-right");
|
|
||||||
add_location(slot2, file, 81, 12, 2879);
|
|
||||||
attr_dev(div3, "id", "sidebar-right");
|
|
||||||
attr_dev(div3, "class", "pane sidebar");
|
|
||||||
add_location(div3, file, 80, 8, 2794);
|
|
||||||
attr_dev(slot3, "name", "main");
|
|
||||||
attr_dev(slot3, "id", "main-slot");
|
|
||||||
add_location(slot3, file, 84, 12, 3007);
|
|
||||||
attr_dev(div4, "id", "main-pane");
|
|
||||||
attr_dev(div4, "class", "pane");
|
|
||||||
add_location(div4, file, 83, 8, 2939);
|
|
||||||
attr_dev(div5, "class", "pane-container");
|
|
||||||
add_location(div5, file, 71, 4, 2397);
|
|
||||||
attr_dev(div6, "id", "root");
|
|
||||||
attr_dev(div6, "class", "pane-centering");
|
|
||||||
add_location(div6, file, 70, 0, 2336);
|
|
||||||
},
|
|
||||||
l: function claim(nodes) {
|
|
||||||
throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
|
|
||||||
},
|
|
||||||
m: function mount(target, anchor) {
|
|
||||||
insert_dev(target, div6, anchor);
|
|
||||||
append_dev(div6, div5);
|
|
||||||
append_dev(div5, div2);
|
|
||||||
append_dev(div2, div0);
|
|
||||||
append_dev(div0, slot0);
|
|
||||||
/*div0_binding*/ ctx[5](div0);
|
|
||||||
append_dev(div2, t0);
|
|
||||||
append_dev(div2, div1);
|
|
||||||
append_dev(div1, slot1);
|
|
||||||
/*div1_binding*/ ctx[6](div1);
|
|
||||||
append_dev(div5, t1);
|
|
||||||
append_dev(div5, div3);
|
|
||||||
append_dev(div3, slot2);
|
|
||||||
/*div3_binding*/ ctx[7](div3);
|
|
||||||
append_dev(div5, t2);
|
|
||||||
append_dev(div5, div4);
|
|
||||||
append_dev(div4, slot3);
|
|
||||||
/*div4_binding*/ ctx[8](div4);
|
|
||||||
/*div6_binding*/ ctx[9](div6);
|
|
||||||
},
|
|
||||||
p: noop,
|
|
||||||
i: noop,
|
|
||||||
o: noop,
|
|
||||||
d: function destroy(detaching) {
|
|
||||||
if (detaching) detach_dev(div6);
|
|
||||||
/*div0_binding*/ ctx[5](null);
|
|
||||||
/*div1_binding*/ ctx[6](null);
|
|
||||||
/*div3_binding*/ ctx[7](null);
|
|
||||||
/*div4_binding*/ ctx[8](null);
|
|
||||||
/*div6_binding*/ ctx[9](null);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
dispatch_dev("SvelteRegisterBlock", {
|
|
||||||
block,
|
|
||||||
id: create_fragment.name,
|
|
||||||
type: "component",
|
|
||||||
source: "",
|
|
||||||
ctx
|
|
||||||
});
|
|
||||||
|
|
||||||
return block;
|
|
||||||
}
|
|
||||||
|
|
||||||
function instance($$self, $$props, $$invalidate) {
|
|
||||||
let { $$slots: slots = {}, $$scope } = $$props;
|
|
||||||
validate_slots('pane-aligner', slots, []);
|
|
||||||
let root;
|
|
||||||
let mainPane;
|
|
||||||
let sidebarLeft;
|
|
||||||
let sidebarLeft2;
|
|
||||||
let sidebarRight;
|
|
||||||
let parentProps = getContext("alignerParent");
|
|
||||||
|
|
||||||
let switchView = parentProps != undefined
|
|
||||||
? getContext("alignerParent").switchView
|
|
||||||
: undefined;
|
|
||||||
|
|
||||||
let leftReplaced = false;
|
|
||||||
let left2Replaced = false;
|
|
||||||
let rightReplaced = false;
|
|
||||||
let switchViewReplaced = false;
|
|
||||||
|
|
||||||
function adjustSlotted() {
|
|
||||||
if (root.parentNode != null) {
|
|
||||||
let slotted = root.parentNode.host.childNodes;
|
|
||||||
|
|
||||||
if (slotted.length == 0) {
|
|
||||||
setTimeout(adjustSlotted, 50);
|
|
||||||
} else {
|
|
||||||
let changed = false;
|
|
||||||
let html = root.parentNode.innerHTML;
|
|
||||||
|
|
||||||
for (let item of slotted) {
|
|
||||||
if (item.slot == "sidebar-left" && !leftReplaced) {
|
|
||||||
html = html.replace("#sidebar-left{display:none}", "");
|
|
||||||
leftReplaced = true;
|
|
||||||
changed = true;
|
|
||||||
} else if (item.slot == "sidebar-left2" && !left2Replaced) {
|
|
||||||
html = html.replace("#sidebar-left2{display:none}", "");
|
|
||||||
left2Replaced = true;
|
|
||||||
changed = true;
|
|
||||||
} else if (item.slot == "sidebar-right" && !rightReplaced) {
|
|
||||||
html = html.replace("#sidebar-right{display:none;", "#sidebar-right{");
|
|
||||||
rightReplaced = true;
|
|
||||||
changed = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (switchView != undefined && !switchViewReplaced) {
|
|
||||||
html = html.replace("1880px", switchView);
|
|
||||||
changed = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (changed) {
|
|
||||||
$$invalidate(0, root.parentNode.innerHTML = html, root);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
window.addEventListener("resize", debounce(adjustSlotted, 100));
|
|
||||||
|
|
||||||
onMount(() => {
|
|
||||||
adjustSlotted();
|
|
||||||
});
|
|
||||||
|
|
||||||
const writable_props = [];
|
|
||||||
|
|
||||||
Object.keys($$props).forEach(key => {
|
|
||||||
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<pane-aligner> was created with unknown prop '${key}'`);
|
|
||||||
});
|
|
||||||
|
|
||||||
function div0_binding($$value) {
|
|
||||||
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
||||||
sidebarLeft = $$value;
|
|
||||||
$$invalidate(2, sidebarLeft);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function div1_binding($$value) {
|
|
||||||
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
||||||
sidebarLeft2 = $$value;
|
|
||||||
$$invalidate(3, sidebarLeft2);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function div3_binding($$value) {
|
|
||||||
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
||||||
sidebarRight = $$value;
|
|
||||||
$$invalidate(4, sidebarRight);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function div4_binding($$value) {
|
|
||||||
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
||||||
mainPane = $$value;
|
|
||||||
$$invalidate(1, mainPane);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function div6_binding($$value) {
|
|
||||||
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
||||||
root = $$value;
|
|
||||||
$$invalidate(0, root);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
$$self.$capture_state = () => ({
|
|
||||||
getContext,
|
|
||||||
setContext,
|
|
||||||
onMount,
|
|
||||||
debounce,
|
|
||||||
root,
|
|
||||||
mainPane,
|
|
||||||
sidebarLeft,
|
|
||||||
sidebarLeft2,
|
|
||||||
sidebarRight,
|
|
||||||
parentProps,
|
|
||||||
switchView,
|
|
||||||
leftReplaced,
|
|
||||||
left2Replaced,
|
|
||||||
rightReplaced,
|
|
||||||
switchViewReplaced,
|
|
||||||
adjustSlotted
|
|
||||||
});
|
|
||||||
|
|
||||||
$$self.$inject_state = $$props => {
|
|
||||||
if ('root' in $$props) $$invalidate(0, root = $$props.root);
|
|
||||||
if ('mainPane' in $$props) $$invalidate(1, mainPane = $$props.mainPane);
|
|
||||||
if ('sidebarLeft' in $$props) $$invalidate(2, sidebarLeft = $$props.sidebarLeft);
|
|
||||||
if ('sidebarLeft2' in $$props) $$invalidate(3, sidebarLeft2 = $$props.sidebarLeft2);
|
|
||||||
if ('sidebarRight' in $$props) $$invalidate(4, sidebarRight = $$props.sidebarRight);
|
|
||||||
if ('parentProps' in $$props) parentProps = $$props.parentProps;
|
|
||||||
if ('switchView' in $$props) switchView = $$props.switchView;
|
|
||||||
if ('leftReplaced' in $$props) leftReplaced = $$props.leftReplaced;
|
|
||||||
if ('left2Replaced' in $$props) left2Replaced = $$props.left2Replaced;
|
|
||||||
if ('rightReplaced' in $$props) rightReplaced = $$props.rightReplaced;
|
|
||||||
if ('switchViewReplaced' in $$props) switchViewReplaced = $$props.switchViewReplaced;
|
|
||||||
};
|
|
||||||
|
|
||||||
if ($$props && "$$inject" in $$props) {
|
|
||||||
$$self.$inject_state($$props.$$inject);
|
|
||||||
}
|
|
||||||
|
|
||||||
return [
|
|
||||||
root,
|
|
||||||
mainPane,
|
|
||||||
sidebarLeft,
|
|
||||||
sidebarLeft2,
|
|
||||||
sidebarRight,
|
|
||||||
div0_binding,
|
|
||||||
div1_binding,
|
|
||||||
div3_binding,
|
|
||||||
div4_binding,
|
|
||||||
div6_binding
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
class Pane_aligner extends SvelteElement {
|
|
||||||
constructor(options) {
|
|
||||||
super();
|
|
||||||
this.shadowRoot.innerHTML = `<style>@import '/css/common.css';.pane-container{display:block;margin-left:var(--total-margin-left,0rem)}#root{min-height:var(--min-height,auto)}#main-pane{position:relative;padding-left:var(--padding-left,0rem);padding-right:var(--padding-right,0rem);padding-top:var(--padding-top,0rem);padding-bottom:var(--padding-bottom,0rem);text-align:justify;background:var(--background,white);box-shadow:var(--box-shadow,0 0 0.314rem rgb(187, 187, 187));margin:auto;height:min-content;max-width:var(--width-main,66rem);width:var(--width-main,66rem);z-index:1;overflow-x:var(--overflow-x,hidden)}.sidebar{position:absolute}#sidebars-left{display:flex;flex-direction:column;gap:1rem;margin-left:calc(-1*var(--width-left,22.5rem) - 1rem - 4rem);width:calc(var(--width-left,22.5rem) + 4rem)}#sidebar-left,#sidebar-left2{position:relative;background-color:white;padding:2rem 2rem}#sidebar-left{display:none}#sidebar-left2{display:none}#sidebar-right{display:none;margin-left:calc(var(--width-main,66rem) + 1rem);width:var(--width-right,auto);background-color:white;padding:2rem 2rem}@media only screen and (max-width: 1880px){#main-pane{max-width:initial;width:100%;max-width:var(--width-main,66rem);padding-left:var(--padding-left-mobile,1.8rem);padding-right:var(--padding-right-mobile,1.8rem);padding-top:var(--padding-top-mobile,1.8rem);padding-bottom:var(--padding-bottom-mobile,1.8rem)}#sidebars-left,#sidebar-right{position:relative;margin:auto;margin-top:1rem;margin-bottom:1rem;max-width:var(--width-main,66rem);width:100%}.pane-container{width:95%;justify-items:center;grid-auto-flow:row;margin-left:0}}</style>`;
|
|
||||||
|
|
||||||
init(
|
|
||||||
this,
|
|
||||||
{
|
|
||||||
target: this.shadowRoot,
|
|
||||||
props: attribute_to_object(this.attributes),
|
|
||||||
customElement: true
|
|
||||||
},
|
|
||||||
instance,
|
|
||||||
create_fragment,
|
|
||||||
safe_not_equal,
|
|
||||||
{},
|
|
||||||
null
|
|
||||||
);
|
|
||||||
|
|
||||||
if (options) {
|
|
||||||
if (options.target) {
|
|
||||||
insert_dev(options.target, this, options.anchor);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
customElements.define("pane-aligner", Pane_aligner);
|
|
||||||
|
|
||||||
export { Pane_aligner as default };
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,209 +1 @@
|
||||||
|
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="<style>@import '/css/common.css';.switch span{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:.4s;transition:.4s;border-radius:calc(2* 1.2rem)}.switch span:before{position:absolute;content:\"\";height:calc(var(--height) - 0.5rem);width:calc(var(--height) - 0.5rem);left:calc(0.3rem);bottom:0.25rem;background-color:white;-webkit-transition:.4s;transition:.4s;border-radius:50%}.switch input:checked+.switch-span{background-color:var(--pink)}.switch input:hover+.switch-span{box-shadow:0 0 0 var(--pink)}.switch input:checked+.switch-span:before{-webkit-transform:translateX(calc(var(--width) - var(--height)/2 - 2*0.6rem));-ms-transform:translateX(calc(var(--width) - var(--height)/2 - 2*0.6rem));transform:translateX(calc(var(--width) - var(--height)/2 - 2*0.6rem))}.switch{position:relative;display:inline-block;width:var(--width);height:var(--height)}.switch input{position:absolute;width:var(--width);height:var(--height);opacity:0}</style>",e(this,{target:this.shadowRoot,props:s(this.attributes),customElement:!0},g,k,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};
|
||||||
(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, h as detach_dev, z as run_all } from './index-d19aafba.js';
|
|
||||||
import { px2rem, getTextWidth, getCanvasFont } from '../../../../../../../../../js/libraries/miscTools.js';
|
|
||||||
|
|
||||||
/* src\components\switch-component.svelte generated by Svelte v3.52.0 */
|
|
||||||
const file = "src\\components\\switch-component.svelte";
|
|
||||||
|
|
||||||
function create_fragment(ctx) {
|
|
||||||
let label;
|
|
||||||
let input;
|
|
||||||
let t;
|
|
||||||
let span;
|
|
||||||
let mounted;
|
|
||||||
let dispose;
|
|
||||||
|
|
||||||
const block = {
|
|
||||||
c: function create() {
|
|
||||||
label = element("label");
|
|
||||||
input = element("input");
|
|
||||||
t = space();
|
|
||||||
span = element("span");
|
|
||||||
this.c = noop;
|
|
||||||
attr_dev(input, "type", "checkbox");
|
|
||||||
add_location(input, file, 39, 4, 804);
|
|
||||||
attr_dev(span, "class", "switch-span");
|
|
||||||
add_location(span, file, 40, 4, 880);
|
|
||||||
attr_dev(label, "class", "switch");
|
|
||||||
add_location(label, file, 38, 0, 776);
|
|
||||||
},
|
|
||||||
l: function claim(nodes) {
|
|
||||||
throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
|
|
||||||
},
|
|
||||||
m: function mount(target, anchor) {
|
|
||||||
insert_dev(target, label, anchor);
|
|
||||||
append_dev(label, input);
|
|
||||||
input.checked = /*checked*/ ctx[0];
|
|
||||||
append_dev(label, t);
|
|
||||||
append_dev(label, span);
|
|
||||||
|
|
||||||
if (!mounted) {
|
|
||||||
dispose = [
|
|
||||||
listen_dev(input, "change", /*input_change_handler*/ ctx[4]),
|
|
||||||
listen_dev(input, "click", /*toggleClick*/ ctx[1], false, false, false)
|
|
||||||
];
|
|
||||||
|
|
||||||
mounted = true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
p: function update(ctx, [dirty]) {
|
|
||||||
if (dirty & /*checked*/ 1) {
|
|
||||||
input.checked = /*checked*/ ctx[0];
|
|
||||||
}
|
|
||||||
},
|
|
||||||
i: noop,
|
|
||||||
o: noop,
|
|
||||||
d: function destroy(detaching) {
|
|
||||||
if (detaching) detach_dev(label);
|
|
||||||
mounted = false;
|
|
||||||
run_all(dispose);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
dispatch_dev("SvelteRegisterBlock", {
|
|
||||||
block,
|
|
||||||
id: create_fragment.name,
|
|
||||||
type: "component",
|
|
||||||
source: "",
|
|
||||||
ctx
|
|
||||||
});
|
|
||||||
|
|
||||||
return block;
|
|
||||||
}
|
|
||||||
|
|
||||||
function instance($$self, $$props, $$invalidate) {
|
|
||||||
let { $$slots: slots = {}, $$scope } = $$props;
|
|
||||||
validate_slots('switch-component', slots, []);
|
|
||||||
let { callback = null } = $$props;
|
|
||||||
let { checked = false } = $$props;
|
|
||||||
|
|
||||||
const toggle = () => {
|
|
||||||
let f = () => {
|
|
||||||
if (callback != null) {
|
|
||||||
$$invalidate(0, checked = !checked);
|
|
||||||
callback();
|
|
||||||
} else {
|
|
||||||
toggle();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
setTimeout(f, 100);
|
|
||||||
};
|
|
||||||
|
|
||||||
function toggleClick() {
|
|
||||||
if (callback != null) {
|
|
||||||
$$invalidate(0, checked = !checked);
|
|
||||||
callback();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Main code
|
|
||||||
onMount(() => {
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
const writable_props = ['callback', 'checked'];
|
|
||||||
|
|
||||||
Object.keys($$props).forEach(key => {
|
|
||||||
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<switch-component> was created with unknown prop '${key}'`);
|
|
||||||
});
|
|
||||||
|
|
||||||
function input_change_handler() {
|
|
||||||
checked = this.checked;
|
|
||||||
$$invalidate(0, checked);
|
|
||||||
}
|
|
||||||
|
|
||||||
$$self.$$set = $$props => {
|
|
||||||
if ('callback' in $$props) $$invalidate(2, callback = $$props.callback);
|
|
||||||
if ('checked' in $$props) $$invalidate(0, checked = $$props.checked);
|
|
||||||
};
|
|
||||||
|
|
||||||
$$self.$capture_state = () => ({
|
|
||||||
onMount,
|
|
||||||
px2rem,
|
|
||||||
getTextWidth,
|
|
||||||
getCanvasFont,
|
|
||||||
callback,
|
|
||||||
checked,
|
|
||||||
toggle,
|
|
||||||
toggleClick
|
|
||||||
});
|
|
||||||
|
|
||||||
$$self.$inject_state = $$props => {
|
|
||||||
if ('callback' in $$props) $$invalidate(2, callback = $$props.callback);
|
|
||||||
if ('checked' in $$props) $$invalidate(0, checked = $$props.checked);
|
|
||||||
};
|
|
||||||
|
|
||||||
if ($$props && "$$inject" in $$props) {
|
|
||||||
$$self.$inject_state($$props.$$inject);
|
|
||||||
}
|
|
||||||
|
|
||||||
return [checked, toggleClick, callback, toggle, input_change_handler];
|
|
||||||
}
|
|
||||||
|
|
||||||
class Switch_component extends SvelteElement {
|
|
||||||
constructor(options) {
|
|
||||||
super();
|
|
||||||
this.shadowRoot.innerHTML = `<style>@import '/css/common.css';.switch span{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:.4s;transition:.4s;border-radius:calc(2* 1.2rem)}.switch span:before{position:absolute;content:"";height:calc(var(--height) - 0.5rem);width:calc(var(--height) - 0.5rem);left:calc(0.3rem);bottom:0.25rem;background-color:white;-webkit-transition:.4s;transition:.4s;border-radius:50%}.switch input:checked+.switch-span{background-color:var(--pink)}.switch input:hover+.switch-span{box-shadow:0 0 0 var(--pink)}.switch input:checked+.switch-span:before{-webkit-transform:translateX(calc(var(--width) - var(--height)/2 - 2*0.6rem));-ms-transform:translateX(calc(var(--width) - var(--height)/2 - 2*0.6rem));transform:translateX(calc(var(--width) - var(--height)/2 - 2*0.6rem))}.switch{position:relative;display:inline-block;width:var(--width);height:var(--height)}.switch input{position:absolute;width:var(--width);height:var(--height);opacity:0}</style>`;
|
|
||||||
|
|
||||||
init(
|
|
||||||
this,
|
|
||||||
{
|
|
||||||
target: this.shadowRoot,
|
|
||||||
props: attribute_to_object(this.attributes),
|
|
||||||
customElement: true
|
|
||||||
},
|
|
||||||
instance,
|
|
||||||
create_fragment,
|
|
||||||
safe_not_equal,
|
|
||||||
{ callback: 2, checked: 0, toggle: 3 },
|
|
||||||
null
|
|
||||||
);
|
|
||||||
|
|
||||||
if (options) {
|
|
||||||
if (options.target) {
|
|
||||||
insert_dev(options.target, this, options.anchor);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (options.props) {
|
|
||||||
this.$set(options.props);
|
|
||||||
flush();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static get observedAttributes() {
|
|
||||||
return ["callback", "checked", "toggle"];
|
|
||||||
}
|
|
||||||
|
|
||||||
get callback() {
|
|
||||||
return this.$$.ctx[2];
|
|
||||||
}
|
|
||||||
|
|
||||||
set callback(callback) {
|
|
||||||
this.$$set({ callback });
|
|
||||||
flush();
|
|
||||||
}
|
|
||||||
|
|
||||||
get checked() {
|
|
||||||
return this.$$.ctx[0];
|
|
||||||
}
|
|
||||||
|
|
||||||
set checked(checked) {
|
|
||||||
this.$$set({ checked });
|
|
||||||
flush();
|
|
||||||
}
|
|
||||||
|
|
||||||
get toggle() {
|
|
||||||
return this.$$.ctx[3];
|
|
||||||
}
|
|
||||||
|
|
||||||
set toggle(value) {
|
|
||||||
throw new Error("<switch-component>: Cannot set read-only property 'toggle'");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
customElements.define("switch-component", Switch_component);
|
|
||||||
|
|
||||||
export { Switch_component as default };
|
|
||||||
|
|
|
@ -53,9 +53,11 @@ export function sendText(route,data,callback) {
|
||||||
if (status === 0 || (status >= 200 && status < 400)) {
|
if (status === 0 || (status >= 200 && status < 400)) {
|
||||||
// The request has been completed successfully
|
// The request has been completed successfully
|
||||||
if (callback !== undefined) {
|
if (callback !== undefined) {
|
||||||
|
console.log(xhr.responseText)
|
||||||
callback(xhr.responseText)
|
callback(xhr.responseText)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
callback(false)
|
||||||
// Oh no! There has been an error with the request!
|
// Oh no! There has been an error with the request!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue