|
|
@ -1,15 +1,15 @@
|
|
|
|
/* generated by Svelte vX.Y.Z */
|
|
|
|
/* generated by Svelte vX.Y.Z */
|
|
|
|
import { appendNode, assign, createElement, createText, destroyEach, detachAfter, detachNode, init, insertNode, noop, proto } from "svelte/shared.js";
|
|
|
|
import { appendNode, assign, createElement, createText, destroyEach, detachAfter, detachNode, init, insertNode, noop, proto } from "svelte/shared.js";
|
|
|
|
|
|
|
|
|
|
|
|
function create_main_fragment(component, state) {
|
|
|
|
function create_main_fragment(component, ctx) {
|
|
|
|
var text, p, text_1;
|
|
|
|
var text, p, text_1;
|
|
|
|
|
|
|
|
|
|
|
|
var each_value = state.comments;
|
|
|
|
var each_value = ctx.comments;
|
|
|
|
|
|
|
|
|
|
|
|
var each_blocks = [];
|
|
|
|
var each_blocks = [];
|
|
|
|
|
|
|
|
|
|
|
|
for (var i = 0; i < each_value.length; i += 1) {
|
|
|
|
for (var i = 0; i < each_value.length; i += 1) {
|
|
|
|
each_blocks[i] = create_each_block(component, assign(assign({}, state), {
|
|
|
|
each_blocks[i] = create_each_block(component, assign(assign({}, ctx), {
|
|
|
|
each_value: each_value,
|
|
|
|
each_value: each_value,
|
|
|
|
comment: each_value[i],
|
|
|
|
comment: each_value[i],
|
|
|
|
i: i
|
|
|
|
i: i
|
|
|
@ -24,7 +24,7 @@ function create_main_fragment(component, state) {
|
|
|
|
|
|
|
|
|
|
|
|
text = createText("\n\n");
|
|
|
|
text = createText("\n\n");
|
|
|
|
p = createElement("p");
|
|
|
|
p = createElement("p");
|
|
|
|
text_1 = createText(state.foo);
|
|
|
|
text_1 = createText(ctx.foo);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
m: function mount(target, anchor) {
|
|
|
|
m: function mount(target, anchor) {
|
|
|
@ -37,12 +37,12 @@ function create_main_fragment(component, state) {
|
|
|
|
appendNode(text_1, p);
|
|
|
|
appendNode(text_1, p);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
p: function update(changed, state) {
|
|
|
|
p: function update(changed, ctx) {
|
|
|
|
var each_value = state.comments;
|
|
|
|
var each_value = ctx.comments;
|
|
|
|
|
|
|
|
|
|
|
|
if (changed.comments || changed.elapsed || changed.time) {
|
|
|
|
if (changed.comments || changed.elapsed || changed.time) {
|
|
|
|
for (var i = 0; i < each_value.length; i += 1) {
|
|
|
|
for (var i = 0; i < each_value.length; i += 1) {
|
|
|
|
var each_context = assign(assign({}, state), {
|
|
|
|
var each_context = assign(assign({}, ctx), {
|
|
|
|
each_value: each_value,
|
|
|
|
each_value: each_value,
|
|
|
|
comment: each_value[i],
|
|
|
|
comment: each_value[i],
|
|
|
|
i: i
|
|
|
|
i: i
|
|
|
@ -65,7 +65,7 @@ function create_main_fragment(component, state) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (changed.foo) {
|
|
|
|
if (changed.foo) {
|
|
|
|
text_1.data = state.foo;
|
|
|
|
text_1.data = ctx.foo;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
@ -85,15 +85,14 @@ function create_main_fragment(component, state) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// (1:0) {#each comments as comment, i}
|
|
|
|
// (1:0) {#each comments as comment, i}
|
|
|
|
function create_each_block(component, state) {
|
|
|
|
function create_each_block(component, ctx) {
|
|
|
|
var comment = state.comment, each_value = state.each_value, i = state.i;
|
|
|
|
var div, strong, text, text_1, span, text_2_value = ctx.comment.author, text_2, text_3, text_4_value = ctx.elapsed(ctx.comment.time, ctx.time), text_4, text_5, text_6, raw_value = ctx.comment.html, raw_before;
|
|
|
|
var div, strong, text, text_1, span, text_2_value = comment.author, text_2, text_3, text_4_value = state.elapsed(comment.time, state.time), text_4, text_5, text_6, raw_value = comment.html, raw_before;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
c: function create() {
|
|
|
|
c: function create() {
|
|
|
|
div = createElement("div");
|
|
|
|
div = createElement("div");
|
|
|
|
strong = createElement("strong");
|
|
|
|
strong = createElement("strong");
|
|
|
|
text = createText(i);
|
|
|
|
text = createText(ctx.i);
|
|
|
|
text_1 = createText("\n\n\t\t");
|
|
|
|
text_1 = createText("\n\n\t\t");
|
|
|
|
span = createElement("span");
|
|
|
|
span = createElement("span");
|
|
|
|
text_2 = createText(text_2_value);
|
|
|
|
text_2 = createText(text_2_value);
|
|
|
@ -125,19 +124,16 @@ function create_each_block(component, state) {
|
|
|
|
raw_before.insertAdjacentHTML("afterend", raw_value);
|
|
|
|
raw_before.insertAdjacentHTML("afterend", raw_value);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
p: function update(changed, state) {
|
|
|
|
p: function update(changed, ctx) {
|
|
|
|
comment = state.comment;
|
|
|
|
if ((changed.comments) && text_2_value !== (text_2_value = ctx.comment.author)) {
|
|
|
|
each_value = state.each_value;
|
|
|
|
|
|
|
|
i = state.i;
|
|
|
|
|
|
|
|
if ((changed.comments) && text_2_value !== (text_2_value = comment.author)) {
|
|
|
|
|
|
|
|
text_2.data = text_2_value;
|
|
|
|
text_2.data = text_2_value;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if ((changed.elapsed || changed.comments || changed.time) && text_4_value !== (text_4_value = state.elapsed(comment.time, state.time))) {
|
|
|
|
if ((changed.elapsed || changed.comments || changed.time) && text_4_value !== (text_4_value = ctx.elapsed(ctx.comment.time, ctx.time))) {
|
|
|
|
text_4.data = text_4_value;
|
|
|
|
text_4.data = text_4_value;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if ((changed.comments) && raw_value !== (raw_value = comment.html)) {
|
|
|
|
if ((changed.comments) && raw_value !== (raw_value = ctx.comment.html)) {
|
|
|
|
detachAfter(raw_before);
|
|
|
|
detachAfter(raw_before);
|
|
|
|
raw_before.insertAdjacentHTML("afterend", raw_value);
|
|
|
|
raw_before.insertAdjacentHTML("afterend", raw_value);
|
|
|
|
}
|
|
|
|
}
|
|
|
|