{"version":3,"file":"bundle.js","sources":["../../../node_modules/svelte/internal/index.mjs","../../../src/Dropdown.svelte","../../../node_modules/svelte/store/index.mjs","../../../src/store.js","../../../src/localCalibre.js","../../../src/svgs.js","../../../src/MotwHeader.svelte","../../../src/SearchBar.svelte","../../../src/NavBar.svelte","../../../src/utils.js","../../../src/BookCard.svelte","../../../src/LibraryCovers.svelte","../../../src/LibraryTable.svelte","../../../src/HtmlSanitizer.js","../../../src/BookModal.svelte","../../../src/App.svelte","../../../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 validate_store(store, name) {\n if (!store || typeof store.subscribe !== 'function') {\n throw new Error(`'${name}' is not a store with a 'subscribe' method`);\n }\n}\nfunction subscribe(store, callback) {\n const unsub = store.subscribe(callback);\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) {\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 lets;\n }\n return $$scope.dirty;\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 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);\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 (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] = 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) {\n const value = [];\n for (let i = 0; i < group.length; i += 1) {\n if (group[i].checked)\n value.push(group[i].__value);\n }\n return value;\n}\nfunction to_number(value) {\n return value === '' ? undefined : +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 for (let j = 0; j < node.attributes.length; j += 1) {\n const attribute = node.attributes[j];\n if (!attributes[attribute.name])\n node.removeAttribute(attribute.name);\n }\n return nodes.splice(i, 1)[0]; // TODO strip unwanted attributes\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.data !== data)\n text.data = data;\n}\nfunction set_input_value(input, value) {\n if (value != null || input.value) {\n input.value = value;\n }\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}\nfunction add_resize_listener(element, fn) {\n if (getComputedStyle(element).position === 'static') {\n element.style.position = 'relative';\n }\n const object = document.createElement('object');\n object.setAttribute('style', 'display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; pointer-events: none; z-index: -1;');\n object.setAttribute('aria-hidden', 'true');\n object.type = 'text/html';\n object.tabIndex = -1;\n let win;\n object.onload = () => {\n win = object.contentDocument.defaultView;\n win.addEventListener('resize', fn);\n };\n if (/Trident/.test(navigator.userAgent)) {\n element.appendChild(object);\n object.data = 'about:blank';\n }\n else {\n object.data = 'about:blank';\n element.appendChild(object);\n }\n return {\n cancel: () => {\n win && win.removeEventListener && win.removeEventListener('resize', fn);\n element.removeChild(object);\n }\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}\nclass HtmlTag {\n constructor(html, anchor = null) {\n this.e = element('div');\n this.a = anchor;\n this.u(html);\n }\n m(target, anchor = null) {\n for (let i = 0; i < this.n.length; i += 1) {\n insert(target, this.n[i], anchor);\n }\n this.t = target;\n }\n u(html) {\n this.e.innerHTML = html;\n this.n = Array.from(this.e.childNodes);\n }\n p(html) {\n this.d();\n this.u(html);\n this.m(this.t, this.a);\n }\n d() {\n this.n.forEach(detach);\n }\n}\n\nlet stylesheet;\nlet active = 0;\nlet current_rules = {};\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 if (!current_rules[name]) {\n if (!stylesheet) {\n const style = element('style');\n document.head.appendChild(style);\n stylesheet = style.sheet;\n }\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 node.style.animation = (node.style.animation || '')\n .split(', ')\n .filter(name\n ? anim => anim.indexOf(name) < 0 // remove specific animation\n : anim => anim.indexOf('__svelte') === -1 // remove all Svelte animations\n )\n .join(', ');\n if (name && !--active)\n clear_rules();\n}\nfunction clear_rules() {\n raf(() => {\n if (active)\n return;\n let i = stylesheet.cssRules.length;\n while (i--)\n stylesheet.deleteRule(i);\n current_rules = {};\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}\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}\nfunction flush() {\n const seen_callbacks = new Set();\n do {\n // first, call beforeUpdate functions\n // and update components\n while (dirty_components.length) {\n const component = dirty_components.shift();\n set_current_component(component);\n update(component.$$);\n }\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 callback();\n // ...so guard against infinite loops\n seen_callbacks.add(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}\nfunction update($$) {\n if ($$.fragment !== null) {\n $$.update();\n run_all($$.before_update);\n $$.fragment && $$.fragment.p($$.ctx, $$.dirty);\n $$.dirty = [-1];\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) {\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 info.blocks[i] = null;\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 });\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}\n\nconst globals = (typeof window !== 'undefined' ? window : 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 measure(blocks) {\n const rects = {};\n let i = blocks.length;\n while (i--)\n rects[blocks[i].key] = blocks[i].node.getBoundingClientRect();\n return rects;\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 + \"=\" + JSON.stringify(String(value)\n .replace(/\"/g, '"')\n .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) {\n const parent_component = current_component;\n const $$ = {\n on_destroy,\n context: new Map(parent_component ? parent_component.$$.context : []),\n // these will be immediately discarded\n on_mount: [],\n before_update: [],\n after_update: [],\n callbacks: blank_object()\n };\n set_current_component({ $$ });\n const html = fn(result, props, bindings, slots);\n set_current_component(parent_component);\n return html;\n }\n return {\n render: (props = {}, options = {}) => {\n on_destroy = [];\n const result = { head: '', css: new Set() };\n const html = $$render(result, props, {}, options);\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.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) {\n const { fragment, on_mount, on_destroy, after_update } = component.$$;\n fragment && fragment.m(target, anchor);\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 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 prop_values = options.props || {};\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 before_update: [],\n after_update: [],\n context: new Map(parent_component ? parent_component.$$.context : []),\n // everything else\n callbacks: blank_object(),\n dirty\n };\n let ready = false;\n $$.ctx = instance\n ? instance(component, prop_values, (i, ret, value = ret) => {\n if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) {\n if ($$.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 // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.l(children(options.target));\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);\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 // @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 $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() {\n // overridden by instance, if it has props\n }\n };\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() {\n // overridden by instance, if it has props\n }\n}\n\nfunction dispatch_dev(type, detail) {\n document.dispatchEvent(custom_event(type, 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.data === data)\n return;\n dispatch_dev(\"SvelteDOMSetData\", { node: text, data });\n text.data = data;\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}\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, SvelteElement, 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, beforeUpdate, bind, binding_callbacks, blank_object, bubble, check_outros, children, claim_component, claim_element, claim_space, claim_text, clear_loops, component_subscribe, 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_slot_changes, get_slot_context, get_spread_object, get_spread_update, get_store_value, globals, group_outros, handle_promise, has_prop, identity, init, insert, insert_dev, intros, invalid_attribute_name_character, is_client, is_function, is_promise, listen, listen_dev, loop, loop_guard, measure, 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, 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_keyed_each, validate_component, validate_store, xlink_attr };\n","\n\n\n\n
hidelist = true} class=\"dropdown inline-block relative\">\n \n \n
\n","import { safe_not_equal, noop, run_all, is_function } from '../internal';\nexport { get_store_value as get } from '../internal';\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) => store.subscribe((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","import { writable } from 'svelte/store';\nimport { readable } from 'svelte/store';\n\nexport const lasthash = writable(\"[\\\"\\\",\\\"\\\"]\");\n// export const restapi = readable(\"http://localhost:2018/\");\nexport const restapi = readable(\"https://books.memoryoftheworld.org/\");\n","export function dynamicSort(property) {\n var sortOrder = 1;\n\n if (property[0] === \"-\") {\n sortOrder = -1;\n property = property.substr(1);\n }\n return function(a, b) {\n if (sortOrder == -1) {\n return b[property].localeCompare(a[property]);\n } else {\n return a[property].localeCompare(b[property]);\n }\n };\n}\n\nexport function mockHttpRequest(books, request_url, max_results, title = \"books\") {\n let url = new URL(request_url);\n\n let restList = url.pathname.split(\"/\");\n let restVerb = restList[1];\n let restField = restList[2];\n let restQuery = decodeURIComponent(restList[3]);\n\n if (restVerb == \"librarians\") {\n if (restField == \"on\") {\n let librarians = new Set();\n for (let b of books) {\n librarians.add(b.librarian);\n }\n return {\n \"_items\": [...librarians]\n };\n }\n }\n\n if (restVerb == \"autocomplete\") {\n if (restField == \"authors\") {\n let authors = [];\n for (let b of books) {\n for (let a of b.authors) {\n if (a.toLowerCase().indexOf(restList[3].toLowerCase()) != -1) {\n authors.push(a);\n }\n }\n }\n return {\n \"_items\": authors\n };\n } else\n if (restField == \"tags\") {\n let tags = [];\n for (let b of books) {\n for (let t of b.tags) {\n if (t.toLowerCase().indexOf(restList[3].toLowerCase()) != -1) {\n tags.push(t);\n }\n }\n }\n return {\n \"_items\": tags\n };\n } else\n if (restField == \"titles\") {\n let titles = [];\n for (let b of books) {\n if (b.title.toLowerCase().indexOf(restList[3].toLowerCase()) != -1) {\n titles.push(b.title);\n }\n }\n return {\n \"_items\": titles\n };\n }\n\n }\n\n if (restVerb == \"search\") {\n title = `search in ${restField}`;\n let bz = [];\n for (let b of books) {\n if ([\"authors\", \"languages\", \"tags\"].includes(restField)) {\n for (let f of b[restField]) {\n if (f.toLowerCase().indexOf(restQuery.toLowerCase()) != -1) {\n bz.push(b);\n }\n }\n } else\n if ([\"_id\", \"title\", \"titles\", \"publisher\", \"series\", \"library_uuid\", \"abstract\", \"librarian\"].includes(restField)) {\n if (restField == \"titles\") {\n restField = \"title\";\n }\n if (b[restField].toLowerCase().indexOf(restQuery.toLowerCase()) != -1) {\n bz.push(b);\n }\n }\n }\n books = bz;\n }\n\n if (restVerb == \"book\") {\n for (let b of books) {\n if (b._id == restField) {\n b.library_url = \"\";\n return b;\n }\n }\n if ((CALIBRE_BOOKS1.total - books.length) > 0) {\n return \"TRYAGAIN\";\n }\n }\n\n\n let params = {};\n for (let e of url.searchParams.entries()) {\n params[e[0]] = e[1];\n }\n let p = params.page || 0;\n\n let lastPage = Math.floor(books.length / max_results + 1);\n let page = Math.max(0, Math.min(lastPage, p - 1));\n\n let startCut = page * max_results;\n let endCut = (page + 1) * max_results;\n\n let bookz = [];\n for (let b of books.slice(startCut, endCut)) {\n b[\"library_url\"] = \"\";\n bookz.push(b);\n }\n let r = {\n \"_items\": bookz,\n \"_links\": {\n \"parent\": {\n \"title\": \"Memory of the World Library\",\n \"href\": \"/\"\n },\n \"self\": {\n \"title\": title,\n \"href\": `${title}/${restField}/${restQuery}`\n },\n \"prev\": {\n \"title\": \"previous page\",\n \"href\": `${url.pathname}?page=${page}`\n },\n \"next\": {\n \"title\": \"next page\",\n \"href\": `${url.pathname}?page=${page+2}`\n },\n \"last\": {\n \"title\": \"last page\",\n \"href\": `${url.pathname}?page=${lastPage}`\n },\n\n },\n \"_meta\": {\n \"page\": page + 1,\n \"max_results\": max_results,\n \"total\": books.length,\n \"status\": title\n }\n };\n if (page == 0) {\n delete r._links.prev;\n }\n if (page == lastPage - 1) {\n delete r._links.next;\n }\n return r;\n}\n\nexport const maxResults = 48;\n","export const motw_reverse_svg = \"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTYgMjU2Ij48ZyB0cmFuc2Zvcm09Im1hdHJpeCgxLjE0MjkgMCAwIDEuMTQyOSAtMjIuODU3IC05MzAuNDEpIj48cGF0aCBkPSJNMjQzLjg3IDkyMC4wNWEzLjgxIDMuODEgMCAwIDAtLjMyOC0uNzkxYy0uMTM3LS4yNDctLjMtLjQ3My0uNDc3LS42NjNzLS4zNzMtLjM0NC0uNTc3LS40NDhsLTkzLjQzLTQ3LjUxOGMtLj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OTMtMS4wNjIgMi42NTUtMS4wNjJoMTUuMDQ3YzEuMDYyIDAgMS45NDcuMzU0IDIuNjU1IDEuMDYyUzU5LjI0IDUuNzggNTkuMjQgNi44NDJ2MjYuMmgxNS4wNDdjMS40MTYgMCAyLjY1NS44ODUgMy4zNjMgMi4zeiIgZmlsbD0iIzAwMCIvPjwvc3ZnPgo=\"\n","\n\n\n
\n
\n location.hash = \"\"} alt=\"let's share books\" class=\"cursor-pointer pt-1 pl-1 pr-1 h-10 monocle:h-8 phone:h-8\" src=\"{motw_reverse_svg}\" />\n
\n
 
\n
\n \n
\n
show {#if t}covers{:else}list{/if}
\n MEMORY OF THE WORLD\n
\n","\n\n\n\n
\n \n
\n \n\n \n
\n \n
\n \n
\n
\n","\n\n
\n {#if !!(Object.keys(navbarLinks).indexOf(\"prev\")+1) }\n << prev    \n {:else}\n <<prev    \n {/if}\n {navbarLinks.searchStatus}\n {#if !!(Object.keys(navbarLinks).indexOf(\"next\")+1) }\n     next >>\n {:else}\n     next >>\n {/if}\n
\n","function readableBytes(bytes) {\n var i = Math.floor(Math.log(bytes) / Math.log(1024)),\n sizes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];\n return (bytes / Math.pow(1024, i)).toFixed(2) * 1 + sizes[i];\n}\n\nexport function getFormats(book, sep=\", \") {\n if (book.formats === undefined || book.formats.length == 0) {\n return [{\"url\": \"\", \"size\":\"\", \"title\":\"\"}]\n }\n\n let f = [];\n for (let frm of book.formats) {\n let url = book.library_url + frm.dir_path + frm.file_name\n let title = frm.format.toUpperCase() + sep;\n f.push({\n url: url,\n title: title,\n size: readableBytes(frm.size)\n });\n }\n f[f.length - 1].title = f[f.length - 1].title.slice(0, -2)\n return f\n}\n\nexport function showLibrarian() {\n this.showLibrarianName = true;\n setTimeout(() => this.showLibrarianName = false, 2000);\n}\n","\n\n\n\n
\n window.location.hash = `#/book/${book._id}`}\" class=\"w-full min-h-full text-white\" src={book.library_url+book.cover_url} alt=\"\" />\n
\n {book.title} \n
\n {#each book.authors as author, i}\n {#if i+1 < 4 }{author}{/if}{#if i+1 !== book.authors.length && i+i < 4 }, {:else if i+i === 4 } et al.{/if}{/each}\n
\n
\n
\n {#if tooltip}\n \n {/if}\n {#if book.formats != undefined && book.formats.length != 0 }\n {#each getFormats(book) as format}\n \n \"dl\"{format.title}\n {/each}\n {:else}\n .\n {/if}\n
\n
\n","\n\n
\n {#each books as book (book._id)}\n {/each}\n
\n","\n\n\n\n\n \n \n \n \n \n \n \n \n {#each books as book (book._id)}\n \n \n \n \n \n {/each}\n \n
AuthorsTitle\n \"dl\"\n
\n {#if book.authors}\n
\n {#each book.authors as author, i}\n {#if i+1 < 4 }{author}{/if}{#if i+1 !== book.authors.length && i+i < 4 },
{:else if i+1 === 4 } et al.{/if}\n {/each}\n
\n {/if}\n
location.hash = `#/book/${book._id}`}\" class=\"italic w-11/12 phablet:pl-2 monocle:text-xs phone:text-xs\">{book.title}{getYear(book)}\n {#each getFormats(book, \" \") as format}\n {format.title}
\n {/each}\n
\n","/**\n * Sanitizer which filters a set of whitelisted tags, attributes and css.\n * For now, the whitelist is small but can be easily extended.\n *\n * @param bool whether to escape or strip undesirable content.\n * @param map of allowed tag-attribute-attribute-parsers.\n * @param array of allowed css elements.\n * @param array of allowed url scheme\n */\nexport function HtmlWhitelistedSanitizer(escape, tags, css, urls) {\n this.escape = escape;\n this.allowedTags = tags;\n this.allowedCss = css;\n\n // Use the browser to parse the input but create a new HTMLDocument.\n // This won't evaluate any potentially dangerous scripts since the element\n // isn't attached to the window's document. It also won't cause img.src to\n // preload images.\n //\n // To be extra cautious, you can dynamically create an iframe, pass the\n // input to the iframe and get back the sanitized string.\n this.doc = document.implementation.createHTMLDocument();\n\n if (urls == null) {\n urls = ['http://', 'https://'];\n }\n\n if (this.allowedTags == null) {\n // Configure small set of default tags\n var unconstrainted = function(x) { return x; };\n var globalAttributes = {\n 'dir': unconstrainted,\n 'lang': unconstrainted,\n 'title': unconstrainted\n };\n var url_sanitizer = HtmlWhitelistedSanitizer.makeUrlSanitizer(urls);\n this.allowedTags = {\n 'a': HtmlWhitelistedSanitizer.mergeMap(globalAttributes, {\n 'download': unconstrainted,\n 'href': url_sanitizer,\n 'hreflang': unconstrainted,\n 'ping': url_sanitizer,\n 'rel': unconstrainted,\n 'target': unconstrainted,\n 'type': unconstrainted\n }),\n // 'img': HtmlWhitelistedSanitizer.mergeMap(globalAttributes, {\n // 'alt': unconstrainted,\n // 'height': unconstrainted,\n // 'src': url_sanitizer,\n // 'width': unconstrainted\n // }),\n 'p': globalAttributes,\n 'div': globalAttributes,\n 'span': globalAttributes,\n 'br': globalAttributes,\n //'b': globalAttributes,\n 'i': globalAttributes,\n 'u': globalAttributes\n };\n }\n if (this.allowedCss == null) {\n // Small set of default css properties\n //this.allowedCss = ['border', 'margin', 'padding'];\n\t this.allowedCss = [];\n }\n}\n\nHtmlWhitelistedSanitizer.makeUrlSanitizer = function(allowed_urls) {\n return function(str) {\n if (!str) { return ''; }\n for (var i in allowed_urls) {\n if (str.startsWith(allowed_urls[i])) {\n return str;\n }\n }\n return '';\n };\n}\n\nHtmlWhitelistedSanitizer.mergeMap = function(/*...*/) {\n var r = {};\n for (var arg in arguments) {\n for (var i in arguments[arg]) {\n r[i] = arguments[arg][i];\n }\n }\n return r;\n}\n\nHtmlWhitelistedSanitizer.prototype.sanitizeString = function(input) {\n var div = this.doc.createElement('div');\n div.innerHTML = input;\n\n // Return the sanitized version of the node.\n return this.sanitizeNode(div).innerHTML;\n}\n\nHtmlWhitelistedSanitizer.prototype.sanitizeNode = function(node) {\n // Note:
can have it's nodeName overriden by a child node. It's\n // not a big deal here, so we can punt on this.\n var node_name = node.nodeName.toLowerCase();\n if (node_name == '#text') {\n // text nodes are always safe\n return node;\n }\n if (node_name == '#comment') {\n // always strip comments\n return this.doc.createTextNode('');\n }\n if (!this.allowedTags.hasOwnProperty(node_name)) {\n // this node isn't allowed\n //console.log(\"forbidden node: \" + node_name);\n\t //console.dir(node)\n if (node.textContent) {\n\t return this.doc.createTextNode(node.textContent)\n }\n //original: if (this.escape) {\n //original: return this.doc.createTextNode(node.outerHTML);\n //}\n return this.doc.createTextNode('');\n }\n\n // create a new node\n var copy = this.doc.createElement(node_name);\n\n // copy the whitelist of attributes using the per-attribute sanitizer\n for (var n_attr=0; n_attr < node.attributes.length; n_attr++) {\n var attr = node.attributes.item(n_attr).name;\n if (this.allowedTags[node_name].hasOwnProperty(attr)) {\n var sanitizer = this.allowedTags[node_name][attr];\n copy.setAttribute(attr, sanitizer(node.getAttribute(attr)));\n }\n }\n // copy the whitelist of css properties\n for (var css in this.allowedCss) {\n copy.style[this.allowedCss[css]] = node.style[this.allowedCss[css]];\n }\n\n // recursively sanitize child nodes\n while (node.childNodes.length > 0) {\n var child = node.removeChild(node.childNodes[0]);\n copy.appendChild(this.sanitizeNode(child));\n }\n return copy;\n}\n","\n\n\n\n\n
\n
\n
 x “{book.title}” by {#each book.authors as author, i}{#if i+1 < 4 }{author}{/if}{#if i+1 !== book.authors.length && i+1 < 4 }, {:else if i+1 === 4 } et al.{/if}{/each}
\n
\n {#if book.cover_url}\n
\n \"\"\n {#if book.formats != undefined && book.formats.length != 0 }\n
Download:\n {#each getFormats(book) as format}\n \"dl\"{format.title.replace(\",\", \"\")}\n {/each}\n
\n {:else}\n
.
\n {/if}\n
\n {/if}\n
\n Title: {book.title}\n
\n {#if book.authors}\n
\n Authors: \n {#each book.authors as author, i}\n {author}{#if i+1 !== book.authors.length}, {/if}\n {/each}\n
\n {/if}\n {#if book.publisher}\n
\n Publisher:\n {book.publisher}\n
\n {/if}\n {#if book.series}\n
\n Series:\n {book.series}\n
\n {/if}\n {#if book.year}\n
\n Year: {book.year}\n
\n {/if}\n {#if book.abstract}\n
\n {@html sanitizeAbstract(book.abstract)}\n
\n {/if}\n
\n {#if book.tags && book.tags.length > 0 }\n
\n Tags: \n {#each book.tags as tag, i}\n {tag}{#if i+1 !== book.tags.length}, {/if}\n {/each}\n
\n {/if}\n
\n catalogued by {book.librarian}\n
.
\n
\n << >>\n
\n
\n
\n
\n","\n\n\n\n{#if bookm}\n \n{/if}\n\n\n\n{#if t}\n \n{:else}\n \n{/if}\n\n","import App from './App.svelte';\n\nconst app = new App({\n\ttarget: document.body,\n\tprops: {\n\t\tname: 'world'\n\t}\n});\n\nexport default app;"],"names":["noop","run","fn","blank_object","Object","create","run_all","fns","forEach","is_function","thing","safe_not_equal","a","b","subscribe","store","callback","unsub","unsubscribe","component_subscribe","component","$$","on_destroy","push","append","target","node","appendChild","insert","anchor","insertBefore","detach","parentNode","removeChild","destroy_each","iterations","detaching","i","length","d","element","name","document","createElement","svg_element","createElementNS","text","data","createTextNode","space","empty","listen","event","handler","options","addEventListener","removeEventListener","stop_propagation","stopPropagation","call","this","self","attr","attribute","value","removeAttribute","getAttribute","setAttribute","children","Array","from","childNodes","set_data","set_input_value","input","toggle_class","toggle","classList","custom_event","type","detail","e","createEvent","initCustomEvent","current_component","set_current_component","get_current_component","Error","onMount","on_mount","createEventDispatcher","callbacks","slice","dirty_components","binding_callbacks","render_callbacks","flush_callbacks","resolved_promise","Promise","resolve","update_scheduled","schedule_update","then","flush","add_render_callback","add_flush_callback","seen_callbacks","Set","shift","update","pop","has","add","fragment","before_update","p","ctx","dirty","after_update","outroing","outros","group_outros","r","c","check_outros","transition_in","block","local","delete","transition_out","o","globals","window","global","destroy_block","lookup","key","outro_and_destroy_block","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","get","set","Math","abs","will_move","did_move","m","first","new_block","old_block","new_key","old_key","bind","index","props","undefined","bound","create_component","mount_component","new_on_destroy","map","filter","destroy_component","make_dirty","fill","init","instance","create_fragment","not_equal","parent_component","prop_values","context","ready","ret","hydrate","l","intro","SvelteComponent","[object Object]","$destroy","indexOf","splice","toUpperCase","defaultItem","droplist","selectedItem","dispatch","hidelist","selectItem","dropel","subscriber_queue","readable","start","writable","stop","subscribers","new_value","run_queue","s","invalidate","subscriber","lasthash","restapi","dynamicSort","property","sortOrder","substr","localeCompare","mockHttpRequest","books","request_url","max_results","title","url","URL","restList","pathname","split","restVerb","restField","restQuery","decodeURIComponent","librarians","librarian","_items","authors","toLowerCase","tags","t","titles","bz","includes","f","_id","library_url","CALIBRE_BOOKS1","total","params","searchParams","entries","page","lastPage","floor","max","min","startCut","endCut","bookz","_links","parent","href","prev","last","_meta","status","motw_reverse_svg","download_svg","bownload_svg","selectedLibrarian","mock","librariansDroplist","location","hash","$restapi","res","fetch","json","sort","cssCandidate","highlightCandidate","dimlightCandidate","cssSelectedCandidate","setSelectedCandidate","elem","mdl","className","style","backgroundColor","id","resetSelectedCandidate","candiv","candidates","secondClick","selection","selectedCandidate","getElementById","showCandiList","candidateSets","searchModeDefault","searchModeList","searchModeListTotal","concat","searchMode","fetchCompletion","sel","_","sorted","filteredCandidates","item","reset","scroll","el","innerText","firstChild","nextSibling","previousSibling","lastChild","scrollIntoView","behavior","searchStatus","keys","navbarLinks","readableBytes","bytes","log","pow","toFixed","getFormats","book","sep","formats","size","frm","dir_path","file_name","format","cover_url","tooltip","setTimeout","getYear","year","hasOwnProperty","pubdate","HtmlWhitelistedSanitizer","escape","css","urls","allowedTags","allowedCss","doc","implementation","createHTMLDocument","unconstrainted","x","globalAttributes","dir","lang","url_sanitizer","makeUrlSanitizer","mergeMap","download","hreflang","ping","rel","div","span","br","u","allowed_urls","str","startsWith","arg","arguments","prototype","sanitizeString","innerHTML","sanitizeNode","node_name","nodeName","textContent","copy","n_attr","attributes","sanitizer","child","replace","publisher","series","sanitizeAbstract","abstract","bookm","lochash","JSON","parse","stringify","getLoadingBook","getLoadingBooks","loadingBook","setLastHash","h","fetchBooks","repeat","random","statusLine","iLow","iHigh","fetchBook","endsWith","dispatchHash","lh","scrollTo","nextModal","bid","body","scrollHeight","prevModal","onreadystatechange","readyState","portable","onload","eval","src","hashChanged","app","App"],"mappings":"gCAAA,S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