diff --git a/Dockerfile b/Dockerfile index 8ca5030..a1c877c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,9 @@ RUN CGO_ENABLED=0 GOOS=linux go build -o /shioriko RUN mkdir -p /web && cp -r web/static web/template /web FROM scratch AS runtime + +WORKDIR / COPY --from=build /shioriko / -COPY --from=build /web / +COPY --from=build /web /web ENTRYPOINT ["/shioriko"] diff --git a/pkg/app/blob_routes.go b/pkg/app/blob_routes.go index dad7a8f..1042565 100644 --- a/pkg/app/blob_routes.go +++ b/pkg/app/blob_routes.go @@ -2,6 +2,7 @@ package app import ( "net/http" + "os" "path/filepath" "github.com/Damillora/Shioriko/pkg/config" @@ -32,9 +33,18 @@ func uploadBlob(c *gin.Context) { }) } id := uuid.NewString() + folder1 := id[0:2] + if _, err := os.Stat(filepath.Join(dataDir, folder1)); os.IsNotExist(err) { + os.Mkdir(filepath.Join(dataDir, folder1), 0755) + } + folder2 := id[2:4] + if _, err := os.Stat(filepath.Join(dataDir, folder1, folder2)); os.IsNotExist(err) { + os.Mkdir(filepath.Join(dataDir, folder1, folder2), 0755) + } + filename := id + filepath.Ext(file.Filename) - err = c.SaveUploadedFile(file, filepath.Join(dataDir, filename)) + err = c.SaveUploadedFile(file, filepath.Join(dataDir, folder1, folder2, filename)) if err != nil { c.JSON(http.StatusBadRequest, models.ErrorResponse{ Code: http.StatusBadRequest, @@ -44,7 +54,7 @@ func uploadBlob(c *gin.Context) { blob := database.Blob{ ID: id, - FilePath: filename, + FilePath: filepath.Join(folder1, folder2, filename), } database.DB.Create(&blob) diff --git a/web/app/package.json b/web/app/package.json index 3e8dde6..290e6db 100644 --- a/web/app/package.json +++ b/web/app/package.json @@ -18,6 +18,7 @@ "svelte": "^3.0.0" }, "dependencies": { + "query-string": "^7.0.0", "sirv-cli": "^1.0.0", "svelte-routing": "^1.6.0" } diff --git a/web/app/src/routes/Post.svelte b/web/app/src/routes/Post.svelte index bdf8979..a1d8772 100644 --- a/web/app/src/routes/Post.svelte +++ b/web/app/src/routes/Post.svelte @@ -9,6 +9,13 @@ post = data; } + const trimUrl = (str) => { + if(str.length > 30) { + return str.substring(0,30) + "..."; + } + return str; + } + onMount(() => {getData()}); @@ -25,19 +32,23 @@ {#if post}
-
-
+
+

- Source URL: {post.source_url} + Source URL: {trimUrl(post.source_url)}

Tags: {#each post.tags as tag (tag)} - {tag} +

    +
  • + {tag} +
  • +
{/each}

-
+
diff --git a/web/app/src/routes/Posts.svelte b/web/app/src/routes/Posts.svelte index 063d74c..1e6eea7 100644 --- a/web/app/src/routes/Posts.svelte +++ b/web/app/src/routes/Posts.svelte @@ -2,16 +2,34 @@ import { onMount } from "svelte"; import { getPosts } from "../api.js"; import { Link} from "svelte-routing"; + import queryString from "query-string"; + + export let location; let page = 1; let totalPages = 1; let posts = []; const getData = async () => { const data = await getPosts({page}); - posts = data.posts; + if(Array.isArray(data.posts)) { + posts = data.posts; + } } - onMount(() => { getData(); }) + onMount(() => { + let queryParams; + $: queryParams = queryString.parse(location.search); + if(queryParams.page) { + page = queryParams.page; + } + getData(); + }) + const handlePage = (i) => { + return () => { + page = 1; + getData(); + } + }
@@ -24,9 +42,48 @@
-
+ +
{#each posts as post (post.id)} -
+
@@ -37,7 +94,9 @@
{#each post.tags as tag (tag)} - {tag} +

+ {tag} +

{/each}
diff --git a/web/app/src/routes/Tag.svelte b/web/app/src/routes/Tag.svelte index afcfa16..15d20b8 100644 --- a/web/app/src/routes/Tag.svelte +++ b/web/app/src/routes/Tag.svelte @@ -2,6 +2,9 @@ import { onMount } from "svelte"; import { getPostsTag } from "../api.js"; import { Link} from "svelte-routing"; + import queryString from "query-string"; + + export let location; export let id; @@ -10,10 +13,25 @@ let posts = []; const getData = async () => { const data = await getPostsTag({page, tag: id}); - posts = data.posts; + if(Array.isArray(data.posts)) { + posts = data.posts; + } } - onMount(() => { getData(); }) + onMount(() => { + let queryParams; + queryParams = queryString.parse(location.search); + if(queryParams.page) { + page = queryParams.page; + } + getData(); + }) + const handlePage = (i) => { + return () => { + page = 1; + getData(); + } + }
@@ -22,16 +40,55 @@ {id}

- Tag + Tag

-
+ +
{#each posts as post (post.id)} -
+
@@ -42,7 +99,9 @@
{#each post.tags as tag (tag)} - {tag} +

+ {tag} +

{/each}
diff --git a/web/app/yarn.lock b/web/app/yarn.lock index 7263c4e..dc7ecaf 100644 --- a/web/app/yarn.lock +++ b/web/app/yarn.lock @@ -198,6 +198,11 @@ console-clear@^1.1.0: resolved "https://registry.yarnpkg.com/console-clear/-/console-clear-1.1.1.tgz#995e20cbfbf14dd792b672cde387bd128d674bf7" integrity sha512-pMD+MVR538ipqkG5JXeOEbKWS5um1H4LUUccUQG68qpeqBYbzYy79Gh55jkd2TtPdRfUaLWdv6LPP//5Zt0aPQ== +decode-uri-component@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" + integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= + dedent-js@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/dedent-js/-/dedent-js-1.0.1.tgz#bee5fb7c9e727d85dffa24590d10ec1ab1255305" @@ -235,6 +240,11 @@ fill-range@^7.0.1: dependencies: to-regex-range "^5.0.1" +filter-obj@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/filter-obj/-/filter-obj-1.1.0.tgz#9b311112bc6c6127a16e016c6c5d7f19e0805c5b" + integrity sha1-mzERErxsYSehbgFsbF1/GeCAXFs= + fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" @@ -470,6 +480,16 @@ picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.2: resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.3.tgz#465547f359ccc206d3c48e46a1bcb89bf7ee619d" integrity sha512-KpELjfwcCDUb9PeigTs2mBJzXUPzAuP2oPcA989He8Rte0+YUAjw1JVedDhuTKPkHjSYzMN3npC9luThGYEKdg== +query-string@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/query-string/-/query-string-7.0.0.tgz#aaad2c8d5c6a6d0c6afada877fecbd56af79e609" + integrity sha512-Iy7moLybliR5ZgrK/1R3vjrXq03S13Vz4Rbm5Jg3EFq1LUmQppto0qtXz4vqZ386MSRjZgnTSZ9QC+NZOSd/XA== + dependencies: + decode-uri-component "^0.2.0" + filter-obj "^1.1.0" + split-on-first "^1.0.0" + strict-uri-encode "^2.0.0" + randombytes@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" @@ -613,6 +633,16 @@ sourcemap-codec@^1.4.4: resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz#ea804bd94857402e6992d05a38ef1ae35a9ab4c4" integrity sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA== +split-on-first@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/split-on-first/-/split-on-first-1.1.0.tgz#f610afeee3b12bce1d0c30425e76398b78249a5f" + integrity sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw== + +strict-uri-encode@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546" + integrity sha1-ucczDHBChi9rFC3CdLvMWGbONUY= + supports-color@^5.3.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" diff --git a/web/static/bundle.js b/web/static/bundle.js index 9a4e863..30a32b0 100644 --- a/web/static/bundle.js +++ b/web/static/bundle.js @@ -1,4707 +1,2 @@ - -(function(l, r) { if (l.getElementById('livereloadscript')) return; r = l.createElement('script'); r.async = 1; r.src = '//' + (window.location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1'; r.id = 'livereloadscript'; l.getElementsByTagName('head')[0].appendChild(r) })(window.document); -var app = (function () { - 'use strict'; - - function noop() { } - function assign(tar, src) { - // @ts-ignore - for (const k in src) - tar[k] = src[k]; - return tar; - } - function add_location(element, file, line, column, char) { - element.__svelte_meta = { - loc: { file, line, column, char } - }; - } - function run(fn) { - return fn(); - } - function blank_object() { - return Object.create(null); - } - function run_all(fns) { - fns.forEach(run); - } - function is_function(thing) { - return typeof thing === 'function'; - } - function safe_not_equal(a, b) { - return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function'); - } - function is_empty(obj) { - return Object.keys(obj).length === 0; - } - function validate_store(store, name) { - if (store != null && typeof store.subscribe !== 'function') { - throw new Error(`'${name}' is not a store with a 'subscribe' method`); - } - } - function subscribe(store, ...callbacks) { - if (store == null) { - return noop; - } - const unsub = store.subscribe(...callbacks); - return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub; - } - function component_subscribe(component, store, callback) { - component.$$.on_destroy.push(subscribe(store, callback)); - } - function create_slot(definition, ctx, $$scope, fn) { - if (definition) { - const slot_ctx = get_slot_context(definition, ctx, $$scope, fn); - return definition[0](slot_ctx); - } - } - function get_slot_context(definition, ctx, $$scope, fn) { - return definition[1] && fn - ? assign($$scope.ctx.slice(), definition[1](fn(ctx))) - : $$scope.ctx; - } - function get_slot_changes(definition, $$scope, dirty, fn) { - if (definition[2] && fn) { - const lets = definition[2](fn(dirty)); - if ($$scope.dirty === undefined) { - return lets; - } - if (typeof lets === 'object') { - const merged = []; - const len = Math.max($$scope.dirty.length, lets.length); - for (let i = 0; i < len; i += 1) { - merged[i] = $$scope.dirty[i] | lets[i]; - } - return merged; - } - return $$scope.dirty | lets; - } - return $$scope.dirty; - } - function update_slot(slot, slot_definition, ctx, $$scope, dirty, get_slot_changes_fn, get_slot_context_fn) { - const slot_changes = get_slot_changes(slot_definition, $$scope, dirty, get_slot_changes_fn); - if (slot_changes) { - const slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn); - slot.p(slot_context, slot_changes); - } - } - function exclude_internal_props(props) { - const result = {}; - for (const k in props) - if (k[0] !== '$') - result[k] = props[k]; - return result; - } - function compute_rest_props(props, keys) { - const rest = {}; - keys = new Set(keys); - for (const k in props) - if (!keys.has(k) && k[0] !== '$') - rest[k] = props[k]; - return rest; - } - - function append(target, node) { - target.appendChild(node); - } - function insert(target, node, anchor) { - target.insertBefore(node, anchor || null); - } - function detach(node) { - node.parentNode.removeChild(node); - } - function element(name) { - return document.createElement(name); - } - function text(data) { - return document.createTextNode(data); - } - function space() { - return text(' '); - } - function empty() { - return text(''); - } - function listen(node, event, handler, options) { - node.addEventListener(event, handler, options); - return () => node.removeEventListener(event, handler, options); - } - function prevent_default(fn) { - return function (event) { - event.preventDefault(); - // @ts-ignore - return fn.call(this, event); - }; - } - function attr(node, attribute, value) { - if (value == null) - node.removeAttribute(attribute); - else if (node.getAttribute(attribute) !== value) - node.setAttribute(attribute, value); - } - function set_attributes(node, attributes) { - // @ts-ignore - const descriptors = Object.getOwnPropertyDescriptors(node.__proto__); - for (const key in attributes) { - if (attributes[key] == null) { - node.removeAttribute(key); - } - else if (key === 'style') { - node.style.cssText = attributes[key]; - } - else if (key === '__value') { - node.value = node[key] = attributes[key]; - } - else if (descriptors[key] && descriptors[key].set) { - node[key] = attributes[key]; - } - else { - attr(node, key, attributes[key]); - } - } - } - function children(element) { - return Array.from(element.childNodes); - } - function set_input_value(input, value) { - input.value = value == null ? '' : value; - } - function custom_event(type, detail) { - const e = document.createEvent('CustomEvent'); - e.initCustomEvent(type, false, false, detail); - return e; - } - - let current_component; - function set_current_component(component) { - current_component = component; - } - function get_current_component() { - if (!current_component) - throw new Error('Function called outside component initialization'); - return current_component; - } - function onMount(fn) { - get_current_component().$$.on_mount.push(fn); - } - function onDestroy(fn) { - get_current_component().$$.on_destroy.push(fn); - } - function createEventDispatcher() { - const component = get_current_component(); - return (type, detail) => { - const callbacks = component.$$.callbacks[type]; - if (callbacks) { - // TODO are there situations where events could be dispatched - // in a server (non-DOM) environment? - const event = custom_event(type, detail); - callbacks.slice().forEach(fn => { - fn.call(component, event); - }); - } - }; - } - function setContext(key, context) { - get_current_component().$$.context.set(key, context); - } - function getContext(key) { - return get_current_component().$$.context.get(key); - } - - const dirty_components = []; - const binding_callbacks = []; - const render_callbacks = []; - const flush_callbacks = []; - const resolved_promise = Promise.resolve(); - let update_scheduled = false; - function schedule_update() { - if (!update_scheduled) { - update_scheduled = true; - resolved_promise.then(flush); - } - } - function add_render_callback(fn) { - render_callbacks.push(fn); - } - let flushing = false; - const seen_callbacks = new Set(); - function flush() { - if (flushing) - return; - flushing = true; - do { - // first, call beforeUpdate functions - // and update components - for (let i = 0; i < dirty_components.length; i += 1) { - const component = dirty_components[i]; - set_current_component(component); - update(component.$$); - } - set_current_component(null); - dirty_components.length = 0; - while (binding_callbacks.length) - binding_callbacks.pop()(); - // then, once components are updated, call - // afterUpdate functions. This may cause - // subsequent updates... - for (let i = 0; i < render_callbacks.length; i += 1) { - const callback = render_callbacks[i]; - if (!seen_callbacks.has(callback)) { - // ...so guard against infinite loops - seen_callbacks.add(callback); - callback(); - } - } - render_callbacks.length = 0; - } while (dirty_components.length); - while (flush_callbacks.length) { - flush_callbacks.pop()(); - } - update_scheduled = false; - flushing = false; - seen_callbacks.clear(); - } - function update($$) { - if ($$.fragment !== null) { - $$.update(); - run_all($$.before_update); - const dirty = $$.dirty; - $$.dirty = [-1]; - $$.fragment && $$.fragment.p($$.ctx, dirty); - $$.after_update.forEach(add_render_callback); - } - } - const outroing = new Set(); - let outros; - function group_outros() { - outros = { - r: 0, - c: [], - p: outros // parent group - }; - } - function check_outros() { - if (!outros.r) { - run_all(outros.c); - } - outros = outros.p; - } - function transition_in(block, local) { - if (block && block.i) { - outroing.delete(block); - block.i(local); - } - } - function transition_out(block, local, detach, callback) { - if (block && block.o) { - if (outroing.has(block)) - return; - outroing.add(block); - outros.c.push(() => { - outroing.delete(block); - if (callback) { - if (detach) - block.d(1); - callback(); - } - }); - block.o(local); - } - } - function outro_and_destroy_block(block, lookup) { - transition_out(block, 1, 1, () => { - lookup.delete(block.key); - }); - } - function update_keyed_each(old_blocks, dirty, get_key, dynamic, ctx, list, lookup, node, destroy, create_each_block, next, get_context) { - let o = old_blocks.length; - let n = list.length; - let i = o; - const old_indexes = {}; - while (i--) - old_indexes[old_blocks[i].key] = i; - const new_blocks = []; - const new_lookup = new Map(); - const deltas = new Map(); - i = n; - while (i--) { - const child_ctx = get_context(ctx, list, i); - const key = get_key(child_ctx); - let block = lookup.get(key); - if (!block) { - block = create_each_block(key, child_ctx); - block.c(); - } - else if (dynamic) { - block.p(child_ctx, dirty); - } - new_lookup.set(key, new_blocks[i] = block); - if (key in old_indexes) - deltas.set(key, Math.abs(i - old_indexes[key])); - } - const will_move = new Set(); - const did_move = new Set(); - function insert(block) { - transition_in(block, 1); - block.m(node, next); - lookup.set(block.key, block); - next = block.first; - n--; - } - while (o && n) { - const new_block = new_blocks[n - 1]; - const old_block = old_blocks[o - 1]; - const new_key = new_block.key; - const old_key = old_block.key; - if (new_block === old_block) { - // do nothing - next = new_block.first; - o--; - n--; - } - else if (!new_lookup.has(old_key)) { - // remove old block - destroy(old_block, lookup); - o--; - } - else if (!lookup.has(new_key) || will_move.has(new_key)) { - insert(new_block); - } - else if (did_move.has(old_key)) { - o--; - } - else if (deltas.get(new_key) > deltas.get(old_key)) { - did_move.add(new_key); - insert(new_block); - } - else { - will_move.add(old_key); - o--; - } - } - while (o--) { - const old_block = old_blocks[o]; - if (!new_lookup.has(old_block.key)) - destroy(old_block, lookup); - } - while (n) - insert(new_blocks[n - 1]); - return new_blocks; - } - function validate_each_keys(ctx, list, get_context, get_key) { - const keys = new Set(); - for (let i = 0; i < list.length; i++) { - const key = get_key(get_context(ctx, list, i)); - if (keys.has(key)) { - throw new Error('Cannot have duplicate keys in a keyed each'); - } - keys.add(key); - } - } - - function get_spread_update(levels, updates) { - const update = {}; - const to_null_out = {}; - const accounted_for = { $$scope: 1 }; - let i = levels.length; - while (i--) { - const o = levels[i]; - const n = updates[i]; - if (n) { - for (const key in o) { - if (!(key in n)) - to_null_out[key] = 1; - } - for (const key in n) { - if (!accounted_for[key]) { - update[key] = n[key]; - accounted_for[key] = 1; - } - } - levels[i] = n; - } - else { - for (const key in o) { - accounted_for[key] = 1; - } - } - } - for (const key in to_null_out) { - if (!(key in update)) - update[key] = undefined; - } - return update; - } - function get_spread_object(spread_props) { - return typeof spread_props === 'object' && spread_props !== null ? spread_props : {}; - } - function create_component(block) { - block && block.c(); - } - function mount_component(component, target, anchor, customElement) { - const { fragment, on_mount, on_destroy, after_update } = component.$$; - fragment && fragment.m(target, anchor); - if (!customElement) { - // onMount happens before the initial afterUpdate - add_render_callback(() => { - const new_on_destroy = on_mount.map(run).filter(is_function); - if (on_destroy) { - on_destroy.push(...new_on_destroy); - } - else { - // Edge case - component was destroyed immediately, - // most likely as a result of a binding initialising - run_all(new_on_destroy); - } - component.$$.on_mount = []; - }); - } - after_update.forEach(add_render_callback); - } - function destroy_component(component, detaching) { - const $$ = component.$$; - if ($$.fragment !== null) { - run_all($$.on_destroy); - $$.fragment && $$.fragment.d(detaching); - // TODO null out other refs, including component.$$ (but need to - // preserve final state?) - $$.on_destroy = $$.fragment = null; - $$.ctx = []; - } - } - function make_dirty(component, i) { - if (component.$$.dirty[0] === -1) { - dirty_components.push(component); - schedule_update(); - component.$$.dirty.fill(0); - } - component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31)); - } - function init(component, options, instance, create_fragment, not_equal, props, dirty = [-1]) { - const parent_component = current_component; - set_current_component(component); - const $$ = component.$$ = { - fragment: null, - ctx: null, - // state - props, - update: noop, - not_equal, - bound: blank_object(), - // lifecycle - on_mount: [], - on_destroy: [], - on_disconnect: [], - before_update: [], - after_update: [], - context: new Map(parent_component ? parent_component.$$.context : options.context || []), - // everything else - callbacks: blank_object(), - dirty, - skip_bound: false - }; - let ready = false; - $$.ctx = instance - ? instance(component, options.props || {}, (i, ret, ...rest) => { - const value = rest.length ? rest[0] : ret; - if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) { - if (!$$.skip_bound && $$.bound[i]) - $$.bound[i](value); - if (ready) - make_dirty(component, i); - } - return ret; - }) - : []; - $$.update(); - ready = true; - run_all($$.before_update); - // `false` as a special case of no DOM component - $$.fragment = create_fragment ? create_fragment($$.ctx) : false; - if (options.target) { - if (options.hydrate) { - const nodes = children(options.target); - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - $$.fragment && $$.fragment.l(nodes); - nodes.forEach(detach); - } - else { - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - $$.fragment && $$.fragment.c(); - } - if (options.intro) - transition_in(component.$$.fragment); - mount_component(component, options.target, options.anchor, options.customElement); - flush(); - } - set_current_component(parent_component); - } - /** - * Base class for Svelte components. Used when dev=false. - */ - class SvelteComponent { - $destroy() { - destroy_component(this, 1); - this.$destroy = noop; - } - $on(type, callback) { - const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = [])); - callbacks.push(callback); - return () => { - const index = callbacks.indexOf(callback); - if (index !== -1) - callbacks.splice(index, 1); - }; - } - $set($$props) { - if (this.$$set && !is_empty($$props)) { - this.$$.skip_bound = true; - this.$$set($$props); - this.$$.skip_bound = false; - } - } - } - - function dispatch_dev(type, detail) { - document.dispatchEvent(custom_event(type, Object.assign({ version: '3.38.2' }, detail))); - } - function append_dev(target, node) { - dispatch_dev('SvelteDOMInsert', { target, node }); - append(target, node); - } - function insert_dev(target, node, anchor) { - dispatch_dev('SvelteDOMInsert', { target, node, anchor }); - insert(target, node, anchor); - } - function detach_dev(node) { - dispatch_dev('SvelteDOMRemove', { node }); - detach(node); - } - function listen_dev(node, event, handler, options, has_prevent_default, has_stop_propagation) { - const modifiers = options === true ? ['capture'] : options ? Array.from(Object.keys(options)) : []; - if (has_prevent_default) - modifiers.push('preventDefault'); - if (has_stop_propagation) - modifiers.push('stopPropagation'); - dispatch_dev('SvelteDOMAddEventListener', { node, event, handler, modifiers }); - const dispose = listen(node, event, handler, options); - return () => { - dispatch_dev('SvelteDOMRemoveEventListener', { node, event, handler, modifiers }); - dispose(); - }; - } - function attr_dev(node, attribute, value) { - attr(node, attribute, value); - if (value == null) - dispatch_dev('SvelteDOMRemoveAttribute', { node, attribute }); - else - dispatch_dev('SvelteDOMSetAttribute', { node, attribute, value }); - } - function set_data_dev(text, data) { - data = '' + data; - if (text.wholeText === data) - return; - dispatch_dev('SvelteDOMSetData', { node: text, data }); - text.data = data; - } - function validate_each_argument(arg) { - if (typeof arg !== 'string' && !(arg && typeof arg === 'object' && 'length' in arg)) { - let msg = '{#each} only iterates over array-like objects.'; - if (typeof Symbol === 'function' && arg && Symbol.iterator in arg) { - msg += ' You can use a spread to convert this iterable into an array.'; - } - throw new Error(msg); - } - } - function validate_slots(name, slot, keys) { - for (const slot_key of Object.keys(slot)) { - if (!~keys.indexOf(slot_key)) { - console.warn(`<${name}> received an unexpected slot "${slot_key}".`); - } - } - } - /** - * Base class for Svelte components with some minor dev-enhancements. Used when dev=true. - */ - class SvelteComponentDev extends SvelteComponent { - constructor(options) { - if (!options || (!options.target && !options.$$inline)) { - throw new Error("'target' is a required option"); - } - super(); - } - $destroy() { - super.$destroy(); - this.$destroy = () => { - console.warn('Component was already destroyed'); // eslint-disable-line no-console - }; - } - $capture_state() { } - $inject_state() { } - } - - const subscriber_queue = []; - /** - * Creates a `Readable` store that allows reading by subscription. - * @param value initial value - * @param {StartStopNotifier}start start and stop notifications for subscriptions - */ - function readable(value, start) { - return { - subscribe: writable(value, start).subscribe - }; - } - /** - * Create a `Writable` store that allows both updating and reading by subscription. - * @param {*=}value initial value - * @param {StartStopNotifier=}start start and stop notifications for subscriptions - */ - function writable(value, start = noop) { - let stop; - const subscribers = []; - function set(new_value) { - if (safe_not_equal(value, new_value)) { - value = new_value; - if (stop) { // store is ready - const run_queue = !subscriber_queue.length; - for (let i = 0; i < subscribers.length; i += 1) { - const s = subscribers[i]; - s[1](); - subscriber_queue.push(s, value); - } - if (run_queue) { - for (let i = 0; i < subscriber_queue.length; i += 2) { - subscriber_queue[i][0](subscriber_queue[i + 1]); - } - subscriber_queue.length = 0; - } - } - } - } - function update(fn) { - set(fn(value)); - } - function subscribe(run, invalidate = noop) { - const subscriber = [run, invalidate]; - subscribers.push(subscriber); - if (subscribers.length === 1) { - stop = start(set) || noop; - } - run(value); - return () => { - const index = subscribers.indexOf(subscriber); - if (index !== -1) { - subscribers.splice(index, 1); - } - if (subscribers.length === 0) { - stop(); - stop = null; - } - }; - } - return { set, update, subscribe }; - } - function derived(stores, fn, initial_value) { - const single = !Array.isArray(stores); - const stores_array = single - ? [stores] - : stores; - const auto = fn.length < 2; - return readable(initial_value, (set) => { - let inited = false; - const values = []; - let pending = 0; - let cleanup = noop; - const sync = () => { - if (pending) { - return; - } - cleanup(); - const result = fn(single ? values[0] : values, set); - if (auto) { - set(result); - } - else { - cleanup = is_function(result) ? result : noop; - } - }; - const unsubscribers = stores_array.map((store, i) => subscribe(store, (value) => { - values[i] = value; - pending &= ~(1 << i); - if (inited) { - sync(); - } - }, () => { - pending |= (1 << i); - })); - inited = true; - sync(); - return function stop() { - run_all(unsubscribers); - cleanup(); - }; - }); - } - - const LOCATION = {}; - const ROUTER = {}; - - /** - * Adapted from https://github.com/reach/router/blob/b60e6dd781d5d3a4bdaaf4de665649c0f6a7e78d/src/lib/history.js - * - * https://github.com/reach/router/blob/master/LICENSE - * */ - - function getLocation(source) { - return { - ...source.location, - state: source.history.state, - key: (source.history.state && source.history.state.key) || "initial" - }; - } - - function createHistory(source, options) { - const listeners = []; - let location = getLocation(source); - - return { - get location() { - return location; - }, - - listen(listener) { - listeners.push(listener); - - const popstateListener = () => { - location = getLocation(source); - listener({ location, action: "POP" }); - }; - - source.addEventListener("popstate", popstateListener); - - return () => { - source.removeEventListener("popstate", popstateListener); - - const index = listeners.indexOf(listener); - listeners.splice(index, 1); - }; - }, - - navigate(to, { state, replace = false } = {}) { - state = { ...state, key: Date.now() + "" }; - // try...catch iOS Safari limits to 100 pushState calls - try { - if (replace) { - source.history.replaceState(state, null, to); - } else { - source.history.pushState(state, null, to); - } - } catch (e) { - source.location[replace ? "replace" : "assign"](to); - } - - location = getLocation(source); - listeners.forEach(listener => listener({ location, action: "PUSH" })); - } - }; - } - - // Stores history entries in memory for testing or other platforms like Native - function createMemorySource(initialPathname = "/") { - let index = 0; - const stack = [{ pathname: initialPathname, search: "" }]; - const states = []; - - return { - get location() { - return stack[index]; - }, - addEventListener(name, fn) {}, - removeEventListener(name, fn) {}, - history: { - get entries() { - return stack; - }, - get index() { - return index; - }, - get state() { - return states[index]; - }, - pushState(state, _, uri) { - const [pathname, search = ""] = uri.split("?"); - index++; - stack.push({ pathname, search }); - states.push(state); - }, - replaceState(state, _, uri) { - const [pathname, search = ""] = uri.split("?"); - stack[index] = { pathname, search }; - states[index] = state; - } - } - }; - } - - // Global history uses window.history as the source if available, - // otherwise a memory history - const canUseDOM = Boolean( - typeof window !== "undefined" && - window.document && - window.document.createElement - ); - const globalHistory = createHistory(canUseDOM ? window : createMemorySource()); - const { navigate } = globalHistory; - - /** - * Adapted from https://github.com/reach/router/blob/b60e6dd781d5d3a4bdaaf4de665649c0f6a7e78d/src/lib/utils.js - * - * https://github.com/reach/router/blob/master/LICENSE - * */ - - const paramRe = /^:(.+)/; - - const SEGMENT_POINTS = 4; - const STATIC_POINTS = 3; - const DYNAMIC_POINTS = 2; - const SPLAT_PENALTY = 1; - const ROOT_POINTS = 1; - - /** - * Check if `string` starts with `search` - * @param {string} string - * @param {string} search - * @return {boolean} - */ - function startsWith(string, search) { - return string.substr(0, search.length) === search; - } - - /** - * Check if `segment` is a root segment - * @param {string} segment - * @return {boolean} - */ - function isRootSegment(segment) { - return segment === ""; - } - - /** - * Check if `segment` is a dynamic segment - * @param {string} segment - * @return {boolean} - */ - function isDynamic(segment) { - return paramRe.test(segment); - } - - /** - * Check if `segment` is a splat - * @param {string} segment - * @return {boolean} - */ - function isSplat(segment) { - return segment[0] === "*"; - } - - /** - * Split up the URI into segments delimited by `/` - * @param {string} uri - * @return {string[]} - */ - function segmentize(uri) { - return ( - uri - // Strip starting/ending `/` - .replace(/(^\/+|\/+$)/g, "") - .split("/") - ); - } - - /** - * Strip `str` of potential start and end `/` - * @param {string} str - * @return {string} - */ - function stripSlashes(str) { - return str.replace(/(^\/+|\/+$)/g, ""); - } - - /** - * Score a route depending on how its individual segments look - * @param {object} route - * @param {number} index - * @return {object} - */ - function rankRoute(route, index) { - const score = route.default - ? 0 - : segmentize(route.path).reduce((score, segment) => { - score += SEGMENT_POINTS; - - if (isRootSegment(segment)) { - score += ROOT_POINTS; - } else if (isDynamic(segment)) { - score += DYNAMIC_POINTS; - } else if (isSplat(segment)) { - score -= SEGMENT_POINTS + SPLAT_PENALTY; - } else { - score += STATIC_POINTS; - } - - return score; - }, 0); - - return { route, score, index }; - } - - /** - * Give a score to all routes and sort them on that - * @param {object[]} routes - * @return {object[]} - */ - function rankRoutes(routes) { - return ( - routes - .map(rankRoute) - // If two routes have the exact same score, we go by index instead - .sort((a, b) => - a.score < b.score ? 1 : a.score > b.score ? -1 : a.index - b.index - ) - ); - } - - /** - * Ranks and picks the best route to match. Each segment gets the highest - * amount of points, then the type of segment gets an additional amount of - * points where - * - * static > dynamic > splat > root - * - * This way we don't have to worry about the order of our routes, let the - * computers do it. - * - * A route looks like this - * - * { path, default, value } - * - * And a returned match looks like: - * - * { route, params, uri } - * - * @param {object[]} routes - * @param {string} uri - * @return {?object} - */ - function pick(routes, uri) { - let match; - let default_; - - const [uriPathname] = uri.split("?"); - const uriSegments = segmentize(uriPathname); - const isRootUri = uriSegments[0] === ""; - const ranked = rankRoutes(routes); - - for (let i = 0, l = ranked.length; i < l; i++) { - const route = ranked[i].route; - let missed = false; - - if (route.default) { - default_ = { - route, - params: {}, - uri - }; - continue; - } - - const routeSegments = segmentize(route.path); - const params = {}; - const max = Math.max(uriSegments.length, routeSegments.length); - let index = 0; - - for (; index < max; index++) { - const routeSegment = routeSegments[index]; - const uriSegment = uriSegments[index]; - - if (routeSegment !== undefined && isSplat(routeSegment)) { - // Hit a splat, just grab the rest, and return a match - // uri: /files/documents/work - // route: /files/* or /files/*splatname - const splatName = routeSegment === "*" ? "*" : routeSegment.slice(1); - - params[splatName] = uriSegments - .slice(index) - .map(decodeURIComponent) - .join("/"); - break; - } - - if (uriSegment === undefined) { - // URI is shorter than the route, no match - // uri: /users - // route: /users/:userId - missed = true; - break; - } - - let dynamicMatch = paramRe.exec(routeSegment); - - if (dynamicMatch && !isRootUri) { - const value = decodeURIComponent(uriSegment); - params[dynamicMatch[1]] = value; - } else if (routeSegment !== uriSegment) { - // Current segments don't match, not dynamic, not splat, so no match - // uri: /users/123/settings - // route: /users/:id/profile - missed = true; - break; - } - } - - if (!missed) { - match = { - route, - params, - uri: "/" + uriSegments.slice(0, index).join("/") - }; - break; - } - } - - return match || default_ || null; - } - - /** - * Check if the `path` matches the `uri`. - * @param {string} path - * @param {string} uri - * @return {?object} - */ - function match(route, uri) { - return pick([route], uri); - } - - /** - * Add the query to the pathname if a query is given - * @param {string} pathname - * @param {string} [query] - * @return {string} - */ - function addQuery(pathname, query) { - return pathname + (query ? `?${query}` : ""); - } - - /** - * Resolve URIs as though every path is a directory, no files. Relative URIs - * in the browser can feel awkward because not only can you be "in a directory", - * you can be "at a file", too. For example: - * - * browserSpecResolve('foo', '/bar/') => /bar/foo - * browserSpecResolve('foo', '/bar') => /foo - * - * But on the command line of a file system, it's not as complicated. You can't - * `cd` from a file, only directories. This way, links have to know less about - * their current path. To go deeper you can do this: - * - * - * // instead of - * - * - * Just like `cd`, if you want to go deeper from the command line, you do this: - * - * cd deeper - * # not - * cd $(pwd)/deeper - * - * By treating every path as a directory, linking to relative paths should - * require less contextual information and (fingers crossed) be more intuitive. - * @param {string} to - * @param {string} base - * @return {string} - */ - function resolve(to, base) { - // /foo/bar, /baz/qux => /foo/bar - if (startsWith(to, "/")) { - return to; - } - - const [toPathname, toQuery] = to.split("?"); - const [basePathname] = base.split("?"); - const toSegments = segmentize(toPathname); - const baseSegments = segmentize(basePathname); - - // ?a=b, /users?b=c => /users?a=b - if (toSegments[0] === "") { - return addQuery(basePathname, toQuery); - } - - // profile, /users/789 => /users/789/profile - if (!startsWith(toSegments[0], ".")) { - const pathname = baseSegments.concat(toSegments).join("/"); - - return addQuery((basePathname === "/" ? "" : "/") + pathname, toQuery); - } - - // ./ , /users/123 => /users/123 - // ../ , /users/123 => /users - // ../.. , /users/123 => / - // ../../one, /a/b/c/d => /a/b/one - // .././one , /a/b/c/d => /a/b/c/one - const allSegments = baseSegments.concat(toSegments); - const segments = []; - - allSegments.forEach(segment => { - if (segment === "..") { - segments.pop(); - } else if (segment !== ".") { - segments.push(segment); - } - }); - - return addQuery("/" + segments.join("/"), toQuery); - } - - /** - * Combines the `basepath` and the `path` into one path. - * @param {string} basepath - * @param {string} path - */ - function combinePaths(basepath, path) { - return `${stripSlashes( - path === "/" ? basepath : `${stripSlashes(basepath)}/${stripSlashes(path)}` - )}/`; - } - - /** - * Decides whether a given `event` should result in a navigation or not. - * @param {object} event - */ - function shouldNavigate(event) { - return ( - !event.defaultPrevented && - event.button === 0 && - !(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey) - ); - } - - /* node_modules/svelte-routing/src/Router.svelte generated by Svelte v3.38.2 */ - - function create_fragment$9(ctx) { - let current; - const default_slot_template = /*#slots*/ ctx[9].default; - const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[8], null); - - const block = { - c: function create() { - if (default_slot) default_slot.c(); - }, - l: function claim(nodes) { - throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); - }, - m: function mount(target, anchor) { - if (default_slot) { - default_slot.m(target, anchor); - } - - current = true; - }, - p: function update(ctx, [dirty]) { - if (default_slot) { - if (default_slot.p && (!current || dirty & /*$$scope*/ 256)) { - update_slot(default_slot, default_slot_template, ctx, /*$$scope*/ ctx[8], dirty, null, null); - } - } - }, - i: function intro(local) { - if (current) return; - transition_in(default_slot, local); - current = true; - }, - o: function outro(local) { - transition_out(default_slot, local); - current = false; - }, - d: function destroy(detaching) { - if (default_slot) default_slot.d(detaching); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_fragment$9.name, - type: "component", - source: "", - ctx - }); - - return block; - } - - function instance$9($$self, $$props, $$invalidate) { - let $base; - let $location; - let $routes; - let { $$slots: slots = {}, $$scope } = $$props; - validate_slots("Router", slots, ['default']); - let { basepath = "/" } = $$props; - let { url = null } = $$props; - const locationContext = getContext(LOCATION); - const routerContext = getContext(ROUTER); - const routes = writable([]); - validate_store(routes, "routes"); - component_subscribe($$self, routes, value => $$invalidate(7, $routes = value)); - const activeRoute = writable(null); - let hasActiveRoute = false; // Used in SSR to synchronously set that a Route is active. - - // If locationContext is not set, this is the topmost Router in the tree. - // If the `url` prop is given we force the location to it. - const location = locationContext || writable(url ? { pathname: url } : globalHistory.location); - - validate_store(location, "location"); - component_subscribe($$self, location, value => $$invalidate(6, $location = value)); - - // If routerContext is set, the routerBase of the parent Router - // will be the base for this Router's descendants. - // If routerContext is not set, the path and resolved uri will both - // have the value of the basepath prop. - const base = routerContext - ? routerContext.routerBase - : writable({ path: basepath, uri: basepath }); - - validate_store(base, "base"); - component_subscribe($$self, base, value => $$invalidate(5, $base = value)); - - const routerBase = derived([base, activeRoute], ([base, activeRoute]) => { - // If there is no activeRoute, the routerBase will be identical to the base. - if (activeRoute === null) { - return base; - } - - const { path: basepath } = base; - const { route, uri } = activeRoute; - - // Remove the potential /* or /*splatname from - // the end of the child Routes relative paths. - const path = route.default - ? basepath - : route.path.replace(/\*.*$/, ""); - - return { path, uri }; - }); - - function registerRoute(route) { - const { path: basepath } = $base; - let { path } = route; - - // We store the original path in the _path property so we can reuse - // it when the basepath changes. The only thing that matters is that - // the route reference is intact, so mutation is fine. - route._path = path; - - route.path = combinePaths(basepath, path); - - if (typeof window === "undefined") { - // In SSR we should set the activeRoute immediately if it is a match. - // If there are more Routes being registered after a match is found, - // we just skip them. - if (hasActiveRoute) { - return; - } - - const matchingRoute = match(route, $location.pathname); - - if (matchingRoute) { - activeRoute.set(matchingRoute); - hasActiveRoute = true; - } - } else { - routes.update(rs => { - rs.push(route); - return rs; - }); - } - } - - function unregisterRoute(route) { - routes.update(rs => { - const index = rs.indexOf(route); - rs.splice(index, 1); - return rs; - }); - } - - if (!locationContext) { - // The topmost Router in the tree is responsible for updating - // the location store and supplying it through context. - onMount(() => { - const unlisten = globalHistory.listen(history => { - location.set(history.location); - }); - - return unlisten; - }); - - setContext(LOCATION, location); - } - - setContext(ROUTER, { - activeRoute, - base, - routerBase, - registerRoute, - unregisterRoute - }); - - const writable_props = ["basepath", "url"]; - - Object.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(` was created with unknown prop '${key}'`); - }); - - $$self.$$set = $$props => { - if ("basepath" in $$props) $$invalidate(3, basepath = $$props.basepath); - if ("url" in $$props) $$invalidate(4, url = $$props.url); - if ("$$scope" in $$props) $$invalidate(8, $$scope = $$props.$$scope); - }; - - $$self.$capture_state = () => ({ - getContext, - setContext, - onMount, - writable, - derived, - LOCATION, - ROUTER, - globalHistory, - pick, - match, - stripSlashes, - combinePaths, - basepath, - url, - locationContext, - routerContext, - routes, - activeRoute, - hasActiveRoute, - location, - base, - routerBase, - registerRoute, - unregisterRoute, - $base, - $location, - $routes - }); - - $$self.$inject_state = $$props => { - if ("basepath" in $$props) $$invalidate(3, basepath = $$props.basepath); - if ("url" in $$props) $$invalidate(4, url = $$props.url); - if ("hasActiveRoute" in $$props) hasActiveRoute = $$props.hasActiveRoute; - }; - - if ($$props && "$$inject" in $$props) { - $$self.$inject_state($$props.$$inject); - } - - $$self.$$.update = () => { - if ($$self.$$.dirty & /*$base*/ 32) { - // This reactive statement will update all the Routes' path when - // the basepath changes. - { - const { path: basepath } = $base; - - routes.update(rs => { - rs.forEach(r => r.path = combinePaths(basepath, r._path)); - return rs; - }); - } - } - - if ($$self.$$.dirty & /*$routes, $location*/ 192) { - // This reactive statement will be run when the Router is created - // when there are no Routes and then again the following tick, so it - // will not find an active Route in SSR and in the browser it will only - // pick an active Route after all Routes have been registered. - { - const bestMatch = pick($routes, $location.pathname); - activeRoute.set(bestMatch); - } - } - }; - - return [ - routes, - location, - base, - basepath, - url, - $base, - $location, - $routes, - $$scope, - slots - ]; - } - - class Router extends SvelteComponentDev { - constructor(options) { - super(options); - init(this, options, instance$9, create_fragment$9, safe_not_equal, { basepath: 3, url: 4 }); - - dispatch_dev("SvelteRegisterComponent", { - component: this, - tagName: "Router", - options, - id: create_fragment$9.name - }); - } - - get basepath() { - throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''"); - } - - set basepath(value) { - throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''"); - } - - get url() { - throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''"); - } - - set url(value) { - throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''"); - } - } - - /* node_modules/svelte-routing/src/Route.svelte generated by Svelte v3.38.2 */ - - const get_default_slot_changes = dirty => ({ - params: dirty & /*routeParams*/ 4, - location: dirty & /*$location*/ 16 - }); - - const get_default_slot_context = ctx => ({ - params: /*routeParams*/ ctx[2], - location: /*$location*/ ctx[4] - }); - - // (40:0) {#if $activeRoute !== null && $activeRoute.route === route} - function create_if_block$2(ctx) { - let current_block_type_index; - let if_block; - let if_block_anchor; - let current; - const if_block_creators = [create_if_block_1$1, create_else_block$1]; - const if_blocks = []; - - function select_block_type(ctx, dirty) { - if (/*component*/ ctx[0] !== null) return 0; - return 1; - } - - current_block_type_index = select_block_type(ctx); - if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); - - const block = { - c: function create() { - if_block.c(); - if_block_anchor = empty(); - }, - m: function mount(target, anchor) { - if_blocks[current_block_type_index].m(target, anchor); - insert_dev(target, if_block_anchor, anchor); - current = true; - }, - p: function update(ctx, dirty) { - let previous_block_index = current_block_type_index; - current_block_type_index = select_block_type(ctx); - - if (current_block_type_index === previous_block_index) { - if_blocks[current_block_type_index].p(ctx, dirty); - } else { - group_outros(); - - transition_out(if_blocks[previous_block_index], 1, 1, () => { - if_blocks[previous_block_index] = null; - }); - - check_outros(); - if_block = if_blocks[current_block_type_index]; - - if (!if_block) { - if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); - if_block.c(); - } else { - if_block.p(ctx, dirty); - } - - transition_in(if_block, 1); - if_block.m(if_block_anchor.parentNode, if_block_anchor); - } - }, - i: function intro(local) { - if (current) return; - transition_in(if_block); - current = true; - }, - o: function outro(local) { - transition_out(if_block); - current = false; - }, - d: function destroy(detaching) { - if_blocks[current_block_type_index].d(detaching); - if (detaching) detach_dev(if_block_anchor); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_if_block$2.name, - type: "if", - source: "(40:0) {#if $activeRoute !== null && $activeRoute.route === route}", - ctx - }); - - return block; - } - - // (43:2) {:else} - function create_else_block$1(ctx) { - let current; - const default_slot_template = /*#slots*/ ctx[10].default; - const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[9], get_default_slot_context); - - const block = { - c: function create() { - if (default_slot) default_slot.c(); - }, - m: function mount(target, anchor) { - if (default_slot) { - default_slot.m(target, anchor); - } - - current = true; - }, - p: function update(ctx, dirty) { - if (default_slot) { - if (default_slot.p && (!current || dirty & /*$$scope, routeParams, $location*/ 532)) { - update_slot(default_slot, default_slot_template, ctx, /*$$scope*/ ctx[9], dirty, get_default_slot_changes, get_default_slot_context); - } - } - }, - i: function intro(local) { - if (current) return; - transition_in(default_slot, local); - current = true; - }, - o: function outro(local) { - transition_out(default_slot, local); - current = false; - }, - d: function destroy(detaching) { - if (default_slot) default_slot.d(detaching); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_else_block$1.name, - type: "else", - source: "(43:2) {:else}", - ctx - }); - - return block; - } - - // (41:2) {#if component !== null} - function create_if_block_1$1(ctx) { - let switch_instance; - let switch_instance_anchor; - let current; - - const switch_instance_spread_levels = [ - { location: /*$location*/ ctx[4] }, - /*routeParams*/ ctx[2], - /*routeProps*/ ctx[3] - ]; - - var switch_value = /*component*/ ctx[0]; - - function switch_props(ctx) { - let switch_instance_props = {}; - - for (let i = 0; i < switch_instance_spread_levels.length; i += 1) { - switch_instance_props = assign(switch_instance_props, switch_instance_spread_levels[i]); - } - - return { - props: switch_instance_props, - $$inline: true - }; - } - - if (switch_value) { - switch_instance = new switch_value(switch_props()); - } - - const block = { - c: function create() { - if (switch_instance) create_component(switch_instance.$$.fragment); - switch_instance_anchor = empty(); - }, - m: function mount(target, anchor) { - if (switch_instance) { - mount_component(switch_instance, target, anchor); - } - - insert_dev(target, switch_instance_anchor, anchor); - current = true; - }, - p: function update(ctx, dirty) { - const switch_instance_changes = (dirty & /*$location, routeParams, routeProps*/ 28) - ? get_spread_update(switch_instance_spread_levels, [ - dirty & /*$location*/ 16 && { location: /*$location*/ ctx[4] }, - dirty & /*routeParams*/ 4 && get_spread_object(/*routeParams*/ ctx[2]), - dirty & /*routeProps*/ 8 && get_spread_object(/*routeProps*/ ctx[3]) - ]) - : {}; - - if (switch_value !== (switch_value = /*component*/ ctx[0])) { - if (switch_instance) { - group_outros(); - const old_component = switch_instance; - - transition_out(old_component.$$.fragment, 1, 0, () => { - destroy_component(old_component, 1); - }); - - check_outros(); - } - - if (switch_value) { - switch_instance = new switch_value(switch_props()); - create_component(switch_instance.$$.fragment); - transition_in(switch_instance.$$.fragment, 1); - mount_component(switch_instance, switch_instance_anchor.parentNode, switch_instance_anchor); - } else { - switch_instance = null; - } - } else if (switch_value) { - switch_instance.$set(switch_instance_changes); - } - }, - i: function intro(local) { - if (current) return; - if (switch_instance) transition_in(switch_instance.$$.fragment, local); - current = true; - }, - o: function outro(local) { - if (switch_instance) transition_out(switch_instance.$$.fragment, local); - current = false; - }, - d: function destroy(detaching) { - if (detaching) detach_dev(switch_instance_anchor); - if (switch_instance) destroy_component(switch_instance, detaching); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_if_block_1$1.name, - type: "if", - source: "(41:2) {#if component !== null}", - ctx - }); - - return block; - } - - function create_fragment$8(ctx) { - let if_block_anchor; - let current; - let if_block = /*$activeRoute*/ ctx[1] !== null && /*$activeRoute*/ ctx[1].route === /*route*/ ctx[7] && create_if_block$2(ctx); - - const block = { - c: function create() { - if (if_block) if_block.c(); - if_block_anchor = empty(); - }, - l: function claim(nodes) { - throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); - }, - m: function mount(target, anchor) { - if (if_block) if_block.m(target, anchor); - insert_dev(target, if_block_anchor, anchor); - current = true; - }, - p: function update(ctx, [dirty]) { - if (/*$activeRoute*/ ctx[1] !== null && /*$activeRoute*/ ctx[1].route === /*route*/ ctx[7]) { - if (if_block) { - if_block.p(ctx, dirty); - - if (dirty & /*$activeRoute*/ 2) { - transition_in(if_block, 1); - } - } else { - if_block = create_if_block$2(ctx); - if_block.c(); - transition_in(if_block, 1); - if_block.m(if_block_anchor.parentNode, if_block_anchor); - } - } else if (if_block) { - group_outros(); - - transition_out(if_block, 1, 1, () => { - if_block = null; - }); - - check_outros(); - } - }, - i: function intro(local) { - if (current) return; - transition_in(if_block); - current = true; - }, - o: function outro(local) { - transition_out(if_block); - current = false; - }, - d: function destroy(detaching) { - if (if_block) if_block.d(detaching); - if (detaching) detach_dev(if_block_anchor); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_fragment$8.name, - type: "component", - source: "", - ctx - }); - - return block; - } - - function instance$8($$self, $$props, $$invalidate) { - let $activeRoute; - let $location; - let { $$slots: slots = {}, $$scope } = $$props; - validate_slots("Route", slots, ['default']); - let { path = "" } = $$props; - let { component = null } = $$props; - const { registerRoute, unregisterRoute, activeRoute } = getContext(ROUTER); - validate_store(activeRoute, "activeRoute"); - component_subscribe($$self, activeRoute, value => $$invalidate(1, $activeRoute = value)); - const location = getContext(LOCATION); - validate_store(location, "location"); - component_subscribe($$self, location, value => $$invalidate(4, $location = value)); - - const route = { - path, - // If no path prop is given, this Route will act as the default Route - // that is rendered if no other Route in the Router is a match. - default: path === "" - }; - - let routeParams = {}; - let routeProps = {}; - registerRoute(route); - - // There is no need to unregister Routes in SSR since it will all be - // thrown away anyway. - if (typeof window !== "undefined") { - onDestroy(() => { - unregisterRoute(route); - }); - } - - $$self.$$set = $$new_props => { - $$invalidate(13, $$props = assign(assign({}, $$props), exclude_internal_props($$new_props))); - if ("path" in $$new_props) $$invalidate(8, path = $$new_props.path); - if ("component" in $$new_props) $$invalidate(0, component = $$new_props.component); - if ("$$scope" in $$new_props) $$invalidate(9, $$scope = $$new_props.$$scope); - }; - - $$self.$capture_state = () => ({ - getContext, - onDestroy, - ROUTER, - LOCATION, - path, - component, - registerRoute, - unregisterRoute, - activeRoute, - location, - route, - routeParams, - routeProps, - $activeRoute, - $location - }); - - $$self.$inject_state = $$new_props => { - $$invalidate(13, $$props = assign(assign({}, $$props), $$new_props)); - if ("path" in $$props) $$invalidate(8, path = $$new_props.path); - if ("component" in $$props) $$invalidate(0, component = $$new_props.component); - if ("routeParams" in $$props) $$invalidate(2, routeParams = $$new_props.routeParams); - if ("routeProps" in $$props) $$invalidate(3, routeProps = $$new_props.routeProps); - }; - - if ($$props && "$$inject" in $$props) { - $$self.$inject_state($$props.$$inject); - } - - $$self.$$.update = () => { - if ($$self.$$.dirty & /*$activeRoute*/ 2) { - if ($activeRoute && $activeRoute.route === route) { - $$invalidate(2, routeParams = $activeRoute.params); - } - } - - { - const { path, component, ...rest } = $$props; - $$invalidate(3, routeProps = rest); - } - }; - - $$props = exclude_internal_props($$props); - - return [ - component, - $activeRoute, - routeParams, - routeProps, - $location, - activeRoute, - location, - route, - path, - $$scope, - slots - ]; - } - - class Route extends SvelteComponentDev { - constructor(options) { - super(options); - init(this, options, instance$8, create_fragment$8, safe_not_equal, { path: 8, component: 0 }); - - dispatch_dev("SvelteRegisterComponent", { - component: this, - tagName: "Route", - options, - id: create_fragment$8.name - }); - } - - get path() { - throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''"); - } - - set path(value) { - throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''"); - } - - get component() { - throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''"); - } - - set component(value) { - throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''"); - } - } - - /* node_modules/svelte-routing/src/Link.svelte generated by Svelte v3.38.2 */ - const file$6 = "node_modules/svelte-routing/src/Link.svelte"; - - function create_fragment$7(ctx) { - let a; - let current; - let mounted; - let dispose; - const default_slot_template = /*#slots*/ ctx[16].default; - const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[15], null); - - let a_levels = [ - { href: /*href*/ ctx[0] }, - { "aria-current": /*ariaCurrent*/ ctx[2] }, - /*props*/ ctx[1], - /*$$restProps*/ ctx[6] - ]; - - let a_data = {}; - - for (let i = 0; i < a_levels.length; i += 1) { - a_data = assign(a_data, a_levels[i]); - } - - const block = { - c: function create() { - a = element("a"); - if (default_slot) default_slot.c(); - set_attributes(a, a_data); - add_location(a, file$6, 40, 0, 1249); - }, - l: function claim(nodes) { - throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); - }, - m: function mount(target, anchor) { - insert_dev(target, a, anchor); - - if (default_slot) { - default_slot.m(a, null); - } - - current = true; - - if (!mounted) { - dispose = listen_dev(a, "click", /*onClick*/ ctx[5], false, false, false); - mounted = true; - } - }, - p: function update(ctx, [dirty]) { - if (default_slot) { - if (default_slot.p && (!current || dirty & /*$$scope*/ 32768)) { - update_slot(default_slot, default_slot_template, ctx, /*$$scope*/ ctx[15], dirty, null, null); - } - } - - set_attributes(a, a_data = get_spread_update(a_levels, [ - (!current || dirty & /*href*/ 1) && { href: /*href*/ ctx[0] }, - (!current || dirty & /*ariaCurrent*/ 4) && { "aria-current": /*ariaCurrent*/ ctx[2] }, - dirty & /*props*/ 2 && /*props*/ ctx[1], - dirty & /*$$restProps*/ 64 && /*$$restProps*/ ctx[6] - ])); - }, - i: function intro(local) { - if (current) return; - transition_in(default_slot, local); - current = true; - }, - o: function outro(local) { - transition_out(default_slot, local); - current = false; - }, - d: function destroy(detaching) { - if (detaching) detach_dev(a); - if (default_slot) default_slot.d(detaching); - mounted = false; - dispose(); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_fragment$7.name, - type: "component", - source: "", - ctx - }); - - return block; - } - - function instance$7($$self, $$props, $$invalidate) { - let ariaCurrent; - const omit_props_names = ["to","replace","state","getProps"]; - let $$restProps = compute_rest_props($$props, omit_props_names); - let $base; - let $location; - let { $$slots: slots = {}, $$scope } = $$props; - validate_slots("Link", slots, ['default']); - let { to = "#" } = $$props; - let { replace = false } = $$props; - let { state = {} } = $$props; - let { getProps = () => ({}) } = $$props; - const { base } = getContext(ROUTER); - validate_store(base, "base"); - component_subscribe($$self, base, value => $$invalidate(13, $base = value)); - const location = getContext(LOCATION); - validate_store(location, "location"); - component_subscribe($$self, location, value => $$invalidate(14, $location = value)); - const dispatch = createEventDispatcher(); - let href, isPartiallyCurrent, isCurrent, props; - - function onClick(event) { - dispatch("click", event); - - if (shouldNavigate(event)) { - event.preventDefault(); - - // Don't push another entry to the history stack when the user - // clicks on a Link to the page they are currently on. - const shouldReplace = $location.pathname === href || replace; - - navigate(href, { state, replace: shouldReplace }); - } - } - - $$self.$$set = $$new_props => { - $$props = assign(assign({}, $$props), exclude_internal_props($$new_props)); - $$invalidate(6, $$restProps = compute_rest_props($$props, omit_props_names)); - if ("to" in $$new_props) $$invalidate(7, to = $$new_props.to); - if ("replace" in $$new_props) $$invalidate(8, replace = $$new_props.replace); - if ("state" in $$new_props) $$invalidate(9, state = $$new_props.state); - if ("getProps" in $$new_props) $$invalidate(10, getProps = $$new_props.getProps); - if ("$$scope" in $$new_props) $$invalidate(15, $$scope = $$new_props.$$scope); - }; - - $$self.$capture_state = () => ({ - getContext, - createEventDispatcher, - ROUTER, - LOCATION, - navigate, - startsWith, - resolve, - shouldNavigate, - to, - replace, - state, - getProps, - base, - location, - dispatch, - href, - isPartiallyCurrent, - isCurrent, - props, - onClick, - $base, - $location, - ariaCurrent - }); - - $$self.$inject_state = $$new_props => { - if ("to" in $$props) $$invalidate(7, to = $$new_props.to); - if ("replace" in $$props) $$invalidate(8, replace = $$new_props.replace); - if ("state" in $$props) $$invalidate(9, state = $$new_props.state); - if ("getProps" in $$props) $$invalidate(10, getProps = $$new_props.getProps); - if ("href" in $$props) $$invalidate(0, href = $$new_props.href); - if ("isPartiallyCurrent" in $$props) $$invalidate(11, isPartiallyCurrent = $$new_props.isPartiallyCurrent); - if ("isCurrent" in $$props) $$invalidate(12, isCurrent = $$new_props.isCurrent); - if ("props" in $$props) $$invalidate(1, props = $$new_props.props); - if ("ariaCurrent" in $$props) $$invalidate(2, ariaCurrent = $$new_props.ariaCurrent); - }; - - if ($$props && "$$inject" in $$props) { - $$self.$inject_state($$props.$$inject); - } - - $$self.$$.update = () => { - if ($$self.$$.dirty & /*to, $base*/ 8320) { - $$invalidate(0, href = to === "/" ? $base.uri : resolve(to, $base.uri)); - } - - if ($$self.$$.dirty & /*$location, href*/ 16385) { - $$invalidate(11, isPartiallyCurrent = startsWith($location.pathname, href)); - } - - if ($$self.$$.dirty & /*href, $location*/ 16385) { - $$invalidate(12, isCurrent = href === $location.pathname); - } - - if ($$self.$$.dirty & /*isCurrent*/ 4096) { - $$invalidate(2, ariaCurrent = isCurrent ? "page" : undefined); - } - - if ($$self.$$.dirty & /*getProps, $location, href, isPartiallyCurrent, isCurrent*/ 23553) { - $$invalidate(1, props = getProps({ - location: $location, - href, - isPartiallyCurrent, - isCurrent - })); - } - }; - - return [ - href, - props, - ariaCurrent, - base, - location, - onClick, - $$restProps, - to, - replace, - state, - getProps, - isPartiallyCurrent, - isCurrent, - $base, - $location, - $$scope, - slots - ]; - } - - class Link extends SvelteComponentDev { - constructor(options) { - super(options); - - init(this, options, instance$7, create_fragment$7, safe_not_equal, { - to: 7, - replace: 8, - state: 9, - getProps: 10 - }); - - dispatch_dev("SvelteRegisterComponent", { - component: this, - tagName: "Link", - options, - id: create_fragment$7.name - }); - } - - get to() { - throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''"); - } - - set to(value) { - throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''"); - } - - get replace() { - throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''"); - } - - set replace(value) { - throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''"); - } - - get state() { - throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''"); - } - - set state(value) { - throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''"); - } - - get getProps() { - throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''"); - } - - set getProps(value) { - throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''"); - } - } - - /* src/routes/Home.svelte generated by Svelte v3.38.2 */ - - const file$5 = "src/routes/Home.svelte"; - - function create_fragment$6(ctx) { - let section; - let div; - let p0; - let t1; - let p1; - - const block = { - c: function create() { - section = element("section"); - div = element("div"); - p0 = element("p"); - p0.textContent = "Shioriko"; - t1 = space(); - p1 = element("p"); - p1.textContent = "Booru-style gallery written in Go and Svelte"; - attr_dev(p0, "class", "title"); - add_location(p0, file$5, 6, 6, 99); - attr_dev(p1, "class", "subtitle"); - add_location(p1, file$5, 9, 6, 151); - attr_dev(div, "class", "hero-body"); - add_location(div, file$5, 5, 4, 69); - attr_dev(section, "class", "hero is-primary is-medium"); - add_location(section, file$5, 4, 0, 21); - }, - l: function claim(nodes) { - throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); - }, - m: function mount(target, anchor) { - insert_dev(target, section, anchor); - append_dev(section, div); - append_dev(div, p0); - append_dev(div, t1); - append_dev(div, p1); - }, - p: noop, - i: noop, - o: noop, - d: function destroy(detaching) { - if (detaching) detach_dev(section); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_fragment$6.name, - type: "component", - source: "", - ctx - }); - - return block; - } - - function instance$6($$self, $$props) { - let { $$slots: slots = {}, $$scope } = $$props; - validate_slots("Home", slots, []); - const writable_props = []; - - Object.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(` was created with unknown prop '${key}'`); - }); - - return []; - } - - class Home extends SvelteComponentDev { - constructor(options) { - super(options); - init(this, options, instance$6, create_fragment$6, safe_not_equal, {}); - - dispatch_dev("SvelteRegisterComponent", { - component: this, - tagName: "Home", - options, - id: create_fragment$6.name - }); - } - } - - const storedToken = localStorage.getItem("apiToken"); - - const token = writable(storedToken); - token.subscribe(value => { - localStorage.setItem("apiToken", value); - }); - - let url = window.BASE_URL; - token.subscribe(value => { - }); - async function login({ username, password }) { - const endpoint = url + "/api/auth/login"; - const response = await fetch(endpoint, { - method: "POST", - body: JSON.stringify({ - username, - password, - }), - }); - const data = await response.json(); - token.set(data.token); - return data; - } - - async function getPosts({ page }) { - const endpoint = url + "/api/post?page=" + page; - const response = await fetch(endpoint); - const data = await response.json(); - return data; - } - - async function getPostsTag({ page, tag }) { - const endpoint = url + "/api/post/tag/" + tag + "?page=" + page; - const response = await fetch(endpoint); - const data = await response.json(); - return data; - } - - async function getPost({ id }) { - const endpoint = url + "/api/post/" + id; - const response = await fetch(endpoint); - const data = await response.json(); - return data; - } - - /* src/routes/Posts.svelte generated by Svelte v3.38.2 */ - const file$4 = "src/routes/Posts.svelte"; - - function get_each_context$2(ctx, list, i) { - const child_ctx = ctx.slice(); - child_ctx[4] = list[i]; - return child_ctx; - } - - function get_each_context_1$1(ctx, list, i) { - const child_ctx = ctx.slice(); - child_ctx[7] = list[i]; - return child_ctx; - } - - // (32:24) - function create_default_slot_1$2(ctx) { - let img; - let img_src_value; - - const block = { - c: function create() { - img = element("img"); - if (img.src !== (img_src_value = /*post*/ ctx[4].image_path)) attr_dev(img, "src", img_src_value); - add_location(img, file$4, 32, 24, 839); - }, - m: function mount(target, anchor) { - insert_dev(target, img, anchor); - }, - p: function update(ctx, dirty) { - if (dirty & /*posts*/ 1 && img.src !== (img_src_value = /*post*/ ctx[4].image_path)) { - attr_dev(img, "src", img_src_value); - } - }, - d: function destroy(detaching) { - if (detaching) detach_dev(img); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_default_slot_1$2.name, - type: "slot", - source: "(32:24) ", - ctx - }); - - return block; - } - - // (40:24) - function create_default_slot$3(ctx) { - let t_value = /*tag*/ ctx[7] + ""; - let t; - - const block = { - c: function create() { - t = text(t_value); - }, - m: function mount(target, anchor) { - insert_dev(target, t, anchor); - }, - p: function update(ctx, dirty) { - if (dirty & /*posts*/ 1 && t_value !== (t_value = /*tag*/ ctx[7] + "")) set_data_dev(t, t_value); - }, - d: function destroy(detaching) { - if (detaching) detach_dev(t); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_default_slot$3.name, - type: "slot", - source: "(40:24) ", - ctx - }); - - return block; - } - - // (39:24) {#each post.tags as tag (tag)} - function create_each_block_1$1(key_1, ctx) { - let first; - let link; - let current; - - link = new Link({ - props: { - to: "/tag/" + /*tag*/ ctx[7], - $$slots: { default: [create_default_slot$3] }, - $$scope: { ctx } - }, - $$inline: true - }); - - const block = { - key: key_1, - first: null, - c: function create() { - first = empty(); - create_component(link.$$.fragment); - this.first = first; - }, - m: function mount(target, anchor) { - insert_dev(target, first, anchor); - mount_component(link, target, anchor); - current = true; - }, - p: function update(new_ctx, dirty) { - ctx = new_ctx; - const link_changes = {}; - if (dirty & /*posts*/ 1) link_changes.to = "/tag/" + /*tag*/ ctx[7]; - - if (dirty & /*$$scope, posts*/ 1025) { - link_changes.$$scope = { dirty, ctx }; - } - - link.$set(link_changes); - }, - i: function intro(local) { - if (current) return; - transition_in(link.$$.fragment, local); - current = true; - }, - o: function outro(local) { - transition_out(link.$$.fragment, local); - current = false; - }, - d: function destroy(detaching) { - if (detaching) detach_dev(first); - destroy_component(link, detaching); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_each_block_1$1.name, - type: "each", - source: "(39:24) {#each post.tags as tag (tag)}", - ctx - }); - - return block; - } - - // (28:12) {#each posts as post (post.id)} - function create_each_block$2(key_1, ctx) { - let div3; - let div0; - let figure; - let link; - let t0; - let div2; - let div1; - let each_blocks = []; - let each_1_lookup = new Map(); - let t1; - let current; - - link = new Link({ - props: { - to: "/post/" + /*post*/ ctx[4].id, - $$slots: { default: [create_default_slot_1$2] }, - $$scope: { ctx } - }, - $$inline: true - }); - - let each_value_1 = /*post*/ ctx[4].tags; - validate_each_argument(each_value_1); - const get_key = ctx => /*tag*/ ctx[7]; - validate_each_keys(ctx, each_value_1, get_each_context_1$1, get_key); - - for (let i = 0; i < each_value_1.length; i += 1) { - let child_ctx = get_each_context_1$1(ctx, each_value_1, i); - let key = get_key(child_ctx); - each_1_lookup.set(key, each_blocks[i] = create_each_block_1$1(key, child_ctx)); - } - - const block = { - key: key_1, - first: null, - c: function create() { - div3 = element("div"); - div0 = element("div"); - figure = element("figure"); - create_component(link.$$.fragment); - t0 = space(); - div2 = element("div"); - div1 = element("div"); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].c(); - } - - t1 = space(); - attr_dev(figure, "class", "image"); - add_location(figure, file$4, 30, 20, 740); - attr_dev(div0, "class", "card-image"); - add_location(div0, file$4, 29, 16, 695); - attr_dev(div1, "class", "content"); - add_location(div1, file$4, 37, 20, 1017); - attr_dev(div2, "class", "card-content"); - add_location(div2, file$4, 36, 16, 970); - attr_dev(div3, "class", "tile is-child is-4 card"); - add_location(div3, file$4, 28, 12, 641); - this.first = div3; - }, - m: function mount(target, anchor) { - insert_dev(target, div3, anchor); - append_dev(div3, div0); - append_dev(div0, figure); - mount_component(link, figure, null); - append_dev(div3, t0); - append_dev(div3, div2); - append_dev(div2, div1); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].m(div1, null); - } - - append_dev(div3, t1); - current = true; - }, - p: function update(new_ctx, dirty) { - ctx = new_ctx; - const link_changes = {}; - if (dirty & /*posts*/ 1) link_changes.to = "/post/" + /*post*/ ctx[4].id; - - if (dirty & /*$$scope, posts*/ 1025) { - link_changes.$$scope = { dirty, ctx }; - } - - link.$set(link_changes); - - if (dirty & /*posts*/ 1) { - each_value_1 = /*post*/ ctx[4].tags; - validate_each_argument(each_value_1); - group_outros(); - validate_each_keys(ctx, each_value_1, get_each_context_1$1, get_key); - each_blocks = update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value_1, each_1_lookup, div1, outro_and_destroy_block, create_each_block_1$1, null, get_each_context_1$1); - check_outros(); - } - }, - i: function intro(local) { - if (current) return; - transition_in(link.$$.fragment, local); - - for (let i = 0; i < each_value_1.length; i += 1) { - transition_in(each_blocks[i]); - } - - current = true; - }, - o: function outro(local) { - transition_out(link.$$.fragment, local); - - for (let i = 0; i < each_blocks.length; i += 1) { - transition_out(each_blocks[i]); - } - - current = false; - }, - d: function destroy(detaching) { - if (detaching) detach_dev(div3); - destroy_component(link); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].d(); - } - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_each_block$2.name, - type: "each", - source: "(28:12) {#each posts as post (post.id)}", - ctx - }); - - return block; - } - - function create_fragment$5(ctx) { - let section0; - let div0; - let p; - let t1; - let section1; - let div2; - let div1; - let each_blocks = []; - let each_1_lookup = new Map(); - let current; - let each_value = /*posts*/ ctx[0]; - validate_each_argument(each_value); - const get_key = ctx => /*post*/ ctx[4].id; - validate_each_keys(ctx, each_value, get_each_context$2, get_key); - - for (let i = 0; i < each_value.length; i += 1) { - let child_ctx = get_each_context$2(ctx, each_value, i); - let key = get_key(child_ctx); - each_1_lookup.set(key, each_blocks[i] = create_each_block$2(key, child_ctx)); - } - - const block = { - c: function create() { - section0 = element("section"); - div0 = element("div"); - p = element("p"); - p.textContent = "Posts"; - t1 = space(); - section1 = element("section"); - div2 = element("div"); - div1 = element("div"); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].c(); - } - - attr_dev(p, "class", "title"); - add_location(p, file$4, 18, 6, 426); - attr_dev(div0, "class", "hero-body"); - add_location(div0, file$4, 17, 4, 396); - attr_dev(section0, "class", "hero is-primary"); - add_location(section0, file$4, 16, 0, 358); - attr_dev(div1, "class", "tile is-ancestor"); - add_location(div1, file$4, 26, 8, 554); - attr_dev(div2, "class", "container"); - add_location(div2, file$4, 25, 4, 522); - attr_dev(section1, "class", "section"); - add_location(section1, file$4, 24, 0, 492); - }, - l: function claim(nodes) { - throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); - }, - m: function mount(target, anchor) { - insert_dev(target, section0, anchor); - append_dev(section0, div0); - append_dev(div0, p); - insert_dev(target, t1, anchor); - insert_dev(target, section1, anchor); - append_dev(section1, div2); - append_dev(div2, div1); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].m(div1, null); - } - - current = true; - }, - p: function update(ctx, [dirty]) { - if (dirty & /*posts*/ 1) { - each_value = /*posts*/ ctx[0]; - validate_each_argument(each_value); - group_outros(); - validate_each_keys(ctx, each_value, get_each_context$2, get_key); - each_blocks = update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each_1_lookup, div1, outro_and_destroy_block, create_each_block$2, null, get_each_context$2); - check_outros(); - } - }, - i: function intro(local) { - if (current) return; - - for (let i = 0; i < each_value.length; i += 1) { - transition_in(each_blocks[i]); - } - - current = true; - }, - o: function outro(local) { - for (let i = 0; i < each_blocks.length; i += 1) { - transition_out(each_blocks[i]); - } - - current = false; - }, - d: function destroy(detaching) { - if (detaching) detach_dev(section0); - if (detaching) detach_dev(t1); - if (detaching) detach_dev(section1); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].d(); - } - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_fragment$5.name, - type: "component", - source: "", - ctx - }); - - return block; - } - - function instance$5($$self, $$props, $$invalidate) { - let { $$slots: slots = {}, $$scope } = $$props; - validate_slots("Posts", slots, []); - let page = 1; - let totalPages = 1; - let posts = []; - - const getData = async () => { - const data = await getPosts({ page }); - $$invalidate(0, posts = data.posts); - }; - - onMount(() => { - getData(); - }); - - const writable_props = []; - - Object.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(` was created with unknown prop '${key}'`); - }); - - $$self.$capture_state = () => ({ - onMount, - getPosts, - Link, - page, - totalPages, - posts, - getData - }); - - $$self.$inject_state = $$props => { - if ("page" in $$props) page = $$props.page; - if ("totalPages" in $$props) totalPages = $$props.totalPages; - if ("posts" in $$props) $$invalidate(0, posts = $$props.posts); - }; - - if ($$props && "$$inject" in $$props) { - $$self.$inject_state($$props.$$inject); - } - - return [posts]; - } - - class Posts extends SvelteComponentDev { - constructor(options) { - super(options); - init(this, options, instance$5, create_fragment$5, safe_not_equal, {}); - - dispatch_dev("SvelteRegisterComponent", { - component: this, - tagName: "Posts", - options, - id: create_fragment$5.name - }); - } - } - - /* src/routes/Post.svelte generated by Svelte v3.38.2 */ - const file$3 = "src/routes/Post.svelte"; - - function get_each_context$1(ctx, list, i) { - const child_ctx = ctx.slice(); - child_ctx[3] = list[i]; - return child_ctx; - } - - // (18:8) {#if post} - function create_if_block_1(ctx) { - let p; - let t0; - let t1_value = /*post*/ ctx[0].id + ""; - let t1; - - const block = { - c: function create() { - p = element("p"); - t0 = text("Post ID: "); - t1 = text(t1_value); - attr_dev(p, "class", "title"); - add_location(p, file$3, 18, 6, 397); - }, - m: function mount(target, anchor) { - insert_dev(target, p, anchor); - append_dev(p, t0); - append_dev(p, t1); - }, - p: function update(ctx, dirty) { - if (dirty & /*post*/ 1 && t1_value !== (t1_value = /*post*/ ctx[0].id + "")) set_data_dev(t1, t1_value); - }, - d: function destroy(detaching) { - if (detaching) detach_dev(p); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_if_block_1.name, - type: "if", - source: "(18:8) {#if post}", - ctx - }); - - return block; - } - - // (25:0) {#if post} - function create_if_block$1(ctx) { - let div3; - let section; - let div2; - let div0; - let p0; - let t0; - let a; - let t1_value = /*post*/ ctx[0].source_url + ""; - let t1; - let a_href_value; - let t2; - let p1; - let t3; - let each_blocks = []; - let each_1_lookup = new Map(); - let t4; - let div1; - let figure; - let img; - let img_src_value; - let current; - let each_value = /*post*/ ctx[0].tags; - validate_each_argument(each_value); - const get_key = ctx => /*tag*/ ctx[3]; - validate_each_keys(ctx, each_value, get_each_context$1, get_key); - - for (let i = 0; i < each_value.length; i += 1) { - let child_ctx = get_each_context$1(ctx, each_value, i); - let key = get_key(child_ctx); - each_1_lookup.set(key, each_blocks[i] = create_each_block$1(key, child_ctx)); - } - - const block = { - c: function create() { - div3 = element("div"); - section = element("section"); - div2 = element("div"); - div0 = element("div"); - p0 = element("p"); - t0 = text("Source URL: "); - a = element("a"); - t1 = text(t1_value); - t2 = space(); - p1 = element("p"); - t3 = text("Tags: \n "); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].c(); - } - - t4 = space(); - div1 = element("div"); - figure = element("figure"); - img = element("img"); - attr_dev(a, "href", a_href_value = "//" + /*post*/ ctx[0].source_url); - add_location(a, file$3, 30, 36, 700); - add_location(p0, file$3, 29, 20, 660); - add_location(p1, file$3, 32, 20, 797); - attr_dev(div0, "class", "tile is-child is-4 box"); - add_location(div0, file$3, 28, 12, 603); - if (img.src !== (img_src_value = /*post*/ ctx[0].image_path)) attr_dev(img, "src", img_src_value); - add_location(img, file$3, 41, 20, 1121); - attr_dev(figure, "class", "image"); - add_location(figure, file$3, 40, 16, 1078); - attr_dev(div1, "class", "tile is-child"); - add_location(div1, file$3, 39, 12, 1034); - attr_dev(div2, "class", "tile is-ancestor"); - add_location(div2, file$3, 27, 8, 560); - attr_dev(section, "class", "section"); - add_location(section, file$3, 26, 4, 526); - attr_dev(div3, "class", "container"); - add_location(div3, file$3, 25, 0, 498); - }, - m: function mount(target, anchor) { - insert_dev(target, div3, anchor); - append_dev(div3, section); - append_dev(section, div2); - append_dev(div2, div0); - append_dev(div0, p0); - append_dev(p0, t0); - append_dev(p0, a); - append_dev(a, t1); - append_dev(div0, t2); - append_dev(div0, p1); - append_dev(p1, t3); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].m(p1, null); - } - - append_dev(div2, t4); - append_dev(div2, div1); - append_dev(div1, figure); - append_dev(figure, img); - current = true; - }, - p: function update(ctx, dirty) { - if ((!current || dirty & /*post*/ 1) && t1_value !== (t1_value = /*post*/ ctx[0].source_url + "")) set_data_dev(t1, t1_value); - - if (!current || dirty & /*post*/ 1 && a_href_value !== (a_href_value = "//" + /*post*/ ctx[0].source_url)) { - attr_dev(a, "href", a_href_value); - } - - if (dirty & /*post*/ 1) { - each_value = /*post*/ ctx[0].tags; - validate_each_argument(each_value); - group_outros(); - validate_each_keys(ctx, each_value, get_each_context$1, get_key); - each_blocks = update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each_1_lookup, p1, outro_and_destroy_block, create_each_block$1, null, get_each_context$1); - check_outros(); - } - - if (!current || dirty & /*post*/ 1 && img.src !== (img_src_value = /*post*/ ctx[0].image_path)) { - attr_dev(img, "src", img_src_value); - } - }, - i: function intro(local) { - if (current) return; - - for (let i = 0; i < each_value.length; i += 1) { - transition_in(each_blocks[i]); - } - - current = true; - }, - o: function outro(local) { - for (let i = 0; i < each_blocks.length; i += 1) { - transition_out(each_blocks[i]); - } - - current = false; - }, - d: function destroy(detaching) { - if (detaching) detach_dev(div3); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].d(); - } - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_if_block$1.name, - type: "if", - source: "(25:0) {#if post}", - ctx - }); - - return block; - } - - // (36:24) - function create_default_slot$2(ctx) { - let t_value = /*tag*/ ctx[3] + ""; - let t; - - const block = { - c: function create() { - t = text(t_value); - }, - m: function mount(target, anchor) { - insert_dev(target, t, anchor); - }, - p: function update(ctx, dirty) { - if (dirty & /*post*/ 1 && t_value !== (t_value = /*tag*/ ctx[3] + "")) set_data_dev(t, t_value); - }, - d: function destroy(detaching) { - if (detaching) detach_dev(t); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_default_slot$2.name, - type: "slot", - source: "(36:24) ", - ctx - }); - - return block; - } - - // (35:24) {#each post.tags as tag (tag)} - function create_each_block$1(key_1, ctx) { - let first; - let link; - let current; - - link = new Link({ - props: { - to: "/tag/" + /*tag*/ ctx[3], - $$slots: { default: [create_default_slot$2] }, - $$scope: { ctx } - }, - $$inline: true - }); - - const block = { - key: key_1, - first: null, - c: function create() { - first = empty(); - create_component(link.$$.fragment); - this.first = first; - }, - m: function mount(target, anchor) { - insert_dev(target, first, anchor); - mount_component(link, target, anchor); - current = true; - }, - p: function update(new_ctx, dirty) { - ctx = new_ctx; - const link_changes = {}; - if (dirty & /*post*/ 1) link_changes.to = "/tag/" + /*tag*/ ctx[3]; - - if (dirty & /*$$scope, post*/ 65) { - link_changes.$$scope = { dirty, ctx }; - } - - link.$set(link_changes); - }, - i: function intro(local) { - if (current) return; - transition_in(link.$$.fragment, local); - current = true; - }, - o: function outro(local) { - transition_out(link.$$.fragment, local); - current = false; - }, - d: function destroy(detaching) { - if (detaching) detach_dev(first); - destroy_component(link, detaching); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_each_block$1.name, - type: "each", - source: "(35:24) {#each post.tags as tag (tag)}", - ctx - }); - - return block; - } - - function create_fragment$4(ctx) { - let section; - let div; - let t; - let if_block1_anchor; - let current; - let if_block0 = /*post*/ ctx[0] && create_if_block_1(ctx); - let if_block1 = /*post*/ ctx[0] && create_if_block$1(ctx); - - const block = { - c: function create() { - section = element("section"); - div = element("div"); - if (if_block0) if_block0.c(); - t = space(); - if (if_block1) if_block1.c(); - if_block1_anchor = empty(); - attr_dev(div, "class", "hero-body"); - add_location(div, file$3, 16, 4, 348); - attr_dev(section, "class", "hero is-primary"); - add_location(section, file$3, 15, 0, 310); - }, - l: function claim(nodes) { - throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); - }, - m: function mount(target, anchor) { - insert_dev(target, section, anchor); - append_dev(section, div); - if (if_block0) if_block0.m(div, null); - insert_dev(target, t, anchor); - if (if_block1) if_block1.m(target, anchor); - insert_dev(target, if_block1_anchor, anchor); - current = true; - }, - p: function update(ctx, [dirty]) { - if (/*post*/ ctx[0]) { - if (if_block0) { - if_block0.p(ctx, dirty); - } else { - if_block0 = create_if_block_1(ctx); - if_block0.c(); - if_block0.m(div, null); - } - } else if (if_block0) { - if_block0.d(1); - if_block0 = null; - } - - if (/*post*/ ctx[0]) { - if (if_block1) { - if_block1.p(ctx, dirty); - - if (dirty & /*post*/ 1) { - transition_in(if_block1, 1); - } - } else { - if_block1 = create_if_block$1(ctx); - if_block1.c(); - transition_in(if_block1, 1); - if_block1.m(if_block1_anchor.parentNode, if_block1_anchor); - } - } else if (if_block1) { - group_outros(); - - transition_out(if_block1, 1, 1, () => { - if_block1 = null; - }); - - check_outros(); - } - }, - i: function intro(local) { - if (current) return; - transition_in(if_block1); - current = true; - }, - o: function outro(local) { - transition_out(if_block1); - current = false; - }, - d: function destroy(detaching) { - if (detaching) detach_dev(section); - if (if_block0) if_block0.d(); - if (detaching) detach_dev(t); - if (if_block1) if_block1.d(detaching); - if (detaching) detach_dev(if_block1_anchor); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_fragment$4.name, - type: "component", - source: "", - ctx - }); - - return block; - } - - function instance$4($$self, $$props, $$invalidate) { - let { $$slots: slots = {}, $$scope } = $$props; - validate_slots("Post", slots, []); - let { id } = $$props; - let post; - - const getData = async () => { - const data = await getPost({ id }); - $$invalidate(0, post = data); - }; - - onMount(() => { - getData(); - }); - - const writable_props = ["id"]; - - Object.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(` was created with unknown prop '${key}'`); - }); - - $$self.$$set = $$props => { - if ("id" in $$props) $$invalidate(1, id = $$props.id); - }; - - $$self.$capture_state = () => ({ - onMount, - Link, - getPost, - id, - post, - getData - }); - - $$self.$inject_state = $$props => { - if ("id" in $$props) $$invalidate(1, id = $$props.id); - if ("post" in $$props) $$invalidate(0, post = $$props.post); - }; - - if ($$props && "$$inject" in $$props) { - $$self.$inject_state($$props.$$inject); - } - - return [post, id]; - } - - class Post extends SvelteComponentDev { - constructor(options) { - super(options); - init(this, options, instance$4, create_fragment$4, safe_not_equal, { id: 1 }); - - dispatch_dev("SvelteRegisterComponent", { - component: this, - tagName: "Post", - options, - id: create_fragment$4.name - }); - - const { ctx } = this.$$; - const props = options.props || {}; - - if (/*id*/ ctx[1] === undefined && !("id" in props)) { - console.warn(" was created without expected prop 'id'"); - } - } - - get id() { - throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''"); - } - - set id(value) { - throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''"); - } - } - - /* src/routes/Login.svelte generated by Svelte v3.38.2 */ - const file$2 = "src/routes/Login.svelte"; - - function create_fragment$3(ctx) { - let div6; - let form; - let div1; - let label0; - let t1; - let div0; - let input0; - let t2; - let div3; - let label1; - let t4; - let div2; - let input1; - let t5; - let div5; - let div4; - let button; - let mounted; - let dispose; - - const block = { - c: function create() { - div6 = element("div"); - form = element("form"); - div1 = element("div"); - label0 = element("label"); - label0.textContent = "Username"; - t1 = space(); - div0 = element("div"); - input0 = element("input"); - t2 = space(); - div3 = element("div"); - label1 = element("label"); - label1.textContent = "Password"; - t4 = space(); - div2 = element("div"); - input1 = element("input"); - t5 = space(); - div5 = element("div"); - div4 = element("div"); - button = element("button"); - button.textContent = "Login"; - attr_dev(label0, "class", "label"); - add_location(label0, file$2, 15, 8, 382); - attr_dev(input0, "class", "input"); - attr_dev(input0, "type", "text"); - attr_dev(input0, "placeholder", "Username"); - input0.required = true; - add_location(input0, file$2, 17, 12, 462); - attr_dev(div0, "class", "control"); - add_location(div0, file$2, 16, 8, 428); - attr_dev(div1, "class", "field"); - add_location(div1, file$2, 14, 8, 354); - attr_dev(label1, "class", "label"); - add_location(label1, file$2, 21, 8, 616); - attr_dev(input1, "class", "input"); - attr_dev(input1, "type", "password"); - attr_dev(input1, "placeholder", "Password"); - input1.required = true; - add_location(input1, file$2, 23, 12, 696); - attr_dev(div2, "class", "control"); - add_location(div2, file$2, 22, 8, 662); - attr_dev(div3, "class", "field"); - add_location(div3, file$2, 20, 8, 588); - attr_dev(button, "class", "button is-link"); - add_location(button, file$2, 28, 12, 890); - attr_dev(div4, "class", "control"); - add_location(div4, file$2, 27, 10, 856); - attr_dev(div5, "class", "field"); - add_location(div5, file$2, 26, 8, 826); - add_location(form, file$2, 13, 4, 304); - attr_dev(div6, "class", "container"); - add_location(div6, file$2, 12, 0, 276); - }, - l: function claim(nodes) { - throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); - }, - m: function mount(target, anchor) { - insert_dev(target, div6, anchor); - append_dev(div6, form); - append_dev(form, div1); - append_dev(div1, label0); - append_dev(div1, t1); - append_dev(div1, div0); - append_dev(div0, input0); - set_input_value(input0, /*username*/ ctx[0]); - append_dev(form, t2); - append_dev(form, div3); - append_dev(div3, label1); - append_dev(div3, t4); - append_dev(div3, div2); - append_dev(div2, input1); - set_input_value(input1, /*password*/ ctx[1]); - append_dev(form, t5); - append_dev(form, div5); - append_dev(div5, div4); - append_dev(div4, button); - - if (!mounted) { - dispose = [ - listen_dev(input0, "input", /*input0_input_handler*/ ctx[3]), - listen_dev(input1, "input", /*input1_input_handler*/ ctx[4]), - listen_dev(form, "submit", prevent_default(/*doLogin*/ ctx[2]), false, true, false) - ]; - - mounted = true; - } - }, - p: function update(ctx, [dirty]) { - if (dirty & /*username*/ 1 && input0.value !== /*username*/ ctx[0]) { - set_input_value(input0, /*username*/ ctx[0]); - } - - if (dirty & /*password*/ 2 && input1.value !== /*password*/ ctx[1]) { - set_input_value(input1, /*password*/ ctx[1]); - } - }, - i: noop, - o: noop, - d: function destroy(detaching) { - if (detaching) detach_dev(div6); - mounted = false; - run_all(dispose); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_fragment$3.name, - type: "component", - source: "", - ctx - }); - - return block; - } - - function instance$3($$self, $$props, $$invalidate) { - let { $$slots: slots = {}, $$scope } = $$props; - validate_slots("Login", slots, []); - let username = ""; - let password = ""; - - const doLogin = async () => { - await login({ username, password }); - navigate("/"); - }; - - const writable_props = []; - - Object.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(` was created with unknown prop '${key}'`); - }); - - function input0_input_handler() { - username = this.value; - $$invalidate(0, username); - } - - function input1_input_handler() { - password = this.value; - $$invalidate(1, password); - } - - $$self.$capture_state = () => ({ - login, - navigate, - username, - password, - doLogin - }); - - $$self.$inject_state = $$props => { - if ("username" in $$props) $$invalidate(0, username = $$props.username); - if ("password" in $$props) $$invalidate(1, password = $$props.password); - }; - - if ($$props && "$$inject" in $$props) { - $$self.$inject_state($$props.$$inject); - } - - return [username, password, doLogin, input0_input_handler, input1_input_handler]; - } - - class Login extends SvelteComponentDev { - constructor(options) { - super(options); - init(this, options, instance$3, create_fragment$3, safe_not_equal, {}); - - dispatch_dev("SvelteRegisterComponent", { - component: this, - tagName: "Login", - options, - id: create_fragment$3.name - }); - } - } - - /* src/routes/Logout.svelte generated by Svelte v3.38.2 */ - - function create_fragment$2(ctx) { - const block = { - c: noop, - l: function claim(nodes) { - throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); - }, - m: noop, - p: noop, - i: noop, - o: noop, - d: noop - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_fragment$2.name, - type: "component", - source: "", - ctx - }); - - return block; - } - - function instance$2($$self, $$props, $$invalidate) { - let { $$slots: slots = {}, $$scope } = $$props; - validate_slots("Logout", slots, []); - - onMount(() => { - token.set(""); - navigate("/"); - }); - - const writable_props = []; - - Object.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(` was created with unknown prop '${key}'`); - }); - - $$self.$capture_state = () => ({ token, navigate, onMount }); - return []; - } - - class Logout extends SvelteComponentDev { - constructor(options) { - super(options); - init(this, options, instance$2, create_fragment$2, safe_not_equal, {}); - - dispatch_dev("SvelteRegisterComponent", { - component: this, - tagName: "Logout", - options, - id: create_fragment$2.name - }); - } - } - - /* src/routes/Tag.svelte generated by Svelte v3.38.2 */ - const file$1 = "src/routes/Tag.svelte"; - - function get_each_context(ctx, list, i) { - const child_ctx = ctx.slice(); - child_ctx[5] = list[i]; - return child_ctx; - } - - function get_each_context_1(ctx, list, i) { - const child_ctx = ctx.slice(); - child_ctx[8] = list[i]; - return child_ctx; - } - - // (37:24) - function create_default_slot_1$1(ctx) { - let img; - let img_src_value; - - const block = { - c: function create() { - img = element("img"); - if (img.src !== (img_src_value = /*post*/ ctx[5].image_path)) attr_dev(img, "src", img_src_value); - add_location(img, file$1, 37, 24, 923); - }, - m: function mount(target, anchor) { - insert_dev(target, img, anchor); - }, - p: function update(ctx, dirty) { - if (dirty & /*posts*/ 2 && img.src !== (img_src_value = /*post*/ ctx[5].image_path)) { - attr_dev(img, "src", img_src_value); - } - }, - d: function destroy(detaching) { - if (detaching) detach_dev(img); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_default_slot_1$1.name, - type: "slot", - source: "(37:24) ", - ctx - }); - - return block; - } - - // (45:24) - function create_default_slot$1(ctx) { - let t_value = /*tag*/ ctx[8] + ""; - let t; - - const block = { - c: function create() { - t = text(t_value); - }, - m: function mount(target, anchor) { - insert_dev(target, t, anchor); - }, - p: function update(ctx, dirty) { - if (dirty & /*posts*/ 2 && t_value !== (t_value = /*tag*/ ctx[8] + "")) set_data_dev(t, t_value); - }, - d: function destroy(detaching) { - if (detaching) detach_dev(t); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_default_slot$1.name, - type: "slot", - source: "(45:24) ", - ctx - }); - - return block; - } - - // (44:24) {#each post.tags as tag (tag)} - function create_each_block_1(key_1, ctx) { - let first; - let link; - let current; - - link = new Link({ - props: { - to: "/tag/" + /*tag*/ ctx[8], - $$slots: { default: [create_default_slot$1] }, - $$scope: { ctx } - }, - $$inline: true - }); - - const block = { - key: key_1, - first: null, - c: function create() { - first = empty(); - create_component(link.$$.fragment); - this.first = first; - }, - m: function mount(target, anchor) { - insert_dev(target, first, anchor); - mount_component(link, target, anchor); - current = true; - }, - p: function update(new_ctx, dirty) { - ctx = new_ctx; - const link_changes = {}; - if (dirty & /*posts*/ 2) link_changes.to = "/tag/" + /*tag*/ ctx[8]; - - if (dirty & /*$$scope, posts*/ 2050) { - link_changes.$$scope = { dirty, ctx }; - } - - link.$set(link_changes); - }, - i: function intro(local) { - if (current) return; - transition_in(link.$$.fragment, local); - current = true; - }, - o: function outro(local) { - transition_out(link.$$.fragment, local); - current = false; - }, - d: function destroy(detaching) { - if (detaching) detach_dev(first); - destroy_component(link, detaching); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_each_block_1.name, - type: "each", - source: "(44:24) {#each post.tags as tag (tag)}", - ctx - }); - - return block; - } - - // (33:12) {#each posts as post (post.id)} - function create_each_block(key_1, ctx) { - let div3; - let div0; - let figure; - let link; - let t0; - let div2; - let div1; - let each_blocks = []; - let each_1_lookup = new Map(); - let t1; - let current; - - link = new Link({ - props: { - to: "/post/" + /*post*/ ctx[5].id, - $$slots: { default: [create_default_slot_1$1] }, - $$scope: { ctx } - }, - $$inline: true - }); - - let each_value_1 = /*post*/ ctx[5].tags; - validate_each_argument(each_value_1); - const get_key = ctx => /*tag*/ ctx[8]; - validate_each_keys(ctx, each_value_1, get_each_context_1, get_key); - - for (let i = 0; i < each_value_1.length; i += 1) { - let child_ctx = get_each_context_1(ctx, each_value_1, i); - let key = get_key(child_ctx); - each_1_lookup.set(key, each_blocks[i] = create_each_block_1(key, child_ctx)); - } - - const block = { - key: key_1, - first: null, - c: function create() { - div3 = element("div"); - div0 = element("div"); - figure = element("figure"); - create_component(link.$$.fragment); - t0 = space(); - div2 = element("div"); - div1 = element("div"); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].c(); - } - - t1 = space(); - attr_dev(figure, "class", "image"); - add_location(figure, file$1, 35, 20, 824); - attr_dev(div0, "class", "card-image"); - add_location(div0, file$1, 34, 16, 779); - attr_dev(div1, "class", "content"); - add_location(div1, file$1, 42, 20, 1101); - attr_dev(div2, "class", "card-content"); - add_location(div2, file$1, 41, 16, 1054); - attr_dev(div3, "class", "tile is-child is-4 card"); - add_location(div3, file$1, 33, 12, 725); - this.first = div3; - }, - m: function mount(target, anchor) { - insert_dev(target, div3, anchor); - append_dev(div3, div0); - append_dev(div0, figure); - mount_component(link, figure, null); - append_dev(div3, t0); - append_dev(div3, div2); - append_dev(div2, div1); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].m(div1, null); - } - - append_dev(div3, t1); - current = true; - }, - p: function update(new_ctx, dirty) { - ctx = new_ctx; - const link_changes = {}; - if (dirty & /*posts*/ 2) link_changes.to = "/post/" + /*post*/ ctx[5].id; - - if (dirty & /*$$scope, posts*/ 2050) { - link_changes.$$scope = { dirty, ctx }; - } - - link.$set(link_changes); - - if (dirty & /*posts*/ 2) { - each_value_1 = /*post*/ ctx[5].tags; - validate_each_argument(each_value_1); - group_outros(); - validate_each_keys(ctx, each_value_1, get_each_context_1, get_key); - each_blocks = update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value_1, each_1_lookup, div1, outro_and_destroy_block, create_each_block_1, null, get_each_context_1); - check_outros(); - } - }, - i: function intro(local) { - if (current) return; - transition_in(link.$$.fragment, local); - - for (let i = 0; i < each_value_1.length; i += 1) { - transition_in(each_blocks[i]); - } - - current = true; - }, - o: function outro(local) { - transition_out(link.$$.fragment, local); - - for (let i = 0; i < each_blocks.length; i += 1) { - transition_out(each_blocks[i]); - } - - current = false; - }, - d: function destroy(detaching) { - if (detaching) detach_dev(div3); - destroy_component(link); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].d(); - } - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_each_block.name, - type: "each", - source: "(33:12) {#each posts as post (post.id)}", - ctx - }); - - return block; - } - - function create_fragment$1(ctx) { - let section0; - let div0; - let p0; - let t0; - let t1; - let p1; - let t3; - let section1; - let div2; - let div1; - let each_blocks = []; - let each_1_lookup = new Map(); - let current; - let each_value = /*posts*/ ctx[1]; - validate_each_argument(each_value); - const get_key = ctx => /*post*/ ctx[5].id; - validate_each_keys(ctx, each_value, get_each_context, get_key); - - for (let i = 0; i < each_value.length; i += 1) { - let child_ctx = get_each_context(ctx, each_value, i); - let key = get_key(child_ctx); - each_1_lookup.set(key, each_blocks[i] = create_each_block(key, child_ctx)); - } - - const block = { - c: function create() { - section0 = element("section"); - div0 = element("div"); - p0 = element("p"); - t0 = text(/*id*/ ctx[0]); - t1 = space(); - p1 = element("p"); - p1.textContent = "Tag"; - t3 = space(); - section1 = element("section"); - div2 = element("div"); - div1 = element("div"); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].c(); - } - - attr_dev(p0, "class", "title"); - add_location(p0, file$1, 20, 6, 461); - attr_dev(p1, "class", "subtitle"); - add_location(p1, file$1, 23, 6, 509); - attr_dev(div0, "class", "hero-body"); - add_location(div0, file$1, 19, 4, 431); - attr_dev(section0, "class", "hero is-primary"); - add_location(section0, file$1, 18, 0, 393); - attr_dev(div1, "class", "tile is-ancestor"); - add_location(div1, file$1, 31, 8, 638); - attr_dev(div2, "class", "container"); - add_location(div2, file$1, 30, 4, 606); - attr_dev(section1, "class", "section"); - add_location(section1, file$1, 29, 0, 576); - }, - l: function claim(nodes) { - throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); - }, - m: function mount(target, anchor) { - insert_dev(target, section0, anchor); - append_dev(section0, div0); - append_dev(div0, p0); - append_dev(p0, t0); - append_dev(div0, t1); - append_dev(div0, p1); - insert_dev(target, t3, anchor); - insert_dev(target, section1, anchor); - append_dev(section1, div2); - append_dev(div2, div1); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].m(div1, null); - } - - current = true; - }, - p: function update(ctx, [dirty]) { - if (!current || dirty & /*id*/ 1) set_data_dev(t0, /*id*/ ctx[0]); - - if (dirty & /*posts*/ 2) { - each_value = /*posts*/ ctx[1]; - validate_each_argument(each_value); - group_outros(); - validate_each_keys(ctx, each_value, get_each_context, get_key); - each_blocks = update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each_1_lookup, div1, outro_and_destroy_block, create_each_block, null, get_each_context); - check_outros(); - } - }, - i: function intro(local) { - if (current) return; - - for (let i = 0; i < each_value.length; i += 1) { - transition_in(each_blocks[i]); - } - - current = true; - }, - o: function outro(local) { - for (let i = 0; i < each_blocks.length; i += 1) { - transition_out(each_blocks[i]); - } - - current = false; - }, - d: function destroy(detaching) { - if (detaching) detach_dev(section0); - if (detaching) detach_dev(t3); - if (detaching) detach_dev(section1); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].d(); - } - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_fragment$1.name, - type: "component", - source: "", - ctx - }); - - return block; - } - - function instance$1($$self, $$props, $$invalidate) { - let { $$slots: slots = {}, $$scope } = $$props; - validate_slots("Tag", slots, []); - let { id } = $$props; - let page = 1; - let totalPages = 1; - let posts = []; - - const getData = async () => { - const data = await getPostsTag({ page, tag: id }); - $$invalidate(1, posts = data.posts); - }; - - onMount(() => { - getData(); - }); - - const writable_props = ["id"]; - - Object.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(` was created with unknown prop '${key}'`); - }); - - $$self.$$set = $$props => { - if ("id" in $$props) $$invalidate(0, id = $$props.id); - }; - - $$self.$capture_state = () => ({ - onMount, - getPostsTag, - Link, - id, - page, - totalPages, - posts, - getData - }); - - $$self.$inject_state = $$props => { - if ("id" in $$props) $$invalidate(0, id = $$props.id); - if ("page" in $$props) page = $$props.page; - if ("totalPages" in $$props) totalPages = $$props.totalPages; - if ("posts" in $$props) $$invalidate(1, posts = $$props.posts); - }; - - if ($$props && "$$inject" in $$props) { - $$self.$inject_state($$props.$$inject); - } - - return [id, posts]; - } - - class Tag extends SvelteComponentDev { - constructor(options) { - super(options); - init(this, options, instance$1, create_fragment$1, safe_not_equal, { id: 0 }); - - dispatch_dev("SvelteRegisterComponent", { - component: this, - tagName: "Tag", - options, - id: create_fragment$1.name - }); - - const { ctx } = this.$$; - const props = options.props || {}; - - if (/*id*/ ctx[0] === undefined && !("id" in props)) { - console.warn(" was created without expected prop 'id'"); - } - } - - get id() { - throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''"); - } - - set id(value) { - throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''"); - } - } - - /* src/App.svelte generated by Svelte v3.38.2 */ - const file = "src/App.svelte"; - - // (25:4) - function create_default_slot_5(ctx) { - let t; - - const block = { - c: function create() { - t = text("Shioriko"); - }, - m: function mount(target, anchor) { - insert_dev(target, t, anchor); - }, - d: function destroy(detaching) { - if (detaching) detach_dev(t); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_default_slot_5.name, - type: "slot", - source: "(25:4) ", - ctx - }); - - return block; - } - - // (38:3) - function create_default_slot_4(ctx) { - let t; - - const block = { - c: function create() { - t = text("Posts"); - }, - m: function mount(target, anchor) { - insert_dev(target, t, anchor); - }, - d: function destroy(detaching) { - if (detaching) detach_dev(t); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_default_slot_4.name, - type: "slot", - source: "(38:3) ", - ctx - }); - - return block; - } - - // (52:5) {:else} - function create_else_block(ctx) { - let div1; - let div0; - let link0; - let t; - let link1; - let current; - - link0 = new Link({ - props: { - to: "/auth/register", - class: "button is-primary", - $$slots: { default: [create_default_slot_3] }, - $$scope: { ctx } - }, - $$inline: true - }); - - link1 = new Link({ - props: { - to: "/auth/login", - class: "button is-light", - $$slots: { default: [create_default_slot_2] }, - $$scope: { ctx } - }, - $$inline: true - }); - - const block = { - c: function create() { - div1 = element("div"); - div0 = element("div"); - create_component(link0.$$.fragment); - t = space(); - create_component(link1.$$.fragment); - attr_dev(div0, "class", "buttons"); - add_location(div0, file, 53, 4, 1362); - attr_dev(div1, "class", "navbar-item"); - add_location(div1, file, 52, 5, 1332); - }, - m: function mount(target, anchor) { - insert_dev(target, div1, anchor); - append_dev(div1, div0); - mount_component(link0, div0, null); - append_dev(div0, t); - mount_component(link1, div0, null); - current = true; - }, - i: function intro(local) { - if (current) return; - transition_in(link0.$$.fragment, local); - transition_in(link1.$$.fragment, local); - current = true; - }, - o: function outro(local) { - transition_out(link0.$$.fragment, local); - transition_out(link1.$$.fragment, local); - current = false; - }, - d: function destroy(detaching) { - if (detaching) detach_dev(div1); - destroy_component(link0); - destroy_component(link1); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_else_block.name, - type: "else", - source: "(52:5) {:else}", - ctx - }); - - return block; - } - - // (44:5) {#if loggedIn} - function create_if_block(ctx) { - let div1; - let div0; - let link; - let current; - - link = new Link({ - props: { - to: "/auth/logout", - class: "button is-light", - $$slots: { default: [create_default_slot_1] }, - $$scope: { ctx } - }, - $$inline: true - }); - - const block = { - c: function create() { - div1 = element("div"); - div0 = element("div"); - create_component(link.$$.fragment); - attr_dev(div0, "class", "buttons"); - add_location(div0, file, 45, 4, 1187); - attr_dev(div1, "class", "navbar-item"); - add_location(div1, file, 44, 5, 1157); - }, - m: function mount(target, anchor) { - insert_dev(target, div1, anchor); - append_dev(div1, div0); - mount_component(link, div0, null); - current = true; - }, - i: function intro(local) { - if (current) return; - transition_in(link.$$.fragment, local); - current = true; - }, - o: function outro(local) { - transition_out(link.$$.fragment, local); - current = false; - }, - d: function destroy(detaching) { - if (detaching) detach_dev(div1); - destroy_component(link); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_if_block.name, - type: "if", - source: "(44:5) {#if loggedIn}", - ctx - }); - - return block; - } - - // (55:6) - function create_default_slot_3(ctx) { - let strong; - - const block = { - c: function create() { - strong = element("strong"); - strong.textContent = "Register"; - add_location(strong, file, 55, 5, 1448); - }, - m: function mount(target, anchor) { - insert_dev(target, strong, anchor); - }, - d: function destroy(detaching) { - if (detaching) detach_dev(strong); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_default_slot_3.name, - type: "slot", - source: "(55:6) ", - ctx - }); - - return block; - } - - // (58:6) - function create_default_slot_2(ctx) { - let t; - - const block = { - c: function create() { - t = text("Log in"); - }, - m: function mount(target, anchor) { - insert_dev(target, t, anchor); - }, - d: function destroy(detaching) { - if (detaching) detach_dev(t); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_default_slot_2.name, - type: "slot", - source: "(58:6) ", - ctx - }); - - return block; - } - - // (47:6) - function create_default_slot_1(ctx) { - let t; - - const block = { - c: function create() { - t = text("Log out"); - }, - m: function mount(target, anchor) { - insert_dev(target, t, anchor); - }, - d: function destroy(detaching) { - if (detaching) detach_dev(t); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_default_slot_1.name, - type: "slot", - source: "(47:6) ", - ctx - }); - - return block; - } - - // (22:0) - function create_default_slot(ctx) { - let nav; - let div0; - let link0; - let t0; - let a; - let span0; - let t1; - let span1; - let t2; - let span2; - let t3; - let div3; - let div1; - let link1; - let t4; - let div2; - let current_block_type_index; - let if_block; - let t5; - let div4; - let route0; - let t6; - let route1; - let t7; - let route2; - let t8; - let route3; - let t9; - let route4; - let t10; - let route5; - let current; - - link0 = new Link({ - props: { - class: "navbar-item", - to: "/", - $$slots: { default: [create_default_slot_5] }, - $$scope: { ctx } - }, - $$inline: true - }); - - link1 = new Link({ - props: { - class: "navbar-item", - to: "/posts", - $$slots: { default: [create_default_slot_4] }, - $$scope: { ctx } - }, - $$inline: true - }); - - const if_block_creators = [create_if_block, create_else_block]; - const if_blocks = []; - - function select_block_type(ctx, dirty) { - if (/*loggedIn*/ ctx[1]) return 0; - return 1; - } - - current_block_type_index = select_block_type(ctx); - if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); - - route0 = new Route({ - props: { path: "/", component: Home }, - $$inline: true - }); - - route1 = new Route({ - props: { path: "/posts", component: Posts }, - $$inline: true - }); - - route2 = new Route({ - props: { path: "/tag/:id", component: Tag }, - $$inline: true - }); - - route3 = new Route({ - props: { path: "/post/:id", component: Post }, - $$inline: true - }); - - route4 = new Route({ - props: { path: "/auth/login", component: Login }, - $$inline: true - }); - - route5 = new Route({ - props: { path: "/auth/logout", component: Logout }, - $$inline: true - }); - - const block = { - c: function create() { - nav = element("nav"); - div0 = element("div"); - create_component(link0.$$.fragment); - t0 = space(); - a = element("a"); - span0 = element("span"); - t1 = space(); - span1 = element("span"); - t2 = space(); - span2 = element("span"); - t3 = space(); - div3 = element("div"); - div1 = element("div"); - create_component(link1.$$.fragment); - t4 = space(); - div2 = element("div"); - if_block.c(); - t5 = space(); - div4 = element("div"); - create_component(route0.$$.fragment); - t6 = space(); - create_component(route1.$$.fragment); - t7 = space(); - create_component(route2.$$.fragment); - t8 = space(); - create_component(route3.$$.fragment); - t9 = space(); - create_component(route4.$$.fragment); - t10 = space(); - create_component(route5.$$.fragment); - attr_dev(span0, "aria-hidden", "true"); - add_location(span0, file, 29, 3, 816); - attr_dev(span1, "aria-hidden", "true"); - add_location(span1, file, 30, 3, 852); - attr_dev(span2, "aria-hidden", "true"); - add_location(span2, file, 31, 3, 888); - attr_dev(a, "role", "button"); - attr_dev(a, "class", "navbar-burger"); - attr_dev(a, "aria-label", "menu"); - attr_dev(a, "aria-expanded", "false"); - attr_dev(a, "data-target", "navbarBasicExample"); - add_location(a, file, 28, 4, 700); - attr_dev(div0, "class", "navbar-brand"); - add_location(div0, file, 23, 2, 603); - attr_dev(div1, "class", "navbar-start"); - add_location(div1, file, 36, 4, 999); - attr_dev(div2, "class", "navbar-end"); - add_location(div2, file, 42, 4, 1107); - attr_dev(div3, "id", "navbarBasicExample"); - attr_dev(div3, "class", "navbar-menu"); - add_location(div3, file, 35, 2, 945); - attr_dev(nav, "class", "navbar"); - attr_dev(nav, "role", "navigation"); - attr_dev(nav, "aria-label", "main navigation"); - add_location(nav, file, 22, 1, 533); - add_location(div4, file, 66, 3, 1635); - }, - m: function mount(target, anchor) { - insert_dev(target, nav, anchor); - append_dev(nav, div0); - mount_component(link0, div0, null); - append_dev(div0, t0); - append_dev(div0, a); - append_dev(a, span0); - append_dev(a, t1); - append_dev(a, span1); - append_dev(a, t2); - append_dev(a, span2); - append_dev(nav, t3); - append_dev(nav, div3); - append_dev(div3, div1); - mount_component(link1, div1, null); - append_dev(div3, t4); - append_dev(div3, div2); - if_blocks[current_block_type_index].m(div2, null); - insert_dev(target, t5, anchor); - insert_dev(target, div4, anchor); - mount_component(route0, div4, null); - append_dev(div4, t6); - mount_component(route1, div4, null); - append_dev(div4, t7); - mount_component(route2, div4, null); - append_dev(div4, t8); - mount_component(route3, div4, null); - append_dev(div4, t9); - mount_component(route4, div4, null); - append_dev(div4, t10); - mount_component(route5, div4, null); - current = true; - }, - p: function update(ctx, dirty) { - const link0_changes = {}; - - if (dirty & /*$$scope*/ 8) { - link0_changes.$$scope = { dirty, ctx }; - } - - link0.$set(link0_changes); - const link1_changes = {}; - - if (dirty & /*$$scope*/ 8) { - link1_changes.$$scope = { dirty, ctx }; - } - - link1.$set(link1_changes); - let previous_block_index = current_block_type_index; - current_block_type_index = select_block_type(ctx); - - if (current_block_type_index !== previous_block_index) { - group_outros(); - - transition_out(if_blocks[previous_block_index], 1, 1, () => { - if_blocks[previous_block_index] = null; - }); - - check_outros(); - if_block = if_blocks[current_block_type_index]; - - if (!if_block) { - if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); - if_block.c(); - } - - transition_in(if_block, 1); - if_block.m(div2, null); - } - }, - i: function intro(local) { - if (current) return; - transition_in(link0.$$.fragment, local); - transition_in(link1.$$.fragment, local); - transition_in(if_block); - transition_in(route0.$$.fragment, local); - transition_in(route1.$$.fragment, local); - transition_in(route2.$$.fragment, local); - transition_in(route3.$$.fragment, local); - transition_in(route4.$$.fragment, local); - transition_in(route5.$$.fragment, local); - current = true; - }, - o: function outro(local) { - transition_out(link0.$$.fragment, local); - transition_out(link1.$$.fragment, local); - transition_out(if_block); - transition_out(route0.$$.fragment, local); - transition_out(route1.$$.fragment, local); - transition_out(route2.$$.fragment, local); - transition_out(route3.$$.fragment, local); - transition_out(route4.$$.fragment, local); - transition_out(route5.$$.fragment, local); - current = false; - }, - d: function destroy(detaching) { - if (detaching) detach_dev(nav); - destroy_component(link0); - destroy_component(link1); - if_blocks[current_block_type_index].d(); - if (detaching) detach_dev(t5); - if (detaching) detach_dev(div4); - destroy_component(route0); - destroy_component(route1); - destroy_component(route2); - destroy_component(route3); - destroy_component(route4); - destroy_component(route5); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_default_slot.name, - type: "slot", - source: "(22:0) ", - ctx - }); - - return block; - } - - function create_fragment(ctx) { - let router; - let current; - - router = new Router({ - props: { - url: /*url*/ ctx[0], - $$slots: { default: [create_default_slot] }, - $$scope: { ctx } - }, - $$inline: true - }); - - const block = { - c: function create() { - create_component(router.$$.fragment); - }, - l: function claim(nodes) { - throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); - }, - m: function mount(target, anchor) { - mount_component(router, target, anchor); - current = true; - }, - p: function update(ctx, [dirty]) { - const router_changes = {}; - if (dirty & /*url*/ 1) router_changes.url = /*url*/ ctx[0]; - - if (dirty & /*$$scope, loggedIn*/ 10) { - router_changes.$$scope = { dirty, ctx }; - } - - router.$set(router_changes); - }, - i: function intro(local) { - if (current) return; - transition_in(router.$$.fragment, local); - current = true; - }, - o: function outro(local) { - transition_out(router.$$.fragment, local); - current = false; - }, - d: function destroy(detaching) { - destroy_component(router, detaching); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_fragment.name, - type: "component", - source: "", - ctx - }); - - return block; - } - - function instance($$self, $$props, $$invalidate) { - let { $$slots: slots = {}, $$scope } = $$props; - validate_slots("App", slots, []); - let loggedIn = false; - - token.subscribe(value => { - $$invalidate(1, loggedIn = value !== ""); - }); - - let { url = "" } = $$props; - let baseURL = window.BASE_URL; - const writable_props = ["url"]; - - Object.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(` was created with unknown prop '${key}'`); - }); - - $$self.$$set = $$props => { - if ("url" in $$props) $$invalidate(0, url = $$props.url); - }; - - $$self.$capture_state = () => ({ - Router, - Link, - Route, - Home, - Posts, - Post, - Login, - Logout, - Tag, - token, - loggedIn, - url, - baseURL - }); - - $$self.$inject_state = $$props => { - if ("loggedIn" in $$props) $$invalidate(1, loggedIn = $$props.loggedIn); - if ("url" in $$props) $$invalidate(0, url = $$props.url); - if ("baseURL" in $$props) baseURL = $$props.baseURL; - }; - - if ($$props && "$$inject" in $$props) { - $$self.$inject_state($$props.$$inject); - } - - return [url, loggedIn]; - } - - class App extends SvelteComponentDev { - constructor(options) { - super(options); - init(this, options, instance, create_fragment, safe_not_equal, { url: 0 }); - - dispatch_dev("SvelteRegisterComponent", { - component: this, - tagName: "App", - options, - id: create_fragment.name - }); - } - - get url() { - throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''"); - } - - set url(value) { - throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''"); - } - } - - const app = new App({ - target: document.body, - hydrate: false, - }); - - return app; - -}()); +var app=function(){"use strict";function t(){}function n(t,n){for(const e in n)t[e]=n[e];return t}function e(t){return t()}function r(){return Object.create(null)}function o(t){t.forEach(e)}function s(t){return"function"==typeof t}function a(t,n){return t!=t?n==n:t!==n||t&&"object"==typeof t||"function"==typeof t}function c(n,...e){if(null==n)return t;const r=n.subscribe(...e);return r.unsubscribe?()=>r.unsubscribe():r}function l(t,n,e){t.$$.on_destroy.push(c(n,e))}function i(t,n,e,r){if(t){const o=u(t,n,e,r);return t[0](o)}}function u(t,e,r,o){return t[1]&&o?n(r.ctx.slice(),t[1](o(e))):r.ctx}function p(t,n,e,r,o,s,a){const c=function(t,n,e,r){if(t[2]&&r){const o=t[2](r(e));if(void 0===n.dirty)return o;if("object"==typeof o){const t=[],e=Math.max(n.dirty.length,o.length);for(let r=0;rt.removeEventListener(n,e,r)}function k(t){return function(n){return n.preventDefault(),t.call(this,n)}}function j(t,n,e){null==e?t.removeAttribute(n):t.getAttribute(n)!==e&&t.setAttribute(n,e)}function _(t,n){const e=Object.getOwnPropertyDescriptors(t.__proto__);for(const r in n)null==n[r]?t.removeAttribute(r):"style"===r?t.style.cssText=n[r]:"__value"===r?t.value=t[r]=n[r]:e[r]&&e[r].set?t[r]=n[r]:j(t,r,n[r])}function E(t,n){n=""+n,t.wholeText!==n&&(t.data=n)}function S(t,n){t.value=null==n?"":n}let O;function A(t){O=t}function C(){if(!O)throw new Error("Function called outside component initialization");return O}function N(t){C().$$.on_mount.push(t)}function F(){const t=C();return(n,e)=>{const r=t.$$.callbacks[n];if(r){const o=function(t,n){const e=document.createEvent("CustomEvent");return e.initCustomEvent(t,!1,!1,n),e}(n,e);r.slice().forEach((n=>{n.call(t,o)}))}}}function L(t,n){C().$$.context.set(t,n)}function R(t){return C().$$.context.get(t)}const P=[],I=[],M=[],T=[],U=Promise.resolve();let B=!1;function G(t){M.push(t)}let q=!1;const H=new Set;function D(){if(!q){q=!0;do{for(let t=0;t{z.delete(t),r&&(e&&t.d(1),r())})),t.o(n)}}function Y(t,n){X(t,1,1,(()=>{n.delete(t.key)}))}function Z(t,n,e,r,o,s,a,c,l,i,u,p){let f=t.length,d=s.length,$=f;const g={};for(;$--;)g[t[$].key]=$;const m=[],h=new Map,y=new Map;for($=d;$--;){const t=p(o,s,$),c=e(t);let l=a.get(c);l?r&&l.p(t,n):(l=i(c,t),l.c()),h.set(c,m[$]=l),c in g&&y.set(c,Math.abs($-g[c]))}const b=new Set,v=new Set;function x(t){W(t,1),t.m(c,u),a.set(t.key,t),u=t.first,d--}for(;f&&d;){const n=m[d-1],e=t[f-1],r=n.key,o=e.key;n===e?(u=n.first,f--,d--):h.has(o)?!a.has(r)||b.has(r)?x(n):v.has(o)?f--:y.get(r)>y.get(o)?(v.add(r),x(n)):(b.add(o),f--):(l(e,a),f--)}for(;f--;){const n=t[f];h.has(n.key)||l(n,a)}for(;d;)x(m[d-1]);return m}function tt(t,n){const e={},r={},o={$$scope:1};let s=t.length;for(;s--;){const a=t[s],c=n[s];if(c){for(const t in a)t in c||(r[t]=1);for(const t in c)o[t]||(e[t]=c[t],o[t]=1);t[s]=c}else for(const t in a)o[t]=1}for(const t in r)t in e||(e[t]=void 0);return e}function nt(t){return"object"==typeof t&&null!==t?t:{}}function et(t){t&&t.c()}function rt(t,n,r,a){const{fragment:c,on_mount:l,on_destroy:i,after_update:u}=t.$$;c&&c.m(n,r),a||G((()=>{const n=l.map(e).filter(s);i?i.push(...n):o(n),t.$$.on_mount=[]})),u.forEach(G)}function ot(t,n){const e=t.$$;null!==e.fragment&&(o(e.on_destroy),e.fragment&&e.fragment.d(n),e.on_destroy=e.fragment=null,e.ctx=[])}function st(t,n){-1===t.$$.dirty[0]&&(P.push(t),B||(B=!0,U.then(D)),t.$$.dirty.fill(0)),t.$$.dirty[n/31|0]|=1<{const o=r.length?r[0]:e;return p.ctx&&c(p.ctx[t],p.ctx[t]=o)&&(!p.skip_bound&&p.bound[t]&&p.bound[t](o),f&&st(n,t)),e})):[],p.update(),f=!0,o(p.before_update),p.fragment=!!a&&a(p.ctx),e.target){if(e.hydrate){const t=function(t){return Array.from(t.childNodes)}(e.target);p.fragment&&p.fragment.l(t),t.forEach(m)}else p.fragment&&p.fragment.c();e.intro&&W(n.$$.fragment),rt(n,e.target,e.anchor,e.customElement),D()}A(u)}class ct{$destroy(){ot(this,1),this.$destroy=t}$on(t,n){const e=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return e.push(n),()=>{const t=e.indexOf(n);-1!==t&&e.splice(t,1)}}$set(t){var n;this.$$set&&(n=t,0!==Object.keys(n).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const lt=[];function it(n,e=t){let r;const o=[];function s(t){if(a(n,t)&&(n=t,r)){const t=!lt.length;for(let t=0;t{const t=o.indexOf(l);-1!==t&&o.splice(t,1),0===o.length&&(r(),r=null)}}}}function ut(n,e,r){const a=!Array.isArray(n),l=a?[n]:n,i=e.length<2;return{subscribe:it(r,(n=>{let r=!1;const u=[];let p=0,f=t;const d=()=>{if(p)return;f();const r=e(a?u[0]:u,n);i?n(r):f=s(r)?r:t},$=l.map(((t,n)=>c(t,(t=>{u[n]=t,p&=~(1<{p|=1<{r=dt(t),n({location:r,action:"POP"})};return t.addEventListener("popstate",o),()=>{t.removeEventListener("popstate",o);const r=e.indexOf(n);e.splice(r,1)}},navigate(n,{state:o,replace:s=!1}={}){o={...o,key:Date.now()+""};try{s?t.history.replaceState(o,null,n):t.history.pushState(o,null,n)}catch(e){t.location[s?"replace":"assign"](n)}r=dt(t),e.forEach((t=>t({location:r,action:"PUSH"})))}}}(Boolean("undefined"!=typeof window&&window.document&&window.document.createElement)?window:function(t="/"){let n=0;const e=[{pathname:t,search:""}],r=[];return{get location(){return e[n]},addEventListener(t,n){},removeEventListener(t,n){},history:{get entries(){return e},get index(){return n},get state(){return r[n]},pushState(t,o,s){const[a,c=""]=s.split("?");n++,e.push({pathname:a,search:c}),r.push(t)},replaceState(t,o,s){const[a,c=""]=s.split("?");e[n]={pathname:a,search:c},r[n]=t}}}}()),{navigate:gt}=$t,mt=/^:(.+)/;function ht(t,n){return t.substr(0,n.length)===n}function yt(t){return"*"===t[0]}function bt(t){return t.replace(/(^\/+|\/+$)/g,"").split("/")}function vt(t){return t.replace(/(^\/+|\/+$)/g,"")}function xt(t,n){return{route:t,score:t.default?0:bt(t.path).reduce(((t,n)=>(t+=4,!function(t){return""===t}(n)?!function(t){return mt.test(t)}(n)?yt(n)?t-=5:t+=3:t+=2:t+=1,t)),0),index:n}}function wt(t,n){let e,r;const[o]=n.split("?"),s=bt(o),a=""===s[0],c=function(t){return t.map(xt).sort(((t,n)=>t.scoren.score?-1:t.index-n.index))}(t);for(let t=0,o=c.length;te(7,s=t)));const $=it(null);let g=!1;const m=p||it(u?{pathname:u}:$t.location);l(t,m,(t=>e(6,o=t)));const h=f?f.routerBase:it({path:i,uri:i});l(t,h,(t=>e(5,r=t)));const y=ut([h,$],(([t,n])=>{if(null===n)return t;const{path:e}=t,{route:r,uri:o}=n;return{path:r.default?e:r.path.replace(/\*.*$/,""),uri:o}}));return p||(N((()=>$t.listen((t=>{m.set(t.location)})))),L(pt,m)),L(ft,{activeRoute:$,base:h,routerBase:y,registerRoute:function(t){const{path:n}=r;let{path:e}=t;if(t._path=e,t.path=jt(n,e),"undefined"==typeof window){if(g)return;const n=function(t,n){return wt([t],n)}(t,o.pathname);n&&($.set(n),g=!0)}else d.update((n=>(n.push(t),n)))},unregisterRoute:function(t){d.update((n=>{const e=n.indexOf(t);return n.splice(e,1),n}))}}),t.$$set=t=>{"basepath"in t&&e(3,i=t.basepath),"url"in t&&e(4,u=t.url),"$$scope"in t&&e(8,c=t.$$scope)},t.$$.update=()=>{if(32&t.$$.dirty){const{path:t}=r;d.update((n=>(n.forEach((n=>n.path=jt(t,n._path))),n)))}if(192&t.$$.dirty){const t=wt(s,o.pathname);$.set(t)}},[d,m,h,i,u,r,o,s,c,a]}class St extends ct{constructor(t){super(),at(this,t,Et,_t,a,{basepath:3,url:4})}}const Ot=t=>({params:4&t,location:16&t}),At=t=>({params:t[2],location:t[4]});function Ct(t){let n,e,r,o;const s=[Ft,Nt],a=[];function c(t,n){return null!==t[0]?0:1}return n=c(t),e=a[n]=s[n](t),{c(){e.c(),r=x()},m(t,e){a[n].m(t,e),g(t,r,e),o=!0},p(t,o){let l=n;n=c(t),n===l?a[n].p(t,o):(Q(),X(a[l],1,1,(()=>{a[l]=null})),V(),e=a[n],e?e.p(t,o):(e=a[n]=s[n](t),e.c()),W(e,1),e.m(r.parentNode,r))},i(t){o||(W(e),o=!0)},o(t){X(e),o=!1},d(t){a[n].d(t),t&&m(r)}}}function Nt(t){let n;const e=t[10].default,r=i(e,t,t[9],At);return{c(){r&&r.c()},m(t,e){r&&r.m(t,e),n=!0},p(t,o){r&&r.p&&(!n||532&o)&&p(r,e,t,t[9],o,Ot,At)},i(t){n||(W(r,t),n=!0)},o(t){X(r,t),n=!1},d(t){r&&r.d(t)}}}function Ft(t){let e,r,o;const s=[{location:t[4]},t[2],t[3]];var a=t[0];function c(t){let e={};for(let t=0;t{ot(t,1)})),V()}a?(e=new a(c()),et(e.$$.fragment),W(e.$$.fragment,1),rt(e,r.parentNode,r)):e=null}else a&&e.$set(o)},i(t){o||(e&&W(e.$$.fragment,t),o=!0)},o(t){e&&X(e.$$.fragment,t),o=!1},d(t){t&&m(r),e&&ot(e,t)}}}function Lt(t){let n,e,r=null!==t[1]&&t[1].route===t[7]&&Ct(t);return{c(){r&&r.c(),n=x()},m(t,o){r&&r.m(t,o),g(t,n,o),e=!0},p(t,[e]){null!==t[1]&&t[1].route===t[7]?r?(r.p(t,e),2&e&&W(r,1)):(r=Ct(t),r.c(),W(r,1),r.m(n.parentNode,n)):r&&(Q(),X(r,1,1,(()=>{r=null})),V())},i(t){e||(W(r),e=!0)},o(t){X(r),e=!1},d(t){r&&r.d(t),t&&m(n)}}}function Rt(t,e,r){let o,s,{$$slots:a={},$$scope:c}=e,{path:i=""}=e,{component:u=null}=e;const{registerRoute:p,unregisterRoute:d,activeRoute:$}=R(ft);l(t,$,(t=>r(1,o=t)));const g=R(pt);l(t,g,(t=>r(4,s=t)));const m={path:i,default:""===i};let h={},y={};var b;return p(m),"undefined"!=typeof window&&(b=()=>{d(m)},C().$$.on_destroy.push(b)),t.$$set=t=>{r(13,e=n(n({},e),f(t))),"path"in t&&r(8,i=t.path),"component"in t&&r(0,u=t.component),"$$scope"in t&&r(9,c=t.$$scope)},t.$$.update=()=>{2&t.$$.dirty&&o&&o.route===m&&r(2,h=o.params);{const{path:t,component:n,...o}=e;r(3,y=o)}},e=f(e),[u,o,h,y,s,$,g,m,i,c,a]}class Pt extends ct{constructor(t){super(),at(this,t,Rt,Lt,a,{path:8,component:0})}}function It(t){let e,r,o,s;const a=t[16].default,c=i(a,t,t[15],null);let l=[{href:t[0]},{"aria-current":t[2]},t[1],t[6]],u={};for(let t=0;t({}))}=e;const{base:y}=R(ft);l(t,y,(t=>r(13,a=t)));const b=R(pt);l(t,b,(t=>r(14,c=t)));const v=F();let x,w,k,j;return t.$$set=t=>{e=n(n({},e),f(t)),r(6,i=d(e,s)),"to"in t&&r(7,$=t.to),"replace"in t&&r(8,g=t.replace),"state"in t&&r(9,m=t.state),"getProps"in t&&r(10,h=t.getProps),"$$scope"in t&&r(15,p=t.$$scope)},t.$$.update=()=>{8320&t.$$.dirty&&r(0,x="/"===$?a.uri:function(t,n){if(ht(t,"/"))return t;const[e,r]=t.split("?"),[o]=n.split("?"),s=bt(e),a=bt(o);if(""===s[0])return kt(o,r);if(!ht(s[0],"."))return kt(("/"===o?"":"/")+a.concat(s).join("/"),r);const c=a.concat(s),l=[];return c.forEach((t=>{".."===t?l.pop():"."!==t&&l.push(t)})),kt("/"+l.join("/"),r)}($,a.uri)),16385&t.$$.dirty&&r(11,w=ht(c.pathname,x)),16385&t.$$.dirty&&r(12,k=x===c.pathname),4096&t.$$.dirty&&r(2,o=k?"page":void 0),23553&t.$$.dirty&&r(1,j=h({location:c,href:x,isPartiallyCurrent:w,isCurrent:k}))},[x,j,o,y,b,function(t){if(v("click",t),function(t){return!t.defaultPrevented&&0===t.button&&!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}(t)){t.preventDefault();const n=c.pathname===x||g;gt(x,{state:m,replace:n})}},i,$,g,m,h,w,k,a,c,p,u]}class Tt extends ct{constructor(t){super(),at(this,t,Mt,It,a,{to:7,replace:8,state:9,getProps:10})}}function Ut(n){let e;return{c(){e=y("section"),e.innerHTML='

Shioriko

\n

Booru-style gallery written in Go and Svelte

',j(e,"class","hero is-primary is-medium")},m(t,n){g(t,e,n)},p:t,i:t,o:t,d(t){t&&m(e)}}}class Bt extends ct{constructor(t){super(),at(this,t,null,Ut,a,{})}}const Gt=it(localStorage.getItem("apiToken"));Gt.subscribe((t=>{localStorage.setItem("apiToken",t)}));let qt=window.BASE_URL;Gt.subscribe((t=>{}));var Ht="%[a-f0-9]{2}",Dt=new RegExp(Ht,"gi"),Kt=new RegExp("("+Ht+")+","gi");function zt(t,n){try{return decodeURIComponent(t.join(""))}catch(t){}if(1===t.length)return t;n=n||1;var e=t.slice(0,n),r=t.slice(n);return Array.prototype.concat.call([],zt(e),zt(r))}function Jt(t){try{return decodeURIComponent(t)}catch(r){for(var n=t.match(Dt),e=1;e{if("string"!=typeof t||"string"!=typeof n)throw new TypeError("Expected the arguments to be of type `string`");if(""===n)return[t];const e=t.indexOf(n);return-1===e?[t]:[t.slice(0,e),t.slice(e+n.length)]},Xt=function(t,n){for(var e={},r=Object.keys(t),o=Array.isArray(n),s=0;s`%${t.charCodeAt(0).toString(16).toUpperCase()}`)):encodeURIComponent(t):t}function o(t,n){return n.decode?Vt(t):t}function s(t){return Array.isArray(t)?t.sort():"object"==typeof t?s(Object.keys(t)).sort(((t,n)=>Number(t)-Number(n))).map((n=>t[n])):t}function a(t){const n=t.indexOf("#");return-1!==n&&(t=t.slice(0,n)),t}function c(t){const n=(t=a(t)).indexOf("?");return-1===n?"":t.slice(n+1)}function l(t,n){return n.parseNumbers&&!Number.isNaN(Number(t))&&"string"==typeof t&&""!==t.trim()?t=Number(t):!n.parseBooleans||null===t||"true"!==t.toLowerCase()&&"false"!==t.toLowerCase()||(t="true"===t.toLowerCase()),t}function i(t,n){e((n=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},n)).arrayFormatSeparator);const r=function(t){let n;switch(t.arrayFormat){case"index":return(t,e,r)=>{n=/\[(\d*)\]$/.exec(t),t=t.replace(/\[\d*\]$/,""),n?(void 0===r[t]&&(r[t]={}),r[t][n[1]]=e):r[t]=e};case"bracket":return(t,e,r)=>{n=/(\[\])$/.exec(t),t=t.replace(/\[\]$/,""),n?void 0!==r[t]?r[t]=[].concat(r[t],e):r[t]=[e]:r[t]=e};case"comma":case"separator":return(n,e,r)=>{const s="string"==typeof e&&e.includes(t.arrayFormatSeparator),a="string"==typeof e&&!s&&o(e,t).includes(t.arrayFormatSeparator);e=a?o(e,t):e;const c=s||a?e.split(t.arrayFormatSeparator).map((n=>o(n,t))):null===e?e:o(e,t);r[n]=c};case"bracket-separator":return(n,e,r)=>{const s=/(\[\])$/.test(n);if(n=n.replace(/\[\]$/,""),!s)return void(r[n]=e?o(e,t):e);const a=null===e?[]:e.split(t.arrayFormatSeparator).map((n=>o(n,t)));void 0!==r[n]?r[n]=[].concat(r[n],a):r[n]=a};default:return(t,n,e)=>{void 0!==e[t]?e[t]=[].concat(e[t],n):e[t]=n}}}(n),a=Object.create(null);if("string"!=typeof t)return a;if(!(t=t.trim().replace(/^[?#&]/,"")))return a;for(const e of t.split("&")){if(""===e)continue;let[t,s]=Wt(n.decode?e.replace(/\+/g," "):e,"=");s=void 0===s?null:["comma","separator","bracket-separator"].includes(n.arrayFormat)?s:o(s,n),r(o(t,n),s,a)}for(const t of Object.keys(a)){const e=a[t];if("object"==typeof e&&null!==e)for(const t of Object.keys(e))e[t]=l(e[t],n);else a[t]=l(e,n)}return!1===n.sort?a:(!0===n.sort?Object.keys(a).sort():Object.keys(a).sort(n.sort)).reduce(((t,n)=>{const e=a[n];return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)?t[n]=s(e):t[n]=e,t}),Object.create(null))}n.extract=c,n.parse=i,n.stringify=(t,n)=>{if(!t)return"";e((n=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},n)).arrayFormatSeparator);const o=e=>n.skipNull&&null==t[e]||n.skipEmptyString&&""===t[e],s=function(t){switch(t.arrayFormat){case"index":return n=>(e,o)=>{const s=e.length;return void 0===o||t.skipNull&&null===o||t.skipEmptyString&&""===o?e:null===o?[...e,[r(n,t),"[",s,"]"].join("")]:[...e,[r(n,t),"[",r(s,t),"]=",r(o,t)].join("")]};case"bracket":return n=>(e,o)=>void 0===o||t.skipNull&&null===o||t.skipEmptyString&&""===o?e:null===o?[...e,[r(n,t),"[]"].join("")]:[...e,[r(n,t),"[]=",r(o,t)].join("")];case"comma":case"separator":case"bracket-separator":{const n="bracket-separator"===t.arrayFormat?"[]=":"=";return e=>(o,s)=>void 0===s||t.skipNull&&null===s||t.skipEmptyString&&""===s?o:(s=null===s?"":s,0===o.length?[[r(e,t),n,r(s,t)].join("")]:[[o,r(s,t)].join(t.arrayFormatSeparator)])}default:return n=>(e,o)=>void 0===o||t.skipNull&&null===o||t.skipEmptyString&&""===o?e:null===o?[...e,r(n,t)]:[...e,[r(n,t),"=",r(o,t)].join("")]}}(n),a={};for(const n of Object.keys(t))o(n)||(a[n]=t[n]);const c=Object.keys(a);return!1!==n.sort&&c.sort(n.sort),c.map((e=>{const o=t[e];return void 0===o?"":null===o?r(e,n):Array.isArray(o)?0===o.length&&"bracket-separator"===n.arrayFormat?r(e,n)+"[]":o.reduce(s(e),[]).join("&"):r(e,n)+"="+r(o,n)})).filter((t=>t.length>0)).join("&")},n.parseUrl=(t,n)=>{n=Object.assign({decode:!0},n);const[e,r]=Wt(t,"#");return Object.assign({url:e.split("?")[0]||"",query:i(c(t),n)},n&&n.parseFragmentIdentifier&&r?{fragmentIdentifier:o(r,n)}:{})},n.stringifyUrl=(t,e)=>{e=Object.assign({encode:!0,strict:!0},e);const o=a(t.url).split("?")[0]||"",s=n.extract(t.url),c=n.parse(s,{sort:!1}),l=Object.assign(c,t.query);let i=n.stringify(l,e);i&&(i=`?${i}`);let u=function(t){let n="";const e=t.indexOf("#");return-1!==e&&(n=t.slice(e)),n}(t.url);return t.fragmentIdentifier&&(u=`#${r(t.fragmentIdentifier,e)}`),`${o}${i}${u}`},n.pick=(t,e,r)=>{r=Object.assign({parseFragmentIdentifier:!0},r);const{url:o,query:s,fragmentIdentifier:a}=n.parseUrl(t,r);return n.stringifyUrl({url:o,query:Xt(s,e),fragmentIdentifier:a},r)},n.exclude=(t,e,r)=>{const o=Array.isArray(e)?t=>!e.includes(t):(t,n)=>!e(t,n);return n.pick(t,o,r)}}(Qt={exports:{}},Qt.exports),Qt.exports);function Zt(t,n,e){const r=t.slice();return r[6]=n[e],r}function tn(t,n,e){const r=t.slice();return r[9]=n[e],r}function nn(t,n,e){const r=t.slice();return r[12]=n[e],r}function en(t){let n;return{c(){n=y("a"),n.textContent="Previous",j(n,"class","pagination-previous")},m(t,e){g(t,n,e)},d(t){t&&m(n)}}}function rn(t){let n;return{c(){n=y("a"),n.textContent="Next page",j(n,"class","pagination-next")},m(t,e){g(t,n,e)},d(t){t&&m(n)}}}function on(t){let n,e,r,o,s;return e=new Tt({props:{to:"/posts?page=1",class:"pagination-link","aria-label":"Goto page 1",$$slots:{default:[sn]},$$scope:{ctx:t}}}),e.$on("click",t[2](1)),{c(){n=y("li"),et(e.$$.fragment),r=v(),o=y("li"),o.innerHTML='…'},m(t,a){g(t,n,a),rt(e,n,null),g(t,r,a),g(t,o,a),s=!0},p(t,n){const r={};32768&n&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){s||(W(e.$$.fragment,t),s=!0)},o(t){X(e.$$.fragment,t),s=!1},d(t){t&&m(n),ot(e),t&&m(r),t&&m(o)}}}function sn(t){let n;return{c(){n=b("1")},m(t,e){g(t,n,e)},d(t){t&&m(n)}}}function an(t){let n,e,r,o;const s=[ln,cn],a=[];function c(t,n){return t[12]==t[0]?0:1}return n=c(t),e=a[n]=s[n](t),{c(){e.c(),r=x()},m(t,e){a[n].m(t,e),g(t,r,e),o=!0},p(t,o){let l=n;n=c(t),n===l?a[n].p(t,o):(Q(),X(a[l],1,1,(()=>{a[l]=null})),V(),e=a[n],e?e.p(t,o):(e=a[n]=s[n](t),e.c()),W(e,1),e.m(r.parentNode,r))},i(t){o||(W(e),o=!0)},o(t){X(e),o=!1},d(t){a[n].d(t),t&&m(r)}}}function cn(t){let n,e,r;return e=new Tt({props:{to:"/posts?page="+t[12],class:"pagination-link","aria-label":"Goto page "+t[12],$$slots:{default:[un]},$$scope:{ctx:t}}}),e.$on("click",(function(){s(t[2](t[12]))&&t[2](t[12]).apply(this,arguments)})),{c(){n=y("li"),et(e.$$.fragment)},m(t,o){g(t,n,o),rt(e,n,null),r=!0},p(n,r){t=n;const o={};1&r&&(o.to="/posts?page="+t[12]),1&r&&(o["aria-label"]="Goto page "+t[12]),32769&r&&(o.$$scope={dirty:r,ctx:t}),e.$set(o)},i(t){r||(W(e.$$.fragment,t),r=!0)},o(t){X(e.$$.fragment,t),r=!1},d(t){t&&m(n),ot(e)}}}function ln(t){let n,e,r;return e=new Tt({props:{to:"/posts?page="+t[12],class:"pagination-link is-current","aria-label":"Goto page "+t[12],$$slots:{default:[pn]},$$scope:{ctx:t}}}),e.$on("click",(function(){s(t[2](t[12]))&&t[2](t[12]).apply(this,arguments)})),{c(){n=y("li"),et(e.$$.fragment)},m(t,o){g(t,n,o),rt(e,n,null),r=!0},p(n,r){t=n;const o={};1&r&&(o.to="/posts?page="+t[12]),1&r&&(o["aria-label"]="Goto page "+t[12]),32769&r&&(o.$$scope={dirty:r,ctx:t}),e.$set(o)},i(t){r||(W(e.$$.fragment,t),r=!0)},o(t){X(e.$$.fragment,t),r=!1},d(t){t&&m(n),ot(e)}}}function un(t){let n,e=t[12]+"";return{c(){n=b(e)},m(t,e){g(t,n,e)},p(t,r){1&r&&e!==(e=t[12]+"")&&E(n,e)},d(t){t&&m(n)}}}function pn(t){let n,e=t[12]+"";return{c(){n=b(e)},m(t,e){g(t,n,e)},p(t,r){1&r&&e!==(e=t[12]+"")&&E(n,e)},d(t){t&&m(n)}}}function fn(t){let n,e,r=t[12]>=1&&t[12]<=vn&&an(t);return{c(){r&&r.c(),n=x()},m(t,o){r&&r.m(t,o),g(t,n,o),e=!0},p(t,e){t[12]>=1&&t[12]<=vn?r?(r.p(t,e),1&e&&W(r,1)):(r=an(t),r.c(),W(r,1),r.m(n.parentNode,n)):r&&(Q(),X(r,1,1,(()=>{r=null})),V())},i(t){e||(W(r),e=!0)},o(t){X(r),e=!1},d(t){r&&r.d(t),t&&m(n)}}}function dn(t){let n,e,r,o,s;return o=new Tt({props:{to:"/posts?page="+vn,class:"pagination-link","aria-label":"Goto page "+vn,$$slots:{default:[$n]},$$scope:{ctx:t}}}),o.$on("click",t[2](vn)),{c(){n=y("li"),n.innerHTML='…',e=v(),r=y("li"),et(o.$$.fragment)},m(t,a){g(t,n,a),g(t,e,a),g(t,r,a),rt(o,r,null),s=!0},p(t,n){const e={};32768&n&&(e.$$scope={dirty:n,ctx:t}),o.$set(e)},i(t){s||(W(o.$$.fragment,t),s=!0)},o(t){X(o.$$.fragment,t),s=!1},d(t){t&&m(n),t&&m(e),t&&m(r),ot(o)}}}function $n(n){let e;return{c(){e=b(vn)},m(t,n){g(t,e,n)},p:t,d(t){t&&m(e)}}}function gn(t){let n,e;return{c(){n=y("img"),n.src!==(e=t[6].image_path)&&j(n,"src",e)},m(t,e){g(t,n,e)},p(t,r){2&r&&n.src!==(e=t[6].image_path)&&j(n,"src",e)},d(t){t&&m(n)}}}function mn(t){let n,e=t[9]+"";return{c(){n=b(e)},m(t,e){g(t,n,e)},p(t,r){2&r&&e!==(e=t[9]+"")&&E(n,e)},d(t){t&&m(n)}}}function hn(t,n){let e,r,o,s;return r=new Tt({props:{to:"/tag/"+n[9],$$slots:{default:[mn]},$$scope:{ctx:n}}}),{key:t,first:null,c(){e=y("p"),et(r.$$.fragment),o=v(),this.first=e},m(t,n){g(t,e,n),rt(r,e,null),$(e,o),s=!0},p(t,e){n=t;const o={};2&e&&(o.to="/tag/"+n[9]),32770&e&&(o.$$scope={dirty:e,ctx:n}),r.$set(o)},i(t){s||(W(r.$$.fragment,t),s=!0)},o(t){X(r.$$.fragment,t),s=!1},d(t){t&&m(e),ot(r)}}}function yn(t,n){let e,r,o,s,a,c,l,i,u,p=[],f=new Map;s=new Tt({props:{to:"/post/"+n[6].id,$$slots:{default:[gn]},$$scope:{ctx:n}}});let d=n[6].tags;const h=t=>t[9];for(let t=0;t1&&en(),k=t[0]2&&on(t),E=[...Array(5).keys()].map(t[4]),S=[];for(let n=0;nX(S[t],1,1,(()=>{S[t]=null}));let A=vn-t[0]>2&&dn(t),C=t[1];const N=t=>t[6].id;for(let n=0;n

Posts

',e=v(),r=y("section"),o=y("div"),s=y("nav"),w&&w.c(),a=v(),k&&k.c(),c=v(),l=y("ul"),_&&_.c(),i=v();for(let t=0;t1?w||(w=en(),w.c(),w.m(s,a)):w&&(w.d(1),w=null),t[0]2?_?(_.p(t,n),1&n&&W(_,1)):(_=on(t),_.c(),W(_,1),_.m(l,i)):_&&(Q(),X(_,1,1,(()=>{_=null})),V()),5&n){let e;for(E=[...Array(5).keys()].map(t[4]),e=0;e2?A?(A.p(t,n),1&n&&W(A,1)):(A=dn(t),A.c(),W(A,1),A.m(l,null)):A&&(Q(),X(A,1,1,(()=>{A=null})),V()),2&n&&(C=t[1],Q(),b=Z(b,n,N,1,t,C,x,f,Y,yn,null,Zt),V())},i(t){if(!d){W(_);for(let t=0;t{const t=await async function({page:t}){const n=qt+"/api/post?page="+t,e=await fetch(n);return await e.json()}({page:o});Array.isArray(t.posts)&&e(1,s=t.posts)};N((()=>{let t;t=Yt.parse(r.search),t.page&&e(0,o=t.page),a()}));return t.$$set=t=>{"location"in t&&e(3,r=t.location)},[o,s,t=>()=>{e(0,o=1),a()},r,t=>t+o-2]}class wn extends ct{constructor(t){super(),at(this,t,xn,bn,a,{location:3})}}function kn(t,n,e){const r=t.slice();return r[4]=n[e],r}function jn(t){let n,e,r,o=t[0].id+"";return{c(){n=y("p"),e=b("Post ID: "),r=b(o),j(n,"class","title")},m(t,o){g(t,n,o),$(n,e),$(n,r)},p(t,n){1&n&&o!==(o=t[0].id+"")&&E(r,o)},d(t){t&&m(n)}}}function _n(t){let n,e,r,o,s,a,c,l,i,u,p,f,d,h,x,w,k,_,S=t[1](t[0].source_url)+"",O=[],A=new Map,C=t[0].tags;const N=t=>t[4];for(let n=0;n{c=null})),V())},i(t){s||(W(c),s=!0)},o(t){X(c),s=!1},d(t){t&&m(n),a&&a.d(),t&&m(r),c&&c.d(t),t&&m(o)}}}function An(t,n,e){let r,{id:o}=n;const s=async()=>{const t=await async function({id:t}){const n=qt+"/api/post/"+t,e=await fetch(n);return await e.json()}({id:o});e(0,r=t)};return N((()=>{s()})),t.$$set=t=>{"id"in t&&e(2,o=t.id)},[r,t=>t.length>30?t.substring(0,30)+"...":t,o]}class Cn extends ct{constructor(t){super(),at(this,t,An,On,a,{id:2})}}function Nn(n){let e,r,s,a,c,l,i,u,p,f,d,h,b,x,_,E,O;return{c(){e=y("div"),r=y("form"),s=y("div"),a=y("label"),a.textContent="Username",c=v(),l=y("div"),i=y("input"),u=v(),p=y("div"),f=y("label"),f.textContent="Password",d=v(),h=y("div"),b=y("input"),x=v(),_=y("div"),_.innerHTML='
',j(a,"class","label"),j(i,"class","input"),j(i,"type","text"),j(i,"placeholder","Username"),i.required=!0,j(l,"class","control"),j(s,"class","field"),j(f,"class","label"),j(b,"class","input"),j(b,"type","password"),j(b,"placeholder","Password"),b.required=!0,j(h,"class","control"),j(p,"class","field"),j(_,"class","field"),j(e,"class","container")},m(t,o){g(t,e,o),$(e,r),$(r,s),$(s,a),$(s,c),$(s,l),$(l,i),S(i,n[0]),$(r,u),$(r,p),$(p,f),$(p,d),$(p,h),$(h,b),S(b,n[1]),$(r,x),$(r,_),E||(O=[w(i,"input",n[3]),w(b,"input",n[4]),w(r,"submit",k(n[2]))],E=!0)},p(t,[n]){1&n&&i.value!==t[0]&&S(i,t[0]),2&n&&b.value!==t[1]&&S(b,t[1])},i:t,o:t,d(t){t&&m(e),E=!1,o(O)}}}function Fn(t,n,e){let r="",o="";return[r,o,async()=>{await async function({username:t,password:n}){const e=qt+"/api/auth/login",r=await fetch(e,{method:"POST",body:JSON.stringify({username:t,password:n})}),o=await r.json();return Gt.set(o.token),o}({username:r,password:o}),gt("/")},function(){r=this.value,e(0,r)},function(){o=this.value,e(1,o)}]}class Ln extends ct{constructor(t){super(),at(this,t,Fn,Nn,a,{})}}function Rn(t){return N((()=>{Gt.set(""),gt("/")})),[]}class Pn extends ct{constructor(t){super(),at(this,t,Rn,null,a,{})}}function In(t,n,e){const r=t.slice();return r[7]=n[e],r}function Mn(t,n,e){const r=t.slice();return r[10]=n[e],r}function Tn(t,n,e){const r=t.slice();return r[13]=n[e],r}function Un(t){let n;return{c(){n=y("a"),n.textContent="Previous",j(n,"class","pagination-previous")},m(t,e){g(t,n,e)},d(t){t&&m(n)}}}function Bn(t){let n;return{c(){n=y("a"),n.textContent="Next page",j(n,"class","pagination-next")},m(t,e){g(t,n,e)},d(t){t&&m(n)}}}function Gn(t){let n,e,r,o,s;return e=new Tt({props:{to:"/tag/"+t[0]+"?page=1",class:"pagination-link","aria-label":"Goto page 1",$$slots:{default:[qn]},$$scope:{ctx:t}}}),e.$on("click",t[3](1)),{c(){n=y("li"),et(e.$$.fragment),r=v(),o=y("li"),o.innerHTML='…'},m(t,a){g(t,n,a),rt(e,n,null),g(t,r,a),g(t,o,a),s=!0},p(t,n){const r={};1&n&&(r.to="/tag/"+t[0]+"?page=1"),65536&n&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){s||(W(e.$$.fragment,t),s=!0)},o(t){X(e.$$.fragment,t),s=!1},d(t){t&&m(n),ot(e),t&&m(r),t&&m(o)}}}function qn(t){let n;return{c(){n=b("1")},m(t,e){g(t,n,e)},d(t){t&&m(n)}}}function Hn(t){let n,e,r,o;const s=[Kn,Dn],a=[];function c(t,n){return t[13]==t[1]?0:1}return n=c(t),e=a[n]=s[n](t),{c(){e.c(),r=x()},m(t,e){a[n].m(t,e),g(t,r,e),o=!0},p(t,o){let l=n;n=c(t),n===l?a[n].p(t,o):(Q(),X(a[l],1,1,(()=>{a[l]=null})),V(),e=a[n],e?e.p(t,o):(e=a[n]=s[n](t),e.c()),W(e,1),e.m(r.parentNode,r))},i(t){o||(W(e),o=!0)},o(t){X(e),o=!1},d(t){a[n].d(t),t&&m(r)}}}function Dn(t){let n,e,r;return e=new Tt({props:{to:"/tag/"+t[0]+"?page="+t[13],class:"pagination-link","aria-label":"Goto page "+t[13],$$slots:{default:[zn]},$$scope:{ctx:t}}}),e.$on("click",(function(){s(t[3](t[13]))&&t[3](t[13]).apply(this,arguments)})),{c(){n=y("li"),et(e.$$.fragment)},m(t,o){g(t,n,o),rt(e,n,null),r=!0},p(n,r){t=n;const o={};3&r&&(o.to="/tag/"+t[0]+"?page="+t[13]),2&r&&(o["aria-label"]="Goto page "+t[13]),65538&r&&(o.$$scope={dirty:r,ctx:t}),e.$set(o)},i(t){r||(W(e.$$.fragment,t),r=!0)},o(t){X(e.$$.fragment,t),r=!1},d(t){t&&m(n),ot(e)}}}function Kn(t){let n,e,r;return e=new Tt({props:{to:"/tag/"+t[0]+"?page="+t[13],class:"pagination-link is-current","aria-label":"Goto page "+t[13],$$slots:{default:[Jn]},$$scope:{ctx:t}}}),e.$on("click",(function(){s(t[3](t[13]))&&t[3](t[13]).apply(this,arguments)})),{c(){n=y("li"),et(e.$$.fragment)},m(t,o){g(t,n,o),rt(e,n,null),r=!0},p(n,r){t=n;const o={};3&r&&(o.to="/tag/"+t[0]+"?page="+t[13]),2&r&&(o["aria-label"]="Goto page "+t[13]),65538&r&&(o.$$scope={dirty:r,ctx:t}),e.$set(o)},i(t){r||(W(e.$$.fragment,t),r=!0)},o(t){X(e.$$.fragment,t),r=!1},d(t){t&&m(n),ot(e)}}}function zn(t){let n,e=t[13]+"";return{c(){n=b(e)},m(t,e){g(t,n,e)},p(t,r){2&r&&e!==(e=t[13]+"")&&E(n,e)},d(t){t&&m(n)}}}function Jn(t){let n,e=t[13]+"";return{c(){n=b(e)},m(t,e){g(t,n,e)},p(t,r){2&r&&e!==(e=t[13]+"")&&E(n,e)},d(t){t&&m(n)}}}function Qn(t){let n,e,r=t[13]>=1&&t[13]<=ee&&Hn(t);return{c(){r&&r.c(),n=x()},m(t,o){r&&r.m(t,o),g(t,n,o),e=!0},p(t,e){t[13]>=1&&t[13]<=ee?r?(r.p(t,e),2&e&&W(r,1)):(r=Hn(t),r.c(),W(r,1),r.m(n.parentNode,n)):r&&(Q(),X(r,1,1,(()=>{r=null})),V())},i(t){e||(W(r),e=!0)},o(t){X(r),e=!1},d(t){r&&r.d(t),t&&m(n)}}}function Vn(t){let n,e,r,o,s;return o=new Tt({props:{to:"/tag/"+t[0]+"?page="+ee,class:"pagination-link","aria-label":"Goto page "+ee,$$slots:{default:[Wn]},$$scope:{ctx:t}}}),o.$on("click",t[3](ee)),{c(){n=y("li"),n.innerHTML='…',e=v(),r=y("li"),et(o.$$.fragment)},m(t,a){g(t,n,a),g(t,e,a),g(t,r,a),rt(o,r,null),s=!0},p(t,n){const e={};1&n&&(e.to="/tag/"+t[0]+"?page="+ee),65536&n&&(e.$$scope={dirty:n,ctx:t}),o.$set(e)},i(t){s||(W(o.$$.fragment,t),s=!0)},o(t){X(o.$$.fragment,t),s=!1},d(t){t&&m(n),t&&m(e),t&&m(r),ot(o)}}}function Wn(n){let e;return{c(){e=b(ee)},m(t,n){g(t,e,n)},p:t,d(t){t&&m(e)}}}function Xn(t){let n,e;return{c(){n=y("img"),n.src!==(e=t[7].image_path)&&j(n,"src",e)},m(t,e){g(t,n,e)},p(t,r){4&r&&n.src!==(e=t[7].image_path)&&j(n,"src",e)},d(t){t&&m(n)}}}function Yn(t){let n,e=t[10]+"";return{c(){n=b(e)},m(t,e){g(t,n,e)},p(t,r){4&r&&e!==(e=t[10]+"")&&E(n,e)},d(t){t&&m(n)}}}function Zn(t,n){let e,r,o,s;return r=new Tt({props:{to:"/tag/"+n[10],$$slots:{default:[Yn]},$$scope:{ctx:n}}}),{key:t,first:null,c(){e=y("p"),et(r.$$.fragment),o=v(),this.first=e},m(t,n){g(t,e,n),rt(r,e,null),$(e,o),s=!0},p(t,e){n=t;const o={};4&e&&(o.to="/tag/"+n[10]),65540&e&&(o.$$scope={dirty:e,ctx:n}),r.$set(o)},i(t){s||(W(r.$$.fragment,t),s=!0)},o(t){X(r.$$.fragment,t),s=!1},d(t){t&&m(e),ot(r)}}}function te(t,n){let e,r,o,s,a,c,l,i,u,p=[],f=new Map;s=new Tt({props:{to:"/post/"+n[7].id,$$slots:{default:[Xn]},$$scope:{ctx:n}}});let d=n[7].tags;const h=t=>t[10];for(let t=0;t1&&Un(),N=t[1]2&&Gn(t),L=[...Array(5).keys()].map(t[5]),R=[];for(let n=0;nX(R[t],1,1,(()=>{R[t]=null}));let I=ee-t[1]>2&&Vn(t),M=t[2];const T=t=>t[7].id;for(let n=0;n1?C||(C=Un(),C.c(),C.m(u,p)):C&&(C.d(1),C=null),t[1]2?F?(F.p(t,n),2&n&&W(F,1)):(F=Gn(t),F.c(),W(F,1),F.m(d,x)):F&&(Q(),X(F,1,1,(()=>{F=null})),V()),11&n){let e;for(L=[...Array(5).keys()].map(t[5]),e=0;e2?I?(I.p(t,n),2&n&&W(I,1)):(I=Vn(t),I.c(),W(I,1),I.m(d,null)):I&&(Q(),X(I,1,1,(()=>{I=null})),V()),4&n&&(M=t[2],Q(),O=Z(O,n,T,1,t,M,A,_,Y,te,null,In),V())},i(t){if(!S){W(F);for(let t=0;t{const t=await async function({page:t,tag:n}){const e=qt+"/api/post/tag/"+n+"?page="+t,r=await fetch(e);return await r.json()}({page:s,tag:o});Array.isArray(t.posts)&&e(2,a=t.posts)};N((()=>{let t;t=Yt.parse(r.search),t.page&&e(1,s=t.page),c()}));return t.$$set=t=>{"location"in t&&e(4,r=t.location),"id"in t&&e(0,o=t.id)},[o,s,a,t=>()=>{e(1,s=1),c()},r,t=>t+s-2]}class oe extends ct{constructor(t){super(),at(this,t,re,ne,a,{location:4,id:0})}}function se(t){let n;return{c(){n=b("Shioriko")},m(t,e){g(t,n,e)},d(t){t&&m(n)}}}function ae(t){let n;return{c(){n=b("Posts")},m(t,e){g(t,n,e)},d(t){t&&m(n)}}}function ce(t){let n,e,r,o,s,a;return r=new Tt({props:{to:"/auth/register",class:"button is-primary",$$slots:{default:[ie]},$$scope:{ctx:t}}}),s=new Tt({props:{to:"/auth/login",class:"button is-light",$$slots:{default:[ue]},$$scope:{ctx:t}}}),{c(){n=y("div"),e=y("div"),et(r.$$.fragment),o=v(),et(s.$$.fragment),j(e,"class","buttons"),j(n,"class","navbar-item")},m(t,c){g(t,n,c),$(n,e),rt(r,e,null),$(e,o),rt(s,e,null),a=!0},i(t){a||(W(r.$$.fragment,t),W(s.$$.fragment,t),a=!0)},o(t){X(r.$$.fragment,t),X(s.$$.fragment,t),a=!1},d(t){t&&m(n),ot(r),ot(s)}}}function le(t){let n,e,r,o;return r=new Tt({props:{to:"/auth/logout",class:"button is-light",$$slots:{default:[pe]},$$scope:{ctx:t}}}),{c(){n=y("div"),e=y("div"),et(r.$$.fragment),j(e,"class","buttons"),j(n,"class","navbar-item")},m(t,s){g(t,n,s),$(n,e),rt(r,e,null),o=!0},i(t){o||(W(r.$$.fragment,t),o=!0)},o(t){X(r.$$.fragment,t),o=!1},d(t){t&&m(n),ot(r)}}}function ie(t){let n;return{c(){n=y("strong"),n.textContent="Register"},m(t,e){g(t,n,e)},d(t){t&&m(n)}}}function ue(t){let n;return{c(){n=b("Log in")},m(t,e){g(t,n,e)},d(t){t&&m(n)}}}function pe(t){let n;return{c(){n=b("Log out")},m(t,e){g(t,n,e)},d(t){t&&m(n)}}}function fe(t){let n,e,r,o,s,a,c,l,i,u,p,f,d,h,b,x,w,k,_,E,S,O,A,C,N,F,L;r=new Tt({props:{class:"navbar-item",to:"/",$$slots:{default:[se]},$$scope:{ctx:t}}}),i=new Tt({props:{class:"navbar-item",to:"/posts",$$slots:{default:[ae]},$$scope:{ctx:t}}});const R=[le,ce],P=[];function I(t,n){return t[1]?0:1}return f=I(t),d=P[f]=R[f](t),x=new Pt({props:{path:"/",component:Bt}}),k=new Pt({props:{path:"/posts",component:wn}}),E=new Pt({props:{path:"/tag/:id",component:oe}}),O=new Pt({props:{path:"/post/:id",component:Cn}}),C=new Pt({props:{path:"/auth/login",component:Ln}}),F=new Pt({props:{path:"/auth/logout",component:Pn}}),{c(){n=y("nav"),e=y("div"),et(r.$$.fragment),o=v(),s=y("a"),s.innerHTML=' \n\t\t\t \n\t\t\t',a=v(),c=y("div"),l=y("div"),et(i.$$.fragment),u=v(),p=y("div"),d.c(),h=v(),b=y("div"),et(x.$$.fragment),w=v(),et(k.$$.fragment),_=v(),et(E.$$.fragment),S=v(),et(O.$$.fragment),A=v(),et(C.$$.fragment),N=v(),et(F.$$.fragment),j(s,"role","button"),j(s,"class","navbar-burger"),j(s,"aria-label","menu"),j(s,"aria-expanded","false"),j(s,"data-target","navbarBasicExample"),j(e,"class","navbar-brand"),j(l,"class","navbar-start"),j(p,"class","navbar-end"),j(c,"id","navbarBasicExample"),j(c,"class","navbar-menu"),j(n,"class","navbar"),j(n,"role","navigation"),j(n,"aria-label","main navigation")},m(t,d){g(t,n,d),$(n,e),rt(r,e,null),$(e,o),$(e,s),$(n,a),$(n,c),$(c,l),rt(i,l,null),$(c,u),$(c,p),P[f].m(p,null),g(t,h,d),g(t,b,d),rt(x,b,null),$(b,w),rt(k,b,null),$(b,_),rt(E,b,null),$(b,S),rt(O,b,null),$(b,A),rt(C,b,null),$(b,N),rt(F,b,null),L=!0},p(t,n){const e={};8&n&&(e.$$scope={dirty:n,ctx:t}),r.$set(e);const o={};8&n&&(o.$$scope={dirty:n,ctx:t}),i.$set(o);let s=f;f=I(t),f!==s&&(Q(),X(P[s],1,1,(()=>{P[s]=null})),V(),d=P[f],d||(d=P[f]=R[f](t),d.c()),W(d,1),d.m(p,null))},i(t){L||(W(r.$$.fragment,t),W(i.$$.fragment,t),W(d),W(x.$$.fragment,t),W(k.$$.fragment,t),W(E.$$.fragment,t),W(O.$$.fragment,t),W(C.$$.fragment,t),W(F.$$.fragment,t),L=!0)},o(t){X(r.$$.fragment,t),X(i.$$.fragment,t),X(d),X(x.$$.fragment,t),X(k.$$.fragment,t),X(E.$$.fragment,t),X(O.$$.fragment,t),X(C.$$.fragment,t),X(F.$$.fragment,t),L=!1},d(t){t&&m(n),ot(r),ot(i),P[f].d(),t&&m(h),t&&m(b),ot(x),ot(k),ot(E),ot(O),ot(C),ot(F)}}}function de(t){let n,e;return n=new St({props:{url:t[0],$$slots:{default:[fe]},$$scope:{ctx:t}}}),{c(){et(n.$$.fragment)},m(t,r){rt(n,t,r),e=!0},p(t,[e]){const r={};1&e&&(r.url=t[0]),10&e&&(r.$$scope={dirty:e,ctx:t}),n.$set(r)},i(t){e||(W(n.$$.fragment,t),e=!0)},o(t){X(n.$$.fragment,t),e=!1},d(t){ot(n,t)}}}function $e(t,n,e){let r=!1;Gt.subscribe((t=>{e(1,r=""!==t)}));let{url:o=""}=n;return t.$$set=t=>{"url"in t&&e(0,o=t.url)},[o,r]}return new class extends ct{constructor(t){super(),at(this,t,$e,de,a,{url:0})}}({target:document.body,hydrate:!1})}(); //# sourceMappingURL=bundle.js.map diff --git a/web/static/bundle.js.map b/web/static/bundle.js.map index 1a24d0e..0cc6237 100644 --- a/web/static/bundle.js.map +++ b/web/static/bundle.js.map @@ -1 +1 @@ -{"version":3,"file":"bundle.js","sources":["../app/node_modules/svelte/internal/index.mjs","../app/node_modules/svelte/store/index.mjs","../app/node_modules/svelte-routing/src/contexts.js","../app/node_modules/svelte-routing/src/history.js","../app/node_modules/svelte-routing/src/utils.js","../app/node_modules/svelte-routing/src/Router.svelte","../app/node_modules/svelte-routing/src/Route.svelte","../app/node_modules/svelte-routing/src/Link.svelte","../app/src/stores.js","../app/src/api.js","../app/src/routes/Posts.svelte","../app/src/routes/Post.svelte","../app/src/routes/Login.svelte","../app/src/routes/Logout.svelte","../app/src/routes/Tag.svelte","../app/src/App.svelte","../app/src/main.js"],"sourcesContent":["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}\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(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 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_spread(slot, slot_definition, ctx, $$scope, dirty, get_slot_changes_fn, get_slot_spread_changes_fn, get_slot_context_fn) {\n const slot_changes = get_slot_spread_changes_fn(dirty) | get_slot_changes(slot_definition, $$scope, dirty, get_slot_changes_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 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 = ret) {\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\nfunction append(target, node) {\n target.appendChild(node);\n}\nfunction insert(target, node, anchor) {\n target.insertBefore(node, anchor || null);\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 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(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 claim_element(nodes, name, attributes, svg) {\n for (let i = 0; i < nodes.length; i += 1) {\n const node = nodes[i];\n if (node.nodeName === name) {\n let j = 0;\n const remove = [];\n while (j < node.attributes.length) {\n const attribute = node.attributes[j++];\n if (!attributes[attribute.name]) {\n remove.push(attribute.name);\n }\n }\n for (let k = 0; k < remove.length; k++) {\n node.removeAttribute(remove[k]);\n }\n return nodes.splice(i, 1)[0];\n }\n }\n return svg ? svg_element(name) : element(name);\n}\nfunction claim_text(nodes, data) {\n for (let i = 0; i < nodes.length; i += 1) {\n const node = nodes[i];\n if (node.nodeType === 3) {\n node.data = '' + data;\n return nodes.splice(i, 1)[0];\n }\n }\n return text(data);\n}\nfunction claim_space(nodes) {\n return claim_text(nodes, ' ');\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 node.style.setProperty(key, value, important ? 'important' : '');\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}\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) {\n const e = document.createEvent('CustomEvent');\n e.initCustomEvent(type, false, false, detail);\n return e;\n}\nfunction query_selector_all(selector, parent = document.body) {\n return Array.from(parent.querySelectorAll(selector));\n}\nclass HtmlTag {\n constructor(anchor = null) {\n this.a = anchor;\n this.e = this.n = null;\n }\n m(html, target, anchor = null) {\n if (!this.e) {\n this.e = element(target.nodeName);\n this.t = target;\n this.h(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}\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}\n\nconst active_docs = new Set();\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_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 = node.ownerDocument;\n active_docs.add(doc);\n const stylesheet = doc.__svelte_stylesheet || (doc.__svelte_stylesheet = doc.head.appendChild(element('style')).sheet);\n const current_rules = doc.__svelte_rules || (doc.__svelte_rules = {});\n if (!current_rules[name]) {\n current_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 active_docs.forEach(doc => {\n const stylesheet = doc.__svelte_stylesheet;\n let i = stylesheet.cssRules.length;\n while (i--)\n stylesheet.deleteRule(i);\n doc.__svelte_rules = {};\n });\n active_docs.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}\nfunction beforeUpdate(fn) {\n get_current_component().$$.before_update.push(fn);\n}\nfunction onMount(fn) {\n get_current_component().$$.on_mount.push(fn);\n}\nfunction afterUpdate(fn) {\n get_current_component().$$.after_update.push(fn);\n}\nfunction onDestroy(fn) {\n get_current_component().$$.on_destroy.push(fn);\n}\nfunction createEventDispatcher() {\n const component = get_current_component();\n return (type, detail) => {\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);\n callbacks.slice().forEach(fn => {\n fn.call(component, event);\n });\n }\n };\n}\nfunction setContext(key, context) {\n get_current_component().$$.context.set(key, context);\n}\nfunction getContext(key) {\n return get_current_component().$$.context.get(key);\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 callbacks.slice().forEach(fn => fn(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}\nlet flushing = false;\nconst seen_callbacks = new Set();\nfunction flush() {\n if (flushing)\n return;\n flushing = true;\n do {\n // first, call beforeUpdate functions\n // and update components\n for (let i = 0; i < dirty_components.length; i += 1) {\n const component = dirty_components[i];\n set_current_component(component);\n update(component.$$);\n }\n set_current_component(null);\n dirty_components.length = 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 flushing = false;\n seen_callbacks.clear();\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}\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 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 — we can tidy up immediately\n clear_animation();\n }\n else {\n // outro — 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 'ismap',\n 'loop',\n 'multiple',\n 'muted',\n 'nomodule',\n 'novalidate',\n 'open',\n 'playsinline',\n 'readonly',\n 'required',\n 'reversed',\n 'selected'\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, classes_to_add) {\n const attributes = Object.assign({}, ...args);\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 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}=\"${String(value).replace(/\"/g, '"').replace(/'/g, ''')}\"`;\n }\n });\n return str;\n}\nconst escaped = {\n '\"': '"',\n \"'\": ''',\n '&': '&',\n '<': '<',\n '>': '>'\n};\nfunction escape(html) {\n return String(html).replace(/[\"'&<>]/g, match => escaped[match]);\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`);\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(parent_component ? parent_component.$$.context : 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 return ` ${name}${value === true ? '' : `=${typeof value === 'string' ? JSON.stringify(escape(value)) : `\"${value}\"`}`}`;\n}\nfunction add_classes(classes) {\n return classes ? ` class=\"${classes}\"` : '';\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, on_mount, on_destroy, 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 = on_mount.map(run).filter(is_function);\n if (on_destroy) {\n 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, dirty = [-1]) {\n const parent_component = current_component;\n set_current_component(component);\n const $$ = component.$$ = {\n fragment: null,\n ctx: null,\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(parent_component ? parent_component.$$.context : options.context || []),\n // everything else\n callbacks: blank_object(),\n dirty,\n skip_bound: false\n };\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 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 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 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 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.38.2' }, detail)));\n}\nfunction append_dev(target, node) {\n dispatch_dev('SvelteDOMInsert', { target, node });\n append(target, node);\n}\nfunction insert_dev(target, node, anchor) {\n dispatch_dev('SvelteDOMInsert', { target, node, anchor });\n insert(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}\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 seperate 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, SvelteComponent, SvelteComponentDev, SvelteComponentTyped, SvelteElement, action_destroyer, add_attribute, add_classes, add_flush_callback, add_location, add_render_callback, add_resize_listener, add_transform, afterUpdate, append, append_dev, assign, attr, attr_dev, attribute_to_object, beforeUpdate, bind, binding_callbacks, blank_object, bubble, check_outros, children, claim_component, claim_element, claim_space, claim_text, clear_loops, component_subscribe, compute_rest_props, compute_slots, 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, escape, escaped, exclude_internal_props, fix_and_destroy_block, fix_and_outro_and_destroy_block, fix_position, flush, getContext, get_binding_group_value, get_current_component, get_custom_elements_slots, get_slot_changes, get_slot_context, get_spread_object, get_spread_update, get_store_value, globals, group_outros, handle_promise, hasContext, has_prop, identity, init, insert, insert_dev, intros, invalid_attribute_name_character, is_client, is_crossorigin, is_empty, is_function, is_promise, listen, listen_dev, loop, loop_guard, 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_data, set_data_dev, set_input_type, set_input_value, set_now, set_raf, set_store_value, set_style, set_svg_attributes, space, spread, stop_propagation, subscribe, svg_element, text, tick, time_ranges_to_array, to_number, toggle_class, transition_in, transition_out, update_await_block_branch, update_keyed_each, update_slot, update_slot_spread, validate_component, validate_each_argument, validate_each_keys, validate_slots, validate_store, 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 = [];\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 (let i = 0; i < subscribers.length; i += 1) {\n const s = subscribers[i];\n s[1]();\n subscriber_queue.push(s, 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.push(subscriber);\n if (subscribers.length === 1) {\n stop = start(set) || noop;\n }\n run(value);\n return () => {\n const index = subscribers.indexOf(subscriber);\n if (index !== -1) {\n subscribers.splice(index, 1);\n }\n if (subscribers.length === 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","export const LOCATION = {};\nexport const ROUTER = {};\n","/**\n * Adapted from https://github.com/reach/router/blob/b60e6dd781d5d3a4bdaaf4de665649c0f6a7e78d/src/lib/history.js\n *\n * https://github.com/reach/router/blob/master/LICENSE\n * */\n\nfunction getLocation(source) {\n return {\n ...source.location,\n state: source.history.state,\n key: (source.history.state && source.history.state.key) || \"initial\"\n };\n}\n\nfunction createHistory(source, options) {\n const listeners = [];\n let location = getLocation(source);\n\n return {\n get location() {\n return location;\n },\n\n listen(listener) {\n listeners.push(listener);\n\n const popstateListener = () => {\n location = getLocation(source);\n listener({ location, action: \"POP\" });\n };\n\n source.addEventListener(\"popstate\", popstateListener);\n\n return () => {\n source.removeEventListener(\"popstate\", popstateListener);\n\n const index = listeners.indexOf(listener);\n listeners.splice(index, 1);\n };\n },\n\n navigate(to, { state, replace = false } = {}) {\n state = { ...state, key: Date.now() + \"\" };\n // try...catch iOS Safari limits to 100 pushState calls\n try {\n if (replace) {\n source.history.replaceState(state, null, to);\n } else {\n source.history.pushState(state, null, to);\n }\n } catch (e) {\n source.location[replace ? \"replace\" : \"assign\"](to);\n }\n\n location = getLocation(source);\n listeners.forEach(listener => listener({ location, action: \"PUSH\" }));\n }\n };\n}\n\n// Stores history entries in memory for testing or other platforms like Native\nfunction createMemorySource(initialPathname = \"/\") {\n let index = 0;\n const stack = [{ pathname: initialPathname, search: \"\" }];\n const states = [];\n\n return {\n get location() {\n return stack[index];\n },\n addEventListener(name, fn) {},\n removeEventListener(name, fn) {},\n history: {\n get entries() {\n return stack;\n },\n get index() {\n return index;\n },\n get state() {\n return states[index];\n },\n pushState(state, _, uri) {\n const [pathname, search = \"\"] = uri.split(\"?\");\n index++;\n stack.push({ pathname, search });\n states.push(state);\n },\n replaceState(state, _, uri) {\n const [pathname, search = \"\"] = uri.split(\"?\");\n stack[index] = { pathname, search };\n states[index] = state;\n }\n }\n };\n}\n\n// Global history uses window.history as the source if available,\n// otherwise a memory history\nconst canUseDOM = Boolean(\n typeof window !== \"undefined\" &&\n window.document &&\n window.document.createElement\n);\nconst globalHistory = createHistory(canUseDOM ? window : createMemorySource());\nconst { navigate } = globalHistory;\n\nexport { globalHistory, navigate, createHistory, createMemorySource };\n","/**\n * Adapted from https://github.com/reach/router/blob/b60e6dd781d5d3a4bdaaf4de665649c0f6a7e78d/src/lib/utils.js\n *\n * https://github.com/reach/router/blob/master/LICENSE\n * */\n\nconst paramRe = /^:(.+)/;\n\nconst SEGMENT_POINTS = 4;\nconst STATIC_POINTS = 3;\nconst DYNAMIC_POINTS = 2;\nconst SPLAT_PENALTY = 1;\nconst ROOT_POINTS = 1;\n\n/**\n * Check if `string` starts with `search`\n * @param {string} string\n * @param {string} search\n * @return {boolean}\n */\nexport function startsWith(string, search) {\n return string.substr(0, search.length) === search;\n}\n\n/**\n * Check if `segment` is a root segment\n * @param {string} segment\n * @return {boolean}\n */\nfunction isRootSegment(segment) {\n return segment === \"\";\n}\n\n/**\n * Check if `segment` is a dynamic segment\n * @param {string} segment\n * @return {boolean}\n */\nfunction isDynamic(segment) {\n return paramRe.test(segment);\n}\n\n/**\n * Check if `segment` is a splat\n * @param {string} segment\n * @return {boolean}\n */\nfunction isSplat(segment) {\n return segment[0] === \"*\";\n}\n\n/**\n * Split up the URI into segments delimited by `/`\n * @param {string} uri\n * @return {string[]}\n */\nfunction segmentize(uri) {\n return (\n uri\n // Strip starting/ending `/`\n .replace(/(^\\/+|\\/+$)/g, \"\")\n .split(\"/\")\n );\n}\n\n/**\n * Strip `str` of potential start and end `/`\n * @param {string} str\n * @return {string}\n */\nfunction stripSlashes(str) {\n return str.replace(/(^\\/+|\\/+$)/g, \"\");\n}\n\n/**\n * Score a route depending on how its individual segments look\n * @param {object} route\n * @param {number} index\n * @return {object}\n */\nfunction rankRoute(route, index) {\n const score = route.default\n ? 0\n : segmentize(route.path).reduce((score, segment) => {\n score += SEGMENT_POINTS;\n\n if (isRootSegment(segment)) {\n score += ROOT_POINTS;\n } else if (isDynamic(segment)) {\n score += DYNAMIC_POINTS;\n } else if (isSplat(segment)) {\n score -= SEGMENT_POINTS + SPLAT_PENALTY;\n } else {\n score += STATIC_POINTS;\n }\n\n return score;\n }, 0);\n\n return { route, score, index };\n}\n\n/**\n * Give a score to all routes and sort them on that\n * @param {object[]} routes\n * @return {object[]}\n */\nfunction rankRoutes(routes) {\n return (\n routes\n .map(rankRoute)\n // If two routes have the exact same score, we go by index instead\n .sort((a, b) =>\n a.score < b.score ? 1 : a.score > b.score ? -1 : a.index - b.index\n )\n );\n}\n\n/**\n * Ranks and picks the best route to match. Each segment gets the highest\n * amount of points, then the type of segment gets an additional amount of\n * points where\n *\n * static > dynamic > splat > root\n *\n * This way we don't have to worry about the order of our routes, let the\n * computers do it.\n *\n * A route looks like this\n *\n * { path, default, value }\n *\n * And a returned match looks like:\n *\n * { route, params, uri }\n *\n * @param {object[]} routes\n * @param {string} uri\n * @return {?object}\n */\nfunction pick(routes, uri) {\n let match;\n let default_;\n\n const [uriPathname] = uri.split(\"?\");\n const uriSegments = segmentize(uriPathname);\n const isRootUri = uriSegments[0] === \"\";\n const ranked = rankRoutes(routes);\n\n for (let i = 0, l = ranked.length; i < l; i++) {\n const route = ranked[i].route;\n let missed = false;\n\n if (route.default) {\n default_ = {\n route,\n params: {},\n uri\n };\n continue;\n }\n\n const routeSegments = segmentize(route.path);\n const params = {};\n const max = Math.max(uriSegments.length, routeSegments.length);\n let index = 0;\n\n for (; index < max; index++) {\n const routeSegment = routeSegments[index];\n const uriSegment = uriSegments[index];\n\n if (routeSegment !== undefined && isSplat(routeSegment)) {\n // Hit a splat, just grab the rest, and return a match\n // uri: /files/documents/work\n // route: /files/* or /files/*splatname\n const splatName = routeSegment === \"*\" ? \"*\" : routeSegment.slice(1);\n\n params[splatName] = uriSegments\n .slice(index)\n .map(decodeURIComponent)\n .join(\"/\");\n break;\n }\n\n if (uriSegment === undefined) {\n // URI is shorter than the route, no match\n // uri: /users\n // route: /users/:userId\n missed = true;\n break;\n }\n\n let dynamicMatch = paramRe.exec(routeSegment);\n\n if (dynamicMatch && !isRootUri) {\n const value = decodeURIComponent(uriSegment);\n params[dynamicMatch[1]] = value;\n } else if (routeSegment !== uriSegment) {\n // Current segments don't match, not dynamic, not splat, so no match\n // uri: /users/123/settings\n // route: /users/:id/profile\n missed = true;\n break;\n }\n }\n\n if (!missed) {\n match = {\n route,\n params,\n uri: \"/\" + uriSegments.slice(0, index).join(\"/\")\n };\n break;\n }\n }\n\n return match || default_ || null;\n}\n\n/**\n * Check if the `path` matches the `uri`.\n * @param {string} path\n * @param {string} uri\n * @return {?object}\n */\nfunction match(route, uri) {\n return pick([route], uri);\n}\n\n/**\n * Add the query to the pathname if a query is given\n * @param {string} pathname\n * @param {string} [query]\n * @return {string}\n */\nfunction addQuery(pathname, query) {\n return pathname + (query ? `?${query}` : \"\");\n}\n\n/**\n * Resolve URIs as though every path is a directory, no files. Relative URIs\n * in the browser can feel awkward because not only can you be \"in a directory\",\n * you can be \"at a file\", too. For example:\n *\n * browserSpecResolve('foo', '/bar/') => /bar/foo\n * browserSpecResolve('foo', '/bar') => /foo\n *\n * But on the command line of a file system, it's not as complicated. You can't\n * `cd` from a file, only directories. This way, links have to know less about\n * their current path. To go deeper you can do this:\n *\n * \n * // instead of\n * \n *\n * Just like `cd`, if you want to go deeper from the command line, you do this:\n *\n * cd deeper\n * # not\n * cd $(pwd)/deeper\n *\n * By treating every path as a directory, linking to relative paths should\n * require less contextual information and (fingers crossed) be more intuitive.\n * @param {string} to\n * @param {string} base\n * @return {string}\n */\nfunction resolve(to, base) {\n // /foo/bar, /baz/qux => /foo/bar\n if (startsWith(to, \"/\")) {\n return to;\n }\n\n const [toPathname, toQuery] = to.split(\"?\");\n const [basePathname] = base.split(\"?\");\n const toSegments = segmentize(toPathname);\n const baseSegments = segmentize(basePathname);\n\n // ?a=b, /users?b=c => /users?a=b\n if (toSegments[0] === \"\") {\n return addQuery(basePathname, toQuery);\n }\n\n // profile, /users/789 => /users/789/profile\n if (!startsWith(toSegments[0], \".\")) {\n const pathname = baseSegments.concat(toSegments).join(\"/\");\n\n return addQuery((basePathname === \"/\" ? \"\" : \"/\") + pathname, toQuery);\n }\n\n // ./ , /users/123 => /users/123\n // ../ , /users/123 => /users\n // ../.. , /users/123 => /\n // ../../one, /a/b/c/d => /a/b/one\n // .././one , /a/b/c/d => /a/b/c/one\n const allSegments = baseSegments.concat(toSegments);\n const segments = [];\n\n allSegments.forEach(segment => {\n if (segment === \"..\") {\n segments.pop();\n } else if (segment !== \".\") {\n segments.push(segment);\n }\n });\n\n return addQuery(\"/\" + segments.join(\"/\"), toQuery);\n}\n\n/**\n * Combines the `basepath` and the `path` into one path.\n * @param {string} basepath\n * @param {string} path\n */\nfunction combinePaths(basepath, path) {\n return `${stripSlashes(\n path === \"/\" ? basepath : `${stripSlashes(basepath)}/${stripSlashes(path)}`\n )}/`;\n}\n\n/**\n * Decides whether a given `event` should result in a navigation or not.\n * @param {object} event\n */\nfunction shouldNavigate(event) {\n return (\n !event.defaultPrevented &&\n event.button === 0 &&\n !(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey)\n );\n}\n\nfunction hostMatches(anchor) {\n const host = location.host\n return (\n anchor.host == host ||\n // svelte seems to kill anchor.host value in ie11, so fall back to checking href\n anchor.href.indexOf(`https://${host}`) === 0 ||\n anchor.href.indexOf(`http://${host}`) === 0\n )\n}\n\nexport { stripSlashes, pick, match, resolve, combinePaths, shouldNavigate, hostMatches };\n","\n\n\n","\n\n{#if $activeRoute !== null && $activeRoute.route === route}\n {#if component !== null}\n \n {:else}\n \n {/if}\n{/if}\n","\n\n\n \n\n","import { writable } from \"svelte/store\";\n\nconst storedToken = localStorage.getItem(\"apiToken\");\n\nexport const token = writable(storedToken);\ntoken.subscribe(value => {\n localStorage.setItem(\"apiToken\", value);\n});","import { token } from \"./stores.js\"\n\nlet url = window.BASE_URL;\nlet current_token;\nconst unsub_token = token.subscribe(value => {\n current_token = token;\n})\nexport async function login({ username, password }) {\n const endpoint = url + \"/api/auth/login\";\n const response = await fetch(endpoint, {\n method: \"POST\",\n body: JSON.stringify({\n username,\n password,\n }),\n })\n const data = await response.json();\n token.set(data.token);\n return data;\n}\n\nexport async function getPosts({ page }) {\n const endpoint = url + \"/api/post?page=\" + page;\n const response = await fetch(endpoint);\n const data = await response.json();\n return data;\n}\n\nexport async function getPostsTag({ page, tag }) {\n const endpoint = url + \"/api/post/tag/\" + tag + \"?page=\" + page;\n const response = await fetch(endpoint);\n const data = await response.json();\n return data;\n}\n\nexport async function getPost({ id }) {\n const endpoint = url + \"/api/post/\" + id;\n const response = await fetch(endpoint);\n const data = await response.json();\n return data;\n}","\n\n
\n
\n

\n Posts\n

\n
\n
\n\n
\n
\n
\n {#each posts as post (post.id)}\n
\n
\n
\n \n \n \n
\n
\n
\n
\n {#each post.tags as tag (tag)}\n {tag}\n {/each}\n
\n
\n
\n {/each}\n
\n
\n
\n","\n\n\n
\n
\n {#if post}\n

\n Post ID: {post.id}\n

\n {/if}\n
\n
\n{#if post}\n
\n
\n
\n
\n

\n Source URL: {post.source_url}\n

\n

\n Tags: \n {#each post.tags as tag (tag)}\n {tag}\n {/each}\n

\n
\n
\n
\n \n
\n
\n
\n
\n
\n{/if}","\n
\n
\n
\n \n
\n \n
\n
\n
\n \n
\n \n
\n
\n
\n
\n \n
\n
\n
\n
\n","\n","\n\n
\n
\n

\n {id}\n

\n

\n Tag\n

\n
\n
\n\n
\n
\n
\n {#each posts as post (post.id)}\n
\n
\n
\n \n \n \n
\n
\n
\n
\n {#each post.tags as tag (tag)}\n {tag}\n {/each}\n
\n
\n
\n {/each}\n
\n
\n
\n","\n\n\n\t\n\t
\n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t
\n
","import App from './App.svelte';\n\nconst app = new App({\n\ttarget: document.body,\n\thydrate: false,\n});\n\nexport default app;"],"names":[],"mappings":";;;;;IAAA,SAAS,IAAI,GAAG,GAAG;IAEnB,SAAS,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE;IAC1B;IACA,IAAI,KAAK,MAAM,CAAC,IAAI,GAAG;IACvB,QAAQ,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;IACxB,IAAI,OAAO,GAAG,CAAC;IACf,CAAC;IAID,SAAS,YAAY,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE;IACzD,IAAI,OAAO,CAAC,aAAa,G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G,KAAK,KAAK,EAAE;;;WAGb,GAAG,GAAG,EAAE;SACf,OAAO,GAAG,MAAM,CAAC,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACfzB,UAAC,GAAG,GAAG,IAAI,GAAG,CAAC;IACpB,CAAC,MAAM,EAAE,QAAQ,CAAC,IAAI;IACtB,CAAC,OAAO,EAAE,KAAK;IACf,CAAC;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"bundle.js","sources":["../app/node_modules/svelte/internal/index.mjs","../app/node_modules/svelte/store/index.mjs","../app/node_modules/svelte-routing/src/contexts.js","../app/node_modules/svelte-routing/src/history.js","../app/node_modules/svelte-routing/src/utils.js","../app/node_modules/svelte-routing/src/Router.svelte","../app/node_modules/svelte-routing/src/Route.svelte","../app/node_modules/svelte-routing/src/Link.svelte","../app/src/stores.js","../app/src/api.js","../app/node_modules/strict-uri-encode/index.js","../app/node_modules/decode-uri-component/index.js","../app/node_modules/split-on-first/index.js","../app/node_modules/filter-obj/index.js","../app/node_modules/query-string/index.js","../app/src/routes/Posts.svelte","../app/src/routes/Post.svelte","../app/src/routes/Login.svelte","../app/src/routes/Logout.svelte","../app/src/routes/Tag.svelte","../app/src/App.svelte","../app/src/main.js"],"sourcesContent":["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}\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(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 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_spread(slot, slot_definition, ctx, $$scope, dirty, get_slot_changes_fn, get_slot_spread_changes_fn, get_slot_context_fn) {\n const slot_changes = get_slot_spread_changes_fn(dirty) | get_slot_changes(slot_definition, $$scope, dirty, get_slot_changes_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 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 = ret) {\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\nfunction append(target, node) {\n target.appendChild(node);\n}\nfunction insert(target, node, anchor) {\n target.insertBefore(node, anchor || null);\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 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(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 claim_element(nodes, name, attributes, svg) {\n for (let i = 0; i < nodes.length; i += 1) {\n const node = nodes[i];\n if (node.nodeName === name) {\n let j = 0;\n const remove = [];\n while (j < node.attributes.length) {\n const attribute = node.attributes[j++];\n if (!attributes[attribute.name]) {\n remove.push(attribute.name);\n }\n }\n for (let k = 0; k < remove.length; k++) {\n node.removeAttribute(remove[k]);\n }\n return nodes.splice(i, 1)[0];\n }\n }\n return svg ? svg_element(name) : element(name);\n}\nfunction claim_text(nodes, data) {\n for (let i = 0; i < nodes.length; i += 1) {\n const node = nodes[i];\n if (node.nodeType === 3) {\n node.data = '' + data;\n return nodes.splice(i, 1)[0];\n }\n }\n return text(data);\n}\nfunction claim_space(nodes) {\n return claim_text(nodes, ' ');\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 node.style.setProperty(key, value, important ? 'important' : '');\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}\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) {\n const e = document.createEvent('CustomEvent');\n e.initCustomEvent(type, false, false, detail);\n return e;\n}\nfunction query_selector_all(selector, parent = document.body) {\n return Array.from(parent.querySelectorAll(selector));\n}\nclass HtmlTag {\n constructor(anchor = null) {\n this.a = anchor;\n this.e = this.n = null;\n }\n m(html, target, anchor = null) {\n if (!this.e) {\n this.e = element(target.nodeName);\n this.t = target;\n this.h(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}\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}\n\nconst active_docs = new Set();\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_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 = node.ownerDocument;\n active_docs.add(doc);\n const stylesheet = doc.__svelte_stylesheet || (doc.__svelte_stylesheet = doc.head.appendChild(element('style')).sheet);\n const current_rules = doc.__svelte_rules || (doc.__svelte_rules = {});\n if (!current_rules[name]) {\n current_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 active_docs.forEach(doc => {\n const stylesheet = doc.__svelte_stylesheet;\n let i = stylesheet.cssRules.length;\n while (i--)\n stylesheet.deleteRule(i);\n doc.__svelte_rules = {};\n });\n active_docs.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}\nfunction beforeUpdate(fn) {\n get_current_component().$$.before_update.push(fn);\n}\nfunction onMount(fn) {\n get_current_component().$$.on_mount.push(fn);\n}\nfunction afterUpdate(fn) {\n get_current_component().$$.after_update.push(fn);\n}\nfunction onDestroy(fn) {\n get_current_component().$$.on_destroy.push(fn);\n}\nfunction createEventDispatcher() {\n const component = get_current_component();\n return (type, detail) => {\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);\n callbacks.slice().forEach(fn => {\n fn.call(component, event);\n });\n }\n };\n}\nfunction setContext(key, context) {\n get_current_component().$$.context.set(key, context);\n}\nfunction getContext(key) {\n return get_current_component().$$.context.get(key);\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 callbacks.slice().forEach(fn => fn(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}\nlet flushing = false;\nconst seen_callbacks = new Set();\nfunction flush() {\n if (flushing)\n return;\n flushing = true;\n do {\n // first, call beforeUpdate functions\n // and update components\n for (let i = 0; i < dirty_components.length; i += 1) {\n const component = dirty_components[i];\n set_current_component(component);\n update(component.$$);\n }\n set_current_component(null);\n dirty_components.length = 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 flushing = false;\n seen_callbacks.clear();\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}\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 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 — we can tidy up immediately\n clear_animation();\n }\n else {\n // outro — 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 'ismap',\n 'loop',\n 'multiple',\n 'muted',\n 'nomodule',\n 'novalidate',\n 'open',\n 'playsinline',\n 'readonly',\n 'required',\n 'reversed',\n 'selected'\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, classes_to_add) {\n const attributes = Object.assign({}, ...args);\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 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}=\"${String(value).replace(/\"/g, '"').replace(/'/g, ''')}\"`;\n }\n });\n return str;\n}\nconst escaped = {\n '\"': '"',\n \"'\": ''',\n '&': '&',\n '<': '<',\n '>': '>'\n};\nfunction escape(html) {\n return String(html).replace(/[\"'&<>]/g, match => escaped[match]);\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`);\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(parent_component ? parent_component.$$.context : 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 return ` ${name}${value === true ? '' : `=${typeof value === 'string' ? JSON.stringify(escape(value)) : `\"${value}\"`}`}`;\n}\nfunction add_classes(classes) {\n return classes ? ` class=\"${classes}\"` : '';\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, on_mount, on_destroy, 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 = on_mount.map(run).filter(is_function);\n if (on_destroy) {\n 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, dirty = [-1]) {\n const parent_component = current_component;\n set_current_component(component);\n const $$ = component.$$ = {\n fragment: null,\n ctx: null,\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(parent_component ? parent_component.$$.context : options.context || []),\n // everything else\n callbacks: blank_object(),\n dirty,\n skip_bound: false\n };\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 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 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 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 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.38.2' }, detail)));\n}\nfunction append_dev(target, node) {\n dispatch_dev('SvelteDOMInsert', { target, node });\n append(target, node);\n}\nfunction insert_dev(target, node, anchor) {\n dispatch_dev('SvelteDOMInsert', { target, node, anchor });\n insert(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}\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 seperate 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, SvelteComponent, SvelteComponentDev, SvelteComponentTyped, SvelteElement, action_destroyer, add_attribute, add_classes, add_flush_callback, add_location, add_render_callback, add_resize_listener, add_transform, afterUpdate, append, append_dev, assign, attr, attr_dev, attribute_to_object, beforeUpdate, bind, binding_callbacks, blank_object, bubble, check_outros, children, claim_component, claim_element, claim_space, claim_text, clear_loops, component_subscribe, compute_rest_props, compute_slots, 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, escape, escaped, exclude_internal_props, fix_and_destroy_block, fix_and_outro_and_destroy_block, fix_position, flush, getContext, get_binding_group_value, get_current_component, get_custom_elements_slots, get_slot_changes, get_slot_context, get_spread_object, get_spread_update, get_store_value, globals, group_outros, handle_promise, hasContext, has_prop, identity, init, insert, insert_dev, intros, invalid_attribute_name_character, is_client, is_crossorigin, is_empty, is_function, is_promise, listen, listen_dev, loop, loop_guard, 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_data, set_data_dev, set_input_type, set_input_value, set_now, set_raf, set_store_value, set_style, set_svg_attributes, space, spread, stop_propagation, subscribe, svg_element, text, tick, time_ranges_to_array, to_number, toggle_class, transition_in, transition_out, update_await_block_branch, update_keyed_each, update_slot, update_slot_spread, validate_component, validate_each_argument, validate_each_keys, validate_slots, validate_store, 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 = [];\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 (let i = 0; i < subscribers.length; i += 1) {\n const s = subscribers[i];\n s[1]();\n subscriber_queue.push(s, 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.push(subscriber);\n if (subscribers.length === 1) {\n stop = start(set) || noop;\n }\n run(value);\n return () => {\n const index = subscribers.indexOf(subscriber);\n if (index !== -1) {\n subscribers.splice(index, 1);\n }\n if (subscribers.length === 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","export const LOCATION = {};\nexport const ROUTER = {};\n","/**\n * Adapted from https://github.com/reach/router/blob/b60e6dd781d5d3a4bdaaf4de665649c0f6a7e78d/src/lib/history.js\n *\n * https://github.com/reach/router/blob/master/LICENSE\n * */\n\nfunction getLocation(source) {\n return {\n ...source.location,\n state: source.history.state,\n key: (source.history.state && source.history.state.key) || \"initial\"\n };\n}\n\nfunction createHistory(source, options) {\n const listeners = [];\n let location = getLocation(source);\n\n return {\n get location() {\n return location;\n },\n\n listen(listener) {\n listeners.push(listener);\n\n const popstateListener = () => {\n location = getLocation(source);\n listener({ location, action: \"POP\" });\n };\n\n source.addEventListener(\"popstate\", popstateListener);\n\n return () => {\n source.removeEventListener(\"popstate\", popstateListener);\n\n const index = listeners.indexOf(listener);\n listeners.splice(index, 1);\n };\n },\n\n navigate(to, { state, replace = false } = {}) {\n state = { ...state, key: Date.now() + \"\" };\n // try...catch iOS Safari limits to 100 pushState calls\n try {\n if (replace) {\n source.history.replaceState(state, null, to);\n } else {\n source.history.pushState(state, null, to);\n }\n } catch (e) {\n source.location[replace ? \"replace\" : \"assign\"](to);\n }\n\n location = getLocation(source);\n listeners.forEach(listener => listener({ location, action: \"PUSH\" }));\n }\n };\n}\n\n// Stores history entries in memory for testing or other platforms like Native\nfunction createMemorySource(initialPathname = \"/\") {\n let index = 0;\n const stack = [{ pathname: initialPathname, search: \"\" }];\n const states = [];\n\n return {\n get location() {\n return stack[index];\n },\n addEventListener(name, fn) {},\n removeEventListener(name, fn) {},\n history: {\n get entries() {\n return stack;\n },\n get index() {\n return index;\n },\n get state() {\n return states[index];\n },\n pushState(state, _, uri) {\n const [pathname, search = \"\"] = uri.split(\"?\");\n index++;\n stack.push({ pathname, search });\n states.push(state);\n },\n replaceState(state, _, uri) {\n const [pathname, search = \"\"] = uri.split(\"?\");\n stack[index] = { pathname, search };\n states[index] = state;\n }\n }\n };\n}\n\n// Global history uses window.history as the source if available,\n// otherwise a memory history\nconst canUseDOM = Boolean(\n typeof window !== \"undefined\" &&\n window.document &&\n window.document.createElement\n);\nconst globalHistory = createHistory(canUseDOM ? window : createMemorySource());\nconst { navigate } = globalHistory;\n\nexport { globalHistory, navigate, createHistory, createMemorySource };\n","/**\n * Adapted from https://github.com/reach/router/blob/b60e6dd781d5d3a4bdaaf4de665649c0f6a7e78d/src/lib/utils.js\n *\n * https://github.com/reach/router/blob/master/LICENSE\n * */\n\nconst paramRe = /^:(.+)/;\n\nconst SEGMENT_POINTS = 4;\nconst STATIC_POINTS = 3;\nconst DYNAMIC_POINTS = 2;\nconst SPLAT_PENALTY = 1;\nconst ROOT_POINTS = 1;\n\n/**\n * Check if `string` starts with `search`\n * @param {string} string\n * @param {string} search\n * @return {boolean}\n */\nexport function startsWith(string, search) {\n return string.substr(0, search.length) === search;\n}\n\n/**\n * Check if `segment` is a root segment\n * @param {string} segment\n * @return {boolean}\n */\nfunction isRootSegment(segment) {\n return segment === \"\";\n}\n\n/**\n * Check if `segment` is a dynamic segment\n * @param {string} segment\n * @return {boolean}\n */\nfunction isDynamic(segment) {\n return paramRe.test(segment);\n}\n\n/**\n * Check if `segment` is a splat\n * @param {string} segment\n * @return {boolean}\n */\nfunction isSplat(segment) {\n return segment[0] === \"*\";\n}\n\n/**\n * Split up the URI into segments delimited by `/`\n * @param {string} uri\n * @return {string[]}\n */\nfunction segmentize(uri) {\n return (\n uri\n // Strip starting/ending `/`\n .replace(/(^\\/+|\\/+$)/g, \"\")\n .split(\"/\")\n );\n}\n\n/**\n * Strip `str` of potential start and end `/`\n * @param {string} str\n * @return {string}\n */\nfunction stripSlashes(str) {\n return str.replace(/(^\\/+|\\/+$)/g, \"\");\n}\n\n/**\n * Score a route depending on how its individual segments look\n * @param {object} route\n * @param {number} index\n * @return {object}\n */\nfunction rankRoute(route, index) {\n const score = route.default\n ? 0\n : segmentize(route.path).reduce((score, segment) => {\n score += SEGMENT_POINTS;\n\n if (isRootSegment(segment)) {\n score += ROOT_POINTS;\n } else if (isDynamic(segment)) {\n score += DYNAMIC_POINTS;\n } else if (isSplat(segment)) {\n score -= SEGMENT_POINTS + SPLAT_PENALTY;\n } else {\n score += STATIC_POINTS;\n }\n\n return score;\n }, 0);\n\n return { route, score, index };\n}\n\n/**\n * Give a score to all routes and sort them on that\n * @param {object[]} routes\n * @return {object[]}\n */\nfunction rankRoutes(routes) {\n return (\n routes\n .map(rankRoute)\n // If two routes have the exact same score, we go by index instead\n .sort((a, b) =>\n a.score < b.score ? 1 : a.score > b.score ? -1 : a.index - b.index\n )\n );\n}\n\n/**\n * Ranks and picks the best route to match. Each segment gets the highest\n * amount of points, then the type of segment gets an additional amount of\n * points where\n *\n * static > dynamic > splat > root\n *\n * This way we don't have to worry about the order of our routes, let the\n * computers do it.\n *\n * A route looks like this\n *\n * { path, default, value }\n *\n * And a returned match looks like:\n *\n * { route, params, uri }\n *\n * @param {object[]} routes\n * @param {string} uri\n * @return {?object}\n */\nfunction pick(routes, uri) {\n let match;\n let default_;\n\n const [uriPathname] = uri.split(\"?\");\n const uriSegments = segmentize(uriPathname);\n const isRootUri = uriSegments[0] === \"\";\n const ranked = rankRoutes(routes);\n\n for (let i = 0, l = ranked.length; i < l; i++) {\n const route = ranked[i].route;\n let missed = false;\n\n if (route.default) {\n default_ = {\n route,\n params: {},\n uri\n };\n continue;\n }\n\n const routeSegments = segmentize(route.path);\n const params = {};\n const max = Math.max(uriSegments.length, routeSegments.length);\n let index = 0;\n\n for (; index < max; index++) {\n const routeSegment = routeSegments[index];\n const uriSegment = uriSegments[index];\n\n if (routeSegment !== undefined && isSplat(routeSegment)) {\n // Hit a splat, just grab the rest, and return a match\n // uri: /files/documents/work\n // route: /files/* or /files/*splatname\n const splatName = routeSegment === \"*\" ? \"*\" : routeSegment.slice(1);\n\n params[splatName] = uriSegments\n .slice(index)\n .map(decodeURIComponent)\n .join(\"/\");\n break;\n }\n\n if (uriSegment === undefined) {\n // URI is shorter than the route, no match\n // uri: /users\n // route: /users/:userId\n missed = true;\n break;\n }\n\n let dynamicMatch = paramRe.exec(routeSegment);\n\n if (dynamicMatch && !isRootUri) {\n const value = decodeURIComponent(uriSegment);\n params[dynamicMatch[1]] = value;\n } else if (routeSegment !== uriSegment) {\n // Current segments don't match, not dynamic, not splat, so no match\n // uri: /users/123/settings\n // route: /users/:id/profile\n missed = true;\n break;\n }\n }\n\n if (!missed) {\n match = {\n route,\n params,\n uri: \"/\" + uriSegments.slice(0, index).join(\"/\")\n };\n break;\n }\n }\n\n return match || default_ || null;\n}\n\n/**\n * Check if the `path` matches the `uri`.\n * @param {string} path\n * @param {string} uri\n * @return {?object}\n */\nfunction match(route, uri) {\n return pick([route], uri);\n}\n\n/**\n * Add the query to the pathname if a query is given\n * @param {string} pathname\n * @param {string} [query]\n * @return {string}\n */\nfunction addQuery(pathname, query) {\n return pathname + (query ? `?${query}` : \"\");\n}\n\n/**\n * Resolve URIs as though every path is a directory, no files. Relative URIs\n * in the browser can feel awkward because not only can you be \"in a directory\",\n * you can be \"at a file\", too. For example:\n *\n * browserSpecResolve('foo', '/bar/') => /bar/foo\n * browserSpecResolve('foo', '/bar') => /foo\n *\n * But on the command line of a file system, it's not as complicated. You can't\n * `cd` from a file, only directories. This way, links have to know less about\n * their current path. To go deeper you can do this:\n *\n * \n * // instead of\n * \n *\n * Just like `cd`, if you want to go deeper from the command line, you do this:\n *\n * cd deeper\n * # not\n * cd $(pwd)/deeper\n *\n * By treating every path as a directory, linking to relative paths should\n * require less contextual information and (fingers crossed) be more intuitive.\n * @param {string} to\n * @param {string} base\n * @return {string}\n */\nfunction resolve(to, base) {\n // /foo/bar, /baz/qux => /foo/bar\n if (startsWith(to, \"/\")) {\n return to;\n }\n\n const [toPathname, toQuery] = to.split(\"?\");\n const [basePathname] = base.split(\"?\");\n const toSegments = segmentize(toPathname);\n const baseSegments = segmentize(basePathname);\n\n // ?a=b, /users?b=c => /users?a=b\n if (toSegments[0] === \"\") {\n return addQuery(basePathname, toQuery);\n }\n\n // profile, /users/789 => /users/789/profile\n if (!startsWith(toSegments[0], \".\")) {\n const pathname = baseSegments.concat(toSegments).join(\"/\");\n\n return addQuery((basePathname === \"/\" ? \"\" : \"/\") + pathname, toQuery);\n }\n\n // ./ , /users/123 => /users/123\n // ../ , /users/123 => /users\n // ../.. , /users/123 => /\n // ../../one, /a/b/c/d => /a/b/one\n // .././one , /a/b/c/d => /a/b/c/one\n const allSegments = baseSegments.concat(toSegments);\n const segments = [];\n\n allSegments.forEach(segment => {\n if (segment === \"..\") {\n segments.pop();\n } else if (segment !== \".\") {\n segments.push(segment);\n }\n });\n\n return addQuery(\"/\" + segments.join(\"/\"), toQuery);\n}\n\n/**\n * Combines the `basepath` and the `path` into one path.\n * @param {string} basepath\n * @param {string} path\n */\nfunction combinePaths(basepath, path) {\n return `${stripSlashes(\n path === \"/\" ? basepath : `${stripSlashes(basepath)}/${stripSlashes(path)}`\n )}/`;\n}\n\n/**\n * Decides whether a given `event` should result in a navigation or not.\n * @param {object} event\n */\nfunction shouldNavigate(event) {\n return (\n !event.defaultPrevented &&\n event.button === 0 &&\n !(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey)\n );\n}\n\nfunction hostMatches(anchor) {\n const host = location.host\n return (\n anchor.host == host ||\n // svelte seems to kill anchor.host value in ie11, so fall back to checking href\n anchor.href.indexOf(`https://${host}`) === 0 ||\n anchor.href.indexOf(`http://${host}`) === 0\n )\n}\n\nexport { stripSlashes, pick, match, resolve, combinePaths, shouldNavigate, hostMatches };\n","\n\n\n","\n\n{#if $activeRoute !== null && $activeRoute.route === route}\n {#if component !== null}\n \n {:else}\n \n {/if}\n{/if}\n","\n\n\n \n\n","import { writable } from \"svelte/store\";\n\nconst storedToken = localStorage.getItem(\"apiToken\");\n\nexport const token = writable(storedToken);\ntoken.subscribe(value => {\n localStorage.setItem(\"apiToken\", value);\n});","import { token } from \"./stores.js\"\n\nlet url = window.BASE_URL;\nlet current_token;\nconst unsub_token = token.subscribe(value => {\n current_token = token;\n})\nexport async function login({ username, password }) {\n const endpoint = url + \"/api/auth/login\";\n const response = await fetch(endpoint, {\n method: \"POST\",\n body: JSON.stringify({\n username,\n password,\n }),\n })\n const data = await response.json();\n token.set(data.token);\n return data;\n}\n\nexport async function getPosts({ page }) {\n const endpoint = url + \"/api/post?page=\" + page;\n const response = await fetch(endpoint);\n const data = await response.json();\n return data;\n}\n\nexport async function getPostsTag({ page, tag }) {\n const endpoint = url + \"/api/post/tag/\" + tag + \"?page=\" + page;\n const response = await fetch(endpoint);\n const data = await response.json();\n return data;\n}\n\nexport async function getPost({ id }) {\n const endpoint = url + \"/api/post/\" + id;\n const response = await fetch(endpoint);\n const data = await response.json();\n return data;\n}","'use strict';\nmodule.exports = str => encodeURIComponent(str).replace(/[!'()*]/g, x => `%${x.charCodeAt(0).toString(16).toUpperCase()}`);\n","'use strict';\nvar token = '%[a-f0-9]{2}';\nvar singleMatcher = new RegExp(token, 'gi');\nvar multiMatcher = new RegExp('(' + token + ')+', 'gi');\n\nfunction decodeComponents(components, split) {\n\ttry {\n\t\t// Try to decode the entire string first\n\t\treturn decodeURIComponent(components.join(''));\n\t} catch (err) {\n\t\t// Do nothing\n\t}\n\n\tif (components.length === 1) {\n\t\treturn components;\n\t}\n\n\tsplit = split || 1;\n\n\t// Split the array in 2 parts\n\tvar left = components.slice(0, split);\n\tvar right = components.slice(split);\n\n\treturn Array.prototype.concat.call([], decodeComponents(left), decodeComponents(right));\n}\n\nfunction decode(input) {\n\ttry {\n\t\treturn decodeURIComponent(input);\n\t} catch (err) {\n\t\tvar tokens = input.match(singleMatcher);\n\n\t\tfor (var i = 1; i < tokens.length; i++) {\n\t\t\tinput = decodeComponents(tokens, i).join('');\n\n\t\t\ttokens = input.match(singleMatcher);\n\t\t}\n\n\t\treturn input;\n\t}\n}\n\nfunction customDecodeURIComponent(input) {\n\t// Keep track of all the replacements and prefill the map with the `BOM`\n\tvar replaceMap = {\n\t\t'%FE%FF': '\\uFFFD\\uFFFD',\n\t\t'%FF%FE': '\\uFFFD\\uFFFD'\n\t};\n\n\tvar match = multiMatcher.exec(input);\n\twhile (match) {\n\t\ttry {\n\t\t\t// Decode as big chunks as possible\n\t\t\treplaceMap[match[0]] = decodeURIComponent(match[0]);\n\t\t} catch (err) {\n\t\t\tvar result = decode(match[0]);\n\n\t\t\tif (result !== match[0]) {\n\t\t\t\treplaceMap[match[0]] = result;\n\t\t\t}\n\t\t}\n\n\t\tmatch = multiMatcher.exec(input);\n\t}\n\n\t// Add `%C2` at the end of the map to make sure it does not replace the combinator before everything else\n\treplaceMap['%C2'] = '\\uFFFD';\n\n\tvar entries = Object.keys(replaceMap);\n\n\tfor (var i = 0; i < entries.length; i++) {\n\t\t// Replace all decoded components\n\t\tvar key = entries[i];\n\t\tinput = input.replace(new RegExp(key, 'g'), replaceMap[key]);\n\t}\n\n\treturn input;\n}\n\nmodule.exports = function (encodedURI) {\n\tif (typeof encodedURI !== 'string') {\n\t\tthrow new TypeError('Expected `encodedURI` to be of type `string`, got `' + typeof encodedURI + '`');\n\t}\n\n\ttry {\n\t\tencodedURI = encodedURI.replace(/\\+/g, ' ');\n\n\t\t// Try the built in decoder first\n\t\treturn decodeURIComponent(encodedURI);\n\t} catch (err) {\n\t\t// Fallback to a more advanced decoder\n\t\treturn customDecodeURIComponent(encodedURI);\n\t}\n};\n","'use strict';\n\nmodule.exports = (string, separator) => {\n\tif (!(typeof string === 'string' && typeof separator === 'string')) {\n\t\tthrow new TypeError('Expected the arguments to be of type `string`');\n\t}\n\n\tif (separator === '') {\n\t\treturn [string];\n\t}\n\n\tconst separatorIndex = string.indexOf(separator);\n\n\tif (separatorIndex === -1) {\n\t\treturn [string];\n\t}\n\n\treturn [\n\t\tstring.slice(0, separatorIndex),\n\t\tstring.slice(separatorIndex + separator.length)\n\t];\n};\n","'use strict';\nmodule.exports = function (obj, predicate) {\n\tvar ret = {};\n\tvar keys = Object.keys(obj);\n\tvar isArr = Array.isArray(predicate);\n\n\tfor (var i = 0; i < keys.length; i++) {\n\t\tvar key = keys[i];\n\t\tvar val = obj[key];\n\n\t\tif (isArr ? predicate.indexOf(key) !== -1 : predicate(key, val, obj)) {\n\t\t\tret[key] = val;\n\t\t}\n\t}\n\n\treturn ret;\n};\n","'use strict';\nconst strictUriEncode = require('strict-uri-encode');\nconst decodeComponent = require('decode-uri-component');\nconst splitOnFirst = require('split-on-first');\nconst filterObject = require('filter-obj');\n\nconst isNullOrUndefined = value => value === null || value === undefined;\n\nfunction encoderForArrayFormat(options) {\n\tswitch (options.arrayFormat) {\n\t\tcase 'index':\n\t\t\treturn key => (result, value) => {\n\t\t\t\tconst index = result.length;\n\n\t\t\t\tif (\n\t\t\t\t\tvalue === undefined ||\n\t\t\t\t\t(options.skipNull && value === null) ||\n\t\t\t\t\t(options.skipEmptyString && value === '')\n\t\t\t\t) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tif (value === null) {\n\t\t\t\t\treturn [...result, [encode(key, options), '[', index, ']'].join('')];\n\t\t\t\t}\n\n\t\t\t\treturn [\n\t\t\t\t\t...result,\n\t\t\t\t\t[encode(key, options), '[', encode(index, options), ']=', encode(value, options)].join('')\n\t\t\t\t];\n\t\t\t};\n\n\t\tcase 'bracket':\n\t\t\treturn key => (result, value) => {\n\t\t\t\tif (\n\t\t\t\t\tvalue === undefined ||\n\t\t\t\t\t(options.skipNull && value === null) ||\n\t\t\t\t\t(options.skipEmptyString && value === '')\n\t\t\t\t) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tif (value === null) {\n\t\t\t\t\treturn [...result, [encode(key, options), '[]'].join('')];\n\t\t\t\t}\n\n\t\t\t\treturn [...result, [encode(key, options), '[]=', encode(value, options)].join('')];\n\t\t\t};\n\n\t\tcase 'comma':\n\t\tcase 'separator':\n\t\tcase 'bracket-separator': {\n\t\t\tconst keyValueSep = options.arrayFormat === 'bracket-separator' ?\n\t\t\t\t'[]=' :\n\t\t\t\t'=';\n\n\t\t\treturn key => (result, value) => {\n\t\t\t\tif (\n\t\t\t\t\tvalue === undefined ||\n\t\t\t\t\t(options.skipNull && value === null) ||\n\t\t\t\t\t(options.skipEmptyString && value === '')\n\t\t\t\t) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\t// Translate null to an empty string so that it doesn't serialize as 'null'\n\t\t\t\tvalue = value === null ? '' : value;\n\n\t\t\t\tif (result.length === 0) {\n\t\t\t\t\treturn [[encode(key, options), keyValueSep, encode(value, options)].join('')];\n\t\t\t\t}\n\n\t\t\t\treturn [[result, encode(value, options)].join(options.arrayFormatSeparator)];\n\t\t\t};\n\t\t}\n\n\t\tdefault:\n\t\t\treturn key => (result, value) => {\n\t\t\t\tif (\n\t\t\t\t\tvalue === undefined ||\n\t\t\t\t\t(options.skipNull && value === null) ||\n\t\t\t\t\t(options.skipEmptyString && value === '')\n\t\t\t\t) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tif (value === null) {\n\t\t\t\t\treturn [...result, encode(key, options)];\n\t\t\t\t}\n\n\t\t\t\treturn [...result, [encode(key, options), '=', encode(value, options)].join('')];\n\t\t\t};\n\t}\n}\n\nfunction parserForArrayFormat(options) {\n\tlet result;\n\n\tswitch (options.arrayFormat) {\n\t\tcase 'index':\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tresult = /\\[(\\d*)\\]$/.exec(key);\n\n\t\t\t\tkey = key.replace(/\\[\\d*\\]$/, '');\n\n\t\t\t\tif (!result) {\n\t\t\t\t\taccumulator[key] = value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = {};\n\t\t\t\t}\n\n\t\t\t\taccumulator[key][result[1]] = value;\n\t\t\t};\n\n\t\tcase 'bracket':\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tresult = /(\\[\\])$/.exec(key);\n\t\t\t\tkey = key.replace(/\\[\\]$/, '');\n\n\t\t\t\tif (!result) {\n\t\t\t\t\taccumulator[key] = value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = [value];\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\taccumulator[key] = [].concat(accumulator[key], value);\n\t\t\t};\n\n\t\tcase 'comma':\n\t\tcase 'separator':\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tconst isArray = typeof value === 'string' && value.includes(options.arrayFormatSeparator);\n\t\t\t\tconst isEncodedArray = (typeof value === 'string' && !isArray && decode(value, options).includes(options.arrayFormatSeparator));\n\t\t\t\tvalue = isEncodedArray ? decode(value, options) : value;\n\t\t\t\tconst newValue = isArray || isEncodedArray ? value.split(options.arrayFormatSeparator).map(item => decode(item, options)) : value === null ? value : decode(value, options);\n\t\t\t\taccumulator[key] = newValue;\n\t\t\t};\n\n\t\tcase 'bracket-separator':\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tconst isArray = /(\\[\\])$/.test(key);\n\t\t\t\tkey = key.replace(/\\[\\]$/, '');\n\n\t\t\t\tif (!isArray) {\n\t\t\t\t\taccumulator[key] = value ? decode(value, options) : value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst arrayValue = value === null ?\n\t\t\t\t\t[] :\n\t\t\t\t\tvalue.split(options.arrayFormatSeparator).map(item => decode(item, options));\n\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = arrayValue;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\taccumulator[key] = [].concat(accumulator[key], arrayValue);\n\t\t\t};\n\n\t\tdefault:\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\taccumulator[key] = [].concat(accumulator[key], value);\n\t\t\t};\n\t}\n}\n\nfunction validateArrayFormatSeparator(value) {\n\tif (typeof value !== 'string' || value.length !== 1) {\n\t\tthrow new TypeError('arrayFormatSeparator must be single character string');\n\t}\n}\n\nfunction encode(value, options) {\n\tif (options.encode) {\n\t\treturn options.strict ? strictUriEncode(value) : encodeURIComponent(value);\n\t}\n\n\treturn value;\n}\n\nfunction decode(value, options) {\n\tif (options.decode) {\n\t\treturn decodeComponent(value);\n\t}\n\n\treturn value;\n}\n\nfunction keysSorter(input) {\n\tif (Array.isArray(input)) {\n\t\treturn input.sort();\n\t}\n\n\tif (typeof input === 'object') {\n\t\treturn keysSorter(Object.keys(input))\n\t\t\t.sort((a, b) => Number(a) - Number(b))\n\t\t\t.map(key => input[key]);\n\t}\n\n\treturn input;\n}\n\nfunction removeHash(input) {\n\tconst hashStart = input.indexOf('#');\n\tif (hashStart !== -1) {\n\t\tinput = input.slice(0, hashStart);\n\t}\n\n\treturn input;\n}\n\nfunction getHash(url) {\n\tlet hash = '';\n\tconst hashStart = url.indexOf('#');\n\tif (hashStart !== -1) {\n\t\thash = url.slice(hashStart);\n\t}\n\n\treturn hash;\n}\n\nfunction extract(input) {\n\tinput = removeHash(input);\n\tconst queryStart = input.indexOf('?');\n\tif (queryStart === -1) {\n\t\treturn '';\n\t}\n\n\treturn input.slice(queryStart + 1);\n}\n\nfunction parseValue(value, options) {\n\tif (options.parseNumbers && !Number.isNaN(Number(value)) && (typeof value === 'string' && value.trim() !== '')) {\n\t\tvalue = Number(value);\n\t} else if (options.parseBooleans && value !== null && (value.toLowerCase() === 'true' || value.toLowerCase() === 'false')) {\n\t\tvalue = value.toLowerCase() === 'true';\n\t}\n\n\treturn value;\n}\n\nfunction parse(query, options) {\n\toptions = Object.assign({\n\t\tdecode: true,\n\t\tsort: true,\n\t\tarrayFormat: 'none',\n\t\tarrayFormatSeparator: ',',\n\t\tparseNumbers: false,\n\t\tparseBooleans: false\n\t}, options);\n\n\tvalidateArrayFormatSeparator(options.arrayFormatSeparator);\n\n\tconst formatter = parserForArrayFormat(options);\n\n\t// Create an object with no prototype\n\tconst ret = Object.create(null);\n\n\tif (typeof query !== 'string') {\n\t\treturn ret;\n\t}\n\n\tquery = query.trim().replace(/^[?#&]/, '');\n\n\tif (!query) {\n\t\treturn ret;\n\t}\n\n\tfor (const param of query.split('&')) {\n\t\tif (param === '') {\n\t\t\tcontinue;\n\t\t}\n\n\t\tlet [key, value] = splitOnFirst(options.decode ? param.replace(/\\+/g, ' ') : param, '=');\n\n\t\t// Missing `=` should be `null`:\n\t\t// http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters\n\t\tvalue = value === undefined ? null : ['comma', 'separator', 'bracket-separator'].includes(options.arrayFormat) ? value : decode(value, options);\n\t\tformatter(decode(key, options), value, ret);\n\t}\n\n\tfor (const key of Object.keys(ret)) {\n\t\tconst value = ret[key];\n\t\tif (typeof value === 'object' && value !== null) {\n\t\t\tfor (const k of Object.keys(value)) {\n\t\t\t\tvalue[k] = parseValue(value[k], options);\n\t\t\t}\n\t\t} else {\n\t\t\tret[key] = parseValue(value, options);\n\t\t}\n\t}\n\n\tif (options.sort === false) {\n\t\treturn ret;\n\t}\n\n\treturn (options.sort === true ? Object.keys(ret).sort() : Object.keys(ret).sort(options.sort)).reduce((result, key) => {\n\t\tconst value = ret[key];\n\t\tif (Boolean(value) && typeof value === 'object' && !Array.isArray(value)) {\n\t\t\t// Sort object keys, not values\n\t\t\tresult[key] = keysSorter(value);\n\t\t} else {\n\t\t\tresult[key] = value;\n\t\t}\n\n\t\treturn result;\n\t}, Object.create(null));\n}\n\nexports.extract = extract;\nexports.parse = parse;\n\nexports.stringify = (object, options) => {\n\tif (!object) {\n\t\treturn '';\n\t}\n\n\toptions = Object.assign({\n\t\tencode: true,\n\t\tstrict: true,\n\t\tarrayFormat: 'none',\n\t\tarrayFormatSeparator: ','\n\t}, options);\n\n\tvalidateArrayFormatSeparator(options.arrayFormatSeparator);\n\n\tconst shouldFilter = key => (\n\t\t(options.skipNull && isNullOrUndefined(object[key])) ||\n\t\t(options.skipEmptyString && object[key] === '')\n\t);\n\n\tconst formatter = encoderForArrayFormat(options);\n\n\tconst objectCopy = {};\n\n\tfor (const key of Object.keys(object)) {\n\t\tif (!shouldFilter(key)) {\n\t\t\tobjectCopy[key] = object[key];\n\t\t}\n\t}\n\n\tconst keys = Object.keys(objectCopy);\n\n\tif (options.sort !== false) {\n\t\tkeys.sort(options.sort);\n\t}\n\n\treturn keys.map(key => {\n\t\tconst value = object[key];\n\n\t\tif (value === undefined) {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (value === null) {\n\t\t\treturn encode(key, options);\n\t\t}\n\n\t\tif (Array.isArray(value)) {\n\t\t\tif (value.length === 0 && options.arrayFormat === 'bracket-separator') {\n\t\t\t\treturn encode(key, options) + '[]';\n\t\t\t}\n\n\t\t\treturn value\n\t\t\t\t.reduce(formatter(key), [])\n\t\t\t\t.join('&');\n\t\t}\n\n\t\treturn encode(key, options) + '=' + encode(value, options);\n\t}).filter(x => x.length > 0).join('&');\n};\n\nexports.parseUrl = (url, options) => {\n\toptions = Object.assign({\n\t\tdecode: true\n\t}, options);\n\n\tconst [url_, hash] = splitOnFirst(url, '#');\n\n\treturn Object.assign(\n\t\t{\n\t\t\turl: url_.split('?')[0] || '',\n\t\t\tquery: parse(extract(url), options)\n\t\t},\n\t\toptions && options.parseFragmentIdentifier && hash ? {fragmentIdentifier: decode(hash, options)} : {}\n\t);\n};\n\nexports.stringifyUrl = (object, options) => {\n\toptions = Object.assign({\n\t\tencode: true,\n\t\tstrict: true\n\t}, options);\n\n\tconst url = removeHash(object.url).split('?')[0] || '';\n\tconst queryFromUrl = exports.extract(object.url);\n\tconst parsedQueryFromUrl = exports.parse(queryFromUrl, {sort: false});\n\n\tconst query = Object.assign(parsedQueryFromUrl, object.query);\n\tlet queryString = exports.stringify(query, options);\n\tif (queryString) {\n\t\tqueryString = `?${queryString}`;\n\t}\n\n\tlet hash = getHash(object.url);\n\tif (object.fragmentIdentifier) {\n\t\thash = `#${encode(object.fragmentIdentifier, options)}`;\n\t}\n\n\treturn `${url}${queryString}${hash}`;\n};\n\nexports.pick = (input, filter, options) => {\n\toptions = Object.assign({\n\t\tparseFragmentIdentifier: true\n\t}, options);\n\n\tconst {url, query, fragmentIdentifier} = exports.parseUrl(input, options);\n\treturn exports.stringifyUrl({\n\t\turl,\n\t\tquery: filterObject(query, filter),\n\t\tfragmentIdentifier\n\t}, options);\n};\n\nexports.exclude = (input, filter, options) => {\n\tconst exclusionFilter = Array.isArray(filter) ? key => !filter.includes(key) : (key, value) => !filter(key, value);\n\n\treturn exports.pick(input, exclusionFilter, options);\n};\n","\n\n
\n
\n

\n Posts\n

\n
\n
\n\n
\n
\n \n
\n {#each posts as post (post.id)}\n
\n
\n
\n \n \n \n
\n
\n
\n
\n {#each post.tags as tag (tag)}\n

\n {tag}\n

\n {/each}\n
\n
\n
\n {/each}\n
\n
\n
\n","\n\n\n
\n
\n {#if post}\n

\n Post ID: {post.id}\n

\n {/if}\n
\n
\n{#if post}\n
\n
\n
\n
\n

\n Source URL: {trimUrl(post.source_url)}\n

\n

\n Tags: \n {#each post.tags as tag (tag)}\n

    \n
  • \n {tag}\n
  • \n
\n {/each}\n

\n
\n
\n
\n \n
\n
\n
\n
\n
\n{/if}","\n
\n
\n
\n \n
\n \n
\n
\n
\n \n
\n \n
\n
\n
\n
\n \n
\n
\n
\n
\n","\n","\n\n
\n
\n

\n {id}\n

\n

\n Tag\n

\n
\n
\n\n
\n
\n \n
\n {#each posts as post (post.id)}\n
\n
\n
\n \n \n \n
\n
\n
\n
\n {#each post.tags as tag (tag)}\n

\n {tag}\n

\n {/each}\n
\n
\n
\n {/each}\n
\n
\n
\n","\n\n\n\t\n\t
\n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t
\n
","import App from './App.svelte';\n\nconst app = new App({\n\ttarget: document.body,\n\thydrate: false,\n});\n\nexport default app;"],"names":["noop","assign","tar","src","k","run","fn","blank_object","Object","create","run_all","fns","forEach","is_function","thing","safe_not_equal","a","b","subscribe","store","callbacks","unsub","unsubscribe","component_subscribe","component","callback","$$","on_destroy","push","create_slot","definition","ctx","$$scope","slot_ctx","get_slot_context","slice","update_slot","slot","slot_definition","dirty","get_slot_changes_fn","get_slot_context_fn","slot_changes","lets","undefined","merged","len","Math","max","length","i","get_slot_changes","slot_context","p","exclude_internal_props","props","result","compute_rest_props","keys","rest","Set","has","append","target","node","appendChild","insert","anchor","insertBefore","detach","parentNode","removeChild","destroy_each","iterations","detaching","d","element","name","document","createElement","text","data","createTextNode","space","empty","listen","event","handler","options","addEventListener","removeEventListener","prevent_default","preventDefault","call","this","attr","attribute","value","removeAttribute","getAttribute","setAttribute","set_attributes","attributes","descriptors","getOwnPropertyDescriptors","__proto__","key","style","cssText","set","set_data","wholeText","set_input_value","input","current_component","set_current_component","get_current_component","Error","onMount","on_mount","createEventDispatcher","type","detail","e","createEvent","initCustomEvent","custom_event","setContext","context","getContext","get","dirty_components","binding_callbacks","render_callbacks","flush_callbacks","resolved_promise","Promise","resolve","update_scheduled","add_render_callback","flushing","seen_callbacks","flush","update","pop","add","clear","fragment","before_update","after_update","outroing","outros","group_outros","r","c","check_outros","transition_in","block","local","delete","transition_out","o","outro_and_destroy_block","lookup","update_keyed_each","old_blocks","get_key","dynamic","list","destroy","create_each_block","next","get_context","n","old_indexes","new_blocks","new_lookup","Map","deltas","child_ctx","abs","will_move","did_move","m","first","new_block","old_block","new_key","old_key","get_spread_update","levels","updates","to_null_out","accounted_for","get_spread_object","spread_props","create_component","mount_component","customElement","new_on_destroy","map","filter","destroy_component","make_dirty","then","fill","init","instance","create_fragment","not_equal","parent_component","bound","on_disconnect","skip_bound","ready","ret","hydrate","nodes","Array","from","childNodes","children","l","intro","SvelteComponent","[object Object]","$destroy","index","indexOf","splice","$$props","obj","$$set","subscriber_queue","writable","start","stop","subscribers","new_value","run_queue","s","invalidate","subscriber","derived","stores","initial_value","single","isArray","stores_array","auto","inited","values","pending","cleanup","sync","unsubscribers","LOCATION","ROUTER","getLocation","source","location","state","history","globalHistory","listeners","listener","popstateListener","action","to","replace","Date","now","replaceState","pushState","createHistory","Boolean","window","initialPathname","stack","pathname","search","states","entries","_","uri","split","createMemorySource","navigate","paramRe","startsWith","string","substr","isSplat","segment","segmentize","stripSlashes","str","rankRoute","route","score","default","path","reduce","isRootSegment","test","isDynamic","SEGMENT_POINTS","pick","routes","match","default_","uriPathname","uriSegments","isRootUri","ranked","sort","rankRoutes","missed","params","routeSegments","routeSegment","uriSegment","decodeURIComponent","join","dynamicMatch","exec","addQuery","query","combinePaths","basepath","url","locationContext","routerContext","activeRoute","hasActiveRoute","base","routerBase","registerRoute","$base","_path","matchingRoute","$location","rs","unregisterRoute","bestMatch","$routes","routeParams","routeProps","$activeRoute","getProps","dispatch","href","isPartiallyCurrent","isCurrent","toPathname","toQuery","basePathname","toSegments","baseSegments","concat","allSegments","segments","ariaCurrent","defaultPrevented","button","metaKey","altKey","ctrlKey","shiftKey","shouldNavigate","shouldReplace","token","localStorage","getItem","setItem","BASE_URL","singleMatcher","RegExp","multiMatcher","decodeComponents","components","err","left","right","prototype","decode","tokens","encodedURI","TypeError","replaceMap","%FE%FF","%FF%FE","customDecodeURIComponent","separator","separatorIndex","predicate","isArr","val","validateArrayFormatSeparator","encode","strict","encodeURIComponent","x","charCodeAt","toString","toUpperCase","decodeComponent","keysSorter","Number","removeHash","hashStart","extract","queryStart","parseValue","parseNumbers","isNaN","trim","parseBooleans","toLowerCase","parse","arrayFormat","arrayFormatSeparator","formatter","accumulator","includes","isEncodedArray","newValue","item","arrayValue","parserForArrayFormat","param","splitOnFirst","exports","object","shouldFilter","skipNull","skipEmptyString","keyValueSep","encoderForArrayFormat","objectCopy","url_","hash","parseFragmentIdentifier","fragmentIdentifier","queryFromUrl","parsedQueryFromUrl","queryString","stringify","getHash","parseUrl","stringifyUrl","filterObject","exclusionFilter","totalPages","image_path","id","tags","page","posts","getData","async","endpoint","response","fetch","json","getPosts","queryParams","source_url","post","getPost","substring","username","password","method","body","JSON","login","tag","getPostsTag","Home","Posts","Tag","Post","Login","Logout","loggedIn"],"mappings":"gCAAA,SAASA,KAET,SAASC,EAAOC,EAAKC,GAEjB,IAAK,MAAMC,KAAKD,EACZD,EAAIE,GAAKD,EAAIC,GACjB,OAAOF,EAUX,SAASG,EAAIC,GACT,OAAOA,IAEX,SAASC,IACL,OAAOC,OAAOC,OAAO,MAEzB,SAASC,EAAQC,GACbA,EAAIC,QAAQP,GAEhB,SAASQ,EAAYC,GACjB,MAAwB,mBAAVA,EAElB,SAASC,EAAeC,EAAGC,GACvB,OAAOD,GAAKA,EAAIC,GAAKA,EAAID,IAAMC,GAAOD,GAAkB,iBAANA,GAAgC,mBAANA,EAahF,SAASE,EAAUC,KAAUC,GACzB,GAAa,MAATD,EACA,OAAOnB,EAEX,MAAMqB,EAAQF,EAAMD,aAAaE,GACjC,OAAOC,EAAMC,YAAc,IAAMD,EAAMC,cAAgBD,EAO3D,SAASE,EAAoBC,EAAWL,EAAOM,GAC3CD,EAAUE,GAAGC,WAAWC,KAAKV,EAAUC,EAAOM,IAElD,SAASI,EAAYC,EAAYC,EAAKC,EAAS1B,GAC3C,GAAIwB,EAAY,CACZ,MAAMG,EAAWC,EAAiBJ,EAAYC,EAAKC,EAAS1B,GAC5D,OAAOwB,EAAW,GAAGG,IAG7B,SAASC,EAAiBJ,EAAYC,EAAKC,EAAS1B,GAChD,OAAOwB,EAAW,IAAMxB,EAClBL,EAAO+B,EAAQD,IAAII,QAASL,EAAW,GAAGxB,EAAGyB,KAC7CC,EAAQD,IAoBlB,SAASK,EAAYC,EAAMC,EAAiBP,EAAKC,EAASO,EA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