More conservative invalidation

pull/1903/head
Rich Harris 6 years ago committed by GitHub
parent 29fd8d7881
commit 1f46e23e1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -261,7 +261,7 @@ export default class Expression {
if (dirty.length) component.has_reactive_assignments = true; if (dirty.length) component.has_reactive_assignments = true;
code.overwrite(node.start, node.end, dirty.map(n => `$$make_dirty('${n}')`).join('; ')); code.overwrite(node.start, node.end, dirty.map(n => `$$invalidate('${n}', ${n})`).join('; '));
} else { } else {
names.forEach(name => { names.forEach(name => {
if (!scope.declarations.has(name)) { if (!scope.declarations.has(name)) {
@ -321,7 +321,7 @@ export default class Expression {
let body = code.slice(node.body.start, node.body.end).trim(); let body = code.slice(node.body.start, node.body.end).trim();
if (node.body.type !== 'BlockStatement') { if (node.body.type !== 'BlockStatement') {
if (pending_assignments.size > 0) { if (pending_assignments.size > 0) {
const insert = [...pending_assignments].map(name => `$$make_dirty('${name}')`).join('; '); const insert = [...pending_assignments].map(name => `$$invalidate('${name}', ${name})`).join('; ');
pending_assignments = new Set(); pending_assignments = new Set();
component.has_reactive_assignments = true; component.has_reactive_assignments = true;
@ -329,7 +329,7 @@ export default class Expression {
body = deindent` body = deindent`
{ {
const $$result = ${body}; const $$result = ${body};
${insert} ${insert};
return $$result; return $$result;
} }
`; `;
@ -381,10 +381,9 @@ export default class Expression {
const insert = ( const insert = (
(has_semi ? ' ' : '; ') + (has_semi ? ' ' : '; ') +
[...pending_assignments].map(name => `$$make_dirty('${name}')`).join('; ') [...pending_assignments].map(name => `$$invalidate('${name}', ${name})`).join('; ')
); );
if (/^(Break|Continue|Return)Statement/.test(node.type)) { if (/^(Break|Continue|Return)Statement/.test(node.type)) {
if (node.argument) { if (node.argument) {
code.overwrite(node.start, node.argument.start, `var $$result = `); code.overwrite(node.start, node.argument.start, `var $$result = `);

@ -77,7 +77,7 @@ export default function dom(
${component.meta.props && deindent` ${component.meta.props && deindent`
if (!${component.meta.props}) ${component.meta.props} = {}; if (!${component.meta.props}) ${component.meta.props} = {};
@assign(${component.meta.props}, $$props); @assign(${component.meta.props}, $$props);
$$make_dirty('${component.meta.props_object}'); $$invalidate('${component.meta.props_object}', ${component.meta.props_object});
`} `}
${props.map(prop => ${props.map(prop =>
`if ('${prop.as}' in $$props) ${prop.name} = $$props.${prop.as};`)} `if ('${prop.as}' in $$props) ${prop.name} = $$props.${prop.as};`)}
@ -100,15 +100,15 @@ export default function dom(
} else { } else {
body.push(deindent` body.push(deindent`
get ${x.as}() { get ${x.as}() {
return this.$$.get().${x.name}; return this.$$.ctx.${x.name};
} }
`); `);
} }
if (component.writable_declarations.has(x.as) && !renderer.readonly.has(x.as)) { if (component.writable_declarations.has(x.as) && !renderer.readonly.has(x.as)) {
body.push(deindent` body.push(deindent`
set ${x.as}(value) { set ${x.as}(${x.name}) {
this.$set({ ${x.name}: value }); this.$set({ ${x.name} });
@flush(); @flush();
} }
`); `);
@ -130,10 +130,10 @@ export default function dom(
if (expected.length) { if (expected.length) {
dev_props_check = deindent` dev_props_check = deindent`
const state = this.$$.get(); const { ctx } = this.$$;
${expected.map(name => deindent` ${expected.map(name => deindent`
if (state.${name} === undefined${options.customElement && ` && !('${name}' in this.attributes)`}) { if (ctx.${name} === undefined${options.customElement && ` && !('${name}' in this.attributes)`}) {
console.warn("<${component.tag}> was created without expected data property '${name}'"); console.warn("<${component.tag}> was created without expected data property '${name}'");
}`)} }`)}
`; `;
@ -171,7 +171,7 @@ export default function dom(
if (dirty.length) component.has_reactive_assignments = true; if (dirty.length) component.has_reactive_assignments = true;
code.overwrite(node.start, node.end, dirty.map(n => `$$make_dirty('${n}')`).join('; ')); code.overwrite(node.start, node.end, dirty.map(n => `$$invalidate('${n}', ${n})`).join('; '));
} else { } else {
names.forEach(name => { names.forEach(name => {
if (scope.findOwner(name) === component.instance_scope) { if (scope.findOwner(name) === component.instance_scope) {
@ -193,7 +193,7 @@ export default function dom(
if (pending_assignments.size > 0) { if (pending_assignments.size > 0) {
if (node.type === 'ArrowFunctionExpression') { if (node.type === 'ArrowFunctionExpression') {
const insert = [...pending_assignments].map(name => `$$make_dirty('${name}')`).join(';'); const insert = [...pending_assignments].map(name => `$$invalidate('${name}', ${name})`).join(';');
pending_assignments = new Set(); pending_assignments = new Set();
code.prependRight(node.body.start, `{ const $$result = `); code.prependRight(node.body.start, `{ const $$result = `);
@ -203,7 +203,7 @@ export default function dom(
} }
else if (/Statement/.test(node.type)) { else if (/Statement/.test(node.type)) {
const insert = [...pending_assignments].map(name => `$$make_dirty('${name}')`).join('; '); const insert = [...pending_assignments].map(name => `$$invalidate('${name}', ${name})`).join('; ');
if (/^(Break|Continue|Return)Statement/.test(node.type)) { if (/^(Break|Continue|Return)Statement/.test(node.type)) {
if (node.argument) { if (node.argument) {
@ -232,7 +232,7 @@ export default function dom(
const args = ['$$self']; const args = ['$$self'];
if (component.props.length > 0 || component.has_reactive_assignments) args.push('$$props'); if (component.props.length > 0 || component.has_reactive_assignments) args.push('$$props');
if (component.has_reactive_assignments) args.push('$$make_dirty'); if (component.has_reactive_assignments) args.push('$$invalidate');
builder.addBlock(deindent` builder.addBlock(deindent`
function create_fragment(${component.alias('component')}, ctx) { function create_fragment(${component.alias('component')}, ctx) {
@ -270,8 +270,8 @@ export default function dom(
); );
const definition = has_definition const definition = has_definition
? component.alias('define') ? component.alias('instance')
: '@noop'; : '@identity';
const all_reactive_dependencies = new Set(); const all_reactive_dependencies = new Set();
component.reactive_declarations.forEach(d => { component.reactive_declarations.forEach(d => {
@ -288,7 +288,7 @@ export default function dom(
.map(name => deindent` .map(name => deindent`
let ${name}; let ${name};
${component.options.dev && `@validate_store(${name.slice(1)}, '${name.slice(1)}');`} ${component.options.dev && `@validate_store(${name.slice(1)}, '${name.slice(1)}');`}
$$self.$$.on_destroy.push(${name.slice(1)}.subscribe($$value => { ${name} = $$value; $$make_dirty('${name}'); })); $$self.$$.on_destroy.push(${name.slice(1)}.subscribe($$value => { ${name} = $$value; $$invalidate('${name}', ${name}); }));
`) `)
.join('\n\n'); .join('\n\n');
@ -301,8 +301,6 @@ export default function dom(
${reactive_store_subscriptions} ${reactive_store_subscriptions}
${filtered_declarations.length > 0 && `$$self.$$.get = () => (${stringifyProps(filtered_declarations)});`}
${set && `$$self.$$.set = ${set};`} ${set && `$$self.$$.set = ${set};`}
${component.reactive_declarations.length > 0 && deindent` ${component.reactive_declarations.length > 0 && deindent`
@ -311,6 +309,8 @@ export default function dom(
if (${Array.from(d.dependencies).map(n => `$$dirty.${n}`).join(' || ')}) ${d.snippet}`)} if (${Array.from(d.dependencies).map(n => `$$dirty.${n}`).join(' || ')}) ${d.snippet}`)}
}; };
`} `}
return ${stringifyProps(filtered_declarations)};
} }
`); `);
} }

@ -466,7 +466,7 @@ export default class ElementWrapper extends Wrapper {
if (!${this.var}.paused) ${animation_frame} = requestAnimationFrame(${handler});` if (!${this.var}.paused) ${animation_frame} = requestAnimationFrame(${handler});`
} }
${mutations.length > 0 && mutations} ${mutations.length > 0 && mutations}
${Array.from(dependencies).map(dep => `$$make_dirty('${dep}');`)} ${Array.from(dependencies).map(dep => `$$invalidate('${dep}', ${dep});`)}
} }
`); `);
@ -480,7 +480,7 @@ export default class ElementWrapper extends Wrapper {
if (!${this.var}.paused) ${animation_frame} = requestAnimationFrame(${handler});` if (!${this.var}.paused) ${animation_frame} = requestAnimationFrame(${handler});`
} }
${mutations.length > 0 && mutations} ${mutations.length > 0 && mutations}
${Array.from(dependencies).map(dep => `$$make_dirty('${dep}');`)} ${Array.from(dependencies).map(dep => `$$invalidate('${dep}', ${dep});`)}
} }
`); `);
@ -537,7 +537,7 @@ export default class ElementWrapper extends Wrapper {
renderer.component.partly_hoisted.push(deindent` renderer.component.partly_hoisted.push(deindent`
function ${name}($$node) { function ${name}($$node) {
${handler.mutation} ${handler.mutation}
$$make_dirty('${object}'); $$invalidate('${object}', ${object});
} }
`); `);

@ -223,7 +223,7 @@ export default class InlineComponentWrapper extends Wrapper {
component.partly_hoisted.push(deindent` component.partly_hoisted.push(deindent`
function ${fn}($$component) { function ${fn}($$component) {
${lhs} = $$component; ${lhs} = $$component;
${object && `$$make_dirty('${object}');`} ${object && `$$invalidate('${object}', ${object});`}
} }
`); `);
@ -274,8 +274,9 @@ export default class InlineComponentWrapper extends Wrapper {
block.builders.init.addBlock(deindent` block.builders.init.addBlock(deindent`
function ${name}(value) { function ${name}(value) {
${updating} = true; if (ctx.${name}.call(null, value, ctx)) {
ctx.${name}.call(null, value, ctx); ${updating} = true;
}
} }
`); `);
@ -283,8 +284,9 @@ export default class InlineComponentWrapper extends Wrapper {
} else { } else {
block.builders.init.addBlock(deindent` block.builders.init.addBlock(deindent`
function ${name}(value) { function ${name}(value) {
${updating} = true; if (ctx.${name}.call(null, value)) {
ctx.${name}.call(null, value); ${updating} = true;
}
} }
`); `);
} }
@ -292,7 +294,7 @@ export default class InlineComponentWrapper extends Wrapper {
const body = deindent` const body = deindent`
function ${name}(${args.join(', ')}) { function ${name}(${args.join(', ')}) {
${lhs} = value; ${lhs} = value;
${dependencies.map(dep => `$$make_dirty('${dep}');`)} return $$invalidate('${dependencies[0]}', ${dependencies[0]});
} }
`; `;

@ -122,7 +122,7 @@ export default class WindowWrapper extends Wrapper {
component.template_references.add(handler_name); component.template_references.add(handler_name);
component.partly_hoisted.push(deindent` component.partly_hoisted.push(deindent`
function ${handler_name}() { function ${handler_name}() {
${props.map(prop => `${prop.name} = window.${prop.value}; $$make_dirty('${prop.name}');`)} ${props.map(prop => `${prop.name} = window.${prop.value}; $$invalidate('${prop.name}', ${prop.name});`)}
} }
`); `);

@ -6,7 +6,7 @@ import { children } from './dom.js';
export function bind(component, name, callback) { export function bind(component, name, callback) {
component.$$.bound[name] = callback; component.$$.bound[name] = callback;
callback(component.$$.get()[name]); callback(component.$$.ctx[name]);
} }
export function mount_component(component, target, anchor) { export function mount_component(component, target, anchor) {
@ -40,7 +40,7 @@ function destroy(component, detach) {
// TODO null out other refs, including component.$$ (but need to // TODO null out other refs, including component.$$ (but need to
// preserve final state?) // preserve final state?)
component.$$.on_destroy = component.$$.fragment = null; component.$$.on_destroy = component.$$.fragment = null;
component.$$.get = () => ({}); component.$$.ctx = {};
} }
} }
@ -52,19 +52,15 @@ function make_dirty(component, key) {
component.$$.dirty[key] = true; component.$$.dirty[key] = true;
} }
function empty() { export function init(component, options, instance, create_fragment, not_equal) {
return {};
}
export function init(component, options, define, create_fragment, not_equal) {
const previous_component = current_component; const previous_component = current_component;
set_current_component(component); set_current_component(component);
component.$$ = { const $$ = component.$$ = {
fragment: null, fragment: null,
ctx: null,
// state // state
get: empty,
set: noop, set: noop,
update: noop, update: noop,
not_equal, not_equal,
@ -85,23 +81,32 @@ export function init(component, options, define, create_fragment, not_equal) {
let ready = false; let ready = false;
define(component, options.props || {}, key => { $$.ctx = instance(component, options.props || {}, (key, value) => {
if (ready) make_dirty(component, key); if ($$.bound[key]) $$.bound[key](value);
if (component.$$.bound[key]) component.$$.bound[key](component.$$.get()[key]);
if ($$.ctx) {
const changed = not_equal(value, $$.ctx[key]);
if (ready && changed) {
make_dirty(component, key);
}
$$.ctx[key] = value;
return changed;
}
}); });
component.$$.update(); $$.update();
ready = true; ready = true;
run_all(component.$$.before_render); run_all($$.before_render);
component.$$.fragment = create_fragment(component, component.$$.get()); $$.fragment = create_fragment(component, $$.ctx);
if (options.target) { if (options.target) {
intro.enabled = !!options.intro; intro.enabled = !!options.intro;
if (options.hydrate) { if (options.hydrate) {
component.$$.fragment.l(children(options.target)); $$.fragment.l(children(options.target));
} else { } else {
component.$$.fragment.c(); $$.fragment.c();
} }
mount_component(component, options.target, options.anchor); mount_component(component, options.target, options.anchor);
@ -148,10 +153,13 @@ if (typeof HTMLElement !== 'undefined') {
$set(values) { $set(values) {
if (this.$$) { if (this.$$) {
const state = this.$$.get(); const { ctx, set, not_equal } = this.$$;
this.$$.set(values); set(values);
for (const key in values) { for (const key in values) {
if (this.$$.not_equal(state[key], values[key])) make_dirty(this, key); if (not_equal(ctx[key], values[key])) {
ctx[key] = values[key];
make_dirty(this, key);
}
} }
} }
} }
@ -176,10 +184,14 @@ export class SvelteComponent {
$set(values) { $set(values) {
if (this.$$) { if (this.$$) {
const state = this.$$.get(); const { ctx, set, not_equal } = this.$$;
this.$$.set(values); set(values);
for (const key in values) { for (const key in values) {
if (this.$$.not_equal(state[key], values[key])) make_dirty(this, key); if (not_equal(ctx[key], values[key])) {
ctx[key] = values[key];
make_dirty(this, key);
}
} }
} }
} }

@ -34,7 +34,7 @@ export function flush() {
update(dirty_components.shift().$$); update(dirty_components.shift().$$);
} }
while (binding_callbacks.length) binding_callbacks.pop()(); while (binding_callbacks.length) binding_callbacks.shift()();
// then, once components are updated, call // then, once components are updated, call
// afterUpdate functions. This may cause // afterUpdate functions. This may cause
@ -57,7 +57,7 @@ function update($$) {
if ($$.fragment) { if ($$.fragment) {
$$.update($$.dirty); $$.update($$.dirty);
run_all($$.before_render); run_all($$.before_render);
$$.fragment.p($$.dirty, $$.get()); $$.fragment.p($$.dirty, $$.ctx);
$$.dirty = null; $$.dirty = null;
$$.after_render.forEach(add_render_callback); $$.after_render.forEach(add_render_callback);

@ -1,5 +1,7 @@
export function noop() {} export function noop() {}
export const identity = x => x;
export function assign(tar, src) { export function assign(tar, src) {
for (var k in src) tar[k] = src[k]; for (var k in src) tar[k] = src[k];
return tar; return tar;

@ -43,32 +43,32 @@ function foo(node, callback) {
// code goes here // code goes here
} }
function define($$self, $$props) { function instance($$self, $$props) {
let { bar } = $$props; let { bar } = $$props;
function foo_function() { function foo_function() {
return handleFoo(bar); return handleFoo(bar);
} }
$$self.$$.get = () => ({ bar, foo_function });
$$self.$$.set = $$props => { $$self.$$.set = $$props => {
if ('bar' in $$props) bar = $$props.bar; if ('bar' in $$props) bar = $$props.bar;
}; };
return { bar, foo_function };
} }
class SvelteComponent extends SvelteComponent_1 { class SvelteComponent extends SvelteComponent_1 {
constructor(options) { constructor(options) {
super(); super();
init(this, options, define, create_fragment, safe_not_equal); init(this, options, instance, create_fragment, safe_not_equal);
} }
get bar() { get bar() {
return this.$$.get().bar; return this.$$.ctx.bar;
} }
set bar(value) { set bar(bar) {
this.$set({ bar: value }); this.$set({ bar });
flush(); flush();
} }
} }

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, createElement, detachNode, init, insert, noop, run, safe_not_equal } from "svelte/internal"; import { SvelteComponent as SvelteComponent_1, createElement, detachNode, identity, init, insert, noop, run, safe_not_equal } from "svelte/internal";
function create_fragment(component, ctx) { function create_fragment(component, ctx) {
var a, link_action, current; var a, link_action, current;
@ -54,7 +54,7 @@ function link(node) {
class SvelteComponent extends SvelteComponent_1 { class SvelteComponent extends SvelteComponent_1 {
constructor(options) { constructor(options) {
super(); super();
init(this, options, noop, create_fragment, safe_not_equal); init(this, options, identity, create_fragment, safe_not_equal);
} }
} }

@ -36,45 +36,45 @@ function create_fragment(component, ctx) {
}; };
} }
function define($$self, $$props, $$make_dirty) { function instance($$self, $$props, $$invalidate) {
let { w, h } = $$props; let { w, h } = $$props;
function div_resize_handler() { function div_resize_handler() {
w = this.offsetWidth; w = this.offsetWidth;
h = this.offsetHeight; h = this.offsetHeight;
$$make_dirty('w'); $$invalidate('w', w);
$$make_dirty('h'); $$invalidate('h', h);
} }
$$self.$$.get = () => ({ w, h, div_resize_handler });
$$self.$$.set = $$props => { $$self.$$.set = $$props => {
if ('w' in $$props) w = $$props.w; if ('w' in $$props) w = $$props.w;
if ('h' in $$props) h = $$props.h; if ('h' in $$props) h = $$props.h;
}; };
return { w, h, div_resize_handler };
} }
class SvelteComponent extends SvelteComponent_1 { class SvelteComponent extends SvelteComponent_1 {
constructor(options) { constructor(options) {
super(); super();
init(this, options, define, create_fragment, safe_not_equal); init(this, options, instance, create_fragment, safe_not_equal);
} }
get w() { get w() {
return this.$$.get().w; return this.$$.ctx.w;
} }
set w(value) { set w(w) {
this.$set({ w: value }); this.$set({ w });
flush(); flush();
} }
get h() { get h() {
return this.$$.get().h; return this.$$.ctx.h;
} }
set h(value) { set h(h) {
this.$set({ h: value }); this.$set({ h });
flush(); flush();
} }
} }

@ -45,29 +45,29 @@ function create_fragment(component, ctx) {
}; };
} }
function define($$self, $$props) { function instance($$self, $$props) {
let { foo = 42 } = $$props; let { foo = 42 } = $$props;
$$self.$$.get = () => ({ foo });
$$self.$$.set = $$props => { $$self.$$.set = $$props => {
if ('foo' in $$props) foo = $$props.foo; if ('foo' in $$props) foo = $$props.foo;
}; };
return { foo };
} }
class SvelteComponent extends SvelteComponent_1 { class SvelteComponent extends SvelteComponent_1 {
constructor(options) { constructor(options) {
super(); super();
if (!document.getElementById("svelte-1a7i8ec-style")) add_css(); if (!document.getElementById("svelte-1a7i8ec-style")) add_css();
init(this, options, define, create_fragment, safe_not_equal); init(this, options, instance, create_fragment, safe_not_equal);
} }
get foo() { get foo() {
return this.$$.get().foo; return this.$$.ctx.foo;
} }
set foo(value) { set foo(foo) {
this.$set({ foo: value }); this.$set({ foo });
flush(); flush();
} }
} }

@ -36,16 +36,16 @@ function create_fragment(component, ctx) {
}; };
} }
function define($$self) { function instance($$self) {
const Nested = window.Nested; const Nested = window.Nested;
$$self.$$.get = () => ({ Nested }); return { Nested };
} }
class SvelteComponent extends SvelteComponent_1 { class SvelteComponent extends SvelteComponent_1 {
constructor(options) { constructor(options) {
super(); super();
init(this, options, define, create_fragment, safe_not_equal); init(this, options, instance, create_fragment, safe_not_equal);
} }
} }

@ -36,16 +36,16 @@ function create_fragment(component, ctx) {
}; };
} }
function define($$self) { function instance($$self) {
const Nested = window.Nested; const Nested = window.Nested;
$$self.$$.get = () => ({ Nested }); return { Nested };
} }
class SvelteComponent extends SvelteComponent_1 { class SvelteComponent extends SvelteComponent_1 {
constructor(options) { constructor(options) {
super(); super();
init(this, options, define, create_fragment, not_equal); init(this, options, instance, create_fragment, not_equal);
} }
} }

@ -36,16 +36,16 @@ function create_fragment(component, ctx) {
}; };
} }
function define($$self) { function instance($$self) {
const Nested = window.Nested; const Nested = window.Nested;
$$self.$$.get = () => ({ Nested }); return { Nested };
} }
class SvelteComponent extends SvelteComponent_1 { class SvelteComponent extends SvelteComponent_1 {
constructor(options) { constructor(options) {
super(); super();
init(this, options, define, create_fragment, not_equal); init(this, options, instance, create_fragment, not_equal);
} }
} }

@ -36,16 +36,16 @@ function create_fragment(component, ctx) {
}; };
} }
function define($$self) { function instance($$self) {
const Nested = window.Nested; const Nested = window.Nested;
$$self.$$.get = () => ({ Nested }); return { Nested };
} }
class SvelteComponent extends SvelteComponent_1 { class SvelteComponent extends SvelteComponent_1 {
constructor(options) { constructor(options) {
super(); super();
init(this, options, define, create_fragment, safe_not_equal); init(this, options, instance, create_fragment, safe_not_equal);
} }
} }

@ -14,7 +14,7 @@ function create_fragment(component, ctx) {
}; };
} }
function define($$self, $$props) { function instance($$self, $$props) {
let { x } = $$props; let { x } = $$props;
function a() { function a() {
@ -25,34 +25,34 @@ function define($$self, $$props) {
return x * 3; return x * 3;
} }
$$self.$$.get = () => ({ x, a, b });
$$self.$$.set = $$props => { $$self.$$.set = $$props => {
if ('x' in $$props) x = $$props.x; if ('x' in $$props) x = $$props.x;
}; };
return { x, a, b };
} }
class SvelteComponent extends SvelteComponent_1 { class SvelteComponent extends SvelteComponent_1 {
constructor(options) { constructor(options) {
super(); super();
init(this, options, define, create_fragment, safe_not_equal); init(this, options, instance, create_fragment, safe_not_equal);
} }
get x() { get x() {
return this.$$.get().x; return this.$$.ctx.x;
} }
set x(value) { set x(x) {
this.$set({ x: value }); this.$set({ x });
flush(); flush();
} }
get a() { get a() {
return this.$$.get().a; return this.$$.ctx.a;
} }
get b() { get b() {
return this.$$.get().b; return this.$$.ctx.b;
} }
} }

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, append, createElement, detachNode, init, insert, noop, run, safe_not_equal } from "svelte/internal"; import { SvelteComponent as SvelteComponent_1, append, createElement, detachNode, identity, init, insert, noop, run, safe_not_equal } from "svelte/internal";
function add_css() { function add_css() {
var style = createElement("style"); var style = createElement("style");
@ -43,7 +43,7 @@ class SvelteComponent extends SvelteComponent_1 {
constructor(options) { constructor(options) {
super(); super();
if (!document.getElementById("svelte-1slhpfn-style")) add_css(); if (!document.getElementById("svelte-1slhpfn-style")) add_css();
init(this, options, noop, create_fragment, safe_not_equal); init(this, options, identity, create_fragment, safe_not_equal);
} }
} }

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { SvelteElement, createElement, detachNode, init, insert, noop, run, safe_not_equal } from "svelte/internal"; import { SvelteElement, createElement, detachNode, identity, init, insert, noop, run, safe_not_equal } from "svelte/internal";
function create_fragment(component, ctx) { function create_fragment(component, ctx) {
var div, current; var div, current;
@ -39,7 +39,7 @@ class SvelteComponent extends SvelteElement {
this.shadowRoot.innerHTML = `<style>div{animation:foo 1s}@keyframes foo{0%{opacity:0}100%{opacity:1}}</style>`; this.shadowRoot.innerHTML = `<style>div{animation:foo 1s}@keyframes foo{0%{opacity:0}100%{opacity:1}}</style>`;
init(this, { target: this.shadowRoot }, noop, create_fragment, safe_not_equal); init(this, { target: this.shadowRoot }, identity, create_fragment, safe_not_equal);
if (options) { if (options) {
if (options.target) { if (options.target) {

@ -54,33 +54,33 @@ function create_fragment(component, ctx) {
}; };
} }
function define($$self, $$props) { function instance($$self, $$props) {
let { name } = $$props; let { name } = $$props;
$$self.$$.get = () => ({ name });
$$self.$$.set = $$props => { $$self.$$.set = $$props => {
if ('name' in $$props) name = $$props.name; if ('name' in $$props) name = $$props.name;
}; };
return { name };
} }
class SvelteComponent extends SvelteComponentDev { class SvelteComponent extends SvelteComponentDev {
constructor(options) { constructor(options) {
super(options); super(options);
init(this, options, define, create_fragment, safe_not_equal); init(this, options, instance, create_fragment, safe_not_equal);
const state = this.$$.get(); const { ctx } = this.$$;
if (state.name === undefined) { if (ctx.name === undefined) {
console.warn("<SvelteComponent> was created without expected data property 'name'"); console.warn("<SvelteComponent> was created without expected data property 'name'");
} }
} }
get name() { get name() {
return this.$$.get().name; return this.$$.ctx.name;
} }
set name(value) { set name(name) {
this.$set({ name: value }); this.$set({ name });
flush(); flush();
} }
} }

@ -139,72 +139,72 @@ function create_fragment(component, ctx) {
}; };
} }
function define($$self, $$props) { function instance($$self, $$props) {
let { things, foo, bar, baz } = $$props; let { things, foo, bar, baz } = $$props;
$$self.$$.get = () => ({ things, foo, bar, baz });
$$self.$$.set = $$props => { $$self.$$.set = $$props => {
if ('things' in $$props) things = $$props.things; if ('things' in $$props) things = $$props.things;
if ('foo' in $$props) foo = $$props.foo; if ('foo' in $$props) foo = $$props.foo;
if ('bar' in $$props) bar = $$props.bar; if ('bar' in $$props) bar = $$props.bar;
if ('baz' in $$props) baz = $$props.baz; if ('baz' in $$props) baz = $$props.baz;
}; };
return { things, foo, bar, baz };
} }
class SvelteComponent extends SvelteComponentDev { class SvelteComponent extends SvelteComponentDev {
constructor(options) { constructor(options) {
super(options); super(options);
init(this, options, define, create_fragment, safe_not_equal); init(this, options, instance, create_fragment, safe_not_equal);
const state = this.$$.get(); const { ctx } = this.$$;
if (state.things === undefined) { if (ctx.things === undefined) {
console.warn("<SvelteComponent> was created without expected data property 'things'"); console.warn("<SvelteComponent> was created without expected data property 'things'");
} }
if (state.foo === undefined) { if (ctx.foo === undefined) {
console.warn("<SvelteComponent> was created without expected data property 'foo'"); console.warn("<SvelteComponent> was created without expected data property 'foo'");
} }
if (state.bar === undefined) { if (ctx.bar === undefined) {
console.warn("<SvelteComponent> was created without expected data property 'bar'"); console.warn("<SvelteComponent> was created without expected data property 'bar'");
} }
if (state.baz === undefined) { if (ctx.baz === undefined) {
console.warn("<SvelteComponent> was created without expected data property 'baz'"); console.warn("<SvelteComponent> was created without expected data property 'baz'");
} }
} }
get things() { get things() {
return this.$$.get().things; return this.$$.ctx.things;
} }
set things(value) { set things(things) {
this.$set({ things: value }); this.$set({ things });
flush(); flush();
} }
get foo() { get foo() {
return this.$$.get().foo; return this.$$.ctx.foo;
} }
set foo(value) { set foo(foo) {
this.$set({ foo: value }); this.$set({ foo });
flush(); flush();
} }
get bar() { get bar() {
return this.$$.get().bar; return this.$$.ctx.bar;
} }
set bar(value) { set bar(bar) {
this.$set({ bar: value }); this.$set({ bar });
flush(); flush();
} }
get baz() { get baz() {
return this.$$.get().baz; return this.$$.ctx.baz;
} }
set baz(value) { set baz(baz) {
this.$set({ baz: value }); this.$set({ baz });
flush(); flush();
} }
} }

@ -139,46 +139,46 @@ function create_fragment(component, ctx) {
}; };
} }
function define($$self, $$props) { function instance($$self, $$props) {
let { things, foo } = $$props; let { things, foo } = $$props;
$$self.$$.get = () => ({ things, foo });
$$self.$$.set = $$props => { $$self.$$.set = $$props => {
if ('things' in $$props) things = $$props.things; if ('things' in $$props) things = $$props.things;
if ('foo' in $$props) foo = $$props.foo; if ('foo' in $$props) foo = $$props.foo;
}; };
return { things, foo };
} }
class SvelteComponent extends SvelteComponentDev { class SvelteComponent extends SvelteComponentDev {
constructor(options) { constructor(options) {
super(options); super(options);
init(this, options, define, create_fragment, safe_not_equal); init(this, options, instance, create_fragment, safe_not_equal);
const state = this.$$.get(); const { ctx } = this.$$;
if (state.things === undefined) { if (ctx.things === undefined) {
console.warn("<SvelteComponent> was created without expected data property 'things'"); console.warn("<SvelteComponent> was created without expected data property 'things'");
} }
if (state.foo === undefined) { if (ctx.foo === undefined) {
console.warn("<SvelteComponent> was created without expected data property 'foo'"); console.warn("<SvelteComponent> was created without expected data property 'foo'");
} }
} }
get things() { get things() {
return this.$$.get().things; return this.$$.ctx.things;
} }
set things(value) { set things(things) {
this.$set({ things: value }); this.$set({ things });
flush(); flush();
} }
get foo() { get foo() {
return this.$$.get().foo; return this.$$.ctx.foo;
} }
set foo(value) { set foo(foo) {
this.$set({ foo: value }); this.$set({ foo });
flush(); flush();
} }
} }

@ -105,28 +105,28 @@ function create_fragment(component, ctx) {
}; };
} }
function define($$self, $$props) { function instance($$self, $$props) {
let { createElement } = $$props; let { createElement } = $$props;
$$self.$$.get = () => ({ createElement });
$$self.$$.set = $$props => { $$self.$$.set = $$props => {
if ('createElement' in $$props) createElement = $$props.createElement; if ('createElement' in $$props) createElement = $$props.createElement;
}; };
return { createElement };
} }
class SvelteComponent extends SvelteComponent_1 { class SvelteComponent extends SvelteComponent_1 {
constructor(options) { constructor(options) {
super(); super();
init(this, options, define, create_fragment, safe_not_equal); init(this, options, instance, create_fragment, safe_not_equal);
} }
get createElement() { get createElement() {
return this.$$.get().createElement; return this.$$.ctx.createElement;
} }
set createElement(value) { set createElement(createElement) {
this.$set({ createElement: value }); this.$set({ createElement });
flush(); flush();
} }
} }

@ -15,32 +15,32 @@ function create_fragment(component, ctx) {
}; };
} }
function define($$self, $$props) { function instance($$self, $$props) {
let { foo = 'bar' } = $$props; let { foo = 'bar' } = $$props;
onMount(() => { onMount(() => {
alert(JSON.stringify(data())); alert(JSON.stringify(data()));
}); });
$$self.$$.get = () => ({ foo });
$$self.$$.set = $$props => { $$self.$$.set = $$props => {
if ('foo' in $$props) foo = $$props.foo; if ('foo' in $$props) foo = $$props.foo;
}; };
return { foo };
} }
class SvelteComponent extends SvelteComponent_1 { class SvelteComponent extends SvelteComponent_1 {
constructor(options) { constructor(options) {
super(); super();
init(this, options, define, create_fragment, safe_not_equal); init(this, options, instance, create_fragment, safe_not_equal);
} }
get foo() { get foo() {
return this.$$.get().foo; return this.$$.ctx.foo;
} }
set foo(value) { set foo(foo) {
this.$set({ foo: value }); this.$set({ foo });
flush(); flush();
} }
} }

@ -52,41 +52,41 @@ function create_fragment(component, ctx) {
}; };
} }
function define($$self, $$props, $$make_dirty) { function instance($$self, $$props, $$invalidate) {
let { foo } = $$props; let { foo } = $$props;
let bar; let bar;
$$self.$$.get = () => ({ foo, bar });
$$self.$$.set = $$props => { $$self.$$.set = $$props => {
if ('foo' in $$props) foo = $$props.foo; if ('foo' in $$props) foo = $$props.foo;
}; };
$$self.$$.update = ($$dirty = { foo: 1 }) => { $$self.$$.update = ($$dirty = { foo: 1 }) => {
if ($$dirty.foo) { if ($$dirty.foo) {
bar = foo * 2; $$make_dirty('bar'); bar = foo * 2; $$invalidate('bar', bar);
} }
}; };
return { foo, bar };
} }
class SvelteComponent extends SvelteComponentDev { class SvelteComponent extends SvelteComponentDev {
constructor(options) { constructor(options) {
super(options); super(options);
init(this, options, define, create_fragment, safe_not_equal); init(this, options, instance, create_fragment, safe_not_equal);
const state = this.$$.get(); const { ctx } = this.$$;
if (state.foo === undefined) { if (ctx.foo === undefined) {
console.warn("<SvelteComponent> was created without expected data property 'foo'"); console.warn("<SvelteComponent> was created without expected data property 'foo'");
} }
} }
get foo() { get foo() {
return this.$$.get().foo; return this.$$.ctx.foo;
} }
set foo(value) { set foo(foo) {
this.$set({ foo: value }); this.$set({ foo });
flush(); flush();
} }
} }

@ -43,28 +43,28 @@ function create_fragment(component, ctx) {
}; };
} }
function define($$self, $$props) { function instance($$self, $$props) {
let { bar } = $$props; let { bar } = $$props;
$$self.$$.get = () => ({ bar });
$$self.$$.set = $$props => { $$self.$$.set = $$props => {
if ('bar' in $$props) bar = $$props.bar; if ('bar' in $$props) bar = $$props.bar;
}; };
return { bar };
} }
class SvelteComponent extends SvelteComponent_1 { class SvelteComponent extends SvelteComponent_1 {
constructor(options) { constructor(options) {
super(); super();
init(this, options, define, create_fragment, safe_not_equal); init(this, options, instance, create_fragment, safe_not_equal);
} }
get bar() { get bar() {
return this.$$.get().bar; return this.$$.ctx.bar;
} }
set bar(value) { set bar(bar) {
this.$set({ bar: value }); this.$set({ bar });
flush(); flush();
} }
} }

@ -43,28 +43,28 @@ function create_fragment(component, ctx) {
}; };
} }
function define($$self, $$props) { function instance($$self, $$props) {
let { bar } = $$props; let { bar } = $$props;
$$self.$$.get = () => ({ bar });
$$self.$$.set = $$props => { $$self.$$.set = $$props => {
if ('bar' in $$props) bar = $$props.bar; if ('bar' in $$props) bar = $$props.bar;
}; };
return { bar };
} }
class SvelteComponent extends SvelteComponent_1 { class SvelteComponent extends SvelteComponent_1 {
constructor(options) { constructor(options) {
super(); super();
init(this, options, define, create_fragment, safe_not_equal); init(this, options, instance, create_fragment, safe_not_equal);
} }
get bar() { get bar() {
return this.$$.get().bar; return this.$$.ctx.bar;
} }
set bar(value) { set bar(bar) {
this.$set({ bar: value }); this.$set({ bar });
flush(); flush();
} }
} }

@ -41,28 +41,28 @@ function create_fragment(component, ctx) {
}; };
} }
function define($$self, $$props) { function instance($$self, $$props) {
let { bar } = $$props; let { bar } = $$props;
$$self.$$.get = () => ({ bar });
$$self.$$.set = $$props => { $$self.$$.set = $$props => {
if ('bar' in $$props) bar = $$props.bar; if ('bar' in $$props) bar = $$props.bar;
}; };
return { bar };
} }
class SvelteComponent extends SvelteComponent_1 { class SvelteComponent extends SvelteComponent_1 {
constructor(options) { constructor(options) {
super(); super();
init(this, options, define, create_fragment, safe_not_equal); init(this, options, instance, create_fragment, safe_not_equal);
} }
get bar() { get bar() {
return this.$$.get().bar; return this.$$.ctx.bar;
} }
set bar(value) { set bar(bar) {
this.$set({ bar: value }); this.$set({ bar });
flush(); flush();
} }
} }

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, init, mount_component, noop, safe_not_equal } from "svelte/internal"; import { SvelteComponent as SvelteComponent_1, identity, init, mount_component, noop, safe_not_equal } from "svelte/internal";
import LazyLoad from "./LazyLoad.html"; import LazyLoad from "./LazyLoad.html";
function create_fragment(component, ctx) { function create_fragment(component, ctx) {
@ -44,7 +44,7 @@ function func() {
class SvelteComponent extends SvelteComponent_1 { class SvelteComponent extends SvelteComponent_1 {
constructor(options) { constructor(options) {
super(); super();
init(this, options, noop, create_fragment, safe_not_equal); init(this, options, identity, create_fragment, safe_not_equal);
} }
} }

@ -145,58 +145,58 @@ function create_fragment(component, ctx) {
}; };
} }
function define($$self, $$props) { function instance($$self, $$props) {
let { comments, elapsed, time, foo } = $$props; let { comments, elapsed, time, foo } = $$props;
$$self.$$.get = () => ({ comments, elapsed, time, foo });
$$self.$$.set = $$props => { $$self.$$.set = $$props => {
if ('comments' in $$props) comments = $$props.comments; if ('comments' in $$props) comments = $$props.comments;
if ('elapsed' in $$props) elapsed = $$props.elapsed; if ('elapsed' in $$props) elapsed = $$props.elapsed;
if ('time' in $$props) time = $$props.time; if ('time' in $$props) time = $$props.time;
if ('foo' in $$props) foo = $$props.foo; if ('foo' in $$props) foo = $$props.foo;
}; };
return { comments, elapsed, time, foo };
} }
class SvelteComponent extends SvelteComponent_1 { class SvelteComponent extends SvelteComponent_1 {
constructor(options) { constructor(options) {
super(); super();
init(this, options, define, create_fragment, safe_not_equal); init(this, options, instance, create_fragment, safe_not_equal);
} }
get comments() { get comments() {
return this.$$.get().comments; return this.$$.ctx.comments;
} }
set comments(value) { set comments(comments) {
this.$set({ comments: value }); this.$set({ comments });
flush(); flush();
} }
get elapsed() { get elapsed() {
return this.$$.get().elapsed; return this.$$.ctx.elapsed;
} }
set elapsed(value) { set elapsed(elapsed) {
this.$set({ elapsed: value }); this.$set({ elapsed });
flush(); flush();
} }
get time() { get time() {
return this.$$.get().time; return this.$$.ctx.time;
} }
set time(value) { set time(time) {
this.$set({ time: value }); this.$set({ time });
flush(); flush();
} }
get foo() { get foo() {
return this.$$.get().foo; return this.$$.ctx.foo;
} }
set foo(value) { set foo(foo) {
this.$set({ foo: value }); this.$set({ foo });
flush(); flush();
} }
} }

@ -120,28 +120,28 @@ function foo(node, animation, params) {
}; };
} }
function define($$self, $$props) { function instance($$self, $$props) {
let { things } = $$props; let { things } = $$props;
$$self.$$.get = () => ({ things });
$$self.$$.set = $$props => { $$self.$$.set = $$props => {
if ('things' in $$props) things = $$props.things; if ('things' in $$props) things = $$props.things;
}; };
return { things };
} }
class SvelteComponent extends SvelteComponent_1 { class SvelteComponent extends SvelteComponent_1 {
constructor(options) { constructor(options) {
super(); super();
init(this, options, define, create_fragment, safe_not_equal); init(this, options, instance, create_fragment, safe_not_equal);
} }
get things() { get things() {
return this.$$.get().things; return this.$$.ctx.things;
} }
set things(value) { set things(things) {
this.$set({ things: value }); this.$set({ things });
flush(); flush();
} }
} }

@ -90,28 +90,28 @@ function create_fragment(component, ctx) {
}; };
} }
function define($$self, $$props) { function instance($$self, $$props) {
let { things } = $$props; let { things } = $$props;
$$self.$$.get = () => ({ things });
$$self.$$.set = $$props => { $$self.$$.set = $$props => {
if ('things' in $$props) things = $$props.things; if ('things' in $$props) things = $$props.things;
}; };
return { things };
} }
class SvelteComponent extends SvelteComponent_1 { class SvelteComponent extends SvelteComponent_1 {
constructor(options) { constructor(options) {
super(); super();
init(this, options, define, create_fragment, safe_not_equal); init(this, options, instance, create_fragment, safe_not_equal);
} }
get things() { get things() {
return this.$$.get().things; return this.$$.ctx.things;
} }
set things(value) { set things(things) {
this.$set({ things: value }); this.$set({ things });
flush(); flush();
} }
} }

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, addListener, append, createElement, createText, detachNode, init, insert, noop, preventDefault, run, run_all, safe_not_equal, stopPropagation } from "svelte/internal"; import { SvelteComponent as SvelteComponent_1, addListener, append, createElement, createText, detachNode, identity, init, insert, noop, preventDefault, run, run_all, safe_not_equal, stopPropagation } from "svelte/internal";
function create_fragment(component, ctx) { function create_fragment(component, ctx) {
var div, button0, text1, button1, text3, button2, current, dispose; var div, button0, text1, button1, text3, button2, current, dispose;
@ -63,7 +63,7 @@ function handleClick() {
class SvelteComponent extends SvelteComponent_1 { class SvelteComponent extends SvelteComponent_1 {
constructor(options) { constructor(options) {
super(); super();
init(this, options, noop, create_fragment, safe_not_equal); init(this, options, identity, create_fragment, safe_not_equal);
} }
} }

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, append, createElement, detachNode, init, noop, run, safe_not_equal } from "svelte/internal"; import { SvelteComponent as SvelteComponent_1, append, createElement, detachNode, identity, init, noop, run, safe_not_equal } from "svelte/internal";
function create_fragment(component, ctx) { function create_fragment(component, ctx) {
var meta0, meta1, current; var meta0, meta1, current;
@ -39,7 +39,7 @@ function create_fragment(component, ctx) {
class SvelteComponent extends SvelteComponent_1 { class SvelteComponent extends SvelteComponent_1 {
constructor(options) { constructor(options) {
super(); super();
init(this, options, noop, create_fragment, safe_not_equal); init(this, options, identity, create_fragment, safe_not_equal);
} }
} }

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, append, createElement, createText, detachNode, init, insert, noop, run, safe_not_equal } from "svelte/internal"; import { SvelteComponent as SvelteComponent_1, append, createElement, createText, detachNode, identity, init, insert, noop, run, safe_not_equal } from "svelte/internal";
function create_fragment(component, ctx) { function create_fragment(component, ctx) {
var b, text_value = get_answer(), text, current; var b, text_value = get_answer(), text, current;
@ -40,7 +40,7 @@ function get_answer() { return ANSWER; }
class SvelteComponent extends SvelteComponent_1 { class SvelteComponent extends SvelteComponent_1 {
constructor(options) { constructor(options) {
super(); super();
init(this, options, noop, create_fragment, safe_not_equal); init(this, options, identity, create_fragment, safe_not_equal);
} }
} }

@ -93,28 +93,28 @@ function create_fragment(component, ctx) {
}; };
} }
function define($$self, $$props) { function instance($$self, $$props) {
let { foo } = $$props; let { foo } = $$props;
$$self.$$.get = () => ({ foo });
$$self.$$.set = $$props => { $$self.$$.set = $$props => {
if ('foo' in $$props) foo = $$props.foo; if ('foo' in $$props) foo = $$props.foo;
}; };
return { foo };
} }
class SvelteComponent extends SvelteComponent_1 { class SvelteComponent extends SvelteComponent_1 {
constructor(options) { constructor(options) {
super(); super();
init(this, options, define, create_fragment, safe_not_equal); init(this, options, instance, create_fragment, safe_not_equal);
} }
get foo() { get foo() {
return this.$$.get().foo; return this.$$.ctx.foo;
} }
set foo(value) { set foo(foo) {
this.$set({ foo: value }); this.$set({ foo });
flush(); flush();
} }
} }

@ -69,28 +69,28 @@ function create_fragment(component, ctx) {
}; };
} }
function define($$self, $$props) { function instance($$self, $$props) {
let { foo } = $$props; let { foo } = $$props;
$$self.$$.get = () => ({ foo });
$$self.$$.set = $$props => { $$self.$$.set = $$props => {
if ('foo' in $$props) foo = $$props.foo; if ('foo' in $$props) foo = $$props.foo;
}; };
return { foo };
} }
class SvelteComponent extends SvelteComponent_1 { class SvelteComponent extends SvelteComponent_1 {
constructor(options) { constructor(options) {
super(); super();
init(this, options, define, create_fragment, safe_not_equal); init(this, options, instance, create_fragment, safe_not_equal);
} }
get foo() { get foo() {
return this.$$.get().foo; return this.$$.ctx.foo;
} }
set foo(value) { set foo(foo) {
this.$set({ foo: value }); this.$set({ foo });
flush(); flush();
} }
} }

@ -41,48 +41,48 @@ function create_fragment(component, ctx) {
}; };
} }
function define($$self, $$props) { function instance($$self, $$props) {
let { color, x, y } = $$props; let { color, x, y } = $$props;
$$self.$$.get = () => ({ color, x, y });
$$self.$$.set = $$props => { $$self.$$.set = $$props => {
if ('color' in $$props) color = $$props.color; if ('color' in $$props) color = $$props.color;
if ('x' in $$props) x = $$props.x; if ('x' in $$props) x = $$props.x;
if ('y' in $$props) y = $$props.y; if ('y' in $$props) y = $$props.y;
}; };
return { color, x, y };
} }
class SvelteComponent extends SvelteComponent_1 { class SvelteComponent extends SvelteComponent_1 {
constructor(options) { constructor(options) {
super(); super();
init(this, options, define, create_fragment, safe_not_equal); init(this, options, instance, create_fragment, safe_not_equal);
} }
get color() { get color() {
return this.$$.get().color; return this.$$.ctx.color;
} }
set color(value) { set color(color) {
this.$set({ color: value }); this.$set({ color });
flush(); flush();
} }
get x() { get x() {
return this.$$.get().x; return this.$$.ctx.x;
} }
set x(value) { set x(x) {
this.$set({ x: value }); this.$set({ x });
flush(); flush();
} }
get y() { get y() {
return this.$$.get().y; return this.$$.ctx.y;
} }
set y(value) { set y(y) {
this.$set({ y: value }); this.$set({ y });
flush(); flush();
} }
} }

@ -36,28 +36,28 @@ function create_fragment(component, ctx) {
}; };
} }
function define($$self, $$props) { function instance($$self, $$props) {
let { data } = $$props; let { data } = $$props;
$$self.$$.get = () => ({ data });
$$self.$$.set = $$props => { $$self.$$.set = $$props => {
if ('data' in $$props) data = $$props.data; if ('data' in $$props) data = $$props.data;
}; };
return { data };
} }
class SvelteComponent extends SvelteComponent_1 { class SvelteComponent extends SvelteComponent_1 {
constructor(options) { constructor(options) {
super(); super();
init(this, options, define, create_fragment, safe_not_equal); init(this, options, instance, create_fragment, safe_not_equal);
} }
get data() { get data() {
return this.$$.get().data; return this.$$.ctx.data;
} }
set data(value) { set data(data) {
this.$set({ data: value }); this.$set({ data });
flush(); flush();
} }
} }

@ -36,28 +36,28 @@ function create_fragment(component, ctx) {
}; };
} }
function define($$self, $$props) { function instance($$self, $$props) {
let { color } = $$props; let { color } = $$props;
$$self.$$.get = () => ({ color });
$$self.$$.set = $$props => { $$self.$$.set = $$props => {
if ('color' in $$props) color = $$props.color; if ('color' in $$props) color = $$props.color;
}; };
return { color };
} }
class SvelteComponent extends SvelteComponent_1 { class SvelteComponent extends SvelteComponent_1 {
constructor(options) { constructor(options) {
super(); super();
init(this, options, define, create_fragment, safe_not_equal); init(this, options, instance, create_fragment, safe_not_equal);
} }
get color() { get color() {
return this.$$.get().color; return this.$$.ctx.color;
} }
set color(value) { set color(color) {
this.$set({ color: value }); this.$set({ color });
flush(); flush();
} }
} }

@ -47,48 +47,48 @@ function create_fragment(component, ctx) {
}; };
} }
function define($$self, $$props) { function instance($$self, $$props) {
let { style, key, value } = $$props; let { style, key, value } = $$props;
$$self.$$.get = () => ({ style, key, value });
$$self.$$.set = $$props => { $$self.$$.set = $$props => {
if ('style' in $$props) style = $$props.style; if ('style' in $$props) style = $$props.style;
if ('key' in $$props) key = $$props.key; if ('key' in $$props) key = $$props.key;
if ('value' in $$props) value = $$props.value; if ('value' in $$props) value = $$props.value;
}; };
return { style, key, value };
} }
class SvelteComponent extends SvelteComponent_1 { class SvelteComponent extends SvelteComponent_1 {
constructor(options) { constructor(options) {
super(); super();
init(this, options, define, create_fragment, safe_not_equal); init(this, options, instance, create_fragment, safe_not_equal);
} }
get style() { get style() {
return this.$$.get().style; return this.$$.ctx.style;
} }
set style(value) { set style(style) {
this.$set({ style: value }); this.$set({ style });
flush(); flush();
} }
get key() { get key() {
return this.$$.get().key; return this.$$.ctx.key;
} }
set key(value) { set key(key) {
this.$set({ key: value }); this.$set({ key });
flush(); flush();
} }
get value() { get value() {
return this.$$.get().value; return this.$$.ctx.value;
} }
set value(value) { set value(value) {
this.$set({ value: value }); this.$set({ value });
flush(); flush();
} }
} }

@ -41,33 +41,33 @@ function create_fragment(component, ctx) {
}; };
} }
function define($$self, $$props, $$make_dirty) { function instance($$self, $$props, $$invalidate) {
let { files } = $$props; let { files } = $$props;
function input_input_handler() { function input_input_handler() {
files = this.files; files = this.files;
$$make_dirty('files'); $$invalidate('files', files);
} }
$$self.$$.get = () => ({ files, input_input_handler });
$$self.$$.set = $$props => { $$self.$$.set = $$props => {
if ('files' in $$props) files = $$props.files; if ('files' in $$props) files = $$props.files;
}; };
return { files, input_input_handler };
} }
class SvelteComponent extends SvelteComponent_1 { class SvelteComponent extends SvelteComponent_1 {
constructor(options) { constructor(options) {
super(); super();
init(this, options, define, create_fragment, safe_not_equal); init(this, options, instance, create_fragment, safe_not_equal);
} }
get files() { get files() {
return this.$$.get().files; return this.$$.ctx.files;
} }
set files(value) { set files(files) {
this.$set({ files: value }); this.$set({ files });
flush(); flush();
} }
} }

@ -44,33 +44,33 @@ function create_fragment(component, ctx) {
}; };
} }
function define($$self, $$props, $$make_dirty) { function instance($$self, $$props, $$invalidate) {
let { value } = $$props; let { value } = $$props;
function input_change_input_handler() { function input_change_input_handler() {
value = toNumber(this.value); value = toNumber(this.value);
$$make_dirty('value'); $$invalidate('value', value);
} }
$$self.$$.get = () => ({ value, input_change_input_handler });
$$self.$$.set = $$props => { $$self.$$.set = $$props => {
if ('value' in $$props) value = $$props.value; if ('value' in $$props) value = $$props.value;
}; };
return { value, input_change_input_handler };
} }
class SvelteComponent extends SvelteComponent_1 { class SvelteComponent extends SvelteComponent_1 {
constructor(options) { constructor(options) {
super(); super();
init(this, options, define, create_fragment, safe_not_equal); init(this, options, instance, create_fragment, safe_not_equal);
} }
get value() { get value() {
return this.$$.get().value; return this.$$.ctx.value;
} }
set value(value) { set value(value) {
this.$set({ value: value }); this.$set({ value });
flush(); flush();
} }
} }

@ -40,33 +40,33 @@ function create_fragment(component, ctx) {
}; };
} }
function define($$self, $$props, $$make_dirty) { function instance($$self, $$props, $$invalidate) {
let { foo } = $$props; let { foo } = $$props;
function input_change_handler() { function input_change_handler() {
foo = this.checked; foo = this.checked;
$$make_dirty('foo'); $$invalidate('foo', foo);
} }
$$self.$$.get = () => ({ foo, input_change_handler });
$$self.$$.set = $$props => { $$self.$$.set = $$props => {
if ('foo' in $$props) foo = $$props.foo; if ('foo' in $$props) foo = $$props.foo;
}; };
return { foo, input_change_handler };
} }
class SvelteComponent extends SvelteComponent_1 { class SvelteComponent extends SvelteComponent_1 {
constructor(options) { constructor(options) {
super(); super();
init(this, options, define, create_fragment, safe_not_equal); init(this, options, instance, create_fragment, safe_not_equal);
} }
get foo() { get foo() {
return this.$$.get().foo; return this.$$.ctx.foo;
} }
set foo(value) { set foo(foo) {
this.$set({ foo: value }); this.$set({ foo });
flush(); flush();
} }
} }

@ -49,20 +49,20 @@ function create_fragment(component, ctx) {
}; };
} }
function define($$self, $$props, $$make_dirty) { function instance($$self, $$props, $$invalidate) {
let x = 0; let x = 0;
function foo() { function foo() {
if (true) { x += 1; $$make_dirty('x'); } if (true) { x += 1; $$invalidate('x', x); }
} }
$$self.$$.get = () => ({ x, foo }); return { x, foo };
} }
class SvelteComponent extends SvelteComponent_1 { class SvelteComponent extends SvelteComponent_1 {
constructor(options) { constructor(options) {
super(); super();
init(this, options, define, create_fragment, safe_not_equal); init(this, options, instance, create_fragment, safe_not_equal);
} }
} }

@ -49,21 +49,21 @@ function create_fragment(component, ctx) {
}; };
} }
function define($$self, $$props, $$make_dirty) { function instance($$self, $$props, $$invalidate) {
let things = []; let things = [];
function foo() { function foo() {
things.push(1); things.push(1);
$$make_dirty('things'); $$invalidate('things', things);
} }
$$self.$$.get = () => ({ things, foo }); return { things, foo };
} }
class SvelteComponent extends SvelteComponent_1 { class SvelteComponent extends SvelteComponent_1 {
constructor(options) { constructor(options) {
super(); super();
init(this, options, define, create_fragment, safe_not_equal); init(this, options, instance, create_fragment, safe_not_equal);
} }
} }

@ -49,20 +49,20 @@ function create_fragment(component, ctx) {
}; };
} }
function define($$self, $$props, $$make_dirty) { function instance($$self, $$props, $$invalidate) {
let x = 0; let x = 0;
function click_handler() { function click_handler() {
if (true) { x += 1; $$make_dirty('x'); } if (true) { x += 1; $$invalidate('x', x); }
} }
$$self.$$.get = () => ({ x, click_handler }); return { x, click_handler };
} }
class SvelteComponent extends SvelteComponent_1 { class SvelteComponent extends SvelteComponent_1 {
constructor(options) { constructor(options) {
super(); super();
init(this, options, define, create_fragment, safe_not_equal); init(this, options, instance, create_fragment, safe_not_equal);
} }
} }

@ -49,18 +49,18 @@ function create_fragment(component, ctx) {
}; };
} }
function define($$self, $$props, $$make_dirty) { function instance($$self, $$props, $$invalidate) {
let things = []; let things = [];
function click_handler() { things.push(1); $$make_dirty('things') } function click_handler() { things.push(1); $$invalidate('things', things) }
$$self.$$.get = () => ({ things, click_handler }); return { things, click_handler };
} }
class SvelteComponent extends SvelteComponent_1 { class SvelteComponent extends SvelteComponent_1 {
constructor(options) { constructor(options) {
super(); super();
init(this, options, define, create_fragment, safe_not_equal); init(this, options, instance, create_fragment, safe_not_equal);
} }
} }

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, createElement, detachNode, init, insert, noop, run, safe_not_equal, setInputType } from "svelte/internal"; import { SvelteComponent as SvelteComponent_1, createElement, detachNode, identity, init, insert, noop, run, safe_not_equal, setInputType } from "svelte/internal";
function create_fragment(component, ctx) { function create_fragment(component, ctx) {
var input, current; var input, current;
@ -35,7 +35,7 @@ function create_fragment(component, ctx) {
class SvelteComponent extends SvelteComponent_1 { class SvelteComponent extends SvelteComponent_1 {
constructor(options) { constructor(options) {
super(); super();
init(this, options, noop, create_fragment, safe_not_equal); init(this, options, identity, create_fragment, safe_not_equal);
} }
} }

@ -54,7 +54,7 @@ function create_fragment(component, ctx) {
}; };
} }
function define($$self, $$props, $$make_dirty) { function instance($$self, $$props, $$invalidate) {
let { buffered, seekable, played, currentTime, duration, paused, volume } = $$props; let { buffered, seekable, played, currentTime, duration, paused, volume } = $$props;
function audio_timeupdate_handler() { function audio_timeupdate_handler() {
@ -62,38 +62,48 @@ function define($$self, $$props, $$make_dirty) {
if (!audio.paused) audio_animationframe = requestAnimationFrame(audio_timeupdate_handler); if (!audio.paused) audio_animationframe = requestAnimationFrame(audio_timeupdate_handler);
played = timeRangesToArray(this.played); played = timeRangesToArray(this.played);
currentTime = this.currentTime; currentTime = this.currentTime;
$$make_dirty('played'); $$invalidate('played', played);
$$make_dirty('currentTime'); $$invalidate('currentTime', currentTime);
} }
function audio_durationchange_handler() { function audio_durationchange_handler() {
duration = this.duration; duration = this.duration;
$$make_dirty('duration'); $$invalidate('duration', duration);
} }
function audio_play_pause_handler() { function audio_play_pause_handler() {
paused = this.paused; paused = this.paused;
$$make_dirty('paused'); $$invalidate('paused', paused);
} }
function audio_progress_handler() { function audio_progress_handler() {
buffered = timeRangesToArray(this.buffered); buffered = timeRangesToArray(this.buffered);
$$make_dirty('buffered'); $$invalidate('buffered', buffered);
} }
function audio_loadedmetadata_handler() { function audio_loadedmetadata_handler() {
buffered = timeRangesToArray(this.buffered); buffered = timeRangesToArray(this.buffered);
seekable = timeRangesToArray(this.seekable); seekable = timeRangesToArray(this.seekable);
$$make_dirty('buffered'); $$invalidate('buffered', buffered);
$$make_dirty('seekable'); $$invalidate('seekable', seekable);
} }
function audio_volumechange_handler() { function audio_volumechange_handler() {
volume = this.volume; volume = this.volume;
$$make_dirty('volume'); $$invalidate('volume', volume);
} }
$$self.$$.get = () => ({ $$self.$$.set = $$props => {
if ('buffered' in $$props) buffered = $$props.buffered;
if ('seekable' in $$props) seekable = $$props.seekable;
if ('played' in $$props) played = $$props.played;
if ('currentTime' in $$props) currentTime = $$props.currentTime;
if ('duration' in $$props) duration = $$props.duration;
if ('paused' in $$props) paused = $$props.paused;
if ('volume' in $$props) volume = $$props.volume;
};
return {
buffered, buffered,
seekable, seekable,
played, played,
@ -107,85 +117,75 @@ function define($$self, $$props, $$make_dirty) {
audio_progress_handler, audio_progress_handler,
audio_loadedmetadata_handler, audio_loadedmetadata_handler,
audio_volumechange_handler audio_volumechange_handler
});
$$self.$$.set = $$props => {
if ('buffered' in $$props) buffered = $$props.buffered;
if ('seekable' in $$props) seekable = $$props.seekable;
if ('played' in $$props) played = $$props.played;
if ('currentTime' in $$props) currentTime = $$props.currentTime;
if ('duration' in $$props) duration = $$props.duration;
if ('paused' in $$props) paused = $$props.paused;
if ('volume' in $$props) volume = $$props.volume;
}; };
} }
class SvelteComponent extends SvelteComponent_1 { class SvelteComponent extends SvelteComponent_1 {
constructor(options) { constructor(options) {
super(); super();
init(this, options, define, create_fragment, safe_not_equal); init(this, options, instance, create_fragment, safe_not_equal);
} }
get buffered() { get buffered() {
return this.$$.get().buffered; return this.$$.ctx.buffered;
} }
set buffered(value) { set buffered(buffered) {
this.$set({ buffered: value }); this.$set({ buffered });
flush(); flush();
} }
get seekable() { get seekable() {
return this.$$.get().seekable; return this.$$.ctx.seekable;
} }
set seekable(value) { set seekable(seekable) {
this.$set({ seekable: value }); this.$set({ seekable });
flush(); flush();
} }
get played() { get played() {
return this.$$.get().played; return this.$$.ctx.played;
} }
set played(value) { set played(played) {
this.$set({ played: value }); this.$set({ played });
flush(); flush();
} }
get currentTime() { get currentTime() {
return this.$$.get().currentTime; return this.$$.ctx.currentTime;
} }
set currentTime(value) { set currentTime(currentTime) {
this.$set({ currentTime: value }); this.$set({ currentTime });
flush(); flush();
} }
get duration() { get duration() {
return this.$$.get().duration; return this.$$.ctx.duration;
} }
set duration(value) { set duration(duration) {
this.$set({ duration: value }); this.$set({ duration });
flush(); flush();
} }
get paused() { get paused() {
return this.$$.get().paused; return this.$$.ctx.paused;
} }
set paused(value) { set paused(paused) {
this.$set({ paused: value }); this.$set({ paused });
flush(); flush();
} }
get volume() { get volume() {
return this.$$.get().volume; return this.$$.ctx.volume;
} }
set volume(value) { set volume(volume) {
this.$set({ volume: value }); this.$set({ volume });
flush(); flush();
} }
} }

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, callAfter, createText, detachNode, init, insert, mount_component, noop, safe_not_equal } from "svelte/internal"; import { SvelteComponent as SvelteComponent_1, callAfter, createText, detachNode, identity, init, insert, mount_component, noop, safe_not_equal } from "svelte/internal";
import Imported from "Imported.html"; import Imported from "Imported.html";
function create_fragment(component, ctx) { function create_fragment(component, ctx) {
@ -55,7 +55,7 @@ function create_fragment(component, ctx) {
class SvelteComponent extends SvelteComponent_1 { class SvelteComponent extends SvelteComponent_1 {
constructor(options) { constructor(options) {
super(); super();
init(this, options, noop, create_fragment, safe_not_equal); init(this, options, identity, create_fragment, safe_not_equal);
} }
} }

@ -63,28 +63,28 @@ function create_fragment(component, ctx) {
}; };
} }
function define($$self, $$props) { function instance($$self, $$props) {
let { current } = $$props; let { current } = $$props;
$$self.$$.get = () => ({ current });
$$self.$$.set = $$props => { $$self.$$.set = $$props => {
if ('current' in $$props) current = $$props.current; if ('current' in $$props) current = $$props.current;
}; };
return { current };
} }
class SvelteComponent extends SvelteComponent_1 { class SvelteComponent extends SvelteComponent_1 {
constructor(options) { constructor(options) {
super(); super();
init(this, options, define, create_fragment, safe_not_equal); init(this, options, instance, create_fragment, safe_not_equal);
} }
get current() { get current() {
return this.$$.get().current; return this.$$.ctx.current;
} }
set current(value) { set current(current) {
this.$set({ current: value }); this.$set({ current });
flush(); flush();
} }
} }

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, init, noop, run, safe_not_equal } from "svelte/internal"; import { SvelteComponent as SvelteComponent_1, identity, init, noop, run, safe_not_equal } from "svelte/internal";
function create_fragment(component, ctx) { function create_fragment(component, ctx) {
var current; var current;
@ -23,7 +23,7 @@ function foo(bar) {
class SvelteComponent extends SvelteComponent_1 { class SvelteComponent extends SvelteComponent_1 {
constructor(options) { constructor(options) {
super(); super();
init(this, options, noop, create_fragment, safe_not_equal); init(this, options, identity, create_fragment, safe_not_equal);
} }
get foo() { get foo() {

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, append, createSvgElement, createText, detachNode, init, insert, noop, run, safe_not_equal } from "svelte/internal"; import { SvelteComponent as SvelteComponent_1, append, createSvgElement, createText, detachNode, identity, init, insert, noop, run, safe_not_equal } from "svelte/internal";
function create_fragment(component, ctx) { function create_fragment(component, ctx) {
var svg, title, text, current; var svg, title, text, current;
@ -38,7 +38,7 @@ function create_fragment(component, ctx) {
class SvelteComponent extends SvelteComponent_1 { class SvelteComponent extends SvelteComponent_1 {
constructor(options) { constructor(options) {
super(); super();
init(this, options, noop, create_fragment, safe_not_equal); init(this, options, identity, create_fragment, safe_not_equal);
} }
} }

@ -22,28 +22,28 @@ function create_fragment(component, ctx) {
}; };
} }
function define($$self, $$props) { function instance($$self, $$props) {
let { custom } = $$props; let { custom } = $$props;
$$self.$$.get = () => ({ custom });
$$self.$$.set = $$props => { $$self.$$.set = $$props => {
if ('custom' in $$props) custom = $$props.custom; if ('custom' in $$props) custom = $$props.custom;
}; };
return { custom };
} }
class SvelteComponent extends SvelteComponent_1 { class SvelteComponent extends SvelteComponent_1 {
constructor(options) { constructor(options) {
super(); super();
init(this, options, define, create_fragment, safe_not_equal); init(this, options, instance, create_fragment, safe_not_equal);
} }
get custom() { get custom() {
return this.$$.get().custom; return this.$$.ctx.custom;
} }
set custom(value) { set custom(custom) {
this.$set({ custom: value }); this.$set({ custom });
flush(); flush();
} }
} }

@ -249,11 +249,9 @@ function create_fragment(component, ctx) {
}; };
} }
function define($$self, $$props) { function instance($$self, $$props) {
let { a, b, c, d, e } = $$props; let { a, b, c, d, e } = $$props;
$$self.$$.get = () => ({ a, b, c, d, e });
$$self.$$.set = $$props => { $$self.$$.set = $$props => {
if ('a' in $$props) a = $$props.a; if ('a' in $$props) a = $$props.a;
if ('b' in $$props) b = $$props.b; if ('b' in $$props) b = $$props.b;
@ -261,56 +259,58 @@ function define($$self, $$props) {
if ('d' in $$props) d = $$props.d; if ('d' in $$props) d = $$props.d;
if ('e' in $$props) e = $$props.e; if ('e' in $$props) e = $$props.e;
}; };
return { a, b, c, d, e };
} }
class SvelteComponent extends SvelteComponent_1 { class SvelteComponent extends SvelteComponent_1 {
constructor(options) { constructor(options) {
super(); super();
init(this, options, define, create_fragment, safe_not_equal); init(this, options, instance, create_fragment, safe_not_equal);
} }
get a() { get a() {
return this.$$.get().a; return this.$$.ctx.a;
} }
set a(value) { set a(a) {
this.$set({ a: value }); this.$set({ a });
flush(); flush();
} }
get b() { get b() {
return this.$$.get().b; return this.$$.ctx.b;
} }
set b(value) { set b(b) {
this.$set({ b: value }); this.$set({ b });
flush(); flush();
} }
get c() { get c() {
return this.$$.get().c; return this.$$.ctx.c;
} }
set c(value) { set c(c) {
this.$set({ c: value }); this.$set({ c });
flush(); flush();
} }
get d() { get d() {
return this.$$.get().d; return this.$$.ctx.d;
} }
set d(value) { set d(d) {
this.$set({ d: value }); this.$set({ d });
flush(); flush();
} }
get e() { get e() {
return this.$$.get().e; return this.$$.ctx.e;
} }
set e(value) { set e(e) {
this.$set({ e: value }); this.$set({ e });
flush(); flush();
} }
} }

@ -56,32 +56,32 @@ function create_fragment(component, ctx) {
}; };
} }
function define($$self, $$props, $$make_dirty) { function instance($$self, $$props, $$invalidate) {
let { y } = $$props; let { y } = $$props;
function onwindowscroll() { function onwindowscroll() {
y = window.pageYOffset; $$make_dirty('y'); y = window.pageYOffset; $$invalidate('y', y);
} }
$$self.$$.get = () => ({ y, onwindowscroll });
$$self.$$.set = $$props => { $$self.$$.set = $$props => {
if ('y' in $$props) y = $$props.y; if ('y' in $$props) y = $$props.y;
}; };
return { y, onwindowscroll };
} }
class SvelteComponent extends SvelteComponent_1 { class SvelteComponent extends SvelteComponent_1 {
constructor(options) { constructor(options) {
super(); super();
init(this, options, define, create_fragment, safe_not_equal); init(this, options, instance, create_fragment, safe_not_equal);
} }
get y() { get y() {
return this.$$.get().y; return this.$$.ctx.y;
} }
set y(value) { set y(y) {
this.$set({ y: value }); this.$set({ y });
flush(); flush();
} }
} }

Loading…
Cancel
Save