6332 lines
202 KiB
JavaScript
6332 lines
202 KiB
JavaScript
|
|
(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);
|
|
var app = (function () {
|
|
'use strict';
|
|
|
|
function noop() { }
|
|
const identity = x => x;
|
|
function assign(tar, src) {
|
|
// @ts-ignore
|
|
for (const k in src)
|
|
tar[k] = src[k];
|
|
return tar;
|
|
}
|
|
function add_location(element, file, line, column, char) {
|
|
element.__svelte_meta = {
|
|
loc: { file, line, column, char }
|
|
};
|
|
}
|
|
function run(fn) {
|
|
return fn();
|
|
}
|
|
function blank_object() {
|
|
return Object.create(null);
|
|
}
|
|
function run_all(fns) {
|
|
fns.forEach(run);
|
|
}
|
|
function is_function(thing) {
|
|
return typeof thing === 'function';
|
|
}
|
|
function safe_not_equal(a, b) {
|
|
return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');
|
|
}
|
|
let src_url_equal_anchor;
|
|
function src_url_equal(element_src, url) {
|
|
if (!src_url_equal_anchor) {
|
|
src_url_equal_anchor = document.createElement('a');
|
|
}
|
|
src_url_equal_anchor.href = url;
|
|
return element_src === src_url_equal_anchor.href;
|
|
}
|
|
function is_empty(obj) {
|
|
return Object.keys(obj).length === 0;
|
|
}
|
|
function create_slot(definition, ctx, $$scope, fn) {
|
|
if (definition) {
|
|
const slot_ctx = get_slot_context(definition, ctx, $$scope, fn);
|
|
return definition[0](slot_ctx);
|
|
}
|
|
}
|
|
function get_slot_context(definition, ctx, $$scope, fn) {
|
|
return definition[1] && fn
|
|
? assign($$scope.ctx.slice(), definition[1](fn(ctx)))
|
|
: $$scope.ctx;
|
|
}
|
|
function get_slot_changes(definition, $$scope, dirty, fn) {
|
|
if (definition[2] && fn) {
|
|
const lets = definition[2](fn(dirty));
|
|
if ($$scope.dirty === undefined) {
|
|
return lets;
|
|
}
|
|
if (typeof lets === 'object') {
|
|
const merged = [];
|
|
const len = Math.max($$scope.dirty.length, lets.length);
|
|
for (let i = 0; i < len; i += 1) {
|
|
merged[i] = $$scope.dirty[i] | lets[i];
|
|
}
|
|
return merged;
|
|
}
|
|
return $$scope.dirty | lets;
|
|
}
|
|
return $$scope.dirty;
|
|
}
|
|
function update_slot_base(slot, slot_definition, ctx, $$scope, slot_changes, get_slot_context_fn) {
|
|
if (slot_changes) {
|
|
const slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn);
|
|
slot.p(slot_context, slot_changes);
|
|
}
|
|
}
|
|
function get_all_dirty_from_scope($$scope) {
|
|
if ($$scope.ctx.length > 32) {
|
|
const dirty = [];
|
|
const length = $$scope.ctx.length / 32;
|
|
for (let i = 0; i < length; i++) {
|
|
dirty[i] = -1;
|
|
}
|
|
return dirty;
|
|
}
|
|
return -1;
|
|
}
|
|
function exclude_internal_props(props) {
|
|
const result = {};
|
|
for (const k in props)
|
|
if (k[0] !== '$')
|
|
result[k] = props[k];
|
|
return result;
|
|
}
|
|
function compute_rest_props(props, keys) {
|
|
const rest = {};
|
|
keys = new Set(keys);
|
|
for (const k in props)
|
|
if (!keys.has(k) && k[0] !== '$')
|
|
rest[k] = props[k];
|
|
return rest;
|
|
}
|
|
function action_destroyer(action_result) {
|
|
return action_result && is_function(action_result.destroy) ? action_result.destroy : noop;
|
|
}
|
|
|
|
const is_client = typeof window !== 'undefined';
|
|
let now = is_client
|
|
? () => window.performance.now()
|
|
: () => Date.now();
|
|
let raf = is_client ? cb => requestAnimationFrame(cb) : noop;
|
|
|
|
const tasks = new Set();
|
|
function run_tasks(now) {
|
|
tasks.forEach(task => {
|
|
if (!task.c(now)) {
|
|
tasks.delete(task);
|
|
task.f();
|
|
}
|
|
});
|
|
if (tasks.size !== 0)
|
|
raf(run_tasks);
|
|
}
|
|
/**
|
|
* Creates a new task that runs on each raf frame
|
|
* until it returns a falsy value or is aborted
|
|
*/
|
|
function loop(callback) {
|
|
let task;
|
|
if (tasks.size === 0)
|
|
raf(run_tasks);
|
|
return {
|
|
promise: new Promise(fulfill => {
|
|
tasks.add(task = { c: callback, f: fulfill });
|
|
}),
|
|
abort() {
|
|
tasks.delete(task);
|
|
}
|
|
};
|
|
}
|
|
function append(target, node) {
|
|
target.appendChild(node);
|
|
}
|
|
function get_root_for_style(node) {
|
|
if (!node)
|
|
return document;
|
|
const root = node.getRootNode ? node.getRootNode() : node.ownerDocument;
|
|
if (root && root.host) {
|
|
return root;
|
|
}
|
|
return node.ownerDocument;
|
|
}
|
|
function append_empty_stylesheet(node) {
|
|
const style_element = element('style');
|
|
append_stylesheet(get_root_for_style(node), style_element);
|
|
return style_element;
|
|
}
|
|
function append_stylesheet(node, style) {
|
|
append(node.head || node, style);
|
|
}
|
|
function insert(target, node, anchor) {
|
|
target.insertBefore(node, anchor || null);
|
|
}
|
|
function detach(node) {
|
|
node.parentNode.removeChild(node);
|
|
}
|
|
function destroy_each(iterations, detaching) {
|
|
for (let i = 0; i < iterations.length; i += 1) {
|
|
if (iterations[i])
|
|
iterations[i].d(detaching);
|
|
}
|
|
}
|
|
function element(name) {
|
|
return document.createElement(name);
|
|
}
|
|
function svg_element(name) {
|
|
return document.createElementNS('http://www.w3.org/2000/svg', name);
|
|
}
|
|
function text(data) {
|
|
return document.createTextNode(data);
|
|
}
|
|
function space() {
|
|
return text(' ');
|
|
}
|
|
function empty() {
|
|
return text('');
|
|
}
|
|
function listen(node, event, handler, options) {
|
|
node.addEventListener(event, handler, options);
|
|
return () => node.removeEventListener(event, handler, options);
|
|
}
|
|
function attr(node, attribute, value) {
|
|
if (value == null)
|
|
node.removeAttribute(attribute);
|
|
else if (node.getAttribute(attribute) !== value)
|
|
node.setAttribute(attribute, value);
|
|
}
|
|
function set_attributes(node, attributes) {
|
|
// @ts-ignore
|
|
const descriptors = Object.getOwnPropertyDescriptors(node.__proto__);
|
|
for (const key in attributes) {
|
|
if (attributes[key] == null) {
|
|
node.removeAttribute(key);
|
|
}
|
|
else if (key === 'style') {
|
|
node.style.cssText = attributes[key];
|
|
}
|
|
else if (key === '__value') {
|
|
node.value = node[key] = attributes[key];
|
|
}
|
|
else if (descriptors[key] && descriptors[key].set) {
|
|
node[key] = attributes[key];
|
|
}
|
|
else {
|
|
attr(node, key, attributes[key]);
|
|
}
|
|
}
|
|
}
|
|
function children(element) {
|
|
return Array.from(element.childNodes);
|
|
}
|
|
function set_style(node, key, value, important) {
|
|
node.style.setProperty(key, value, important ? 'important' : '');
|
|
}
|
|
function select_option(select, value) {
|
|
for (let i = 0; i < select.options.length; i += 1) {
|
|
const option = select.options[i];
|
|
if (option.__value === value) {
|
|
option.selected = true;
|
|
return;
|
|
}
|
|
}
|
|
select.selectedIndex = -1; // no option should be selected
|
|
}
|
|
function toggle_class(element, name, toggle) {
|
|
element.classList[toggle ? 'add' : 'remove'](name);
|
|
}
|
|
function custom_event(type, detail, bubbles = false) {
|
|
const e = document.createEvent('CustomEvent');
|
|
e.initCustomEvent(type, bubbles, false, detail);
|
|
return e;
|
|
}
|
|
|
|
const active_docs = new Set();
|
|
let active = 0;
|
|
// https://github.com/darkskyapp/string-hash/blob/master/index.js
|
|
function hash(str) {
|
|
let hash = 5381;
|
|
let i = str.length;
|
|
while (i--)
|
|
hash = ((hash << 5) - hash) ^ str.charCodeAt(i);
|
|
return hash >>> 0;
|
|
}
|
|
function create_rule(node, a, b, duration, delay, ease, fn, uid = 0) {
|
|
const step = 16.666 / duration;
|
|
let keyframes = '{\n';
|
|
for (let p = 0; p <= 1; p += step) {
|
|
const t = a + (b - a) * ease(p);
|
|
keyframes += p * 100 + `%{${fn(t, 1 - t)}}\n`;
|
|
}
|
|
const rule = keyframes + `100% {${fn(b, 1 - b)}}\n}`;
|
|
const name = `__svelte_${hash(rule)}_${uid}`;
|
|
const doc = get_root_for_style(node);
|
|
active_docs.add(doc);
|
|
const stylesheet = doc.__svelte_stylesheet || (doc.__svelte_stylesheet = append_empty_stylesheet(node).sheet);
|
|
const current_rules = doc.__svelte_rules || (doc.__svelte_rules = {});
|
|
if (!current_rules[name]) {
|
|
current_rules[name] = true;
|
|
stylesheet.insertRule(`@keyframes ${name} ${rule}`, stylesheet.cssRules.length);
|
|
}
|
|
const animation = node.style.animation || '';
|
|
node.style.animation = `${animation ? `${animation}, ` : ''}${name} ${duration}ms linear ${delay}ms 1 both`;
|
|
active += 1;
|
|
return name;
|
|
}
|
|
function delete_rule(node, name) {
|
|
const previous = (node.style.animation || '').split(', ');
|
|
const next = previous.filter(name
|
|
? anim => anim.indexOf(name) < 0 // remove specific animation
|
|
: anim => anim.indexOf('__svelte') === -1 // remove all Svelte animations
|
|
);
|
|
const deleted = previous.length - next.length;
|
|
if (deleted) {
|
|
node.style.animation = next.join(', ');
|
|
active -= deleted;
|
|
if (!active)
|
|
clear_rules();
|
|
}
|
|
}
|
|
function clear_rules() {
|
|
raf(() => {
|
|
if (active)
|
|
return;
|
|
active_docs.forEach(doc => {
|
|
const stylesheet = doc.__svelte_stylesheet;
|
|
let i = stylesheet.cssRules.length;
|
|
while (i--)
|
|
stylesheet.deleteRule(i);
|
|
doc.__svelte_rules = {};
|
|
});
|
|
active_docs.clear();
|
|
});
|
|
}
|
|
|
|
let current_component;
|
|
function set_current_component(component) {
|
|
current_component = component;
|
|
}
|
|
// TODO figure out if we still want to support
|
|
// shorthand events, or if we want to implement
|
|
// a real bubbling mechanism
|
|
function bubble(component, event) {
|
|
const callbacks = component.$$.callbacks[event.type];
|
|
if (callbacks) {
|
|
// @ts-ignore
|
|
callbacks.slice().forEach(fn => fn.call(this, event));
|
|
}
|
|
}
|
|
|
|
const dirty_components = [];
|
|
const binding_callbacks = [];
|
|
const render_callbacks = [];
|
|
const flush_callbacks = [];
|
|
const resolved_promise = Promise.resolve();
|
|
let update_scheduled = false;
|
|
function schedule_update() {
|
|
if (!update_scheduled) {
|
|
update_scheduled = true;
|
|
resolved_promise.then(flush);
|
|
}
|
|
}
|
|
function add_render_callback(fn) {
|
|
render_callbacks.push(fn);
|
|
}
|
|
let flushing = false;
|
|
const seen_callbacks = new Set();
|
|
function flush() {
|
|
if (flushing)
|
|
return;
|
|
flushing = true;
|
|
do {
|
|
// first, call beforeUpdate functions
|
|
// and update components
|
|
for (let i = 0; i < dirty_components.length; i += 1) {
|
|
const component = dirty_components[i];
|
|
set_current_component(component);
|
|
update(component.$$);
|
|
}
|
|
set_current_component(null);
|
|
dirty_components.length = 0;
|
|
while (binding_callbacks.length)
|
|
binding_callbacks.pop()();
|
|
// then, once components are updated, call
|
|
// afterUpdate functions. This may cause
|
|
// subsequent updates...
|
|
for (let i = 0; i < render_callbacks.length; i += 1) {
|
|
const callback = render_callbacks[i];
|
|
if (!seen_callbacks.has(callback)) {
|
|
// ...so guard against infinite loops
|
|
seen_callbacks.add(callback);
|
|
callback();
|
|
}
|
|
}
|
|
render_callbacks.length = 0;
|
|
} while (dirty_components.length);
|
|
while (flush_callbacks.length) {
|
|
flush_callbacks.pop()();
|
|
}
|
|
update_scheduled = false;
|
|
flushing = false;
|
|
seen_callbacks.clear();
|
|
}
|
|
function update($$) {
|
|
if ($$.fragment !== null) {
|
|
$$.update();
|
|
run_all($$.before_update);
|
|
const dirty = $$.dirty;
|
|
$$.dirty = [-1];
|
|
$$.fragment && $$.fragment.p($$.ctx, dirty);
|
|
$$.after_update.forEach(add_render_callback);
|
|
}
|
|
}
|
|
|
|
let promise;
|
|
function wait() {
|
|
if (!promise) {
|
|
promise = Promise.resolve();
|
|
promise.then(() => {
|
|
promise = null;
|
|
});
|
|
}
|
|
return promise;
|
|
}
|
|
function dispatch(node, direction, kind) {
|
|
node.dispatchEvent(custom_event(`${direction ? 'intro' : 'outro'}${kind}`));
|
|
}
|
|
const outroing = new Set();
|
|
let outros;
|
|
function group_outros() {
|
|
outros = {
|
|
r: 0,
|
|
c: [],
|
|
p: outros // parent group
|
|
};
|
|
}
|
|
function check_outros() {
|
|
if (!outros.r) {
|
|
run_all(outros.c);
|
|
}
|
|
outros = outros.p;
|
|
}
|
|
function transition_in(block, local) {
|
|
if (block && block.i) {
|
|
outroing.delete(block);
|
|
block.i(local);
|
|
}
|
|
}
|
|
function transition_out(block, local, detach, callback) {
|
|
if (block && block.o) {
|
|
if (outroing.has(block))
|
|
return;
|
|
outroing.add(block);
|
|
outros.c.push(() => {
|
|
outroing.delete(block);
|
|
if (callback) {
|
|
if (detach)
|
|
block.d(1);
|
|
callback();
|
|
}
|
|
});
|
|
block.o(local);
|
|
}
|
|
}
|
|
const null_transition = { duration: 0 };
|
|
function create_bidirectional_transition(node, fn, params, intro) {
|
|
let config = fn(node, params);
|
|
let t = intro ? 0 : 1;
|
|
let running_program = null;
|
|
let pending_program = null;
|
|
let animation_name = null;
|
|
function clear_animation() {
|
|
if (animation_name)
|
|
delete_rule(node, animation_name);
|
|
}
|
|
function init(program, duration) {
|
|
const d = (program.b - t);
|
|
duration *= Math.abs(d);
|
|
return {
|
|
a: t,
|
|
b: program.b,
|
|
d,
|
|
duration,
|
|
start: program.start,
|
|
end: program.start + duration,
|
|
group: program.group
|
|
};
|
|
}
|
|
function go(b) {
|
|
const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;
|
|
const program = {
|
|
start: now() + delay,
|
|
b
|
|
};
|
|
if (!b) {
|
|
// @ts-ignore todo: improve typings
|
|
program.group = outros;
|
|
outros.r += 1;
|
|
}
|
|
if (running_program || pending_program) {
|
|
pending_program = program;
|
|
}
|
|
else {
|
|
// if this is an intro, and there's a delay, we need to do
|
|
// an initial tick and/or apply CSS animation immediately
|
|
if (css) {
|
|
clear_animation();
|
|
animation_name = create_rule(node, t, b, duration, delay, easing, css);
|
|
}
|
|
if (b)
|
|
tick(0, 1);
|
|
running_program = init(program, duration);
|
|
add_render_callback(() => dispatch(node, b, 'start'));
|
|
loop(now => {
|
|
if (pending_program && now > pending_program.start) {
|
|
running_program = init(pending_program, duration);
|
|
pending_program = null;
|
|
dispatch(node, running_program.b, 'start');
|
|
if (css) {
|
|
clear_animation();
|
|
animation_name = create_rule(node, t, running_program.b, running_program.duration, 0, easing, config.css);
|
|
}
|
|
}
|
|
if (running_program) {
|
|
if (now >= running_program.end) {
|
|
tick(t = running_program.b, 1 - t);
|
|
dispatch(node, running_program.b, 'end');
|
|
if (!pending_program) {
|
|
// we're done
|
|
if (running_program.b) {
|
|
// intro — we can tidy up immediately
|
|
clear_animation();
|
|
}
|
|
else {
|
|
// outro — needs to be coordinated
|
|
if (!--running_program.group.r)
|
|
run_all(running_program.group.c);
|
|
}
|
|
}
|
|
running_program = null;
|
|
}
|
|
else if (now >= running_program.start) {
|
|
const p = now - running_program.start;
|
|
t = running_program.a + running_program.d * easing(p / running_program.duration);
|
|
tick(t, 1 - t);
|
|
}
|
|
}
|
|
return !!(running_program || pending_program);
|
|
});
|
|
}
|
|
}
|
|
return {
|
|
run(b) {
|
|
if (is_function(config)) {
|
|
wait().then(() => {
|
|
// @ts-ignore
|
|
config = config();
|
|
go(b);
|
|
});
|
|
}
|
|
else {
|
|
go(b);
|
|
}
|
|
},
|
|
end() {
|
|
clear_animation();
|
|
running_program = pending_program = null;
|
|
}
|
|
};
|
|
}
|
|
|
|
const globals = (typeof window !== 'undefined'
|
|
? window
|
|
: typeof globalThis !== 'undefined'
|
|
? globalThis
|
|
: global);
|
|
|
|
function get_spread_update(levels, updates) {
|
|
const update = {};
|
|
const to_null_out = {};
|
|
const accounted_for = { $$scope: 1 };
|
|
let i = levels.length;
|
|
while (i--) {
|
|
const o = levels[i];
|
|
const n = updates[i];
|
|
if (n) {
|
|
for (const key in o) {
|
|
if (!(key in n))
|
|
to_null_out[key] = 1;
|
|
}
|
|
for (const key in n) {
|
|
if (!accounted_for[key]) {
|
|
update[key] = n[key];
|
|
accounted_for[key] = 1;
|
|
}
|
|
}
|
|
levels[i] = n;
|
|
}
|
|
else {
|
|
for (const key in o) {
|
|
accounted_for[key] = 1;
|
|
}
|
|
}
|
|
}
|
|
for (const key in to_null_out) {
|
|
if (!(key in update))
|
|
update[key] = undefined;
|
|
}
|
|
return update;
|
|
}
|
|
function create_component(block) {
|
|
block && block.c();
|
|
}
|
|
function mount_component(component, target, anchor, customElement) {
|
|
const { fragment, on_mount, on_destroy, after_update } = component.$$;
|
|
fragment && fragment.m(target, anchor);
|
|
if (!customElement) {
|
|
// onMount happens before the initial afterUpdate
|
|
add_render_callback(() => {
|
|
const new_on_destroy = on_mount.map(run).filter(is_function);
|
|
if (on_destroy) {
|
|
on_destroy.push(...new_on_destroy);
|
|
}
|
|
else {
|
|
// Edge case - component was destroyed immediately,
|
|
// most likely as a result of a binding initialising
|
|
run_all(new_on_destroy);
|
|
}
|
|
component.$$.on_mount = [];
|
|
});
|
|
}
|
|
after_update.forEach(add_render_callback);
|
|
}
|
|
function destroy_component(component, detaching) {
|
|
const $$ = component.$$;
|
|
if ($$.fragment !== null) {
|
|
run_all($$.on_destroy);
|
|
$$.fragment && $$.fragment.d(detaching);
|
|
// TODO null out other refs, including component.$$ (but need to
|
|
// preserve final state?)
|
|
$$.on_destroy = $$.fragment = null;
|
|
$$.ctx = [];
|
|
}
|
|
}
|
|
function make_dirty(component, i) {
|
|
if (component.$$.dirty[0] === -1) {
|
|
dirty_components.push(component);
|
|
schedule_update();
|
|
component.$$.dirty.fill(0);
|
|
}
|
|
component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31));
|
|
}
|
|
function init(component, options, instance, create_fragment, not_equal, props, append_styles, dirty = [-1]) {
|
|
const parent_component = current_component;
|
|
set_current_component(component);
|
|
const $$ = component.$$ = {
|
|
fragment: null,
|
|
ctx: null,
|
|
// state
|
|
props,
|
|
update: noop,
|
|
not_equal,
|
|
bound: blank_object(),
|
|
// lifecycle
|
|
on_mount: [],
|
|
on_destroy: [],
|
|
on_disconnect: [],
|
|
before_update: [],
|
|
after_update: [],
|
|
context: new Map(options.context || (parent_component ? parent_component.$$.context : [])),
|
|
// everything else
|
|
callbacks: blank_object(),
|
|
dirty,
|
|
skip_bound: false,
|
|
root: options.target || parent_component.$$.root
|
|
};
|
|
append_styles && append_styles($$.root);
|
|
let ready = false;
|
|
$$.ctx = instance
|
|
? instance(component, options.props || {}, (i, ret, ...rest) => {
|
|
const value = rest.length ? rest[0] : ret;
|
|
if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) {
|
|
if (!$$.skip_bound && $$.bound[i])
|
|
$$.bound[i](value);
|
|
if (ready)
|
|
make_dirty(component, i);
|
|
}
|
|
return ret;
|
|
})
|
|
: [];
|
|
$$.update();
|
|
ready = true;
|
|
run_all($$.before_update);
|
|
// `false` as a special case of no DOM component
|
|
$$.fragment = create_fragment ? create_fragment($$.ctx) : false;
|
|
if (options.target) {
|
|
if (options.hydrate) {
|
|
const nodes = children(options.target);
|
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
$$.fragment && $$.fragment.l(nodes);
|
|
nodes.forEach(detach);
|
|
}
|
|
else {
|
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
$$.fragment && $$.fragment.c();
|
|
}
|
|
if (options.intro)
|
|
transition_in(component.$$.fragment);
|
|
mount_component(component, options.target, options.anchor, options.customElement);
|
|
flush();
|
|
}
|
|
set_current_component(parent_component);
|
|
}
|
|
/**
|
|
* Base class for Svelte components. Used when dev=false.
|
|
*/
|
|
class SvelteComponent {
|
|
$destroy() {
|
|
destroy_component(this, 1);
|
|
this.$destroy = noop;
|
|
}
|
|
$on(type, callback) {
|
|
const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));
|
|
callbacks.push(callback);
|
|
return () => {
|
|
const index = callbacks.indexOf(callback);
|
|
if (index !== -1)
|
|
callbacks.splice(index, 1);
|
|
};
|
|
}
|
|
$set($$props) {
|
|
if (this.$$set && !is_empty($$props)) {
|
|
this.$$.skip_bound = true;
|
|
this.$$set($$props);
|
|
this.$$.skip_bound = false;
|
|
}
|
|
}
|
|
}
|
|
|
|
function dispatch_dev(type, detail) {
|
|
document.dispatchEvent(custom_event(type, Object.assign({ version: '3.44.1' }, detail), true));
|
|
}
|
|
function append_dev(target, node) {
|
|
dispatch_dev('SvelteDOMInsert', { target, node });
|
|
append(target, node);
|
|
}
|
|
function insert_dev(target, node, anchor) {
|
|
dispatch_dev('SvelteDOMInsert', { target, node, anchor });
|
|
insert(target, node, anchor);
|
|
}
|
|
function detach_dev(node) {
|
|
dispatch_dev('SvelteDOMRemove', { node });
|
|
detach(node);
|
|
}
|
|
function listen_dev(node, event, handler, options, has_prevent_default, has_stop_propagation) {
|
|
const modifiers = options === true ? ['capture'] : options ? Array.from(Object.keys(options)) : [];
|
|
if (has_prevent_default)
|
|
modifiers.push('preventDefault');
|
|
if (has_stop_propagation)
|
|
modifiers.push('stopPropagation');
|
|
dispatch_dev('SvelteDOMAddEventListener', { node, event, handler, modifiers });
|
|
const dispose = listen(node, event, handler, options);
|
|
return () => {
|
|
dispatch_dev('SvelteDOMRemoveEventListener', { node, event, handler, modifiers });
|
|
dispose();
|
|
};
|
|
}
|
|
function attr_dev(node, attribute, value) {
|
|
attr(node, attribute, value);
|
|
if (value == null)
|
|
dispatch_dev('SvelteDOMRemoveAttribute', { node, attribute });
|
|
else
|
|
dispatch_dev('SvelteDOMSetAttribute', { node, attribute, value });
|
|
}
|
|
function set_data_dev(text, data) {
|
|
data = '' + data;
|
|
if (text.wholeText === data)
|
|
return;
|
|
dispatch_dev('SvelteDOMSetData', { node: text, data });
|
|
text.data = data;
|
|
}
|
|
function validate_each_argument(arg) {
|
|
if (typeof arg !== 'string' && !(arg && typeof arg === 'object' && 'length' in arg)) {
|
|
let msg = '{#each} only iterates over array-like objects.';
|
|
if (typeof Symbol === 'function' && arg && Symbol.iterator in arg) {
|
|
msg += ' You can use a spread to convert this iterable into an array.';
|
|
}
|
|
throw new Error(msg);
|
|
}
|
|
}
|
|
function validate_slots(name, slot, keys) {
|
|
for (const slot_key of Object.keys(slot)) {
|
|
if (!~keys.indexOf(slot_key)) {
|
|
console.warn(`<${name}> received an unexpected slot "${slot_key}".`);
|
|
}
|
|
}
|
|
}
|
|
/**
|
|
* Base class for Svelte components with some minor dev-enhancements. Used when dev=true.
|
|
*/
|
|
class SvelteComponentDev extends SvelteComponent {
|
|
constructor(options) {
|
|
if (!options || (!options.target && !options.$$inline)) {
|
|
throw new Error("'target' is a required option");
|
|
}
|
|
super();
|
|
}
|
|
$destroy() {
|
|
super.$destroy();
|
|
this.$destroy = () => {
|
|
console.warn('Component was already destroyed'); // eslint-disable-line no-console
|
|
};
|
|
}
|
|
$capture_state() { }
|
|
$inject_state() { }
|
|
}
|
|
|
|
// Material Design Icons v6.4.95
|
|
var mdiChevronDown = "M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z";
|
|
var mdiConsoleNetworkOutline = "M15,20A1,1 0 0,0 14,19H13V17H17A2,2 0 0,0 19,15V5A2,2 0 0,0 17,3H7A2,2 0 0,0 5,5V15A2,2 0 0,0 7,17H11V19H10A1,1 0 0,0 9,20H2V22H9A1,1 0 0,0 10,23H14A1,1 0 0,0 15,22H22V20H15M7,15V5H17V15H7M8,6.89L11.56,10.45L8,14H10.53L13.45,11.08C13.78,10.74 13.78,10.18 13.45,9.82L10.5,6.89H8M16,12.22H13.33V14H16V12.22Z";
|
|
|
|
/* eslint-disable no-param-reassign */
|
|
|
|
/**
|
|
* Options for customizing ripples
|
|
*/
|
|
const defaults = {
|
|
color: 'currentColor',
|
|
class: '',
|
|
opacity: 0.1,
|
|
centered: false,
|
|
spreadingDuration: '.4s',
|
|
spreadingDelay: '0s',
|
|
spreadingTimingFunction: 'linear',
|
|
clearingDuration: '1s',
|
|
clearingDelay: '0s',
|
|
clearingTimingFunction: 'ease-in-out',
|
|
};
|
|
|
|
/**
|
|
* Creates a ripple element but does not destroy it (use RippleStop for that)
|
|
*
|
|
* @param {Event} e
|
|
* @param {*} options
|
|
* @returns Ripple element
|
|
*/
|
|
function RippleStart(e, options = {}) {
|
|
e.stopImmediatePropagation();
|
|
const opts = { ...defaults, ...options };
|
|
|
|
const isTouchEvent = e.touches ? !!e.touches[0] : false;
|
|
// Parent element
|
|
const target = isTouchEvent ? e.touches[0].currentTarget : e.currentTarget;
|
|
|
|
// Create ripple
|
|
const ripple = document.createElement('div');
|
|
const rippleStyle = ripple.style;
|
|
|
|
// Adding default stuff
|
|
ripple.className = `material-ripple ${opts.class}`;
|
|
rippleStyle.position = 'absolute';
|
|
rippleStyle.color = 'inherit';
|
|
rippleStyle.borderRadius = '50%';
|
|
rippleStyle.pointerEvents = 'none';
|
|
rippleStyle.width = '100px';
|
|
rippleStyle.height = '100px';
|
|
rippleStyle.marginTop = '-50px';
|
|
rippleStyle.marginLeft = '-50px';
|
|
target.appendChild(ripple);
|
|
rippleStyle.opacity = opts.opacity;
|
|
rippleStyle.transition = `transform ${opts.spreadingDuration} ${opts.spreadingTimingFunction} ${opts.spreadingDelay},opacity ${opts.clearingDuration} ${opts.clearingTimingFunction} ${opts.clearingDelay}`;
|
|
rippleStyle.transform = 'scale(0) translate(0,0)';
|
|
rippleStyle.background = opts.color;
|
|
|
|
// Positioning ripple
|
|
const targetRect = target.getBoundingClientRect();
|
|
if (opts.centered) {
|
|
rippleStyle.top = `${targetRect.height / 2}px`;
|
|
rippleStyle.left = `${targetRect.width / 2}px`;
|
|
} else {
|
|
const distY = isTouchEvent ? e.touches[0].clientY : e.clientY;
|
|
const distX = isTouchEvent ? e.touches[0].clientX : e.clientX;
|
|
rippleStyle.top = `${distY - targetRect.top}px`;
|
|
rippleStyle.left = `${distX - targetRect.left}px`;
|
|
}
|
|
|
|
// Enlarge ripple
|
|
rippleStyle.transform = `scale(${
|
|
Math.max(targetRect.width, targetRect.height) * 0.02
|
|
}) translate(0,0)`;
|
|
return ripple;
|
|
}
|
|
|
|
/**
|
|
* Destroys the ripple, slowly fading it out.
|
|
*
|
|
* @param {Element} ripple
|
|
*/
|
|
function RippleStop(ripple) {
|
|
if (ripple) {
|
|
ripple.addEventListener('transitionend', (e) => {
|
|
if (e.propertyName === 'opacity') ripple.remove();
|
|
});
|
|
ripple.style.opacity = 0;
|
|
}
|
|
}
|
|
|
|
/**
|
|
* @param node {Element}
|
|
*/
|
|
var Ripple = (node, _options = {}) => {
|
|
let options = _options;
|
|
let destroyed = false;
|
|
let ripple;
|
|
let keyboardActive = false;
|
|
const handleStart = (e) => {
|
|
ripple = RippleStart(e, options);
|
|
};
|
|
const handleStop = () => RippleStop(ripple);
|
|
const handleKeyboardStart = (e) => {
|
|
if (!keyboardActive && (e.keyCode === 13 || e.keyCode === 32)) {
|
|
ripple = RippleStart(e, { ...options, centered: true });
|
|
keyboardActive = true;
|
|
}
|
|
};
|
|
const handleKeyboardStop = () => {
|
|
keyboardActive = false;
|
|
handleStop();
|
|
};
|
|
|
|
function setup() {
|
|
node.classList.add('s-ripple-container');
|
|
node.addEventListener('pointerdown', handleStart);
|
|
node.addEventListener('pointerup', handleStop);
|
|
node.addEventListener('pointerleave', handleStop);
|
|
node.addEventListener('keydown', handleKeyboardStart);
|
|
node.addEventListener('keyup', handleKeyboardStop);
|
|
destroyed = false;
|
|
}
|
|
|
|
function destroy() {
|
|
node.classList.remove('s-ripple-container');
|
|
node.removeEventListener('pointerdown', handleStart);
|
|
node.removeEventListener('pointerup', handleStop);
|
|
node.removeEventListener('pointerleave', handleStop);
|
|
node.removeEventListener('keydown', handleKeyboardStart);
|
|
node.removeEventListener('keyup', handleKeyboardStop);
|
|
destroyed = true;
|
|
}
|
|
|
|
if (options) setup();
|
|
|
|
return {
|
|
update(newOptions) {
|
|
options = newOptions;
|
|
if (options && destroyed) setup();
|
|
else if (!(options || destroyed)) destroy();
|
|
},
|
|
destroy,
|
|
};
|
|
};
|
|
|
|
/* node_modules/svelte-materialify/dist/components/MaterialApp/MaterialApp.svelte generated by Svelte v3.44.1 */
|
|
|
|
const file$b = "node_modules/svelte-materialify/dist/components/MaterialApp/MaterialApp.svelte";
|
|
|
|
function create_fragment$b(ctx) {
|
|
let div;
|
|
let div_class_value;
|
|
let current;
|
|
const default_slot_template = /*#slots*/ ctx[2].default;
|
|
const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[1], null);
|
|
|
|
const block = {
|
|
c: function create() {
|
|
div = element("div");
|
|
if (default_slot) default_slot.c();
|
|
attr_dev(div, "class", div_class_value = "s-app theme--" + /*theme*/ ctx[0]);
|
|
add_location(div, file$b, 12, 0, 203097);
|
|
},
|
|
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);
|
|
|
|
if (default_slot) {
|
|
default_slot.m(div, null);
|
|
}
|
|
|
|
current = true;
|
|
},
|
|
p: function update(ctx, [dirty]) {
|
|
if (default_slot) {
|
|
if (default_slot.p && (!current || dirty & /*$$scope*/ 2)) {
|
|
update_slot_base(
|
|
default_slot,
|
|
default_slot_template,
|
|
ctx,
|
|
/*$$scope*/ ctx[1],
|
|
!current
|
|
? get_all_dirty_from_scope(/*$$scope*/ ctx[1])
|
|
: get_slot_changes(default_slot_template, /*$$scope*/ ctx[1], dirty, null),
|
|
null
|
|
);
|
|
}
|
|
}
|
|
|
|
if (!current || dirty & /*theme*/ 1 && div_class_value !== (div_class_value = "s-app theme--" + /*theme*/ ctx[0])) {
|
|
attr_dev(div, "class", div_class_value);
|
|
}
|
|
},
|
|
i: function intro(local) {
|
|
if (current) return;
|
|
transition_in(default_slot, local);
|
|
current = true;
|
|
},
|
|
o: function outro(local) {
|
|
transition_out(default_slot, local);
|
|
current = false;
|
|
},
|
|
d: function destroy(detaching) {
|
|
if (detaching) detach_dev(div);
|
|
if (default_slot) default_slot.d(detaching);
|
|
}
|
|
};
|
|
|
|
dispatch_dev("SvelteRegisterBlock", {
|
|
block,
|
|
id: create_fragment$b.name,
|
|
type: "component",
|
|
source: "",
|
|
ctx
|
|
});
|
|
|
|
return block;
|
|
}
|
|
|
|
function instance$b($$self, $$props, $$invalidate) {
|
|
let { $$slots: slots = {}, $$scope } = $$props;
|
|
validate_slots('MaterialApp', slots, ['default']);
|
|
let { theme = 'light' } = $$props;
|
|
const writable_props = ['theme'];
|
|
|
|
Object.keys($$props).forEach(key => {
|
|
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<MaterialApp> was created with unknown prop '${key}'`);
|
|
});
|
|
|
|
$$self.$$set = $$props => {
|
|
if ('theme' in $$props) $$invalidate(0, theme = $$props.theme);
|
|
if ('$$scope' in $$props) $$invalidate(1, $$scope = $$props.$$scope);
|
|
};
|
|
|
|
$$self.$capture_state = () => ({ theme });
|
|
|
|
$$self.$inject_state = $$props => {
|
|
if ('theme' in $$props) $$invalidate(0, theme = $$props.theme);
|
|
};
|
|
|
|
if ($$props && "$$inject" in $$props) {
|
|
$$self.$inject_state($$props.$$inject);
|
|
}
|
|
|
|
return [theme, $$scope, slots];
|
|
}
|
|
|
|
class MaterialApp extends SvelteComponentDev {
|
|
constructor(options) {
|
|
super(options);
|
|
init(this, options, instance$b, create_fragment$b, safe_not_equal, { theme: 0 });
|
|
|
|
dispatch_dev("SvelteRegisterComponent", {
|
|
component: this,
|
|
tagName: "MaterialApp",
|
|
options,
|
|
id: create_fragment$b.name
|
|
});
|
|
}
|
|
|
|
get theme() {
|
|
throw new Error("<MaterialApp>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set theme(value) {
|
|
throw new Error("<MaterialApp>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
}
|
|
|
|
function format$1(input) {
|
|
if (typeof input === 'number') return `${input}px`;
|
|
return input;
|
|
}
|
|
|
|
/**
|
|
* @param node {Element}
|
|
* @param styles {Object}
|
|
*/
|
|
var Style = (node, _styles) => {
|
|
let styles = _styles;
|
|
Object.entries(styles).forEach(([key, value]) => {
|
|
if (value) node.style.setProperty(`--s-${key}`, format$1(value));
|
|
});
|
|
|
|
return {
|
|
update(newStyles) {
|
|
Object.entries(newStyles).forEach(([key, value]) => {
|
|
if (value) {
|
|
node.style.setProperty(`--s-${key}`, format$1(value));
|
|
delete styles[key];
|
|
}
|
|
});
|
|
|
|
Object.keys(styles).forEach((name) => node.style.removeProperty(`--s-${name}`));
|
|
|
|
styles = newStyles;
|
|
},
|
|
};
|
|
};
|
|
|
|
/* node_modules/svelte-materialify/dist/components/Icon/Icon.svelte generated by Svelte v3.44.1 */
|
|
const file$a = "node_modules/svelte-materialify/dist/components/Icon/Icon.svelte";
|
|
|
|
// (34:2) {#if path}
|
|
function create_if_block$5(ctx) {
|
|
let svg;
|
|
let path_1;
|
|
let svg_viewBox_value;
|
|
let if_block = /*label*/ ctx[10] && create_if_block_1$2(ctx);
|
|
|
|
const block = {
|
|
c: function create() {
|
|
svg = svg_element("svg");
|
|
path_1 = svg_element("path");
|
|
if (if_block) if_block.c();
|
|
attr_dev(path_1, "d", /*path*/ ctx[9]);
|
|
add_location(path_1, file$a, 39, 6, 1586);
|
|
attr_dev(svg, "xmlns", "http://www.w3.org/2000/svg");
|
|
attr_dev(svg, "width", /*width*/ ctx[0]);
|
|
attr_dev(svg, "height", /*height*/ ctx[1]);
|
|
attr_dev(svg, "viewBox", svg_viewBox_value = "0 0 " + /*viewWidth*/ ctx[4] + " " + /*viewHeight*/ ctx[5]);
|
|
add_location(svg, file$a, 34, 4, 1454);
|
|
},
|
|
m: function mount(target, anchor) {
|
|
insert_dev(target, svg, anchor);
|
|
append_dev(svg, path_1);
|
|
if (if_block) if_block.m(path_1, null);
|
|
},
|
|
p: function update(ctx, dirty) {
|
|
if (/*label*/ ctx[10]) {
|
|
if (if_block) {
|
|
if_block.p(ctx, dirty);
|
|
} else {
|
|
if_block = create_if_block_1$2(ctx);
|
|
if_block.c();
|
|
if_block.m(path_1, null);
|
|
}
|
|
} else if (if_block) {
|
|
if_block.d(1);
|
|
if_block = null;
|
|
}
|
|
|
|
if (dirty & /*path*/ 512) {
|
|
attr_dev(path_1, "d", /*path*/ ctx[9]);
|
|
}
|
|
|
|
if (dirty & /*width*/ 1) {
|
|
attr_dev(svg, "width", /*width*/ ctx[0]);
|
|
}
|
|
|
|
if (dirty & /*height*/ 2) {
|
|
attr_dev(svg, "height", /*height*/ ctx[1]);
|
|
}
|
|
|
|
if (dirty & /*viewWidth, viewHeight*/ 48 && svg_viewBox_value !== (svg_viewBox_value = "0 0 " + /*viewWidth*/ ctx[4] + " " + /*viewHeight*/ ctx[5])) {
|
|
attr_dev(svg, "viewBox", svg_viewBox_value);
|
|
}
|
|
},
|
|
d: function destroy(detaching) {
|
|
if (detaching) detach_dev(svg);
|
|
if (if_block) if_block.d();
|
|
}
|
|
};
|
|
|
|
dispatch_dev("SvelteRegisterBlock", {
|
|
block,
|
|
id: create_if_block$5.name,
|
|
type: "if",
|
|
source: "(34:2) {#if path}",
|
|
ctx
|
|
});
|
|
|
|
return block;
|
|
}
|
|
|
|
// (41:8) {#if label}
|
|
function create_if_block_1$2(ctx) {
|
|
let title;
|
|
let t;
|
|
|
|
const block = {
|
|
c: function create() {
|
|
title = svg_element("title");
|
|
t = text(/*label*/ ctx[10]);
|
|
add_location(title, file$a, 41, 10, 1634);
|
|
},
|
|
m: function mount(target, anchor) {
|
|
insert_dev(target, title, anchor);
|
|
append_dev(title, t);
|
|
},
|
|
p: function update(ctx, dirty) {
|
|
if (dirty & /*label*/ 1024) set_data_dev(t, /*label*/ ctx[10]);
|
|
},
|
|
d: function destroy(detaching) {
|
|
if (detaching) detach_dev(title);
|
|
}
|
|
};
|
|
|
|
dispatch_dev("SvelteRegisterBlock", {
|
|
block,
|
|
id: create_if_block_1$2.name,
|
|
type: "if",
|
|
source: "(41:8) {#if label}",
|
|
ctx
|
|
});
|
|
|
|
return block;
|
|
}
|
|
|
|
function create_fragment$a(ctx) {
|
|
let i;
|
|
let t;
|
|
let i_class_value;
|
|
let Style_action;
|
|
let current;
|
|
let mounted;
|
|
let dispose;
|
|
let if_block = /*path*/ ctx[9] && create_if_block$5(ctx);
|
|
const default_slot_template = /*#slots*/ ctx[13].default;
|
|
const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[12], null);
|
|
|
|
const block = {
|
|
c: function create() {
|
|
i = element("i");
|
|
if (if_block) if_block.c();
|
|
t = space();
|
|
if (default_slot) default_slot.c();
|
|
attr_dev(i, "aria-hidden", "true");
|
|
attr_dev(i, "class", i_class_value = "s-icon " + /*klass*/ ctx[2]);
|
|
attr_dev(i, "aria-label", /*label*/ ctx[10]);
|
|
attr_dev(i, "aria-disabled", /*disabled*/ ctx[8]);
|
|
attr_dev(i, "style", /*style*/ ctx[11]);
|
|
toggle_class(i, "spin", /*spin*/ ctx[7]);
|
|
toggle_class(i, "disabled", /*disabled*/ ctx[8]);
|
|
add_location(i, file$a, 24, 0, 1222);
|
|
},
|
|
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, i, anchor);
|
|
if (if_block) if_block.m(i, null);
|
|
append_dev(i, t);
|
|
|
|
if (default_slot) {
|
|
default_slot.m(i, null);
|
|
}
|
|
|
|
current = true;
|
|
|
|
if (!mounted) {
|
|
dispose = action_destroyer(Style_action = Style.call(null, i, {
|
|
'icon-size': /*size*/ ctx[3],
|
|
'icon-rotate': `${/*rotate*/ ctx[6]}deg`
|
|
}));
|
|
|
|
mounted = true;
|
|
}
|
|
},
|
|
p: function update(ctx, [dirty]) {
|
|
if (/*path*/ ctx[9]) {
|
|
if (if_block) {
|
|
if_block.p(ctx, dirty);
|
|
} else {
|
|
if_block = create_if_block$5(ctx);
|
|
if_block.c();
|
|
if_block.m(i, t);
|
|
}
|
|
} else if (if_block) {
|
|
if_block.d(1);
|
|
if_block = null;
|
|
}
|
|
|
|
if (default_slot) {
|
|
if (default_slot.p && (!current || dirty & /*$$scope*/ 4096)) {
|
|
update_slot_base(
|
|
default_slot,
|
|
default_slot_template,
|
|
ctx,
|
|
/*$$scope*/ ctx[12],
|
|
!current
|
|
? get_all_dirty_from_scope(/*$$scope*/ ctx[12])
|
|
: get_slot_changes(default_slot_template, /*$$scope*/ ctx[12], dirty, null),
|
|
null
|
|
);
|
|
}
|
|
}
|
|
|
|
if (!current || dirty & /*klass*/ 4 && i_class_value !== (i_class_value = "s-icon " + /*klass*/ ctx[2])) {
|
|
attr_dev(i, "class", i_class_value);
|
|
}
|
|
|
|
if (!current || dirty & /*label*/ 1024) {
|
|
attr_dev(i, "aria-label", /*label*/ ctx[10]);
|
|
}
|
|
|
|
if (!current || dirty & /*disabled*/ 256) {
|
|
attr_dev(i, "aria-disabled", /*disabled*/ ctx[8]);
|
|
}
|
|
|
|
if (!current || dirty & /*style*/ 2048) {
|
|
attr_dev(i, "style", /*style*/ ctx[11]);
|
|
}
|
|
|
|
if (Style_action && is_function(Style_action.update) && dirty & /*size, rotate*/ 72) Style_action.update.call(null, {
|
|
'icon-size': /*size*/ ctx[3],
|
|
'icon-rotate': `${/*rotate*/ ctx[6]}deg`
|
|
});
|
|
|
|
if (dirty & /*klass, spin*/ 132) {
|
|
toggle_class(i, "spin", /*spin*/ ctx[7]);
|
|
}
|
|
|
|
if (dirty & /*klass, disabled*/ 260) {
|
|
toggle_class(i, "disabled", /*disabled*/ ctx[8]);
|
|
}
|
|
},
|
|
i: function intro(local) {
|
|
if (current) return;
|
|
transition_in(default_slot, local);
|
|
current = true;
|
|
},
|
|
o: function outro(local) {
|
|
transition_out(default_slot, local);
|
|
current = false;
|
|
},
|
|
d: function destroy(detaching) {
|
|
if (detaching) detach_dev(i);
|
|
if (if_block) if_block.d();
|
|
if (default_slot) default_slot.d(detaching);
|
|
mounted = false;
|
|
dispose();
|
|
}
|
|
};
|
|
|
|
dispatch_dev("SvelteRegisterBlock", {
|
|
block,
|
|
id: create_fragment$a.name,
|
|
type: "component",
|
|
source: "",
|
|
ctx
|
|
});
|
|
|
|
return block;
|
|
}
|
|
|
|
function instance$a($$self, $$props, $$invalidate) {
|
|
let { $$slots: slots = {}, $$scope } = $$props;
|
|
validate_slots('Icon', slots, ['default']);
|
|
let { class: klass = '' } = $$props;
|
|
let { size = '24px' } = $$props;
|
|
let { width = size } = $$props;
|
|
let { height = size } = $$props;
|
|
let { viewWidth = '24' } = $$props;
|
|
let { viewHeight = '24' } = $$props;
|
|
let { rotate = 0 } = $$props;
|
|
let { spin = false } = $$props;
|
|
let { disabled = false } = $$props;
|
|
let { path = null } = $$props;
|
|
let { label = null } = $$props;
|
|
let { style = null } = $$props;
|
|
|
|
const writable_props = [
|
|
'class',
|
|
'size',
|
|
'width',
|
|
'height',
|
|
'viewWidth',
|
|
'viewHeight',
|
|
'rotate',
|
|
'spin',
|
|
'disabled',
|
|
'path',
|
|
'label',
|
|
'style'
|
|
];
|
|
|
|
Object.keys($$props).forEach(key => {
|
|
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<Icon> was created with unknown prop '${key}'`);
|
|
});
|
|
|
|
$$self.$$set = $$props => {
|
|
if ('class' in $$props) $$invalidate(2, klass = $$props.class);
|
|
if ('size' in $$props) $$invalidate(3, size = $$props.size);
|
|
if ('width' in $$props) $$invalidate(0, width = $$props.width);
|
|
if ('height' in $$props) $$invalidate(1, height = $$props.height);
|
|
if ('viewWidth' in $$props) $$invalidate(4, viewWidth = $$props.viewWidth);
|
|
if ('viewHeight' in $$props) $$invalidate(5, viewHeight = $$props.viewHeight);
|
|
if ('rotate' in $$props) $$invalidate(6, rotate = $$props.rotate);
|
|
if ('spin' in $$props) $$invalidate(7, spin = $$props.spin);
|
|
if ('disabled' in $$props) $$invalidate(8, disabled = $$props.disabled);
|
|
if ('path' in $$props) $$invalidate(9, path = $$props.path);
|
|
if ('label' in $$props) $$invalidate(10, label = $$props.label);
|
|
if ('style' in $$props) $$invalidate(11, style = $$props.style);
|
|
if ('$$scope' in $$props) $$invalidate(12, $$scope = $$props.$$scope);
|
|
};
|
|
|
|
$$self.$capture_state = () => ({
|
|
Style,
|
|
klass,
|
|
size,
|
|
width,
|
|
height,
|
|
viewWidth,
|
|
viewHeight,
|
|
rotate,
|
|
spin,
|
|
disabled,
|
|
path,
|
|
label,
|
|
style
|
|
});
|
|
|
|
$$self.$inject_state = $$props => {
|
|
if ('klass' in $$props) $$invalidate(2, klass = $$props.klass);
|
|
if ('size' in $$props) $$invalidate(3, size = $$props.size);
|
|
if ('width' in $$props) $$invalidate(0, width = $$props.width);
|
|
if ('height' in $$props) $$invalidate(1, height = $$props.height);
|
|
if ('viewWidth' in $$props) $$invalidate(4, viewWidth = $$props.viewWidth);
|
|
if ('viewHeight' in $$props) $$invalidate(5, viewHeight = $$props.viewHeight);
|
|
if ('rotate' in $$props) $$invalidate(6, rotate = $$props.rotate);
|
|
if ('spin' in $$props) $$invalidate(7, spin = $$props.spin);
|
|
if ('disabled' in $$props) $$invalidate(8, disabled = $$props.disabled);
|
|
if ('path' in $$props) $$invalidate(9, path = $$props.path);
|
|
if ('label' in $$props) $$invalidate(10, label = $$props.label);
|
|
if ('style' in $$props) $$invalidate(11, style = $$props.style);
|
|
};
|
|
|
|
if ($$props && "$$inject" in $$props) {
|
|
$$self.$inject_state($$props.$$inject);
|
|
}
|
|
|
|
$$self.$$.update = () => {
|
|
if ($$self.$$.dirty & /*size*/ 8) {
|
|
{
|
|
$$invalidate(0, width = size);
|
|
$$invalidate(1, height = size);
|
|
}
|
|
}
|
|
};
|
|
|
|
return [
|
|
width,
|
|
height,
|
|
klass,
|
|
size,
|
|
viewWidth,
|
|
viewHeight,
|
|
rotate,
|
|
spin,
|
|
disabled,
|
|
path,
|
|
label,
|
|
style,
|
|
$$scope,
|
|
slots
|
|
];
|
|
}
|
|
|
|
class Icon extends SvelteComponentDev {
|
|
constructor(options) {
|
|
super(options);
|
|
|
|
init(this, options, instance$a, create_fragment$a, safe_not_equal, {
|
|
class: 2,
|
|
size: 3,
|
|
width: 0,
|
|
height: 1,
|
|
viewWidth: 4,
|
|
viewHeight: 5,
|
|
rotate: 6,
|
|
spin: 7,
|
|
disabled: 8,
|
|
path: 9,
|
|
label: 10,
|
|
style: 11
|
|
});
|
|
|
|
dispatch_dev("SvelteRegisterComponent", {
|
|
component: this,
|
|
tagName: "Icon",
|
|
options,
|
|
id: create_fragment$a.name
|
|
});
|
|
}
|
|
|
|
get class() {
|
|
throw new Error("<Icon>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set class(value) {
|
|
throw new Error("<Icon>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get size() {
|
|
throw new Error("<Icon>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set size(value) {
|
|
throw new Error("<Icon>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get width() {
|
|
throw new Error("<Icon>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set width(value) {
|
|
throw new Error("<Icon>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get height() {
|
|
throw new Error("<Icon>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set height(value) {
|
|
throw new Error("<Icon>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get viewWidth() {
|
|
throw new Error("<Icon>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set viewWidth(value) {
|
|
throw new Error("<Icon>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get viewHeight() {
|
|
throw new Error("<Icon>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set viewHeight(value) {
|
|
throw new Error("<Icon>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get rotate() {
|
|
throw new Error("<Icon>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set rotate(value) {
|
|
throw new Error("<Icon>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get spin() {
|
|
throw new Error("<Icon>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set spin(value) {
|
|
throw new Error("<Icon>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get disabled() {
|
|
throw new Error("<Icon>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set disabled(value) {
|
|
throw new Error("<Icon>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get path() {
|
|
throw new Error("<Icon>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set path(value) {
|
|
throw new Error("<Icon>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get label() {
|
|
throw new Error("<Icon>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set label(value) {
|
|
throw new Error("<Icon>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get style() {
|
|
throw new Error("<Icon>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set style(value) {
|
|
throw new Error("<Icon>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
}
|
|
|
|
const filter = (classes) => classes.filter((x) => !!x);
|
|
const format = (classes) => classes.split(' ').filter((x) => !!x);
|
|
|
|
/**
|
|
* @param node {Element}
|
|
* @param classes {Array<string>}
|
|
*/
|
|
var Class = (node, _classes) => {
|
|
let classes = _classes;
|
|
node.classList.add(...format(filter(classes).join(' ')));
|
|
return {
|
|
update(_newClasses) {
|
|
const newClasses = _newClasses;
|
|
newClasses.forEach((klass, i) => {
|
|
if (klass) node.classList.add(...format(klass));
|
|
else if (classes[i]) node.classList.remove(...format(classes[i]));
|
|
});
|
|
classes = newClasses;
|
|
},
|
|
};
|
|
};
|
|
|
|
/* node_modules/svelte-materialify/dist/components/Button/Button.svelte generated by Svelte v3.44.1 */
|
|
const file$9 = "node_modules/svelte-materialify/dist/components/Button/Button.svelte";
|
|
|
|
function create_fragment$9(ctx) {
|
|
let button_1;
|
|
let span;
|
|
let button_1_class_value;
|
|
let Class_action;
|
|
let Ripple_action;
|
|
let current;
|
|
let mounted;
|
|
let dispose;
|
|
const default_slot_template = /*#slots*/ ctx[19].default;
|
|
const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[18], null);
|
|
|
|
let button_1_levels = [
|
|
{
|
|
class: button_1_class_value = "s-btn size-" + /*size*/ ctx[5] + " " + /*klass*/ ctx[1]
|
|
},
|
|
{ type: /*type*/ ctx[14] },
|
|
{ style: /*style*/ ctx[16] },
|
|
{ disabled: /*disabled*/ ctx[11] },
|
|
{ "aria-disabled": /*disabled*/ ctx[11] },
|
|
/*$$restProps*/ ctx[17]
|
|
];
|
|
|
|
let button_1_data = {};
|
|
|
|
for (let i = 0; i < button_1_levels.length; i += 1) {
|
|
button_1_data = assign(button_1_data, button_1_levels[i]);
|
|
}
|
|
|
|
const block_1 = {
|
|
c: function create() {
|
|
button_1 = element("button");
|
|
span = element("span");
|
|
if (default_slot) default_slot.c();
|
|
attr_dev(span, "class", "s-btn__content");
|
|
add_location(span, file$9, 46, 2, 5233);
|
|
set_attributes(button_1, button_1_data);
|
|
toggle_class(button_1, "s-btn--fab", /*fab*/ ctx[2]);
|
|
toggle_class(button_1, "icon", /*icon*/ ctx[3]);
|
|
toggle_class(button_1, "block", /*block*/ ctx[4]);
|
|
toggle_class(button_1, "tile", /*tile*/ ctx[6]);
|
|
toggle_class(button_1, "text", /*text*/ ctx[7] || /*icon*/ ctx[3]);
|
|
toggle_class(button_1, "depressed", /*depressed*/ ctx[8] || /*text*/ ctx[7] || /*disabled*/ ctx[11] || /*outlined*/ ctx[9] || /*icon*/ ctx[3]);
|
|
toggle_class(button_1, "outlined", /*outlined*/ ctx[9]);
|
|
toggle_class(button_1, "rounded", /*rounded*/ ctx[10]);
|
|
toggle_class(button_1, "disabled", /*disabled*/ ctx[11]);
|
|
add_location(button_1, file$9, 26, 0, 4783);
|
|
},
|
|
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, button_1, anchor);
|
|
append_dev(button_1, span);
|
|
|
|
if (default_slot) {
|
|
default_slot.m(span, null);
|
|
}
|
|
|
|
if (button_1.autofocus) button_1.focus();
|
|
/*button_1_binding*/ ctx[21](button_1);
|
|
current = true;
|
|
|
|
if (!mounted) {
|
|
dispose = [
|
|
action_destroyer(Class_action = Class.call(null, button_1, [/*active*/ ctx[12] && /*activeClass*/ ctx[13]])),
|
|
action_destroyer(Ripple_action = Ripple.call(null, button_1, /*ripple*/ ctx[15])),
|
|
listen_dev(button_1, "click", /*click_handler*/ ctx[20], false, false, false)
|
|
];
|
|
|
|
mounted = true;
|
|
}
|
|
},
|
|
p: function update(ctx, [dirty]) {
|
|
if (default_slot) {
|
|
if (default_slot.p && (!current || dirty & /*$$scope*/ 262144)) {
|
|
update_slot_base(
|
|
default_slot,
|
|
default_slot_template,
|
|
ctx,
|
|
/*$$scope*/ ctx[18],
|
|
!current
|
|
? get_all_dirty_from_scope(/*$$scope*/ ctx[18])
|
|
: get_slot_changes(default_slot_template, /*$$scope*/ ctx[18], dirty, null),
|
|
null
|
|
);
|
|
}
|
|
}
|
|
|
|
set_attributes(button_1, button_1_data = get_spread_update(button_1_levels, [
|
|
(!current || dirty & /*size, klass*/ 34 && button_1_class_value !== (button_1_class_value = "s-btn size-" + /*size*/ ctx[5] + " " + /*klass*/ ctx[1])) && { class: button_1_class_value },
|
|
(!current || dirty & /*type*/ 16384) && { type: /*type*/ ctx[14] },
|
|
(!current || dirty & /*style*/ 65536) && { style: /*style*/ ctx[16] },
|
|
(!current || dirty & /*disabled*/ 2048) && { disabled: /*disabled*/ ctx[11] },
|
|
(!current || dirty & /*disabled*/ 2048) && { "aria-disabled": /*disabled*/ ctx[11] },
|
|
dirty & /*$$restProps*/ 131072 && /*$$restProps*/ ctx[17]
|
|
]));
|
|
|
|
if (Class_action && is_function(Class_action.update) && dirty & /*active, activeClass*/ 12288) Class_action.update.call(null, [/*active*/ ctx[12] && /*activeClass*/ ctx[13]]);
|
|
if (Ripple_action && is_function(Ripple_action.update) && dirty & /*ripple*/ 32768) Ripple_action.update.call(null, /*ripple*/ ctx[15]);
|
|
toggle_class(button_1, "s-btn--fab", /*fab*/ ctx[2]);
|
|
toggle_class(button_1, "icon", /*icon*/ ctx[3]);
|
|
toggle_class(button_1, "block", /*block*/ ctx[4]);
|
|
toggle_class(button_1, "tile", /*tile*/ ctx[6]);
|
|
toggle_class(button_1, "text", /*text*/ ctx[7] || /*icon*/ ctx[3]);
|
|
toggle_class(button_1, "depressed", /*depressed*/ ctx[8] || /*text*/ ctx[7] || /*disabled*/ ctx[11] || /*outlined*/ ctx[9] || /*icon*/ ctx[3]);
|
|
toggle_class(button_1, "outlined", /*outlined*/ ctx[9]);
|
|
toggle_class(button_1, "rounded", /*rounded*/ ctx[10]);
|
|
toggle_class(button_1, "disabled", /*disabled*/ ctx[11]);
|
|
},
|
|
i: function intro(local) {
|
|
if (current) return;
|
|
transition_in(default_slot, local);
|
|
current = true;
|
|
},
|
|
o: function outro(local) {
|
|
transition_out(default_slot, local);
|
|
current = false;
|
|
},
|
|
d: function destroy(detaching) {
|
|
if (detaching) detach_dev(button_1);
|
|
if (default_slot) default_slot.d(detaching);
|
|
/*button_1_binding*/ ctx[21](null);
|
|
mounted = false;
|
|
run_all(dispose);
|
|
}
|
|
};
|
|
|
|
dispatch_dev("SvelteRegisterBlock", {
|
|
block: block_1,
|
|
id: create_fragment$9.name,
|
|
type: "component",
|
|
source: "",
|
|
ctx
|
|
});
|
|
|
|
return block_1;
|
|
}
|
|
|
|
function instance$9($$self, $$props, $$invalidate) {
|
|
const omit_props_names = [
|
|
"class","fab","icon","block","size","tile","text","depressed","outlined","rounded","disabled","active","activeClass","type","ripple","style","button"
|
|
];
|
|
|
|
let $$restProps = compute_rest_props($$props, omit_props_names);
|
|
let { $$slots: slots = {}, $$scope } = $$props;
|
|
validate_slots('Button', slots, ['default']);
|
|
let { class: klass = '' } = $$props;
|
|
let { fab = false } = $$props;
|
|
let { icon = false } = $$props;
|
|
let { block = false } = $$props;
|
|
let { size = 'default' } = $$props;
|
|
let { tile = false } = $$props;
|
|
let { text = false } = $$props;
|
|
let { depressed = false } = $$props;
|
|
let { outlined = false } = $$props;
|
|
let { rounded = false } = $$props;
|
|
let { disabled = null } = $$props;
|
|
let { active = false } = $$props;
|
|
let { activeClass = 'active' } = $$props;
|
|
let { type = 'button' } = $$props;
|
|
let { ripple = {} } = $$props;
|
|
let { style = null } = $$props;
|
|
let { button = null } = $$props;
|
|
|
|
function click_handler(event) {
|
|
bubble.call(this, $$self, event);
|
|
}
|
|
|
|
function button_1_binding($$value) {
|
|
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
button = $$value;
|
|
$$invalidate(0, button);
|
|
});
|
|
}
|
|
|
|
$$self.$$set = $$new_props => {
|
|
$$props = assign(assign({}, $$props), exclude_internal_props($$new_props));
|
|
$$invalidate(17, $$restProps = compute_rest_props($$props, omit_props_names));
|
|
if ('class' in $$new_props) $$invalidate(1, klass = $$new_props.class);
|
|
if ('fab' in $$new_props) $$invalidate(2, fab = $$new_props.fab);
|
|
if ('icon' in $$new_props) $$invalidate(3, icon = $$new_props.icon);
|
|
if ('block' in $$new_props) $$invalidate(4, block = $$new_props.block);
|
|
if ('size' in $$new_props) $$invalidate(5, size = $$new_props.size);
|
|
if ('tile' in $$new_props) $$invalidate(6, tile = $$new_props.tile);
|
|
if ('text' in $$new_props) $$invalidate(7, text = $$new_props.text);
|
|
if ('depressed' in $$new_props) $$invalidate(8, depressed = $$new_props.depressed);
|
|
if ('outlined' in $$new_props) $$invalidate(9, outlined = $$new_props.outlined);
|
|
if ('rounded' in $$new_props) $$invalidate(10, rounded = $$new_props.rounded);
|
|
if ('disabled' in $$new_props) $$invalidate(11, disabled = $$new_props.disabled);
|
|
if ('active' in $$new_props) $$invalidate(12, active = $$new_props.active);
|
|
if ('activeClass' in $$new_props) $$invalidate(13, activeClass = $$new_props.activeClass);
|
|
if ('type' in $$new_props) $$invalidate(14, type = $$new_props.type);
|
|
if ('ripple' in $$new_props) $$invalidate(15, ripple = $$new_props.ripple);
|
|
if ('style' in $$new_props) $$invalidate(16, style = $$new_props.style);
|
|
if ('button' in $$new_props) $$invalidate(0, button = $$new_props.button);
|
|
if ('$$scope' in $$new_props) $$invalidate(18, $$scope = $$new_props.$$scope);
|
|
};
|
|
|
|
$$self.$capture_state = () => ({
|
|
Ripple,
|
|
Class,
|
|
klass,
|
|
fab,
|
|
icon,
|
|
block,
|
|
size,
|
|
tile,
|
|
text,
|
|
depressed,
|
|
outlined,
|
|
rounded,
|
|
disabled,
|
|
active,
|
|
activeClass,
|
|
type,
|
|
ripple,
|
|
style,
|
|
button
|
|
});
|
|
|
|
$$self.$inject_state = $$new_props => {
|
|
if ('klass' in $$props) $$invalidate(1, klass = $$new_props.klass);
|
|
if ('fab' in $$props) $$invalidate(2, fab = $$new_props.fab);
|
|
if ('icon' in $$props) $$invalidate(3, icon = $$new_props.icon);
|
|
if ('block' in $$props) $$invalidate(4, block = $$new_props.block);
|
|
if ('size' in $$props) $$invalidate(5, size = $$new_props.size);
|
|
if ('tile' in $$props) $$invalidate(6, tile = $$new_props.tile);
|
|
if ('text' in $$props) $$invalidate(7, text = $$new_props.text);
|
|
if ('depressed' in $$props) $$invalidate(8, depressed = $$new_props.depressed);
|
|
if ('outlined' in $$props) $$invalidate(9, outlined = $$new_props.outlined);
|
|
if ('rounded' in $$props) $$invalidate(10, rounded = $$new_props.rounded);
|
|
if ('disabled' in $$props) $$invalidate(11, disabled = $$new_props.disabled);
|
|
if ('active' in $$props) $$invalidate(12, active = $$new_props.active);
|
|
if ('activeClass' in $$props) $$invalidate(13, activeClass = $$new_props.activeClass);
|
|
if ('type' in $$props) $$invalidate(14, type = $$new_props.type);
|
|
if ('ripple' in $$props) $$invalidate(15, ripple = $$new_props.ripple);
|
|
if ('style' in $$props) $$invalidate(16, style = $$new_props.style);
|
|
if ('button' in $$props) $$invalidate(0, button = $$new_props.button);
|
|
};
|
|
|
|
if ($$props && "$$inject" in $$props) {
|
|
$$self.$inject_state($$props.$$inject);
|
|
}
|
|
|
|
return [
|
|
button,
|
|
klass,
|
|
fab,
|
|
icon,
|
|
block,
|
|
size,
|
|
tile,
|
|
text,
|
|
depressed,
|
|
outlined,
|
|
rounded,
|
|
disabled,
|
|
active,
|
|
activeClass,
|
|
type,
|
|
ripple,
|
|
style,
|
|
$$restProps,
|
|
$$scope,
|
|
slots,
|
|
click_handler,
|
|
button_1_binding
|
|
];
|
|
}
|
|
|
|
class Button extends SvelteComponentDev {
|
|
constructor(options) {
|
|
super(options);
|
|
|
|
init(this, options, instance$9, create_fragment$9, safe_not_equal, {
|
|
class: 1,
|
|
fab: 2,
|
|
icon: 3,
|
|
block: 4,
|
|
size: 5,
|
|
tile: 6,
|
|
text: 7,
|
|
depressed: 8,
|
|
outlined: 9,
|
|
rounded: 10,
|
|
disabled: 11,
|
|
active: 12,
|
|
activeClass: 13,
|
|
type: 14,
|
|
ripple: 15,
|
|
style: 16,
|
|
button: 0
|
|
});
|
|
|
|
dispatch_dev("SvelteRegisterComponent", {
|
|
component: this,
|
|
tagName: "Button",
|
|
options,
|
|
id: create_fragment$9.name
|
|
});
|
|
}
|
|
|
|
get class() {
|
|
throw new Error("<Button>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set class(value) {
|
|
throw new Error("<Button>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get fab() {
|
|
throw new Error("<Button>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set fab(value) {
|
|
throw new Error("<Button>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get icon() {
|
|
throw new Error("<Button>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set icon(value) {
|
|
throw new Error("<Button>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get block() {
|
|
throw new Error("<Button>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set block(value) {
|
|
throw new Error("<Button>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get size() {
|
|
throw new Error("<Button>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set size(value) {
|
|
throw new Error("<Button>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get tile() {
|
|
throw new Error("<Button>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set tile(value) {
|
|
throw new Error("<Button>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get text() {
|
|
throw new Error("<Button>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set text(value) {
|
|
throw new Error("<Button>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get depressed() {
|
|
throw new Error("<Button>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set depressed(value) {
|
|
throw new Error("<Button>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get outlined() {
|
|
throw new Error("<Button>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set outlined(value) {
|
|
throw new Error("<Button>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get rounded() {
|
|
throw new Error("<Button>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set rounded(value) {
|
|
throw new Error("<Button>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get disabled() {
|
|
throw new Error("<Button>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set disabled(value) {
|
|
throw new Error("<Button>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get active() {
|
|
throw new Error("<Button>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set active(value) {
|
|
throw new Error("<Button>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get activeClass() {
|
|
throw new Error("<Button>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set activeClass(value) {
|
|
throw new Error("<Button>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get type() {
|
|
throw new Error("<Button>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set type(value) {
|
|
throw new Error("<Button>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get ripple() {
|
|
throw new Error("<Button>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set ripple(value) {
|
|
throw new Error("<Button>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get style() {
|
|
throw new Error("<Button>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set style(value) {
|
|
throw new Error("<Button>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get button() {
|
|
throw new Error("<Button>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set button(value) {
|
|
throw new Error("<Button>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
}
|
|
|
|
/* eslint-disable */
|
|
// Shamefully ripped from https://github.com/lukeed/uid
|
|
let IDX = 36;
|
|
let HEX = '';
|
|
while (IDX--) HEX += IDX.toString(36);
|
|
|
|
function cubicOut(t) {
|
|
const f = t - 1.0;
|
|
return f * f * f + 1.0;
|
|
}
|
|
|
|
function slide(node, { delay = 0, duration = 400, easing = cubicOut } = {}) {
|
|
const style = getComputedStyle(node);
|
|
const opacity = +style.opacity;
|
|
const height = parseFloat(style.height);
|
|
const padding_top = parseFloat(style.paddingTop);
|
|
const padding_bottom = parseFloat(style.paddingBottom);
|
|
const margin_top = parseFloat(style.marginTop);
|
|
const margin_bottom = parseFloat(style.marginBottom);
|
|
const border_top_width = parseFloat(style.borderTopWidth);
|
|
const border_bottom_width = parseFloat(style.borderBottomWidth);
|
|
return {
|
|
delay,
|
|
duration,
|
|
easing,
|
|
css: t => 'overflow: hidden;' +
|
|
`opacity: ${Math.min(t * 20, 1) * opacity};` +
|
|
`height: ${t * height}px;` +
|
|
`padding-top: ${t * padding_top}px;` +
|
|
`padding-bottom: ${t * padding_bottom}px;` +
|
|
`margin-top: ${t * margin_top}px;` +
|
|
`margin-bottom: ${t * margin_bottom}px;` +
|
|
`border-top-width: ${t * border_top_width}px;` +
|
|
`border-bottom-width: ${t * border_bottom_width}px;`
|
|
};
|
|
}
|
|
|
|
/* eslint-disable no-param-reassign */
|
|
|
|
const themeColors = ['primary', 'secondary', 'success', 'info', 'warning', 'error'];
|
|
|
|
/**
|
|
* @param {string} klass
|
|
*/
|
|
function formatClass(klass) {
|
|
return klass.split(' ').map((i) => {
|
|
if (themeColors.includes(i)) return `${i}-color`;
|
|
return i;
|
|
});
|
|
}
|
|
|
|
function setBackgroundColor(node, text) {
|
|
if (/^(#|rgb|hsl|currentColor)/.test(text)) {
|
|
// This is a CSS hex.
|
|
node.style.backgroundColor = text;
|
|
return false;
|
|
}
|
|
|
|
if (text.startsWith('--')) {
|
|
// This is a CSS variable.
|
|
node.style.backgroundColor = `var(${text})`;
|
|
return false;
|
|
}
|
|
|
|
const klass = formatClass(text);
|
|
node.classList.add(...klass);
|
|
return klass;
|
|
}
|
|
|
|
/**
|
|
* @param node {Element}
|
|
* @param text {string|boolean}
|
|
*/
|
|
var BackgroundColor = (node, text) => {
|
|
let klass;
|
|
if (typeof text === 'string') {
|
|
klass = setBackgroundColor(node, text);
|
|
}
|
|
|
|
return {
|
|
update(newText) {
|
|
if (klass) {
|
|
node.classList.remove(...klass);
|
|
} else {
|
|
node.style.backgroundColor = null;
|
|
}
|
|
|
|
if (typeof newText === 'string') {
|
|
klass = setBackgroundColor(node, newText);
|
|
}
|
|
},
|
|
};
|
|
};
|
|
|
|
/* node_modules/svelte-materialify/dist/components/Divider/Divider.svelte generated by Svelte v3.44.1 */
|
|
|
|
const file$8 = "node_modules/svelte-materialify/dist/components/Divider/Divider.svelte";
|
|
|
|
function create_fragment$8(ctx) {
|
|
let hr;
|
|
let hr_class_value;
|
|
let hr_aria_orientation_value;
|
|
|
|
const block = {
|
|
c: function create() {
|
|
hr = element("hr");
|
|
attr_dev(hr, "class", hr_class_value = "s-divider " + /*klass*/ ctx[0] + " svelte-wwsm4v");
|
|
attr_dev(hr, "role", "separator");
|
|
attr_dev(hr, "aria-orientation", hr_aria_orientation_value = /*vertical*/ ctx[2] ? 'vertical' : 'horizontal');
|
|
attr_dev(hr, "style", /*style*/ ctx[3]);
|
|
toggle_class(hr, "inset", /*inset*/ ctx[1]);
|
|
toggle_class(hr, "vertical", /*vertical*/ ctx[2]);
|
|
add_location(hr, file$8, 10, 0, 715);
|
|
},
|
|
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, hr, anchor);
|
|
},
|
|
p: function update(ctx, [dirty]) {
|
|
if (dirty & /*klass*/ 1 && hr_class_value !== (hr_class_value = "s-divider " + /*klass*/ ctx[0] + " svelte-wwsm4v")) {
|
|
attr_dev(hr, "class", hr_class_value);
|
|
}
|
|
|
|
if (dirty & /*vertical*/ 4 && hr_aria_orientation_value !== (hr_aria_orientation_value = /*vertical*/ ctx[2] ? 'vertical' : 'horizontal')) {
|
|
attr_dev(hr, "aria-orientation", hr_aria_orientation_value);
|
|
}
|
|
|
|
if (dirty & /*style*/ 8) {
|
|
attr_dev(hr, "style", /*style*/ ctx[3]);
|
|
}
|
|
|
|
if (dirty & /*klass, inset*/ 3) {
|
|
toggle_class(hr, "inset", /*inset*/ ctx[1]);
|
|
}
|
|
|
|
if (dirty & /*klass, vertical*/ 5) {
|
|
toggle_class(hr, "vertical", /*vertical*/ ctx[2]);
|
|
}
|
|
},
|
|
i: noop,
|
|
o: noop,
|
|
d: function destroy(detaching) {
|
|
if (detaching) detach_dev(hr);
|
|
}
|
|
};
|
|
|
|
dispatch_dev("SvelteRegisterBlock", {
|
|
block,
|
|
id: create_fragment$8.name,
|
|
type: "component",
|
|
source: "",
|
|
ctx
|
|
});
|
|
|
|
return block;
|
|
}
|
|
|
|
function instance$8($$self, $$props, $$invalidate) {
|
|
let { $$slots: slots = {}, $$scope } = $$props;
|
|
validate_slots('Divider', slots, []);
|
|
let { class: klass = '' } = $$props;
|
|
let { inset = false } = $$props;
|
|
let { vertical = false } = $$props;
|
|
let { style = null } = $$props;
|
|
const writable_props = ['class', 'inset', 'vertical', 'style'];
|
|
|
|
Object.keys($$props).forEach(key => {
|
|
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<Divider> was created with unknown prop '${key}'`);
|
|
});
|
|
|
|
$$self.$$set = $$props => {
|
|
if ('class' in $$props) $$invalidate(0, klass = $$props.class);
|
|
if ('inset' in $$props) $$invalidate(1, inset = $$props.inset);
|
|
if ('vertical' in $$props) $$invalidate(2, vertical = $$props.vertical);
|
|
if ('style' in $$props) $$invalidate(3, style = $$props.style);
|
|
};
|
|
|
|
$$self.$capture_state = () => ({ klass, inset, vertical, style });
|
|
|
|
$$self.$inject_state = $$props => {
|
|
if ('klass' in $$props) $$invalidate(0, klass = $$props.klass);
|
|
if ('inset' in $$props) $$invalidate(1, inset = $$props.inset);
|
|
if ('vertical' in $$props) $$invalidate(2, vertical = $$props.vertical);
|
|
if ('style' in $$props) $$invalidate(3, style = $$props.style);
|
|
};
|
|
|
|
if ($$props && "$$inject" in $$props) {
|
|
$$self.$inject_state($$props.$$inject);
|
|
}
|
|
|
|
return [klass, inset, vertical, style];
|
|
}
|
|
|
|
class Divider extends SvelteComponentDev {
|
|
constructor(options) {
|
|
super(options);
|
|
|
|
init(this, options, instance$8, create_fragment$8, safe_not_equal, {
|
|
class: 0,
|
|
inset: 1,
|
|
vertical: 2,
|
|
style: 3
|
|
});
|
|
|
|
dispatch_dev("SvelteRegisterComponent", {
|
|
component: this,
|
|
tagName: "Divider",
|
|
options,
|
|
id: create_fragment$8.name
|
|
});
|
|
}
|
|
|
|
get class() {
|
|
throw new Error("<Divider>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set class(value) {
|
|
throw new Error("<Divider>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get inset() {
|
|
throw new Error("<Divider>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set inset(value) {
|
|
throw new Error("<Divider>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get vertical() {
|
|
throw new Error("<Divider>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set vertical(value) {
|
|
throw new Error("<Divider>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get style() {
|
|
throw new Error("<Divider>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set style(value) {
|
|
throw new Error("<Divider>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
}
|
|
|
|
/* node_modules/svelte-materialify/dist/components/ProgressLinear/ProgressLinear.svelte generated by Svelte v3.44.1 */
|
|
const file$7 = "node_modules/svelte-materialify/dist/components/ProgressLinear/ProgressLinear.svelte";
|
|
|
|
// (43:2) {:else}
|
|
function create_else_block$1(ctx) {
|
|
let div;
|
|
let BackgroundColor_action;
|
|
let mounted;
|
|
let dispose;
|
|
|
|
const block = {
|
|
c: function create() {
|
|
div = element("div");
|
|
attr_dev(div, "class", "determinate svelte-yd0o6d");
|
|
set_style(div, "width", /*value*/ ctx[1] + "%");
|
|
toggle_class(div, "striped", /*striped*/ ctx[12]);
|
|
add_location(div, file$7, 43, 4, 3255);
|
|
},
|
|
m: function mount(target, anchor) {
|
|
insert_dev(target, div, anchor);
|
|
|
|
if (!mounted) {
|
|
dispose = action_destroyer(BackgroundColor_action = BackgroundColor.call(null, div, /*color*/ ctx[7]));
|
|
mounted = true;
|
|
}
|
|
},
|
|
p: function update(ctx, dirty) {
|
|
if (dirty & /*value*/ 2) {
|
|
set_style(div, "width", /*value*/ ctx[1] + "%");
|
|
}
|
|
|
|
if (BackgroundColor_action && is_function(BackgroundColor_action.update) && dirty & /*color*/ 128) BackgroundColor_action.update.call(null, /*color*/ ctx[7]);
|
|
|
|
if (dirty & /*striped*/ 4096) {
|
|
toggle_class(div, "striped", /*striped*/ ctx[12]);
|
|
}
|
|
},
|
|
d: function destroy(detaching) {
|
|
if (detaching) detach_dev(div);
|
|
mounted = false;
|
|
dispose();
|
|
}
|
|
};
|
|
|
|
dispatch_dev("SvelteRegisterBlock", {
|
|
block,
|
|
id: create_else_block$1.name,
|
|
type: "else",
|
|
source: "(43:2) {:else}",
|
|
ctx
|
|
});
|
|
|
|
return block;
|
|
}
|
|
|
|
// (38:2) {#if indeterminate}
|
|
function create_if_block_1$1(ctx) {
|
|
let div2;
|
|
let div0;
|
|
let t;
|
|
let div1;
|
|
let BackgroundColor_action;
|
|
let mounted;
|
|
let dispose;
|
|
|
|
const block = {
|
|
c: function create() {
|
|
div2 = element("div");
|
|
div0 = element("div");
|
|
t = space();
|
|
div1 = element("div");
|
|
attr_dev(div0, "class", "indeterminate long svelte-yd0o6d");
|
|
add_location(div0, file$7, 39, 6, 3153);
|
|
attr_dev(div1, "class", "indeterminate short svelte-yd0o6d");
|
|
add_location(div1, file$7, 40, 6, 3194);
|
|
add_location(div2, file$7, 38, 4, 3113);
|
|
},
|
|
m: function mount(target, anchor) {
|
|
insert_dev(target, div2, anchor);
|
|
append_dev(div2, div0);
|
|
append_dev(div2, t);
|
|
append_dev(div2, div1);
|
|
|
|
if (!mounted) {
|
|
dispose = action_destroyer(BackgroundColor_action = BackgroundColor.call(null, div2, /*color*/ ctx[7]));
|
|
mounted = true;
|
|
}
|
|
},
|
|
p: function update(ctx, dirty) {
|
|
if (BackgroundColor_action && is_function(BackgroundColor_action.update) && dirty & /*color*/ 128) BackgroundColor_action.update.call(null, /*color*/ ctx[7]);
|
|
},
|
|
d: function destroy(detaching) {
|
|
if (detaching) detach_dev(div2);
|
|
mounted = false;
|
|
dispose();
|
|
}
|
|
};
|
|
|
|
dispatch_dev("SvelteRegisterBlock", {
|
|
block,
|
|
id: create_if_block_1$1.name,
|
|
type: "if",
|
|
source: "(38:2) {#if indeterminate}",
|
|
ctx
|
|
});
|
|
|
|
return block;
|
|
}
|
|
|
|
// (55:2) {#if stream}
|
|
function create_if_block$4(ctx) {
|
|
let div;
|
|
let div_class_value;
|
|
|
|
const block = {
|
|
c: function create() {
|
|
div = element("div");
|
|
attr_dev(div, "class", div_class_value = "stream " + /*color*/ ctx[7] + " svelte-yd0o6d");
|
|
set_style(div, "width", 100 - /*buffer*/ ctx[8] + "%");
|
|
add_location(div, file$7, 55, 4, 3466);
|
|
},
|
|
m: function mount(target, anchor) {
|
|
insert_dev(target, div, anchor);
|
|
},
|
|
p: function update(ctx, dirty) {
|
|
if (dirty & /*color*/ 128 && div_class_value !== (div_class_value = "stream " + /*color*/ ctx[7] + " svelte-yd0o6d")) {
|
|
attr_dev(div, "class", div_class_value);
|
|
}
|
|
|
|
if (dirty & /*buffer*/ 256) {
|
|
set_style(div, "width", 100 - /*buffer*/ ctx[8] + "%");
|
|
}
|
|
},
|
|
d: function destroy(detaching) {
|
|
if (detaching) detach_dev(div);
|
|
}
|
|
};
|
|
|
|
dispatch_dev("SvelteRegisterBlock", {
|
|
block,
|
|
id: create_if_block$4.name,
|
|
type: "if",
|
|
source: "(55:2) {#if stream}",
|
|
ctx
|
|
});
|
|
|
|
return block;
|
|
}
|
|
|
|
function create_fragment$7(ctx) {
|
|
let div2;
|
|
let div0;
|
|
let div0_style_value;
|
|
let BackgroundColor_action;
|
|
let t0;
|
|
let t1;
|
|
let div1;
|
|
let t2;
|
|
let div2_class_value;
|
|
let div2_style_value;
|
|
let current;
|
|
let mounted;
|
|
let dispose;
|
|
|
|
function select_block_type(ctx, dirty) {
|
|
if (/*indeterminate*/ ctx[3]) return create_if_block_1$1;
|
|
return create_else_block$1;
|
|
}
|
|
|
|
let current_block_type = select_block_type(ctx);
|
|
let if_block0 = current_block_type(ctx);
|
|
const default_slot_template = /*#slots*/ ctx[15].default;
|
|
const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[14], null);
|
|
let if_block1 = /*stream*/ ctx[10] && create_if_block$4(ctx);
|
|
|
|
const block = {
|
|
c: function create() {
|
|
div2 = element("div");
|
|
div0 = element("div");
|
|
t0 = space();
|
|
if_block0.c();
|
|
t1 = space();
|
|
div1 = element("div");
|
|
if (default_slot) default_slot.c();
|
|
t2 = space();
|
|
if (if_block1) if_block1.c();
|
|
attr_dev(div0, "class", "background svelte-yd0o6d");
|
|
attr_dev(div0, "style", div0_style_value = "opacity:" + /*backgroundOpacity*/ ctx[6] + ";" + (/*reversed*/ ctx[9] ? 'right' : 'left') + ":" + /*value*/ ctx[1] + "%;width:" + (/*buffer*/ ctx[8] - /*value*/ ctx[1]) + "%");
|
|
add_location(div0, file$7, 32, 2, 2910);
|
|
attr_dev(div1, "class", "s-progress-linear__content svelte-yd0o6d");
|
|
add_location(div1, file$7, 50, 2, 3383);
|
|
attr_dev(div2, "role", "progressbar");
|
|
attr_dev(div2, "aria-valuemin", "0");
|
|
attr_dev(div2, "aria-valuemax", "100");
|
|
attr_dev(div2, "aria-valuenow", /*value*/ ctx[1]);
|
|
attr_dev(div2, "class", div2_class_value = "s-progress-linear " + /*klass*/ ctx[0] + " svelte-yd0o6d");
|
|
attr_dev(div2, "style", div2_style_value = "height:" + /*height*/ ctx[4] + ";" + /*style*/ ctx[13]);
|
|
toggle_class(div2, "inactive", !/*active*/ ctx[2]);
|
|
toggle_class(div2, "reversed", /*reversed*/ ctx[9]);
|
|
toggle_class(div2, "rounded", /*rounded*/ ctx[11]);
|
|
add_location(div2, file$7, 22, 0, 2685);
|
|
},
|
|
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, div2, anchor);
|
|
append_dev(div2, div0);
|
|
append_dev(div2, t0);
|
|
if_block0.m(div2, null);
|
|
append_dev(div2, t1);
|
|
append_dev(div2, div1);
|
|
|
|
if (default_slot) {
|
|
default_slot.m(div1, null);
|
|
}
|
|
|
|
append_dev(div2, t2);
|
|
if (if_block1) if_block1.m(div2, null);
|
|
current = true;
|
|
|
|
if (!mounted) {
|
|
dispose = action_destroyer(BackgroundColor_action = BackgroundColor.call(null, div0, /*backgroundColor*/ ctx[5]));
|
|
mounted = true;
|
|
}
|
|
},
|
|
p: function update(ctx, [dirty]) {
|
|
if (!current || dirty & /*backgroundOpacity, reversed, value, buffer*/ 834 && div0_style_value !== (div0_style_value = "opacity:" + /*backgroundOpacity*/ ctx[6] + ";" + (/*reversed*/ ctx[9] ? 'right' : 'left') + ":" + /*value*/ ctx[1] + "%;width:" + (/*buffer*/ ctx[8] - /*value*/ ctx[1]) + "%")) {
|
|
attr_dev(div0, "style", div0_style_value);
|
|
}
|
|
|
|
if (BackgroundColor_action && is_function(BackgroundColor_action.update) && dirty & /*backgroundColor*/ 32) BackgroundColor_action.update.call(null, /*backgroundColor*/ ctx[5]);
|
|
|
|
if (current_block_type === (current_block_type = select_block_type(ctx)) && if_block0) {
|
|
if_block0.p(ctx, dirty);
|
|
} else {
|
|
if_block0.d(1);
|
|
if_block0 = current_block_type(ctx);
|
|
|
|
if (if_block0) {
|
|
if_block0.c();
|
|
if_block0.m(div2, t1);
|
|
}
|
|
}
|
|
|
|
if (default_slot) {
|
|
if (default_slot.p && (!current || dirty & /*$$scope*/ 16384)) {
|
|
update_slot_base(
|
|
default_slot,
|
|
default_slot_template,
|
|
ctx,
|
|
/*$$scope*/ ctx[14],
|
|
!current
|
|
? get_all_dirty_from_scope(/*$$scope*/ ctx[14])
|
|
: get_slot_changes(default_slot_template, /*$$scope*/ ctx[14], dirty, null),
|
|
null
|
|
);
|
|
}
|
|
}
|
|
|
|
if (/*stream*/ ctx[10]) {
|
|
if (if_block1) {
|
|
if_block1.p(ctx, dirty);
|
|
} else {
|
|
if_block1 = create_if_block$4(ctx);
|
|
if_block1.c();
|
|
if_block1.m(div2, null);
|
|
}
|
|
} else if (if_block1) {
|
|
if_block1.d(1);
|
|
if_block1 = null;
|
|
}
|
|
|
|
if (!current || dirty & /*value*/ 2) {
|
|
attr_dev(div2, "aria-valuenow", /*value*/ ctx[1]);
|
|
}
|
|
|
|
if (!current || dirty & /*klass*/ 1 && div2_class_value !== (div2_class_value = "s-progress-linear " + /*klass*/ ctx[0] + " svelte-yd0o6d")) {
|
|
attr_dev(div2, "class", div2_class_value);
|
|
}
|
|
|
|
if (!current || dirty & /*height, style*/ 8208 && div2_style_value !== (div2_style_value = "height:" + /*height*/ ctx[4] + ";" + /*style*/ ctx[13])) {
|
|
attr_dev(div2, "style", div2_style_value);
|
|
}
|
|
|
|
if (dirty & /*klass, active*/ 5) {
|
|
toggle_class(div2, "inactive", !/*active*/ ctx[2]);
|
|
}
|
|
|
|
if (dirty & /*klass, reversed*/ 513) {
|
|
toggle_class(div2, "reversed", /*reversed*/ ctx[9]);
|
|
}
|
|
|
|
if (dirty & /*klass, rounded*/ 2049) {
|
|
toggle_class(div2, "rounded", /*rounded*/ ctx[11]);
|
|
}
|
|
},
|
|
i: function intro(local) {
|
|
if (current) return;
|
|
transition_in(default_slot, local);
|
|
current = true;
|
|
},
|
|
o: function outro(local) {
|
|
transition_out(default_slot, local);
|
|
current = false;
|
|
},
|
|
d: function destroy(detaching) {
|
|
if (detaching) detach_dev(div2);
|
|
if_block0.d();
|
|
if (default_slot) default_slot.d(detaching);
|
|
if (if_block1) if_block1.d();
|
|
mounted = false;
|
|
dispose();
|
|
}
|
|
};
|
|
|
|
dispatch_dev("SvelteRegisterBlock", {
|
|
block,
|
|
id: create_fragment$7.name,
|
|
type: "component",
|
|
source: "",
|
|
ctx
|
|
});
|
|
|
|
return block;
|
|
}
|
|
|
|
function instance$7($$self, $$props, $$invalidate) {
|
|
let { $$slots: slots = {}, $$scope } = $$props;
|
|
validate_slots('ProgressLinear', slots, ['default']);
|
|
let { class: klass = '' } = $$props;
|
|
let { value = 0 } = $$props;
|
|
let { active = true } = $$props;
|
|
let { indeterminate = false } = $$props;
|
|
let { height = '4px' } = $$props;
|
|
let { backgroundColor = 'primary' } = $$props;
|
|
let { backgroundOpacity = 0.3 } = $$props;
|
|
let { color = backgroundColor } = $$props;
|
|
let { buffer = 100 } = $$props;
|
|
let { reversed = false } = $$props;
|
|
let { stream = false } = $$props;
|
|
let { rounded = false } = $$props;
|
|
let { striped = false } = $$props;
|
|
let { style = '' } = $$props;
|
|
|
|
const writable_props = [
|
|
'class',
|
|
'value',
|
|
'active',
|
|
'indeterminate',
|
|
'height',
|
|
'backgroundColor',
|
|
'backgroundOpacity',
|
|
'color',
|
|
'buffer',
|
|
'reversed',
|
|
'stream',
|
|
'rounded',
|
|
'striped',
|
|
'style'
|
|
];
|
|
|
|
Object.keys($$props).forEach(key => {
|
|
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<ProgressLinear> was created with unknown prop '${key}'`);
|
|
});
|
|
|
|
$$self.$$set = $$props => {
|
|
if ('class' in $$props) $$invalidate(0, klass = $$props.class);
|
|
if ('value' in $$props) $$invalidate(1, value = $$props.value);
|
|
if ('active' in $$props) $$invalidate(2, active = $$props.active);
|
|
if ('indeterminate' in $$props) $$invalidate(3, indeterminate = $$props.indeterminate);
|
|
if ('height' in $$props) $$invalidate(4, height = $$props.height);
|
|
if ('backgroundColor' in $$props) $$invalidate(5, backgroundColor = $$props.backgroundColor);
|
|
if ('backgroundOpacity' in $$props) $$invalidate(6, backgroundOpacity = $$props.backgroundOpacity);
|
|
if ('color' in $$props) $$invalidate(7, color = $$props.color);
|
|
if ('buffer' in $$props) $$invalidate(8, buffer = $$props.buffer);
|
|
if ('reversed' in $$props) $$invalidate(9, reversed = $$props.reversed);
|
|
if ('stream' in $$props) $$invalidate(10, stream = $$props.stream);
|
|
if ('rounded' in $$props) $$invalidate(11, rounded = $$props.rounded);
|
|
if ('striped' in $$props) $$invalidate(12, striped = $$props.striped);
|
|
if ('style' in $$props) $$invalidate(13, style = $$props.style);
|
|
if ('$$scope' in $$props) $$invalidate(14, $$scope = $$props.$$scope);
|
|
};
|
|
|
|
$$self.$capture_state = () => ({
|
|
BackgroundColor,
|
|
klass,
|
|
value,
|
|
active,
|
|
indeterminate,
|
|
height,
|
|
backgroundColor,
|
|
backgroundOpacity,
|
|
color,
|
|
buffer,
|
|
reversed,
|
|
stream,
|
|
rounded,
|
|
striped,
|
|
style
|
|
});
|
|
|
|
$$self.$inject_state = $$props => {
|
|
if ('klass' in $$props) $$invalidate(0, klass = $$props.klass);
|
|
if ('value' in $$props) $$invalidate(1, value = $$props.value);
|
|
if ('active' in $$props) $$invalidate(2, active = $$props.active);
|
|
if ('indeterminate' in $$props) $$invalidate(3, indeterminate = $$props.indeterminate);
|
|
if ('height' in $$props) $$invalidate(4, height = $$props.height);
|
|
if ('backgroundColor' in $$props) $$invalidate(5, backgroundColor = $$props.backgroundColor);
|
|
if ('backgroundOpacity' in $$props) $$invalidate(6, backgroundOpacity = $$props.backgroundOpacity);
|
|
if ('color' in $$props) $$invalidate(7, color = $$props.color);
|
|
if ('buffer' in $$props) $$invalidate(8, buffer = $$props.buffer);
|
|
if ('reversed' in $$props) $$invalidate(9, reversed = $$props.reversed);
|
|
if ('stream' in $$props) $$invalidate(10, stream = $$props.stream);
|
|
if ('rounded' in $$props) $$invalidate(11, rounded = $$props.rounded);
|
|
if ('striped' in $$props) $$invalidate(12, striped = $$props.striped);
|
|
if ('style' in $$props) $$invalidate(13, style = $$props.style);
|
|
};
|
|
|
|
if ($$props && "$$inject" in $$props) {
|
|
$$self.$inject_state($$props.$$inject);
|
|
}
|
|
|
|
return [
|
|
klass,
|
|
value,
|
|
active,
|
|
indeterminate,
|
|
height,
|
|
backgroundColor,
|
|
backgroundOpacity,
|
|
color,
|
|
buffer,
|
|
reversed,
|
|
stream,
|
|
rounded,
|
|
striped,
|
|
style,
|
|
$$scope,
|
|
slots
|
|
];
|
|
}
|
|
|
|
class ProgressLinear extends SvelteComponentDev {
|
|
constructor(options) {
|
|
super(options);
|
|
|
|
init(this, options, instance$7, create_fragment$7, safe_not_equal, {
|
|
class: 0,
|
|
value: 1,
|
|
active: 2,
|
|
indeterminate: 3,
|
|
height: 4,
|
|
backgroundColor: 5,
|
|
backgroundOpacity: 6,
|
|
color: 7,
|
|
buffer: 8,
|
|
reversed: 9,
|
|
stream: 10,
|
|
rounded: 11,
|
|
striped: 12,
|
|
style: 13
|
|
});
|
|
|
|
dispatch_dev("SvelteRegisterComponent", {
|
|
component: this,
|
|
tagName: "ProgressLinear",
|
|
options,
|
|
id: create_fragment$7.name
|
|
});
|
|
}
|
|
|
|
get class() {
|
|
throw new Error("<ProgressLinear>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set class(value) {
|
|
throw new Error("<ProgressLinear>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get value() {
|
|
throw new Error("<ProgressLinear>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set value(value) {
|
|
throw new Error("<ProgressLinear>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get active() {
|
|
throw new Error("<ProgressLinear>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set active(value) {
|
|
throw new Error("<ProgressLinear>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get indeterminate() {
|
|
throw new Error("<ProgressLinear>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set indeterminate(value) {
|
|
throw new Error("<ProgressLinear>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get height() {
|
|
throw new Error("<ProgressLinear>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set height(value) {
|
|
throw new Error("<ProgressLinear>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get backgroundColor() {
|
|
throw new Error("<ProgressLinear>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set backgroundColor(value) {
|
|
throw new Error("<ProgressLinear>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get backgroundOpacity() {
|
|
throw new Error("<ProgressLinear>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set backgroundOpacity(value) {
|
|
throw new Error("<ProgressLinear>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get color() {
|
|
throw new Error("<ProgressLinear>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set color(value) {
|
|
throw new Error("<ProgressLinear>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get buffer() {
|
|
throw new Error("<ProgressLinear>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set buffer(value) {
|
|
throw new Error("<ProgressLinear>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get reversed() {
|
|
throw new Error("<ProgressLinear>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set reversed(value) {
|
|
throw new Error("<ProgressLinear>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get stream() {
|
|
throw new Error("<ProgressLinear>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set stream(value) {
|
|
throw new Error("<ProgressLinear>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get rounded() {
|
|
throw new Error("<ProgressLinear>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set rounded(value) {
|
|
throw new Error("<ProgressLinear>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get striped() {
|
|
throw new Error("<ProgressLinear>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set striped(value) {
|
|
throw new Error("<ProgressLinear>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get style() {
|
|
throw new Error("<ProgressLinear>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set style(value) {
|
|
throw new Error("<ProgressLinear>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
}
|
|
|
|
/* node_modules/svelte-materialify/dist/components/Card/Card.svelte generated by Svelte v3.44.1 */
|
|
const file$6 = "node_modules/svelte-materialify/dist/components/Card/Card.svelte";
|
|
const get_progress_slot_changes = dirty => ({});
|
|
const get_progress_slot_context = ctx => ({});
|
|
|
|
// (31:2) {#if loading}
|
|
function create_if_block$3(ctx) {
|
|
let current;
|
|
const progress_slot_template = /*#slots*/ ctx[12].progress;
|
|
const progress_slot = create_slot(progress_slot_template, ctx, /*$$scope*/ ctx[11], get_progress_slot_context);
|
|
const progress_slot_or_fallback = progress_slot || fallback_block(ctx);
|
|
|
|
const block = {
|
|
c: function create() {
|
|
if (progress_slot_or_fallback) progress_slot_or_fallback.c();
|
|
},
|
|
m: function mount(target, anchor) {
|
|
if (progress_slot_or_fallback) {
|
|
progress_slot_or_fallback.m(target, anchor);
|
|
}
|
|
|
|
current = true;
|
|
},
|
|
p: function update(ctx, dirty) {
|
|
if (progress_slot) {
|
|
if (progress_slot.p && (!current || dirty & /*$$scope*/ 2048)) {
|
|
update_slot_base(
|
|
progress_slot,
|
|
progress_slot_template,
|
|
ctx,
|
|
/*$$scope*/ ctx[11],
|
|
!current
|
|
? get_all_dirty_from_scope(/*$$scope*/ ctx[11])
|
|
: get_slot_changes(progress_slot_template, /*$$scope*/ ctx[11], dirty, get_progress_slot_changes),
|
|
get_progress_slot_context
|
|
);
|
|
}
|
|
}
|
|
},
|
|
i: function intro(local) {
|
|
if (current) return;
|
|
transition_in(progress_slot_or_fallback, local);
|
|
current = true;
|
|
},
|
|
o: function outro(local) {
|
|
transition_out(progress_slot_or_fallback, local);
|
|
current = false;
|
|
},
|
|
d: function destroy(detaching) {
|
|
if (progress_slot_or_fallback) progress_slot_or_fallback.d(detaching);
|
|
}
|
|
};
|
|
|
|
dispatch_dev("SvelteRegisterBlock", {
|
|
block,
|
|
id: create_if_block$3.name,
|
|
type: "if",
|
|
source: "(31:2) {#if loading}",
|
|
ctx
|
|
});
|
|
|
|
return block;
|
|
}
|
|
|
|
// (32:26)
|
|
function fallback_block(ctx) {
|
|
let progresslinear;
|
|
let current;
|
|
|
|
progresslinear = new ProgressLinear({
|
|
props: { indeterminate: true },
|
|
$$inline: true
|
|
});
|
|
|
|
const block = {
|
|
c: function create() {
|
|
create_component(progresslinear.$$.fragment);
|
|
},
|
|
m: function mount(target, anchor) {
|
|
mount_component(progresslinear, target, anchor);
|
|
current = true;
|
|
},
|
|
p: noop,
|
|
i: function intro(local) {
|
|
if (current) return;
|
|
transition_in(progresslinear.$$.fragment, local);
|
|
current = true;
|
|
},
|
|
o: function outro(local) {
|
|
transition_out(progresslinear.$$.fragment, local);
|
|
current = false;
|
|
},
|
|
d: function destroy(detaching) {
|
|
destroy_component(progresslinear, detaching);
|
|
}
|
|
};
|
|
|
|
dispatch_dev("SvelteRegisterBlock", {
|
|
block,
|
|
id: fallback_block.name,
|
|
type: "fallback",
|
|
source: "(32:26) ",
|
|
ctx
|
|
});
|
|
|
|
return block;
|
|
}
|
|
|
|
function create_fragment$6(ctx) {
|
|
let div;
|
|
let t;
|
|
let div_class_value;
|
|
let current;
|
|
let if_block = /*loading*/ ctx[8] && create_if_block$3(ctx);
|
|
const default_slot_template = /*#slots*/ ctx[12].default;
|
|
const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[11], null);
|
|
|
|
const block = {
|
|
c: function create() {
|
|
div = element("div");
|
|
if (if_block) if_block.c();
|
|
t = space();
|
|
if (default_slot) default_slot.c();
|
|
attr_dev(div, "class", div_class_value = "s-card " + /*klass*/ ctx[0]);
|
|
attr_dev(div, "style", /*style*/ ctx[10]);
|
|
toggle_class(div, "flat", /*flat*/ ctx[1]);
|
|
toggle_class(div, "tile", /*tile*/ ctx[2]);
|
|
toggle_class(div, "outlined", /*outlined*/ ctx[3]);
|
|
toggle_class(div, "raised", /*raised*/ ctx[4]);
|
|
toggle_class(div, "shaped", /*shaped*/ ctx[5]);
|
|
toggle_class(div, "hover", /*hover*/ ctx[6]);
|
|
toggle_class(div, "link", /*link*/ ctx[7]);
|
|
toggle_class(div, "disabled", /*disabled*/ ctx[9]);
|
|
add_location(div, file$6, 19, 0, 2223);
|
|
},
|
|
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);
|
|
if (if_block) if_block.m(div, null);
|
|
append_dev(div, t);
|
|
|
|
if (default_slot) {
|
|
default_slot.m(div, null);
|
|
}
|
|
|
|
current = true;
|
|
},
|
|
p: function update(ctx, [dirty]) {
|
|
if (/*loading*/ ctx[8]) {
|
|
if (if_block) {
|
|
if_block.p(ctx, dirty);
|
|
|
|
if (dirty & /*loading*/ 256) {
|
|
transition_in(if_block, 1);
|
|
}
|
|
} else {
|
|
if_block = create_if_block$3(ctx);
|
|
if_block.c();
|
|
transition_in(if_block, 1);
|
|
if_block.m(div, t);
|
|
}
|
|
} else if (if_block) {
|
|
group_outros();
|
|
|
|
transition_out(if_block, 1, 1, () => {
|
|
if_block = null;
|
|
});
|
|
|
|
check_outros();
|
|
}
|
|
|
|
if (default_slot) {
|
|
if (default_slot.p && (!current || dirty & /*$$scope*/ 2048)) {
|
|
update_slot_base(
|
|
default_slot,
|
|
default_slot_template,
|
|
ctx,
|
|
/*$$scope*/ ctx[11],
|
|
!current
|
|
? get_all_dirty_from_scope(/*$$scope*/ ctx[11])
|
|
: get_slot_changes(default_slot_template, /*$$scope*/ ctx[11], dirty, null),
|
|
null
|
|
);
|
|
}
|
|
}
|
|
|
|
if (!current || dirty & /*klass*/ 1 && div_class_value !== (div_class_value = "s-card " + /*klass*/ ctx[0])) {
|
|
attr_dev(div, "class", div_class_value);
|
|
}
|
|
|
|
if (!current || dirty & /*style*/ 1024) {
|
|
attr_dev(div, "style", /*style*/ ctx[10]);
|
|
}
|
|
|
|
if (dirty & /*klass, flat*/ 3) {
|
|
toggle_class(div, "flat", /*flat*/ ctx[1]);
|
|
}
|
|
|
|
if (dirty & /*klass, tile*/ 5) {
|
|
toggle_class(div, "tile", /*tile*/ ctx[2]);
|
|
}
|
|
|
|
if (dirty & /*klass, outlined*/ 9) {
|
|
toggle_class(div, "outlined", /*outlined*/ ctx[3]);
|
|
}
|
|
|
|
if (dirty & /*klass, raised*/ 17) {
|
|
toggle_class(div, "raised", /*raised*/ ctx[4]);
|
|
}
|
|
|
|
if (dirty & /*klass, shaped*/ 33) {
|
|
toggle_class(div, "shaped", /*shaped*/ ctx[5]);
|
|
}
|
|
|
|
if (dirty & /*klass, hover*/ 65) {
|
|
toggle_class(div, "hover", /*hover*/ ctx[6]);
|
|
}
|
|
|
|
if (dirty & /*klass, link*/ 129) {
|
|
toggle_class(div, "link", /*link*/ ctx[7]);
|
|
}
|
|
|
|
if (dirty & /*klass, disabled*/ 513) {
|
|
toggle_class(div, "disabled", /*disabled*/ ctx[9]);
|
|
}
|
|
},
|
|
i: function intro(local) {
|
|
if (current) return;
|
|
transition_in(if_block);
|
|
transition_in(default_slot, local);
|
|
current = true;
|
|
},
|
|
o: function outro(local) {
|
|
transition_out(if_block);
|
|
transition_out(default_slot, local);
|
|
current = false;
|
|
},
|
|
d: function destroy(detaching) {
|
|
if (detaching) detach_dev(div);
|
|
if (if_block) if_block.d();
|
|
if (default_slot) default_slot.d(detaching);
|
|
}
|
|
};
|
|
|
|
dispatch_dev("SvelteRegisterBlock", {
|
|
block,
|
|
id: create_fragment$6.name,
|
|
type: "component",
|
|
source: "",
|
|
ctx
|
|
});
|
|
|
|
return block;
|
|
}
|
|
|
|
function instance$6($$self, $$props, $$invalidate) {
|
|
let { $$slots: slots = {}, $$scope } = $$props;
|
|
validate_slots('Card', slots, ['progress','default']);
|
|
let { class: klass = '' } = $$props;
|
|
let { flat = false } = $$props;
|
|
let { tile = false } = $$props;
|
|
let { outlined = false } = $$props;
|
|
let { raised = false } = $$props;
|
|
let { shaped = false } = $$props;
|
|
let { hover = false } = $$props;
|
|
let { link = false } = $$props;
|
|
let { loading = false } = $$props;
|
|
let { disabled = false } = $$props;
|
|
let { style = null } = $$props;
|
|
|
|
const writable_props = [
|
|
'class',
|
|
'flat',
|
|
'tile',
|
|
'outlined',
|
|
'raised',
|
|
'shaped',
|
|
'hover',
|
|
'link',
|
|
'loading',
|
|
'disabled',
|
|
'style'
|
|
];
|
|
|
|
Object.keys($$props).forEach(key => {
|
|
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<Card> was created with unknown prop '${key}'`);
|
|
});
|
|
|
|
$$self.$$set = $$props => {
|
|
if ('class' in $$props) $$invalidate(0, klass = $$props.class);
|
|
if ('flat' in $$props) $$invalidate(1, flat = $$props.flat);
|
|
if ('tile' in $$props) $$invalidate(2, tile = $$props.tile);
|
|
if ('outlined' in $$props) $$invalidate(3, outlined = $$props.outlined);
|
|
if ('raised' in $$props) $$invalidate(4, raised = $$props.raised);
|
|
if ('shaped' in $$props) $$invalidate(5, shaped = $$props.shaped);
|
|
if ('hover' in $$props) $$invalidate(6, hover = $$props.hover);
|
|
if ('link' in $$props) $$invalidate(7, link = $$props.link);
|
|
if ('loading' in $$props) $$invalidate(8, loading = $$props.loading);
|
|
if ('disabled' in $$props) $$invalidate(9, disabled = $$props.disabled);
|
|
if ('style' in $$props) $$invalidate(10, style = $$props.style);
|
|
if ('$$scope' in $$props) $$invalidate(11, $$scope = $$props.$$scope);
|
|
};
|
|
|
|
$$self.$capture_state = () => ({
|
|
ProgressLinear,
|
|
klass,
|
|
flat,
|
|
tile,
|
|
outlined,
|
|
raised,
|
|
shaped,
|
|
hover,
|
|
link,
|
|
loading,
|
|
disabled,
|
|
style
|
|
});
|
|
|
|
$$self.$inject_state = $$props => {
|
|
if ('klass' in $$props) $$invalidate(0, klass = $$props.klass);
|
|
if ('flat' in $$props) $$invalidate(1, flat = $$props.flat);
|
|
if ('tile' in $$props) $$invalidate(2, tile = $$props.tile);
|
|
if ('outlined' in $$props) $$invalidate(3, outlined = $$props.outlined);
|
|
if ('raised' in $$props) $$invalidate(4, raised = $$props.raised);
|
|
if ('shaped' in $$props) $$invalidate(5, shaped = $$props.shaped);
|
|
if ('hover' in $$props) $$invalidate(6, hover = $$props.hover);
|
|
if ('link' in $$props) $$invalidate(7, link = $$props.link);
|
|
if ('loading' in $$props) $$invalidate(8, loading = $$props.loading);
|
|
if ('disabled' in $$props) $$invalidate(9, disabled = $$props.disabled);
|
|
if ('style' in $$props) $$invalidate(10, style = $$props.style);
|
|
};
|
|
|
|
if ($$props && "$$inject" in $$props) {
|
|
$$self.$inject_state($$props.$$inject);
|
|
}
|
|
|
|
return [
|
|
klass,
|
|
flat,
|
|
tile,
|
|
outlined,
|
|
raised,
|
|
shaped,
|
|
hover,
|
|
link,
|
|
loading,
|
|
disabled,
|
|
style,
|
|
$$scope,
|
|
slots
|
|
];
|
|
}
|
|
|
|
class Card extends SvelteComponentDev {
|
|
constructor(options) {
|
|
super(options);
|
|
|
|
init(this, options, instance$6, create_fragment$6, safe_not_equal, {
|
|
class: 0,
|
|
flat: 1,
|
|
tile: 2,
|
|
outlined: 3,
|
|
raised: 4,
|
|
shaped: 5,
|
|
hover: 6,
|
|
link: 7,
|
|
loading: 8,
|
|
disabled: 9,
|
|
style: 10
|
|
});
|
|
|
|
dispatch_dev("SvelteRegisterComponent", {
|
|
component: this,
|
|
tagName: "Card",
|
|
options,
|
|
id: create_fragment$6.name
|
|
});
|
|
}
|
|
|
|
get class() {
|
|
throw new Error("<Card>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set class(value) {
|
|
throw new Error("<Card>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get flat() {
|
|
throw new Error("<Card>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set flat(value) {
|
|
throw new Error("<Card>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get tile() {
|
|
throw new Error("<Card>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set tile(value) {
|
|
throw new Error("<Card>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get outlined() {
|
|
throw new Error("<Card>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set outlined(value) {
|
|
throw new Error("<Card>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get raised() {
|
|
throw new Error("<Card>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set raised(value) {
|
|
throw new Error("<Card>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get shaped() {
|
|
throw new Error("<Card>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set shaped(value) {
|
|
throw new Error("<Card>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get hover() {
|
|
throw new Error("<Card>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set hover(value) {
|
|
throw new Error("<Card>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get link() {
|
|
throw new Error("<Card>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set link(value) {
|
|
throw new Error("<Card>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get loading() {
|
|
throw new Error("<Card>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set loading(value) {
|
|
throw new Error("<Card>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get disabled() {
|
|
throw new Error("<Card>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set disabled(value) {
|
|
throw new Error("<Card>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get style() {
|
|
throw new Error("<Card>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set style(value) {
|
|
throw new Error("<Card>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
}
|
|
|
|
/* node_modules/svelte-materialify/dist/components/Card/CardActions.svelte generated by Svelte v3.44.1 */
|
|
|
|
const file$5 = "node_modules/svelte-materialify/dist/components/Card/CardActions.svelte";
|
|
|
|
function create_fragment$5(ctx) {
|
|
let div;
|
|
let div_class_value;
|
|
let current;
|
|
const default_slot_template = /*#slots*/ ctx[3].default;
|
|
const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[2], null);
|
|
|
|
const block = {
|
|
c: function create() {
|
|
div = element("div");
|
|
if (default_slot) default_slot.c();
|
|
attr_dev(div, "class", div_class_value = "s-card-actions " + /*klass*/ ctx[0]);
|
|
attr_dev(div, "style", /*style*/ ctx[1]);
|
|
add_location(div, file$5, 8, 0, 224);
|
|
},
|
|
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);
|
|
|
|
if (default_slot) {
|
|
default_slot.m(div, null);
|
|
}
|
|
|
|
current = true;
|
|
},
|
|
p: function update(ctx, [dirty]) {
|
|
if (default_slot) {
|
|
if (default_slot.p && (!current || dirty & /*$$scope*/ 4)) {
|
|
update_slot_base(
|
|
default_slot,
|
|
default_slot_template,
|
|
ctx,
|
|
/*$$scope*/ ctx[2],
|
|
!current
|
|
? get_all_dirty_from_scope(/*$$scope*/ ctx[2])
|
|
: get_slot_changes(default_slot_template, /*$$scope*/ ctx[2], dirty, null),
|
|
null
|
|
);
|
|
}
|
|
}
|
|
|
|
if (!current || dirty & /*klass*/ 1 && div_class_value !== (div_class_value = "s-card-actions " + /*klass*/ ctx[0])) {
|
|
attr_dev(div, "class", div_class_value);
|
|
}
|
|
|
|
if (!current || dirty & /*style*/ 2) {
|
|
attr_dev(div, "style", /*style*/ ctx[1]);
|
|
}
|
|
},
|
|
i: function intro(local) {
|
|
if (current) return;
|
|
transition_in(default_slot, local);
|
|
current = true;
|
|
},
|
|
o: function outro(local) {
|
|
transition_out(default_slot, local);
|
|
current = false;
|
|
},
|
|
d: function destroy(detaching) {
|
|
if (detaching) detach_dev(div);
|
|
if (default_slot) default_slot.d(detaching);
|
|
}
|
|
};
|
|
|
|
dispatch_dev("SvelteRegisterBlock", {
|
|
block,
|
|
id: create_fragment$5.name,
|
|
type: "component",
|
|
source: "",
|
|
ctx
|
|
});
|
|
|
|
return block;
|
|
}
|
|
|
|
function instance$5($$self, $$props, $$invalidate) {
|
|
let { $$slots: slots = {}, $$scope } = $$props;
|
|
validate_slots('CardActions', slots, ['default']);
|
|
let { class: klass = '' } = $$props;
|
|
let { style = null } = $$props;
|
|
const writable_props = ['class', 'style'];
|
|
|
|
Object.keys($$props).forEach(key => {
|
|
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<CardActions> was created with unknown prop '${key}'`);
|
|
});
|
|
|
|
$$self.$$set = $$props => {
|
|
if ('class' in $$props) $$invalidate(0, klass = $$props.class);
|
|
if ('style' in $$props) $$invalidate(1, style = $$props.style);
|
|
if ('$$scope' in $$props) $$invalidate(2, $$scope = $$props.$$scope);
|
|
};
|
|
|
|
$$self.$capture_state = () => ({ klass, style });
|
|
|
|
$$self.$inject_state = $$props => {
|
|
if ('klass' in $$props) $$invalidate(0, klass = $$props.klass);
|
|
if ('style' in $$props) $$invalidate(1, style = $$props.style);
|
|
};
|
|
|
|
if ($$props && "$$inject" in $$props) {
|
|
$$self.$inject_state($$props.$$inject);
|
|
}
|
|
|
|
return [klass, style, $$scope, slots];
|
|
}
|
|
|
|
class CardActions extends SvelteComponentDev {
|
|
constructor(options) {
|
|
super(options);
|
|
init(this, options, instance$5, create_fragment$5, safe_not_equal, { class: 0, style: 1 });
|
|
|
|
dispatch_dev("SvelteRegisterComponent", {
|
|
component: this,
|
|
tagName: "CardActions",
|
|
options,
|
|
id: create_fragment$5.name
|
|
});
|
|
}
|
|
|
|
get class() {
|
|
throw new Error("<CardActions>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set class(value) {
|
|
throw new Error("<CardActions>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get style() {
|
|
throw new Error("<CardActions>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set style(value) {
|
|
throw new Error("<CardActions>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
}
|
|
|
|
/* node_modules/svelte-materialify/dist/components/Card/CardSubtitle.svelte generated by Svelte v3.44.1 */
|
|
|
|
const file$4 = "node_modules/svelte-materialify/dist/components/Card/CardSubtitle.svelte";
|
|
|
|
function create_fragment$4(ctx) {
|
|
let div;
|
|
let div_class_value;
|
|
let current;
|
|
const default_slot_template = /*#slots*/ ctx[3].default;
|
|
const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[2], null);
|
|
|
|
const block = {
|
|
c: function create() {
|
|
div = element("div");
|
|
if (default_slot) default_slot.c();
|
|
attr_dev(div, "class", div_class_value = "s-card-subtitle " + /*klass*/ ctx[0]);
|
|
attr_dev(div, "style", /*style*/ ctx[1]);
|
|
add_location(div, file$4, 8, 0, 375);
|
|
},
|
|
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);
|
|
|
|
if (default_slot) {
|
|
default_slot.m(div, null);
|
|
}
|
|
|
|
current = true;
|
|
},
|
|
p: function update(ctx, [dirty]) {
|
|
if (default_slot) {
|
|
if (default_slot.p && (!current || dirty & /*$$scope*/ 4)) {
|
|
update_slot_base(
|
|
default_slot,
|
|
default_slot_template,
|
|
ctx,
|
|
/*$$scope*/ ctx[2],
|
|
!current
|
|
? get_all_dirty_from_scope(/*$$scope*/ ctx[2])
|
|
: get_slot_changes(default_slot_template, /*$$scope*/ ctx[2], dirty, null),
|
|
null
|
|
);
|
|
}
|
|
}
|
|
|
|
if (!current || dirty & /*klass*/ 1 && div_class_value !== (div_class_value = "s-card-subtitle " + /*klass*/ ctx[0])) {
|
|
attr_dev(div, "class", div_class_value);
|
|
}
|
|
|
|
if (!current || dirty & /*style*/ 2) {
|
|
attr_dev(div, "style", /*style*/ ctx[1]);
|
|
}
|
|
},
|
|
i: function intro(local) {
|
|
if (current) return;
|
|
transition_in(default_slot, local);
|
|
current = true;
|
|
},
|
|
o: function outro(local) {
|
|
transition_out(default_slot, local);
|
|
current = false;
|
|
},
|
|
d: function destroy(detaching) {
|
|
if (detaching) detach_dev(div);
|
|
if (default_slot) default_slot.d(detaching);
|
|
}
|
|
};
|
|
|
|
dispatch_dev("SvelteRegisterBlock", {
|
|
block,
|
|
id: create_fragment$4.name,
|
|
type: "component",
|
|
source: "",
|
|
ctx
|
|
});
|
|
|
|
return block;
|
|
}
|
|
|
|
function instance$4($$self, $$props, $$invalidate) {
|
|
let { $$slots: slots = {}, $$scope } = $$props;
|
|
validate_slots('CardSubtitle', slots, ['default']);
|
|
let { class: klass = '' } = $$props;
|
|
let { style = null } = $$props;
|
|
const writable_props = ['class', 'style'];
|
|
|
|
Object.keys($$props).forEach(key => {
|
|
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<CardSubtitle> was created with unknown prop '${key}'`);
|
|
});
|
|
|
|
$$self.$$set = $$props => {
|
|
if ('class' in $$props) $$invalidate(0, klass = $$props.class);
|
|
if ('style' in $$props) $$invalidate(1, style = $$props.style);
|
|
if ('$$scope' in $$props) $$invalidate(2, $$scope = $$props.$$scope);
|
|
};
|
|
|
|
$$self.$capture_state = () => ({ klass, style });
|
|
|
|
$$self.$inject_state = $$props => {
|
|
if ('klass' in $$props) $$invalidate(0, klass = $$props.klass);
|
|
if ('style' in $$props) $$invalidate(1, style = $$props.style);
|
|
};
|
|
|
|
if ($$props && "$$inject" in $$props) {
|
|
$$self.$inject_state($$props.$$inject);
|
|
}
|
|
|
|
return [klass, style, $$scope, slots];
|
|
}
|
|
|
|
class CardSubtitle extends SvelteComponentDev {
|
|
constructor(options) {
|
|
super(options);
|
|
init(this, options, instance$4, create_fragment$4, safe_not_equal, { class: 0, style: 1 });
|
|
|
|
dispatch_dev("SvelteRegisterComponent", {
|
|
component: this,
|
|
tagName: "CardSubtitle",
|
|
options,
|
|
id: create_fragment$4.name
|
|
});
|
|
}
|
|
|
|
get class() {
|
|
throw new Error("<CardSubtitle>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set class(value) {
|
|
throw new Error("<CardSubtitle>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get style() {
|
|
throw new Error("<CardSubtitle>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set style(value) {
|
|
throw new Error("<CardSubtitle>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
}
|
|
|
|
/* node_modules/svelte-materialify/dist/components/Card/CardTitle.svelte generated by Svelte v3.44.1 */
|
|
|
|
const file$3 = "node_modules/svelte-materialify/dist/components/Card/CardTitle.svelte";
|
|
|
|
function create_fragment$3(ctx) {
|
|
let div;
|
|
let div_class_value;
|
|
let current;
|
|
const default_slot_template = /*#slots*/ ctx[3].default;
|
|
const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[2], null);
|
|
|
|
const block = {
|
|
c: function create() {
|
|
div = element("div");
|
|
if (default_slot) default_slot.c();
|
|
attr_dev(div, "class", div_class_value = "s-card-title " + /*klass*/ ctx[0]);
|
|
attr_dev(div, "style", /*style*/ ctx[1]);
|
|
add_location(div, file$3, 8, 0, 523);
|
|
},
|
|
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);
|
|
|
|
if (default_slot) {
|
|
default_slot.m(div, null);
|
|
}
|
|
|
|
current = true;
|
|
},
|
|
p: function update(ctx, [dirty]) {
|
|
if (default_slot) {
|
|
if (default_slot.p && (!current || dirty & /*$$scope*/ 4)) {
|
|
update_slot_base(
|
|
default_slot,
|
|
default_slot_template,
|
|
ctx,
|
|
/*$$scope*/ ctx[2],
|
|
!current
|
|
? get_all_dirty_from_scope(/*$$scope*/ ctx[2])
|
|
: get_slot_changes(default_slot_template, /*$$scope*/ ctx[2], dirty, null),
|
|
null
|
|
);
|
|
}
|
|
}
|
|
|
|
if (!current || dirty & /*klass*/ 1 && div_class_value !== (div_class_value = "s-card-title " + /*klass*/ ctx[0])) {
|
|
attr_dev(div, "class", div_class_value);
|
|
}
|
|
|
|
if (!current || dirty & /*style*/ 2) {
|
|
attr_dev(div, "style", /*style*/ ctx[1]);
|
|
}
|
|
},
|
|
i: function intro(local) {
|
|
if (current) return;
|
|
transition_in(default_slot, local);
|
|
current = true;
|
|
},
|
|
o: function outro(local) {
|
|
transition_out(default_slot, local);
|
|
current = false;
|
|
},
|
|
d: function destroy(detaching) {
|
|
if (detaching) detach_dev(div);
|
|
if (default_slot) default_slot.d(detaching);
|
|
}
|
|
};
|
|
|
|
dispatch_dev("SvelteRegisterBlock", {
|
|
block,
|
|
id: create_fragment$3.name,
|
|
type: "component",
|
|
source: "",
|
|
ctx
|
|
});
|
|
|
|
return block;
|
|
}
|
|
|
|
function instance$3($$self, $$props, $$invalidate) {
|
|
let { $$slots: slots = {}, $$scope } = $$props;
|
|
validate_slots('CardTitle', slots, ['default']);
|
|
let { class: klass = '' } = $$props;
|
|
let { style = null } = $$props;
|
|
const writable_props = ['class', 'style'];
|
|
|
|
Object.keys($$props).forEach(key => {
|
|
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<CardTitle> was created with unknown prop '${key}'`);
|
|
});
|
|
|
|
$$self.$$set = $$props => {
|
|
if ('class' in $$props) $$invalidate(0, klass = $$props.class);
|
|
if ('style' in $$props) $$invalidate(1, style = $$props.style);
|
|
if ('$$scope' in $$props) $$invalidate(2, $$scope = $$props.$$scope);
|
|
};
|
|
|
|
$$self.$capture_state = () => ({ klass, style });
|
|
|
|
$$self.$inject_state = $$props => {
|
|
if ('klass' in $$props) $$invalidate(0, klass = $$props.klass);
|
|
if ('style' in $$props) $$invalidate(1, style = $$props.style);
|
|
};
|
|
|
|
if ($$props && "$$inject" in $$props) {
|
|
$$self.$inject_state($$props.$$inject);
|
|
}
|
|
|
|
return [klass, style, $$scope, slots];
|
|
}
|
|
|
|
class CardTitle extends SvelteComponentDev {
|
|
constructor(options) {
|
|
super(options);
|
|
init(this, options, instance$3, create_fragment$3, safe_not_equal, { class: 0, style: 1 });
|
|
|
|
dispatch_dev("SvelteRegisterComponent", {
|
|
component: this,
|
|
tagName: "CardTitle",
|
|
options,
|
|
id: create_fragment$3.name
|
|
});
|
|
}
|
|
|
|
get class() {
|
|
throw new Error("<CardTitle>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set class(value) {
|
|
throw new Error("<CardTitle>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get style() {
|
|
throw new Error("<CardTitle>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set style(value) {
|
|
throw new Error("<CardTitle>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
}
|
|
|
|
/* popup.svelte generated by Svelte v3.44.1 */
|
|
|
|
const { console: console_1$2 } = globals;
|
|
const file$2 = "popup.svelte";
|
|
|
|
function get_each_context$1(ctx, list, i) {
|
|
const child_ctx = ctx.slice();
|
|
child_ctx[12] = list[i];
|
|
return child_ctx;
|
|
}
|
|
|
|
// (63:8) {#if images.length > 0 }
|
|
function create_if_block$2(ctx) {
|
|
let each_1_anchor;
|
|
let each_value = /*images*/ ctx[0][/*key*/ ctx[1]];
|
|
validate_each_argument(each_value);
|
|
let each_blocks = [];
|
|
|
|
for (let i = 0; i < each_value.length; i += 1) {
|
|
each_blocks[i] = create_each_block$1(get_each_context$1(ctx, each_value, i));
|
|
}
|
|
|
|
const block = {
|
|
c: function create() {
|
|
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
each_blocks[i].c();
|
|
}
|
|
|
|
each_1_anchor = empty();
|
|
},
|
|
m: function mount(target, anchor) {
|
|
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
each_blocks[i].m(target, anchor);
|
|
}
|
|
|
|
insert_dev(target, each_1_anchor, anchor);
|
|
},
|
|
p: function update(ctx, dirty) {
|
|
if (dirty & /*images, key, addimage*/ 19) {
|
|
each_value = /*images*/ ctx[0][/*key*/ ctx[1]];
|
|
validate_each_argument(each_value);
|
|
let i;
|
|
|
|
for (i = 0; i < each_value.length; i += 1) {
|
|
const child_ctx = get_each_context$1(ctx, each_value, 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(each_1_anchor.parentNode, each_1_anchor);
|
|
}
|
|
}
|
|
|
|
for (; i < each_blocks.length; i += 1) {
|
|
each_blocks[i].d(1);
|
|
}
|
|
|
|
each_blocks.length = each_value.length;
|
|
}
|
|
},
|
|
d: function destroy(detaching) {
|
|
destroy_each(each_blocks, detaching);
|
|
if (detaching) detach_dev(each_1_anchor);
|
|
}
|
|
};
|
|
|
|
dispatch_dev("SvelteRegisterBlock", {
|
|
block,
|
|
id: create_if_block$2.name,
|
|
type: "if",
|
|
source: "(63:8) {#if images.length > 0 }",
|
|
ctx
|
|
});
|
|
|
|
return block;
|
|
}
|
|
|
|
// (64:12) {#each images[key] as x}
|
|
function create_each_block$1(ctx) {
|
|
let li;
|
|
let img;
|
|
let img_src_value;
|
|
let t;
|
|
let mounted;
|
|
let dispose;
|
|
|
|
function click_handler() {
|
|
return /*click_handler*/ ctx[10](/*x*/ ctx[12]);
|
|
}
|
|
|
|
const block = {
|
|
c: function create() {
|
|
li = element("li");
|
|
img = element("img");
|
|
t = space();
|
|
if (!src_url_equal(img.src, img_src_value = /*x*/ ctx[12][0])) attr_dev(img, "src", img_src_value);
|
|
attr_dev(img, "class", "image svelte-n2jonk");
|
|
set_style(img, "width", "50px");
|
|
set_style(img, "height", "50px");
|
|
set_style(img, "object-fit", "cover");
|
|
set_style(img, "border", "1px");
|
|
attr_dev(img, "alt", "background");
|
|
add_location(img, file$2, 64, 21, 1673);
|
|
attr_dev(li, "class", "svelte-n2jonk");
|
|
add_location(li, file$2, 64, 16, 1668);
|
|
},
|
|
m: function mount(target, anchor) {
|
|
insert_dev(target, li, anchor);
|
|
append_dev(li, img);
|
|
append_dev(li, t);
|
|
|
|
if (!mounted) {
|
|
dispose = listen_dev(img, "click", click_handler, false, false, false);
|
|
mounted = true;
|
|
}
|
|
},
|
|
p: function update(new_ctx, dirty) {
|
|
ctx = new_ctx;
|
|
|
|
if (dirty & /*images, key*/ 3 && !src_url_equal(img.src, img_src_value = /*x*/ ctx[12][0])) {
|
|
attr_dev(img, "src", img_src_value);
|
|
}
|
|
},
|
|
d: function destroy(detaching) {
|
|
if (detaching) detach_dev(li);
|
|
mounted = false;
|
|
dispose();
|
|
}
|
|
};
|
|
|
|
dispatch_dev("SvelteRegisterBlock", {
|
|
block,
|
|
id: create_each_block$1.name,
|
|
type: "each",
|
|
source: "(64:12) {#each images[key] as x}",
|
|
ctx
|
|
});
|
|
|
|
return block;
|
|
}
|
|
|
|
function create_fragment$2(ctx) {
|
|
let div;
|
|
let input;
|
|
let t0;
|
|
let ul;
|
|
let t1;
|
|
let img0;
|
|
let img0_src_value;
|
|
let t2;
|
|
let img1;
|
|
let img1_src_value;
|
|
let mounted;
|
|
let dispose;
|
|
let if_block = /*images*/ ctx[0].length > 0 && create_if_block$2(ctx);
|
|
|
|
const block = {
|
|
c: function create() {
|
|
div = element("div");
|
|
input = element("input");
|
|
t0 = space();
|
|
ul = element("ul");
|
|
if (if_block) if_block.c();
|
|
t1 = space();
|
|
img0 = element("img");
|
|
t2 = space();
|
|
img1 = element("img");
|
|
attr_dev(input, "id", "pasta");
|
|
input.required = true;
|
|
attr_dev(input, "class", "svelte-n2jonk");
|
|
add_location(input, file$2, 60, 4, 1526);
|
|
attr_dev(ul, "class", "svelte-n2jonk");
|
|
add_location(ul, file$2, 61, 4, 1577);
|
|
if (!src_url_equal(img0.src, img0_src_value = "./left-arrow.png")) attr_dev(img0, "src", img0_src_value);
|
|
attr_dev(img0, "class", "image svelte-n2jonk");
|
|
set_style(img0, "width", "30px");
|
|
set_style(img0, "height", "30px");
|
|
set_style(img0, "object-fit", "cover");
|
|
attr_dev(img0, "alt", "background");
|
|
add_location(img0, file$2, 69, 8, 1882);
|
|
if (!src_url_equal(img1.src, img1_src_value = "./right-arrow.png")) attr_dev(img1, "src", img1_src_value);
|
|
attr_dev(img1, "class", "image svelte-n2jonk");
|
|
set_style(img1, "width", "30px");
|
|
set_style(img1, "height", "30px");
|
|
set_style(img1, "object-fit", "cover");
|
|
attr_dev(img1, "alt", "background");
|
|
add_location(img1, file$2, 70, 8, 2020);
|
|
attr_dev(div, "class", "scroll svelte-n2jonk");
|
|
add_location(div, file$2, 59, 0, 1501);
|
|
},
|
|
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);
|
|
append_dev(div, input);
|
|
append_dev(div, t0);
|
|
append_dev(div, ul);
|
|
if (if_block) if_block.m(ul, null);
|
|
append_dev(div, t1);
|
|
append_dev(div, img0);
|
|
append_dev(div, t2);
|
|
append_dev(div, img1);
|
|
|
|
if (!mounted) {
|
|
dispose = [
|
|
listen_dev(input, "keypress", /*send*/ ctx[5], false, false, false),
|
|
listen_dev(img0, "click", /*dec*/ ctx[3], false, false, false),
|
|
listen_dev(img1, "click", /*inc*/ ctx[2], false, false, false)
|
|
];
|
|
|
|
mounted = true;
|
|
}
|
|
},
|
|
p: function update(ctx, [dirty]) {
|
|
if (/*images*/ ctx[0].length > 0) {
|
|
if (if_block) {
|
|
if_block.p(ctx, dirty);
|
|
} else {
|
|
if_block = create_if_block$2(ctx);
|
|
if_block.c();
|
|
if_block.m(ul, null);
|
|
}
|
|
} else if (if_block) {
|
|
if_block.d(1);
|
|
if_block = null;
|
|
}
|
|
},
|
|
i: noop,
|
|
o: noop,
|
|
d: function destroy(detaching) {
|
|
if (detaching) detach_dev(div);
|
|
if (if_block) if_block.d();
|
|
mounted = false;
|
|
run_all(dispose);
|
|
}
|
|
};
|
|
|
|
dispatch_dev("SvelteRegisterBlock", {
|
|
block,
|
|
id: create_fragment$2.name,
|
|
type: "component",
|
|
source: "",
|
|
ctx
|
|
});
|
|
|
|
return block;
|
|
}
|
|
|
|
function instance$2($$self, $$props, $$invalidate) {
|
|
let { $$slots: slots = {}, $$scope } = $$props;
|
|
validate_slots('Popup', slots, []);
|
|
let { images } = $$props;
|
|
let { currentbox } = $$props;
|
|
let { boxes } = $$props;
|
|
let { boxset } = $$props;
|
|
let { calories } = $$props;
|
|
|
|
//I don't like that I have to have two of these, but after one of them first sends the message
|
|
//it causes the other component to stop being able to recieve messages.
|
|
//So, unless I find a better solution, I have 2 for now.
|
|
const worker = new Worker('./selectedsearch.js');
|
|
|
|
var key = 0;
|
|
|
|
function inc() {
|
|
if (images.length - 1 != key) {
|
|
console.log(images.length);
|
|
$$invalidate(1, key += 1);
|
|
}
|
|
}
|
|
|
|
function dec() {
|
|
if (key - 1 != -1) {
|
|
$$invalidate(1, key -= 1);
|
|
}
|
|
}
|
|
|
|
function addimage(image) {
|
|
console.log(image);
|
|
console.log(image[2][0]);
|
|
|
|
if (boxes[boxset][currentbox].length == 1) {
|
|
boxes[boxset][currentbox].push(image);
|
|
console.log(calories[boxset]);
|
|
calories[boxset].push(image[2][7]);
|
|
}
|
|
}
|
|
|
|
function send() {
|
|
var value = document.getElementById("pasta").value;
|
|
console.log(value);
|
|
const sendy = { "recipe": images, "search": value };
|
|
worker.postMessage(JSON.stringify(sendy));
|
|
}
|
|
|
|
worker.onmessage = function (message) {
|
|
message = JSON.parse(message["data"]);
|
|
$$invalidate(0, images = []);
|
|
|
|
for (var x in message) {
|
|
$$invalidate(0, images = [...images, message[x]]);
|
|
}
|
|
};
|
|
|
|
const writable_props = ['images', 'currentbox', 'boxes', 'boxset', 'calories'];
|
|
|
|
Object.keys($$props).forEach(key => {
|
|
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console_1$2.warn(`<Popup> was created with unknown prop '${key}'`);
|
|
});
|
|
|
|
const click_handler = x => addimage(x);
|
|
|
|
$$self.$$set = $$props => {
|
|
if ('images' in $$props) $$invalidate(0, images = $$props.images);
|
|
if ('currentbox' in $$props) $$invalidate(6, currentbox = $$props.currentbox);
|
|
if ('boxes' in $$props) $$invalidate(7, boxes = $$props.boxes);
|
|
if ('boxset' in $$props) $$invalidate(8, boxset = $$props.boxset);
|
|
if ('calories' in $$props) $$invalidate(9, calories = $$props.calories);
|
|
};
|
|
|
|
$$self.$capture_state = () => ({
|
|
Card,
|
|
MaterialApp,
|
|
images,
|
|
currentbox,
|
|
boxes,
|
|
boxset,
|
|
calories,
|
|
worker,
|
|
key,
|
|
inc,
|
|
dec,
|
|
addimage,
|
|
send
|
|
});
|
|
|
|
$$self.$inject_state = $$props => {
|
|
if ('images' in $$props) $$invalidate(0, images = $$props.images);
|
|
if ('currentbox' in $$props) $$invalidate(6, currentbox = $$props.currentbox);
|
|
if ('boxes' in $$props) $$invalidate(7, boxes = $$props.boxes);
|
|
if ('boxset' in $$props) $$invalidate(8, boxset = $$props.boxset);
|
|
if ('calories' in $$props) $$invalidate(9, calories = $$props.calories);
|
|
if ('key' in $$props) $$invalidate(1, key = $$props.key);
|
|
};
|
|
|
|
if ($$props && "$$inject" in $$props) {
|
|
$$self.$inject_state($$props.$$inject);
|
|
}
|
|
|
|
return [
|
|
images,
|
|
key,
|
|
inc,
|
|
dec,
|
|
addimage,
|
|
send,
|
|
currentbox,
|
|
boxes,
|
|
boxset,
|
|
calories,
|
|
click_handler
|
|
];
|
|
}
|
|
|
|
class Popup extends SvelteComponentDev {
|
|
constructor(options) {
|
|
super(options);
|
|
|
|
init(this, options, instance$2, create_fragment$2, safe_not_equal, {
|
|
images: 0,
|
|
currentbox: 6,
|
|
boxes: 7,
|
|
boxset: 8,
|
|
calories: 9
|
|
});
|
|
|
|
dispatch_dev("SvelteRegisterComponent", {
|
|
component: this,
|
|
tagName: "Popup",
|
|
options,
|
|
id: create_fragment$2.name
|
|
});
|
|
|
|
const { ctx } = this.$$;
|
|
const props = options.props || {};
|
|
|
|
if (/*images*/ ctx[0] === undefined && !('images' in props)) {
|
|
console_1$2.warn("<Popup> was created without expected prop 'images'");
|
|
}
|
|
|
|
if (/*currentbox*/ ctx[6] === undefined && !('currentbox' in props)) {
|
|
console_1$2.warn("<Popup> was created without expected prop 'currentbox'");
|
|
}
|
|
|
|
if (/*boxes*/ ctx[7] === undefined && !('boxes' in props)) {
|
|
console_1$2.warn("<Popup> was created without expected prop 'boxes'");
|
|
}
|
|
|
|
if (/*boxset*/ ctx[8] === undefined && !('boxset' in props)) {
|
|
console_1$2.warn("<Popup> was created without expected prop 'boxset'");
|
|
}
|
|
|
|
if (/*calories*/ ctx[9] === undefined && !('calories' in props)) {
|
|
console_1$2.warn("<Popup> was created without expected prop 'calories'");
|
|
}
|
|
}
|
|
|
|
get images() {
|
|
throw new Error("<Popup>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set images(value) {
|
|
throw new Error("<Popup>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get currentbox() {
|
|
throw new Error("<Popup>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set currentbox(value) {
|
|
throw new Error("<Popup>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get boxes() {
|
|
throw new Error("<Popup>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set boxes(value) {
|
|
throw new Error("<Popup>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get boxset() {
|
|
throw new Error("<Popup>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set boxset(value) {
|
|
throw new Error("<Popup>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get calories() {
|
|
throw new Error("<Popup>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set calories(value) {
|
|
throw new Error("<Popup>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
}
|
|
|
|
/* Item.svelte generated by Svelte v3.44.1 */
|
|
|
|
const { console: console_1$1 } = globals;
|
|
const file$1 = "Item.svelte";
|
|
|
|
// (105:2) <CardTitle>
|
|
function create_default_slot_7(ctx) {
|
|
let t;
|
|
|
|
const block = {
|
|
c: function create() {
|
|
t = text(/*title*/ ctx[2]);
|
|
},
|
|
m: function mount(target, anchor) {
|
|
insert_dev(target, t, anchor);
|
|
},
|
|
p: function update(ctx, dirty) {
|
|
if (dirty & /*title*/ 4) set_data_dev(t, /*title*/ ctx[2]);
|
|
},
|
|
d: function destroy(detaching) {
|
|
if (detaching) detach_dev(t);
|
|
}
|
|
};
|
|
|
|
dispatch_dev("SvelteRegisterBlock", {
|
|
block,
|
|
id: create_default_slot_7.name,
|
|
type: "slot",
|
|
source: "(105:2) <CardTitle>",
|
|
ctx
|
|
});
|
|
|
|
return block;
|
|
}
|
|
|
|
// (106:2) <CardTitle>
|
|
function create_default_slot_6(ctx) {
|
|
let t;
|
|
|
|
const block = {
|
|
c: function create() {
|
|
t = text(/*author*/ ctx[1]);
|
|
},
|
|
m: function mount(target, anchor) {
|
|
insert_dev(target, t, anchor);
|
|
},
|
|
p: function update(ctx, dirty) {
|
|
if (dirty & /*author*/ 2) set_data_dev(t, /*author*/ ctx[1]);
|
|
},
|
|
d: function destroy(detaching) {
|
|
if (detaching) detach_dev(t);
|
|
}
|
|
};
|
|
|
|
dispatch_dev("SvelteRegisterBlock", {
|
|
block,
|
|
id: create_default_slot_6.name,
|
|
type: "slot",
|
|
source: "(106:2) <CardTitle>",
|
|
ctx
|
|
});
|
|
|
|
return block;
|
|
}
|
|
|
|
// (107:2) <CardSubtitle>
|
|
function create_default_slot_5(ctx) {
|
|
let t;
|
|
|
|
const block = {
|
|
c: function create() {
|
|
t = text(/*subtitle*/ ctx[3]);
|
|
},
|
|
m: function mount(target, anchor) {
|
|
insert_dev(target, t, anchor);
|
|
},
|
|
p: function update(ctx, dirty) {
|
|
if (dirty & /*subtitle*/ 8) set_data_dev(t, /*subtitle*/ ctx[3]);
|
|
},
|
|
d: function destroy(detaching) {
|
|
if (detaching) detach_dev(t);
|
|
}
|
|
};
|
|
|
|
dispatch_dev("SvelteRegisterBlock", {
|
|
block,
|
|
id: create_default_slot_5.name,
|
|
type: "slot",
|
|
source: "(107:2) <CardSubtitle>",
|
|
ctx
|
|
});
|
|
|
|
return block;
|
|
}
|
|
|
|
// (109:4) <Button text>
|
|
function create_default_slot_4(ctx) {
|
|
let t;
|
|
|
|
const block = {
|
|
c: function create() {
|
|
t = text(/*buttontext*/ ctx[4]);
|
|
},
|
|
m: function mount(target, anchor) {
|
|
insert_dev(target, t, anchor);
|
|
},
|
|
p: function update(ctx, dirty) {
|
|
if (dirty & /*buttontext*/ 16) set_data_dev(t, /*buttontext*/ ctx[4]);
|
|
},
|
|
d: function destroy(detaching) {
|
|
if (detaching) detach_dev(t);
|
|
}
|
|
};
|
|
|
|
dispatch_dev("SvelteRegisterBlock", {
|
|
block,
|
|
id: create_default_slot_4.name,
|
|
type: "slot",
|
|
source: "(109:4) <Button text>",
|
|
ctx
|
|
});
|
|
|
|
return block;
|
|
}
|
|
|
|
// (110:4) <Button text fab size="small" class="ml-auto" on:click={toggle}>
|
|
function create_default_slot_3(ctx) {
|
|
let icon;
|
|
let current;
|
|
|
|
icon = new Icon({
|
|
props: {
|
|
path: mdiChevronDown,
|
|
rotate: /*active*/ ctx[7] ? 180 : 0
|
|
},
|
|
$$inline: true
|
|
});
|
|
|
|
const block = {
|
|
c: function create() {
|
|
create_component(icon.$$.fragment);
|
|
},
|
|
m: function mount(target, anchor) {
|
|
mount_component(icon, target, anchor);
|
|
current = true;
|
|
},
|
|
p: function update(ctx, dirty) {
|
|
const icon_changes = {};
|
|
if (dirty & /*active*/ 128) icon_changes.rotate = /*active*/ ctx[7] ? 180 : 0;
|
|
icon.$set(icon_changes);
|
|
},
|
|
i: function intro(local) {
|
|
if (current) return;
|
|
transition_in(icon.$$.fragment, local);
|
|
current = true;
|
|
},
|
|
o: function outro(local) {
|
|
transition_out(icon.$$.fragment, local);
|
|
current = false;
|
|
},
|
|
d: function destroy(detaching) {
|
|
destroy_component(icon, detaching);
|
|
}
|
|
};
|
|
|
|
dispatch_dev("SvelteRegisterBlock", {
|
|
block,
|
|
id: create_default_slot_3.name,
|
|
type: "slot",
|
|
source: "(110:4) <Button text fab size=\\\"small\\\" class=\\\"ml-auto\\\" on:click={toggle}>",
|
|
ctx
|
|
});
|
|
|
|
return block;
|
|
}
|
|
|
|
// (108:2) <CardActions>
|
|
function create_default_slot_2(ctx) {
|
|
let button0;
|
|
let t;
|
|
let button1;
|
|
let current;
|
|
|
|
button0 = new Button({
|
|
props: {
|
|
text: true,
|
|
$$slots: { default: [create_default_slot_4] },
|
|
$$scope: { ctx }
|
|
},
|
|
$$inline: true
|
|
});
|
|
|
|
button1 = new Button({
|
|
props: {
|
|
text: true,
|
|
fab: true,
|
|
size: "small",
|
|
class: "ml-auto",
|
|
$$slots: { default: [create_default_slot_3] },
|
|
$$scope: { ctx }
|
|
},
|
|
$$inline: true
|
|
});
|
|
|
|
button1.$on("click", /*toggle*/ ctx[9]);
|
|
|
|
const block = {
|
|
c: function create() {
|
|
create_component(button0.$$.fragment);
|
|
t = space();
|
|
create_component(button1.$$.fragment);
|
|
},
|
|
m: function mount(target, anchor) {
|
|
mount_component(button0, target, anchor);
|
|
insert_dev(target, t, anchor);
|
|
mount_component(button1, target, anchor);
|
|
current = true;
|
|
},
|
|
p: function update(ctx, dirty) {
|
|
const button0_changes = {};
|
|
|
|
if (dirty & /*$$scope, buttontext*/ 32784) {
|
|
button0_changes.$$scope = { dirty, ctx };
|
|
}
|
|
|
|
button0.$set(button0_changes);
|
|
const button1_changes = {};
|
|
|
|
if (dirty & /*$$scope, active*/ 32896) {
|
|
button1_changes.$$scope = { dirty, ctx };
|
|
}
|
|
|
|
button1.$set(button1_changes);
|
|
},
|
|
i: function intro(local) {
|
|
if (current) return;
|
|
transition_in(button0.$$.fragment, local);
|
|
transition_in(button1.$$.fragment, local);
|
|
current = true;
|
|
},
|
|
o: function outro(local) {
|
|
transition_out(button0.$$.fragment, local);
|
|
transition_out(button1.$$.fragment, local);
|
|
current = false;
|
|
},
|
|
d: function destroy(detaching) {
|
|
destroy_component(button0, detaching);
|
|
if (detaching) detach_dev(t);
|
|
destroy_component(button1, detaching);
|
|
}
|
|
};
|
|
|
|
dispatch_dev("SvelteRegisterBlock", {
|
|
block,
|
|
id: create_default_slot_2.name,
|
|
type: "slot",
|
|
source: "(108:2) <CardActions>",
|
|
ctx
|
|
});
|
|
|
|
return block;
|
|
}
|
|
|
|
// (114:2) {#if active}
|
|
function create_if_block$1(ctx) {
|
|
let div1;
|
|
let divider;
|
|
let t;
|
|
let div0;
|
|
let div1_transition;
|
|
let current;
|
|
divider = new Divider({ $$inline: true });
|
|
|
|
const block = {
|
|
c: function create() {
|
|
div1 = element("div");
|
|
create_component(divider.$$.fragment);
|
|
t = space();
|
|
div0 = element("div");
|
|
attr_dev(div0, "class", "pull svelte-1s9sqyf");
|
|
add_location(div0, file$1, 116, 6, 3060);
|
|
add_location(div1, file$1, 114, 4, 3013);
|
|
},
|
|
m: function mount(target, anchor) {
|
|
insert_dev(target, div1, anchor);
|
|
mount_component(divider, div1, null);
|
|
append_dev(div1, t);
|
|
append_dev(div1, div0);
|
|
div0.innerHTML = /*pulltext*/ ctx[5];
|
|
current = true;
|
|
},
|
|
p: function update(ctx, dirty) {
|
|
if (!current || dirty & /*pulltext*/ 32) div0.innerHTML = /*pulltext*/ ctx[5]; },
|
|
i: function intro(local) {
|
|
if (current) return;
|
|
transition_in(divider.$$.fragment, local);
|
|
|
|
add_render_callback(() => {
|
|
if (!div1_transition) div1_transition = create_bidirectional_transition(div1, slide, {}, true);
|
|
div1_transition.run(1);
|
|
});
|
|
|
|
current = true;
|
|
},
|
|
o: function outro(local) {
|
|
transition_out(divider.$$.fragment, local);
|
|
if (!div1_transition) div1_transition = create_bidirectional_transition(div1, slide, {}, false);
|
|
div1_transition.run(0);
|
|
current = false;
|
|
},
|
|
d: function destroy(detaching) {
|
|
if (detaching) detach_dev(div1);
|
|
destroy_component(divider);
|
|
if (detaching && div1_transition) div1_transition.end();
|
|
}
|
|
};
|
|
|
|
dispatch_dev("SvelteRegisterBlock", {
|
|
block,
|
|
id: create_if_block$1.name,
|
|
type: "if",
|
|
source: "(114:2) {#if active}",
|
|
ctx
|
|
});
|
|
|
|
return block;
|
|
}
|
|
|
|
// (97:0) <Card style="max-width:350px;">
|
|
function create_default_slot_1(ctx) {
|
|
let div2;
|
|
let img0;
|
|
let img0_src_value;
|
|
let t0;
|
|
let div1;
|
|
let div0;
|
|
let img1;
|
|
let img1_src_value;
|
|
let t1;
|
|
let t2;
|
|
let cardtitle0;
|
|
let t3;
|
|
let cardtitle1;
|
|
let t4;
|
|
let cardsubtitle;
|
|
let t5;
|
|
let cardactions;
|
|
let t6;
|
|
let if_block_anchor;
|
|
let current;
|
|
let mounted;
|
|
let dispose;
|
|
|
|
cardtitle0 = new CardTitle({
|
|
props: {
|
|
$$slots: { default: [create_default_slot_7] },
|
|
$$scope: { ctx }
|
|
},
|
|
$$inline: true
|
|
});
|
|
|
|
cardtitle1 = new CardTitle({
|
|
props: {
|
|
$$slots: { default: [create_default_slot_6] },
|
|
$$scope: { ctx }
|
|
},
|
|
$$inline: true
|
|
});
|
|
|
|
cardsubtitle = new CardSubtitle({
|
|
props: {
|
|
$$slots: { default: [create_default_slot_5] },
|
|
$$scope: { ctx }
|
|
},
|
|
$$inline: true
|
|
});
|
|
|
|
cardactions = new CardActions({
|
|
props: {
|
|
$$slots: { default: [create_default_slot_2] },
|
|
$$scope: { ctx }
|
|
},
|
|
$$inline: true
|
|
});
|
|
|
|
let if_block = /*active*/ ctx[7] && create_if_block$1(ctx);
|
|
|
|
const block = {
|
|
c: function create() {
|
|
div2 = element("div");
|
|
img0 = element("img");
|
|
t0 = space();
|
|
div1 = element("div");
|
|
div0 = element("div");
|
|
img1 = element("img");
|
|
t1 = space();
|
|
t2 = text("`\n ");
|
|
create_component(cardtitle0.$$.fragment);
|
|
t3 = space();
|
|
create_component(cardtitle1.$$.fragment);
|
|
t4 = space();
|
|
create_component(cardsubtitle.$$.fragment);
|
|
t5 = space();
|
|
create_component(cardactions.$$.fragment);
|
|
t6 = space();
|
|
if (if_block) if_block.c();
|
|
if_block_anchor = empty();
|
|
if (!src_url_equal(img0.src, img0_src_value = /*img*/ ctx[6])) attr_dev(img0, "src", img0_src_value);
|
|
attr_dev(img0, "class", "image");
|
|
set_style(img0, "width", "300px");
|
|
set_style(img0, "height", "300px");
|
|
set_style(img0, "object-fit", "cover");
|
|
attr_dev(img0, "alt", "background");
|
|
add_location(img0, file$1, 98, 4, 2345);
|
|
set_style(img1, "width", "25px");
|
|
set_style(img1, "height", "25px");
|
|
set_style(img1, "object-fit", "cover");
|
|
attr_dev(img1, "alt", "background");
|
|
if (!src_url_equal(img1.src, img1_src_value = /*toggletable*/ ctx[10][/*status*/ ctx[8]])) attr_dev(img1, "src", img1_src_value);
|
|
add_location(img1, file$1, 101, 25, 2502);
|
|
attr_dev(div0, "class", "text svelte-1s9sqyf");
|
|
add_location(div0, file$1, 101, 6, 2483);
|
|
attr_dev(div1, "class", "overlay svelte-1s9sqyf");
|
|
add_location(div1, file$1, 99, 2, 2452);
|
|
attr_dev(div2, "class", "container svelte-1s9sqyf");
|
|
add_location(div2, file$1, 97, 2, 2317);
|
|
},
|
|
m: function mount(target, anchor) {
|
|
insert_dev(target, div2, anchor);
|
|
append_dev(div2, img0);
|
|
append_dev(div2, t0);
|
|
append_dev(div2, div1);
|
|
append_dev(div1, div0);
|
|
append_dev(div0, img1);
|
|
append_dev(div2, t1);
|
|
insert_dev(target, t2, anchor);
|
|
mount_component(cardtitle0, target, anchor);
|
|
insert_dev(target, t3, anchor);
|
|
mount_component(cardtitle1, target, anchor);
|
|
insert_dev(target, t4, anchor);
|
|
mount_component(cardsubtitle, target, anchor);
|
|
insert_dev(target, t5, anchor);
|
|
mount_component(cardactions, target, anchor);
|
|
insert_dev(target, t6, anchor);
|
|
if (if_block) if_block.m(target, anchor);
|
|
insert_dev(target, if_block_anchor, anchor);
|
|
current = true;
|
|
|
|
if (!mounted) {
|
|
dispose = listen_dev(img1, "click", /*click_handler*/ ctx[13], false, false, false);
|
|
mounted = true;
|
|
}
|
|
},
|
|
p: function update(ctx, dirty) {
|
|
if (!current || dirty & /*img*/ 64 && !src_url_equal(img0.src, img0_src_value = /*img*/ ctx[6])) {
|
|
attr_dev(img0, "src", img0_src_value);
|
|
}
|
|
|
|
if (!current || dirty & /*status*/ 256 && !src_url_equal(img1.src, img1_src_value = /*toggletable*/ ctx[10][/*status*/ ctx[8]])) {
|
|
attr_dev(img1, "src", img1_src_value);
|
|
}
|
|
|
|
const cardtitle0_changes = {};
|
|
|
|
if (dirty & /*$$scope, title*/ 32772) {
|
|
cardtitle0_changes.$$scope = { dirty, ctx };
|
|
}
|
|
|
|
cardtitle0.$set(cardtitle0_changes);
|
|
const cardtitle1_changes = {};
|
|
|
|
if (dirty & /*$$scope, author*/ 32770) {
|
|
cardtitle1_changes.$$scope = { dirty, ctx };
|
|
}
|
|
|
|
cardtitle1.$set(cardtitle1_changes);
|
|
const cardsubtitle_changes = {};
|
|
|
|
if (dirty & /*$$scope, subtitle*/ 32776) {
|
|
cardsubtitle_changes.$$scope = { dirty, ctx };
|
|
}
|
|
|
|
cardsubtitle.$set(cardsubtitle_changes);
|
|
const cardactions_changes = {};
|
|
|
|
if (dirty & /*$$scope, active, buttontext*/ 32912) {
|
|
cardactions_changes.$$scope = { dirty, ctx };
|
|
}
|
|
|
|
cardactions.$set(cardactions_changes);
|
|
|
|
if (/*active*/ ctx[7]) {
|
|
if (if_block) {
|
|
if_block.p(ctx, dirty);
|
|
|
|
if (dirty & /*active*/ 128) {
|
|
transition_in(if_block, 1);
|
|
}
|
|
} else {
|
|
if_block = create_if_block$1(ctx);
|
|
if_block.c();
|
|
transition_in(if_block, 1);
|
|
if_block.m(if_block_anchor.parentNode, if_block_anchor);
|
|
}
|
|
} else if (if_block) {
|
|
group_outros();
|
|
|
|
transition_out(if_block, 1, 1, () => {
|
|
if_block = null;
|
|
});
|
|
|
|
check_outros();
|
|
}
|
|
},
|
|
i: function intro(local) {
|
|
if (current) return;
|
|
transition_in(cardtitle0.$$.fragment, local);
|
|
transition_in(cardtitle1.$$.fragment, local);
|
|
transition_in(cardsubtitle.$$.fragment, local);
|
|
transition_in(cardactions.$$.fragment, local);
|
|
transition_in(if_block);
|
|
current = true;
|
|
},
|
|
o: function outro(local) {
|
|
transition_out(cardtitle0.$$.fragment, local);
|
|
transition_out(cardtitle1.$$.fragment, local);
|
|
transition_out(cardsubtitle.$$.fragment, local);
|
|
transition_out(cardactions.$$.fragment, local);
|
|
transition_out(if_block);
|
|
current = false;
|
|
},
|
|
d: function destroy(detaching) {
|
|
if (detaching) detach_dev(div2);
|
|
if (detaching) detach_dev(t2);
|
|
destroy_component(cardtitle0, detaching);
|
|
if (detaching) detach_dev(t3);
|
|
destroy_component(cardtitle1, detaching);
|
|
if (detaching) detach_dev(t4);
|
|
destroy_component(cardsubtitle, detaching);
|
|
if (detaching) detach_dev(t5);
|
|
destroy_component(cardactions, detaching);
|
|
if (detaching) detach_dev(t6);
|
|
if (if_block) if_block.d(detaching);
|
|
if (detaching) detach_dev(if_block_anchor);
|
|
mounted = false;
|
|
dispose();
|
|
}
|
|
};
|
|
|
|
dispatch_dev("SvelteRegisterBlock", {
|
|
block,
|
|
id: create_default_slot_1.name,
|
|
type: "slot",
|
|
source: "(97:0) <Card style=\\\"max-width:350px;\\\">",
|
|
ctx
|
|
});
|
|
|
|
return block;
|
|
}
|
|
|
|
// (93:0) <MaterialApp>
|
|
function create_default_slot(ctx) {
|
|
let div;
|
|
let card;
|
|
let current;
|
|
|
|
card = new Card({
|
|
props: {
|
|
style: "max-width:350px;",
|
|
$$slots: { default: [create_default_slot_1] },
|
|
$$scope: { ctx }
|
|
},
|
|
$$inline: true
|
|
});
|
|
|
|
const block = {
|
|
c: function create() {
|
|
div = element("div");
|
|
create_component(card.$$.fragment);
|
|
attr_dev(div, "class", "d-flex justify-center mt-4 mb-4");
|
|
add_location(div, file$1, 94, 0, 2236);
|
|
},
|
|
m: function mount(target, anchor) {
|
|
insert_dev(target, div, anchor);
|
|
mount_component(card, div, null);
|
|
current = true;
|
|
},
|
|
p: function update(ctx, dirty) {
|
|
const card_changes = {};
|
|
|
|
if (dirty & /*$$scope, pulltext, active, buttontext, subtitle, author, title, status, testlist, img*/ 33279) {
|
|
card_changes.$$scope = { dirty, ctx };
|
|
}
|
|
|
|
card.$set(card_changes);
|
|
},
|
|
i: function intro(local) {
|
|
if (current) return;
|
|
transition_in(card.$$.fragment, local);
|
|
current = true;
|
|
},
|
|
o: function outro(local) {
|
|
transition_out(card.$$.fragment, local);
|
|
current = false;
|
|
},
|
|
d: function destroy(detaching) {
|
|
if (detaching) detach_dev(div);
|
|
destroy_component(card);
|
|
}
|
|
};
|
|
|
|
dispatch_dev("SvelteRegisterBlock", {
|
|
block,
|
|
id: create_default_slot.name,
|
|
type: "slot",
|
|
source: "(93:0) <MaterialApp>",
|
|
ctx
|
|
});
|
|
|
|
return block;
|
|
}
|
|
|
|
function create_fragment$1(ctx) {
|
|
let materialapp;
|
|
let current;
|
|
|
|
materialapp = new MaterialApp({
|
|
props: {
|
|
$$slots: { default: [create_default_slot] },
|
|
$$scope: { ctx }
|
|
},
|
|
$$inline: true
|
|
});
|
|
|
|
const block = {
|
|
c: function create() {
|
|
create_component(materialapp.$$.fragment);
|
|
},
|
|
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) {
|
|
mount_component(materialapp, target, anchor);
|
|
current = true;
|
|
},
|
|
p: function update(ctx, [dirty]) {
|
|
const materialapp_changes = {};
|
|
|
|
if (dirty & /*$$scope, pulltext, active, buttontext, subtitle, author, title, status, testlist, img*/ 33279) {
|
|
materialapp_changes.$$scope = { dirty, ctx };
|
|
}
|
|
|
|
materialapp.$set(materialapp_changes);
|
|
},
|
|
i: function intro(local) {
|
|
if (current) return;
|
|
transition_in(materialapp.$$.fragment, local);
|
|
current = true;
|
|
},
|
|
o: function outro(local) {
|
|
transition_out(materialapp.$$.fragment, local);
|
|
current = false;
|
|
},
|
|
d: function destroy(detaching) {
|
|
destroy_component(materialapp, detaching);
|
|
}
|
|
};
|
|
|
|
dispatch_dev("SvelteRegisterBlock", {
|
|
block,
|
|
id: create_fragment$1.name,
|
|
type: "component",
|
|
source: "",
|
|
ctx
|
|
});
|
|
|
|
return block;
|
|
}
|
|
|
|
function removeImage(a, b) {
|
|
//we find the element and we remove it
|
|
//sooooo turns out you can't compare arrays in JS so foreach and == does not work. I will now write my own function
|
|
function compareList(a, b) {
|
|
return a.join == b.join;
|
|
}
|
|
|
|
function spliceif(array, indice) {
|
|
var index = -1;
|
|
|
|
//as stated above, indexOf doesn't work with lists because == doesn't work with lists because == is actually === which actually is stupid
|
|
for (var x in array) {
|
|
var current = array[x];
|
|
|
|
if (compareList(current, indice)) {
|
|
index = x;
|
|
break;
|
|
}
|
|
}
|
|
|
|
if (index != -1) {
|
|
array.splice(index, 1);
|
|
} else {
|
|
console.log("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA");
|
|
}
|
|
}
|
|
|
|
//so we filter each array in the arra
|
|
a.filter(y => spliceif(y, b));
|
|
}
|
|
|
|
function instance$1($$self, $$props, $$invalidate) {
|
|
let { $$slots: slots = {}, $$scope } = $$props;
|
|
validate_slots('Item', slots, []);
|
|
let active = false;
|
|
|
|
function toggle() {
|
|
$$invalidate(7, active = !active);
|
|
}
|
|
|
|
let { author } = $$props;
|
|
let { title } = $$props;
|
|
let { subtitle } = $$props;
|
|
let { buttontext } = $$props;
|
|
let { pulltext } = $$props;
|
|
let { img } = $$props;
|
|
let { testlist } = $$props;
|
|
let { calories } = $$props;
|
|
var status = false;
|
|
|
|
var toggletable = {
|
|
true: "./liked.png",
|
|
false: "./unliked.png"
|
|
};
|
|
|
|
function test() {
|
|
console.log("enter");
|
|
console.log(testlist);
|
|
|
|
//this guy makes sure that testlist has a max size of 9 <
|
|
if (!listcontains(title)) {
|
|
console.log("?????");
|
|
|
|
if (testlist.length == 0) {
|
|
testlist.push([]);
|
|
}
|
|
|
|
if (testlist.at(-1).length == 9) {
|
|
testlist.push([]);
|
|
}
|
|
|
|
testlist.at(-1).push([img, title, calories]);
|
|
$$invalidate(8, status = true);
|
|
return testlist;
|
|
} else {
|
|
removeImage(testlist, [img, title, calories]);
|
|
console.log(calories);
|
|
$$invalidate(8, status = false);
|
|
return testlist;
|
|
}
|
|
}
|
|
|
|
function listcontains(string) {
|
|
return testlist.join().includes(string);
|
|
}
|
|
|
|
if (listcontains(title)) {
|
|
status = true;
|
|
}
|
|
|
|
const writable_props = [
|
|
'author',
|
|
'title',
|
|
'subtitle',
|
|
'buttontext',
|
|
'pulltext',
|
|
'img',
|
|
'testlist',
|
|
'calories'
|
|
];
|
|
|
|
Object.keys($$props).forEach(key => {
|
|
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console_1$1.warn(`<Item> was created with unknown prop '${key}'`);
|
|
});
|
|
|
|
const click_handler = () => $$invalidate(0, testlist = test());
|
|
|
|
$$self.$$set = $$props => {
|
|
if ('author' in $$props) $$invalidate(1, author = $$props.author);
|
|
if ('title' in $$props) $$invalidate(2, title = $$props.title);
|
|
if ('subtitle' in $$props) $$invalidate(3, subtitle = $$props.subtitle);
|
|
if ('buttontext' in $$props) $$invalidate(4, buttontext = $$props.buttontext);
|
|
if ('pulltext' in $$props) $$invalidate(5, pulltext = $$props.pulltext);
|
|
if ('img' in $$props) $$invalidate(6, img = $$props.img);
|
|
if ('testlist' in $$props) $$invalidate(0, testlist = $$props.testlist);
|
|
if ('calories' in $$props) $$invalidate(12, calories = $$props.calories);
|
|
};
|
|
|
|
$$self.$capture_state = () => ({
|
|
Card,
|
|
CardTitle,
|
|
CardSubtitle,
|
|
CardActions,
|
|
Button,
|
|
Icon,
|
|
Divider,
|
|
MaterialApp,
|
|
slide,
|
|
mdiChevronDown,
|
|
active,
|
|
toggle,
|
|
author,
|
|
title,
|
|
subtitle,
|
|
buttontext,
|
|
pulltext,
|
|
img,
|
|
testlist,
|
|
calories,
|
|
status,
|
|
toggletable,
|
|
test,
|
|
listcontains,
|
|
removeImage
|
|
});
|
|
|
|
$$self.$inject_state = $$props => {
|
|
if ('active' in $$props) $$invalidate(7, active = $$props.active);
|
|
if ('author' in $$props) $$invalidate(1, author = $$props.author);
|
|
if ('title' in $$props) $$invalidate(2, title = $$props.title);
|
|
if ('subtitle' in $$props) $$invalidate(3, subtitle = $$props.subtitle);
|
|
if ('buttontext' in $$props) $$invalidate(4, buttontext = $$props.buttontext);
|
|
if ('pulltext' in $$props) $$invalidate(5, pulltext = $$props.pulltext);
|
|
if ('img' in $$props) $$invalidate(6, img = $$props.img);
|
|
if ('testlist' in $$props) $$invalidate(0, testlist = $$props.testlist);
|
|
if ('calories' in $$props) $$invalidate(12, calories = $$props.calories);
|
|
if ('status' in $$props) $$invalidate(8, status = $$props.status);
|
|
if ('toggletable' in $$props) $$invalidate(10, toggletable = $$props.toggletable);
|
|
};
|
|
|
|
if ($$props && "$$inject" in $$props) {
|
|
$$self.$inject_state($$props.$$inject);
|
|
}
|
|
|
|
return [
|
|
testlist,
|
|
author,
|
|
title,
|
|
subtitle,
|
|
buttontext,
|
|
pulltext,
|
|
img,
|
|
active,
|
|
status,
|
|
toggle,
|
|
toggletable,
|
|
test,
|
|
calories,
|
|
click_handler
|
|
];
|
|
}
|
|
|
|
class Item extends SvelteComponentDev {
|
|
constructor(options) {
|
|
super(options);
|
|
|
|
init(this, options, instance$1, create_fragment$1, safe_not_equal, {
|
|
author: 1,
|
|
title: 2,
|
|
subtitle: 3,
|
|
buttontext: 4,
|
|
pulltext: 5,
|
|
img: 6,
|
|
testlist: 0,
|
|
calories: 12
|
|
});
|
|
|
|
dispatch_dev("SvelteRegisterComponent", {
|
|
component: this,
|
|
tagName: "Item",
|
|
options,
|
|
id: create_fragment$1.name
|
|
});
|
|
|
|
const { ctx } = this.$$;
|
|
const props = options.props || {};
|
|
|
|
if (/*author*/ ctx[1] === undefined && !('author' in props)) {
|
|
console_1$1.warn("<Item> was created without expected prop 'author'");
|
|
}
|
|
|
|
if (/*title*/ ctx[2] === undefined && !('title' in props)) {
|
|
console_1$1.warn("<Item> was created without expected prop 'title'");
|
|
}
|
|
|
|
if (/*subtitle*/ ctx[3] === undefined && !('subtitle' in props)) {
|
|
console_1$1.warn("<Item> was created without expected prop 'subtitle'");
|
|
}
|
|
|
|
if (/*buttontext*/ ctx[4] === undefined && !('buttontext' in props)) {
|
|
console_1$1.warn("<Item> was created without expected prop 'buttontext'");
|
|
}
|
|
|
|
if (/*pulltext*/ ctx[5] === undefined && !('pulltext' in props)) {
|
|
console_1$1.warn("<Item> was created without expected prop 'pulltext'");
|
|
}
|
|
|
|
if (/*img*/ ctx[6] === undefined && !('img' in props)) {
|
|
console_1$1.warn("<Item> was created without expected prop 'img'");
|
|
}
|
|
|
|
if (/*testlist*/ ctx[0] === undefined && !('testlist' in props)) {
|
|
console_1$1.warn("<Item> was created without expected prop 'testlist'");
|
|
}
|
|
|
|
if (/*calories*/ ctx[12] === undefined && !('calories' in props)) {
|
|
console_1$1.warn("<Item> was created without expected prop 'calories'");
|
|
}
|
|
}
|
|
|
|
get author() {
|
|
throw new Error("<Item>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set author(value) {
|
|
throw new Error("<Item>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get title() {
|
|
throw new Error("<Item>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set title(value) {
|
|
throw new Error("<Item>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get subtitle() {
|
|
throw new Error("<Item>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set subtitle(value) {
|
|
throw new Error("<Item>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get buttontext() {
|
|
throw new Error("<Item>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set buttontext(value) {
|
|
throw new Error("<Item>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get pulltext() {
|
|
throw new Error("<Item>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set pulltext(value) {
|
|
throw new Error("<Item>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get img() {
|
|
throw new Error("<Item>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set img(value) {
|
|
throw new Error("<Item>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get testlist() {
|
|
throw new Error("<Item>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set testlist(value) {
|
|
throw new Error("<Item>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
get calories() {
|
|
throw new Error("<Item>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
|
|
set calories(value) {
|
|
throw new Error("<Item>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
|
}
|
|
}
|
|
|
|
/* App.svelte generated by Svelte v3.44.1 */
|
|
|
|
const { Object: Object_1, console: console_1 } = globals;
|
|
const file = "App.svelte";
|
|
|
|
function get_each_context_1(ctx, list, i) {
|
|
const child_ctx = ctx.slice();
|
|
child_ctx[26] = list[i];
|
|
return child_ctx;
|
|
}
|
|
|
|
function get_each_context(ctx, list, i) {
|
|
const child_ctx = ctx.slice();
|
|
child_ctx[23] = list[i];
|
|
return child_ctx;
|
|
}
|
|
|
|
function get_each_context_2(ctx, list, i) {
|
|
const child_ctx = ctx.slice();
|
|
child_ctx[9] = list[i];
|
|
return child_ctx;
|
|
}
|
|
|
|
// (143:3) {#each questions as question}
|
|
function create_each_block_2(ctx) {
|
|
let option;
|
|
let t0_value = /*question*/ ctx[9][1] + "";
|
|
let t0;
|
|
let t1;
|
|
|
|
const block = {
|
|
c: function create() {
|
|
option = element("option");
|
|
t0 = text(t0_value);
|
|
t1 = space();
|
|
option.__value = /*question*/ ctx[9][0];
|
|
option.value = option.__value;
|
|
add_location(option, file, 143, 4, 3980);
|
|
},
|
|
m: function mount(target, anchor) {
|
|
insert_dev(target, option, anchor);
|
|
append_dev(option, t0);
|
|
append_dev(option, t1);
|
|
},
|
|
p: noop,
|
|
d: function destroy(detaching) {
|
|
if (detaching) detach_dev(option);
|
|
}
|
|
};
|
|
|
|
dispatch_dev("SvelteRegisterBlock", {
|
|
block,
|
|
id: create_each_block_2.name,
|
|
type: "each",
|
|
source: "(143:3) {#each questions as question}",
|
|
ctx
|
|
});
|
|
|
|
return block;
|
|
}
|
|
|
|
// (181:2) {:else}
|
|
function create_else_block_1(ctx) {
|
|
let button;
|
|
let t1;
|
|
let div;
|
|
let current;
|
|
let mounted;
|
|
let dispose;
|
|
let each_value_1 = /*ping*/ ctx[8];
|
|
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 out = i => transition_out(each_blocks[i], 1, 1, () => {
|
|
each_blocks[i] = null;
|
|
});
|
|
|
|
const block = {
|
|
c: function create() {
|
|
button = element("button");
|
|
button.textContent = "\"GO BACK\"";
|
|
t1 = space();
|
|
div = element("div");
|
|
|
|
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
each_blocks[i].c();
|
|
}
|
|
|
|
attr_dev(button, "id", "button");
|
|
attr_dev(button, "class", "svelte-5wk4cv");
|
|
add_location(button, file, 181, 3, 5437);
|
|
attr_dev(div, "class", "scroll svelte-5wk4cv");
|
|
add_location(div, file, 184, 3, 5506);
|
|
},
|
|
m: function mount(target, anchor) {
|
|
insert_dev(target, button, anchor);
|
|
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);
|
|
}
|
|
|
|
current = true;
|
|
|
|
if (!mounted) {
|
|
dispose = listen_dev(button, "click", /*goBack*/ ctx[12], false, false, false);
|
|
mounted = true;
|
|
}
|
|
},
|
|
p: function update(ctx, dirty) {
|
|
if (dirty & /*ping, question*/ 768) {
|
|
each_value_1 = /*ping*/ ctx[8];
|
|
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);
|
|
transition_in(each_blocks[i], 1);
|
|
} else {
|
|
each_blocks[i] = create_each_block_1(child_ctx);
|
|
each_blocks[i].c();
|
|
transition_in(each_blocks[i], 1);
|
|
each_blocks[i].m(div, null);
|
|
}
|
|
}
|
|
|
|
group_outros();
|
|
|
|
for (i = each_value_1.length; i < each_blocks.length; i += 1) {
|
|
out(i);
|
|
}
|
|
|
|
check_outros();
|
|
}
|
|
},
|
|
i: function intro(local) {
|
|
if (current) return;
|
|
|
|
for (let i = 0; i < each_value_1.length; i += 1) {
|
|
transition_in(each_blocks[i]);
|
|
}
|
|
|
|
current = true;
|
|
},
|
|
o: function outro(local) {
|
|
each_blocks = each_blocks.filter(Boolean);
|
|
|
|
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
transition_out(each_blocks[i]);
|
|
}
|
|
|
|
current = false;
|
|
},
|
|
d: function destroy(detaching) {
|
|
if (detaching) detach_dev(button);
|
|
if (detaching) detach_dev(t1);
|
|
if (detaching) detach_dev(div);
|
|
destroy_each(each_blocks, detaching);
|
|
mounted = false;
|
|
dispose();
|
|
}
|
|
};
|
|
|
|
dispatch_dev("SvelteRegisterBlock", {
|
|
block,
|
|
id: create_else_block_1.name,
|
|
type: "else",
|
|
source: "(181:2) {:else}",
|
|
ctx
|
|
});
|
|
|
|
return block;
|
|
}
|
|
|
|
// (151:2) {#if state == 0}
|
|
function create_if_block(ctx) {
|
|
let button;
|
|
let t1;
|
|
let div1;
|
|
let t2;
|
|
let div0;
|
|
let ul;
|
|
let t3;
|
|
let h10;
|
|
let t4;
|
|
let t5_value = Math.floor(sumList(/*calories*/ ctx[7][/*boxset*/ ctx[3]])) + "";
|
|
let t5;
|
|
let t6;
|
|
let h11;
|
|
let t7;
|
|
let t8_value = sumList(Object.values(/*calories*/ ctx[7]).flat()) + "";
|
|
let t8;
|
|
let t9;
|
|
let current;
|
|
let mounted;
|
|
let dispose;
|
|
let if_block = /*displaypopup*/ ctx[5] && create_if_block_2(ctx);
|
|
let each_value = /*boxes*/ ctx[6][/*boxset*/ ctx[3]];
|
|
validate_each_argument(each_value);
|
|
let each_blocks = [];
|
|
|
|
for (let i = 0; i < each_value.length; i += 1) {
|
|
each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i));
|
|
}
|
|
|
|
const block = {
|
|
c: function create() {
|
|
button = element("button");
|
|
button.textContent = "can touch this";
|
|
t1 = space();
|
|
div1 = element("div");
|
|
if (if_block) if_block.c();
|
|
t2 = space();
|
|
div0 = element("div");
|
|
ul = element("ul");
|
|
|
|
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
each_blocks[i].c();
|
|
}
|
|
|
|
t3 = space();
|
|
h10 = element("h1");
|
|
t4 = text("total daily calories: ");
|
|
t5 = text(t5_value);
|
|
t6 = space();
|
|
h11 = element("h1");
|
|
t7 = text("total calories: ");
|
|
t8 = text(t8_value);
|
|
t9 = text("\n\n\t\tSearch recipes using the search bar then hit the blue star to add them to the selection!\n\t\n\t\n\t\tthen click on the white boxes to add them to your meal plan.");
|
|
attr_dev(button, "id", "button");
|
|
attr_dev(button, "class", "svelte-5wk4cv");
|
|
add_location(button, file, 151, 2, 4140);
|
|
attr_dev(ul, "class", "svelte-5wk4cv");
|
|
add_location(ul, file, 161, 4, 4626);
|
|
attr_dev(div0, "class", "scrolly svelte-5wk4cv");
|
|
set_style(div0, "display", "flex");
|
|
set_style(div0, "justify-content", "center");
|
|
set_style(div0, "align-items", "center");
|
|
add_location(div0, file, 160, 3, 4538);
|
|
set_style(div1, "display", "flex");
|
|
set_style(div1, "justify-content", "center");
|
|
set_style(div1, "align-items", "center");
|
|
add_location(div1, file, 153, 2, 4207);
|
|
add_location(h10, file, 173, 2, 5123);
|
|
add_location(h11, file, 174, 2, 5196);
|
|
},
|
|
m: function mount(target, anchor) {
|
|
insert_dev(target, button, anchor);
|
|
insert_dev(target, t1, anchor);
|
|
insert_dev(target, div1, anchor);
|
|
if (if_block) if_block.m(div1, null);
|
|
append_dev(div1, t2);
|
|
append_dev(div1, div0);
|
|
append_dev(div0, ul);
|
|
|
|
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
each_blocks[i].m(ul, null);
|
|
}
|
|
|
|
insert_dev(target, t3, anchor);
|
|
insert_dev(target, h10, anchor);
|
|
append_dev(h10, t4);
|
|
append_dev(h10, t5);
|
|
insert_dev(target, t6, anchor);
|
|
insert_dev(target, h11, anchor);
|
|
append_dev(h11, t7);
|
|
append_dev(h11, t8);
|
|
insert_dev(target, t9, anchor);
|
|
current = true;
|
|
|
|
if (!mounted) {
|
|
dispose = listen_dev(button, "click", playnut, false, false, false);
|
|
mounted = true;
|
|
}
|
|
},
|
|
p: function update(ctx, dirty) {
|
|
if (/*displaypopup*/ ctx[5]) {
|
|
if (if_block) {
|
|
if_block.p(ctx, dirty);
|
|
|
|
if (dirty & /*displaypopup*/ 32) {
|
|
transition_in(if_block, 1);
|
|
}
|
|
} else {
|
|
if_block = create_if_block_2(ctx);
|
|
if_block.c();
|
|
transition_in(if_block, 1);
|
|
if_block.m(div1, t2);
|
|
}
|
|
} else if (if_block) {
|
|
group_outros();
|
|
|
|
transition_out(if_block, 1, 1, () => {
|
|
if_block = null;
|
|
});
|
|
|
|
check_outros();
|
|
}
|
|
|
|
if (dirty & /*boxes, boxset, remove, testclick*/ 41032) {
|
|
each_value = /*boxes*/ ctx[6][/*boxset*/ ctx[3]];
|
|
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(ul, null);
|
|
}
|
|
}
|
|
|
|
for (; i < each_blocks.length; i += 1) {
|
|
each_blocks[i].d(1);
|
|
}
|
|
|
|
each_blocks.length = each_value.length;
|
|
}
|
|
|
|
if ((!current || dirty & /*calories, boxset*/ 136) && t5_value !== (t5_value = Math.floor(sumList(/*calories*/ ctx[7][/*boxset*/ ctx[3]])) + "")) set_data_dev(t5, t5_value);
|
|
if ((!current || dirty & /*calories*/ 128) && t8_value !== (t8_value = sumList(Object.values(/*calories*/ ctx[7]).flat()) + "")) set_data_dev(t8, t8_value);
|
|
},
|
|
i: function intro(local) {
|
|
if (current) return;
|
|
transition_in(if_block);
|
|
current = true;
|
|
},
|
|
o: function outro(local) {
|
|
transition_out(if_block);
|
|
current = false;
|
|
},
|
|
d: function destroy(detaching) {
|
|
if (detaching) detach_dev(button);
|
|
if (detaching) detach_dev(t1);
|
|
if (detaching) detach_dev(div1);
|
|
if (if_block) if_block.d();
|
|
destroy_each(each_blocks, detaching);
|
|
if (detaching) detach_dev(t3);
|
|
if (detaching) detach_dev(h10);
|
|
if (detaching) detach_dev(t6);
|
|
if (detaching) detach_dev(h11);
|
|
if (detaching) detach_dev(t9);
|
|
mounted = false;
|
|
dispose();
|
|
}
|
|
};
|
|
|
|
dispatch_dev("SvelteRegisterBlock", {
|
|
block,
|
|
id: create_if_block.name,
|
|
type: "if",
|
|
source: "(151:2) {#if state == 0}",
|
|
ctx
|
|
});
|
|
|
|
return block;
|
|
}
|
|
|
|
// (186:3) {#each ping as x}
|
|
function create_each_block_1(ctx) {
|
|
let item;
|
|
let current;
|
|
|
|
item = new Item({
|
|
props: {
|
|
title: /*x*/ ctx[26][0],
|
|
author: /*x*/ ctx[26][1],
|
|
subtitle: /*x*/ ctx[26][2],
|
|
buttontext: /*x*/ ctx[26][3],
|
|
pulltext: /*x*/ ctx[26][5],
|
|
img: /*x*/ ctx[26][4],
|
|
calories: /*x*/ ctx[26][6],
|
|
testlist: /*question*/ ctx[9]
|
|
},
|
|
$$inline: true
|
|
});
|
|
|
|
const block = {
|
|
c: function create() {
|
|
create_component(item.$$.fragment);
|
|
},
|
|
m: function mount(target, anchor) {
|
|
mount_component(item, target, anchor);
|
|
current = true;
|
|
},
|
|
p: function update(ctx, dirty) {
|
|
const item_changes = {};
|
|
if (dirty & /*ping*/ 256) item_changes.title = /*x*/ ctx[26][0];
|
|
if (dirty & /*ping*/ 256) item_changes.author = /*x*/ ctx[26][1];
|
|
if (dirty & /*ping*/ 256) item_changes.subtitle = /*x*/ ctx[26][2];
|
|
if (dirty & /*ping*/ 256) item_changes.buttontext = /*x*/ ctx[26][3];
|
|
if (dirty & /*ping*/ 256) item_changes.pulltext = /*x*/ ctx[26][5];
|
|
if (dirty & /*ping*/ 256) item_changes.img = /*x*/ ctx[26][4];
|
|
if (dirty & /*ping*/ 256) item_changes.calories = /*x*/ ctx[26][6];
|
|
if (dirty & /*question*/ 512) item_changes.testlist = /*question*/ ctx[9];
|
|
item.$set(item_changes);
|
|
},
|
|
i: function intro(local) {
|
|
if (current) return;
|
|
transition_in(item.$$.fragment, local);
|
|
current = true;
|
|
},
|
|
o: function outro(local) {
|
|
transition_out(item.$$.fragment, local);
|
|
current = false;
|
|
},
|
|
d: function destroy(detaching) {
|
|
destroy_component(item, detaching);
|
|
}
|
|
};
|
|
|
|
dispatch_dev("SvelteRegisterBlock", {
|
|
block,
|
|
id: create_each_block_1.name,
|
|
type: "each",
|
|
source: "(186:3) {#each ping as x}",
|
|
ctx
|
|
});
|
|
|
|
return block;
|
|
}
|
|
|
|
// (155:3) {#if displaypopup}
|
|
function create_if_block_2(ctx) {
|
|
let div;
|
|
let popup;
|
|
let current;
|
|
|
|
popup = new Popup({
|
|
props: {
|
|
images: /*question*/ ctx[9],
|
|
currentbox: /*currentbox*/ ctx[4],
|
|
boxes: /*boxes*/ ctx[6],
|
|
boxset: /*boxset*/ ctx[3],
|
|
worker: /*myWorker*/ ctx[0],
|
|
calories: /*calories*/ ctx[7]
|
|
},
|
|
$$inline: true
|
|
});
|
|
|
|
const block = {
|
|
c: function create() {
|
|
div = element("div");
|
|
create_component(popup.$$.fragment);
|
|
attr_dev(div, "class", "thingy");
|
|
set_style(div, "position", "absolute");
|
|
set_style(div, "left", /*m*/ ctx[2].x + 100 + "px");
|
|
set_style(div, "top", /*m*/ ctx[2].y + 100 + "px");
|
|
add_location(div, file, 155, 4, 4302);
|
|
},
|
|
m: function mount(target, anchor) {
|
|
insert_dev(target, div, anchor);
|
|
mount_component(popup, div, null);
|
|
current = true;
|
|
},
|
|
p: function update(ctx, dirty) {
|
|
const popup_changes = {};
|
|
if (dirty & /*question*/ 512) popup_changes.images = /*question*/ ctx[9];
|
|
if (dirty & /*currentbox*/ 16) popup_changes.currentbox = /*currentbox*/ ctx[4];
|
|
if (dirty & /*boxes*/ 64) popup_changes.boxes = /*boxes*/ ctx[6];
|
|
if (dirty & /*boxset*/ 8) popup_changes.boxset = /*boxset*/ ctx[3];
|
|
if (dirty & /*myWorker*/ 1) popup_changes.worker = /*myWorker*/ ctx[0];
|
|
if (dirty & /*calories*/ 128) popup_changes.calories = /*calories*/ ctx[7];
|
|
popup.$set(popup_changes);
|
|
|
|
if (!current || dirty & /*m*/ 4) {
|
|
set_style(div, "left", /*m*/ ctx[2].x + 100 + "px");
|
|
}
|
|
|
|
if (!current || dirty & /*m*/ 4) {
|
|
set_style(div, "top", /*m*/ ctx[2].y + 100 + "px");
|
|
}
|
|
},
|
|
i: function intro(local) {
|
|
if (current) return;
|
|
transition_in(popup.$$.fragment, local);
|
|
current = true;
|
|
},
|
|
o: function outro(local) {
|
|
transition_out(popup.$$.fragment, local);
|
|
current = false;
|
|
},
|
|
d: function destroy(detaching) {
|
|
if (detaching) detach_dev(div);
|
|
destroy_component(popup);
|
|
}
|
|
};
|
|
|
|
dispatch_dev("SvelteRegisterBlock", {
|
|
block,
|
|
id: create_if_block_2.name,
|
|
type: "if",
|
|
source: "(155:3) {#if displaypopup}",
|
|
ctx
|
|
});
|
|
|
|
return block;
|
|
}
|
|
|
|
// (166:6) {:else}
|
|
function create_else_block(ctx) {
|
|
let li;
|
|
let mounted;
|
|
let dispose;
|
|
|
|
function click_handler_1(...args) {
|
|
return /*click_handler_1*/ ctx[18](/*_*/ ctx[23], ...args);
|
|
}
|
|
|
|
const block = {
|
|
c: function create() {
|
|
li = element("li");
|
|
attr_dev(li, "class", "hoverythings svelte-5wk4cv");
|
|
set_style(li, "width", "50px");
|
|
set_style(li, "height", "50px");
|
|
set_style(li, "object-fit", "cover");
|
|
set_style(li, "align-items", "center");
|
|
set_style(li, "justify-content", "center");
|
|
set_style(li, "border", "1px solid #000");
|
|
add_location(li, file, 166, 7, 4864);
|
|
},
|
|
m: function mount(target, anchor) {
|
|
insert_dev(target, li, anchor);
|
|
|
|
if (!mounted) {
|
|
dispose = listen_dev(li, "click", click_handler_1, false, false, false);
|
|
mounted = true;
|
|
}
|
|
},
|
|
p: function update(new_ctx, dirty) {
|
|
ctx = new_ctx;
|
|
},
|
|
d: function destroy(detaching) {
|
|
if (detaching) detach_dev(li);
|
|
mounted = false;
|
|
dispose();
|
|
}
|
|
};
|
|
|
|
dispatch_dev("SvelteRegisterBlock", {
|
|
block,
|
|
id: create_else_block.name,
|
|
type: "else",
|
|
source: "(166:6) {:else}",
|
|
ctx
|
|
});
|
|
|
|
return block;
|
|
}
|
|
|
|
// (164:6) {#if _.length != 1}
|
|
function create_if_block_1(ctx) {
|
|
let img;
|
|
let img_src_value;
|
|
let mounted;
|
|
let dispose;
|
|
|
|
function click_handler() {
|
|
return /*click_handler*/ ctx[17](/*_*/ ctx[23]);
|
|
}
|
|
|
|
const block = {
|
|
c: function create() {
|
|
img = element("img");
|
|
attr_dev(img, "class", "hoverythings svelte-5wk4cv");
|
|
if (!src_url_equal(img.src, img_src_value = /*_*/ ctx[23][1][0])) attr_dev(img, "src", img_src_value);
|
|
attr_dev(img, "alt", "broken?");
|
|
set_style(img, "width", "50px");
|
|
set_style(img, "height", "50px");
|
|
set_style(img, "object-fit", "cover");
|
|
set_style(img, "border", "1px");
|
|
add_location(img, file, 164, 7, 4697);
|
|
},
|
|
m: function mount(target, anchor) {
|
|
insert_dev(target, img, anchor);
|
|
|
|
if (!mounted) {
|
|
dispose = listen_dev(img, "click", click_handler, false, false, false);
|
|
mounted = true;
|
|
}
|
|
},
|
|
p: function update(new_ctx, dirty) {
|
|
ctx = new_ctx;
|
|
|
|
if (dirty & /*boxes, boxset*/ 72 && !src_url_equal(img.src, img_src_value = /*_*/ ctx[23][1][0])) {
|
|
attr_dev(img, "src", img_src_value);
|
|
}
|
|
},
|
|
d: function destroy(detaching) {
|
|
if (detaching) detach_dev(img);
|
|
mounted = false;
|
|
dispose();
|
|
}
|
|
};
|
|
|
|
dispatch_dev("SvelteRegisterBlock", {
|
|
block,
|
|
id: create_if_block_1.name,
|
|
type: "if",
|
|
source: "(164:6) {#if _.length != 1}",
|
|
ctx
|
|
});
|
|
|
|
return block;
|
|
}
|
|
|
|
// (163:5) {#each boxes[boxset] as _ }
|
|
function create_each_block(ctx) {
|
|
let if_block_anchor;
|
|
|
|
function select_block_type_1(ctx, dirty) {
|
|
if (/*_*/ ctx[23].length != 1) return create_if_block_1;
|
|
return create_else_block;
|
|
}
|
|
|
|
let current_block_type = select_block_type_1(ctx);
|
|
let if_block = current_block_type(ctx);
|
|
|
|
const block = {
|
|
c: function create() {
|
|
if_block.c();
|
|
if_block_anchor = empty();
|
|
},
|
|
m: function mount(target, anchor) {
|
|
if_block.m(target, anchor);
|
|
insert_dev(target, if_block_anchor, anchor);
|
|
},
|
|
p: function update(ctx, dirty) {
|
|
if (current_block_type === (current_block_type = select_block_type_1(ctx)) && if_block) {
|
|
if_block.p(ctx, dirty);
|
|
} else {
|
|
if_block.d(1);
|
|
if_block = current_block_type(ctx);
|
|
|
|
if (if_block) {
|
|
if_block.c();
|
|
if_block.m(if_block_anchor.parentNode, if_block_anchor);
|
|
}
|
|
}
|
|
},
|
|
d: function destroy(detaching) {
|
|
if_block.d(detaching);
|
|
if (detaching) detach_dev(if_block_anchor);
|
|
}
|
|
};
|
|
|
|
dispatch_dev("SvelteRegisterBlock", {
|
|
block,
|
|
id: create_each_block.name,
|
|
type: "each",
|
|
source: "(163:5) {#each boxes[boxset] as _ }",
|
|
ctx
|
|
});
|
|
|
|
return block;
|
|
}
|
|
|
|
function create_fragment(ctx) {
|
|
let main;
|
|
let select;
|
|
let t0;
|
|
let input;
|
|
let t1;
|
|
let current_block_type_index;
|
|
let if_block;
|
|
let current;
|
|
let mounted;
|
|
let dispose;
|
|
let each_value_2 = /*questions*/ ctx[10];
|
|
validate_each_argument(each_value_2);
|
|
let each_blocks = [];
|
|
|
|
for (let i = 0; i < each_value_2.length; i += 1) {
|
|
each_blocks[i] = create_each_block_2(get_each_context_2(ctx, each_value_2, i));
|
|
}
|
|
|
|
const if_block_creators = [create_if_block, create_else_block_1];
|
|
const if_blocks = [];
|
|
|
|
function select_block_type(ctx, dirty) {
|
|
if (/*state*/ ctx[1] == 0) return 0;
|
|
return 1;
|
|
}
|
|
|
|
current_block_type_index = select_block_type(ctx);
|
|
if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
|
|
|
|
const block = {
|
|
c: function create() {
|
|
main = element("main");
|
|
select = element("select");
|
|
|
|
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
each_blocks[i].c();
|
|
}
|
|
|
|
t0 = space();
|
|
input = element("input");
|
|
t1 = space();
|
|
if_block.c();
|
|
attr_dev(select, "id", "dropdown");
|
|
attr_dev(select, "class", "svelte-5wk4cv");
|
|
add_location(select, file, 141, 2, 3878);
|
|
attr_dev(input, "id", "etc");
|
|
input.required = true;
|
|
attr_dev(input, "class", "svelte-5wk4cv");
|
|
add_location(input, file, 149, 2, 4070);
|
|
attr_dev(main, "class", "svelte-5wk4cv");
|
|
add_location(main, file, 140, 1, 3867);
|
|
},
|
|
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, main, anchor);
|
|
append_dev(main, select);
|
|
|
|
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
each_blocks[i].m(select, null);
|
|
}
|
|
|
|
select_option(select, 0);
|
|
append_dev(main, t0);
|
|
append_dev(main, input);
|
|
append_dev(main, t1);
|
|
if_blocks[current_block_type_index].m(main, null);
|
|
current = true;
|
|
|
|
if (!mounted) {
|
|
dispose = [
|
|
listen_dev(select, "change", /*change_handler*/ ctx[16], false, false, false),
|
|
listen_dev(input, "keypress", /*onKeyPress*/ ctx[11], false, false, false)
|
|
];
|
|
|
|
mounted = true;
|
|
}
|
|
},
|
|
p: function update(ctx, [dirty]) {
|
|
if (dirty & /*questions*/ 1024) {
|
|
each_value_2 = /*questions*/ ctx[10];
|
|
validate_each_argument(each_value_2);
|
|
let i;
|
|
|
|
for (i = 0; i < each_value_2.length; i += 1) {
|
|
const child_ctx = get_each_context_2(ctx, each_value_2, i);
|
|
|
|
if (each_blocks[i]) {
|
|
each_blocks[i].p(child_ctx, dirty);
|
|
} else {
|
|
each_blocks[i] = create_each_block_2(child_ctx);
|
|
each_blocks[i].c();
|
|
each_blocks[i].m(select, null);
|
|
}
|
|
}
|
|
|
|
for (; i < each_blocks.length; i += 1) {
|
|
each_blocks[i].d(1);
|
|
}
|
|
|
|
each_blocks.length = each_value_2.length;
|
|
}
|
|
|
|
let previous_block_index = current_block_type_index;
|
|
current_block_type_index = select_block_type(ctx);
|
|
|
|
if (current_block_type_index === previous_block_index) {
|
|
if_blocks[current_block_type_index].p(ctx, dirty);
|
|
} else {
|
|
group_outros();
|
|
|
|
transition_out(if_blocks[previous_block_index], 1, 1, () => {
|
|
if_blocks[previous_block_index] = null;
|
|
});
|
|
|
|
check_outros();
|
|
if_block = if_blocks[current_block_type_index];
|
|
|
|
if (!if_block) {
|
|
if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
|
|
if_block.c();
|
|
} else {
|
|
if_block.p(ctx, dirty);
|
|
}
|
|
|
|
transition_in(if_block, 1);
|
|
if_block.m(main, null);
|
|
}
|
|
},
|
|
i: function intro(local) {
|
|
if (current) return;
|
|
transition_in(if_block);
|
|
current = true;
|
|
},
|
|
o: function outro(local) {
|
|
transition_out(if_block);
|
|
current = false;
|
|
},
|
|
d: function destroy(detaching) {
|
|
if (detaching) detach_dev(main);
|
|
destroy_each(each_blocks, detaching);
|
|
if_blocks[current_block_type_index].d();
|
|
mounted = false;
|
|
run_all(dispose);
|
|
}
|
|
};
|
|
|
|
dispatch_dev("SvelteRegisterBlock", {
|
|
block,
|
|
id: create_fragment.name,
|
|
type: "component",
|
|
source: "",
|
|
ctx
|
|
});
|
|
|
|
return block;
|
|
}
|
|
|
|
function playnut() {
|
|
var nut = new Audio("nut.mp3");
|
|
nut.play();
|
|
}
|
|
|
|
function sumList(a) {
|
|
return a.reduce(function (a, b) {
|
|
return a + b;
|
|
});
|
|
}
|
|
|
|
function instance($$self, $$props, $$invalidate) {
|
|
let { $$slots: slots = {}, $$scope } = $$props;
|
|
validate_slots('App', slots, []);
|
|
var myWorker = new Worker('./worker.js');
|
|
var state = 0;
|
|
var question = [];
|
|
let m = { x: 0, y: 0 };
|
|
var boxset = 0;
|
|
var currentbox = 0;
|
|
var displaypopup = false;
|
|
var boxes = {};
|
|
var calories = {};
|
|
|
|
//pretty sure this is the most convienent way to do this even it could be done better using a table
|
|
var questions = [
|
|
[0, "sunday"],
|
|
[1, "monday"],
|
|
[2, "tuseday"],
|
|
[3, "wensday"],
|
|
[4, "thursday"],
|
|
[5, "friday"],
|
|
[6, "saturday"]
|
|
];
|
|
|
|
//assinging boxes in a loop because its more readable then doing it manually
|
|
for (let x = 0; x != 7; x++) {
|
|
//3 as in, 3 days a week
|
|
boxes[x] = [[0], [1], [2]];
|
|
|
|
calories[x] = [0];
|
|
}
|
|
|
|
//temporary list. The var needs to exist to be replaced... Consider this init
|
|
var ping = [["a", "b", "c", "d"]];
|
|
|
|
const fs = require("fs");
|
|
|
|
//this reads the last
|
|
var read = fs.readFileSync("./public/q.json", 'utf8');
|
|
|
|
myWorker.postMessage(read);
|
|
|
|
const onKeyPress = e => {
|
|
var value = document.getElementById("etc").value;
|
|
|
|
if (e.charCode === 13) {
|
|
$$invalidate(1, state = 1);
|
|
|
|
//if you enter something larger than 2 and hit enter, we send the result and the process of drawing begins!
|
|
if (value.length > 2) {
|
|
myWorker.postMessage(value);
|
|
document.getElementById("etc").value = "";
|
|
}
|
|
}
|
|
};
|
|
|
|
function smallSend() {
|
|
try {
|
|
var value = document.getElementById("etc").value;
|
|
|
|
if (value.length > 2) {
|
|
// ≈ used to denote that this is a small message.
|
|
if (state != 1) {
|
|
$$invalidate(1, state = 1);
|
|
}
|
|
|
|
myWorker.postMessage(value += "≈");
|
|
console.log("supposedly sent", value);
|
|
}
|
|
} catch {
|
|
console.log("whatever");
|
|
return;
|
|
}
|
|
}
|
|
|
|
setInterval(smallSend, 500);
|
|
|
|
function goBack() {
|
|
console.log(question);
|
|
document.getElementById("etc").value = "";
|
|
$$invalidate(1, state = state - 1);
|
|
$$invalidate(8, ping = []);
|
|
}
|
|
|
|
myWorker.onmessage = function (message) {
|
|
console.log("getoff");
|
|
message = message["data"];
|
|
console.log(message);
|
|
|
|
if (message.includes("≈")) {
|
|
console.log("recieved small");
|
|
$$invalidate(8, ping = []);
|
|
var messageParse = message.slice(0, -1).split(",");
|
|
|
|
//removes the ≈ denoting its a small message
|
|
$$invalidate(8, ping = [
|
|
...ping,
|
|
[
|
|
messageParse[1],
|
|
messageParse[2],
|
|
messageParse[3],
|
|
messageParse[4],
|
|
messageParse[5]
|
|
]
|
|
]);
|
|
} else //so this boi doesn't grab someone elses requrests.
|
|
if (message.includes("گ")) {
|
|
return;
|
|
} else {
|
|
$$invalidate(8, ping = []);
|
|
|
|
//converts the string to an array.
|
|
var sdo = JSON.parse(message);
|
|
|
|
for (var x in sdo) {
|
|
console.log("recieved?");
|
|
|
|
$$invalidate(8, ping = [
|
|
...ping,
|
|
[
|
|
sdo[x]["name"],
|
|
sdo[x]["author"],
|
|
sdo[x]["url"],
|
|
sdo[x]["dateadded"],
|
|
sdo[x]["imgurl"],
|
|
sdo[x]["ingredients"],
|
|
sdo[x]["calories"]
|
|
]
|
|
]);
|
|
}
|
|
|
|
console.log(ping.test);
|
|
}
|
|
|
|
console.log(ping[0]);
|
|
};
|
|
|
|
function testclick(event, box) {
|
|
$$invalidate(5, displaypopup = true);
|
|
console.log(currentbox);
|
|
console.log("clicked");
|
|
$$invalidate(2, m.x = event.clientX, m);
|
|
$$invalidate(2, m.y = event.clientY, m);
|
|
console.log(m);
|
|
$$invalidate(4, currentbox = box);
|
|
console.log(currentbox);
|
|
}
|
|
|
|
//this is the most angry workaround I've ever written.
|
|
function updateDomFromSubSvelte() {
|
|
//so, svelte, as the function name implies, does not update from subsveltes.
|
|
$$invalidate(6, boxes);
|
|
|
|
$$invalidate(9, question);
|
|
$$invalidate(7, calories);
|
|
}
|
|
|
|
setInterval(updateDomFromSubSvelte, 100);
|
|
|
|
function setBoxSet() {
|
|
$$invalidate(3, boxset = document.getElementById("dropdown").value);
|
|
}
|
|
|
|
function remove(_) {
|
|
console.log(_);
|
|
calories[boxset].splice(calories[boxset].indexOf(_[1][2][7]), 1);
|
|
_.splice(1, 1);
|
|
}
|
|
|
|
document.addEventListener(
|
|
'click',
|
|
() => {
|
|
console.log("test");
|
|
|
|
if (displaypopup) {
|
|
$$invalidate(5, displaypopup = !displaypopup);
|
|
}
|
|
},
|
|
true
|
|
);
|
|
|
|
const writable_props = [];
|
|
|
|
Object_1.keys($$props).forEach(key => {
|
|
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console_1.warn(`<App> was created with unknown prop '${key}'`);
|
|
});
|
|
|
|
const change_handler = () => setBoxSet();
|
|
const click_handler = _ => remove(_);
|
|
const click_handler_1 = (_, event) => testclick(event, _[0]);
|
|
|
|
$$self.$capture_state = () => ({
|
|
mdiConsoleNetworkOutline,
|
|
Popup,
|
|
Item,
|
|
myWorker,
|
|
state,
|
|
question,
|
|
m,
|
|
boxset,
|
|
currentbox,
|
|
displaypopup,
|
|
boxes,
|
|
calories,
|
|
questions,
|
|
ping,
|
|
fs,
|
|
read,
|
|
playnut,
|
|
onKeyPress,
|
|
smallSend,
|
|
goBack,
|
|
testclick,
|
|
updateDomFromSubSvelte,
|
|
setBoxSet,
|
|
remove,
|
|
sumList
|
|
});
|
|
|
|
$$self.$inject_state = $$props => {
|
|
if ('myWorker' in $$props) $$invalidate(0, myWorker = $$props.myWorker);
|
|
if ('state' in $$props) $$invalidate(1, state = $$props.state);
|
|
if ('question' in $$props) $$invalidate(9, question = $$props.question);
|
|
if ('m' in $$props) $$invalidate(2, m = $$props.m);
|
|
if ('boxset' in $$props) $$invalidate(3, boxset = $$props.boxset);
|
|
if ('currentbox' in $$props) $$invalidate(4, currentbox = $$props.currentbox);
|
|
if ('displaypopup' in $$props) $$invalidate(5, displaypopup = $$props.displaypopup);
|
|
if ('boxes' in $$props) $$invalidate(6, boxes = $$props.boxes);
|
|
if ('calories' in $$props) $$invalidate(7, calories = $$props.calories);
|
|
if ('questions' in $$props) $$invalidate(10, questions = $$props.questions);
|
|
if ('ping' in $$props) $$invalidate(8, ping = $$props.ping);
|
|
if ('read' in $$props) read = $$props.read;
|
|
};
|
|
|
|
if ($$props && "$$inject" in $$props) {
|
|
$$self.$inject_state($$props.$$inject);
|
|
}
|
|
|
|
return [
|
|
myWorker,
|
|
state,
|
|
m,
|
|
boxset,
|
|
currentbox,
|
|
displaypopup,
|
|
boxes,
|
|
calories,
|
|
ping,
|
|
question,
|
|
questions,
|
|
onKeyPress,
|
|
goBack,
|
|
testclick,
|
|
setBoxSet,
|
|
remove,
|
|
change_handler,
|
|
click_handler,
|
|
click_handler_1
|
|
];
|
|
}
|
|
|
|
class App extends SvelteComponentDev {
|
|
constructor(options) {
|
|
super(options);
|
|
init(this, options, instance, create_fragment, safe_not_equal, {});
|
|
|
|
dispatch_dev("SvelteRegisterComponent", {
|
|
component: this,
|
|
tagName: "App",
|
|
options,
|
|
id: create_fragment.name
|
|
});
|
|
}
|
|
}
|
|
|
|
require("querystring");
|
|
const app = new App({
|
|
|
|
target: document.body,
|
|
props: {
|
|
name: 'aksf',
|
|
inspector: "idk why i need this I Dont care "
|
|
}
|
|
|
|
});
|
|
|
|
return app;
|
|
|
|
})();
|
|
//# sourceMappingURL=bundle.js.map
|