diff --git a/.gitignore b/.gitignore index 8acb5aa..6eddab7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ # IDE .idea/ .vs/ +packs/ # Node Modules node_modules/ diff --git a/changelog.md b/changelog.md index 4fd7a74..546f5ea 100644 --- a/changelog.md +++ b/changelog.md @@ -1,4 +1,15 @@ # Vagabonds of Dyfed Foundry VTT System + +0.5.1 +* Added the ability to send Techniques, Injury and Items to the Chat Window with the new blowhorn button +* Added Scrolling Combat Text on tokens when hp changes +* Updated the NPC sheet to give more room (as requested) +* Updated Actors and Items to use dataModels +* Updated NPC sheet to have slide out ability descriptions + +0.5.0 +* Updated for v12 + 0.4.1 * Fixed an with actor sheets in v10 diff --git a/css/vagabonds.css b/css/vagabonds.css index 90ba7b0..1eff090 100644 --- a/css/vagabonds.css +++ b/css/vagabonds.css @@ -234,12 +234,17 @@ } .vagabonds .items-list .item { - height: 30px; + line-height: 24px; padding: 3px 0; border-bottom: 1px solid #BBB; } +.break { + flex-basis: 100%; + height: 0; +} + .vagabonds .items-list .item .item-image { -webkit-box-flex: 0; -ms-flex: 0 0 24px; @@ -258,10 +263,16 @@ .vagabonds .items-list .item-controls { -webkit-box-flex: 0; - -ms-flex: 0 0 86px; - flex: 0 0 86px; + -ms-flex: auto; + flex: auto; text-align: right; opacity: 66%; + width: 10px; +} + +.vagabonds .npc_item_list { + display: flex; + flex-wrap: wrap; } .vagabonds .items-list .item-controls:hover { @@ -310,4 +321,12 @@ span.flavor-text h2 { span.flavor-text h1 { text-align: center; -} \ No newline at end of file +} + + +.npc_item_desc { + text-align:left; + display: none; + padding-left: 40px; + padding-right: 40px; + } diff --git a/dist/vagabonds.js b/dist/vagabonds.js index e91b4b2..aefd45d 100644 --- a/dist/vagabonds.js +++ b/dist/vagabonds.js @@ -69,6 +69,74 @@ var VagabondsActor = class extends Actor { _prepareCharacterData(actorData) { return actorData; } + async _preUpdate(changed, options, user) { + if (await super._preUpdate(changed, options, user) === false) + return false; + if ("health" in (this.system || {})) { + foundry.utils.setProperty(options, "vagabonds.health", { ...this.system.health }); + } + } + async _onUpdate(data, options, userId) { + super._onUpdate(data, options, userId); + const curr = this.system.health.value; + const hp = options.vagabonds?.health; + if (hp) { + const changes = { + hp: curr - hp.value + }; + changes.total = changes.hp; + this._displayTokenEffect(changes); + } + } + _displayTokenMessage(message, fill) { + const tokens = this.isToken ? [this.token] : this.getActiveTokens(true, true); + if (!tokens.length) + return; + for (const token of tokens) { + if (!token.object?.visible || !token.object?.renderable) + continue; + const t = token.object; + canvas.interface.createScrollingText(t.center, message, { + anchor: CONST.TEXT_ANCHOR_POINTS.TOP, + fontSize: 48, + fill, + stroke: 0, + strokeThickness: 4, + jitter: 0.25 + }); + } + } + _displayTokenEffect(changes) { + let key; + let value; + if (changes.hp < 0) { + key = "damage"; + value = changes.total; + } else if (changes.hp > 0) { + key = "healing"; + value = changes.total; + } + if (!key || !value) + return; + const tokens = this.isToken ? [this.token] : this.getActiveTokens(true, true); + if (!tokens.length) + return; + const pct = Math.clamp(Math.abs(value) / this.system.health.max, 0, 1); + const fill = CONFIG.Vagabonds.tokenHPColors[key]; + for (const token of tokens) { + if (!token.object?.visible || !token.object?.renderable) + continue; + const t = token.object; + canvas.interface.createScrollingText(t.center, value.signedString(), { + anchor: CONST.TEXT_ANCHOR_POINTS.TOP, + fontSize: 16 + 32 * pct, + fill, + stroke: 0, + strokeThickness: 4, + jitter: 0.25 + }); + } + } }; // node_modules/svelte/internal/index.mjs @@ -957,7 +1025,7 @@ function instance($$self, $$props, $$invalidate) { component_subscribe($$self, sheetData, (value) => $$invalidate(0, $sheetData = value)); const filePicker = (event) => { const attr2 = event.currentTarget.dataset.edit; - const current = getProperty($sheetData.actor, attr2); + const current = foundry.utils.getProperty($sheetData.actor, attr2); const fp = new FilePicker({ type: "image", current, @@ -989,54 +1057,59 @@ function create_fragment2(ctx) { let label1; let t5; let label2; - let t7; + let t9; let input0; let input0_value_value; - let t8; - let label3; let t10; + let label3; + let t14; let input1; let input1_value_value; - let t11; + let t15; let label4; - let t13; + let t19; let input2; let input2_value_value; - let t14; + let t20; let label5; - let t16; + let t24; let input3; let input3_value_value; - let t17; + let t25; let label6; - let t19; + let t29; let input4; let input4_value_value; - let t20; + let t30; let label7; - let t22; + let t34; let input5; let input5_value_value; - let t23; + let t35; let label8; - let t25; + let t39; let input6; let input6_value_value; - let t26; + let t40; + let label9; + let t42; let input7; let input7_value_value; - let t27; + let t43; let input8; let input8_value_value; - let t28; + let t44; let input9; let input9_value_value; - let t29; + let t45; let input10; let input10_value_value; - let t30; + let t46; let input11; let input11_value_value; + let t47; + let input12; + let input12_value_value; return { c() { main = element("main"); @@ -1048,49 +1121,54 @@ function create_fragment2(ctx) { label1.innerHTML = `Sum relevant positive and negative traits to determine aptitude (max +3, min -3)`; t5 = space(); label2 = element("label"); - label2.textContent = "My Approch to Conflict:"; - t7 = space(); + label2.innerHTML = `My Approch to Conflict:`; + t9 = space(); input0 = element("input"); - t8 = space(); - label3 = element("label"); - label3.textContent = "My Goal:"; t10 = space(); + label3 = element("label"); + label3.innerHTML = `My Goal:`; + t14 = space(); input1 = element("input"); - t11 = space(); + t15 = space(); label4 = element("label"); - label4.textContent = "My Gimmick:"; - t13 = space(); + label4.innerHTML = `My Gimmick:`; + t19 = space(); input2 = element("input"); - t14 = space(); + t20 = space(); label5 = element("label"); - label5.textContent = "My Background:"; - t16 = space(); + label5.innerHTML = `My Background:`; + t24 = space(); input3 = element("input"); - t17 = space(); + t25 = space(); label6 = element("label"); - label6.textContent = "My Foreground:"; - t19 = space(); + label6.innerHTML = `My Foreground:`; + t29 = space(); input4 = element("input"); - t20 = space(); + t30 = space(); label7 = element("label"); - label7.textContent = "My Weakness:"; - t22 = space(); + label7.innerHTML = `My Weakness:`; + t34 = space(); input5 = element("input"); - t23 = space(); + t35 = space(); label8 = element("label"); - label8.textContent = "Additional Traits Per Level:"; - t25 = space(); + label8.innerHTML = `My Wealth:`; + t39 = space(); input6 = element("input"); - t26 = space(); + t40 = space(); + label9 = element("label"); + label9.textContent = "Additional Traits Per Level:"; + t42 = space(); input7 = element("input"); - t27 = space(); + t43 = space(); input8 = element("input"); - t28 = space(); + t44 = space(); input9 = element("input"); - t29 = space(); + t45 = space(); input10 = element("input"); - t30 = space(); + t46 = space(); input11 = element("input"); + t47 = space(); + input12 = element("input"); attr(label0, "class", "resource-label"); attr(label1, "class", "rules-label"); attr(input0, "type", "text"); @@ -1118,29 +1196,33 @@ function create_fragment2(ctx) { input5.value = input5_value_value = ctx[1].system.aproaches.weakness; attr(input5, "class", "svelte-wvbhe2"); attr(input6, "type", "text"); - attr(input6, "name", "system.aproaches.a1"); - input6.value = input6_value_value = ctx[1].system.aproaches.a1; + attr(input6, "name", "system.aproaches.wealth"); + input6.value = input6_value_value = ctx[1].system.aproaches.wealth; attr(input6, "class", "svelte-wvbhe2"); attr(input7, "type", "text"); - attr(input7, "name", "system.aproaches.a2"); - input7.value = input7_value_value = ctx[1].system.aproaches.a2; + attr(input7, "name", "system.aproaches.a1"); + input7.value = input7_value_value = ctx[1].system.aproaches.a1; attr(input7, "class", "svelte-wvbhe2"); attr(input8, "type", "text"); - attr(input8, "name", "system.aproaches.a3"); - input8.value = input8_value_value = ctx[1].system.aproaches.a3; + attr(input8, "name", "system.aproaches.a2"); + input8.value = input8_value_value = ctx[1].system.aproaches.a2; attr(input8, "class", "svelte-wvbhe2"); attr(input9, "type", "text"); - attr(input9, "name", "system.aproaches.a4"); - input9.value = input9_value_value = ctx[1].system.aproaches.a4; + attr(input9, "name", "system.aproaches.a3"); + input9.value = input9_value_value = ctx[1].system.aproaches.a3; attr(input9, "class", "svelte-wvbhe2"); attr(input10, "type", "text"); - attr(input10, "name", "system.aproaches.a5"); - input10.value = input10_value_value = ctx[1].system.aproaches.a5; + attr(input10, "name", "system.aproaches.a4"); + input10.value = input10_value_value = ctx[1].system.aproaches.a4; attr(input10, "class", "svelte-wvbhe2"); attr(input11, "type", "text"); - attr(input11, "name", "system.aproaches.a6"); - input11.value = input11_value_value = ctx[1].system.aproaches.a6; + attr(input11, "name", "system.aproaches.a5"); + input11.value = input11_value_value = ctx[1].system.aproaches.a5; attr(input11, "class", "svelte-wvbhe2"); + attr(input12, "type", "text"); + attr(input12, "name", "system.aproaches.a6"); + input12.value = input12_value_value = ctx[1].system.aproaches.a6; + attr(input12, "class", "svelte-wvbhe2"); attr(main, "class", "svelte-wvbhe2"); }, m(target, anchor) { @@ -1151,42 +1233,46 @@ function create_fragment2(ctx) { append(main, label1); append(main, t5); append(main, label2); - append(main, t7); + append(main, t9); append(main, input0); - append(main, t8); - append(main, label3); append(main, t10); + append(main, label3); + append(main, t14); append(main, input1); - append(main, t11); + append(main, t15); append(main, label4); - append(main, t13); + append(main, t19); append(main, input2); - append(main, t14); + append(main, t20); append(main, label5); - append(main, t16); + append(main, t24); append(main, input3); - append(main, t17); + append(main, t25); append(main, label6); - append(main, t19); + append(main, t29); append(main, input4); - append(main, t20); + append(main, t30); append(main, label7); - append(main, t22); + append(main, t34); append(main, input5); - append(main, t23); + append(main, t35); append(main, label8); - append(main, t25); + append(main, t39); append(main, input6); - append(main, t26); + append(main, t40); + append(main, label9); + append(main, t42); append(main, input7); - append(main, t27); + append(main, t43); append(main, input8); - append(main, t28); + append(main, t44); append(main, input9); - append(main, t29); + append(main, t45); append(main, input10); - append(main, t30); + append(main, t46); append(main, input11); + append(main, t47); + append(main, input12); }, p: noop, i: noop, @@ -1241,12 +1327,12 @@ function slide(node, { delay = 0, duration = 400, easing = cubicOut } = {}) { // module/svelte/VagabondsLinage.svelte function get_each_context(ctx, list, i) { const child_ctx = ctx.slice(); - child_ctx[9] = list[i]; + child_ctx[10] = list[i]; return child_ctx; } function create_if_block(ctx) { let div; - let raw_value = ctx[9].system.description + ""; + let raw_value = ctx[10].system.description + ""; let div_transition; let current; return { @@ -1260,7 +1346,7 @@ function create_if_block(ctx) { current = true; }, p(ctx2, dirty) { - if ((!current || dirty & 1) && raw_value !== (raw_value = ctx2[9].system.description + "")) + if ((!current || dirty & 1) && raw_value !== (raw_value = ctx2[10].system.description + "")) div.innerHTML = raw_value; ; }, @@ -1297,27 +1383,32 @@ function create_each_block(ctx) { let img_title_value; let t0; let h4; - let t1_value = ctx[9].name + ""; + let t1_value = ctx[10].name + ""; let t1; let t2; let div1; let a0; let t3; let a1; - let li_data_item_id_value; let t4; + let a2; + let li_data_item_id_value; let t5; + let t6; let div2_transition; let current; let mounted; let dispose; function click_handler() { - return ctx[6](ctx[9]); + return ctx[6](ctx[10]); } function click_handler_1() { - return ctx[7](ctx[9]); + return ctx[7](ctx[10]); } - let if_block = ctx[1][ctx[9]._id] && create_if_block(ctx); + function click_handler_2(...args) { + return ctx[8](ctx[10], ...args); + } + let if_block = ctx[1][ctx[10]._id] && create_if_block(ctx); return { c() { div2 = element("div"); @@ -1330,28 +1421,31 @@ function create_each_block(ctx) { t2 = space(); div1 = element("div"); a0 = element("a"); - a0.innerHTML = ``; + a0.innerHTML = ``; t3 = space(); a1 = element("a"); - a1.innerHTML = ``; + a1.innerHTML = ``; t4 = space(); + a2 = element("a"); + a2.innerHTML = ``; + t5 = space(); if (if_block) if_block.c(); - t5 = space(); - if (!src_url_equal(img.src, img_src_value = ctx[9].img)) + t6 = space(); + if (!src_url_equal(img.src, img_src_value = ctx[10].img)) attr(img, "src", img_src_value); - attr(img, "title", img_title_value = ctx[9].name); + attr(img, "title", img_title_value = ctx[10].name); attr(img, "width", "24"); attr(img, "height", "24"); attr(div0, "class", "item-image"); attr(h4, "class", "item-name"); - attr(a0, "class", "item-control item-edit"); - attr(a0, "title", "Edit Item"); - attr(a1, "class", "item-control item-delete"); - attr(a1, "title", "Delete Item"); + attr(a1, "class", "item-control item-edit"); + attr(a1, "title", "Edit Item"); + attr(a2, "class", "item-control item-delete"); + attr(a2, "title", "Delete Item"); attr(div1, "class", "item-controls"); attr(li, "class", "item flexrow"); - attr(li, "data-item-id", li_data_item_id_value = ctx[9]._id); + attr(li, "data-item-id", li_data_item_id_value = ctx[10]._id); }, m(target, anchor) { insert(target, div2, anchor); @@ -1366,22 +1460,25 @@ function create_each_block(ctx) { append(div1, a0); append(div1, t3); append(div1, a1); - append(div2, t4); + append(div1, t4); + append(div1, a2); + append(div2, t5); if (if_block) if_block.m(div2, null); - append(div2, t5); + append(div2, t6); current = true; if (!mounted) { dispose = [ listen(div0, "click", click_handler), listen(h4, "click", click_handler_1), - listen(a0, "click", function() { - if (is_function(ctx[3]?._onItemEdit(ctx[9]._id))) - ctx[3]?._onItemEdit(ctx[9]._id).apply(this, arguments); - }), + listen(a0, "click", click_handler_2), listen(a1, "click", function() { - if (is_function(ctx[3]?._onItemDelete(ctx[9]._id))) - ctx[3]?._onItemDelete(ctx[9]._id).apply(this, arguments); + if (is_function(ctx[3]?._onItemEdit(ctx[10]._id))) + ctx[3]?._onItemEdit(ctx[10]._id).apply(this, arguments); + }), + listen(a2, "click", function() { + if (is_function(ctx[3]?._onItemDelete(ctx[10]._id))) + ctx[3]?._onItemDelete(ctx[10]._id).apply(this, arguments); }) ]; mounted = true; @@ -1389,18 +1486,18 @@ function create_each_block(ctx) { }, p(new_ctx, dirty) { ctx = new_ctx; - if (!current || dirty & 1 && !src_url_equal(img.src, img_src_value = ctx[9].img)) { + if (!current || dirty & 1 && !src_url_equal(img.src, img_src_value = ctx[10].img)) { attr(img, "src", img_src_value); } - if (!current || dirty & 1 && img_title_value !== (img_title_value = ctx[9].name)) { + if (!current || dirty & 1 && img_title_value !== (img_title_value = ctx[10].name)) { attr(img, "title", img_title_value); } - if ((!current || dirty & 1) && t1_value !== (t1_value = ctx[9].name + "")) + if ((!current || dirty & 1) && t1_value !== (t1_value = ctx[10].name + "")) set_data(t1, t1_value); - if (!current || dirty & 1 && li_data_item_id_value !== (li_data_item_id_value = ctx[9]._id)) { + if (!current || dirty & 1 && li_data_item_id_value !== (li_data_item_id_value = ctx[10]._id)) { attr(li, "data-item-id", li_data_item_id_value); } - if (ctx[1][ctx[9]._id]) { + if (ctx[1][ctx[10]._id]) { if (if_block) { if_block.p(ctx, dirty); if (dirty & 3) { @@ -1410,7 +1507,7 @@ function create_each_block(ctx) { if_block = create_if_block(ctx); if_block.c(); transition_in(if_block, 1); - if_block.m(div2, t5); + if_block.m(div2, t6); } } else if (if_block) { group_outros(); @@ -1559,6 +1656,9 @@ function instance3($$self, $$props, $$invalidate) { } const click_handler = (item) => ToggleItem(item._id); const click_handler_1 = (item) => ToggleItem(item._id); + const click_handler_2 = (item, e) => { + sheet?._chatItem(item._id); + }; $$self.$$.update = () => { if ($$self.$$.dirty & 32) { $: @@ -1573,7 +1673,8 @@ function instance3($$self, $$props, $$invalidate) { ToggleItem, $sheetData, click_handler, - click_handler_1 + click_handler_1, + click_handler_2 ]; } var VagabondsLinage = class extends SvelteComponent { @@ -1588,12 +1689,12 @@ require_3(); // module/svelte/VagabondsGear.svelte function get_each_context2(ctx, list, i) { const child_ctx = ctx.slice(); - child_ctx[9] = list[i]; + child_ctx[10] = list[i]; return child_ctx; } function create_if_block2(ctx) { let div; - let raw_value = ctx[9].system.description + ""; + let raw_value = ctx[10].system.description + ""; let div_transition; let current; return { @@ -1607,7 +1708,7 @@ function create_if_block2(ctx) { current = true; }, p(ctx2, dirty) { - if ((!current || dirty & 1) && raw_value !== (raw_value = ctx2[9].system.description + "")) + if ((!current || dirty & 1) && raw_value !== (raw_value = ctx2[10].system.description + "")) div.innerHTML = raw_value; ; }, @@ -1644,26 +1745,31 @@ function create_each_block2(ctx) { let img_title_value; let t0; let h4; - let t1_value = ctx[9].name + ""; + let t1_value = ctx[10].name + ""; let t1; let t2; let div1; let a0; let t3; let a1; - let li_data_item_id_value; let t4; + let a2; + let li_data_item_id_value; + let t5; let div2_transition; let current; let mounted; let dispose; function click_handler() { - return ctx[6](ctx[9]); + return ctx[6](ctx[10]); } function click_handler_1() { - return ctx[7](ctx[9]); + return ctx[7](ctx[10]); } - let if_block = ctx[1][ctx[9]._id] && create_if_block2(ctx); + function click_handler_2(...args) { + return ctx[8](ctx[10], ...args); + } + let if_block = ctx[1][ctx[10]._id] && create_if_block2(ctx); return { c() { div2 = element("div"); @@ -1676,27 +1782,30 @@ function create_each_block2(ctx) { t2 = space(); div1 = element("div"); a0 = element("a"); - a0.innerHTML = ``; + a0.innerHTML = ``; t3 = space(); a1 = element("a"); - a1.innerHTML = ``; + a1.innerHTML = ``; t4 = space(); + a2 = element("a"); + a2.innerHTML = ``; + t5 = space(); if (if_block) if_block.c(); - if (!src_url_equal(img.src, img_src_value = ctx[9].img)) + if (!src_url_equal(img.src, img_src_value = ctx[10].img)) attr(img, "src", img_src_value); - attr(img, "title", img_title_value = ctx[9].name); + attr(img, "title", img_title_value = ctx[10].name); attr(img, "width", "24"); attr(img, "height", "24"); attr(div0, "class", "item-image"); attr(h4, "class", "item-name"); - attr(a0, "class", "item-control item-edit"); - attr(a0, "title", "Edit Item"); - attr(a1, "class", "item-control item-delete"); - attr(a1, "title", "Delete Item"); + attr(a1, "class", "item-control item-edit"); + attr(a1, "title", "Edit Item"); + attr(a2, "class", "item-control item-delete"); + attr(a2, "title", "Delete Item"); attr(div1, "class", "item-controls"); attr(li, "class", "item flexrow"); - attr(li, "data-item-id", li_data_item_id_value = ctx[9]._id); + attr(li, "data-item-id", li_data_item_id_value = ctx[10]._id); }, m(target, anchor) { insert(target, div2, anchor); @@ -1711,7 +1820,9 @@ function create_each_block2(ctx) { append(div1, a0); append(div1, t3); append(div1, a1); - append(div2, t4); + append(div1, t4); + append(div1, a2); + append(div2, t5); if (if_block) if_block.m(div2, null); current = true; @@ -1719,13 +1830,14 @@ function create_each_block2(ctx) { dispose = [ listen(div0, "click", click_handler), listen(h4, "click", click_handler_1), - listen(a0, "click", function() { - if (is_function(ctx[3]?._onItemEdit(ctx[9]._id))) - ctx[3]?._onItemEdit(ctx[9]._id).apply(this, arguments); - }), + listen(a0, "click", click_handler_2), listen(a1, "click", function() { - if (is_function(ctx[3]?._onItemDelete(ctx[9]._id))) - ctx[3]?._onItemDelete(ctx[9]._id).apply(this, arguments); + if (is_function(ctx[3]?._onItemEdit(ctx[10]._id))) + ctx[3]?._onItemEdit(ctx[10]._id).apply(this, arguments); + }), + listen(a2, "click", function() { + if (is_function(ctx[3]?._onItemDelete(ctx[10]._id))) + ctx[3]?._onItemDelete(ctx[10]._id).apply(this, arguments); }) ]; mounted = true; @@ -1733,18 +1845,18 @@ function create_each_block2(ctx) { }, p(new_ctx, dirty) { ctx = new_ctx; - if (!current || dirty & 1 && !src_url_equal(img.src, img_src_value = ctx[9].img)) { + if (!current || dirty & 1 && !src_url_equal(img.src, img_src_value = ctx[10].img)) { attr(img, "src", img_src_value); } - if (!current || dirty & 1 && img_title_value !== (img_title_value = ctx[9].name)) { + if (!current || dirty & 1 && img_title_value !== (img_title_value = ctx[10].name)) { attr(img, "title", img_title_value); } - if ((!current || dirty & 1) && t1_value !== (t1_value = ctx[9].name + "")) + if ((!current || dirty & 1) && t1_value !== (t1_value = ctx[10].name + "")) set_data(t1, t1_value); - if (!current || dirty & 1 && li_data_item_id_value !== (li_data_item_id_value = ctx[9]._id)) { + if (!current || dirty & 1 && li_data_item_id_value !== (li_data_item_id_value = ctx[10]._id)) { attr(li, "data-item-id", li_data_item_id_value); } - if (ctx[1][ctx[9]._id]) { + if (ctx[1][ctx[10]._id]) { if (if_block) { if_block.p(ctx, dirty); if (dirty & 3) { @@ -1951,6 +2063,9 @@ function instance4($$self, $$props, $$invalidate) { } const click_handler = (item) => ToggleItem(item._id); const click_handler_1 = (item) => ToggleItem(item._id); + const click_handler_2 = (item, e) => { + sheet?._chatItem(item._id); + }; $$self.$$.update = () => { if ($$self.$$.dirty & 32) { $: @@ -1965,7 +2080,8 @@ function instance4($$self, $$props, $$invalidate) { ToggleItem, $sheetData, click_handler, - click_handler_1 + click_handler_1, + click_handler_2 ]; } var VagabondsGear = class extends SvelteComponent { @@ -1980,12 +2096,12 @@ require_4(); // module/svelte/VagabondsTechnique.svelte function get_each_context3(ctx, list, i) { const child_ctx = ctx.slice(); - child_ctx[9] = list[i]; + child_ctx[10] = list[i]; return child_ctx; } function create_if_block3(ctx) { let div; - let raw_value = ctx[9].system.description + ""; + let raw_value = ctx[10].system.description + ""; let div_transition; let current; return { @@ -1999,7 +2115,7 @@ function create_if_block3(ctx) { current = true; }, p(ctx2, dirty) { - if ((!current || dirty & 1) && raw_value !== (raw_value = ctx2[9].system.description + "")) + if ((!current || dirty & 1) && raw_value !== (raw_value = ctx2[10].system.description + "")) div.innerHTML = raw_value; ; }, @@ -2036,27 +2152,32 @@ function create_each_block3(ctx) { let img_title_value; let t0; let h4; - let t1_value = ctx[9].name + ""; + let t1_value = ctx[10].name + ""; let t1; let t2; let div1; let a0; let t3; let a1; - let li_data_item_id_value; let t4; + let a2; + let li_data_item_id_value; let t5; + let t6; let div2_transition; let current; let mounted; let dispose; function click_handler() { - return ctx[6](ctx[9]); + return ctx[6](ctx[10]); } function click_handler_1() { - return ctx[7](ctx[9]); + return ctx[7](ctx[10]); } - let if_block = ctx[1][ctx[9]._id] && create_if_block3(ctx); + function click_handler_2(...args) { + return ctx[8](ctx[10], ...args); + } + let if_block = ctx[1][ctx[10]._id] && create_if_block3(ctx); return { c() { div2 = element("div"); @@ -2069,28 +2190,31 @@ function create_each_block3(ctx) { t2 = space(); div1 = element("div"); a0 = element("a"); - a0.innerHTML = ``; + a0.innerHTML = ``; t3 = space(); a1 = element("a"); - a1.innerHTML = ``; + a1.innerHTML = ``; t4 = space(); + a2 = element("a"); + a2.innerHTML = ``; + t5 = space(); if (if_block) if_block.c(); - t5 = space(); - if (!src_url_equal(img.src, img_src_value = ctx[9].img)) + t6 = space(); + if (!src_url_equal(img.src, img_src_value = ctx[10].img)) attr(img, "src", img_src_value); - attr(img, "title", img_title_value = ctx[9].name); + attr(img, "title", img_title_value = ctx[10].name); attr(img, "width", "24"); attr(img, "height", "24"); attr(div0, "class", "item-image"); attr(h4, "class", "item-name"); - attr(a0, "class", "item-control item-edit"); - attr(a0, "title", "Edit Item"); - attr(a1, "class", "item-control item-delete"); - attr(a1, "title", "Delete Item"); + attr(a1, "class", "item-control item-edit"); + attr(a1, "title", "Edit Item"); + attr(a2, "class", "item-control item-delete"); + attr(a2, "title", "Delete Item"); attr(div1, "class", "item-controls"); attr(li, "class", "item flexrow"); - attr(li, "data-item-id", li_data_item_id_value = ctx[9]._id); + attr(li, "data-item-id", li_data_item_id_value = ctx[10]._id); }, m(target, anchor) { insert(target, div2, anchor); @@ -2105,22 +2229,25 @@ function create_each_block3(ctx) { append(div1, a0); append(div1, t3); append(div1, a1); - append(div2, t4); + append(div1, t4); + append(div1, a2); + append(div2, t5); if (if_block) if_block.m(div2, null); - append(div2, t5); + append(div2, t6); current = true; if (!mounted) { dispose = [ listen(div0, "click", click_handler), listen(h4, "click", click_handler_1), - listen(a0, "click", function() { - if (is_function(ctx[3]?._onItemEdit(ctx[9]._id))) - ctx[3]?._onItemEdit(ctx[9]._id).apply(this, arguments); - }), + listen(a0, "click", click_handler_2), listen(a1, "click", function() { - if (is_function(ctx[3]?._onItemDelete(ctx[9]._id))) - ctx[3]?._onItemDelete(ctx[9]._id).apply(this, arguments); + if (is_function(ctx[3]?._onItemEdit(ctx[10]._id))) + ctx[3]?._onItemEdit(ctx[10]._id).apply(this, arguments); + }), + listen(a2, "click", function() { + if (is_function(ctx[3]?._onItemDelete(ctx[10]._id))) + ctx[3]?._onItemDelete(ctx[10]._id).apply(this, arguments); }) ]; mounted = true; @@ -2128,18 +2255,18 @@ function create_each_block3(ctx) { }, p(new_ctx, dirty) { ctx = new_ctx; - if (!current || dirty & 1 && !src_url_equal(img.src, img_src_value = ctx[9].img)) { + if (!current || dirty & 1 && !src_url_equal(img.src, img_src_value = ctx[10].img)) { attr(img, "src", img_src_value); } - if (!current || dirty & 1 && img_title_value !== (img_title_value = ctx[9].name)) { + if (!current || dirty & 1 && img_title_value !== (img_title_value = ctx[10].name)) { attr(img, "title", img_title_value); } - if ((!current || dirty & 1) && t1_value !== (t1_value = ctx[9].name + "")) + if ((!current || dirty & 1) && t1_value !== (t1_value = ctx[10].name + "")) set_data(t1, t1_value); - if (!current || dirty & 1 && li_data_item_id_value !== (li_data_item_id_value = ctx[9]._id)) { + if (!current || dirty & 1 && li_data_item_id_value !== (li_data_item_id_value = ctx[10]._id)) { attr(li, "data-item-id", li_data_item_id_value); } - if (ctx[1][ctx[9]._id]) { + if (ctx[1][ctx[10]._id]) { if (if_block) { if_block.p(ctx, dirty); if (dirty & 3) { @@ -2149,7 +2276,7 @@ function create_each_block3(ctx) { if_block = create_if_block3(ctx); if_block.c(); transition_in(if_block, 1); - if_block.m(div2, t5); + if_block.m(div2, t6); } } else if (if_block) { group_outros(); @@ -2298,6 +2425,9 @@ function instance5($$self, $$props, $$invalidate) { } const click_handler = (item) => ToggleItem(item._id); const click_handler_1 = (item) => ToggleItem(item._id); + const click_handler_2 = (item, e) => { + sheet?._chatItem(item._id); + }; $$self.$$.update = () => { if ($$self.$$.dirty & 32) { $: @@ -2312,7 +2442,8 @@ function instance5($$self, $$props, $$invalidate) { ToggleItem, $sheetData, click_handler, - click_handler_1 + click_handler_1, + click_handler_2 ]; } var VagabondsTechnique = class extends SvelteComponent { @@ -2327,12 +2458,12 @@ require_5(); // module/svelte/VagabondsInjury.svelte function get_each_context4(ctx, list, i) { const child_ctx = ctx.slice(); - child_ctx[9] = list[i]; + child_ctx[10] = list[i]; return child_ctx; } function create_if_block4(ctx) { let div; - let raw_value = ctx[9].system.description + ""; + let raw_value = ctx[10].system.description + ""; let div_transition; let current; return { @@ -2346,7 +2477,7 @@ function create_if_block4(ctx) { current = true; }, p(ctx2, dirty) { - if ((!current || dirty & 1) && raw_value !== (raw_value = ctx2[9].system.description + "")) + if ((!current || dirty & 1) && raw_value !== (raw_value = ctx2[10].system.description + "")) div.innerHTML = raw_value; ; }, @@ -2383,26 +2514,31 @@ function create_each_block4(ctx) { let img_title_value; let t0; let h4; - let t1_value = ctx[9].name + ""; + let t1_value = ctx[10].name + ""; let t1; let t2; let div1; let a0; let t3; let a1; - let li_data_item_id_value; let t4; + let a2; + let li_data_item_id_value; + let t5; let div2_transition; let current; let mounted; let dispose; function click_handler() { - return ctx[6](ctx[9]); + return ctx[6](ctx[10]); } function click_handler_1() { - return ctx[7](ctx[9]); + return ctx[7](ctx[10]); + } + function click_handler_2(...args) { + return ctx[8](ctx[10], ...args); } - let if_block = ctx[1][ctx[9]._id] && create_if_block4(ctx); + let if_block = ctx[1][ctx[10]._id] && create_if_block4(ctx); return { c() { div2 = element("div"); @@ -2415,27 +2551,30 @@ function create_each_block4(ctx) { t2 = space(); div1 = element("div"); a0 = element("a"); - a0.innerHTML = ``; + a0.innerHTML = ``; t3 = space(); a1 = element("a"); - a1.innerHTML = ``; + a1.innerHTML = ``; t4 = space(); + a2 = element("a"); + a2.innerHTML = ``; + t5 = space(); if (if_block) if_block.c(); - if (!src_url_equal(img.src, img_src_value = ctx[9].img)) + if (!src_url_equal(img.src, img_src_value = ctx[10].img)) attr(img, "src", img_src_value); - attr(img, "title", img_title_value = ctx[9].name); + attr(img, "title", img_title_value = ctx[10].name); attr(img, "width", "24"); attr(img, "height", "24"); attr(div0, "class", "item-image"); attr(h4, "class", "item-name"); - attr(a0, "class", "item-control item-edit"); - attr(a0, "title", "Edit Item"); - attr(a1, "class", "item-control item-delete"); - attr(a1, "title", "Delete Item"); + attr(a1, "class", "item-control item-edit"); + attr(a1, "title", "Edit Item"); + attr(a2, "class", "item-control item-delete"); + attr(a2, "title", "Delete Item"); attr(div1, "class", "item-controls"); attr(li, "class", "item flexrow"); - attr(li, "data-item-id", li_data_item_id_value = "" + (ctx[9]._id + "}")); + attr(li, "data-item-id", li_data_item_id_value = "" + (ctx[10]._id + "}")); }, m(target, anchor) { insert(target, div2, anchor); @@ -2450,7 +2589,9 @@ function create_each_block4(ctx) { append(div1, a0); append(div1, t3); append(div1, a1); - append(div2, t4); + append(div1, t4); + append(div1, a2); + append(div2, t5); if (if_block) if_block.m(div2, null); current = true; @@ -2458,13 +2599,14 @@ function create_each_block4(ctx) { dispose = [ listen(div0, "click", click_handler), listen(h4, "click", click_handler_1), - listen(a0, "click", function() { - if (is_function(ctx[3]?._onItemEdit(ctx[9]._id))) - ctx[3]?._onItemEdit(ctx[9]._id).apply(this, arguments); - }), + listen(a0, "click", click_handler_2), listen(a1, "click", function() { - if (is_function(ctx[3]?._onItemDelete(ctx[9]._id))) - ctx[3]?._onItemDelete(ctx[9]._id).apply(this, arguments); + if (is_function(ctx[3]?._onItemEdit(ctx[10]._id))) + ctx[3]?._onItemEdit(ctx[10]._id).apply(this, arguments); + }), + listen(a2, "click", function() { + if (is_function(ctx[3]?._onItemDelete(ctx[10]._id))) + ctx[3]?._onItemDelete(ctx[10]._id).apply(this, arguments); }) ]; mounted = true; @@ -2472,18 +2614,18 @@ function create_each_block4(ctx) { }, p(new_ctx, dirty) { ctx = new_ctx; - if (!current || dirty & 1 && !src_url_equal(img.src, img_src_value = ctx[9].img)) { + if (!current || dirty & 1 && !src_url_equal(img.src, img_src_value = ctx[10].img)) { attr(img, "src", img_src_value); } - if (!current || dirty & 1 && img_title_value !== (img_title_value = ctx[9].name)) { + if (!current || dirty & 1 && img_title_value !== (img_title_value = ctx[10].name)) { attr(img, "title", img_title_value); } - if ((!current || dirty & 1) && t1_value !== (t1_value = ctx[9].name + "")) + if ((!current || dirty & 1) && t1_value !== (t1_value = ctx[10].name + "")) set_data(t1, t1_value); - if (!current || dirty & 1 && li_data_item_id_value !== (li_data_item_id_value = "" + (ctx[9]._id + "}"))) { + if (!current || dirty & 1 && li_data_item_id_value !== (li_data_item_id_value = "" + (ctx[10]._id + "}"))) { attr(li, "data-item-id", li_data_item_id_value); } - if (ctx[1][ctx[9]._id]) { + if (ctx[1][ctx[10]._id]) { if (if_block) { if_block.p(ctx, dirty); if (dirty & 3) { @@ -2682,6 +2824,9 @@ function instance6($$self, $$props, $$invalidate) { } const click_handler = (item) => ToggleItem(item._id); const click_handler_1 = (item) => ToggleItem(item._id); + const click_handler_2 = (item, e) => { + sheet?._chatItem(item._id); + }; $$self.$$.update = () => { if ($$self.$$.dirty & 32) { $: @@ -2696,7 +2841,8 @@ function instance6($$self, $$props, $$invalidate) { ToggleItem, $sheetData, click_handler, - click_handler_1 + click_handler_1, + click_handler_2 ]; } var VagabondsInjury = class extends SvelteComponent { @@ -2955,10 +3101,12 @@ var VagabondsActorSheet = class extends ActorSheet { trait.push(i); } } - sheetData.gear = gear; - sheetData.techniques = techniques; + sheetData.gear = gear.sort((a, b) => a.sort - b.sort); + sheetData.techniques = techniques.sort((a, b) => a.sort - b.sort); + ; sheetData.lineage = lineage; - sheetData.injury = injury; + sheetData.injury = injury.sort((a, b) => a.sort - b.sort); + ; sheetData.approach = approach; sheetData.trait = trait; sheetData.sheet = this; @@ -3029,6 +3177,22 @@ var VagabondsActorSheet = class extends ActorSheet { game.vagabonds.RollHelper.displayRollModal(true); } } + async _chatItem(id) { + const item = this.actor.items.get(id); + let template = "systems/vagabonds/templates/chat/ability.html"; + item.system.description = await TextEditor.enrichHTML(item.system.description, { async: true }); + let data = { ability: item, actor: this.actor.system }; + const html = await renderTemplate(template, data); + const chatData = { + actor: this.actor._id, + type: CONST.CHAT_MESSAGE_STYLES.OTHER, + content: html, + speaker: { + actor: this.actor + } + }; + return ChatMessage.create(chatData); + } render(force = false, options = {}) { let sheetData = this.getData(); if (this.app !== null) { @@ -3072,7 +3236,7 @@ var VagabondsNPCSheet = class extends ActorSheet { classes: ["vagabonds", "sheet", "actor"], template: "systems/vagabonds/templates/actor/npc-sheet.html", width: 600, - height: 440, + height: 700, tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "description" }] }); } @@ -3085,6 +3249,11 @@ var VagabondsNPCSheet = class extends ActorSheet { if (!this.options.editable) return; html.find(".item-create").click(this._onItemCreate.bind(this)); + html.find(".item-speak").click((ev) => { + ev.stopPropagation(); + const li = $(ev.currentTarget).parents(".item"); + this._chatItem(li.data("itemId")); + }); html.find(".item-edit").click((ev) => { const li = $(ev.currentTarget).parents(".item"); const item = this.actor.items.get(li.data("itemId")); @@ -3100,6 +3269,31 @@ var VagabondsNPCSheet = class extends ActorSheet { this.actor.deleteEmbeddedDocuments("Item", [li.data("itemId")]); li.slideUp(200, () => this.render(false)); }); + html.find("li.item").click((ev) => { + const li = $(ev.currentTarget); + const desc = li.find(".npc_item_desc"); + if (desc.is(":visible")) { + desc.slideUp("slow"); + } else { + desc.slideDown("slow"); + } + }); + } + async _chatItem(id) { + const item = this.actor.items.get(id); + let template = "systems/vagabonds/templates/chat/ability.html"; + item.system.description = await TextEditor.enrichHTML(item.system.description, { async: true }); + let data = { ability: item, actor: this.actor.system }; + const html = await renderTemplate(template, data); + const chatData = { + actor: this.actor._id, + type: CONST.CHAT_MESSAGE_STYLES.OTHER, + content: html, + speaker: { + actor: this.actor + } + }; + return ChatMessage.create(chatData); } async _onItemCreate(event) { event.preventDefault(); @@ -3296,6 +3490,212 @@ var RollHelper = class { } }; +// module/data-models.js +var VagabondsBaseActorModel = class extends foundry.abstract.TypeDataModel { + static defineSchema() { + const fields = foundry.data.fields; + return { + health: new fields.SchemaField({ + value: new fields.NumberField({ + required: true, + initial: 8, + integer: true + }), + min: new fields.NumberField({ + required: true, + initial: 0, + integer: true + }), + max: new fields.NumberField({ + required: true, + initial: 8, + integer: true + }) + }), + speed: new fields.SchemaField({ + value: new fields.NumberField({ + required: true, + initial: 0, + integer: true + }), + min: new fields.NumberField({ + required: true, + initial: -10, + integer: true + }), + max: new fields.NumberField({ + required: true, + initial: 15, + integer: true + }) + }), + armor: new fields.SchemaField({ + value: new fields.NumberField({ + required: true, + initial: 0, + integer: true + }), + min: new fields.NumberField({ + required: true, + initial: 0, + integer: true + }), + max: new fields.NumberField({ + required: true, + initial: 20, + integer: true + }) + }), + attributes: new fields.SchemaField({ + level: new fields.SchemaField({ + value: new fields.NumberField({ + required: true, + initial: 1, + integer: true + }) + }), + xp: new fields.SchemaField({ + value: new fields.NumberField({ + required: true, + initial: 0, + integer: true + }), + min: new fields.NumberField({ + required: true, + initial: 0, + integer: true + }), + max: new fields.NumberField({ + required: true, + initial: 100, + integer: true + }) + }) + }) + }; + } +}; +var VagabondsActorDataModel = class extends VagabondsBaseActorModel { + static defineSchema() { + const fields = foundry.data.fields; + return foundry.utils.mergeObject(super.defineSchema(), { + aproaches: new fields.SchemaField({ + conflict: new fields.StringField({ + nullable: false, + required: true, + initial: "" + }), + goal: new fields.StringField({ + nullable: false, + required: true, + initial: "" + }), + gimmick: new fields.StringField({ + nullable: false, + required: true, + initial: "" + }), + background: new fields.StringField({ + nullable: false, + required: true, + initial: "" + }), + foreground: new fields.StringField({ + nullable: false, + required: true, + initial: "" + }), + weakness: new fields.StringField({ + nullable: false, + required: true, + initial: "" + }), + wealth: new fields.StringField({ + nullable: false, + required: true, + initial: "" + }), + a1: new fields.StringField({ + nullable: false, + required: true, + initial: "" + }), + a2: new fields.StringField({ + nullable: false, + required: true, + initial: "" + }), + a3: new fields.StringField({ + nullable: false, + required: true, + initial: "" + }), + a4: new fields.StringField({ + nullable: false, + required: true, + initial: "" + }), + a5: new fields.StringField({ + nullable: false, + required: true, + initial: "" + }), + a6: new fields.StringField({ + nullable: false, + required: true, + initial: "" + }), + coreflaw: new fields.StringField({ + nullable: false, + required: true, + initial: "" + }) + }) + }); + } +}; +var VagabondsNPCDataModel = class extends VagabondsBaseActorModel { + static defineSchema() { + const fields = foundry.data.fields; + return foundry.utils.mergeObject(super.defineSchema(), { + damage: new fields.SchemaField({ + value: new fields.NumberField({ + required: true, + initial: 1, + integer: true + }) + }), + description: new fields.StringField({ + nullable: false, + required: true, + initial: "" + }), + traits: new fields.StringField({ + nullable: false, + required: true, + initial: "" + }), + combat_notes: new fields.StringField({ + nullable: false, + required: true, + initial: "" + }) + }); + } +}; +var VagabondsBaseItemModel = class extends foundry.abstract.TypeDataModel { + static defineSchema() { + const fields = foundry.data.fields; + return { + description: new fields.StringField({ + nullable: false, + required: true, + initial: "" + }) + }; + } +}; + // module/vagabonds.js Hooks.once("init", async function() { game.vagabonds = { @@ -3307,8 +3707,21 @@ Hooks.once("init", async function() { formula: "@speed.value", decimals: 2 }; + CONFIG.Vagabonds = {}; CONFIG.Actor.documentClass = VagabondsActor; + CONFIG.Actor.dataModels.character = VagabondsActorDataModel; + CONFIG.Actor.dataModels.npc = VagabondsNPCDataModel; CONFIG.Item.documentClass = VagabondsItem; + CONFIG.Item.dataModels.item = VagabondsBaseItemModel; + CONFIG.Item.dataModels.approach = VagabondsBaseItemModel; + CONFIG.Item.dataModels.technique = VagabondsBaseItemModel; + CONFIG.Item.dataModels.lineage = VagabondsBaseItemModel; + CONFIG.Item.dataModels.injury = VagabondsBaseItemModel; + CONFIG.Item.dataModels.trait = VagabondsBaseItemModel; + CONFIG.Vagabonds.tokenHPColors = { + damage: 15711680, + healing: 65280 + }; Actors.unregisterSheet("core", ActorSheet); Actors.registerSheet("vagabonds", VagabondsNPCSheet, { types: ["npc"], makeDefault: true }); Actors.registerSheet("vagabonds", VagabondsActorSheet, { types: ["character"], makeDefault: true }); diff --git a/dist/vagabonds.js.map b/dist/vagabonds.js.map index b806e77..3837c7c 100644 --- a/dist/vagabonds.js.map +++ b/dist/vagabonds.js.map @@ -1,7 +1,7 @@ { "version": 3, - "sources": ["../module/actor/actor.js", "../node_modules/svelte/internal/index.mjs", "../node_modules/svelte/store/index.mjs", "../module/svelte/VagabondsActorSheetHeader.svelte", "../module/svelte/VagabondsActorSheetBodyLeft.svelte", "../node_modules/svelte/easing/index.mjs", "../node_modules/svelte/transition/index.mjs", "../module/svelte/VagabondsLinage.svelte", "../module/svelte/VagabondsGear.svelte", "../module/svelte/VagabondsTechnique.svelte", "../module/svelte/VagabondsInjury.svelte", "../module/svelte/VagabondsActorSheetBodyRight.svelte", "../module/svelte/VagabondsActorSheetBase.svelte", "../module/actor/actor-sheet.js", "../module/actor/npc-sheet.js", "../module/item/item.js", "../module/item/item-sheet.js", "../module/helper/roll_helper.js", "../module/vagabonds.js"], - "sourcesContent": ["/**\r\n * Extend the base Actor entity by defining a custom roll data structure which is ideal for the Simple system.\r\n * @extends {Actor}\r\n */\r\nexport class VagabondsActor extends Actor {\r\n\r\n /**\r\n * Augment the basic actor data with additional dynamic data.\r\n */\r\n prepareData() {\r\n super.prepareData();\r\n\r\n\r\n const actorData = this;\r\n\r\n //const data = actorData.data;\r\n //const flags = actorData.flags;\r\n\r\n // Make separate methods for each Actor type (character, npc, etc.) to keep\r\n // things organized.\r\n if (this.type === 'character') this._prepareCharacterData(actorData);\r\n //if (actorData.type === 'npc') this._prepareCharacterData(actorData);\r\n }\r\n\r\n /**\r\n * Prepare Character type specific data\r\n */\r\n _prepareCharacterData(actorData) {\r\n //const data = actorData.data;\r\n // Make modifications to data here. For example:\r\n return actorData\r\n }\r\n\r\n}", "function noop() { }\nconst identity = x => x;\nfunction assign(tar, src) {\n // @ts-ignore\n for (const k in src)\n tar[k] = src[k];\n return tar;\n}\nfunction is_promise(value) {\n return value && typeof value === 'object' && typeof value.then === 'function';\n}\nfunction add_location(element, file, line, column, char) {\n element.__svelte_meta = {\n loc: { file, line, column, char }\n };\n}\nfunction run(fn) {\n return fn();\n}\nfunction blank_object() {\n return Object.create(null);\n}\nfunction run_all(fns) {\n fns.forEach(run);\n}\nfunction is_function(thing) {\n return typeof thing === 'function';\n}\nfunction safe_not_equal(a, b) {\n return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');\n}\nlet src_url_equal_anchor;\nfunction src_url_equal(element_src, url) {\n if (!src_url_equal_anchor) {\n src_url_equal_anchor = document.createElement('a');\n }\n src_url_equal_anchor.href = url;\n return element_src === src_url_equal_anchor.href;\n}\nfunction not_equal(a, b) {\n return a != a ? b == b : a !== b;\n}\nfunction is_empty(obj) {\n return Object.keys(obj).length === 0;\n}\nfunction validate_store(store, name) {\n if (store != null && typeof store.subscribe !== 'function') {\n throw new Error(`'${name}' is not a store with a 'subscribe' method`);\n }\n}\nfunction subscribe(store, ...callbacks) {\n if (store == null) {\n return noop;\n }\n const unsub = store.subscribe(...callbacks);\n return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub;\n}\nfunction get_store_value(store) {\n let value;\n subscribe(store, _ => value = _)();\n return value;\n}\nfunction component_subscribe(component, store, callback) {\n component.$$.on_destroy.push(subscribe(store, callback));\n}\nfunction create_slot(definition, ctx, $$scope, fn) {\n if (definition) {\n const slot_ctx = get_slot_context(definition, ctx, $$scope, fn);\n return definition[0](slot_ctx);\n }\n}\nfunction get_slot_context(definition, ctx, $$scope, fn) {\n return definition[1] && fn\n ? assign($$scope.ctx.slice(), definition[1](fn(ctx)))\n : $$scope.ctx;\n}\nfunction get_slot_changes(definition, $$scope, dirty, fn) {\n if (definition[2] && fn) {\n const lets = definition[2](fn(dirty));\n if ($$scope.dirty === undefined) {\n return lets;\n }\n if (typeof lets === 'object') {\n const merged = [];\n const len = Math.max($$scope.dirty.length, lets.length);\n for (let i = 0; i < len; i += 1) {\n merged[i] = $$scope.dirty[i] | lets[i];\n }\n return merged;\n }\n return $$scope.dirty | lets;\n }\n return $$scope.dirty;\n}\nfunction update_slot_base(slot, slot_definition, ctx, $$scope, slot_changes, get_slot_context_fn) {\n if (slot_changes) {\n const slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn);\n slot.p(slot_context, slot_changes);\n }\n}\nfunction update_slot(slot, slot_definition, ctx, $$scope, dirty, get_slot_changes_fn, get_slot_context_fn) {\n const slot_changes = get_slot_changes(slot_definition, $$scope, dirty, get_slot_changes_fn);\n update_slot_base(slot, slot_definition, ctx, $$scope, slot_changes, get_slot_context_fn);\n}\nfunction get_all_dirty_from_scope($$scope) {\n if ($$scope.ctx.length > 32) {\n const dirty = [];\n const length = $$scope.ctx.length / 32;\n for (let i = 0; i < length; i++) {\n dirty[i] = -1;\n }\n return dirty;\n }\n return -1;\n}\nfunction exclude_internal_props(props) {\n const result = {};\n for (const k in props)\n if (k[0] !== '$')\n result[k] = props[k];\n return result;\n}\nfunction compute_rest_props(props, keys) {\n const rest = {};\n keys = new Set(keys);\n for (const k in props)\n if (!keys.has(k) && k[0] !== '$')\n rest[k] = props[k];\n return rest;\n}\nfunction compute_slots(slots) {\n const result = {};\n for (const key in slots) {\n result[key] = true;\n }\n return result;\n}\nfunction once(fn) {\n let ran = false;\n return function (...args) {\n if (ran)\n return;\n ran = true;\n fn.call(this, ...args);\n };\n}\nfunction null_to_empty(value) {\n return value == null ? '' : value;\n}\nfunction set_store_value(store, ret, value) {\n store.set(value);\n return ret;\n}\nconst has_prop = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);\nfunction action_destroyer(action_result) {\n return action_result && is_function(action_result.destroy) ? action_result.destroy : noop;\n}\n\nconst is_client = typeof window !== 'undefined';\nlet now = is_client\n ? () => window.performance.now()\n : () => Date.now();\nlet raf = is_client ? cb => requestAnimationFrame(cb) : noop;\n// used internally for testing\nfunction set_now(fn) {\n now = fn;\n}\nfunction set_raf(fn) {\n raf = fn;\n}\n\nconst tasks = new Set();\nfunction run_tasks(now) {\n tasks.forEach(task => {\n if (!task.c(now)) {\n tasks.delete(task);\n task.f();\n }\n });\n if (tasks.size !== 0)\n raf(run_tasks);\n}\n/**\n * For testing purposes only!\n */\nfunction clear_loops() {\n tasks.clear();\n}\n/**\n * Creates a new task that runs on each raf frame\n * until it returns a falsy value or is aborted\n */\nfunction loop(callback) {\n let task;\n if (tasks.size === 0)\n raf(run_tasks);\n return {\n promise: new Promise(fulfill => {\n tasks.add(task = { c: callback, f: fulfill });\n }),\n abort() {\n tasks.delete(task);\n }\n };\n}\n\n// Track which nodes are claimed during hydration. Unclaimed nodes can then be removed from the DOM\n// at the end of hydration without touching the remaining nodes.\nlet is_hydrating = false;\nfunction start_hydrating() {\n is_hydrating = true;\n}\nfunction end_hydrating() {\n is_hydrating = false;\n}\nfunction upper_bound(low, high, key, value) {\n // Return first index of value larger than input value in the range [low, high)\n while (low < high) {\n const mid = low + ((high - low) >> 1);\n if (key(mid) <= value) {\n low = mid + 1;\n }\n else {\n high = mid;\n }\n }\n return low;\n}\nfunction init_hydrate(target) {\n if (target.hydrate_init)\n return;\n target.hydrate_init = true;\n // We know that all children have claim_order values since the unclaimed have been detached if target is not \n let children = target.childNodes;\n // If target is , there may be children without claim_order\n if (target.nodeName === 'HEAD') {\n const myChildren = [];\n for (let i = 0; i < children.length; i++) {\n const node = children[i];\n if (node.claim_order !== undefined) {\n myChildren.push(node);\n }\n }\n children = myChildren;\n }\n /*\n * Reorder claimed children optimally.\n * We can reorder claimed children optimally by finding the longest subsequence of\n * nodes that are already claimed in order and only moving the rest. The longest\n * subsequence subsequence of nodes that are claimed in order can be found by\n * computing the longest increasing subsequence of .claim_order values.\n *\n * This algorithm is optimal in generating the least amount of reorder operations\n * possible.\n *\n * Proof:\n * We know that, given a set of reordering operations, the nodes that do not move\n * always form an increasing subsequence, since they do not move among each other\n * meaning that they must be already ordered among each other. Thus, the maximal\n * set of nodes that do not move form a longest increasing subsequence.\n */\n // Compute longest increasing subsequence\n // m: subsequence length j => index k of smallest value that ends an increasing subsequence of length j\n const m = new Int32Array(children.length + 1);\n // Predecessor indices + 1\n const p = new Int32Array(children.length);\n m[0] = -1;\n let longest = 0;\n for (let i = 0; i < children.length; i++) {\n const current = children[i].claim_order;\n // Find the largest subsequence length such that it ends in a value less than our current value\n // upper_bound returns first greater value, so we subtract one\n // with fast path for when we are on the current longest subsequence\n const seqLen = ((longest > 0 && children[m[longest]].claim_order <= current) ? longest + 1 : upper_bound(1, longest, idx => children[m[idx]].claim_order, current)) - 1;\n p[i] = m[seqLen] + 1;\n const newLen = seqLen + 1;\n // We can guarantee that current is the smallest value. Otherwise, we would have generated a longer sequence.\n m[newLen] = i;\n longest = Math.max(newLen, longest);\n }\n // The longest increasing subsequence of nodes (initially reversed)\n const lis = [];\n // The rest of the nodes, nodes that will be moved\n const toMove = [];\n let last = children.length - 1;\n for (let cur = m[longest] + 1; cur != 0; cur = p[cur - 1]) {\n lis.push(children[cur - 1]);\n for (; last >= cur; last--) {\n toMove.push(children[last]);\n }\n last--;\n }\n for (; last >= 0; last--) {\n toMove.push(children[last]);\n }\n lis.reverse();\n // We sort the nodes being moved to guarantee that their insertion order matches the claim order\n toMove.sort((a, b) => a.claim_order - b.claim_order);\n // Finally, we move the nodes\n for (let i = 0, j = 0; i < toMove.length; i++) {\n while (j < lis.length && toMove[i].claim_order >= lis[j].claim_order) {\n j++;\n }\n const anchor = j < lis.length ? lis[j] : null;\n target.insertBefore(toMove[i], anchor);\n }\n}\nfunction append(target, node) {\n target.appendChild(node);\n}\nfunction append_styles(target, style_sheet_id, styles) {\n const append_styles_to = get_root_for_style(target);\n if (!append_styles_to.getElementById(style_sheet_id)) {\n const style = element('style');\n style.id = style_sheet_id;\n style.textContent = styles;\n append_stylesheet(append_styles_to, style);\n }\n}\nfunction get_root_for_style(node) {\n if (!node)\n return document;\n const root = node.getRootNode ? node.getRootNode() : node.ownerDocument;\n if (root && root.host) {\n return root;\n }\n return node.ownerDocument;\n}\nfunction append_empty_stylesheet(node) {\n const style_element = element('style');\n append_stylesheet(get_root_for_style(node), style_element);\n return style_element.sheet;\n}\nfunction append_stylesheet(node, style) {\n append(node.head || node, style);\n return style.sheet;\n}\nfunction append_hydration(target, node) {\n if (is_hydrating) {\n init_hydrate(target);\n if ((target.actual_end_child === undefined) || ((target.actual_end_child !== null) && (target.actual_end_child.parentNode !== target))) {\n target.actual_end_child = target.firstChild;\n }\n // Skip nodes of undefined ordering\n while ((target.actual_end_child !== null) && (target.actual_end_child.claim_order === undefined)) {\n target.actual_end_child = target.actual_end_child.nextSibling;\n }\n if (node !== target.actual_end_child) {\n // We only insert if the ordering of this node should be modified or the parent node is not target\n if (node.claim_order !== undefined || node.parentNode !== target) {\n target.insertBefore(node, target.actual_end_child);\n }\n }\n else {\n target.actual_end_child = node.nextSibling;\n }\n }\n else if (node.parentNode !== target || node.nextSibling !== null) {\n target.appendChild(node);\n }\n}\nfunction insert(target, node, anchor) {\n target.insertBefore(node, anchor || null);\n}\nfunction insert_hydration(target, node, anchor) {\n if (is_hydrating && !anchor) {\n append_hydration(target, node);\n }\n else if (node.parentNode !== target || node.nextSibling != anchor) {\n target.insertBefore(node, anchor || null);\n }\n}\nfunction detach(node) {\n node.parentNode.removeChild(node);\n}\nfunction destroy_each(iterations, detaching) {\n for (let i = 0; i < iterations.length; i += 1) {\n if (iterations[i])\n iterations[i].d(detaching);\n }\n}\nfunction element(name) {\n return document.createElement(name);\n}\nfunction element_is(name, is) {\n return document.createElement(name, { is });\n}\nfunction object_without_properties(obj, exclude) {\n const target = {};\n for (const k in obj) {\n if (has_prop(obj, k)\n // @ts-ignore\n && exclude.indexOf(k) === -1) {\n // @ts-ignore\n target[k] = obj[k];\n }\n }\n return target;\n}\nfunction svg_element(name) {\n return document.createElementNS('http://www.w3.org/2000/svg', name);\n}\nfunction text(data) {\n return document.createTextNode(data);\n}\nfunction space() {\n return text(' ');\n}\nfunction empty() {\n return text('');\n}\nfunction listen(node, event, handler, options) {\n node.addEventListener(event, handler, options);\n return () => node.removeEventListener(event, handler, options);\n}\nfunction prevent_default(fn) {\n return function (event) {\n event.preventDefault();\n // @ts-ignore\n return fn.call(this, event);\n };\n}\nfunction stop_propagation(fn) {\n return function (event) {\n event.stopPropagation();\n // @ts-ignore\n return fn.call(this, event);\n };\n}\nfunction self(fn) {\n return function (event) {\n // @ts-ignore\n if (event.target === this)\n fn.call(this, event);\n };\n}\nfunction trusted(fn) {\n return function (event) {\n // @ts-ignore\n if (event.isTrusted)\n fn.call(this, event);\n };\n}\nfunction attr(node, attribute, value) {\n if (value == null)\n node.removeAttribute(attribute);\n else if (node.getAttribute(attribute) !== value)\n node.setAttribute(attribute, value);\n}\nfunction set_attributes(node, attributes) {\n // @ts-ignore\n const descriptors = Object.getOwnPropertyDescriptors(node.__proto__);\n for (const key in attributes) {\n if (attributes[key] == null) {\n node.removeAttribute(key);\n }\n else if (key === 'style') {\n node.style.cssText = attributes[key];\n }\n else if (key === '__value') {\n node.value = node[key] = attributes[key];\n }\n else if (descriptors[key] && descriptors[key].set) {\n node[key] = attributes[key];\n }\n else {\n attr(node, key, attributes[key]);\n }\n }\n}\nfunction set_svg_attributes(node, attributes) {\n for (const key in attributes) {\n attr(node, key, attributes[key]);\n }\n}\nfunction set_custom_element_data_map(node, data_map) {\n Object.keys(data_map).forEach((key) => {\n set_custom_element_data(node, key, data_map[key]);\n });\n}\nfunction set_custom_element_data(node, prop, value) {\n if (prop in node) {\n node[prop] = typeof node[prop] === 'boolean' && value === '' ? true : value;\n }\n else {\n attr(node, prop, value);\n }\n}\nfunction xlink_attr(node, attribute, value) {\n node.setAttributeNS('http://www.w3.org/1999/xlink', attribute, value);\n}\nfunction get_binding_group_value(group, __value, checked) {\n const value = new Set();\n for (let i = 0; i < group.length; i += 1) {\n if (group[i].checked)\n value.add(group[i].__value);\n }\n if (!checked) {\n value.delete(__value);\n }\n return Array.from(value);\n}\nfunction to_number(value) {\n return value === '' ? null : +value;\n}\nfunction time_ranges_to_array(ranges) {\n const array = [];\n for (let i = 0; i < ranges.length; i += 1) {\n array.push({ start: ranges.start(i), end: ranges.end(i) });\n }\n return array;\n}\nfunction children(element) {\n return Array.from(element.childNodes);\n}\nfunction init_claim_info(nodes) {\n if (nodes.claim_info === undefined) {\n nodes.claim_info = { last_index: 0, total_claimed: 0 };\n }\n}\nfunction claim_node(nodes, predicate, processNode, createNode, dontUpdateLastIndex = false) {\n // Try to find nodes in an order such that we lengthen the longest increasing subsequence\n init_claim_info(nodes);\n const resultNode = (() => {\n // We first try to find an element after the previous one\n for (let i = nodes.claim_info.last_index; i < nodes.length; i++) {\n const node = nodes[i];\n if (predicate(node)) {\n const replacement = processNode(node);\n if (replacement === undefined) {\n nodes.splice(i, 1);\n }\n else {\n nodes[i] = replacement;\n }\n if (!dontUpdateLastIndex) {\n nodes.claim_info.last_index = i;\n }\n return node;\n }\n }\n // Otherwise, we try to find one before\n // We iterate in reverse so that we don't go too far back\n for (let i = nodes.claim_info.last_index - 1; i >= 0; i--) {\n const node = nodes[i];\n if (predicate(node)) {\n const replacement = processNode(node);\n if (replacement === undefined) {\n nodes.splice(i, 1);\n }\n else {\n nodes[i] = replacement;\n }\n if (!dontUpdateLastIndex) {\n nodes.claim_info.last_index = i;\n }\n else if (replacement === undefined) {\n // Since we spliced before the last_index, we decrease it\n nodes.claim_info.last_index--;\n }\n return node;\n }\n }\n // If we can't find any matching node, we create a new one\n return createNode();\n })();\n resultNode.claim_order = nodes.claim_info.total_claimed;\n nodes.claim_info.total_claimed += 1;\n return resultNode;\n}\nfunction claim_element_base(nodes, name, attributes, create_element) {\n return claim_node(nodes, (node) => node.nodeName === name, (node) => {\n const remove = [];\n for (let j = 0; j < node.attributes.length; j++) {\n const attribute = node.attributes[j];\n if (!attributes[attribute.name]) {\n remove.push(attribute.name);\n }\n }\n remove.forEach(v => node.removeAttribute(v));\n return undefined;\n }, () => create_element(name));\n}\nfunction claim_element(nodes, name, attributes) {\n return claim_element_base(nodes, name, attributes, element);\n}\nfunction claim_svg_element(nodes, name, attributes) {\n return claim_element_base(nodes, name, attributes, svg_element);\n}\nfunction claim_text(nodes, data) {\n return claim_node(nodes, (node) => node.nodeType === 3, (node) => {\n const dataStr = '' + data;\n if (node.data.startsWith(dataStr)) {\n if (node.data.length !== dataStr.length) {\n return node.splitText(dataStr.length);\n }\n }\n else {\n node.data = dataStr;\n }\n }, () => text(data), true // Text nodes should not update last index since it is likely not worth it to eliminate an increasing subsequence of actual elements\n );\n}\nfunction claim_space(nodes) {\n return claim_text(nodes, ' ');\n}\nfunction find_comment(nodes, text, start) {\n for (let i = start; i < nodes.length; i += 1) {\n const node = nodes[i];\n if (node.nodeType === 8 /* comment node */ && node.textContent.trim() === text) {\n return i;\n }\n }\n return nodes.length;\n}\nfunction claim_html_tag(nodes, is_svg) {\n // find html opening tag\n const start_index = find_comment(nodes, 'HTML_TAG_START', 0);\n const end_index = find_comment(nodes, 'HTML_TAG_END', start_index);\n if (start_index === end_index) {\n return new HtmlTagHydration(undefined, is_svg);\n }\n init_claim_info(nodes);\n const html_tag_nodes = nodes.splice(start_index, end_index - start_index + 1);\n detach(html_tag_nodes[0]);\n detach(html_tag_nodes[html_tag_nodes.length - 1]);\n const claimed_nodes = html_tag_nodes.slice(1, html_tag_nodes.length - 1);\n for (const n of claimed_nodes) {\n n.claim_order = nodes.claim_info.total_claimed;\n nodes.claim_info.total_claimed += 1;\n }\n return new HtmlTagHydration(claimed_nodes, is_svg);\n}\nfunction set_data(text, data) {\n data = '' + data;\n if (text.wholeText !== data)\n text.data = data;\n}\nfunction set_input_value(input, value) {\n input.value = value == null ? '' : value;\n}\nfunction set_input_type(input, type) {\n try {\n input.type = type;\n }\n catch (e) {\n // do nothing\n }\n}\nfunction set_style(node, key, value, important) {\n if (value === null) {\n node.style.removeProperty(key);\n }\n else {\n node.style.setProperty(key, value, important ? 'important' : '');\n }\n}\nfunction select_option(select, value) {\n for (let i = 0; i < select.options.length; i += 1) {\n const option = select.options[i];\n if (option.__value === value) {\n option.selected = true;\n return;\n }\n }\n select.selectedIndex = -1; // no option should be selected\n}\nfunction select_options(select, value) {\n for (let i = 0; i < select.options.length; i += 1) {\n const option = select.options[i];\n option.selected = ~value.indexOf(option.__value);\n }\n}\nfunction select_value(select) {\n const selected_option = select.querySelector(':checked') || select.options[0];\n return selected_option && selected_option.__value;\n}\nfunction select_multiple_value(select) {\n return [].map.call(select.querySelectorAll(':checked'), option => option.__value);\n}\n// unfortunately this can't be a constant as that wouldn't be tree-shakeable\n// so we cache the result instead\nlet crossorigin;\nfunction is_crossorigin() {\n if (crossorigin === undefined) {\n crossorigin = false;\n try {\n if (typeof window !== 'undefined' && window.parent) {\n void window.parent.document;\n }\n }\n catch (error) {\n crossorigin = true;\n }\n }\n return crossorigin;\n}\nfunction add_resize_listener(node, fn) {\n const computed_style = getComputedStyle(node);\n if (computed_style.position === 'static') {\n node.style.position = 'relative';\n }\n const iframe = element('iframe');\n iframe.setAttribute('style', 'display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; ' +\n 'overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;');\n iframe.setAttribute('aria-hidden', 'true');\n iframe.tabIndex = -1;\n const crossorigin = is_crossorigin();\n let unsubscribe;\n if (crossorigin) {\n iframe.src = \"data:text/html,\";\n unsubscribe = listen(window, 'message', (event) => {\n if (event.source === iframe.contentWindow)\n fn();\n });\n }\n else {\n iframe.src = 'about:blank';\n iframe.onload = () => {\n unsubscribe = listen(iframe.contentWindow, 'resize', fn);\n };\n }\n append(node, iframe);\n return () => {\n if (crossorigin) {\n unsubscribe();\n }\n else if (unsubscribe && iframe.contentWindow) {\n unsubscribe();\n }\n detach(iframe);\n };\n}\nfunction toggle_class(element, name, toggle) {\n element.classList[toggle ? 'add' : 'remove'](name);\n}\nfunction custom_event(type, detail, { bubbles = false, cancelable = false } = {}) {\n const e = document.createEvent('CustomEvent');\n e.initCustomEvent(type, bubbles, cancelable, detail);\n return e;\n}\nfunction query_selector_all(selector, parent = document.body) {\n return Array.from(parent.querySelectorAll(selector));\n}\nfunction head_selector(nodeId, head) {\n const result = [];\n let started = 0;\n for (const node of head.childNodes) {\n if (node.nodeType === 8 /* comment node */) {\n const comment = node.textContent.trim();\n if (comment === `HEAD_${nodeId}_END`) {\n started -= 1;\n result.push(node);\n }\n else if (comment === `HEAD_${nodeId}_START`) {\n started += 1;\n result.push(node);\n }\n }\n else if (started > 0) {\n result.push(node);\n }\n }\n return result;\n}\nclass HtmlTag {\n constructor(is_svg = false) {\n this.is_svg = false;\n this.is_svg = is_svg;\n this.e = this.n = null;\n }\n c(html) {\n this.h(html);\n }\n m(html, target, anchor = null) {\n if (!this.e) {\n if (this.is_svg)\n this.e = svg_element(target.nodeName);\n else\n this.e = element(target.nodeName);\n this.t = target;\n this.c(html);\n }\n this.i(anchor);\n }\n h(html) {\n this.e.innerHTML = html;\n this.n = Array.from(this.e.childNodes);\n }\n i(anchor) {\n for (let i = 0; i < this.n.length; i += 1) {\n insert(this.t, this.n[i], anchor);\n }\n }\n p(html) {\n this.d();\n this.h(html);\n this.i(this.a);\n }\n d() {\n this.n.forEach(detach);\n }\n}\nclass HtmlTagHydration extends HtmlTag {\n constructor(claimed_nodes, is_svg = false) {\n super(is_svg);\n this.e = this.n = null;\n this.l = claimed_nodes;\n }\n c(html) {\n if (this.l) {\n this.n = this.l;\n }\n else {\n super.c(html);\n }\n }\n i(anchor) {\n for (let i = 0; i < this.n.length; i += 1) {\n insert_hydration(this.t, this.n[i], anchor);\n }\n }\n}\nfunction attribute_to_object(attributes) {\n const result = {};\n for (const attribute of attributes) {\n result[attribute.name] = attribute.value;\n }\n return result;\n}\nfunction get_custom_elements_slots(element) {\n const result = {};\n element.childNodes.forEach((node) => {\n result[node.slot || 'default'] = true;\n });\n return result;\n}\nfunction construct_svelte_component(component, props) {\n return new component(props);\n}\n\n// we need to store the information for multiple documents because a Svelte application could also contain iframes\n// https://github.com/sveltejs/svelte/issues/3624\nconst managed_styles = new Map();\nlet active = 0;\n// https://github.com/darkskyapp/string-hash/blob/master/index.js\nfunction hash(str) {\n let hash = 5381;\n let i = str.length;\n while (i--)\n hash = ((hash << 5) - hash) ^ str.charCodeAt(i);\n return hash >>> 0;\n}\nfunction create_style_information(doc, node) {\n const info = { stylesheet: append_empty_stylesheet(node), rules: {} };\n managed_styles.set(doc, info);\n return info;\n}\nfunction create_rule(node, a, b, duration, delay, ease, fn, uid = 0) {\n const step = 16.666 / duration;\n let keyframes = '{\\n';\n for (let p = 0; p <= 1; p += step) {\n const t = a + (b - a) * ease(p);\n keyframes += p * 100 + `%{${fn(t, 1 - t)}}\\n`;\n }\n const rule = keyframes + `100% {${fn(b, 1 - b)}}\\n}`;\n const name = `__svelte_${hash(rule)}_${uid}`;\n const doc = get_root_for_style(node);\n const { stylesheet, rules } = managed_styles.get(doc) || create_style_information(doc, node);\n if (!rules[name]) {\n rules[name] = true;\n stylesheet.insertRule(`@keyframes ${name} ${rule}`, stylesheet.cssRules.length);\n }\n const animation = node.style.animation || '';\n node.style.animation = `${animation ? `${animation}, ` : ''}${name} ${duration}ms linear ${delay}ms 1 both`;\n active += 1;\n return name;\n}\nfunction delete_rule(node, name) {\n const previous = (node.style.animation || '').split(', ');\n const next = previous.filter(name\n ? anim => anim.indexOf(name) < 0 // remove specific animation\n : anim => anim.indexOf('__svelte') === -1 // remove all Svelte animations\n );\n const deleted = previous.length - next.length;\n if (deleted) {\n node.style.animation = next.join(', ');\n active -= deleted;\n if (!active)\n clear_rules();\n }\n}\nfunction clear_rules() {\n raf(() => {\n if (active)\n return;\n managed_styles.forEach(info => {\n const { ownerNode } = info.stylesheet;\n // there is no ownerNode if it runs on jsdom.\n if (ownerNode)\n detach(ownerNode);\n });\n managed_styles.clear();\n });\n}\n\nfunction create_animation(node, from, fn, params) {\n if (!from)\n return noop;\n const to = node.getBoundingClientRect();\n if (from.left === to.left && from.right === to.right && from.top === to.top && from.bottom === to.bottom)\n return noop;\n const { delay = 0, duration = 300, easing = identity, \n // @ts-ignore todo: should this be separated from destructuring? Or start/end added to public api and documentation?\n start: start_time = now() + delay, \n // @ts-ignore todo:\n end = start_time + duration, tick = noop, css } = fn(node, { from, to }, params);\n let running = true;\n let started = false;\n let name;\n function start() {\n if (css) {\n name = create_rule(node, 0, 1, duration, delay, easing, css);\n }\n if (!delay) {\n started = true;\n }\n }\n function stop() {\n if (css)\n delete_rule(node, name);\n running = false;\n }\n loop(now => {\n if (!started && now >= start_time) {\n started = true;\n }\n if (started && now >= end) {\n tick(1, 0);\n stop();\n }\n if (!running) {\n return false;\n }\n if (started) {\n const p = now - start_time;\n const t = 0 + 1 * easing(p / duration);\n tick(t, 1 - t);\n }\n return true;\n });\n start();\n tick(0, 1);\n return stop;\n}\nfunction fix_position(node) {\n const style = getComputedStyle(node);\n if (style.position !== 'absolute' && style.position !== 'fixed') {\n const { width, height } = style;\n const a = node.getBoundingClientRect();\n node.style.position = 'absolute';\n node.style.width = width;\n node.style.height = height;\n add_transform(node, a);\n }\n}\nfunction add_transform(node, a) {\n const b = node.getBoundingClientRect();\n if (a.left !== b.left || a.top !== b.top) {\n const style = getComputedStyle(node);\n const transform = style.transform === 'none' ? '' : style.transform;\n node.style.transform = `${transform} translate(${a.left - b.left}px, ${a.top - b.top}px)`;\n }\n}\n\nlet current_component;\nfunction set_current_component(component) {\n current_component = component;\n}\nfunction get_current_component() {\n if (!current_component)\n throw new Error('Function called outside component initialization');\n return current_component;\n}\n/**\n * Schedules a callback to run immediately before the component is updated after any state change.\n *\n * The first time the callback runs will be before the initial `onMount`\n *\n * https://svelte.dev/docs#run-time-svelte-beforeupdate\n */\nfunction beforeUpdate(fn) {\n get_current_component().$$.before_update.push(fn);\n}\n/**\n * The `onMount` function schedules a callback to run as soon as the component has been mounted to the DOM.\n * It must be called during the component's initialisation (but doesn't need to live *inside* the component;\n * it can be called from an external module).\n *\n * `onMount` does not run inside a [server-side component](/docs#run-time-server-side-component-api).\n *\n * https://svelte.dev/docs#run-time-svelte-onmount\n */\nfunction onMount(fn) {\n get_current_component().$$.on_mount.push(fn);\n}\n/**\n * Schedules a callback to run immediately after the component has been updated.\n *\n * The first time the callback runs will be after the initial `onMount`\n */\nfunction afterUpdate(fn) {\n get_current_component().$$.after_update.push(fn);\n}\n/**\n * Schedules a callback to run immediately before the component is unmounted.\n *\n * Out of `onMount`, `beforeUpdate`, `afterUpdate` and `onDestroy`, this is the\n * only one that runs inside a server-side component.\n *\n * https://svelte.dev/docs#run-time-svelte-ondestroy\n */\nfunction onDestroy(fn) {\n get_current_component().$$.on_destroy.push(fn);\n}\n/**\n * Creates an event dispatcher that can be used to dispatch [component events](/docs#template-syntax-component-directives-on-eventname).\n * Event dispatchers are functions that can take two arguments: `name` and `detail`.\n *\n * Component events created with `createEventDispatcher` create a\n * [CustomEvent](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent).\n * These events do not [bubble](https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Building_blocks/Events#Event_bubbling_and_capture).\n * The `detail` argument corresponds to the [CustomEvent.detail](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/detail)\n * property and can contain any type of data.\n *\n * https://svelte.dev/docs#run-time-svelte-createeventdispatcher\n */\nfunction createEventDispatcher() {\n const component = get_current_component();\n return (type, detail, { cancelable = false } = {}) => {\n const callbacks = component.$$.callbacks[type];\n if (callbacks) {\n // TODO are there situations where events could be dispatched\n // in a server (non-DOM) environment?\n const event = custom_event(type, detail, { cancelable });\n callbacks.slice().forEach(fn => {\n fn.call(component, event);\n });\n return !event.defaultPrevented;\n }\n return true;\n };\n}\n/**\n * Associates an arbitrary `context` object with the current component and the specified `key`\n * and returns that object. The context is then available to children of the component\n * (including slotted content) with `getContext`.\n *\n * Like lifecycle functions, this must be called during component initialisation.\n *\n * https://svelte.dev/docs#run-time-svelte-setcontext\n */\nfunction setContext(key, context) {\n get_current_component().$$.context.set(key, context);\n return context;\n}\n/**\n * Retrieves the context that belongs to the closest parent component with the specified `key`.\n * Must be called during component initialisation.\n *\n * https://svelte.dev/docs#run-time-svelte-getcontext\n */\nfunction getContext(key) {\n return get_current_component().$$.context.get(key);\n}\n/**\n * Retrieves the whole context map that belongs to the closest parent component.\n * Must be called during component initialisation. Useful, for example, if you\n * programmatically create a component and want to pass the existing context to it.\n *\n * https://svelte.dev/docs#run-time-svelte-getallcontexts\n */\nfunction getAllContexts() {\n return get_current_component().$$.context;\n}\n/**\n * Checks whether a given `key` has been set in the context of a parent component.\n * Must be called during component initialisation.\n *\n * https://svelte.dev/docs#run-time-svelte-hascontext\n */\nfunction hasContext(key) {\n return get_current_component().$$.context.has(key);\n}\n// TODO figure out if we still want to support\n// shorthand events, or if we want to implement\n// a real bubbling mechanism\nfunction bubble(component, event) {\n const callbacks = component.$$.callbacks[event.type];\n if (callbacks) {\n // @ts-ignore\n callbacks.slice().forEach(fn => fn.call(this, event));\n }\n}\n\nconst dirty_components = [];\nconst intros = { enabled: false };\nconst binding_callbacks = [];\nconst render_callbacks = [];\nconst flush_callbacks = [];\nconst resolved_promise = Promise.resolve();\nlet update_scheduled = false;\nfunction schedule_update() {\n if (!update_scheduled) {\n update_scheduled = true;\n resolved_promise.then(flush);\n }\n}\nfunction tick() {\n schedule_update();\n return resolved_promise;\n}\nfunction add_render_callback(fn) {\n render_callbacks.push(fn);\n}\nfunction add_flush_callback(fn) {\n flush_callbacks.push(fn);\n}\n// flush() calls callbacks in this order:\n// 1. All beforeUpdate callbacks, in order: parents before children\n// 2. All bind:this callbacks, in reverse order: children before parents.\n// 3. All afterUpdate callbacks, in order: parents before children. EXCEPT\n// for afterUpdates called during the initial onMount, which are called in\n// reverse order: children before parents.\n// Since callbacks might update component values, which could trigger another\n// call to flush(), the following steps guard against this:\n// 1. During beforeUpdate, any updated components will be added to the\n// dirty_components array and will cause a reentrant call to flush(). Because\n// the flush index is kept outside the function, the reentrant call will pick\n// up where the earlier call left off and go through all dirty components. The\n// current_component value is saved and restored so that the reentrant call will\n// not interfere with the \"parent\" flush() call.\n// 2. bind:this callbacks cannot trigger new flush() calls.\n// 3. During afterUpdate, any updated components will NOT have their afterUpdate\n// callback called a second time; the seen_callbacks set, outside the flush()\n// function, guarantees this behavior.\nconst seen_callbacks = new Set();\nlet flushidx = 0; // Do *not* move this inside the flush() function\nfunction flush() {\n const saved_component = current_component;\n do {\n // first, call beforeUpdate functions\n // and update components\n while (flushidx < dirty_components.length) {\n const component = dirty_components[flushidx];\n flushidx++;\n set_current_component(component);\n update(component.$$);\n }\n set_current_component(null);\n dirty_components.length = 0;\n flushidx = 0;\n while (binding_callbacks.length)\n binding_callbacks.pop()();\n // then, once components are updated, call\n // afterUpdate functions. This may cause\n // subsequent updates...\n for (let i = 0; i < render_callbacks.length; i += 1) {\n const callback = render_callbacks[i];\n if (!seen_callbacks.has(callback)) {\n // ...so guard against infinite loops\n seen_callbacks.add(callback);\n callback();\n }\n }\n render_callbacks.length = 0;\n } while (dirty_components.length);\n while (flush_callbacks.length) {\n flush_callbacks.pop()();\n }\n update_scheduled = false;\n seen_callbacks.clear();\n set_current_component(saved_component);\n}\nfunction update($$) {\n if ($$.fragment !== null) {\n $$.update();\n run_all($$.before_update);\n const dirty = $$.dirty;\n $$.dirty = [-1];\n $$.fragment && $$.fragment.p($$.ctx, dirty);\n $$.after_update.forEach(add_render_callback);\n }\n}\n\nlet promise;\nfunction wait() {\n if (!promise) {\n promise = Promise.resolve();\n promise.then(() => {\n promise = null;\n });\n }\n return promise;\n}\nfunction dispatch(node, direction, kind) {\n node.dispatchEvent(custom_event(`${direction ? 'intro' : 'outro'}${kind}`));\n}\nconst outroing = new Set();\nlet outros;\nfunction group_outros() {\n outros = {\n r: 0,\n c: [],\n p: outros // parent group\n };\n}\nfunction check_outros() {\n if (!outros.r) {\n run_all(outros.c);\n }\n outros = outros.p;\n}\nfunction transition_in(block, local) {\n if (block && block.i) {\n outroing.delete(block);\n block.i(local);\n }\n}\nfunction transition_out(block, local, detach, callback) {\n if (block && block.o) {\n if (outroing.has(block))\n return;\n outroing.add(block);\n outros.c.push(() => {\n outroing.delete(block);\n if (callback) {\n if (detach)\n block.d(1);\n callback();\n }\n });\n block.o(local);\n }\n else if (callback) {\n callback();\n }\n}\nconst null_transition = { duration: 0 };\nfunction create_in_transition(node, fn, params) {\n let config = fn(node, params);\n let running = false;\n let animation_name;\n let task;\n let uid = 0;\n function cleanup() {\n if (animation_name)\n delete_rule(node, animation_name);\n }\n function go() {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n if (css)\n animation_name = create_rule(node, 0, 1, duration, delay, easing, css, uid++);\n tick(0, 1);\n const start_time = now() + delay;\n const end_time = start_time + duration;\n if (task)\n task.abort();\n running = true;\n add_render_callback(() => dispatch(node, true, 'start'));\n task = loop(now => {\n if (running) {\n if (now >= end_time) {\n tick(1, 0);\n dispatch(node, true, 'end');\n cleanup();\n return running = false;\n }\n if (now >= start_time) {\n const t = easing((now - start_time) / duration);\n tick(t, 1 - t);\n }\n }\n return running;\n });\n }\n let started = false;\n return {\n start() {\n if (started)\n return;\n started = true;\n delete_rule(node);\n if (is_function(config)) {\n config = config();\n wait().then(go);\n }\n else {\n go();\n }\n },\n invalidate() {\n started = false;\n },\n end() {\n if (running) {\n cleanup();\n running = false;\n }\n }\n };\n}\nfunction create_out_transition(node, fn, params) {\n let config = fn(node, params);\n let running = true;\n let animation_name;\n const group = outros;\n group.r += 1;\n function go() {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n if (css)\n animation_name = create_rule(node, 1, 0, duration, delay, easing, css);\n const start_time = now() + delay;\n const end_time = start_time + duration;\n add_render_callback(() => dispatch(node, false, 'start'));\n loop(now => {\n if (running) {\n if (now >= end_time) {\n tick(0, 1);\n dispatch(node, false, 'end');\n if (!--group.r) {\n // this will result in `end()` being called,\n // so we don't need to clean up here\n run_all(group.c);\n }\n return false;\n }\n if (now >= start_time) {\n const t = easing((now - start_time) / duration);\n tick(1 - t, t);\n }\n }\n return running;\n });\n }\n if (is_function(config)) {\n wait().then(() => {\n // @ts-ignore\n config = config();\n go();\n });\n }\n else {\n go();\n }\n return {\n end(reset) {\n if (reset && config.tick) {\n config.tick(1, 0);\n }\n if (running) {\n if (animation_name)\n delete_rule(node, animation_name);\n running = false;\n }\n }\n };\n}\nfunction create_bidirectional_transition(node, fn, params, intro) {\n let config = fn(node, params);\n let t = intro ? 0 : 1;\n let running_program = null;\n let pending_program = null;\n let animation_name = null;\n function clear_animation() {\n if (animation_name)\n delete_rule(node, animation_name);\n }\n function init(program, duration) {\n const d = (program.b - t);\n duration *= Math.abs(d);\n return {\n a: t,\n b: program.b,\n d,\n duration,\n start: program.start,\n end: program.start + duration,\n group: program.group\n };\n }\n function go(b) {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n const program = {\n start: now() + delay,\n b\n };\n if (!b) {\n // @ts-ignore todo: improve typings\n program.group = outros;\n outros.r += 1;\n }\n if (running_program || pending_program) {\n pending_program = program;\n }\n else {\n // if this is an intro, and there's a delay, we need to do\n // an initial tick and/or apply CSS animation immediately\n if (css) {\n clear_animation();\n animation_name = create_rule(node, t, b, duration, delay, easing, css);\n }\n if (b)\n tick(0, 1);\n running_program = init(program, duration);\n add_render_callback(() => dispatch(node, b, 'start'));\n loop(now => {\n if (pending_program && now > pending_program.start) {\n running_program = init(pending_program, duration);\n pending_program = null;\n dispatch(node, running_program.b, 'start');\n if (css) {\n clear_animation();\n animation_name = create_rule(node, t, running_program.b, running_program.duration, 0, easing, config.css);\n }\n }\n if (running_program) {\n if (now >= running_program.end) {\n tick(t = running_program.b, 1 - t);\n dispatch(node, running_program.b, 'end');\n if (!pending_program) {\n // we're done\n if (running_program.b) {\n // intro \u2014 we can tidy up immediately\n clear_animation();\n }\n else {\n // outro \u2014 needs to be coordinated\n if (!--running_program.group.r)\n run_all(running_program.group.c);\n }\n }\n running_program = null;\n }\n else if (now >= running_program.start) {\n const p = now - running_program.start;\n t = running_program.a + running_program.d * easing(p / running_program.duration);\n tick(t, 1 - t);\n }\n }\n return !!(running_program || pending_program);\n });\n }\n }\n return {\n run(b) {\n if (is_function(config)) {\n wait().then(() => {\n // @ts-ignore\n config = config();\n go(b);\n });\n }\n else {\n go(b);\n }\n },\n end() {\n clear_animation();\n running_program = pending_program = null;\n }\n };\n}\n\nfunction handle_promise(promise, info) {\n const token = info.token = {};\n function update(type, index, key, value) {\n if (info.token !== token)\n return;\n info.resolved = value;\n let child_ctx = info.ctx;\n if (key !== undefined) {\n child_ctx = child_ctx.slice();\n child_ctx[key] = value;\n }\n const block = type && (info.current = type)(child_ctx);\n let needs_flush = false;\n if (info.block) {\n if (info.blocks) {\n info.blocks.forEach((block, i) => {\n if (i !== index && block) {\n group_outros();\n transition_out(block, 1, 1, () => {\n if (info.blocks[i] === block) {\n info.blocks[i] = null;\n }\n });\n check_outros();\n }\n });\n }\n else {\n info.block.d(1);\n }\n block.c();\n transition_in(block, 1);\n block.m(info.mount(), info.anchor);\n needs_flush = true;\n }\n info.block = block;\n if (info.blocks)\n info.blocks[index] = block;\n if (needs_flush) {\n flush();\n }\n }\n if (is_promise(promise)) {\n const current_component = get_current_component();\n promise.then(value => {\n set_current_component(current_component);\n update(info.then, 1, info.value, value);\n set_current_component(null);\n }, error => {\n set_current_component(current_component);\n update(info.catch, 2, info.error, error);\n set_current_component(null);\n if (!info.hasCatch) {\n throw error;\n }\n });\n // if we previously had a then/catch block, destroy it\n if (info.current !== info.pending) {\n update(info.pending, 0);\n return true;\n }\n }\n else {\n if (info.current !== info.then) {\n update(info.then, 1, info.value, promise);\n return true;\n }\n info.resolved = promise;\n }\n}\nfunction update_await_block_branch(info, ctx, dirty) {\n const child_ctx = ctx.slice();\n const { resolved } = info;\n if (info.current === info.then) {\n child_ctx[info.value] = resolved;\n }\n if (info.current === info.catch) {\n child_ctx[info.error] = resolved;\n }\n info.block.p(child_ctx, dirty);\n}\n\nconst globals = (typeof window !== 'undefined'\n ? window\n : typeof globalThis !== 'undefined'\n ? globalThis\n : global);\n\nfunction destroy_block(block, lookup) {\n block.d(1);\n lookup.delete(block.key);\n}\nfunction outro_and_destroy_block(block, lookup) {\n transition_out(block, 1, 1, () => {\n lookup.delete(block.key);\n });\n}\nfunction fix_and_destroy_block(block, lookup) {\n block.f();\n destroy_block(block, lookup);\n}\nfunction fix_and_outro_and_destroy_block(block, lookup) {\n block.f();\n outro_and_destroy_block(block, lookup);\n}\nfunction update_keyed_each(old_blocks, dirty, get_key, dynamic, ctx, list, lookup, node, destroy, create_each_block, next, get_context) {\n let o = old_blocks.length;\n let n = list.length;\n let i = o;\n const old_indexes = {};\n while (i--)\n old_indexes[old_blocks[i].key] = i;\n const new_blocks = [];\n const new_lookup = new Map();\n const deltas = new Map();\n i = n;\n while (i--) {\n const child_ctx = get_context(ctx, list, i);\n const key = get_key(child_ctx);\n let block = lookup.get(key);\n if (!block) {\n block = create_each_block(key, child_ctx);\n block.c();\n }\n else if (dynamic) {\n block.p(child_ctx, dirty);\n }\n new_lookup.set(key, new_blocks[i] = block);\n if (key in old_indexes)\n deltas.set(key, Math.abs(i - old_indexes[key]));\n }\n const will_move = new Set();\n const did_move = new Set();\n function insert(block) {\n transition_in(block, 1);\n block.m(node, next);\n lookup.set(block.key, block);\n next = block.first;\n n--;\n }\n while (o && n) {\n const new_block = new_blocks[n - 1];\n const old_block = old_blocks[o - 1];\n const new_key = new_block.key;\n const old_key = old_block.key;\n if (new_block === old_block) {\n // do nothing\n next = new_block.first;\n o--;\n n--;\n }\n else if (!new_lookup.has(old_key)) {\n // remove old block\n destroy(old_block, lookup);\n o--;\n }\n else if (!lookup.has(new_key) || will_move.has(new_key)) {\n insert(new_block);\n }\n else if (did_move.has(old_key)) {\n o--;\n }\n else if (deltas.get(new_key) > deltas.get(old_key)) {\n did_move.add(new_key);\n insert(new_block);\n }\n else {\n will_move.add(old_key);\n o--;\n }\n }\n while (o--) {\n const old_block = old_blocks[o];\n if (!new_lookup.has(old_block.key))\n destroy(old_block, lookup);\n }\n while (n)\n insert(new_blocks[n - 1]);\n return new_blocks;\n}\nfunction validate_each_keys(ctx, list, get_context, get_key) {\n const keys = new Set();\n for (let i = 0; i < list.length; i++) {\n const key = get_key(get_context(ctx, list, i));\n if (keys.has(key)) {\n throw new Error('Cannot have duplicate keys in a keyed each');\n }\n keys.add(key);\n }\n}\n\nfunction get_spread_update(levels, updates) {\n const update = {};\n const to_null_out = {};\n const accounted_for = { $$scope: 1 };\n let i = levels.length;\n while (i--) {\n const o = levels[i];\n const n = updates[i];\n if (n) {\n for (const key in o) {\n if (!(key in n))\n to_null_out[key] = 1;\n }\n for (const key in n) {\n if (!accounted_for[key]) {\n update[key] = n[key];\n accounted_for[key] = 1;\n }\n }\n levels[i] = n;\n }\n else {\n for (const key in o) {\n accounted_for[key] = 1;\n }\n }\n }\n for (const key in to_null_out) {\n if (!(key in update))\n update[key] = undefined;\n }\n return update;\n}\nfunction get_spread_object(spread_props) {\n return typeof spread_props === 'object' && spread_props !== null ? spread_props : {};\n}\n\n// source: https://html.spec.whatwg.org/multipage/indices.html\nconst boolean_attributes = new Set([\n 'allowfullscreen',\n 'allowpaymentrequest',\n 'async',\n 'autofocus',\n 'autoplay',\n 'checked',\n 'controls',\n 'default',\n 'defer',\n 'disabled',\n 'formnovalidate',\n 'hidden',\n 'inert',\n 'ismap',\n 'itemscope',\n 'loop',\n 'multiple',\n 'muted',\n 'nomodule',\n 'novalidate',\n 'open',\n 'playsinline',\n 'readonly',\n 'required',\n 'reversed',\n 'selected'\n]);\n\n/** regex of all html void element names */\nconst void_element_names = /^(?:area|base|br|col|command|embed|hr|img|input|keygen|link|meta|param|source|track|wbr)$/;\nfunction is_void(name) {\n return void_element_names.test(name) || name.toLowerCase() === '!doctype';\n}\n\nconst invalid_attribute_name_character = /[\\s'\">/=\\u{FDD0}-\\u{FDEF}\\u{FFFE}\\u{FFFF}\\u{1FFFE}\\u{1FFFF}\\u{2FFFE}\\u{2FFFF}\\u{3FFFE}\\u{3FFFF}\\u{4FFFE}\\u{4FFFF}\\u{5FFFE}\\u{5FFFF}\\u{6FFFE}\\u{6FFFF}\\u{7FFFE}\\u{7FFFF}\\u{8FFFE}\\u{8FFFF}\\u{9FFFE}\\u{9FFFF}\\u{AFFFE}\\u{AFFFF}\\u{BFFFE}\\u{BFFFF}\\u{CFFFE}\\u{CFFFF}\\u{DFFFE}\\u{DFFFF}\\u{EFFFE}\\u{EFFFF}\\u{FFFFE}\\u{FFFFF}\\u{10FFFE}\\u{10FFFF}]/u;\n// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\n// https://infra.spec.whatwg.org/#noncharacter\nfunction spread(args, attrs_to_add) {\n const attributes = Object.assign({}, ...args);\n if (attrs_to_add) {\n const classes_to_add = attrs_to_add.classes;\n const styles_to_add = attrs_to_add.styles;\n if (classes_to_add) {\n if (attributes.class == null) {\n attributes.class = classes_to_add;\n }\n else {\n attributes.class += ' ' + classes_to_add;\n }\n }\n if (styles_to_add) {\n if (attributes.style == null) {\n attributes.style = style_object_to_string(styles_to_add);\n }\n else {\n attributes.style = style_object_to_string(merge_ssr_styles(attributes.style, styles_to_add));\n }\n }\n }\n let str = '';\n Object.keys(attributes).forEach(name => {\n if (invalid_attribute_name_character.test(name))\n return;\n const value = attributes[name];\n if (value === true)\n str += ' ' + name;\n else if (boolean_attributes.has(name.toLowerCase())) {\n if (value)\n str += ' ' + name;\n }\n else if (value != null) {\n str += ` ${name}=\"${value}\"`;\n }\n });\n return str;\n}\nfunction merge_ssr_styles(style_attribute, style_directive) {\n const style_object = {};\n for (const individual_style of style_attribute.split(';')) {\n const colon_index = individual_style.indexOf(':');\n const name = individual_style.slice(0, colon_index).trim();\n const value = individual_style.slice(colon_index + 1).trim();\n if (!name)\n continue;\n style_object[name] = value;\n }\n for (const name in style_directive) {\n const value = style_directive[name];\n if (value) {\n style_object[name] = value;\n }\n else {\n delete style_object[name];\n }\n }\n return style_object;\n}\nconst ATTR_REGEX = /[&\"]/g;\nconst CONTENT_REGEX = /[&<]/g;\n/**\n * Note: this method is performance sensitive and has been optimized\n * https://github.com/sveltejs/svelte/pull/5701\n */\nfunction escape(value, is_attr = false) {\n const str = String(value);\n const pattern = is_attr ? ATTR_REGEX : CONTENT_REGEX;\n pattern.lastIndex = 0;\n let escaped = '';\n let last = 0;\n while (pattern.test(str)) {\n const i = pattern.lastIndex - 1;\n const ch = str[i];\n escaped += str.substring(last, i) + (ch === '&' ? '&' : (ch === '\"' ? '"' : '<'));\n last = i + 1;\n }\n return escaped + str.substring(last);\n}\nfunction escape_attribute_value(value) {\n // keep booleans, null, and undefined for the sake of `spread`\n const should_escape = typeof value === 'string' || (value && typeof value === 'object');\n return should_escape ? escape(value, true) : value;\n}\nfunction escape_object(obj) {\n const result = {};\n for (const key in obj) {\n result[key] = escape_attribute_value(obj[key]);\n }\n return result;\n}\nfunction each(items, fn) {\n let str = '';\n for (let i = 0; i < items.length; i += 1) {\n str += fn(items[i], i);\n }\n return str;\n}\nconst missing_component = {\n $$render: () => ''\n};\nfunction validate_component(component, name) {\n if (!component || !component.$$render) {\n if (name === 'svelte:component')\n name += ' this={...}';\n throw new Error(`<${name}> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules. Otherwise you may need to fix a <${name}>.`);\n }\n return component;\n}\nfunction debug(file, line, column, values) {\n console.log(`{@debug} ${file ? file + ' ' : ''}(${line}:${column})`); // eslint-disable-line no-console\n console.log(values); // eslint-disable-line no-console\n return '';\n}\nlet on_destroy;\nfunction create_ssr_component(fn) {\n function $$render(result, props, bindings, slots, context) {\n const parent_component = current_component;\n const $$ = {\n on_destroy,\n context: new Map(context || (parent_component ? parent_component.$$.context : [])),\n // these will be immediately discarded\n on_mount: [],\n before_update: [],\n after_update: [],\n callbacks: blank_object()\n };\n set_current_component({ $$ });\n const html = fn(result, props, bindings, slots);\n set_current_component(parent_component);\n return html;\n }\n return {\n render: (props = {}, { $$slots = {}, context = new Map() } = {}) => {\n on_destroy = [];\n const result = { title: '', head: '', css: new Set() };\n const html = $$render(result, props, {}, $$slots, context);\n run_all(on_destroy);\n return {\n html,\n css: {\n code: Array.from(result.css).map(css => css.code).join('\\n'),\n map: null // TODO\n },\n head: result.title + result.head\n };\n },\n $$render\n };\n}\nfunction add_attribute(name, value, boolean) {\n if (value == null || (boolean && !value))\n return '';\n const assignment = (boolean && value === true) ? '' : `=\"${escape(value, true)}\"`;\n return ` ${name}${assignment}`;\n}\nfunction add_classes(classes) {\n return classes ? ` class=\"${classes}\"` : '';\n}\nfunction style_object_to_string(style_object) {\n return Object.keys(style_object)\n .filter(key => style_object[key])\n .map(key => `${key}: ${style_object[key]};`)\n .join(' ');\n}\nfunction add_styles(style_object) {\n const styles = style_object_to_string(style_object);\n return styles ? ` style=\"${styles}\"` : '';\n}\n\nfunction bind(component, name, callback) {\n const index = component.$$.props[name];\n if (index !== undefined) {\n component.$$.bound[index] = callback;\n callback(component.$$.ctx[index]);\n }\n}\nfunction create_component(block) {\n block && block.c();\n}\nfunction claim_component(block, parent_nodes) {\n block && block.l(parent_nodes);\n}\nfunction mount_component(component, target, anchor, customElement) {\n const { fragment, after_update } = component.$$;\n fragment && fragment.m(target, anchor);\n if (!customElement) {\n // onMount happens before the initial afterUpdate\n add_render_callback(() => {\n const new_on_destroy = component.$$.on_mount.map(run).filter(is_function);\n // if the component was destroyed immediately\n // it will update the `$$.on_destroy` reference to `null`.\n // the destructured on_destroy may still reference to the old array\n if (component.$$.on_destroy) {\n component.$$.on_destroy.push(...new_on_destroy);\n }\n else {\n // Edge case - component was destroyed immediately,\n // most likely as a result of a binding initialising\n run_all(new_on_destroy);\n }\n component.$$.on_mount = [];\n });\n }\n after_update.forEach(add_render_callback);\n}\nfunction destroy_component(component, detaching) {\n const $$ = component.$$;\n if ($$.fragment !== null) {\n run_all($$.on_destroy);\n $$.fragment && $$.fragment.d(detaching);\n // TODO null out other refs, including component.$$ (but need to\n // preserve final state?)\n $$.on_destroy = $$.fragment = null;\n $$.ctx = [];\n }\n}\nfunction make_dirty(component, i) {\n if (component.$$.dirty[0] === -1) {\n dirty_components.push(component);\n schedule_update();\n component.$$.dirty.fill(0);\n }\n component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31));\n}\nfunction init(component, options, instance, create_fragment, not_equal, props, append_styles, dirty = [-1]) {\n const parent_component = current_component;\n set_current_component(component);\n const $$ = component.$$ = {\n fragment: null,\n ctx: [],\n // state\n props,\n update: noop,\n not_equal,\n bound: blank_object(),\n // lifecycle\n on_mount: [],\n on_destroy: [],\n on_disconnect: [],\n before_update: [],\n after_update: [],\n context: new Map(options.context || (parent_component ? parent_component.$$.context : [])),\n // everything else\n callbacks: blank_object(),\n dirty,\n skip_bound: false,\n root: options.target || parent_component.$$.root\n };\n append_styles && append_styles($$.root);\n let ready = false;\n $$.ctx = instance\n ? instance(component, options.props || {}, (i, ret, ...rest) => {\n const value = rest.length ? rest[0] : ret;\n if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) {\n if (!$$.skip_bound && $$.bound[i])\n $$.bound[i](value);\n if (ready)\n make_dirty(component, i);\n }\n return ret;\n })\n : [];\n $$.update();\n ready = true;\n run_all($$.before_update);\n // `false` as a special case of no DOM component\n $$.fragment = create_fragment ? create_fragment($$.ctx) : false;\n if (options.target) {\n if (options.hydrate) {\n start_hydrating();\n const nodes = children(options.target);\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.l(nodes);\n nodes.forEach(detach);\n }\n else {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.c();\n }\n if (options.intro)\n transition_in(component.$$.fragment);\n mount_component(component, options.target, options.anchor, options.customElement);\n end_hydrating();\n flush();\n }\n set_current_component(parent_component);\n}\nlet SvelteElement;\nif (typeof HTMLElement === 'function') {\n SvelteElement = class extends HTMLElement {\n constructor() {\n super();\n this.attachShadow({ mode: 'open' });\n }\n connectedCallback() {\n const { on_mount } = this.$$;\n this.$$.on_disconnect = on_mount.map(run).filter(is_function);\n // @ts-ignore todo: improve typings\n for (const key in this.$$.slotted) {\n // @ts-ignore todo: improve typings\n this.appendChild(this.$$.slotted[key]);\n }\n }\n attributeChangedCallback(attr, _oldValue, newValue) {\n this[attr] = newValue;\n }\n disconnectedCallback() {\n run_all(this.$$.on_disconnect);\n }\n $destroy() {\n destroy_component(this, 1);\n this.$destroy = noop;\n }\n $on(type, callback) {\n // TODO should this delegate to addEventListener?\n if (!is_function(callback)) {\n return noop;\n }\n const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n callbacks.push(callback);\n return () => {\n const index = callbacks.indexOf(callback);\n if (index !== -1)\n callbacks.splice(index, 1);\n };\n }\n $set($$props) {\n if (this.$$set && !is_empty($$props)) {\n this.$$.skip_bound = true;\n this.$$set($$props);\n this.$$.skip_bound = false;\n }\n }\n };\n}\n/**\n * Base class for Svelte components. Used when dev=false.\n */\nclass SvelteComponent {\n $destroy() {\n destroy_component(this, 1);\n this.$destroy = noop;\n }\n $on(type, callback) {\n if (!is_function(callback)) {\n return noop;\n }\n const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n callbacks.push(callback);\n return () => {\n const index = callbacks.indexOf(callback);\n if (index !== -1)\n callbacks.splice(index, 1);\n };\n }\n $set($$props) {\n if (this.$$set && !is_empty($$props)) {\n this.$$.skip_bound = true;\n this.$$set($$props);\n this.$$.skip_bound = false;\n }\n }\n}\n\nfunction dispatch_dev(type, detail) {\n document.dispatchEvent(custom_event(type, Object.assign({ version: '3.51.0' }, detail), { bubbles: true }));\n}\nfunction append_dev(target, node) {\n dispatch_dev('SvelteDOMInsert', { target, node });\n append(target, node);\n}\nfunction append_hydration_dev(target, node) {\n dispatch_dev('SvelteDOMInsert', { target, node });\n append_hydration(target, node);\n}\nfunction insert_dev(target, node, anchor) {\n dispatch_dev('SvelteDOMInsert', { target, node, anchor });\n insert(target, node, anchor);\n}\nfunction insert_hydration_dev(target, node, anchor) {\n dispatch_dev('SvelteDOMInsert', { target, node, anchor });\n insert_hydration(target, node, anchor);\n}\nfunction detach_dev(node) {\n dispatch_dev('SvelteDOMRemove', { node });\n detach(node);\n}\nfunction detach_between_dev(before, after) {\n while (before.nextSibling && before.nextSibling !== after) {\n detach_dev(before.nextSibling);\n }\n}\nfunction detach_before_dev(after) {\n while (after.previousSibling) {\n detach_dev(after.previousSibling);\n }\n}\nfunction detach_after_dev(before) {\n while (before.nextSibling) {\n detach_dev(before.nextSibling);\n }\n}\nfunction listen_dev(node, event, handler, options, has_prevent_default, has_stop_propagation) {\n const modifiers = options === true ? ['capture'] : options ? Array.from(Object.keys(options)) : [];\n if (has_prevent_default)\n modifiers.push('preventDefault');\n if (has_stop_propagation)\n modifiers.push('stopPropagation');\n dispatch_dev('SvelteDOMAddEventListener', { node, event, handler, modifiers });\n const dispose = listen(node, event, handler, options);\n return () => {\n dispatch_dev('SvelteDOMRemoveEventListener', { node, event, handler, modifiers });\n dispose();\n };\n}\nfunction attr_dev(node, attribute, value) {\n attr(node, attribute, value);\n if (value == null)\n dispatch_dev('SvelteDOMRemoveAttribute', { node, attribute });\n else\n dispatch_dev('SvelteDOMSetAttribute', { node, attribute, value });\n}\nfunction prop_dev(node, property, value) {\n node[property] = value;\n dispatch_dev('SvelteDOMSetProperty', { node, property, value });\n}\nfunction dataset_dev(node, property, value) {\n node.dataset[property] = value;\n dispatch_dev('SvelteDOMSetDataset', { node, property, value });\n}\nfunction set_data_dev(text, data) {\n data = '' + data;\n if (text.wholeText === data)\n return;\n dispatch_dev('SvelteDOMSetData', { node: text, data });\n text.data = data;\n}\nfunction validate_each_argument(arg) {\n if (typeof arg !== 'string' && !(arg && typeof arg === 'object' && 'length' in arg)) {\n let msg = '{#each} only iterates over array-like objects.';\n if (typeof Symbol === 'function' && arg && Symbol.iterator in arg) {\n msg += ' You can use a spread to convert this iterable into an array.';\n }\n throw new Error(msg);\n }\n}\nfunction validate_slots(name, slot, keys) {\n for (const slot_key of Object.keys(slot)) {\n if (!~keys.indexOf(slot_key)) {\n console.warn(`<${name}> received an unexpected slot \"${slot_key}\".`);\n }\n }\n}\nfunction validate_dynamic_element(tag) {\n const is_string = typeof tag === 'string';\n if (tag && !is_string) {\n throw new Error(' expects \"this\" attribute to be a string.');\n }\n}\nfunction validate_void_dynamic_element(tag) {\n if (tag && is_void(tag)) {\n console.warn(` is self-closing and cannot have content.`);\n }\n}\nfunction construct_svelte_component_dev(component, props) {\n const error_message = 'this={...} of should specify a Svelte component.';\n try {\n const instance = new component(props);\n if (!instance.$$ || !instance.$set || !instance.$on || !instance.$destroy) {\n throw new Error(error_message);\n }\n return instance;\n }\n catch (err) {\n const { message } = err;\n if (typeof message === 'string' && message.indexOf('is not a constructor') !== -1) {\n throw new Error(error_message);\n }\n else {\n throw err;\n }\n }\n}\n/**\n * Base class for Svelte components with some minor dev-enhancements. Used when dev=true.\n */\nclass SvelteComponentDev extends SvelteComponent {\n constructor(options) {\n if (!options || (!options.target && !options.$$inline)) {\n throw new Error(\"'target' is a required option\");\n }\n super();\n }\n $destroy() {\n super.$destroy();\n this.$destroy = () => {\n console.warn('Component was already destroyed'); // eslint-disable-line no-console\n };\n }\n $capture_state() { }\n $inject_state() { }\n}\n/**\n * Base class to create strongly typed Svelte components.\n * This only exists for typing purposes and should be used in `.d.ts` files.\n *\n * ### Example:\n *\n * You have component library on npm called `component-library`, from which\n * you export a component called `MyComponent`. For Svelte+TypeScript users,\n * you want to provide typings. Therefore you create a `index.d.ts`:\n * ```ts\n * import { SvelteComponentTyped } from \"svelte\";\n * export class MyComponent extends SvelteComponentTyped<{foo: string}> {}\n * ```\n * Typing this makes it possible for IDEs like VS Code with the Svelte extension\n * to provide intellisense and to use the component like this in a Svelte file\n * with TypeScript:\n * ```svelte\n * \n * \n * ```\n *\n * #### Why not make this part of `SvelteComponent(Dev)`?\n * Because\n * ```ts\n * class ASubclassOfSvelteComponent extends SvelteComponent<{foo: string}> {}\n * const component: typeof SvelteComponent = ASubclassOfSvelteComponent;\n * ```\n * will throw a type error, so we need to separate the more strictly typed class.\n */\nclass SvelteComponentTyped extends SvelteComponentDev {\n constructor(options) {\n super(options);\n }\n}\nfunction loop_guard(timeout) {\n const start = Date.now();\n return () => {\n if (Date.now() - start > timeout) {\n throw new Error('Infinite loop detected');\n }\n };\n}\n\nexport { HtmlTag, HtmlTagHydration, SvelteComponent, SvelteComponentDev, SvelteComponentTyped, SvelteElement, action_destroyer, add_attribute, add_classes, add_flush_callback, add_location, add_render_callback, add_resize_listener, add_styles, add_transform, afterUpdate, append, append_dev, append_empty_stylesheet, append_hydration, append_hydration_dev, append_styles, assign, attr, attr_dev, attribute_to_object, beforeUpdate, bind, binding_callbacks, blank_object, bubble, check_outros, children, claim_component, claim_element, claim_html_tag, claim_space, claim_svg_element, claim_text, clear_loops, component_subscribe, compute_rest_props, compute_slots, construct_svelte_component, construct_svelte_component_dev, createEventDispatcher, create_animation, create_bidirectional_transition, create_component, create_in_transition, create_out_transition, create_slot, create_ssr_component, current_component, custom_event, dataset_dev, debug, destroy_block, destroy_component, destroy_each, detach, detach_after_dev, detach_before_dev, detach_between_dev, detach_dev, dirty_components, dispatch_dev, each, element, element_is, empty, end_hydrating, escape, escape_attribute_value, escape_object, exclude_internal_props, fix_and_destroy_block, fix_and_outro_and_destroy_block, fix_position, flush, getAllContexts, getContext, get_all_dirty_from_scope, get_binding_group_value, get_current_component, get_custom_elements_slots, get_root_for_style, get_slot_changes, get_spread_object, get_spread_update, get_store_value, globals, group_outros, handle_promise, hasContext, has_prop, head_selector, identity, init, insert, insert_dev, insert_hydration, insert_hydration_dev, intros, invalid_attribute_name_character, is_client, is_crossorigin, is_empty, is_function, is_promise, is_void, listen, listen_dev, loop, loop_guard, merge_ssr_styles, missing_component, mount_component, noop, not_equal, now, null_to_empty, object_without_properties, onDestroy, onMount, once, outro_and_destroy_block, prevent_default, prop_dev, query_selector_all, raf, run, run_all, safe_not_equal, schedule_update, select_multiple_value, select_option, select_options, select_value, self, setContext, set_attributes, set_current_component, set_custom_element_data, set_custom_element_data_map, set_data, set_data_dev, set_input_type, set_input_value, set_now, set_raf, set_store_value, set_style, set_svg_attributes, space, spread, src_url_equal, start_hydrating, stop_propagation, subscribe, svg_element, text, tick, time_ranges_to_array, to_number, toggle_class, transition_in, transition_out, trusted, update_await_block_branch, update_keyed_each, update_slot, update_slot_base, validate_component, validate_dynamic_element, validate_each_argument, validate_each_keys, validate_slots, validate_store, validate_void_dynamic_element, xlink_attr };\n", "import { noop, safe_not_equal, subscribe, run_all, is_function } from '../internal/index.mjs';\nexport { get_store_value as get } from '../internal/index.mjs';\n\nconst subscriber_queue = [];\n/**\n * Creates a `Readable` store that allows reading by subscription.\n * @param value initial value\n * @param {StartStopNotifier}start start and stop notifications for subscriptions\n */\nfunction readable(value, start) {\n return {\n subscribe: writable(value, start).subscribe\n };\n}\n/**\n * Create a `Writable` store that allows both updating and reading by subscription.\n * @param {*=}value initial value\n * @param {StartStopNotifier=}start start and stop notifications for subscriptions\n */\nfunction writable(value, start = noop) {\n let stop;\n const subscribers = new Set();\n function set(new_value) {\n if (safe_not_equal(value, new_value)) {\n value = new_value;\n if (stop) { // store is ready\n const run_queue = !subscriber_queue.length;\n for (const subscriber of subscribers) {\n subscriber[1]();\n subscriber_queue.push(subscriber, value);\n }\n if (run_queue) {\n for (let i = 0; i < subscriber_queue.length; i += 2) {\n subscriber_queue[i][0](subscriber_queue[i + 1]);\n }\n subscriber_queue.length = 0;\n }\n }\n }\n }\n function update(fn) {\n set(fn(value));\n }\n function subscribe(run, invalidate = noop) {\n const subscriber = [run, invalidate];\n subscribers.add(subscriber);\n if (subscribers.size === 1) {\n stop = start(set) || noop;\n }\n run(value);\n return () => {\n subscribers.delete(subscriber);\n if (subscribers.size === 0) {\n stop();\n stop = null;\n }\n };\n }\n return { set, update, subscribe };\n}\nfunction derived(stores, fn, initial_value) {\n const single = !Array.isArray(stores);\n const stores_array = single\n ? [stores]\n : stores;\n const auto = fn.length < 2;\n return readable(initial_value, (set) => {\n let inited = false;\n const values = [];\n let pending = 0;\n let cleanup = noop;\n const sync = () => {\n if (pending) {\n return;\n }\n cleanup();\n const result = fn(single ? values[0] : values, set);\n if (auto) {\n set(result);\n }\n else {\n cleanup = is_function(result) ? result : noop;\n }\n };\n const unsubscribers = stores_array.map((store, i) => subscribe(store, (value) => {\n values[i] = value;\n pending &= ~(1 << i);\n if (inited) {\n sync();\n }\n }, () => {\n pending |= (1 << i);\n }));\n inited = true;\n sync();\n return function stop() {\n run_all(unsubscribers);\n cleanup();\n };\n });\n}\n\nexport { derived, readable, writable };\n", "\r\n\r\n\r\n\t\r\n\t
\r\n\t\t\r\n\t
\r\n\t
\r\n\t\t\r\n\t\t\r\n\t
\r\n\t
\r\n\t\t\r\n\t\t / \r\n\t\t\r\n\t\t\r\n\t
\r\n\t
\r\n\t\t\r\n\t\t\r\n\t
\r\n\t
\r\n\t\t\r\n\t\t \r\n\t
\r\n\t
\r\n\t\t\r\n\t\t\r\n\t
\r\n
\r\n\r\n\r\n", "\r\n\r\n
\r\n\t
\r\n\t\r\n\t\r\n\t\r\n\r\n\t\r\n\t\r\n\r\n\t\r\n\t\r\n\r\n\t\r\n\t\r\n\r\n\t\r\n\t\r\n\r\n\t\r\n\t\r\n\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t
\r\n\r\n\r\n", "export { identity as linear } from '../internal/index.mjs';\n\n/*\nAdapted from https://github.com/mattdesl\nDistributed under MIT License https://github.com/mattdesl/eases/blob/master/LICENSE.md\n*/\nfunction backInOut(t) {\n const s = 1.70158 * 1.525;\n if ((t *= 2) < 1)\n return 0.5 * (t * t * ((s + 1) * t - s));\n return 0.5 * ((t -= 2) * t * ((s + 1) * t + s) + 2);\n}\nfunction backIn(t) {\n const s = 1.70158;\n return t * t * ((s + 1) * t - s);\n}\nfunction backOut(t) {\n const s = 1.70158;\n return --t * t * ((s + 1) * t + s) + 1;\n}\nfunction bounceOut(t) {\n const a = 4.0 / 11.0;\n const b = 8.0 / 11.0;\n const c = 9.0 / 10.0;\n const ca = 4356.0 / 361.0;\n const cb = 35442.0 / 1805.0;\n const cc = 16061.0 / 1805.0;\n const t2 = t * t;\n return t < a\n ? 7.5625 * t2\n : t < b\n ? 9.075 * t2 - 9.9 * t + 3.4\n : t < c\n ? ca * t2 - cb * t + cc\n : 10.8 * t * t - 20.52 * t + 10.72;\n}\nfunction bounceInOut(t) {\n return t < 0.5\n ? 0.5 * (1.0 - bounceOut(1.0 - t * 2.0))\n : 0.5 * bounceOut(t * 2.0 - 1.0) + 0.5;\n}\nfunction bounceIn(t) {\n return 1.0 - bounceOut(1.0 - t);\n}\nfunction circInOut(t) {\n if ((t *= 2) < 1)\n return -0.5 * (Math.sqrt(1 - t * t) - 1);\n return 0.5 * (Math.sqrt(1 - (t -= 2) * t) + 1);\n}\nfunction circIn(t) {\n return 1.0 - Math.sqrt(1.0 - t * t);\n}\nfunction circOut(t) {\n return Math.sqrt(1 - --t * t);\n}\nfunction cubicInOut(t) {\n return t < 0.5 ? 4.0 * t * t * t : 0.5 * Math.pow(2.0 * t - 2.0, 3.0) + 1.0;\n}\nfunction cubicIn(t) {\n return t * t * t;\n}\nfunction cubicOut(t) {\n const f = t - 1.0;\n return f * f * f + 1.0;\n}\nfunction elasticInOut(t) {\n return t < 0.5\n ? 0.5 *\n Math.sin(((+13.0 * Math.PI) / 2) * 2.0 * t) *\n Math.pow(2.0, 10.0 * (2.0 * t - 1.0))\n : 0.5 *\n Math.sin(((-13.0 * Math.PI) / 2) * (2.0 * t - 1.0 + 1.0)) *\n Math.pow(2.0, -10.0 * (2.0 * t - 1.0)) +\n 1.0;\n}\nfunction elasticIn(t) {\n return Math.sin((13.0 * t * Math.PI) / 2) * Math.pow(2.0, 10.0 * (t - 1.0));\n}\nfunction elasticOut(t) {\n return (Math.sin((-13.0 * (t + 1.0) * Math.PI) / 2) * Math.pow(2.0, -10.0 * t) + 1.0);\n}\nfunction expoInOut(t) {\n return t === 0.0 || t === 1.0\n ? t\n : t < 0.5\n ? +0.5 * Math.pow(2.0, 20.0 * t - 10.0)\n : -0.5 * Math.pow(2.0, 10.0 - t * 20.0) + 1.0;\n}\nfunction expoIn(t) {\n return t === 0.0 ? t : Math.pow(2.0, 10.0 * (t - 1.0));\n}\nfunction expoOut(t) {\n return t === 1.0 ? t : 1.0 - Math.pow(2.0, -10.0 * t);\n}\nfunction quadInOut(t) {\n t /= 0.5;\n if (t < 1)\n return 0.5 * t * t;\n t--;\n return -0.5 * (t * (t - 2) - 1);\n}\nfunction quadIn(t) {\n return t * t;\n}\nfunction quadOut(t) {\n return -t * (t - 2.0);\n}\nfunction quartInOut(t) {\n return t < 0.5\n ? +8.0 * Math.pow(t, 4.0)\n : -8.0 * Math.pow(t - 1.0, 4.0) + 1.0;\n}\nfunction quartIn(t) {\n return Math.pow(t, 4.0);\n}\nfunction quartOut(t) {\n return Math.pow(t - 1.0, 3.0) * (1.0 - t) + 1.0;\n}\nfunction quintInOut(t) {\n if ((t *= 2) < 1)\n return 0.5 * t * t * t * t * t;\n return 0.5 * ((t -= 2) * t * t * t * t + 2);\n}\nfunction quintIn(t) {\n return t * t * t * t * t;\n}\nfunction quintOut(t) {\n return --t * t * t * t * t + 1;\n}\nfunction sineInOut(t) {\n return -0.5 * (Math.cos(Math.PI * t) - 1);\n}\nfunction sineIn(t) {\n const v = Math.cos(t * Math.PI * 0.5);\n if (Math.abs(v) < 1e-14)\n return 1;\n else\n return 1 - v;\n}\nfunction sineOut(t) {\n return Math.sin((t * Math.PI) / 2);\n}\n\nexport { backIn, backInOut, backOut, bounceIn, bounceInOut, bounceOut, circIn, circInOut, circOut, cubicIn, cubicInOut, cubicOut, elasticIn, elasticInOut, elasticOut, expoIn, expoInOut, expoOut, quadIn, quadInOut, quadOut, quartIn, quartInOut, quartOut, quintIn, quintInOut, quintOut, sineIn, sineInOut, sineOut };\n", "import { cubicInOut, linear, cubicOut } from '../easing/index.mjs';\nimport { is_function, assign } from '../internal/index.mjs';\n\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n\r\nfunction __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\n\nfunction blur(node, { delay = 0, duration = 400, easing = cubicInOut, amount = 5, opacity = 0 } = {}) {\n const style = getComputedStyle(node);\n const target_opacity = +style.opacity;\n const f = style.filter === 'none' ? '' : style.filter;\n const od = target_opacity * (1 - opacity);\n return {\n delay,\n duration,\n easing,\n css: (_t, u) => `opacity: ${target_opacity - (od * u)}; filter: ${f} blur(${u * amount}px);`\n };\n}\nfunction fade(node, { delay = 0, duration = 400, easing = linear } = {}) {\n const o = +getComputedStyle(node).opacity;\n return {\n delay,\n duration,\n easing,\n css: t => `opacity: ${t * o}`\n };\n}\nfunction fly(node, { delay = 0, duration = 400, easing = cubicOut, x = 0, y = 0, opacity = 0 } = {}) {\n const style = getComputedStyle(node);\n const target_opacity = +style.opacity;\n const transform = style.transform === 'none' ? '' : style.transform;\n const od = target_opacity * (1 - opacity);\n return {\n delay,\n duration,\n easing,\n css: (t, u) => `\n\t\t\ttransform: ${transform} translate(${(1 - t) * x}px, ${(1 - t) * y}px);\n\t\t\topacity: ${target_opacity - (od * u)}`\n };\n}\nfunction slide(node, { delay = 0, duration = 400, easing = cubicOut } = {}) {\n const style = getComputedStyle(node);\n const opacity = +style.opacity;\n const height = parseFloat(style.height);\n const padding_top = parseFloat(style.paddingTop);\n const padding_bottom = parseFloat(style.paddingBottom);\n const margin_top = parseFloat(style.marginTop);\n const margin_bottom = parseFloat(style.marginBottom);\n const border_top_width = parseFloat(style.borderTopWidth);\n const border_bottom_width = parseFloat(style.borderBottomWidth);\n return {\n delay,\n duration,\n easing,\n css: t => 'overflow: hidden;' +\n `opacity: ${Math.min(t * 20, 1) * opacity};` +\n `height: ${t * height}px;` +\n `padding-top: ${t * padding_top}px;` +\n `padding-bottom: ${t * padding_bottom}px;` +\n `margin-top: ${t * margin_top}px;` +\n `margin-bottom: ${t * margin_bottom}px;` +\n `border-top-width: ${t * border_top_width}px;` +\n `border-bottom-width: ${t * border_bottom_width}px;`\n };\n}\nfunction scale(node, { delay = 0, duration = 400, easing = cubicOut, start = 0, opacity = 0 } = {}) {\n const style = getComputedStyle(node);\n const target_opacity = +style.opacity;\n const transform = style.transform === 'none' ? '' : style.transform;\n const sd = 1 - start;\n const od = target_opacity * (1 - opacity);\n return {\n delay,\n duration,\n easing,\n css: (_t, u) => `\n\t\t\ttransform: ${transform} scale(${1 - (sd * u)});\n\t\t\topacity: ${target_opacity - (od * u)}\n\t\t`\n };\n}\nfunction draw(node, { delay = 0, speed, duration, easing = cubicInOut } = {}) {\n let len = node.getTotalLength();\n const style = getComputedStyle(node);\n if (style.strokeLinecap !== 'butt') {\n len += parseInt(style.strokeWidth);\n }\n if (duration === undefined) {\n if (speed === undefined) {\n duration = 800;\n }\n else {\n duration = len / speed;\n }\n }\n else if (typeof duration === 'function') {\n duration = duration(len);\n }\n return {\n delay,\n duration,\n easing,\n css: (t, u) => `stroke-dasharray: ${t * len} ${u * len}`\n };\n}\nfunction crossfade(_a) {\n var { fallback } = _a, defaults = __rest(_a, [\"fallback\"]);\n const to_receive = new Map();\n const to_send = new Map();\n function crossfade(from, node, params) {\n const { delay = 0, duration = d => Math.sqrt(d) * 30, easing = cubicOut } = assign(assign({}, defaults), params);\n const to = node.getBoundingClientRect();\n const dx = from.left - to.left;\n const dy = from.top - to.top;\n const dw = from.width / to.width;\n const dh = from.height / to.height;\n const d = Math.sqrt(dx * dx + dy * dy);\n const style = getComputedStyle(node);\n const transform = style.transform === 'none' ? '' : style.transform;\n const opacity = +style.opacity;\n return {\n delay,\n duration: is_function(duration) ? duration(d) : duration,\n easing,\n css: (t, u) => `\n\t\t\t\topacity: ${t * opacity};\n\t\t\t\ttransform-origin: top left;\n\t\t\t\ttransform: ${transform} translate(${u * dx}px,${u * dy}px) scale(${t + (1 - t) * dw}, ${t + (1 - t) * dh});\n\t\t\t`\n };\n }\n function transition(items, counterparts, intro) {\n return (node, params) => {\n items.set(params.key, {\n rect: node.getBoundingClientRect()\n });\n return () => {\n if (counterparts.has(params.key)) {\n const { rect } = counterparts.get(params.key);\n counterparts.delete(params.key);\n return crossfade(rect, node, params);\n }\n // if the node is disappearing altogether\n // (i.e. wasn't claimed by the other list)\n // then we need to supply an outro\n items.delete(params.key);\n return fallback && fallback(node, params, intro);\n };\n };\n }\n return [\n transition(to_send, to_receive, false),\n transition(to_receive, to_send, true)\n ];\n}\n\nexport { blur, crossfade, draw, fade, fly, scale, slide };\n", "\r\n\r\n\r\n\r\n\t\r\n\t
    \r\n\t\t{#each lineage as item}\r\n\t\t
    \r\n\t\t\t
  1. \r\n\t\t\t\t
    ToggleItem(item._id)}\" class=\"item-image\">
    \r\n\t\t\t\t

    ToggleItem(item._id)}\" class=\"item-name\">{item.name}

    \r\n\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t
    \r\n\t\t\t
  2. \r\n\t\t\t{#if showItems[item._id]}\r\n\t\t\t
    \r\n\t\t\t\t{@html item.system.description}\r\n\t\t\t
    \r\n\t\t\t{/if}\r\n\t\t
    \r\n\t\t{/each}\r\n\t
\r\n
\r\n\r\n", "\r\n\r\n\r\n\r\n\t\r\n\t\r\n\r\n\t
    \r\n\t\t{#each gear as item}\r\n\t\t
    \r\n\t\t\t
  1. \r\n\t\t\t\t
    ToggleItem(item._id)}\" class=\"item-image\">
    \r\n\t\t\t\t

    ToggleItem(item._id)}\" class=\"item-name\">{item.name}

    \r\n\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t
    \r\n\t\t\t
  2. \r\n\t\t\t{#if showItems[item._id]} \r\n\t\t\t
    \r\n\t\t\t\t{@html item.system.description}\r\n\t\t\t
    \r\n\t\t\t{/if}\r\n\t\t
    \r\n\t\t{/each}\r\n\t\t
  3. \r\n
    \r\n
    \r\n
    \r\n Add item\r\n
    \r\n
  4. \r\n\t
\r\n
\r\n\r\n", "\r\n\r\n\r\n\r\n\t\r\n\t
    \r\n\t\t{#each techniques as item}\r\n\t\t
    \r\n\t\t\t
  1. \r\n\t\t\t\t
    ToggleItem(item._id)}\" class=\"item-image\">
    \r\n\t\t\t\t

    ToggleItem(item._id)}\" class=\"item-name\">{item.name}

    \r\n\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t
    \r\n\t\t\t
  2. \r\n\t\t\t{#if showItems[item._id]}\r\n\t\t\t
    \r\n\t\t\t\t{@html item.system.description}\r\n\t\t\t
    \r\n\t\t\t{/if}\r\n\t\t
    \r\n\t\t{/each}\r\n\t
\r\n
\r\n\r\n", "\r\n\r\n\r\n\r\n\t\r\n\t
    \r\n\t\t{#each injury as item}\r\n\t\t
    \r\n\t\t\t
  1. \r\n\t\t\t\t
    ToggleItem(item._id)}\" class=\"item-image\">
    \r\n\t\t\t\t

    ToggleItem(item._id)}\" class=\"item-name\">{item.name}

    \r\n\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t
    \r\n\t\t\t
  2. \r\n\t\t\t{#if showItems[item._id]}\r\n\t\t\t
    \r\n\t\t\t\t{@html item.system.description}\r\n\t\t\t
    \r\n\t\t\t{/if}\r\n\t\t
    \r\n\t\t{/each}\r\n\t\t
  3. \r\n
    \r\n
    \r\n
    \r\n Add injury\r\n
    \r\n
  4. \r\n\t
\r\n
\r\n\r\n", "\r\n
\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\r\n
\r\n", "\r\n\r\n
\r\n\t\r\n
\r\n\r\n\r\n\t\r\n\t\r\n\r\n\r\n\r\n", "/**\r\n * Extend the basic ActorSheet with some very simple modifications\r\n * @extends {ActorSheet}\r\n */\r\n\r\nimport VagabondsActorSheetBase from \"../svelte/VagabondsActorSheetBase.svelte\"; // import Svelte App\r\nimport { writable } from \"svelte/store\";\r\n\r\nexport class VagabondsActorSheet extends ActorSheet {\r\n app = null;\r\n dataStore = null;\r\n\r\n /** @override */\r\n static get defaultOptions() {\r\n return foundry.utils.mergeObject(super.defaultOptions, {\r\n classes: [\"vagabonds\", \"sheet\", \"actor\"],\r\n template: \"systems/vagabonds/templates/actor/actor-sheetv2.html\",\r\n width: 640,\r\n height: 700,\r\n tabs: [\r\n {\r\n navSelector: \".sheet-tabs\",\r\n contentSelector: \".sheet-body\",\r\n initial: \"description\"\r\n }\r\n ]\r\n });\r\n }\r\n\r\n /* -------------------------------------------- */\r\n\r\n\r\n /** @override */\r\n getData() {\r\n const data = super.getData();\r\n\r\n // Prepare items.\r\n if (this.actor.type == \"character\") {\r\n this._prepareCharacterItems(data);\r\n }\r\n\r\n //console.log(data);\r\n return data;\r\n }\r\n\r\n _prepareCharacterItems(sheetData) {\r\n const actorData = sheetData.data;\r\n\r\n // Initialize containers.\r\n const gear = [];\r\n const techniques = [];\r\n const lineage = [];\r\n const injury = [];\r\n const approach = [];\r\n const trait = [];\r\n // Iterate through items, allocating to containers\r\n // let totalWeight = 0;\r\n for (let i of sheetData.items) {\r\n i.img = i.img || DEFAULT_TOKEN;\r\n // Append to features.\r\n\r\n switch (i.type) {\r\n case \"item\":\r\n gear.push(i);\r\n break;\r\n case \"lineage\":\r\n lineage.push(i);\r\n break;\r\n case \"technique\":\r\n techniques.push(i);\r\n break;\r\n case \"injury\":\r\n injury.push(i);\r\n break;\r\n case \"approach\":\r\n approach.push(i);\r\n break;\r\n case \"trait\":\r\n trait.push(i);\r\n }\r\n }\r\n\r\n // Assign and return\r\n sheetData.gear = gear;\r\n sheetData.techniques = techniques;\r\n sheetData.lineage = lineage;\r\n sheetData.injury = injury;\r\n sheetData.approach = approach;\r\n sheetData.trait = trait;\r\n sheetData.sheet = this;\r\n }\r\n\r\n async migrateData(...args){ \r\n super.migrateData(...args);\r\n //Let's migrate system data? \r\n console.log('Attempting to migrate system data');\r\n }\r\n\r\n\r\n /** @override */\r\n activateListeners(html) {\r\n super.activateListeners(html);\r\n\r\n // Everything below here is only needed if the sheet is editable\r\n if (!this.options.editable) return;\r\n\r\n // Add Inventory Item\r\n html.find(\".item-create\").click(this._onItemCreate.bind(this));\r\n\r\n // Update Inventory Item\r\n html.find(\".item-edit\").click((ev) => {\r\n const li = $(ev.currentTarget).parents(\".item\");\r\n //const item = this.actor.getOwnedItem(li.data(\"itemId\"));\r\n const item = this.actor.items.get(li.data(\"itemId\"));\r\n item.sheet.render(true);\r\n });\r\n\r\n html.find(\".item-name\").dblclick((ev) => {\r\n const li = $(ev.currentTarget).parents(\".item\");\r\n //const item = this.actor.getOwnedItem(li.data(\"itemId\"));\r\n const item = this.actor.items.get(li.data(\"itemId\"));\r\n item.sheet.render(true);\r\n });\r\n\r\n // Delete Inventory Item\r\n html.find(\".item-delete\").click((ev) => {\r\n const li = $(ev.currentTarget).parents(\".item\");\r\n const item = this.actor.items.get(li.data(\"itemId\"));\r\n item.delete();\r\n li.slideUp(200, () => this.render(false));\r\n });\r\n\r\n // Rollable abilities.\r\n html.find(\".rollable\").click(this._onRoll.bind(this));\r\n }\r\n\r\n async _onItemDelete(itemId) {\r\n const item = this.actor.items.get(itemId);\r\n item.delete();\r\n this.render();\r\n }\r\n\r\n /* -------------------------------------------- */\r\n\r\n /**\r\n * Handle creating a new Owned Item for the actor using initial data defined in the HTML dataset\r\n * @param {Event} event The originating click event\r\n * @private\r\n */\r\n async _onItemCreate(event) {\r\n event.preventDefault();\r\n const header = event.currentTarget;\r\n // Get the type of item to create.\r\n const type = header.dataset.type;\r\n // Grab any data associated with this control.\r\n const data = foundry.utils.duplicate(header.dataset);\r\n // Initialize a default name.\r\n const name = `New ${type.capitalize()}`;\r\n // Prepare the item object.\r\n const itemData = {\r\n name: name,\r\n type: type\r\n };\r\n // Finally, create the item!\r\n\r\n return await Item.create(itemData, { parent: this.actor }).then(\r\n (item) => {\r\n item.sheet.render(true);\r\n }\r\n );\r\n }\r\n\r\n async _onItemEdit(itemId) {\r\n const item = this.actor.items.get(itemId);\r\n item.sheet.render(true);\r\n }\r\n\r\n /**\r\n * Handle clickable rolls.\r\n * @param {Event} event The originating click event\r\n * @private\r\n */\r\n _onRoll(event) {\r\n event.preventDefault();\r\n const element = event.currentTarget;\r\n const dataset = element.dataset;\r\n\r\n if (dataset.roll) {\r\n let roll = new Roll(dataset.roll, this.actor);\r\n let label = dataset.label ? `Rolling ${dataset.label}` : \"\";\r\n roll.roll().toMessage({\r\n speaker: ChatMessage.getSpeaker({ actor: this.actor }),\r\n flavor: label\r\n });\r\n }\r\n\r\n if (dataset.defend) {\r\n game.vagabonds.RollHelper.displayRollModal(true);\r\n }\r\n }\r\n\r\n render(force = false, options = {}) {\r\n // Grab the sheetdata for both updates and new apps.\r\n let sheetData = this.getData();\r\n // Exit if Vue has already rendered.\r\n if (this.app !== null) {\r\n let states = Application.RENDER_STATES;\r\n if (\r\n this._state == states.RENDERING ||\r\n this._state == states.RENDERED\r\n ) {\r\n // Update the Datastore.\r\n this.dataStore?.set(sheetData);\r\n return;\r\n }\r\n }\r\n // Run the normal Foundry render once.\r\n this._render(force, options)\r\n .catch((err) => {\r\n err.message = `An error occurred while rendering ${this.constructor.name} ${this.appId}: ${err.message}`;\r\n console.error(err);\r\n this._state = Application.RENDER_STATES.ERROR;\r\n })\r\n // Run Svelte's render, assign it to our prop for tracking.\r\n .then((rendered) => {\r\n // Prepare the actor data.\r\n this.dataStore = writable(sheetData);\r\n //console.log(sheetData);\r\n this.app = new VagabondsActorSheetBase({\r\n target: this.element.find(\"form\").get(0),\r\n props: {\r\n dataStore: this.dataStore\r\n //name: 'world',\r\n }\r\n });\r\n });\r\n // Update editable permission\r\n options.editable = options.editable ?? this.object.isOwner;\r\n\r\n // Register the active Application with the referenced Documents\r\n this.object.apps[this.appId] = this;\r\n // Return per the overridden method.\r\n return this;\r\n }\r\n\r\n close(options = {}) {\r\n if (this.app != null) {\r\n this.app.$destroy();\r\n this.app = null;\r\n this.dataStore = null;\r\n }\r\n return super.close(options);\r\n }\r\n}\r\n", "/**\r\n * Extend the basic ActorSheet with some very simple modifications\r\n * @extends {ActorSheet}\r\n */\r\nexport class VagabondsNPCSheet extends ActorSheet {\r\n\r\n /** @override */\r\n static get defaultOptions() {\r\n return foundry.utils.mergeObject(super.defaultOptions, {\r\n classes: [\"vagabonds\", \"sheet\", \"actor\"],\r\n template: \"systems/vagabonds/templates/actor/npc-sheet.html\",\r\n width: 600,\r\n height: 440,\r\n tabs: [{ navSelector: \".sheet-tabs\", contentSelector: \".sheet-body\", initial: \"description\" }]\r\n });\r\n }\r\n\r\n /* -------------------------------------------- */\r\n\r\n getData() {\r\n const data = super.getData(); \r\n return data;\r\n }\r\n\r\n\r\n /** @override */\r\n activateListeners(html) {\r\n super.activateListeners(html);\r\n\r\n // Everything below here is only needed if the sheet is editable\r\n if (!this.options.editable) return;\r\n\r\n // Add Inventory Item\r\n html.find('.item-create').click(this._onItemCreate.bind(this));\r\n \r\n // Update Inventory Item\r\n html.find('.item-edit').click(ev => {\r\n const li = $(ev.currentTarget).parents(\".item\");\r\n //const item = this.actor.getOwnedItem(li.data(\"itemId\"));\r\n const item = this.actor.items.get(li.data(\"itemId\"));\r\n item.sheet.render(true);\r\n });\r\n\r\n html.find('.item-name').dblclick(ev => {\r\n const li = $(ev.currentTarget).parents(\".item\");\r\n //const item = this.actor.getOwnedItem(li.data(\"itemId\"));\r\n const item = this.actor.items.get(li.data(\"itemId\"));\r\n item.sheet.render(true);\r\n });\r\n \r\n // Delete Inventory Item\r\n html.find('.item-delete').click(ev => {\r\n const li = $(ev.currentTarget).parents(\".item\");\r\n // this.actor.deleteOwnedItem(li.data(\"itemId\"));\r\n this.actor.deleteEmbeddedDocuments(\"Item\", [li.data(\"itemId\")])\r\n li.slideUp(200, () => this.render(false));\r\n });\r\n\r\n }\r\n\r\n \r\n /* -------------------------------------------- */\r\n\r\n /**\r\n * Handle creating a new Owned Item for the actor using initial data defined in the HTML dataset\r\n * @param {Event} event The originating click event\r\n * @private\r\n */\r\n async _onItemCreate(event) {\r\n event.preventDefault();\r\n const header = event.currentTarget;\r\n // Get the type of item to create.\r\n const type = header.dataset.type;\r\n // Grab any data associated with this control.\r\n const data = foundry.utils.duplicate(header.dataset);\r\n // Initialize a default name.\r\n const name = `New ${type.capitalize()}`;\r\n // Prepare the item object.\r\n const itemData = {\r\n name: name,\r\n type: type,\r\n data: data\r\n };\r\n // Remove the type from the dataset since it's in the itemData.type prop.\r\n delete itemData.data[\"type\"];\r\n\r\n // Finally, create the item!\r\n //return this.actor.createOwnedItem(itemData);\r\n await this.actor.createEmbeddedDocuments('Item', [itemData], {});\r\n\r\n }\r\n\r\n}\r\n", "/**\r\n * Extend the basic Item with some very simple modifications.\r\n * @extends {Item}\r\n */\r\nexport class VagabondsItem extends Item {\r\n /**\r\n * Augment the basic Item data model with additional dynamic data.\r\n */\r\n \r\n prepareData() {\r\n super.prepareData();\r\n\r\n // Get the Item's data\r\n\r\n const itemData = this;\r\n\r\n //const actorData = this.actor ? this.actor.data : {};\r\n //const data = itemData.data;\r\n \r\n if (itemData.type == \"injury\" && itemData.img == 'icons/svg/item-bag.svg') { \r\n itemData.img = 'systems/vagabonds/assets/cut-palm.svg'\r\n } else if(itemData.type == \"item\" && itemData.img == 'icons/svg/item-bag.svg') { \r\n itemData.img = 'systems/vagabonds/assets/swap-bag.svg'\r\n } else if(itemData.type == \"technique\" && itemData.img == 'icons/svg/item-bag.svg') { \r\n itemData.img = 'systems/vagabonds/assets/swords-emblem.svg'\r\n } \r\n\r\n //console.log(itemData);\r\n }\r\n\r\n async _preCreate(data, options, user) {\r\n await super._preCreate(data, options, user);\r\n this.updateSource({ sort: Date.now() });\r\n }\r\n\r\n}", "/**\r\n * Extend the basic ItemSheet with some very simple modifications\r\n * @extends {ItemSheet}\r\n */\r\nexport class VagabondsItemSheet extends ItemSheet {\r\n\r\n /** @override */\r\n static get defaultOptions() {\r\n return foundry.utils.mergeObject(super.defaultOptions, {\r\n classes: [\"vagabonds\", \"sheet\", \"item\"],\r\n width: 520,\r\n height: 480,\r\n tabs: [{ navSelector: \".sheet-tabs\", contentSelector: \".sheet-body\", initial: \"description\" }]\r\n });\r\n }\r\n\r\n /** @override */\r\n get template() {\r\n const path = \"systems/vagabonds/templates/item\";\r\n // Return a single sheet for all item types.\r\n return `${path}/item-sheet.html`;\r\n // Alternatively, you could use the following return statement to do a\r\n // unique item sheet by type, like `weapon-sheet.html`.\r\n\r\n // return `${path}/${this.item.data.type}-sheet.html`;\r\n }\r\n\r\n /* -------------------------------------------- */\r\n\r\n /** @override */\r\n async getData() {\r\n const data = super.getData();\r\n data.enrichedDescription = await TextEditor.enrichHTML(this.object.system.description, {async: true});\r\n return data;\r\n }\r\n\r\n /* -------------------------------------------- */\r\n\r\n /** @override */\r\n setPosition(options = {}) {\r\n const position = super.setPosition(options);\r\n const sheetBody = this.element.find(\".sheet-body\");\r\n const bodyHeight = position.height - 192;\r\n sheetBody.css(\"height\", bodyHeight);\r\n return position;\r\n }\r\n\r\n /* -------------------------------------------- */\r\n\r\n /** @override */\r\n activateListeners(html) {\r\n super.activateListeners(html);\r\n\r\n // Everything below here is only needed if the sheet is editable\r\n if (!this.options.editable) return;\r\n\r\n // Roll handlers, click handlers, etc. would go here.\r\n }\r\n}\r\n", "// Bind event to d20 icon\r\n\r\n\r\nexport class RollHelper {\r\n static async displayRollModal(defend) {\r\n defend = (typeof defend !== 'undefined') ? defend : \"\";\r\n if (defend == true) { defend = \"checked\";}\r\n let confirmed = false;\r\n // Add modifier for a d20 roll\r\n new Dialog({\r\n title: \"Roll + Apptitude\",\r\n content: `\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n Yes\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n `,\r\n buttons: {\r\n one: {\r\n icon: '',\r\n label: \"Roll!\",\r\n callback: () => confirmed = true\r\n },\r\n two: {\r\n icon: '',\r\n label: \"Cancel\",\r\n callback: () => confirmed = false\r\n }\r\n },\r\n default: \"Cancel\",\r\n close: html => {\r\n if (confirmed) {\r\n let rollModifier = parseInt(html.find('[name=modifier-value]')[0].value);\r\n let rollisDefense= html.find(`[name=rolltype-defense]`).is(\":checked\");\r\n let rollType =html.find('[name=roll-adv]')[0].value;\r\n //let token = canvas.tokens.controlled;\r\n let actor = game.user.character ?? canvas.tokens.controlled[0]?.actor ?? game.actors.find(a => a.owner);\r\n\r\n //console.log(token);\r\n if (actor == undefined) {\r\n ui.notifications.error(\"You must select a token to roll\");\r\n return\r\n }\r\n let roll;\r\n let RollTemplate;\r\n let baseRoll = \"2d6\";\r\n console.log(rollType);\r\n if (rollType == \"adv\") baseRoll = \"3d6kh2\"\r\n if (rollType == \"dis\") baseRoll = \"3d6kl2\"\r\n\r\n if (rollModifier >= 0) { \r\n\r\n roll = new Roll(baseRoll + \" +\" + rollModifier, actor);\r\n } else {\r\n roll = new Roll(baseRoll + rollModifier, actor);\r\n\r\n }\r\n roll.evaluate( ).then(\r\n function(result) {\r\n //console.log(result); // \"Stuff worked!\"\r\n //Set Roll Type\r\n let RollResult;\r\n if (rollisDefense == true) {\r\n //Making a defense roll\r\n RollResult = {type: \"defend\", high: \"0\", low:\"0\", damage:\"No\", outcome:\" Outright success\", roll: roll };\r\n if (result.terms[0].results[0].result > result.terms[0].results[1].result) {\r\n RollResult.high = result.terms[0].results[0].result;\r\n RollResult.low = result.terms[0].results[1].result;\r\n } else {\r\n RollResult.low = result.terms[0].results[0].result;\r\n RollResult.high = result.terms[0].results[1].result;\r\n }\r\n\r\n if (result._total < 7) {\r\n RollResult.outcome = \"Failure\";\r\n RollResult.damage = (RollResult.high - result.data.system.armor.value);\r\n } else if (result._total < 10) {\r\n RollResult.outcome = \"Partial Success\";\r\n RollResult.damage = (RollResult.low - result.data.system.armor.value)\r\n } \r\n\r\n if (RollResult.damage < 0) { RollResult.damage = 0; }\r\n \r\n let template = 'systems/vagabonds/templates/chat/rolls.html';\r\n RollTemplate = renderTemplate(template, RollResult).then(content => {\r\n result.toMessage({\r\n user: game.user.id,\r\n speaker: ChatMessage.getSpeaker({actor: result.data}),\r\n flavor: content,\r\n });\r\n });\r\n\r\n } else {\r\n //Normal Roll\r\n RollResult = {type: \"action\", outcome:\"Complete Success\", apptitude: rollModifier, roll: result };\r\n if (result._total < 7) {\r\n RollResult.outcome = \"Failure\";\r\n } else if (result._total < 10) {\r\n RollResult.outcome = \"Partial Success\";\r\n } else if (result._total > 12) {\r\n RollResult.outcome = \"Critical Success\";\r\n }\r\n let template = 'systems/vagabonds/templates/chat/rolls.html';\r\n RollTemplate = renderTemplate(template, RollResult).then(content => {\r\n result.toMessage({\r\n speaker: ChatMessage.getSpeaker({ }),//actor: this.actor }),\r\n flavor: content,\r\n });\r\n });\r\n \r\n }\r\n }\r\n );\r\n }\r\n }\r\n }).render(true);\r\n }\r\n\r\n} ", "// Import Modules\r\nimport { VagabondsActor } from \"./actor/actor.js\";\r\nimport { VagabondsActorSheet } from \"./actor/actor-sheet.js\";\r\nimport { VagabondsNPCSheet } from \"./actor/npc-sheet.js\";\r\nimport { VagabondsItem } from \"./item/item.js\";\r\nimport { VagabondsItemSheet } from \"./item/item-sheet.js\";\r\nimport { RollHelper } from \"./helper/roll_helper.js\";\r\n\r\nHooks.once('init', async function() {\r\n\r\n game.vagabonds = {\r\n VagabondsActor,\r\n VagabondsItem,\r\n RollHelper\r\n };\r\n\r\n /**\r\n * Set an initiative formula for the system\r\n * @type {String}\r\n */\r\n CONFIG.Combat.initiative = {\r\n formula: \"@speed.value\",\r\n decimals: 2\r\n };\r\n\r\n // Define custom Entity classes\r\n CONFIG.Actor.documentClass = VagabondsActor;\r\n CONFIG.Item.documentClass = VagabondsItem;\r\n\r\n //foundry.data.ItemData.DEFAULT_ICON = \"icons/containers/bags/pack-leather-brown.webp\";\r\n\r\n // Register sheet application classes\r\n Actors.unregisterSheet(\"core\", ActorSheet);\r\n\r\n Actors.registerSheet(\"vagabonds\", VagabondsNPCSheet, { types: [\"npc\"], makeDefault: true });\r\n Actors.registerSheet(\"vagabonds\", VagabondsActorSheet, { types: [\"character\"],makeDefault: true });\r\n \r\n Items.unregisterSheet(\"core\", ItemSheet);\r\n Items.registerSheet(\"vagabonds\", VagabondsItemSheet, { makeDefault: true });\r\n\r\n // If you need to add Handlebars helpers, here are a few useful examples:\r\n Handlebars.registerHelper('concat', function() {\r\n var outStr = '';\r\n for (var arg in arguments) {\r\n if (typeof arguments[arg] != 'object') {\r\n outStr += arguments[arg];\r\n }\r\n }\r\n return outStr;\r\n });\r\n\r\n Handlebars.registerHelper('toLowerCase', function(str) {\r\n return str.toLowerCase();\r\n });\r\n\r\n Handlebars.registerHelper('ifCond', function (v1, operator, v2, options) {\r\n\r\n switch (operator) {\r\n case '==':\r\n return (v1 == v2) ? options.fn(this) : options.inverse(this);\r\n case '===':\r\n return (v1 === v2) ? options.fn(this) : options.inverse(this);\r\n case '!=':\r\n return (v1 != v2) ? options.fn(this) : options.inverse(this);\r\n case '!==':\r\n return (v1 !== v2) ? options.fn(this) : options.inverse(this);\r\n case '<':\r\n return (v1 < v2) ? options.fn(this) : options.inverse(this);\r\n case '<=':\r\n return (v1 <= v2) ? options.fn(this) : options.inverse(this);\r\n case '>':\r\n return (v1 > v2) ? options.fn(this) : options.inverse(this);\r\n case '>=':\r\n return (v1 >= v2) ? options.fn(this) : options.inverse(this);\r\n case '&&':\r\n return (v1 && v2) ? options.fn(this) : options.inverse(this);\r\n case '||':\r\n return (v1 || v2) ? options.fn(this) : options.inverse(this);\r\n default:\r\n return options.inverse(this);\r\n }\r\n });\r\n \r\n\r\n});\r\n\r\nHooks.on(\"renderSidebarTab\", (app, html, data) => {\r\n html.find(\".chat-control-icon\").click(async (event) => {\r\n RollHelper.displayRollModal();\r\n });\r\n});"], - "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIO,mCAA6B,MAAM;AAAA,EAKxC,cAAc;AACZ,UAAM;A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;AACrD,eAAW;AAAA;AAAA;", + "sources": ["../module/actor/actor.js", "../node_modules/svelte/internal/index.mjs", "../node_modules/svelte/store/index.mjs", "../module/svelte/VagabondsActorSheetHeader.svelte", "../module/svelte/VagabondsActorSheetBodyLeft.svelte", "../node_modules/svelte/easing/index.mjs", "../node_modules/svelte/transition/index.mjs", "../module/svelte/VagabondsLinage.svelte", "../module/svelte/VagabondsGear.svelte", "../module/svelte/VagabondsTechnique.svelte", "../module/svelte/VagabondsInjury.svelte", "../module/svelte/VagabondsActorSheetBodyRight.svelte", "../module/svelte/VagabondsActorSheetBase.svelte", "../module/actor/actor-sheet.js", "../module/actor/npc-sheet.js", "../module/item/item.js", "../module/item/item-sheet.js", "../module/helper/roll_helper.js", "../module/data-models.js", "../module/vagabonds.js"], + "sourcesContent": ["/**\r\n * Extend the base Actor entity by defining a custom roll data structure which is ideal for the Simple system.\r\n * @extends {Actor}\r\n */\r\nexport class VagabondsActor extends Actor {\r\n\r\n /**\r\n * Augment the basic actor data with additional dynamic data.\r\n */\r\n prepareData() {\r\n super.prepareData();\r\n\r\n\r\n const actorData = this;\r\n\r\n //const data = actorData.data;\r\n //const flags = actorData.flags;\r\n\r\n // Make separate methods for each Actor type (character, npc, etc.) to keep\r\n // things organized.\r\n if (this.type === 'character') this._prepareCharacterData(actorData);\r\n //if (actorData.type === 'npc') this._prepareCharacterData(actorData);\r\n }\r\n\r\n /**\r\n * Prepare Character type specific data\r\n */\r\n _prepareCharacterData(actorData) {\r\n //const data = actorData.data;\r\n // Make modifications to data here. For example:\r\n return actorData\r\n }\r\n\r\n async _preUpdate(changed, options, user) {\r\n if ( (await super._preUpdate(changed, options, user)) === false ) return false;\r\n \r\n if ( \"health\" in (this.system || {}) ) {\r\n foundry.utils.setProperty(options, \"vagabonds.health\", { ...this.system.health }); \r\n }\r\n }\r\n\r\n async _onUpdate(data, options, userId) {\r\n super._onUpdate(data, options, userId);\r\n\r\n const curr =this.system.health.value;\r\n const hp = options.vagabonds?.health; \r\n\r\n if (hp) { \r\n const changes = {\r\n hp: curr - hp.value,\r\n }; \r\n changes.total = changes.hp;\r\n \r\n this._displayTokenEffect(changes);\r\n \r\n // const isDead = this.system.health.value <= 0;\r\n // if (isDead) { \r\n // this._displayTokenMessage('Dead', CONFIG.Vagabonds.tokenHPColors['damage'] )\r\n // }\r\n }\r\n }\r\n\r\n _displayTokenMessage(message, fill) { \r\n const tokens = this.isToken ? [this.token] : this.getActiveTokens(true, true);\r\n if ( !tokens.length ) return;\r\n\r\n for ( const token of tokens ) {\r\n if ( !token.object?.visible || !token.object?.renderable ) continue;\r\n const t = token.object;\r\n canvas.interface.createScrollingText(t.center, message, {\r\n anchor: CONST.TEXT_ANCHOR_POINTS.TOP,\r\n // Adapt the font size relative to the Actor's HP total to emphasize more significant blows\r\n fontSize: 48, // Range between [16, 48]\r\n fill: fill,\r\n stroke: 0x000000,\r\n strokeThickness: 4,\r\n jitter: 0.25\r\n });\r\n }\r\n\r\n \r\n}\r\n\r\n _displayTokenEffect(changes) {\r\n let key;\r\n let value;\r\n if ( changes.hp < 0 ) {\r\n key = \"damage\";\r\n value = changes.total;\r\n } else if ( changes.hp > 0 ) {\r\n key = \"healing\";\r\n value = changes.total;\r\n }\r\n\r\n if ( !key || !value ) return;\r\n\r\n const tokens = this.isToken ? [this.token] : this.getActiveTokens(true, true);\r\n if ( !tokens.length ) return;\r\n\r\n const pct = Math.clamp(Math.abs(value) / this.system.health.max, 0, 1);\r\n const fill = CONFIG.Vagabonds.tokenHPColors[key];\r\n\r\n for ( const token of tokens ) {\r\n if ( !token.object?.visible || !token.object?.renderable ) continue;\r\n const t = token.object;\r\n canvas.interface.createScrollingText(t.center, value.signedString(), {\r\n anchor: CONST.TEXT_ANCHOR_POINTS.TOP,\r\n // Adapt the font size relative to the Actor's HP total to emphasize more significant blows\r\n fontSize: 16 + (32 * pct), // Range between [16, 48]\r\n fill: fill,\r\n stroke: 0x000000,\r\n strokeThickness: 4,\r\n jitter: 0.25\r\n });\r\n }\r\n }\r\n\r\n\r\n}", "function noop() { }\nconst identity = x => x;\nfunction assign(tar, src) {\n // @ts-ignore\n for (const k in src)\n tar[k] = src[k];\n return tar;\n}\nfunction is_promise(value) {\n return value && typeof value === 'object' && typeof value.then === 'function';\n}\nfunction add_location(element, file, line, column, char) {\n element.__svelte_meta = {\n loc: { file, line, column, char }\n };\n}\nfunction run(fn) {\n return fn();\n}\nfunction blank_object() {\n return Object.create(null);\n}\nfunction run_all(fns) {\n fns.forEach(run);\n}\nfunction is_function(thing) {\n return typeof thing === 'function';\n}\nfunction safe_not_equal(a, b) {\n return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');\n}\nlet src_url_equal_anchor;\nfunction src_url_equal(element_src, url) {\n if (!src_url_equal_anchor) {\n src_url_equal_anchor = document.createElement('a');\n }\n src_url_equal_anchor.href = url;\n return element_src === src_url_equal_anchor.href;\n}\nfunction not_equal(a, b) {\n return a != a ? b == b : a !== b;\n}\nfunction is_empty(obj) {\n return Object.keys(obj).length === 0;\n}\nfunction validate_store(store, name) {\n if (store != null && typeof store.subscribe !== 'function') {\n throw new Error(`'${name}' is not a store with a 'subscribe' method`);\n }\n}\nfunction subscribe(store, ...callbacks) {\n if (store == null) {\n return noop;\n }\n const unsub = store.subscribe(...callbacks);\n return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub;\n}\nfunction get_store_value(store) {\n let value;\n subscribe(store, _ => value = _)();\n return value;\n}\nfunction component_subscribe(component, store, callback) {\n component.$$.on_destroy.push(subscribe(store, callback));\n}\nfunction create_slot(definition, ctx, $$scope, fn) {\n if (definition) {\n const slot_ctx = get_slot_context(definition, ctx, $$scope, fn);\n return definition[0](slot_ctx);\n }\n}\nfunction get_slot_context(definition, ctx, $$scope, fn) {\n return definition[1] && fn\n ? assign($$scope.ctx.slice(), definition[1](fn(ctx)))\n : $$scope.ctx;\n}\nfunction get_slot_changes(definition, $$scope, dirty, fn) {\n if (definition[2] && fn) {\n const lets = definition[2](fn(dirty));\n if ($$scope.dirty === undefined) {\n return lets;\n }\n if (typeof lets === 'object') {\n const merged = [];\n const len = Math.max($$scope.dirty.length, lets.length);\n for (let i = 0; i < len; i += 1) {\n merged[i] = $$scope.dirty[i] | lets[i];\n }\n return merged;\n }\n return $$scope.dirty | lets;\n }\n return $$scope.dirty;\n}\nfunction update_slot_base(slot, slot_definition, ctx, $$scope, slot_changes, get_slot_context_fn) {\n if (slot_changes) {\n const slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn);\n slot.p(slot_context, slot_changes);\n }\n}\nfunction update_slot(slot, slot_definition, ctx, $$scope, dirty, get_slot_changes_fn, get_slot_context_fn) {\n const slot_changes = get_slot_changes(slot_definition, $$scope, dirty, get_slot_changes_fn);\n update_slot_base(slot, slot_definition, ctx, $$scope, slot_changes, get_slot_context_fn);\n}\nfunction get_all_dirty_from_scope($$scope) {\n if ($$scope.ctx.length > 32) {\n const dirty = [];\n const length = $$scope.ctx.length / 32;\n for (let i = 0; i < length; i++) {\n dirty[i] = -1;\n }\n return dirty;\n }\n return -1;\n}\nfunction exclude_internal_props(props) {\n const result = {};\n for (const k in props)\n if (k[0] !== '$')\n result[k] = props[k];\n return result;\n}\nfunction compute_rest_props(props, keys) {\n const rest = {};\n keys = new Set(keys);\n for (const k in props)\n if (!keys.has(k) && k[0] !== '$')\n rest[k] = props[k];\n return rest;\n}\nfunction compute_slots(slots) {\n const result = {};\n for (const key in slots) {\n result[key] = true;\n }\n return result;\n}\nfunction once(fn) {\n let ran = false;\n return function (...args) {\n if (ran)\n return;\n ran = true;\n fn.call(this, ...args);\n };\n}\nfunction null_to_empty(value) {\n return value == null ? '' : value;\n}\nfunction set_store_value(store, ret, value) {\n store.set(value);\n return ret;\n}\nconst has_prop = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);\nfunction action_destroyer(action_result) {\n return action_result && is_function(action_result.destroy) ? action_result.destroy : noop;\n}\n\nconst is_client = typeof window !== 'undefined';\nlet now = is_client\n ? () => window.performance.now()\n : () => Date.now();\nlet raf = is_client ? cb => requestAnimationFrame(cb) : noop;\n// used internally for testing\nfunction set_now(fn) {\n now = fn;\n}\nfunction set_raf(fn) {\n raf = fn;\n}\n\nconst tasks = new Set();\nfunction run_tasks(now) {\n tasks.forEach(task => {\n if (!task.c(now)) {\n tasks.delete(task);\n task.f();\n }\n });\n if (tasks.size !== 0)\n raf(run_tasks);\n}\n/**\n * For testing purposes only!\n */\nfunction clear_loops() {\n tasks.clear();\n}\n/**\n * Creates a new task that runs on each raf frame\n * until it returns a falsy value or is aborted\n */\nfunction loop(callback) {\n let task;\n if (tasks.size === 0)\n raf(run_tasks);\n return {\n promise: new Promise(fulfill => {\n tasks.add(task = { c: callback, f: fulfill });\n }),\n abort() {\n tasks.delete(task);\n }\n };\n}\n\n// Track which nodes are claimed during hydration. Unclaimed nodes can then be removed from the DOM\n// at the end of hydration without touching the remaining nodes.\nlet is_hydrating = false;\nfunction start_hydrating() {\n is_hydrating = true;\n}\nfunction end_hydrating() {\n is_hydrating = false;\n}\nfunction upper_bound(low, high, key, value) {\n // Return first index of value larger than input value in the range [low, high)\n while (low < high) {\n const mid = low + ((high - low) >> 1);\n if (key(mid) <= value) {\n low = mid + 1;\n }\n else {\n high = mid;\n }\n }\n return low;\n}\nfunction init_hydrate(target) {\n if (target.hydrate_init)\n return;\n target.hydrate_init = true;\n // We know that all children have claim_order values since the unclaimed have been detached if target is not \n let children = target.childNodes;\n // If target is , there may be children without claim_order\n if (target.nodeName === 'HEAD') {\n const myChildren = [];\n for (let i = 0; i < children.length; i++) {\n const node = children[i];\n if (node.claim_order !== undefined) {\n myChildren.push(node);\n }\n }\n children = myChildren;\n }\n /*\n * Reorder claimed children optimally.\n * We can reorder claimed children optimally by finding the longest subsequence of\n * nodes that are already claimed in order and only moving the rest. The longest\n * subsequence subsequence of nodes that are claimed in order can be found by\n * computing the longest increasing subsequence of .claim_order values.\n *\n * This algorithm is optimal in generating the least amount of reorder operations\n * possible.\n *\n * Proof:\n * We know that, given a set of reordering operations, the nodes that do not move\n * always form an increasing subsequence, since they do not move among each other\n * meaning that they must be already ordered among each other. Thus, the maximal\n * set of nodes that do not move form a longest increasing subsequence.\n */\n // Compute longest increasing subsequence\n // m: subsequence length j => index k of smallest value that ends an increasing subsequence of length j\n const m = new Int32Array(children.length + 1);\n // Predecessor indices + 1\n const p = new Int32Array(children.length);\n m[0] = -1;\n let longest = 0;\n for (let i = 0; i < children.length; i++) {\n const current = children[i].claim_order;\n // Find the largest subsequence length such that it ends in a value less than our current value\n // upper_bound returns first greater value, so we subtract one\n // with fast path for when we are on the current longest subsequence\n const seqLen = ((longest > 0 && children[m[longest]].claim_order <= current) ? longest + 1 : upper_bound(1, longest, idx => children[m[idx]].claim_order, current)) - 1;\n p[i] = m[seqLen] + 1;\n const newLen = seqLen + 1;\n // We can guarantee that current is the smallest value. Otherwise, we would have generated a longer sequence.\n m[newLen] = i;\n longest = Math.max(newLen, longest);\n }\n // The longest increasing subsequence of nodes (initially reversed)\n const lis = [];\n // The rest of the nodes, nodes that will be moved\n const toMove = [];\n let last = children.length - 1;\n for (let cur = m[longest] + 1; cur != 0; cur = p[cur - 1]) {\n lis.push(children[cur - 1]);\n for (; last >= cur; last--) {\n toMove.push(children[last]);\n }\n last--;\n }\n for (; last >= 0; last--) {\n toMove.push(children[last]);\n }\n lis.reverse();\n // We sort the nodes being moved to guarantee that their insertion order matches the claim order\n toMove.sort((a, b) => a.claim_order - b.claim_order);\n // Finally, we move the nodes\n for (let i = 0, j = 0; i < toMove.length; i++) {\n while (j < lis.length && toMove[i].claim_order >= lis[j].claim_order) {\n j++;\n }\n const anchor = j < lis.length ? lis[j] : null;\n target.insertBefore(toMove[i], anchor);\n }\n}\nfunction append(target, node) {\n target.appendChild(node);\n}\nfunction append_styles(target, style_sheet_id, styles) {\n const append_styles_to = get_root_for_style(target);\n if (!append_styles_to.getElementById(style_sheet_id)) {\n const style = element('style');\n style.id = style_sheet_id;\n style.textContent = styles;\n append_stylesheet(append_styles_to, style);\n }\n}\nfunction get_root_for_style(node) {\n if (!node)\n return document;\n const root = node.getRootNode ? node.getRootNode() : node.ownerDocument;\n if (root && root.host) {\n return root;\n }\n return node.ownerDocument;\n}\nfunction append_empty_stylesheet(node) {\n const style_element = element('style');\n append_stylesheet(get_root_for_style(node), style_element);\n return style_element.sheet;\n}\nfunction append_stylesheet(node, style) {\n append(node.head || node, style);\n return style.sheet;\n}\nfunction append_hydration(target, node) {\n if (is_hydrating) {\n init_hydrate(target);\n if ((target.actual_end_child === undefined) || ((target.actual_end_child !== null) && (target.actual_end_child.parentNode !== target))) {\n target.actual_end_child = target.firstChild;\n }\n // Skip nodes of undefined ordering\n while ((target.actual_end_child !== null) && (target.actual_end_child.claim_order === undefined)) {\n target.actual_end_child = target.actual_end_child.nextSibling;\n }\n if (node !== target.actual_end_child) {\n // We only insert if the ordering of this node should be modified or the parent node is not target\n if (node.claim_order !== undefined || node.parentNode !== target) {\n target.insertBefore(node, target.actual_end_child);\n }\n }\n else {\n target.actual_end_child = node.nextSibling;\n }\n }\n else if (node.parentNode !== target || node.nextSibling !== null) {\n target.appendChild(node);\n }\n}\nfunction insert(target, node, anchor) {\n target.insertBefore(node, anchor || null);\n}\nfunction insert_hydration(target, node, anchor) {\n if (is_hydrating && !anchor) {\n append_hydration(target, node);\n }\n else if (node.parentNode !== target || node.nextSibling != anchor) {\n target.insertBefore(node, anchor || null);\n }\n}\nfunction detach(node) {\n node.parentNode.removeChild(node);\n}\nfunction destroy_each(iterations, detaching) {\n for (let i = 0; i < iterations.length; i += 1) {\n if (iterations[i])\n iterations[i].d(detaching);\n }\n}\nfunction element(name) {\n return document.createElement(name);\n}\nfunction element_is(name, is) {\n return document.createElement(name, { is });\n}\nfunction object_without_properties(obj, exclude) {\n const target = {};\n for (const k in obj) {\n if (has_prop(obj, k)\n // @ts-ignore\n && exclude.indexOf(k) === -1) {\n // @ts-ignore\n target[k] = obj[k];\n }\n }\n return target;\n}\nfunction svg_element(name) {\n return document.createElementNS('http://www.w3.org/2000/svg', name);\n}\nfunction text(data) {\n return document.createTextNode(data);\n}\nfunction space() {\n return text(' ');\n}\nfunction empty() {\n return text('');\n}\nfunction listen(node, event, handler, options) {\n node.addEventListener(event, handler, options);\n return () => node.removeEventListener(event, handler, options);\n}\nfunction prevent_default(fn) {\n return function (event) {\n event.preventDefault();\n // @ts-ignore\n return fn.call(this, event);\n };\n}\nfunction stop_propagation(fn) {\n return function (event) {\n event.stopPropagation();\n // @ts-ignore\n return fn.call(this, event);\n };\n}\nfunction self(fn) {\n return function (event) {\n // @ts-ignore\n if (event.target === this)\n fn.call(this, event);\n };\n}\nfunction trusted(fn) {\n return function (event) {\n // @ts-ignore\n if (event.isTrusted)\n fn.call(this, event);\n };\n}\nfunction attr(node, attribute, value) {\n if (value == null)\n node.removeAttribute(attribute);\n else if (node.getAttribute(attribute) !== value)\n node.setAttribute(attribute, value);\n}\nfunction set_attributes(node, attributes) {\n // @ts-ignore\n const descriptors = Object.getOwnPropertyDescriptors(node.__proto__);\n for (const key in attributes) {\n if (attributes[key] == null) {\n node.removeAttribute(key);\n }\n else if (key === 'style') {\n node.style.cssText = attributes[key];\n }\n else if (key === '__value') {\n node.value = node[key] = attributes[key];\n }\n else if (descriptors[key] && descriptors[key].set) {\n node[key] = attributes[key];\n }\n else {\n attr(node, key, attributes[key]);\n }\n }\n}\nfunction set_svg_attributes(node, attributes) {\n for (const key in attributes) {\n attr(node, key, attributes[key]);\n }\n}\nfunction set_custom_element_data_map(node, data_map) {\n Object.keys(data_map).forEach((key) => {\n set_custom_element_data(node, key, data_map[key]);\n });\n}\nfunction set_custom_element_data(node, prop, value) {\n if (prop in node) {\n node[prop] = typeof node[prop] === 'boolean' && value === '' ? true : value;\n }\n else {\n attr(node, prop, value);\n }\n}\nfunction xlink_attr(node, attribute, value) {\n node.setAttributeNS('http://www.w3.org/1999/xlink', attribute, value);\n}\nfunction get_binding_group_value(group, __value, checked) {\n const value = new Set();\n for (let i = 0; i < group.length; i += 1) {\n if (group[i].checked)\n value.add(group[i].__value);\n }\n if (!checked) {\n value.delete(__value);\n }\n return Array.from(value);\n}\nfunction to_number(value) {\n return value === '' ? null : +value;\n}\nfunction time_ranges_to_array(ranges) {\n const array = [];\n for (let i = 0; i < ranges.length; i += 1) {\n array.push({ start: ranges.start(i), end: ranges.end(i) });\n }\n return array;\n}\nfunction children(element) {\n return Array.from(element.childNodes);\n}\nfunction init_claim_info(nodes) {\n if (nodes.claim_info === undefined) {\n nodes.claim_info = { last_index: 0, total_claimed: 0 };\n }\n}\nfunction claim_node(nodes, predicate, processNode, createNode, dontUpdateLastIndex = false) {\n // Try to find nodes in an order such that we lengthen the longest increasing subsequence\n init_claim_info(nodes);\n const resultNode = (() => {\n // We first try to find an element after the previous one\n for (let i = nodes.claim_info.last_index; i < nodes.length; i++) {\n const node = nodes[i];\n if (predicate(node)) {\n const replacement = processNode(node);\n if (replacement === undefined) {\n nodes.splice(i, 1);\n }\n else {\n nodes[i] = replacement;\n }\n if (!dontUpdateLastIndex) {\n nodes.claim_info.last_index = i;\n }\n return node;\n }\n }\n // Otherwise, we try to find one before\n // We iterate in reverse so that we don't go too far back\n for (let i = nodes.claim_info.last_index - 1; i >= 0; i--) {\n const node = nodes[i];\n if (predicate(node)) {\n const replacement = processNode(node);\n if (replacement === undefined) {\n nodes.splice(i, 1);\n }\n else {\n nodes[i] = replacement;\n }\n if (!dontUpdateLastIndex) {\n nodes.claim_info.last_index = i;\n }\n else if (replacement === undefined) {\n // Since we spliced before the last_index, we decrease it\n nodes.claim_info.last_index--;\n }\n return node;\n }\n }\n // If we can't find any matching node, we create a new one\n return createNode();\n })();\n resultNode.claim_order = nodes.claim_info.total_claimed;\n nodes.claim_info.total_claimed += 1;\n return resultNode;\n}\nfunction claim_element_base(nodes, name, attributes, create_element) {\n return claim_node(nodes, (node) => node.nodeName === name, (node) => {\n const remove = [];\n for (let j = 0; j < node.attributes.length; j++) {\n const attribute = node.attributes[j];\n if (!attributes[attribute.name]) {\n remove.push(attribute.name);\n }\n }\n remove.forEach(v => node.removeAttribute(v));\n return undefined;\n }, () => create_element(name));\n}\nfunction claim_element(nodes, name, attributes) {\n return claim_element_base(nodes, name, attributes, element);\n}\nfunction claim_svg_element(nodes, name, attributes) {\n return claim_element_base(nodes, name, attributes, svg_element);\n}\nfunction claim_text(nodes, data) {\n return claim_node(nodes, (node) => node.nodeType === 3, (node) => {\n const dataStr = '' + data;\n if (node.data.startsWith(dataStr)) {\n if (node.data.length !== dataStr.length) {\n return node.splitText(dataStr.length);\n }\n }\n else {\n node.data = dataStr;\n }\n }, () => text(data), true // Text nodes should not update last index since it is likely not worth it to eliminate an increasing subsequence of actual elements\n );\n}\nfunction claim_space(nodes) {\n return claim_text(nodes, ' ');\n}\nfunction find_comment(nodes, text, start) {\n for (let i = start; i < nodes.length; i += 1) {\n const node = nodes[i];\n if (node.nodeType === 8 /* comment node */ && node.textContent.trim() === text) {\n return i;\n }\n }\n return nodes.length;\n}\nfunction claim_html_tag(nodes, is_svg) {\n // find html opening tag\n const start_index = find_comment(nodes, 'HTML_TAG_START', 0);\n const end_index = find_comment(nodes, 'HTML_TAG_END', start_index);\n if (start_index === end_index) {\n return new HtmlTagHydration(undefined, is_svg);\n }\n init_claim_info(nodes);\n const html_tag_nodes = nodes.splice(start_index, end_index - start_index + 1);\n detach(html_tag_nodes[0]);\n detach(html_tag_nodes[html_tag_nodes.length - 1]);\n const claimed_nodes = html_tag_nodes.slice(1, html_tag_nodes.length - 1);\n for (const n of claimed_nodes) {\n n.claim_order = nodes.claim_info.total_claimed;\n nodes.claim_info.total_claimed += 1;\n }\n return new HtmlTagHydration(claimed_nodes, is_svg);\n}\nfunction set_data(text, data) {\n data = '' + data;\n if (text.wholeText !== data)\n text.data = data;\n}\nfunction set_input_value(input, value) {\n input.value = value == null ? '' : value;\n}\nfunction set_input_type(input, type) {\n try {\n input.type = type;\n }\n catch (e) {\n // do nothing\n }\n}\nfunction set_style(node, key, value, important) {\n if (value === null) {\n node.style.removeProperty(key);\n }\n else {\n node.style.setProperty(key, value, important ? 'important' : '');\n }\n}\nfunction select_option(select, value) {\n for (let i = 0; i < select.options.length; i += 1) {\n const option = select.options[i];\n if (option.__value === value) {\n option.selected = true;\n return;\n }\n }\n select.selectedIndex = -1; // no option should be selected\n}\nfunction select_options(select, value) {\n for (let i = 0; i < select.options.length; i += 1) {\n const option = select.options[i];\n option.selected = ~value.indexOf(option.__value);\n }\n}\nfunction select_value(select) {\n const selected_option = select.querySelector(':checked') || select.options[0];\n return selected_option && selected_option.__value;\n}\nfunction select_multiple_value(select) {\n return [].map.call(select.querySelectorAll(':checked'), option => option.__value);\n}\n// unfortunately this can't be a constant as that wouldn't be tree-shakeable\n// so we cache the result instead\nlet crossorigin;\nfunction is_crossorigin() {\n if (crossorigin === undefined) {\n crossorigin = false;\n try {\n if (typeof window !== 'undefined' && window.parent) {\n void window.parent.document;\n }\n }\n catch (error) {\n crossorigin = true;\n }\n }\n return crossorigin;\n}\nfunction add_resize_listener(node, fn) {\n const computed_style = getComputedStyle(node);\n if (computed_style.position === 'static') {\n node.style.position = 'relative';\n }\n const iframe = element('iframe');\n iframe.setAttribute('style', 'display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; ' +\n 'overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;');\n iframe.setAttribute('aria-hidden', 'true');\n iframe.tabIndex = -1;\n const crossorigin = is_crossorigin();\n let unsubscribe;\n if (crossorigin) {\n iframe.src = \"data:text/html,\";\n unsubscribe = listen(window, 'message', (event) => {\n if (event.source === iframe.contentWindow)\n fn();\n });\n }\n else {\n iframe.src = 'about:blank';\n iframe.onload = () => {\n unsubscribe = listen(iframe.contentWindow, 'resize', fn);\n };\n }\n append(node, iframe);\n return () => {\n if (crossorigin) {\n unsubscribe();\n }\n else if (unsubscribe && iframe.contentWindow) {\n unsubscribe();\n }\n detach(iframe);\n };\n}\nfunction toggle_class(element, name, toggle) {\n element.classList[toggle ? 'add' : 'remove'](name);\n}\nfunction custom_event(type, detail, { bubbles = false, cancelable = false } = {}) {\n const e = document.createEvent('CustomEvent');\n e.initCustomEvent(type, bubbles, cancelable, detail);\n return e;\n}\nfunction query_selector_all(selector, parent = document.body) {\n return Array.from(parent.querySelectorAll(selector));\n}\nfunction head_selector(nodeId, head) {\n const result = [];\n let started = 0;\n for (const node of head.childNodes) {\n if (node.nodeType === 8 /* comment node */) {\n const comment = node.textContent.trim();\n if (comment === `HEAD_${nodeId}_END`) {\n started -= 1;\n result.push(node);\n }\n else if (comment === `HEAD_${nodeId}_START`) {\n started += 1;\n result.push(node);\n }\n }\n else if (started > 0) {\n result.push(node);\n }\n }\n return result;\n}\nclass HtmlTag {\n constructor(is_svg = false) {\n this.is_svg = false;\n this.is_svg = is_svg;\n this.e = this.n = null;\n }\n c(html) {\n this.h(html);\n }\n m(html, target, anchor = null) {\n if (!this.e) {\n if (this.is_svg)\n this.e = svg_element(target.nodeName);\n else\n this.e = element(target.nodeName);\n this.t = target;\n this.c(html);\n }\n this.i(anchor);\n }\n h(html) {\n this.e.innerHTML = html;\n this.n = Array.from(this.e.childNodes);\n }\n i(anchor) {\n for (let i = 0; i < this.n.length; i += 1) {\n insert(this.t, this.n[i], anchor);\n }\n }\n p(html) {\n this.d();\n this.h(html);\n this.i(this.a);\n }\n d() {\n this.n.forEach(detach);\n }\n}\nclass HtmlTagHydration extends HtmlTag {\n constructor(claimed_nodes, is_svg = false) {\n super(is_svg);\n this.e = this.n = null;\n this.l = claimed_nodes;\n }\n c(html) {\n if (this.l) {\n this.n = this.l;\n }\n else {\n super.c(html);\n }\n }\n i(anchor) {\n for (let i = 0; i < this.n.length; i += 1) {\n insert_hydration(this.t, this.n[i], anchor);\n }\n }\n}\nfunction attribute_to_object(attributes) {\n const result = {};\n for (const attribute of attributes) {\n result[attribute.name] = attribute.value;\n }\n return result;\n}\nfunction get_custom_elements_slots(element) {\n const result = {};\n element.childNodes.forEach((node) => {\n result[node.slot || 'default'] = true;\n });\n return result;\n}\nfunction construct_svelte_component(component, props) {\n return new component(props);\n}\n\n// we need to store the information for multiple documents because a Svelte application could also contain iframes\n// https://github.com/sveltejs/svelte/issues/3624\nconst managed_styles = new Map();\nlet active = 0;\n// https://github.com/darkskyapp/string-hash/blob/master/index.js\nfunction hash(str) {\n let hash = 5381;\n let i = str.length;\n while (i--)\n hash = ((hash << 5) - hash) ^ str.charCodeAt(i);\n return hash >>> 0;\n}\nfunction create_style_information(doc, node) {\n const info = { stylesheet: append_empty_stylesheet(node), rules: {} };\n managed_styles.set(doc, info);\n return info;\n}\nfunction create_rule(node, a, b, duration, delay, ease, fn, uid = 0) {\n const step = 16.666 / duration;\n let keyframes = '{\\n';\n for (let p = 0; p <= 1; p += step) {\n const t = a + (b - a) * ease(p);\n keyframes += p * 100 + `%{${fn(t, 1 - t)}}\\n`;\n }\n const rule = keyframes + `100% {${fn(b, 1 - b)}}\\n}`;\n const name = `__svelte_${hash(rule)}_${uid}`;\n const doc = get_root_for_style(node);\n const { stylesheet, rules } = managed_styles.get(doc) || create_style_information(doc, node);\n if (!rules[name]) {\n rules[name] = true;\n stylesheet.insertRule(`@keyframes ${name} ${rule}`, stylesheet.cssRules.length);\n }\n const animation = node.style.animation || '';\n node.style.animation = `${animation ? `${animation}, ` : ''}${name} ${duration}ms linear ${delay}ms 1 both`;\n active += 1;\n return name;\n}\nfunction delete_rule(node, name) {\n const previous = (node.style.animation || '').split(', ');\n const next = previous.filter(name\n ? anim => anim.indexOf(name) < 0 // remove specific animation\n : anim => anim.indexOf('__svelte') === -1 // remove all Svelte animations\n );\n const deleted = previous.length - next.length;\n if (deleted) {\n node.style.animation = next.join(', ');\n active -= deleted;\n if (!active)\n clear_rules();\n }\n}\nfunction clear_rules() {\n raf(() => {\n if (active)\n return;\n managed_styles.forEach(info => {\n const { ownerNode } = info.stylesheet;\n // there is no ownerNode if it runs on jsdom.\n if (ownerNode)\n detach(ownerNode);\n });\n managed_styles.clear();\n });\n}\n\nfunction create_animation(node, from, fn, params) {\n if (!from)\n return noop;\n const to = node.getBoundingClientRect();\n if (from.left === to.left && from.right === to.right && from.top === to.top && from.bottom === to.bottom)\n return noop;\n const { delay = 0, duration = 300, easing = identity, \n // @ts-ignore todo: should this be separated from destructuring? Or start/end added to public api and documentation?\n start: start_time = now() + delay, \n // @ts-ignore todo:\n end = start_time + duration, tick = noop, css } = fn(node, { from, to }, params);\n let running = true;\n let started = false;\n let name;\n function start() {\n if (css) {\n name = create_rule(node, 0, 1, duration, delay, easing, css);\n }\n if (!delay) {\n started = true;\n }\n }\n function stop() {\n if (css)\n delete_rule(node, name);\n running = false;\n }\n loop(now => {\n if (!started && now >= start_time) {\n started = true;\n }\n if (started && now >= end) {\n tick(1, 0);\n stop();\n }\n if (!running) {\n return false;\n }\n if (started) {\n const p = now - start_time;\n const t = 0 + 1 * easing(p / duration);\n tick(t, 1 - t);\n }\n return true;\n });\n start();\n tick(0, 1);\n return stop;\n}\nfunction fix_position(node) {\n const style = getComputedStyle(node);\n if (style.position !== 'absolute' && style.position !== 'fixed') {\n const { width, height } = style;\n const a = node.getBoundingClientRect();\n node.style.position = 'absolute';\n node.style.width = width;\n node.style.height = height;\n add_transform(node, a);\n }\n}\nfunction add_transform(node, a) {\n const b = node.getBoundingClientRect();\n if (a.left !== b.left || a.top !== b.top) {\n const style = getComputedStyle(node);\n const transform = style.transform === 'none' ? '' : style.transform;\n node.style.transform = `${transform} translate(${a.left - b.left}px, ${a.top - b.top}px)`;\n }\n}\n\nlet current_component;\nfunction set_current_component(component) {\n current_component = component;\n}\nfunction get_current_component() {\n if (!current_component)\n throw new Error('Function called outside component initialization');\n return current_component;\n}\n/**\n * Schedules a callback to run immediately before the component is updated after any state change.\n *\n * The first time the callback runs will be before the initial `onMount`\n *\n * https://svelte.dev/docs#run-time-svelte-beforeupdate\n */\nfunction beforeUpdate(fn) {\n get_current_component().$$.before_update.push(fn);\n}\n/**\n * The `onMount` function schedules a callback to run as soon as the component has been mounted to the DOM.\n * It must be called during the component's initialisation (but doesn't need to live *inside* the component;\n * it can be called from an external module).\n *\n * `onMount` does not run inside a [server-side component](/docs#run-time-server-side-component-api).\n *\n * https://svelte.dev/docs#run-time-svelte-onmount\n */\nfunction onMount(fn) {\n get_current_component().$$.on_mount.push(fn);\n}\n/**\n * Schedules a callback to run immediately after the component has been updated.\n *\n * The first time the callback runs will be after the initial `onMount`\n */\nfunction afterUpdate(fn) {\n get_current_component().$$.after_update.push(fn);\n}\n/**\n * Schedules a callback to run immediately before the component is unmounted.\n *\n * Out of `onMount`, `beforeUpdate`, `afterUpdate` and `onDestroy`, this is the\n * only one that runs inside a server-side component.\n *\n * https://svelte.dev/docs#run-time-svelte-ondestroy\n */\nfunction onDestroy(fn) {\n get_current_component().$$.on_destroy.push(fn);\n}\n/**\n * Creates an event dispatcher that can be used to dispatch [component events](/docs#template-syntax-component-directives-on-eventname).\n * Event dispatchers are functions that can take two arguments: `name` and `detail`.\n *\n * Component events created with `createEventDispatcher` create a\n * [CustomEvent](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent).\n * These events do not [bubble](https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Building_blocks/Events#Event_bubbling_and_capture).\n * The `detail` argument corresponds to the [CustomEvent.detail](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/detail)\n * property and can contain any type of data.\n *\n * https://svelte.dev/docs#run-time-svelte-createeventdispatcher\n */\nfunction createEventDispatcher() {\n const component = get_current_component();\n return (type, detail, { cancelable = false } = {}) => {\n const callbacks = component.$$.callbacks[type];\n if (callbacks) {\n // TODO are there situations where events could be dispatched\n // in a server (non-DOM) environment?\n const event = custom_event(type, detail, { cancelable });\n callbacks.slice().forEach(fn => {\n fn.call(component, event);\n });\n return !event.defaultPrevented;\n }\n return true;\n };\n}\n/**\n * Associates an arbitrary `context` object with the current component and the specified `key`\n * and returns that object. The context is then available to children of the component\n * (including slotted content) with `getContext`.\n *\n * Like lifecycle functions, this must be called during component initialisation.\n *\n * https://svelte.dev/docs#run-time-svelte-setcontext\n */\nfunction setContext(key, context) {\n get_current_component().$$.context.set(key, context);\n return context;\n}\n/**\n * Retrieves the context that belongs to the closest parent component with the specified `key`.\n * Must be called during component initialisation.\n *\n * https://svelte.dev/docs#run-time-svelte-getcontext\n */\nfunction getContext(key) {\n return get_current_component().$$.context.get(key);\n}\n/**\n * Retrieves the whole context map that belongs to the closest parent component.\n * Must be called during component initialisation. Useful, for example, if you\n * programmatically create a component and want to pass the existing context to it.\n *\n * https://svelte.dev/docs#run-time-svelte-getallcontexts\n */\nfunction getAllContexts() {\n return get_current_component().$$.context;\n}\n/**\n * Checks whether a given `key` has been set in the context of a parent component.\n * Must be called during component initialisation.\n *\n * https://svelte.dev/docs#run-time-svelte-hascontext\n */\nfunction hasContext(key) {\n return get_current_component().$$.context.has(key);\n}\n// TODO figure out if we still want to support\n// shorthand events, or if we want to implement\n// a real bubbling mechanism\nfunction bubble(component, event) {\n const callbacks = component.$$.callbacks[event.type];\n if (callbacks) {\n // @ts-ignore\n callbacks.slice().forEach(fn => fn.call(this, event));\n }\n}\n\nconst dirty_components = [];\nconst intros = { enabled: false };\nconst binding_callbacks = [];\nconst render_callbacks = [];\nconst flush_callbacks = [];\nconst resolved_promise = Promise.resolve();\nlet update_scheduled = false;\nfunction schedule_update() {\n if (!update_scheduled) {\n update_scheduled = true;\n resolved_promise.then(flush);\n }\n}\nfunction tick() {\n schedule_update();\n return resolved_promise;\n}\nfunction add_render_callback(fn) {\n render_callbacks.push(fn);\n}\nfunction add_flush_callback(fn) {\n flush_callbacks.push(fn);\n}\n// flush() calls callbacks in this order:\n// 1. All beforeUpdate callbacks, in order: parents before children\n// 2. All bind:this callbacks, in reverse order: children before parents.\n// 3. All afterUpdate callbacks, in order: parents before children. EXCEPT\n// for afterUpdates called during the initial onMount, which are called in\n// reverse order: children before parents.\n// Since callbacks might update component values, which could trigger another\n// call to flush(), the following steps guard against this:\n// 1. During beforeUpdate, any updated components will be added to the\n// dirty_components array and will cause a reentrant call to flush(). Because\n// the flush index is kept outside the function, the reentrant call will pick\n// up where the earlier call left off and go through all dirty components. The\n// current_component value is saved and restored so that the reentrant call will\n// not interfere with the \"parent\" flush() call.\n// 2. bind:this callbacks cannot trigger new flush() calls.\n// 3. During afterUpdate, any updated components will NOT have their afterUpdate\n// callback called a second time; the seen_callbacks set, outside the flush()\n// function, guarantees this behavior.\nconst seen_callbacks = new Set();\nlet flushidx = 0; // Do *not* move this inside the flush() function\nfunction flush() {\n const saved_component = current_component;\n do {\n // first, call beforeUpdate functions\n // and update components\n while (flushidx < dirty_components.length) {\n const component = dirty_components[flushidx];\n flushidx++;\n set_current_component(component);\n update(component.$$);\n }\n set_current_component(null);\n dirty_components.length = 0;\n flushidx = 0;\n while (binding_callbacks.length)\n binding_callbacks.pop()();\n // then, once components are updated, call\n // afterUpdate functions. This may cause\n // subsequent updates...\n for (let i = 0; i < render_callbacks.length; i += 1) {\n const callback = render_callbacks[i];\n if (!seen_callbacks.has(callback)) {\n // ...so guard against infinite loops\n seen_callbacks.add(callback);\n callback();\n }\n }\n render_callbacks.length = 0;\n } while (dirty_components.length);\n while (flush_callbacks.length) {\n flush_callbacks.pop()();\n }\n update_scheduled = false;\n seen_callbacks.clear();\n set_current_component(saved_component);\n}\nfunction update($$) {\n if ($$.fragment !== null) {\n $$.update();\n run_all($$.before_update);\n const dirty = $$.dirty;\n $$.dirty = [-1];\n $$.fragment && $$.fragment.p($$.ctx, dirty);\n $$.after_update.forEach(add_render_callback);\n }\n}\n\nlet promise;\nfunction wait() {\n if (!promise) {\n promise = Promise.resolve();\n promise.then(() => {\n promise = null;\n });\n }\n return promise;\n}\nfunction dispatch(node, direction, kind) {\n node.dispatchEvent(custom_event(`${direction ? 'intro' : 'outro'}${kind}`));\n}\nconst outroing = new Set();\nlet outros;\nfunction group_outros() {\n outros = {\n r: 0,\n c: [],\n p: outros // parent group\n };\n}\nfunction check_outros() {\n if (!outros.r) {\n run_all(outros.c);\n }\n outros = outros.p;\n}\nfunction transition_in(block, local) {\n if (block && block.i) {\n outroing.delete(block);\n block.i(local);\n }\n}\nfunction transition_out(block, local, detach, callback) {\n if (block && block.o) {\n if (outroing.has(block))\n return;\n outroing.add(block);\n outros.c.push(() => {\n outroing.delete(block);\n if (callback) {\n if (detach)\n block.d(1);\n callback();\n }\n });\n block.o(local);\n }\n else if (callback) {\n callback();\n }\n}\nconst null_transition = { duration: 0 };\nfunction create_in_transition(node, fn, params) {\n let config = fn(node, params);\n let running = false;\n let animation_name;\n let task;\n let uid = 0;\n function cleanup() {\n if (animation_name)\n delete_rule(node, animation_name);\n }\n function go() {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n if (css)\n animation_name = create_rule(node, 0, 1, duration, delay, easing, css, uid++);\n tick(0, 1);\n const start_time = now() + delay;\n const end_time = start_time + duration;\n if (task)\n task.abort();\n running = true;\n add_render_callback(() => dispatch(node, true, 'start'));\n task = loop(now => {\n if (running) {\n if (now >= end_time) {\n tick(1, 0);\n dispatch(node, true, 'end');\n cleanup();\n return running = false;\n }\n if (now >= start_time) {\n const t = easing((now - start_time) / duration);\n tick(t, 1 - t);\n }\n }\n return running;\n });\n }\n let started = false;\n return {\n start() {\n if (started)\n return;\n started = true;\n delete_rule(node);\n if (is_function(config)) {\n config = config();\n wait().then(go);\n }\n else {\n go();\n }\n },\n invalidate() {\n started = false;\n },\n end() {\n if (running) {\n cleanup();\n running = false;\n }\n }\n };\n}\nfunction create_out_transition(node, fn, params) {\n let config = fn(node, params);\n let running = true;\n let animation_name;\n const group = outros;\n group.r += 1;\n function go() {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n if (css)\n animation_name = create_rule(node, 1, 0, duration, delay, easing, css);\n const start_time = now() + delay;\n const end_time = start_time + duration;\n add_render_callback(() => dispatch(node, false, 'start'));\n loop(now => {\n if (running) {\n if (now >= end_time) {\n tick(0, 1);\n dispatch(node, false, 'end');\n if (!--group.r) {\n // this will result in `end()` being called,\n // so we don't need to clean up here\n run_all(group.c);\n }\n return false;\n }\n if (now >= start_time) {\n const t = easing((now - start_time) / duration);\n tick(1 - t, t);\n }\n }\n return running;\n });\n }\n if (is_function(config)) {\n wait().then(() => {\n // @ts-ignore\n config = config();\n go();\n });\n }\n else {\n go();\n }\n return {\n end(reset) {\n if (reset && config.tick) {\n config.tick(1, 0);\n }\n if (running) {\n if (animation_name)\n delete_rule(node, animation_name);\n running = false;\n }\n }\n };\n}\nfunction create_bidirectional_transition(node, fn, params, intro) {\n let config = fn(node, params);\n let t = intro ? 0 : 1;\n let running_program = null;\n let pending_program = null;\n let animation_name = null;\n function clear_animation() {\n if (animation_name)\n delete_rule(node, animation_name);\n }\n function init(program, duration) {\n const d = (program.b - t);\n duration *= Math.abs(d);\n return {\n a: t,\n b: program.b,\n d,\n duration,\n start: program.start,\n end: program.start + duration,\n group: program.group\n };\n }\n function go(b) {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n const program = {\n start: now() + delay,\n b\n };\n if (!b) {\n // @ts-ignore todo: improve typings\n program.group = outros;\n outros.r += 1;\n }\n if (running_program || pending_program) {\n pending_program = program;\n }\n else {\n // if this is an intro, and there's a delay, we need to do\n // an initial tick and/or apply CSS animation immediately\n if (css) {\n clear_animation();\n animation_name = create_rule(node, t, b, duration, delay, easing, css);\n }\n if (b)\n tick(0, 1);\n running_program = init(program, duration);\n add_render_callback(() => dispatch(node, b, 'start'));\n loop(now => {\n if (pending_program && now > pending_program.start) {\n running_program = init(pending_program, duration);\n pending_program = null;\n dispatch(node, running_program.b, 'start');\n if (css) {\n clear_animation();\n animation_name = create_rule(node, t, running_program.b, running_program.duration, 0, easing, config.css);\n }\n }\n if (running_program) {\n if (now >= running_program.end) {\n tick(t = running_program.b, 1 - t);\n dispatch(node, running_program.b, 'end');\n if (!pending_program) {\n // we're done\n if (running_program.b) {\n // intro \u2014 we can tidy up immediately\n clear_animation();\n }\n else {\n // outro \u2014 needs to be coordinated\n if (!--running_program.group.r)\n run_all(running_program.group.c);\n }\n }\n running_program = null;\n }\n else if (now >= running_program.start) {\n const p = now - running_program.start;\n t = running_program.a + running_program.d * easing(p / running_program.duration);\n tick(t, 1 - t);\n }\n }\n return !!(running_program || pending_program);\n });\n }\n }\n return {\n run(b) {\n if (is_function(config)) {\n wait().then(() => {\n // @ts-ignore\n config = config();\n go(b);\n });\n }\n else {\n go(b);\n }\n },\n end() {\n clear_animation();\n running_program = pending_program = null;\n }\n };\n}\n\nfunction handle_promise(promise, info) {\n const token = info.token = {};\n function update(type, index, key, value) {\n if (info.token !== token)\n return;\n info.resolved = value;\n let child_ctx = info.ctx;\n if (key !== undefined) {\n child_ctx = child_ctx.slice();\n child_ctx[key] = value;\n }\n const block = type && (info.current = type)(child_ctx);\n let needs_flush = false;\n if (info.block) {\n if (info.blocks) {\n info.blocks.forEach((block, i) => {\n if (i !== index && block) {\n group_outros();\n transition_out(block, 1, 1, () => {\n if (info.blocks[i] === block) {\n info.blocks[i] = null;\n }\n });\n check_outros();\n }\n });\n }\n else {\n info.block.d(1);\n }\n block.c();\n transition_in(block, 1);\n block.m(info.mount(), info.anchor);\n needs_flush = true;\n }\n info.block = block;\n if (info.blocks)\n info.blocks[index] = block;\n if (needs_flush) {\n flush();\n }\n }\n if (is_promise(promise)) {\n const current_component = get_current_component();\n promise.then(value => {\n set_current_component(current_component);\n update(info.then, 1, info.value, value);\n set_current_component(null);\n }, error => {\n set_current_component(current_component);\n update(info.catch, 2, info.error, error);\n set_current_component(null);\n if (!info.hasCatch) {\n throw error;\n }\n });\n // if we previously had a then/catch block, destroy it\n if (info.current !== info.pending) {\n update(info.pending, 0);\n return true;\n }\n }\n else {\n if (info.current !== info.then) {\n update(info.then, 1, info.value, promise);\n return true;\n }\n info.resolved = promise;\n }\n}\nfunction update_await_block_branch(info, ctx, dirty) {\n const child_ctx = ctx.slice();\n const { resolved } = info;\n if (info.current === info.then) {\n child_ctx[info.value] = resolved;\n }\n if (info.current === info.catch) {\n child_ctx[info.error] = resolved;\n }\n info.block.p(child_ctx, dirty);\n}\n\nconst globals = (typeof window !== 'undefined'\n ? window\n : typeof globalThis !== 'undefined'\n ? globalThis\n : global);\n\nfunction destroy_block(block, lookup) {\n block.d(1);\n lookup.delete(block.key);\n}\nfunction outro_and_destroy_block(block, lookup) {\n transition_out(block, 1, 1, () => {\n lookup.delete(block.key);\n });\n}\nfunction fix_and_destroy_block(block, lookup) {\n block.f();\n destroy_block(block, lookup);\n}\nfunction fix_and_outro_and_destroy_block(block, lookup) {\n block.f();\n outro_and_destroy_block(block, lookup);\n}\nfunction update_keyed_each(old_blocks, dirty, get_key, dynamic, ctx, list, lookup, node, destroy, create_each_block, next, get_context) {\n let o = old_blocks.length;\n let n = list.length;\n let i = o;\n const old_indexes = {};\n while (i--)\n old_indexes[old_blocks[i].key] = i;\n const new_blocks = [];\n const new_lookup = new Map();\n const deltas = new Map();\n i = n;\n while (i--) {\n const child_ctx = get_context(ctx, list, i);\n const key = get_key(child_ctx);\n let block = lookup.get(key);\n if (!block) {\n block = create_each_block(key, child_ctx);\n block.c();\n }\n else if (dynamic) {\n block.p(child_ctx, dirty);\n }\n new_lookup.set(key, new_blocks[i] = block);\n if (key in old_indexes)\n deltas.set(key, Math.abs(i - old_indexes[key]));\n }\n const will_move = new Set();\n const did_move = new Set();\n function insert(block) {\n transition_in(block, 1);\n block.m(node, next);\n lookup.set(block.key, block);\n next = block.first;\n n--;\n }\n while (o && n) {\n const new_block = new_blocks[n - 1];\n const old_block = old_blocks[o - 1];\n const new_key = new_block.key;\n const old_key = old_block.key;\n if (new_block === old_block) {\n // do nothing\n next = new_block.first;\n o--;\n n--;\n }\n else if (!new_lookup.has(old_key)) {\n // remove old block\n destroy(old_block, lookup);\n o--;\n }\n else if (!lookup.has(new_key) || will_move.has(new_key)) {\n insert(new_block);\n }\n else if (did_move.has(old_key)) {\n o--;\n }\n else if (deltas.get(new_key) > deltas.get(old_key)) {\n did_move.add(new_key);\n insert(new_block);\n }\n else {\n will_move.add(old_key);\n o--;\n }\n }\n while (o--) {\n const old_block = old_blocks[o];\n if (!new_lookup.has(old_block.key))\n destroy(old_block, lookup);\n }\n while (n)\n insert(new_blocks[n - 1]);\n return new_blocks;\n}\nfunction validate_each_keys(ctx, list, get_context, get_key) {\n const keys = new Set();\n for (let i = 0; i < list.length; i++) {\n const key = get_key(get_context(ctx, list, i));\n if (keys.has(key)) {\n throw new Error('Cannot have duplicate keys in a keyed each');\n }\n keys.add(key);\n }\n}\n\nfunction get_spread_update(levels, updates) {\n const update = {};\n const to_null_out = {};\n const accounted_for = { $$scope: 1 };\n let i = levels.length;\n while (i--) {\n const o = levels[i];\n const n = updates[i];\n if (n) {\n for (const key in o) {\n if (!(key in n))\n to_null_out[key] = 1;\n }\n for (const key in n) {\n if (!accounted_for[key]) {\n update[key] = n[key];\n accounted_for[key] = 1;\n }\n }\n levels[i] = n;\n }\n else {\n for (const key in o) {\n accounted_for[key] = 1;\n }\n }\n }\n for (const key in to_null_out) {\n if (!(key in update))\n update[key] = undefined;\n }\n return update;\n}\nfunction get_spread_object(spread_props) {\n return typeof spread_props === 'object' && spread_props !== null ? spread_props : {};\n}\n\n// source: https://html.spec.whatwg.org/multipage/indices.html\nconst boolean_attributes = new Set([\n 'allowfullscreen',\n 'allowpaymentrequest',\n 'async',\n 'autofocus',\n 'autoplay',\n 'checked',\n 'controls',\n 'default',\n 'defer',\n 'disabled',\n 'formnovalidate',\n 'hidden',\n 'inert',\n 'ismap',\n 'itemscope',\n 'loop',\n 'multiple',\n 'muted',\n 'nomodule',\n 'novalidate',\n 'open',\n 'playsinline',\n 'readonly',\n 'required',\n 'reversed',\n 'selected'\n]);\n\n/** regex of all html void element names */\nconst void_element_names = /^(?:area|base|br|col|command|embed|hr|img|input|keygen|link|meta|param|source|track|wbr)$/;\nfunction is_void(name) {\n return void_element_names.test(name) || name.toLowerCase() === '!doctype';\n}\n\nconst invalid_attribute_name_character = /[\\s'\">/=\\u{FDD0}-\\u{FDEF}\\u{FFFE}\\u{FFFF}\\u{1FFFE}\\u{1FFFF}\\u{2FFFE}\\u{2FFFF}\\u{3FFFE}\\u{3FFFF}\\u{4FFFE}\\u{4FFFF}\\u{5FFFE}\\u{5FFFF}\\u{6FFFE}\\u{6FFFF}\\u{7FFFE}\\u{7FFFF}\\u{8FFFE}\\u{8FFFF}\\u{9FFFE}\\u{9FFFF}\\u{AFFFE}\\u{AFFFF}\\u{BFFFE}\\u{BFFFF}\\u{CFFFE}\\u{CFFFF}\\u{DFFFE}\\u{DFFFF}\\u{EFFFE}\\u{EFFFF}\\u{FFFFE}\\u{FFFFF}\\u{10FFFE}\\u{10FFFF}]/u;\n// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\n// https://infra.spec.whatwg.org/#noncharacter\nfunction spread(args, attrs_to_add) {\n const attributes = Object.assign({}, ...args);\n if (attrs_to_add) {\n const classes_to_add = attrs_to_add.classes;\n const styles_to_add = attrs_to_add.styles;\n if (classes_to_add) {\n if (attributes.class == null) {\n attributes.class = classes_to_add;\n }\n else {\n attributes.class += ' ' + classes_to_add;\n }\n }\n if (styles_to_add) {\n if (attributes.style == null) {\n attributes.style = style_object_to_string(styles_to_add);\n }\n else {\n attributes.style = style_object_to_string(merge_ssr_styles(attributes.style, styles_to_add));\n }\n }\n }\n let str = '';\n Object.keys(attributes).forEach(name => {\n if (invalid_attribute_name_character.test(name))\n return;\n const value = attributes[name];\n if (value === true)\n str += ' ' + name;\n else if (boolean_attributes.has(name.toLowerCase())) {\n if (value)\n str += ' ' + name;\n }\n else if (value != null) {\n str += ` ${name}=\"${value}\"`;\n }\n });\n return str;\n}\nfunction merge_ssr_styles(style_attribute, style_directive) {\n const style_object = {};\n for (const individual_style of style_attribute.split(';')) {\n const colon_index = individual_style.indexOf(':');\n const name = individual_style.slice(0, colon_index).trim();\n const value = individual_style.slice(colon_index + 1).trim();\n if (!name)\n continue;\n style_object[name] = value;\n }\n for (const name in style_directive) {\n const value = style_directive[name];\n if (value) {\n style_object[name] = value;\n }\n else {\n delete style_object[name];\n }\n }\n return style_object;\n}\nconst ATTR_REGEX = /[&\"]/g;\nconst CONTENT_REGEX = /[&<]/g;\n/**\n * Note: this method is performance sensitive and has been optimized\n * https://github.com/sveltejs/svelte/pull/5701\n */\nfunction escape(value, is_attr = false) {\n const str = String(value);\n const pattern = is_attr ? ATTR_REGEX : CONTENT_REGEX;\n pattern.lastIndex = 0;\n let escaped = '';\n let last = 0;\n while (pattern.test(str)) {\n const i = pattern.lastIndex - 1;\n const ch = str[i];\n escaped += str.substring(last, i) + (ch === '&' ? '&' : (ch === '\"' ? '"' : '<'));\n last = i + 1;\n }\n return escaped + str.substring(last);\n}\nfunction escape_attribute_value(value) {\n // keep booleans, null, and undefined for the sake of `spread`\n const should_escape = typeof value === 'string' || (value && typeof value === 'object');\n return should_escape ? escape(value, true) : value;\n}\nfunction escape_object(obj) {\n const result = {};\n for (const key in obj) {\n result[key] = escape_attribute_value(obj[key]);\n }\n return result;\n}\nfunction each(items, fn) {\n let str = '';\n for (let i = 0; i < items.length; i += 1) {\n str += fn(items[i], i);\n }\n return str;\n}\nconst missing_component = {\n $$render: () => ''\n};\nfunction validate_component(component, name) {\n if (!component || !component.$$render) {\n if (name === 'svelte:component')\n name += ' this={...}';\n throw new Error(`<${name}> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules. Otherwise you may need to fix a <${name}>.`);\n }\n return component;\n}\nfunction debug(file, line, column, values) {\n console.log(`{@debug} ${file ? file + ' ' : ''}(${line}:${column})`); // eslint-disable-line no-console\n console.log(values); // eslint-disable-line no-console\n return '';\n}\nlet on_destroy;\nfunction create_ssr_component(fn) {\n function $$render(result, props, bindings, slots, context) {\n const parent_component = current_component;\n const $$ = {\n on_destroy,\n context: new Map(context || (parent_component ? parent_component.$$.context : [])),\n // these will be immediately discarded\n on_mount: [],\n before_update: [],\n after_update: [],\n callbacks: blank_object()\n };\n set_current_component({ $$ });\n const html = fn(result, props, bindings, slots);\n set_current_component(parent_component);\n return html;\n }\n return {\n render: (props = {}, { $$slots = {}, context = new Map() } = {}) => {\n on_destroy = [];\n const result = { title: '', head: '', css: new Set() };\n const html = $$render(result, props, {}, $$slots, context);\n run_all(on_destroy);\n return {\n html,\n css: {\n code: Array.from(result.css).map(css => css.code).join('\\n'),\n map: null // TODO\n },\n head: result.title + result.head\n };\n },\n $$render\n };\n}\nfunction add_attribute(name, value, boolean) {\n if (value == null || (boolean && !value))\n return '';\n const assignment = (boolean && value === true) ? '' : `=\"${escape(value, true)}\"`;\n return ` ${name}${assignment}`;\n}\nfunction add_classes(classes) {\n return classes ? ` class=\"${classes}\"` : '';\n}\nfunction style_object_to_string(style_object) {\n return Object.keys(style_object)\n .filter(key => style_object[key])\n .map(key => `${key}: ${style_object[key]};`)\n .join(' ');\n}\nfunction add_styles(style_object) {\n const styles = style_object_to_string(style_object);\n return styles ? ` style=\"${styles}\"` : '';\n}\n\nfunction bind(component, name, callback) {\n const index = component.$$.props[name];\n if (index !== undefined) {\n component.$$.bound[index] = callback;\n callback(component.$$.ctx[index]);\n }\n}\nfunction create_component(block) {\n block && block.c();\n}\nfunction claim_component(block, parent_nodes) {\n block && block.l(parent_nodes);\n}\nfunction mount_component(component, target, anchor, customElement) {\n const { fragment, after_update } = component.$$;\n fragment && fragment.m(target, anchor);\n if (!customElement) {\n // onMount happens before the initial afterUpdate\n add_render_callback(() => {\n const new_on_destroy = component.$$.on_mount.map(run).filter(is_function);\n // if the component was destroyed immediately\n // it will update the `$$.on_destroy` reference to `null`.\n // the destructured on_destroy may still reference to the old array\n if (component.$$.on_destroy) {\n component.$$.on_destroy.push(...new_on_destroy);\n }\n else {\n // Edge case - component was destroyed immediately,\n // most likely as a result of a binding initialising\n run_all(new_on_destroy);\n }\n component.$$.on_mount = [];\n });\n }\n after_update.forEach(add_render_callback);\n}\nfunction destroy_component(component, detaching) {\n const $$ = component.$$;\n if ($$.fragment !== null) {\n run_all($$.on_destroy);\n $$.fragment && $$.fragment.d(detaching);\n // TODO null out other refs, including component.$$ (but need to\n // preserve final state?)\n $$.on_destroy = $$.fragment = null;\n $$.ctx = [];\n }\n}\nfunction make_dirty(component, i) {\n if (component.$$.dirty[0] === -1) {\n dirty_components.push(component);\n schedule_update();\n component.$$.dirty.fill(0);\n }\n component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31));\n}\nfunction init(component, options, instance, create_fragment, not_equal, props, append_styles, dirty = [-1]) {\n const parent_component = current_component;\n set_current_component(component);\n const $$ = component.$$ = {\n fragment: null,\n ctx: [],\n // state\n props,\n update: noop,\n not_equal,\n bound: blank_object(),\n // lifecycle\n on_mount: [],\n on_destroy: [],\n on_disconnect: [],\n before_update: [],\n after_update: [],\n context: new Map(options.context || (parent_component ? parent_component.$$.context : [])),\n // everything else\n callbacks: blank_object(),\n dirty,\n skip_bound: false,\n root: options.target || parent_component.$$.root\n };\n append_styles && append_styles($$.root);\n let ready = false;\n $$.ctx = instance\n ? instance(component, options.props || {}, (i, ret, ...rest) => {\n const value = rest.length ? rest[0] : ret;\n if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) {\n if (!$$.skip_bound && $$.bound[i])\n $$.bound[i](value);\n if (ready)\n make_dirty(component, i);\n }\n return ret;\n })\n : [];\n $$.update();\n ready = true;\n run_all($$.before_update);\n // `false` as a special case of no DOM component\n $$.fragment = create_fragment ? create_fragment($$.ctx) : false;\n if (options.target) {\n if (options.hydrate) {\n start_hydrating();\n const nodes = children(options.target);\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.l(nodes);\n nodes.forEach(detach);\n }\n else {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.c();\n }\n if (options.intro)\n transition_in(component.$$.fragment);\n mount_component(component, options.target, options.anchor, options.customElement);\n end_hydrating();\n flush();\n }\n set_current_component(parent_component);\n}\nlet SvelteElement;\nif (typeof HTMLElement === 'function') {\n SvelteElement = class extends HTMLElement {\n constructor() {\n super();\n this.attachShadow({ mode: 'open' });\n }\n connectedCallback() {\n const { on_mount } = this.$$;\n this.$$.on_disconnect = on_mount.map(run).filter(is_function);\n // @ts-ignore todo: improve typings\n for (const key in this.$$.slotted) {\n // @ts-ignore todo: improve typings\n this.appendChild(this.$$.slotted[key]);\n }\n }\n attributeChangedCallback(attr, _oldValue, newValue) {\n this[attr] = newValue;\n }\n disconnectedCallback() {\n run_all(this.$$.on_disconnect);\n }\n $destroy() {\n destroy_component(this, 1);\n this.$destroy = noop;\n }\n $on(type, callback) {\n // TODO should this delegate to addEventListener?\n if (!is_function(callback)) {\n return noop;\n }\n const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n callbacks.push(callback);\n return () => {\n const index = callbacks.indexOf(callback);\n if (index !== -1)\n callbacks.splice(index, 1);\n };\n }\n $set($$props) {\n if (this.$$set && !is_empty($$props)) {\n this.$$.skip_bound = true;\n this.$$set($$props);\n this.$$.skip_bound = false;\n }\n }\n };\n}\n/**\n * Base class for Svelte components. Used when dev=false.\n */\nclass SvelteComponent {\n $destroy() {\n destroy_component(this, 1);\n this.$destroy = noop;\n }\n $on(type, callback) {\n if (!is_function(callback)) {\n return noop;\n }\n const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n callbacks.push(callback);\n return () => {\n const index = callbacks.indexOf(callback);\n if (index !== -1)\n callbacks.splice(index, 1);\n };\n }\n $set($$props) {\n if (this.$$set && !is_empty($$props)) {\n this.$$.skip_bound = true;\n this.$$set($$props);\n this.$$.skip_bound = false;\n }\n }\n}\n\nfunction dispatch_dev(type, detail) {\n document.dispatchEvent(custom_event(type, Object.assign({ version: '3.51.0' }, detail), { bubbles: true }));\n}\nfunction append_dev(target, node) {\n dispatch_dev('SvelteDOMInsert', { target, node });\n append(target, node);\n}\nfunction append_hydration_dev(target, node) {\n dispatch_dev('SvelteDOMInsert', { target, node });\n append_hydration(target, node);\n}\nfunction insert_dev(target, node, anchor) {\n dispatch_dev('SvelteDOMInsert', { target, node, anchor });\n insert(target, node, anchor);\n}\nfunction insert_hydration_dev(target, node, anchor) {\n dispatch_dev('SvelteDOMInsert', { target, node, anchor });\n insert_hydration(target, node, anchor);\n}\nfunction detach_dev(node) {\n dispatch_dev('SvelteDOMRemove', { node });\n detach(node);\n}\nfunction detach_between_dev(before, after) {\n while (before.nextSibling && before.nextSibling !== after) {\n detach_dev(before.nextSibling);\n }\n}\nfunction detach_before_dev(after) {\n while (after.previousSibling) {\n detach_dev(after.previousSibling);\n }\n}\nfunction detach_after_dev(before) {\n while (before.nextSibling) {\n detach_dev(before.nextSibling);\n }\n}\nfunction listen_dev(node, event, handler, options, has_prevent_default, has_stop_propagation) {\n const modifiers = options === true ? ['capture'] : options ? Array.from(Object.keys(options)) : [];\n if (has_prevent_default)\n modifiers.push('preventDefault');\n if (has_stop_propagation)\n modifiers.push('stopPropagation');\n dispatch_dev('SvelteDOMAddEventListener', { node, event, handler, modifiers });\n const dispose = listen(node, event, handler, options);\n return () => {\n dispatch_dev('SvelteDOMRemoveEventListener', { node, event, handler, modifiers });\n dispose();\n };\n}\nfunction attr_dev(node, attribute, value) {\n attr(node, attribute, value);\n if (value == null)\n dispatch_dev('SvelteDOMRemoveAttribute', { node, attribute });\n else\n dispatch_dev('SvelteDOMSetAttribute', { node, attribute, value });\n}\nfunction prop_dev(node, property, value) {\n node[property] = value;\n dispatch_dev('SvelteDOMSetProperty', { node, property, value });\n}\nfunction dataset_dev(node, property, value) {\n node.dataset[property] = value;\n dispatch_dev('SvelteDOMSetDataset', { node, property, value });\n}\nfunction set_data_dev(text, data) {\n data = '' + data;\n if (text.wholeText === data)\n return;\n dispatch_dev('SvelteDOMSetData', { node: text, data });\n text.data = data;\n}\nfunction validate_each_argument(arg) {\n if (typeof arg !== 'string' && !(arg && typeof arg === 'object' && 'length' in arg)) {\n let msg = '{#each} only iterates over array-like objects.';\n if (typeof Symbol === 'function' && arg && Symbol.iterator in arg) {\n msg += ' You can use a spread to convert this iterable into an array.';\n }\n throw new Error(msg);\n }\n}\nfunction validate_slots(name, slot, keys) {\n for (const slot_key of Object.keys(slot)) {\n if (!~keys.indexOf(slot_key)) {\n console.warn(`<${name}> received an unexpected slot \"${slot_key}\".`);\n }\n }\n}\nfunction validate_dynamic_element(tag) {\n const is_string = typeof tag === 'string';\n if (tag && !is_string) {\n throw new Error(' expects \"this\" attribute to be a string.');\n }\n}\nfunction validate_void_dynamic_element(tag) {\n if (tag && is_void(tag)) {\n console.warn(` is self-closing and cannot have content.`);\n }\n}\nfunction construct_svelte_component_dev(component, props) {\n const error_message = 'this={...} of should specify a Svelte component.';\n try {\n const instance = new component(props);\n if (!instance.$$ || !instance.$set || !instance.$on || !instance.$destroy) {\n throw new Error(error_message);\n }\n return instance;\n }\n catch (err) {\n const { message } = err;\n if (typeof message === 'string' && message.indexOf('is not a constructor') !== -1) {\n throw new Error(error_message);\n }\n else {\n throw err;\n }\n }\n}\n/**\n * Base class for Svelte components with some minor dev-enhancements. Used when dev=true.\n */\nclass SvelteComponentDev extends SvelteComponent {\n constructor(options) {\n if (!options || (!options.target && !options.$$inline)) {\n throw new Error(\"'target' is a required option\");\n }\n super();\n }\n $destroy() {\n super.$destroy();\n this.$destroy = () => {\n console.warn('Component was already destroyed'); // eslint-disable-line no-console\n };\n }\n $capture_state() { }\n $inject_state() { }\n}\n/**\n * Base class to create strongly typed Svelte components.\n * This only exists for typing purposes and should be used in `.d.ts` files.\n *\n * ### Example:\n *\n * You have component library on npm called `component-library`, from which\n * you export a component called `MyComponent`. For Svelte+TypeScript users,\n * you want to provide typings. Therefore you create a `index.d.ts`:\n * ```ts\n * import { SvelteComponentTyped } from \"svelte\";\n * export class MyComponent extends SvelteComponentTyped<{foo: string}> {}\n * ```\n * Typing this makes it possible for IDEs like VS Code with the Svelte extension\n * to provide intellisense and to use the component like this in a Svelte file\n * with TypeScript:\n * ```svelte\n * \n * \n * ```\n *\n * #### Why not make this part of `SvelteComponent(Dev)`?\n * Because\n * ```ts\n * class ASubclassOfSvelteComponent extends SvelteComponent<{foo: string}> {}\n * const component: typeof SvelteComponent = ASubclassOfSvelteComponent;\n * ```\n * will throw a type error, so we need to separate the more strictly typed class.\n */\nclass SvelteComponentTyped extends SvelteComponentDev {\n constructor(options) {\n super(options);\n }\n}\nfunction loop_guard(timeout) {\n const start = Date.now();\n return () => {\n if (Date.now() - start > timeout) {\n throw new Error('Infinite loop detected');\n }\n };\n}\n\nexport { HtmlTag, HtmlTagHydration, SvelteComponent, SvelteComponentDev, SvelteComponentTyped, SvelteElement, action_destroyer, add_attribute, add_classes, add_flush_callback, add_location, add_render_callback, add_resize_listener, add_styles, add_transform, afterUpdate, append, append_dev, append_empty_stylesheet, append_hydration, append_hydration_dev, append_styles, assign, attr, attr_dev, attribute_to_object, beforeUpdate, bind, binding_callbacks, blank_object, bubble, check_outros, children, claim_component, claim_element, claim_html_tag, claim_space, claim_svg_element, claim_text, clear_loops, component_subscribe, compute_rest_props, compute_slots, construct_svelte_component, construct_svelte_component_dev, createEventDispatcher, create_animation, create_bidirectional_transition, create_component, create_in_transition, create_out_transition, create_slot, create_ssr_component, current_component, custom_event, dataset_dev, debug, destroy_block, destroy_component, destroy_each, detach, detach_after_dev, detach_before_dev, detach_between_dev, detach_dev, dirty_components, dispatch_dev, each, element, element_is, empty, end_hydrating, escape, escape_attribute_value, escape_object, exclude_internal_props, fix_and_destroy_block, fix_and_outro_and_destroy_block, fix_position, flush, getAllContexts, getContext, get_all_dirty_from_scope, get_binding_group_value, get_current_component, get_custom_elements_slots, get_root_for_style, get_slot_changes, get_spread_object, get_spread_update, get_store_value, globals, group_outros, handle_promise, hasContext, has_prop, head_selector, identity, init, insert, insert_dev, insert_hydration, insert_hydration_dev, intros, invalid_attribute_name_character, is_client, is_crossorigin, is_empty, is_function, is_promise, is_void, listen, listen_dev, loop, loop_guard, merge_ssr_styles, missing_component, mount_component, noop, not_equal, now, null_to_empty, object_without_properties, onDestroy, onMount, once, outro_and_destroy_block, prevent_default, prop_dev, query_selector_all, raf, run, run_all, safe_not_equal, schedule_update, select_multiple_value, select_option, select_options, select_value, self, setContext, set_attributes, set_current_component, set_custom_element_data, set_custom_element_data_map, set_data, set_data_dev, set_input_type, set_input_value, set_now, set_raf, set_store_value, set_style, set_svg_attributes, space, spread, src_url_equal, start_hydrating, stop_propagation, subscribe, svg_element, text, tick, time_ranges_to_array, to_number, toggle_class, transition_in, transition_out, trusted, update_await_block_branch, update_keyed_each, update_slot, update_slot_base, validate_component, validate_dynamic_element, validate_each_argument, validate_each_keys, validate_slots, validate_store, validate_void_dynamic_element, xlink_attr };\n", "import { noop, safe_not_equal, subscribe, run_all, is_function } from '../internal/index.mjs';\nexport { get_store_value as get } from '../internal/index.mjs';\n\nconst subscriber_queue = [];\n/**\n * Creates a `Readable` store that allows reading by subscription.\n * @param value initial value\n * @param {StartStopNotifier}start start and stop notifications for subscriptions\n */\nfunction readable(value, start) {\n return {\n subscribe: writable(value, start).subscribe\n };\n}\n/**\n * Create a `Writable` store that allows both updating and reading by subscription.\n * @param {*=}value initial value\n * @param {StartStopNotifier=}start start and stop notifications for subscriptions\n */\nfunction writable(value, start = noop) {\n let stop;\n const subscribers = new Set();\n function set(new_value) {\n if (safe_not_equal(value, new_value)) {\n value = new_value;\n if (stop) { // store is ready\n const run_queue = !subscriber_queue.length;\n for (const subscriber of subscribers) {\n subscriber[1]();\n subscriber_queue.push(subscriber, value);\n }\n if (run_queue) {\n for (let i = 0; i < subscriber_queue.length; i += 2) {\n subscriber_queue[i][0](subscriber_queue[i + 1]);\n }\n subscriber_queue.length = 0;\n }\n }\n }\n }\n function update(fn) {\n set(fn(value));\n }\n function subscribe(run, invalidate = noop) {\n const subscriber = [run, invalidate];\n subscribers.add(subscriber);\n if (subscribers.size === 1) {\n stop = start(set) || noop;\n }\n run(value);\n return () => {\n subscribers.delete(subscriber);\n if (subscribers.size === 0) {\n stop();\n stop = null;\n }\n };\n }\n return { set, update, subscribe };\n}\nfunction derived(stores, fn, initial_value) {\n const single = !Array.isArray(stores);\n const stores_array = single\n ? [stores]\n : stores;\n const auto = fn.length < 2;\n return readable(initial_value, (set) => {\n let inited = false;\n const values = [];\n let pending = 0;\n let cleanup = noop;\n const sync = () => {\n if (pending) {\n return;\n }\n cleanup();\n const result = fn(single ? values[0] : values, set);\n if (auto) {\n set(result);\n }\n else {\n cleanup = is_function(result) ? result : noop;\n }\n };\n const unsubscribers = stores_array.map((store, i) => subscribe(store, (value) => {\n values[i] = value;\n pending &= ~(1 << i);\n if (inited) {\n sync();\n }\n }, () => {\n pending |= (1 << i);\n }));\n inited = true;\n sync();\n return function stop() {\n run_all(unsubscribers);\n cleanup();\n };\n });\n}\n\nexport { derived, readable, writable };\n", "\r\n\r\n\r\n\t\r\n\t
\r\n\t\t\r\n\t
\r\n\t
\r\n\t\t\r\n\t\t\r\n\t
\r\n\t
\r\n\t\t\r\n\t\t / \r\n\t\t\r\n\t\t\r\n\t
\r\n\t
\r\n\t\t\r\n\t\t\r\n\t
\r\n\t
\r\n\t\t\r\n\t\t \r\n\t
\r\n\t
\r\n\t\t\r\n\t\t\r\n\t
\r\n
\r\n\r\n\r\n", "\r\n\r\n
\r\n\t
\r\n\t\r\n\t\r\n\t\r\n\r\n\t\r\n\t\r\n\r\n\t\r\n\t\r\n\r\n\t\r\n\t\r\n\r\n\t\r\n\t\r\n\r\n\t\r\n\t\r\n\r\n\t\r\n\t\r\n\r\n\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t
\r\n\r\n\r\n", "export { identity as linear } from '../internal/index.mjs';\n\n/*\nAdapted from https://github.com/mattdesl\nDistributed under MIT License https://github.com/mattdesl/eases/blob/master/LICENSE.md\n*/\nfunction backInOut(t) {\n const s = 1.70158 * 1.525;\n if ((t *= 2) < 1)\n return 0.5 * (t * t * ((s + 1) * t - s));\n return 0.5 * ((t -= 2) * t * ((s + 1) * t + s) + 2);\n}\nfunction backIn(t) {\n const s = 1.70158;\n return t * t * ((s + 1) * t - s);\n}\nfunction backOut(t) {\n const s = 1.70158;\n return --t * t * ((s + 1) * t + s) + 1;\n}\nfunction bounceOut(t) {\n const a = 4.0 / 11.0;\n const b = 8.0 / 11.0;\n const c = 9.0 / 10.0;\n const ca = 4356.0 / 361.0;\n const cb = 35442.0 / 1805.0;\n const cc = 16061.0 / 1805.0;\n const t2 = t * t;\n return t < a\n ? 7.5625 * t2\n : t < b\n ? 9.075 * t2 - 9.9 * t + 3.4\n : t < c\n ? ca * t2 - cb * t + cc\n : 10.8 * t * t - 20.52 * t + 10.72;\n}\nfunction bounceInOut(t) {\n return t < 0.5\n ? 0.5 * (1.0 - bounceOut(1.0 - t * 2.0))\n : 0.5 * bounceOut(t * 2.0 - 1.0) + 0.5;\n}\nfunction bounceIn(t) {\n return 1.0 - bounceOut(1.0 - t);\n}\nfunction circInOut(t) {\n if ((t *= 2) < 1)\n return -0.5 * (Math.sqrt(1 - t * t) - 1);\n return 0.5 * (Math.sqrt(1 - (t -= 2) * t) + 1);\n}\nfunction circIn(t) {\n return 1.0 - Math.sqrt(1.0 - t * t);\n}\nfunction circOut(t) {\n return Math.sqrt(1 - --t * t);\n}\nfunction cubicInOut(t) {\n return t < 0.5 ? 4.0 * t * t * t : 0.5 * Math.pow(2.0 * t - 2.0, 3.0) + 1.0;\n}\nfunction cubicIn(t) {\n return t * t * t;\n}\nfunction cubicOut(t) {\n const f = t - 1.0;\n return f * f * f + 1.0;\n}\nfunction elasticInOut(t) {\n return t < 0.5\n ? 0.5 *\n Math.sin(((+13.0 * Math.PI) / 2) * 2.0 * t) *\n Math.pow(2.0, 10.0 * (2.0 * t - 1.0))\n : 0.5 *\n Math.sin(((-13.0 * Math.PI) / 2) * (2.0 * t - 1.0 + 1.0)) *\n Math.pow(2.0, -10.0 * (2.0 * t - 1.0)) +\n 1.0;\n}\nfunction elasticIn(t) {\n return Math.sin((13.0 * t * Math.PI) / 2) * Math.pow(2.0, 10.0 * (t - 1.0));\n}\nfunction elasticOut(t) {\n return (Math.sin((-13.0 * (t + 1.0) * Math.PI) / 2) * Math.pow(2.0, -10.0 * t) + 1.0);\n}\nfunction expoInOut(t) {\n return t === 0.0 || t === 1.0\n ? t\n : t < 0.5\n ? +0.5 * Math.pow(2.0, 20.0 * t - 10.0)\n : -0.5 * Math.pow(2.0, 10.0 - t * 20.0) + 1.0;\n}\nfunction expoIn(t) {\n return t === 0.0 ? t : Math.pow(2.0, 10.0 * (t - 1.0));\n}\nfunction expoOut(t) {\n return t === 1.0 ? t : 1.0 - Math.pow(2.0, -10.0 * t);\n}\nfunction quadInOut(t) {\n t /= 0.5;\n if (t < 1)\n return 0.5 * t * t;\n t--;\n return -0.5 * (t * (t - 2) - 1);\n}\nfunction quadIn(t) {\n return t * t;\n}\nfunction quadOut(t) {\n return -t * (t - 2.0);\n}\nfunction quartInOut(t) {\n return t < 0.5\n ? +8.0 * Math.pow(t, 4.0)\n : -8.0 * Math.pow(t - 1.0, 4.0) + 1.0;\n}\nfunction quartIn(t) {\n return Math.pow(t, 4.0);\n}\nfunction quartOut(t) {\n return Math.pow(t - 1.0, 3.0) * (1.0 - t) + 1.0;\n}\nfunction quintInOut(t) {\n if ((t *= 2) < 1)\n return 0.5 * t * t * t * t * t;\n return 0.5 * ((t -= 2) * t * t * t * t + 2);\n}\nfunction quintIn(t) {\n return t * t * t * t * t;\n}\nfunction quintOut(t) {\n return --t * t * t * t * t + 1;\n}\nfunction sineInOut(t) {\n return -0.5 * (Math.cos(Math.PI * t) - 1);\n}\nfunction sineIn(t) {\n const v = Math.cos(t * Math.PI * 0.5);\n if (Math.abs(v) < 1e-14)\n return 1;\n else\n return 1 - v;\n}\nfunction sineOut(t) {\n return Math.sin((t * Math.PI) / 2);\n}\n\nexport { backIn, backInOut, backOut, bounceIn, bounceInOut, bounceOut, circIn, circInOut, circOut, cubicIn, cubicInOut, cubicOut, elasticIn, elasticInOut, elasticOut, expoIn, expoInOut, expoOut, quadIn, quadInOut, quadOut, quartIn, quartInOut, quartOut, quintIn, quintInOut, quintOut, sineIn, sineInOut, sineOut };\n", "import { cubicInOut, linear, cubicOut } from '../easing/index.mjs';\nimport { is_function, assign } from '../internal/index.mjs';\n\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n\r\nfunction __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\n\nfunction blur(node, { delay = 0, duration = 400, easing = cubicInOut, amount = 5, opacity = 0 } = {}) {\n const style = getComputedStyle(node);\n const target_opacity = +style.opacity;\n const f = style.filter === 'none' ? '' : style.filter;\n const od = target_opacity * (1 - opacity);\n return {\n delay,\n duration,\n easing,\n css: (_t, u) => `opacity: ${target_opacity - (od * u)}; filter: ${f} blur(${u * amount}px);`\n };\n}\nfunction fade(node, { delay = 0, duration = 400, easing = linear } = {}) {\n const o = +getComputedStyle(node).opacity;\n return {\n delay,\n duration,\n easing,\n css: t => `opacity: ${t * o}`\n };\n}\nfunction fly(node, { delay = 0, duration = 400, easing = cubicOut, x = 0, y = 0, opacity = 0 } = {}) {\n const style = getComputedStyle(node);\n const target_opacity = +style.opacity;\n const transform = style.transform === 'none' ? '' : style.transform;\n const od = target_opacity * (1 - opacity);\n return {\n delay,\n duration,\n easing,\n css: (t, u) => `\n\t\t\ttransform: ${transform} translate(${(1 - t) * x}px, ${(1 - t) * y}px);\n\t\t\topacity: ${target_opacity - (od * u)}`\n };\n}\nfunction slide(node, { delay = 0, duration = 400, easing = cubicOut } = {}) {\n const style = getComputedStyle(node);\n const opacity = +style.opacity;\n const height = parseFloat(style.height);\n const padding_top = parseFloat(style.paddingTop);\n const padding_bottom = parseFloat(style.paddingBottom);\n const margin_top = parseFloat(style.marginTop);\n const margin_bottom = parseFloat(style.marginBottom);\n const border_top_width = parseFloat(style.borderTopWidth);\n const border_bottom_width = parseFloat(style.borderBottomWidth);\n return {\n delay,\n duration,\n easing,\n css: t => 'overflow: hidden;' +\n `opacity: ${Math.min(t * 20, 1) * opacity};` +\n `height: ${t * height}px;` +\n `padding-top: ${t * padding_top}px;` +\n `padding-bottom: ${t * padding_bottom}px;` +\n `margin-top: ${t * margin_top}px;` +\n `margin-bottom: ${t * margin_bottom}px;` +\n `border-top-width: ${t * border_top_width}px;` +\n `border-bottom-width: ${t * border_bottom_width}px;`\n };\n}\nfunction scale(node, { delay = 0, duration = 400, easing = cubicOut, start = 0, opacity = 0 } = {}) {\n const style = getComputedStyle(node);\n const target_opacity = +style.opacity;\n const transform = style.transform === 'none' ? '' : style.transform;\n const sd = 1 - start;\n const od = target_opacity * (1 - opacity);\n return {\n delay,\n duration,\n easing,\n css: (_t, u) => `\n\t\t\ttransform: ${transform} scale(${1 - (sd * u)});\n\t\t\topacity: ${target_opacity - (od * u)}\n\t\t`\n };\n}\nfunction draw(node, { delay = 0, speed, duration, easing = cubicInOut } = {}) {\n let len = node.getTotalLength();\n const style = getComputedStyle(node);\n if (style.strokeLinecap !== 'butt') {\n len += parseInt(style.strokeWidth);\n }\n if (duration === undefined) {\n if (speed === undefined) {\n duration = 800;\n }\n else {\n duration = len / speed;\n }\n }\n else if (typeof duration === 'function') {\n duration = duration(len);\n }\n return {\n delay,\n duration,\n easing,\n css: (t, u) => `stroke-dasharray: ${t * len} ${u * len}`\n };\n}\nfunction crossfade(_a) {\n var { fallback } = _a, defaults = __rest(_a, [\"fallback\"]);\n const to_receive = new Map();\n const to_send = new Map();\n function crossfade(from, node, params) {\n const { delay = 0, duration = d => Math.sqrt(d) * 30, easing = cubicOut } = assign(assign({}, defaults), params);\n const to = node.getBoundingClientRect();\n const dx = from.left - to.left;\n const dy = from.top - to.top;\n const dw = from.width / to.width;\n const dh = from.height / to.height;\n const d = Math.sqrt(dx * dx + dy * dy);\n const style = getComputedStyle(node);\n const transform = style.transform === 'none' ? '' : style.transform;\n const opacity = +style.opacity;\n return {\n delay,\n duration: is_function(duration) ? duration(d) : duration,\n easing,\n css: (t, u) => `\n\t\t\t\topacity: ${t * opacity};\n\t\t\t\ttransform-origin: top left;\n\t\t\t\ttransform: ${transform} translate(${u * dx}px,${u * dy}px) scale(${t + (1 - t) * dw}, ${t + (1 - t) * dh});\n\t\t\t`\n };\n }\n function transition(items, counterparts, intro) {\n return (node, params) => {\n items.set(params.key, {\n rect: node.getBoundingClientRect()\n });\n return () => {\n if (counterparts.has(params.key)) {\n const { rect } = counterparts.get(params.key);\n counterparts.delete(params.key);\n return crossfade(rect, node, params);\n }\n // if the node is disappearing altogether\n // (i.e. wasn't claimed by the other list)\n // then we need to supply an outro\n items.delete(params.key);\n return fallback && fallback(node, params, intro);\n };\n };\n }\n return [\n transition(to_send, to_receive, false),\n transition(to_receive, to_send, true)\n ];\n}\n\nexport { blur, crossfade, draw, fade, fly, scale, slide };\n", "\r\n\r\n\r\n\r\n\t\r\n\t
    \r\n\t\t{#each lineage as item}\r\n\t\t
    \r\n\t\t\t
  1. \r\n\t\t\t\t
    ToggleItem(item._id)}\" class=\"item-image\">
    \r\n\t\t\t\t

    ToggleItem(item._id)}\" class=\"item-name\">{item.name}

    \r\n\t\t\t\t
    \r\n\t\t\t\t\t {sheet?._chatItem(item._id)}}>\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t
    \r\n\t\t\t
  2. \r\n\t\t\t{#if showItems[item._id]}\r\n\t\t\t
    \r\n\t\t\t\t{@html item.system.description}\r\n\t\t\t
    \r\n\t\t\t{/if}\r\n\t\t
    \r\n\t\t{/each}\r\n\t
\r\n
\r\n\r\n", "\r\n\r\n\r\n\r\n\t\r\n\t\r\n\r\n\t
    \r\n\t\t{#each gear as item}\r\n\t\t
    \r\n\t\t\t
  1. \r\n\t\t\t\t
    ToggleItem(item._id)}\" class=\"item-image\">
    \r\n\t\t\t\t

    ToggleItem(item._id)}\" class=\"item-name\">{item.name}

    \r\n\t\t\t\t
    \r\n\t\t\t\t\t {sheet?._chatItem(item._id)}}>\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t
    \r\n\t\t\t
  2. \r\n\t\t\t{#if showItems[item._id]} \r\n\t\t\t
    \r\n\t\t\t\t{@html item.system.description}\r\n\t\t\t
    \r\n\t\t\t{/if}\r\n\t\t
    \r\n\t\t{/each}\r\n\t\t
  3. \r\n
    \r\n
    \r\n
    \r\n Add item\r\n
    \r\n
  4. \r\n\t
\r\n
\r\n\r\n", "\r\n\r\n\r\n\r\n\t\r\n\t
    \r\n\t\t{#each techniques as item}\r\n\t\t
    \r\n\t\t\t
  1. \r\n\t\t\t\t
    ToggleItem(item._id)}\" class=\"item-image\">
    \r\n\t\t\t\t

    ToggleItem(item._id)}\" class=\"item-name\">{item.name}

    \r\n\t\t\t\t
    \r\n\t\t\t\t\t {sheet?._chatItem(item._id)}}>\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t
    \r\n\t\t\t
  2. \r\n\t\t\t{#if showItems[item._id]}\r\n\t\t\t
    \r\n\t\t\t\t{@html item.system.description}\r\n\t\t\t
    \r\n\t\t\t{/if}\r\n\t\t
    \r\n\t\t{/each}\r\n\t
\r\n
\r\n\r\n", "\r\n\r\n\r\n\r\n\t\r\n\t
    \r\n\t\t{#each injury as item}\r\n\t\t
    \r\n\t\t\t
  1. \r\n\t\t\t\t
    ToggleItem(item._id)}\" class=\"item-image\">
    \r\n\t\t\t\t

    ToggleItem(item._id)}\" class=\"item-name\">{item.name}

    \r\n\t\t\t\t
    \r\n\t\t\t\t\t {sheet?._chatItem(item._id)}}>\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t
    \r\n\t\t\t
  2. \r\n\t\t\t{#if showItems[item._id]}\r\n\t\t\t
    \r\n\t\t\t\t{@html item.system.description}\r\n\t\t\t
    \r\n\t\t\t{/if}\r\n\t\t
    \r\n\t\t{/each}\r\n\t\t
  3. \r\n
    \r\n
    \r\n
    \r\n Add injury\r\n
    \r\n
  4. \r\n\t
\r\n
\r\n\r\n", "\r\n
\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\r\n
\r\n", "\r\n\r\n
\r\n\t\r\n
\r\n\r\n\r\n\t\r\n\t\r\n\r\n\r\n\r\n", "/**\r\n * Extend the basic ActorSheet with some very simple modifications\r\n * @extends {ActorSheet}\r\n */\r\n\r\nimport VagabondsActorSheetBase from \"../svelte/VagabondsActorSheetBase.svelte\"; // import Svelte App\r\nimport { writable } from \"svelte/store\";\r\n\r\nexport class VagabondsActorSheet extends ActorSheet {\r\n app = null;\r\n dataStore = null;\r\n\r\n /** @override */\r\n static get defaultOptions() {\r\n return foundry.utils.mergeObject(super.defaultOptions, {\r\n classes: [\"vagabonds\", \"sheet\", \"actor\"],\r\n template: \"systems/vagabonds/templates/actor/actor-sheetv2.html\",\r\n width: 640,\r\n height: 700,\r\n tabs: [\r\n {\r\n navSelector: \".sheet-tabs\",\r\n contentSelector: \".sheet-body\",\r\n initial: \"description\"\r\n }\r\n ]\r\n });\r\n }\r\n\r\n /* -------------------------------------------- */\r\n\r\n\r\n /** @override */\r\n getData() {\r\n const data = super.getData();\r\n\r\n // Prepare items.\r\n if (this.actor.type == \"character\") {\r\n this._prepareCharacterItems(data);\r\n }\r\n\r\n //console.log(data);\r\n return data;\r\n }\r\n\r\n _prepareCharacterItems(sheetData) {\r\n const actorData = sheetData.data;\r\n\r\n // Initialize containers.\r\n const gear = [];\r\n const techniques = [];\r\n const lineage = [];\r\n const injury = [];\r\n const approach = [];\r\n const trait = [];\r\n // Iterate through items, allocating to containers\r\n // let totalWeight = 0;\r\n for (let i of sheetData.items) {\r\n i.img = i.img || DEFAULT_TOKEN;\r\n // Append to features.\r\n\r\n switch (i.type) {\r\n case \"item\":\r\n gear.push(i);\r\n break;\r\n case \"lineage\":\r\n lineage.push(i);\r\n break;\r\n case \"technique\":\r\n techniques.push(i);\r\n break;\r\n case \"injury\":\r\n injury.push(i);\r\n break;\r\n case \"approach\":\r\n approach.push(i);\r\n break;\r\n case \"trait\":\r\n trait.push(i);\r\n }\r\n }\r\n\r\n // Assign and return\r\n sheetData.gear = gear.sort((a, b) => a.sort - b.sort);\r\n sheetData.techniques = techniques.sort((a, b) => a.sort - b.sort);;\r\n sheetData.lineage = lineage;\r\n sheetData.injury = injury.sort((a, b) => a.sort - b.sort);;\r\n sheetData.approach = approach;\r\n sheetData.trait = trait;\r\n sheetData.sheet = this;\r\n }\r\n\r\n async migrateData(...args){ \r\n super.migrateData(...args);\r\n //Let's migrate system data? \r\n console.log('Attempting to migrate system data');\r\n }\r\n\r\n\r\n /** @override */\r\n activateListeners(html) {\r\n super.activateListeners(html);\r\n\r\n // Everything below here is only needed if the sheet is editable\r\n if (!this.options.editable) return;\r\n\r\n // Add Inventory Item\r\n html.find(\".item-create\").click(this._onItemCreate.bind(this));\r\n\r\n // Update Inventory Item\r\n html.find(\".item-edit\").click((ev) => {\r\n const li = $(ev.currentTarget).parents(\".item\");\r\n //const item = this.actor.getOwnedItem(li.data(\"itemId\"));\r\n const item = this.actor.items.get(li.data(\"itemId\"));\r\n item.sheet.render(true);\r\n });\r\n\r\n html.find(\".item-name\").dblclick((ev) => {\r\n const li = $(ev.currentTarget).parents(\".item\");\r\n //const item = this.actor.getOwnedItem(li.data(\"itemId\"));\r\n const item = this.actor.items.get(li.data(\"itemId\"));\r\n item.sheet.render(true);\r\n });\r\n\r\n // Delete Inventory Item\r\n html.find(\".item-delete\").click((ev) => {\r\n const li = $(ev.currentTarget).parents(\".item\");\r\n const item = this.actor.items.get(li.data(\"itemId\"));\r\n item.delete();\r\n li.slideUp(200, () => this.render(false));\r\n });\r\n\r\n // Rollable abilities.\r\n html.find(\".rollable\").click(this._onRoll.bind(this));\r\n }\r\n\r\n async _onItemDelete(itemId) {\r\n const item = this.actor.items.get(itemId);\r\n item.delete();\r\n this.render();\r\n }\r\n\r\n /* -------------------------------------------- */\r\n\r\n /**\r\n * Handle creating a new Owned Item for the actor using initial data defined in the HTML dataset\r\n * @param {Event} event The originating click event\r\n * @private\r\n */\r\n async _onItemCreate(event) {\r\n event.preventDefault();\r\n const header = event.currentTarget;\r\n // Get the type of item to create.\r\n const type = header.dataset.type;\r\n // Grab any data associated with this control.\r\n const data = foundry.utils.duplicate(header.dataset);\r\n // Initialize a default name.\r\n const name = `New ${type.capitalize()}`;\r\n // Prepare the item object.\r\n const itemData = {\r\n name: name,\r\n type: type\r\n };\r\n // Finally, create the item!\r\n\r\n return await Item.create(itemData, { parent: this.actor }).then(\r\n (item) => {\r\n item.sheet.render(true);\r\n }\r\n );\r\n }\r\n\r\n async _onItemEdit(itemId) {\r\n const item = this.actor.items.get(itemId);\r\n item.sheet.render(true);\r\n }\r\n\r\n /**\r\n * Handle clickable rolls.\r\n * @param {Event} event The originating click event\r\n * @private\r\n */\r\n _onRoll(event) {\r\n event.preventDefault();\r\n const element = event.currentTarget;\r\n const dataset = element.dataset;\r\n\r\n if (dataset.roll) {\r\n let roll = new Roll(dataset.roll, this.actor);\r\n let label = dataset.label ? `Rolling ${dataset.label}` : \"\";\r\n roll.roll().toMessage({\r\n speaker: ChatMessage.getSpeaker({ actor: this.actor }),\r\n flavor: label\r\n });\r\n }\r\n\r\n if (dataset.defend) {\r\n game.vagabonds.RollHelper.displayRollModal(true);\r\n }\r\n }\r\n\r\n async _chatItem(id) {\r\n const item = this.actor.items.get(id);\r\n let template = \"systems/vagabonds/templates/chat/ability.html\";\r\n item.system.description = await TextEditor.enrichHTML(\r\n item.system.description,\r\n { async: true }\r\n );\r\n let data = { ability: item, actor: this.actor.system };\r\n \r\n const html = await renderTemplate(template, data);\r\n\r\n const chatData = {\r\n actor: this.actor._id,\r\n type: CONST.CHAT_MESSAGE_STYLES.OTHER,\r\n content: html,\r\n speaker: {\r\n actor: this.actor\r\n }\r\n };\r\n return ChatMessage.create(chatData);\r\n\r\n\r\n }\r\n\r\n render(force = false, options = {}) {\r\n // Grab the sheetdata for both updates and new apps.\r\n let sheetData = this.getData();\r\n // Exit if Vue has already rendered.\r\n if (this.app !== null) {\r\n let states = Application.RENDER_STATES;\r\n if (\r\n this._state == states.RENDERING ||\r\n this._state == states.RENDERED\r\n ) {\r\n // Update the Datastore.\r\n this.dataStore?.set(sheetData);\r\n return;\r\n }\r\n }\r\n // Run the normal Foundry render once.\r\n this._render(force, options)\r\n .catch((err) => {\r\n err.message = `An error occurred while rendering ${this.constructor.name} ${this.appId}: ${err.message}`;\r\n console.error(err);\r\n this._state = Application.RENDER_STATES.ERROR;\r\n })\r\n // Run Svelte's render, assign it to our prop for tracking.\r\n .then((rendered) => {\r\n // Prepare the actor data.\r\n this.dataStore = writable(sheetData);\r\n //console.log(sheetData);\r\n this.app = new VagabondsActorSheetBase({\r\n target: this.element.find(\"form\").get(0),\r\n props: {\r\n dataStore: this.dataStore\r\n //name: 'world',\r\n }\r\n });\r\n });\r\n // Update editable permission\r\n options.editable = options.editable ?? this.object.isOwner;\r\n\r\n // Register the active Application with the referenced Documents\r\n this.object.apps[this.appId] = this;\r\n // Return per the overridden method.\r\n return this;\r\n }\r\n\r\n close(options = {}) {\r\n if (this.app != null) {\r\n this.app.$destroy();\r\n this.app = null;\r\n this.dataStore = null;\r\n }\r\n return super.close(options);\r\n }\r\n}\r\n", "/**\r\n * Extend the basic ActorSheet with some very simple modifications\r\n * @extends {ActorSheet}\r\n */\r\nexport class VagabondsNPCSheet extends ActorSheet {\r\n\r\n /** @override */\r\n static get defaultOptions() {\r\n return foundry.utils.mergeObject(super.defaultOptions, {\r\n classes: [\"vagabonds\", \"sheet\", \"actor\"],\r\n template: \"systems/vagabonds/templates/actor/npc-sheet.html\",\r\n width: 600,\r\n height: 700,\r\n tabs: [{ navSelector: \".sheet-tabs\", contentSelector: \".sheet-body\", initial: \"description\" }]\r\n });\r\n }\r\n\r\n /* -------------------------------------------- */\r\n\r\n getData() {\r\n const data = super.getData(); \r\n return data;\r\n }\r\n\r\n\r\n /** @override */\r\n activateListeners(html) {\r\n super.activateListeners(html);\r\n\r\n // Everything below here is only needed if the sheet is editable\r\n if (!this.options.editable) return;\r\n\r\n // Add Inventory Item\r\n html.find('.item-create').click(this._onItemCreate.bind(this));\r\n\r\n\r\n // Chat Item\r\n html.find('.item-speak').click(ev => {\r\n ev.stopPropagation()\r\n const li = $(ev.currentTarget).parents(\".item\");\r\n this._chatItem(li.data(\"itemId\"));\r\n });\r\n\r\n // Update Inventory Item\r\n html.find('.item-edit').click(ev => {\r\n const li = $(ev.currentTarget).parents(\".item\");\r\n //const item = this.actor.getOwnedItem(li.data(\"itemId\"));\r\n const item = this.actor.items.get(li.data(\"itemId\"));\r\n item.sheet.render(true);\r\n });\r\n\r\n html.find('.item-name').dblclick(ev => {\r\n const li = $(ev.currentTarget).parents(\".item\");\r\n //const item = this.actor.getOwnedItem(li.data(\"itemId\"));\r\n const item = this.actor.items.get(li.data(\"itemId\"));\r\n item.sheet.render(true);\r\n });\r\n \r\n // Delete Inventory Item\r\n html.find('.item-delete').click(ev => {\r\n const li = $(ev.currentTarget).parents(\".item\");\r\n // this.actor.deleteOwnedItem(li.data(\"itemId\"));\r\n this.actor.deleteEmbeddedDocuments(\"Item\", [li.data(\"itemId\")])\r\n li.slideUp(200, () => this.render(false));\r\n });\r\n\r\n html.find('li.item').click(ev => {\r\n const li = $(ev.currentTarget);\r\n const desc = li.find('.npc_item_desc');\r\n if (desc.is(':visible')) {\r\n desc.slideUp(\"slow\");\r\n } else {\r\n desc.slideDown(\"slow\");\r\n }\r\n });\r\n\r\n }\r\n\r\n \r\n\r\n\r\n \r\n async _chatItem(id) {\r\n const item = this.actor.items.get(id);\r\n let template = \"systems/vagabonds/templates/chat/ability.html\";\r\n item.system.description = await TextEditor.enrichHTML(\r\n item.system.description,\r\n { async: true }\r\n );\r\n let data = { ability: item, actor: this.actor.system }; \r\n const html = await renderTemplate(template, data);\r\n\r\n const chatData = {\r\n actor: this.actor._id,\r\n type: CONST.CHAT_MESSAGE_STYLES.OTHER,\r\n content: html,\r\n speaker: {\r\n actor: this.actor\r\n }\r\n };\r\n return ChatMessage.create(chatData);\r\n\r\n\r\n}\r\n\r\n\r\n\r\n /* -------------------------------------------- */\r\n\r\n /**\r\n * Handle creating a new Owned Item for the actor using initial data defined in the HTML dataset\r\n * @param {Event} event The originating click event\r\n * @private\r\n */\r\n async _onItemCreate(event) {\r\n event.preventDefault();\r\n const header = event.currentTarget;\r\n // Get the type of item to create.\r\n const type = header.dataset.type;\r\n // Grab any data associated with this control.\r\n const data = foundry.utils.duplicate(header.dataset);\r\n // Initialize a default name.\r\n const name = `New ${type.capitalize()}`;\r\n // Prepare the item object.\r\n const itemData = {\r\n name: name,\r\n type: type,\r\n data: data\r\n };\r\n // Remove the type from the dataset since it's in the itemData.type prop.\r\n delete itemData.data[\"type\"];\r\n\r\n // Finally, create the item!\r\n //return this.actor.createOwnedItem(itemData);\r\n await this.actor.createEmbeddedDocuments('Item', [itemData], {});\r\n\r\n }\r\n\r\n}\r\n", "/**\r\n * Extend the basic Item with some very simple modifications.\r\n * @extends {Item}\r\n */\r\nexport class VagabondsItem extends Item {\r\n /**\r\n * Augment the basic Item data model with additional dynamic data.\r\n */\r\n \r\n prepareData() {\r\n super.prepareData();\r\n\r\n // Get the Item's data\r\n\r\n const itemData = this;\r\n\r\n //const actorData = this.actor ? this.actor.data : {};\r\n //const data = itemData.data;\r\n \r\n if (itemData.type == \"injury\" && itemData.img == 'icons/svg/item-bag.svg') { \r\n itemData.img = 'systems/vagabonds/assets/cut-palm.svg'\r\n } else if(itemData.type == \"item\" && itemData.img == 'icons/svg/item-bag.svg') { \r\n itemData.img = 'systems/vagabonds/assets/swap-bag.svg'\r\n } else if(itemData.type == \"technique\" && itemData.img == 'icons/svg/item-bag.svg') { \r\n itemData.img = 'systems/vagabonds/assets/swords-emblem.svg'\r\n } \r\n\r\n //console.log(itemData);\r\n }\r\n\r\n async _preCreate(data, options, user) {\r\n await super._preCreate(data, options, user);\r\n this.updateSource({ sort: Date.now() });\r\n }\r\n\r\n}", "/**\r\n * Extend the basic ItemSheet with some very simple modifications\r\n * @extends {ItemSheet}\r\n */\r\nexport class VagabondsItemSheet extends ItemSheet {\r\n\r\n /** @override */\r\n static get defaultOptions() {\r\n return foundry.utils.mergeObject(super.defaultOptions, {\r\n classes: [\"vagabonds\", \"sheet\", \"item\"],\r\n width: 520,\r\n height: 480,\r\n tabs: [{ navSelector: \".sheet-tabs\", contentSelector: \".sheet-body\", initial: \"description\" }]\r\n });\r\n }\r\n\r\n /** @override */\r\n get template() {\r\n const path = \"systems/vagabonds/templates/item\";\r\n // Return a single sheet for all item types.\r\n return `${path}/item-sheet.html`;\r\n // Alternatively, you could use the following return statement to do a\r\n // unique item sheet by type, like `weapon-sheet.html`.\r\n\r\n // return `${path}/${this.item.data.type}-sheet.html`;\r\n }\r\n\r\n /* -------------------------------------------- */\r\n\r\n /** @override */\r\n async getData() {\r\n const data = super.getData();\r\n data.enrichedDescription = await TextEditor.enrichHTML(this.object.system.description, {async: true});\r\n return data;\r\n }\r\n\r\n /* -------------------------------------------- */\r\n\r\n /** @override */\r\n setPosition(options = {}) {\r\n const position = super.setPosition(options);\r\n const sheetBody = this.element.find(\".sheet-body\");\r\n const bodyHeight = position.height - 192;\r\n sheetBody.css(\"height\", bodyHeight);\r\n return position;\r\n }\r\n\r\n /* -------------------------------------------- */\r\n\r\n /** @override */\r\n activateListeners(html) {\r\n super.activateListeners(html);\r\n\r\n // Everything below here is only needed if the sheet is editable\r\n if (!this.options.editable) return;\r\n\r\n // Roll handlers, click handlers, etc. would go here.\r\n }\r\n}\r\n", "// Bind event to d20 icon\r\n\r\n\r\nexport class RollHelper {\r\n static async displayRollModal(defend) {\r\n defend = (typeof defend !== 'undefined') ? defend : \"\";\r\n if (defend == true) { defend = \"checked\";}\r\n let confirmed = false;\r\n // Add modifier for a d20 roll\r\n new Dialog({\r\n title: \"Roll + Apptitude\",\r\n content: `\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n Yes\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n `,\r\n buttons: {\r\n one: {\r\n icon: '',\r\n label: \"Roll!\",\r\n callback: () => confirmed = true\r\n },\r\n two: {\r\n icon: '',\r\n label: \"Cancel\",\r\n callback: () => confirmed = false\r\n }\r\n },\r\n default: \"Cancel\",\r\n close: html => {\r\n if (confirmed) {\r\n let rollModifier = parseInt(html.find('[name=modifier-value]')[0].value);\r\n let rollisDefense= html.find(`[name=rolltype-defense]`).is(\":checked\");\r\n let rollType =html.find('[name=roll-adv]')[0].value;\r\n //let token = canvas.tokens.controlled;\r\n let actor = game.user.character ?? canvas.tokens.controlled[0]?.actor ?? game.actors.find(a => a.owner);\r\n\r\n //console.log(token);\r\n if (actor == undefined) {\r\n ui.notifications.error(\"You must select a token to roll\");\r\n return\r\n }\r\n let roll;\r\n let RollTemplate;\r\n let baseRoll = \"2d6\";\r\n console.log(rollType);\r\n if (rollType == \"adv\") baseRoll = \"3d6kh2\"\r\n if (rollType == \"dis\") baseRoll = \"3d6kl2\"\r\n\r\n if (rollModifier >= 0) { \r\n\r\n roll = new Roll(baseRoll + \" +\" + rollModifier, actor);\r\n } else {\r\n roll = new Roll(baseRoll + rollModifier, actor);\r\n\r\n }\r\n roll.evaluate( ).then(\r\n function(result) {\r\n //console.log(result); // \"Stuff worked!\"\r\n //Set Roll Type\r\n let RollResult;\r\n if (rollisDefense == true) {\r\n //Making a defense roll\r\n RollResult = {type: \"defend\", high: \"0\", low:\"0\", damage:\"No\", outcome:\" Outright success\", roll: roll };\r\n if (result.terms[0].results[0].result > result.terms[0].results[1].result) {\r\n RollResult.high = result.terms[0].results[0].result;\r\n RollResult.low = result.terms[0].results[1].result;\r\n } else {\r\n RollResult.low = result.terms[0].results[0].result;\r\n RollResult.high = result.terms[0].results[1].result;\r\n }\r\n\r\n if (result._total < 7) {\r\n RollResult.outcome = \"Failure\";\r\n RollResult.damage = (RollResult.high - result.data.system.armor.value);\r\n } else if (result._total < 10) {\r\n RollResult.outcome = \"Partial Success\";\r\n RollResult.damage = (RollResult.low - result.data.system.armor.value)\r\n } \r\n\r\n if (RollResult.damage < 0) { RollResult.damage = 0; }\r\n \r\n let template = 'systems/vagabonds/templates/chat/rolls.html';\r\n RollTemplate = renderTemplate(template, RollResult).then(content => {\r\n result.toMessage({\r\n user: game.user.id,\r\n speaker: ChatMessage.getSpeaker({actor: result.data}),\r\n flavor: content,\r\n });\r\n });\r\n\r\n } else {\r\n //Normal Roll\r\n RollResult = {type: \"action\", outcome:\"Complete Success\", apptitude: rollModifier, roll: result };\r\n if (result._total < 7) {\r\n RollResult.outcome = \"Failure\";\r\n } else if (result._total < 10) {\r\n RollResult.outcome = \"Partial Success\";\r\n } else if (result._total > 12) {\r\n RollResult.outcome = \"Critical Success\";\r\n }\r\n let template = 'systems/vagabonds/templates/chat/rolls.html';\r\n RollTemplate = renderTemplate(template, RollResult).then(content => {\r\n result.toMessage({\r\n speaker: ChatMessage.getSpeaker({ }),//actor: this.actor }),\r\n flavor: content,\r\n });\r\n });\r\n \r\n }\r\n }\r\n );\r\n }\r\n }\r\n }).render(true);\r\n }\r\n\r\n} ", "\r\nexport class VagabondsBaseActorModel extends foundry.abstract.TypeDataModel {\r\n static defineSchema() {\r\n const fields = foundry.data.fields;\r\n return {\r\n health: new fields.SchemaField({\r\n value: new fields.NumberField({\r\n required: true,\r\n initial: 8,\r\n integer: true\r\n }),\r\n min: new fields.NumberField({\r\n required: true,\r\n initial: 0,\r\n integer: true\r\n }),\r\n max: new fields.NumberField({\r\n required: true,\r\n initial: 8,\r\n integer: true\r\n })\r\n }),\r\n speed: new fields.SchemaField({\r\n value: new fields.NumberField({\r\n required: true,\r\n initial: 0,\r\n integer: true\r\n }),\r\n min: new fields.NumberField({\r\n required: true,\r\n initial: -10,\r\n integer: true\r\n }),\r\n max: new fields.NumberField({\r\n required: true,\r\n initial: 15,\r\n integer: true\r\n })\r\n }),\r\n armor: new fields.SchemaField({\r\n value: new fields.NumberField({\r\n required: true,\r\n initial: 0,\r\n integer: true\r\n }),\r\n min: new fields.NumberField({\r\n required: true,\r\n initial: 0,\r\n integer: true\r\n }),\r\n max: new fields.NumberField({\r\n required: true,\r\n initial: 20,\r\n integer: true\r\n })\r\n }),\r\n attributes: new fields.SchemaField({\r\n level: new fields.SchemaField({\r\n value: new fields.NumberField({\r\n required: true,\r\n initial: 1,\r\n integer: true\r\n })\r\n }),\r\n xp: new fields.SchemaField({\r\n value: new fields.NumberField({\r\n required: true,\r\n initial: 0,\r\n integer: true\r\n }),\r\n min: new fields.NumberField({\r\n required: true,\r\n initial: 0,\r\n integer: true\r\n }),\r\n max: new fields.NumberField({\r\n required: true,\r\n initial: 100,\r\n integer: true\r\n })\r\n })\r\n })\r\n };\r\n }\r\n}\r\n\r\nexport class VagabondsActorDataModel extends VagabondsBaseActorModel {\r\n static defineSchema() {\r\n const fields = foundry.data.fields;\r\n return foundry.utils.mergeObject(super.defineSchema(), {\r\n aproaches : new fields.SchemaField({\r\n conflict: new fields.StringField({\r\n nullable:false,\r\n required: true,\r\n initial:\"\"\r\n }),\r\n goal: new fields.StringField({\r\n nullable:false,\r\n required: true,\r\n initial:\"\"\r\n }),\r\n gimmick: new fields.StringField({\r\n nullable:false,\r\n required: true,\r\n initial:\"\"\r\n }),\r\n background: new fields.StringField({\r\n nullable:false,\r\n required: true,\r\n initial:\"\"\r\n }),\r\n foreground: new fields.StringField({\r\n nullable:false,\r\n required: true,\r\n initial:\"\"\r\n }),\r\n weakness: new fields.StringField({\r\n nullable:false,\r\n required: true,\r\n initial:\"\"\r\n }),\r\n wealth: new fields.StringField({\r\n nullable:false,\r\n required: true,\r\n initial:\"\"\r\n }),\r\n a1: new fields.StringField({\r\n nullable:false,\r\n required: true,\r\n initial:\"\"\r\n }),\r\n a2: new fields.StringField({\r\n nullable:false,\r\n required: true,\r\n initial:\"\"\r\n }),\r\n a3: new fields.StringField({\r\n nullable:false,\r\n required: true,\r\n initial:\"\"\r\n }),\r\n a4: new fields.StringField({\r\n nullable:false,\r\n required: true,\r\n initial:\"\"\r\n }),\r\n a5: new fields.StringField({\r\n nullable:false,\r\n required: true,\r\n initial:\"\"\r\n }),\r\n a6: new fields.StringField({\r\n nullable:false,\r\n required: true,\r\n initial:\"\"\r\n }),\r\n coreflaw: new fields.StringField({\r\n nullable:false,\r\n required: true,\r\n initial:\"\"\r\n }),\r\n }),\r\n });\r\n }\r\n\r\n}\r\n\r\n\r\n\r\nexport class VagabondsNPCDataModel extends VagabondsBaseActorModel {\r\n static defineSchema() {\r\n const fields = foundry.data.fields;\r\n return foundry.utils.mergeObject(super.defineSchema(), {\r\n damage: new fields.SchemaField({\r\n value: new fields.NumberField({\r\n required: true,\r\n initial: 1,\r\n integer: true\r\n })}),\r\n description: new fields.StringField({\r\n nullable:false,\r\n required: true,\r\n initial:\"\"\r\n }),\r\n traits: new fields.StringField({\r\n nullable:false,\r\n required: true,\r\n initial:\"\"\r\n }),\r\n combat_notes: new fields.StringField({\r\n nullable:false,\r\n required: true,\r\n initial:\"\"\r\n }),\r\n });\r\n }\r\n }\r\n\r\n\r\n export class VagabondsBaseItemModel extends foundry.abstract.TypeDataModel {\r\n\r\n static defineSchema() {\r\n const fields = foundry.data.fields;\r\n return {\r\n description: new fields.StringField({\r\n nullable:false,\r\n required: true,\r\n initial:\"\"\r\n })\r\n };\r\n }\r\n }", "// Import Modules\r\nimport { VagabondsActor } from \"./actor/actor.js\";\r\nimport { VagabondsActorSheet } from \"./actor/actor-sheet.js\";\r\nimport { VagabondsNPCSheet } from \"./actor/npc-sheet.js\";\r\nimport { VagabondsItem } from \"./item/item.js\";\r\nimport { VagabondsItemSheet } from \"./item/item-sheet.js\";\r\nimport { RollHelper } from \"./helper/roll_helper.js\";\r\nimport { VagabondsActorDataModel, VagabondsNPCDataModel, VagabondsBaseItemModel } from \"./data-models.js\";\r\n\r\nHooks.once('init', async function() {\r\n\r\n game.vagabonds = {\r\n VagabondsActor,\r\n VagabondsItem,\r\n RollHelper\r\n };\r\n\r\n\r\n /**\r\n * Set an initiative formula for the system\r\n * @type {String}\r\n */\r\n CONFIG.Combat.initiative = {\r\n formula: \"@speed.value\",\r\n decimals: 2\r\n };\r\n CONFIG.Vagabonds = {};\r\n\r\n // Define custom Entity classes\r\n CONFIG.Actor.documentClass = VagabondsActor;\r\n CONFIG.Actor.dataModels.character = VagabondsActorDataModel;\r\n CONFIG.Actor.dataModels.npc = VagabondsNPCDataModel;\r\n\r\n CONFIG.Item.documentClass = VagabondsItem;\r\n CONFIG.Item.dataModels.item = VagabondsBaseItemModel;\r\n CONFIG.Item.dataModels.approach = VagabondsBaseItemModel;\r\n CONFIG.Item.dataModels.technique = VagabondsBaseItemModel;\r\n CONFIG.Item.dataModels.lineage = VagabondsBaseItemModel;\r\n CONFIG.Item.dataModels.injury = VagabondsBaseItemModel;\r\n CONFIG.Item.dataModels.trait = VagabondsBaseItemModel;\r\n\r\n CONFIG.Vagabonds.tokenHPColors = {\r\n damage: 15711680,\r\n healing: 65280\r\n }\r\n\r\n //foundry.data.ItemData.DEFAULT_ICON = \"icons/containers/bags/pack-leather-brown.webp\";\r\n\r\n // Register sheet application classes\r\n Actors.unregisterSheet(\"core\", ActorSheet);\r\n\r\n Actors.registerSheet(\"vagabonds\", VagabondsNPCSheet, { types: [\"npc\"], makeDefault: true });\r\n Actors.registerSheet(\"vagabonds\", VagabondsActorSheet, { types: [\"character\"],makeDefault: true });\r\n \r\n Items.unregisterSheet(\"core\", ItemSheet);\r\n Items.registerSheet(\"vagabonds\", VagabondsItemSheet, { makeDefault: true });\r\n\r\n // If you need to add Handlebars helpers, here are a few useful examples:\r\n Handlebars.registerHelper('concat', function() {\r\n var outStr = '';\r\n for (var arg in arguments) {\r\n if (typeof arguments[arg] != 'object') {\r\n outStr += arguments[arg];\r\n }\r\n }\r\n return outStr;\r\n });\r\n\r\n Handlebars.registerHelper('toLowerCase', function(str) {\r\n return str.toLowerCase();\r\n });\r\n\r\n Handlebars.registerHelper('ifCond', function (v1, operator, v2, options) {\r\n\r\n switch (operator) {\r\n case '==':\r\n return (v1 == v2) ? options.fn(this) : options.inverse(this);\r\n case '===':\r\n return (v1 === v2) ? options.fn(this) : options.inverse(this);\r\n case '!=':\r\n return (v1 != v2) ? options.fn(this) : options.inverse(this);\r\n case '!==':\r\n return (v1 !== v2) ? options.fn(this) : options.inverse(this);\r\n case '<':\r\n return (v1 < v2) ? options.fn(this) : options.inverse(this);\r\n case '<=':\r\n return (v1 <= v2) ? options.fn(this) : options.inverse(this);\r\n case '>':\r\n return (v1 > v2) ? options.fn(this) : options.inverse(this);\r\n case '>=':\r\n return (v1 >= v2) ? options.fn(this) : options.inverse(this);\r\n case '&&':\r\n return (v1 && v2) ? options.fn(this) : options.inverse(this);\r\n case '||':\r\n return (v1 || v2) ? options.fn(this) : options.inverse(this);\r\n default:\r\n return options.inverse(this);\r\n }\r\n });\r\n \r\n\r\n});\r\n\r\nHooks.on(\"renderSidebarTab\", (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,QAAQ;AAAA,WACtD;AACD,eAAQ,KAAK,KAAM,QAAQ,GAAG,QAAQ,QAAQ,QAAQ;AAAA,WACrD;AACD,eAAQ,MAAM,KAAM,QAAQ,GAAG,QAAQ,QAAQ,QAAQ;AAAA,WACtD;AACD,eAAQ,MAAM,KAAM,QAAQ,GAAG,QAAQ,QAAQ,QAAQ;AAAA,WACtD;AACD,eAAQ,MAAM,KAAM,QAAQ,GAAG,QAAQ,QAAQ,QAAQ;AAAA;AAEvD,eAAO,QAAQ,QAAQ;AAAA;AAAA;AAAA;AAOnC,MAAM,GAAG,oBAAoB,CAAC,KAAK,MAAM,SAAS;AAChD,OAAK,KAAK,sBAAsB,MAAM,OAAO,UAAU;AACrD,eAAW;AAAA;AAAA;", "names": [] } diff --git a/module/actor/actor-sheet.js b/module/actor/actor-sheet.js index ddec367..7bdbba3 100644 --- a/module/actor/actor-sheet.js +++ b/module/actor/actor-sheet.js @@ -81,10 +81,10 @@ export class VagabondsActorSheet extends ActorSheet { } // Assign and return - sheetData.gear = gear; - sheetData.techniques = techniques; + sheetData.gear = gear.sort((a, b) => a.sort - b.sort); + sheetData.techniques = techniques.sort((a, b) => a.sort - b.sort);; sheetData.lineage = lineage; - sheetData.injury = injury; + sheetData.injury = injury.sort((a, b) => a.sort - b.sort);; sheetData.approach = approach; sheetData.trait = trait; sheetData.sheet = this; @@ -199,6 +199,30 @@ export class VagabondsActorSheet extends ActorSheet { } } + async _chatItem(id) { + const item = this.actor.items.get(id); + let template = "systems/vagabonds/templates/chat/ability.html"; + item.system.description = await TextEditor.enrichHTML( + item.system.description, + { async: true } + ); + let data = { ability: item, actor: this.actor.system }; + + const html = await renderTemplate(template, data); + + const chatData = { + actor: this.actor._id, + type: CONST.CHAT_MESSAGE_STYLES.OTHER, + content: html, + speaker: { + actor: this.actor + } + }; + return ChatMessage.create(chatData); + + + } + render(force = false, options = {}) { // Grab the sheetdata for both updates and new apps. let sheetData = this.getData(); diff --git a/module/actor/actor.js b/module/actor/actor.js index 822a923..c276058 100644 --- a/module/actor/actor.js +++ b/module/actor/actor.js @@ -31,4 +31,89 @@ export class VagabondsActor extends Actor { return actorData } + async _preUpdate(changed, options, user) { + if ( (await super._preUpdate(changed, options, user)) === false ) return false; + + if ( "health" in (this.system || {}) ) { + foundry.utils.setProperty(options, "vagabonds.health", { ...this.system.health }); + } + } + + async _onUpdate(data, options, userId) { + super._onUpdate(data, options, userId); + + const curr =this.system.health.value; + const hp = options.vagabonds?.health; + + if (hp) { + const changes = { + hp: curr - hp.value, + }; + changes.total = changes.hp; + + this._displayTokenEffect(changes); + + // const isDead = this.system.health.value <= 0; + // if (isDead) { + // this._displayTokenMessage('Dead', CONFIG.Vagabonds.tokenHPColors['damage'] ) + // } + } + } + + _displayTokenMessage(message, fill) { + const tokens = this.isToken ? [this.token] : this.getActiveTokens(true, true); + if ( !tokens.length ) return; + + for ( const token of tokens ) { + if ( !token.object?.visible || !token.object?.renderable ) continue; + const t = token.object; + canvas.interface.createScrollingText(t.center, message, { + anchor: CONST.TEXT_ANCHOR_POINTS.TOP, + // Adapt the font size relative to the Actor's HP total to emphasize more significant blows + fontSize: 48, // Range between [16, 48] + fill: fill, + stroke: 0x000000, + strokeThickness: 4, + jitter: 0.25 + }); + } + + +} + + _displayTokenEffect(changes) { + let key; + let value; + if ( changes.hp < 0 ) { + key = "damage"; + value = changes.total; + } else if ( changes.hp > 0 ) { + key = "healing"; + value = changes.total; + } + + if ( !key || !value ) return; + + const tokens = this.isToken ? [this.token] : this.getActiveTokens(true, true); + if ( !tokens.length ) return; + + const pct = Math.clamp(Math.abs(value) / this.system.health.max, 0, 1); + const fill = CONFIG.Vagabonds.tokenHPColors[key]; + + for ( const token of tokens ) { + if ( !token.object?.visible || !token.object?.renderable ) continue; + const t = token.object; + canvas.interface.createScrollingText(t.center, value.signedString(), { + anchor: CONST.TEXT_ANCHOR_POINTS.TOP, + // Adapt the font size relative to the Actor's HP total to emphasize more significant blows + fontSize: 16 + (32 * pct), // Range between [16, 48] + fill: fill, + stroke: 0x000000, + strokeThickness: 4, + jitter: 0.25 + }); + } + } + + } \ No newline at end of file diff --git a/module/actor/npc-sheet.js b/module/actor/npc-sheet.js index c4f73c9..2ab084f 100644 --- a/module/actor/npc-sheet.js +++ b/module/actor/npc-sheet.js @@ -10,7 +10,7 @@ export class VagabondsNPCSheet extends ActorSheet { classes: ["vagabonds", "sheet", "actor"], template: "systems/vagabonds/templates/actor/npc-sheet.html", width: 600, - height: 440, + height: 700, tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "description" }] }); } @@ -32,7 +32,15 @@ export class VagabondsNPCSheet extends ActorSheet { // Add Inventory Item html.find('.item-create').click(this._onItemCreate.bind(this)); - + + + // Chat Item + html.find('.item-speak').click(ev => { + ev.stopPropagation() + const li = $(ev.currentTarget).parents(".item"); + this._chatItem(li.data("itemId")); + }); + // Update Inventory Item html.find('.item-edit').click(ev => { const li = $(ev.currentTarget).parents(".item"); @@ -56,9 +64,47 @@ export class VagabondsNPCSheet extends ActorSheet { li.slideUp(200, () => this.render(false)); }); + html.find('li.item').click(ev => { + const li = $(ev.currentTarget); + const desc = li.find('.npc_item_desc'); + if (desc.is(':visible')) { + desc.slideUp("slow"); + } else { + desc.slideDown("slow"); + } + }); + } + + + + async _chatItem(id) { + const item = this.actor.items.get(id); + let template = "systems/vagabonds/templates/chat/ability.html"; + item.system.description = await TextEditor.enrichHTML( + item.system.description, + { async: true } + ); + let data = { ability: item, actor: this.actor.system }; + const html = await renderTemplate(template, data); + + const chatData = { + actor: this.actor._id, + type: CONST.CHAT_MESSAGE_STYLES.OTHER, + content: html, + speaker: { + actor: this.actor + } + }; + return ChatMessage.create(chatData); + + +} + + + /* -------------------------------------------- */ /** diff --git a/module/actor/sheet.html b/module/actor/sheet.html new file mode 100644 index 0000000..ab0d5f8 --- /dev/null +++ b/module/actor/sheet.html @@ -0,0 +1,162 @@ + + + + + Phoenix Character Sheet + + + +
+
+ Character Image +
+
Phoenix
+
+
+ +
+
+
Level
+
1
+
+
+
HP
+
4 / 8
+
+
+
Speed
+
3
+
+
+
Armor
+
0
+
+
+
Exp
+
100
+
+
+ +
+
Traits
+
+
My Approach to Conflict:
+
My Conflict:
+
My Goal:
+
My Gimmick:
+
My Background:
+
My Background 2:
+
My Foreground:
+
My Weakness:
+
Additional Traits Per Level:
+
My other Trait:
+
My other Trait 2:
+
My other Trait 3s:
+
My other Trait 4:
+
My other Trait 5:
+
My other Trait 6:
+
+
+ +
+
Core Flaw
+
+ Once per session, use to wriggle into or out of trouble, or succumb for +3xp
+ Core Flaw +
+
+ +
+
Lineage
+
+ Elf +
+
+ +
+
Equipment
+
+ -1 speed for each loaded-down limb and point of armor; at -7, you are immobilized
+ New Item +
+
+ +
+
Techniques
+
+
Beastspeak
+
Control Vegetation
+
+
+ +
+
Injury
+
+ Add injury +
+
+
+ + diff --git a/module/data-models.js b/module/data-models.js index e1229cb..386513e 100644 --- a/module/data-models.js +++ b/module/data-models.js @@ -1,59 +1,211 @@ -export class VagabondsActorDataModel extends foundry.abstract.TypeDataModel { +export class VagabondsBaseActorModel extends foundry.abstract.TypeDataModel { + static defineSchema() { + const fields = foundry.data.fields; + return { + health: new fields.SchemaField({ + value: new fields.NumberField({ + required: true, + initial: 8, + integer: true + }), + min: new fields.NumberField({ + required: true, + initial: 0, + integer: true + }), + max: new fields.NumberField({ + required: true, + initial: 8, + integer: true + }) + }), + speed: new fields.SchemaField({ + value: new fields.NumberField({ + required: true, + initial: 0, + integer: true + }), + min: new fields.NumberField({ + required: true, + initial: -10, + integer: true + }), + max: new fields.NumberField({ + required: true, + initial: 15, + integer: true + }) + }), + armor: new fields.SchemaField({ + value: new fields.NumberField({ + required: true, + initial: 0, + integer: true + }), + min: new fields.NumberField({ + required: true, + initial: 0, + integer: true + }), + max: new fields.NumberField({ + required: true, + initial: 20, + integer: true + }) + }), + attributes: new fields.SchemaField({ + level: new fields.SchemaField({ + value: new fields.NumberField({ + required: true, + initial: 1, + integer: true + }) + }), + xp: new fields.SchemaField({ + value: new fields.NumberField({ + required: true, + initial: 0, + integer: true + }), + min: new fields.NumberField({ + required: true, + initial: 0, + integer: true + }), + max: new fields.NumberField({ + required: true, + initial: 100, + integer: true + }) + }) + }) + }; + } +} + +export class VagabondsActorDataModel extends VagabondsBaseActorModel { static defineSchema() { const fields = foundry.data.fields; - return { - health: new fields.SchemaField({ - value: new fields.NumberField({ + return foundry.utils.mergeObject(super.defineSchema(), { + aproaches : new fields.SchemaField({ + conflict: new fields.StringField({ + nullable:false, required: true, - initial: 8, - integer: true + initial:"" }), - min: new fields.NumberField({ + goal: new fields.StringField({ + nullable:false, required: true, - initial: 0, - integer: true + initial:"" }), - max: new fields.NumberField({ + gimmick: new fields.StringField({ + nullable:false, required: true, - initial: 8, - integer: true - }) - }), - speed: new fields.SchemaField({ - value: new fields.NumberField({ + initial:"" + }), + background: new fields.StringField({ + nullable:false, required: true, - initial: 3, - integer: true + initial:"" }), - min: new fields.NumberField({ + foreground: new fields.StringField({ + nullable:false, required: true, - initial: -10, - integer: true + initial:"" }), - max: new fields.NumberField({ + weakness: new fields.StringField({ + nullable:false, required: true, - initial: 15, - integer: true - }) - }), - armor: new fields.SchemaField({ - value: new fields.NumberField({ + initial:"" + }), + wealth: new fields.StringField({ + nullable:false, required: true, - initial: 0, - integer: true + initial:"" }), - min: new fields.NumberField({ + a1: new fields.StringField({ + nullable:false, required: true, - initial: 0, - integer: true + initial:"" }), - max: new fields.NumberField({ + a2: new fields.StringField({ + nullable:false, required: true, - initial: 20, - integer: true - }) - }), - }; + initial:"" + }), + a3: new fields.StringField({ + nullable:false, + required: true, + initial:"" + }), + a4: new fields.StringField({ + nullable:false, + required: true, + initial:"" + }), + a5: new fields.StringField({ + nullable:false, + required: true, + initial:"" + }), + a6: new fields.StringField({ + nullable:false, + required: true, + initial:"" + }), + coreflaw: new fields.StringField({ + nullable:false, + required: true, + initial:"" + }), + }), + }); } } + + + +export class VagabondsNPCDataModel extends VagabondsBaseActorModel { + static defineSchema() { + const fields = foundry.data.fields; + return foundry.utils.mergeObject(super.defineSchema(), { + damage: new fields.SchemaField({ + value: new fields.NumberField({ + required: true, + initial: 1, + integer: true + })}), + description: new fields.StringField({ + nullable:false, + required: true, + initial:"" + }), + traits: new fields.StringField({ + nullable:false, + required: true, + initial:"" + }), + combat_notes: new fields.StringField({ + nullable:false, + required: true, + initial:"" + }), + }); + } + } + + + export class VagabondsBaseItemModel extends foundry.abstract.TypeDataModel { + + static defineSchema() { + const fields = foundry.data.fields; + return { + description: new fields.StringField({ + nullable:false, + required: true, + initial:"" + }) + }; + } + } diff --git a/module/svelte/VagabondsActorSheetBodyLeft.svelte b/module/svelte/VagabondsActorSheetBodyLeft.svelte index 7b483aa..8dc7a35 100644 --- a/module/svelte/VagabondsActorSheetBodyLeft.svelte +++ b/module/svelte/VagabondsActorSheetBodyLeft.svelte @@ -14,24 +14,28 @@

- + - + - + - + - + - + + + + + diff --git a/module/svelte/VagabondsActorSheetHeader.svelte b/module/svelte/VagabondsActorSheetHeader.svelte index 8e23bfa..ea7e307 100644 --- a/module/svelte/VagabondsActorSheetHeader.svelte +++ b/module/svelte/VagabondsActorSheetHeader.svelte @@ -11,7 +11,7 @@ */ const filePicker = (event) => { const attr = event.currentTarget.dataset.edit; - const current = getProperty($sheetData.actor, attr); + const current = foundry.utils.getProperty($sheetData.actor, attr); const fp = new FilePicker({ type: "image", current: current, diff --git a/module/svelte/VagabondsGear.svelte b/module/svelte/VagabondsGear.svelte index f6a60da..fec0371 100644 --- a/module/svelte/VagabondsGear.svelte +++ b/module/svelte/VagabondsGear.svelte @@ -43,6 +43,7 @@

{item.name}

diff --git a/module/svelte/VagabondsInjury.svelte b/module/svelte/VagabondsInjury.svelte index 8a720ca..7a43c7c 100644 --- a/module/svelte/VagabondsInjury.svelte +++ b/module/svelte/VagabondsInjury.svelte @@ -39,6 +39,7 @@

{item.name}

diff --git a/module/svelte/VagabondsLinage.svelte b/module/svelte/VagabondsLinage.svelte index c5a638a..fdd2cdf 100644 --- a/module/svelte/VagabondsLinage.svelte +++ b/module/svelte/VagabondsLinage.svelte @@ -39,6 +39,7 @@

{item.name}

diff --git a/module/svelte/VagabondsTechnique.svelte b/module/svelte/VagabondsTechnique.svelte index 5c60839..4dba1ec 100644 --- a/module/svelte/VagabondsTechnique.svelte +++ b/module/svelte/VagabondsTechnique.svelte @@ -38,6 +38,7 @@

{item.name}

diff --git a/module/vagabonds.js b/module/vagabonds.js index 5c2c31c..c30758a 100644 --- a/module/vagabonds.js +++ b/module/vagabonds.js @@ -5,6 +5,7 @@ import { VagabondsNPCSheet } from "./actor/npc-sheet.js"; import { VagabondsItem } from "./item/item.js"; import { VagabondsItemSheet } from "./item/item-sheet.js"; import { RollHelper } from "./helper/roll_helper.js"; +import { VagabondsActorDataModel, VagabondsNPCDataModel, VagabondsBaseItemModel } from "./data-models.js"; Hooks.once('init', async function() { @@ -14,6 +15,7 @@ Hooks.once('init', async function() { RollHelper }; + /** * Set an initiative formula for the system * @type {String} @@ -22,10 +24,25 @@ Hooks.once('init', async function() { formula: "@speed.value", decimals: 2 }; + CONFIG.Vagabonds = {}; // Define custom Entity classes CONFIG.Actor.documentClass = VagabondsActor; + CONFIG.Actor.dataModels.character = VagabondsActorDataModel; + CONFIG.Actor.dataModels.npc = VagabondsNPCDataModel; + CONFIG.Item.documentClass = VagabondsItem; + CONFIG.Item.dataModels.item = VagabondsBaseItemModel; + CONFIG.Item.dataModels.approach = VagabondsBaseItemModel; + CONFIG.Item.dataModels.technique = VagabondsBaseItemModel; + CONFIG.Item.dataModels.lineage = VagabondsBaseItemModel; + CONFIG.Item.dataModels.injury = VagabondsBaseItemModel; + CONFIG.Item.dataModels.trait = VagabondsBaseItemModel; + + CONFIG.Vagabonds.tokenHPColors = { + damage: 15711680, + healing: 65280 + } //foundry.data.ItemData.DEFAULT_ICON = "icons/containers/bags/pack-leather-brown.webp"; diff --git a/system.json b/system.json index 6baf429..fe5d792 100644 --- a/system.json +++ b/system.json @@ -2,13 +2,13 @@ "id": "vagabonds", "title": "Vagabonds of Dyfed", "description": "The Vagabonds of Dyfed system for FoundryVTT!", - "version": "0.5.0", + "version": "0.5.1", "compatibility": { "minimum": 12, "verified": 12, "maximum": 12 }, - "templateVersion": 4, + "templateVersion": 5, "author": "Phoenix", "authors": [ { @@ -60,6 +60,6 @@ "secondaryTokenAttribute": "speed", "url": "https://github.com/jsavko/vagabonds", "manifest": "https://raw.githubusercontent.com/jsavko/vagabonds/main/system.json", - "download": "https://github.com/jsavko/vagabonds/archive/refs/tags/0.5.0.zip", + "download": "https://github.com/jsavko/vagabonds/archive/refs/tags/0.5.1.zip", "license": "LICENSE.txt" } diff --git a/template.json b/template.json index 397216f..f7bb932 100644 --- a/template.json +++ b/template.json @@ -1,110 +1,9 @@ { "Actor": { - "types": ["character", "npc"], - "templates": { - "base": { - "name": "", - "health": { - "value": 8, - "min": 0, - "max": 8, - "temp": 0, - "tempmax": 0 - }, - "speed": { - "value": 3, - "min": -10, - "max": 15 - }, - "armor": { - "value": 0, - "min": 0, - "max": 20 - } - } - }, - "character": { - "templates": ["base"], - "biography": "", - "attributes": { - "level": { - "value": 1 - }, - "xp": { - "value": 1, - "min": 0, - "max": 100 - } - }, - "version": 0, - "aproaches": { - "conflict": "", - "goal": "", - "gimmick": "", - "background": "", - "foreground": "", - "weakness": "", - "a1": "", - "a2": "", - "a3": "", - "a4": "", - "a5": "", - "a6": "", - "coreflaw": "", - "lineage": "" - } - }, - "npc": { - "templates": ["base"], - "biography": "", - "damage": { - "value": 1 - }, - "traits": "", - "combat_notes": "" - } + "types": ["character", "npc"] }, "Item": { "types": ["item", "approach", "technique", "lineage", "injury","trait"], - "templates": { - "base": { - "description": "" - } - }, - "item": { - "templates": ["base"], - "quantity": 1, - "weight": 0 - }, - "approach": { - "templates": ["base"], - "label": "", - "value": "", - "corrupted": false - }, - "technique": { - "templates": ["base"], - "label": "", - "value": "", - "corrupted": false - }, - "lineage": { - "templates": ["base"], - "label": "", - "value": "", - "corrupted": false - }, - "injury": { - "templates": ["base"], - "label": "", - "value": "", - "corrupted": false - }, - "trait": { - "templates": ["base"], - "label": "", - "value": "", - "type": "" - } + "htmlFields": ["description"] } } diff --git a/templates/actor/npc-sheet.html b/templates/actor/npc-sheet.html index b0cc3e9..773c3ed 100644 --- a/templates/actor/npc-sheet.html +++ b/templates/actor/npc-sheet.html @@ -36,14 +36,21 @@

-
+
+ +
-
+
+ +
-
+
+ + +
    @@ -56,12 +63,19 @@

    {{#each actor.items as |item id|}}
  1. +

    {{item.name}}

    +
    +
    +
    + {{{item.system.description}}} +
    +
  2. {{/each}}

diff --git a/templates/chat/ability.html b/templates/chat/ability.html new file mode 100644 index 0000000..97f8173 --- /dev/null +++ b/templates/chat/ability.html @@ -0,0 +1,4 @@ +
+

{{ability.name}}

+
{{{ability.system.description}}}
+