{"version":3,"file":"bundle.js","sources":["../../node_modules/svelte/internal/index.mjs","../../node_modules/svelte-qrcode/src/lib/qrcode/index.js","../../node_modules/svelte-qrcode/src/lib/index.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}\nlet src_url_equal_anchor;\nfunction src_url_equal(element_src, url) {\n if (!src_url_equal_anchor) {\n src_url_equal_anchor = document.createElement('a');\n }\n src_url_equal_anchor.href = url;\n return element_src === src_url_equal_anchor.href;\n}\nfunction not_equal(a, b) {\n return a != a ? b == b : a !== b;\n}\nfunction is_empty(obj) {\n return Object.keys(obj).length === 0;\n}\nfunction validate_store(store, name) {\n if (store != null && typeof store.subscribe !== 'function') {\n throw new Error(`'${name}' is not a store with a 'subscribe' method`);\n }\n}\nfunction subscribe(store, ...callbacks) {\n if (store == null) {\n return noop;\n }\n const unsub = store.subscribe(...callbacks);\n return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub;\n}\nfunction get_store_value(store) {\n let value;\n subscribe(store, _ => value = _)();\n return value;\n}\nfunction component_subscribe(component, store, callback) {\n component.$$.on_destroy.push(subscribe(store, callback));\n}\nfunction create_slot(definition, ctx, $$scope, fn) {\n if (definition) {\n const slot_ctx = get_slot_context(definition, ctx, $$scope, fn);\n return definition[0](slot_ctx);\n }\n}\nfunction get_slot_context(definition, ctx, $$scope, fn) {\n return definition[1] && fn\n ? assign($$scope.ctx.slice(), definition[1](fn(ctx)))\n : $$scope.ctx;\n}\nfunction get_slot_changes(definition, $$scope, dirty, fn) {\n if (definition[2] && fn) {\n const lets = definition[2](fn(dirty));\n if ($$scope.dirty === undefined) {\n return lets;\n }\n if (typeof lets === 'object') {\n const merged = [];\n const len = Math.max($$scope.dirty.length, lets.length);\n for (let i = 0; i < len; i += 1) {\n merged[i] = $$scope.dirty[i] | lets[i];\n }\n return merged;\n }\n return $$scope.dirty | lets;\n }\n return $$scope.dirty;\n}\nfunction update_slot_base(slot, slot_definition, ctx, $$scope, slot_changes, get_slot_context_fn) {\n if (slot_changes) {\n const slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn);\n slot.p(slot_context, slot_changes);\n }\n}\nfunction update_slot(slot, slot_definition, ctx, $$scope, dirty, get_slot_changes_fn, get_slot_context_fn) {\n const slot_changes = get_slot_changes(slot_definition, $$scope, dirty, get_slot_changes_fn);\n update_slot_base(slot, slot_definition, ctx, $$scope, slot_changes, get_slot_context_fn);\n}\nfunction get_all_dirty_from_scope($$scope) {\n if ($$scope.ctx.length > 32) {\n const dirty = [];\n const length = $$scope.ctx.length / 32;\n for (let i = 0; i < length; i++) {\n dirty[i] = -1;\n }\n return dirty;\n }\n return -1;\n}\nfunction exclude_internal_props(props) {\n const result = {};\n for (const k in props)\n if (k[0] !== '$')\n result[k] = props[k];\n return result;\n}\nfunction compute_rest_props(props, keys) {\n const rest = {};\n keys = new Set(keys);\n for (const k in props)\n if (!keys.has(k) && k[0] !== '$')\n rest[k] = props[k];\n return rest;\n}\nfunction compute_slots(slots) {\n const result = {};\n for (const key in slots) {\n result[key] = true;\n }\n return result;\n}\nfunction once(fn) {\n let ran = false;\n return function (...args) {\n if (ran)\n return;\n ran = true;\n fn.call(this, ...args);\n };\n}\nfunction null_to_empty(value) {\n return value == null ? '' : value;\n}\nfunction set_store_value(store, ret, value) {\n store.set(value);\n return ret;\n}\nconst has_prop = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);\nfunction action_destroyer(action_result) {\n return action_result && is_function(action_result.destroy) ? action_result.destroy : noop;\n}\n\nconst is_client = typeof window !== 'undefined';\nlet now = is_client\n ? () => window.performance.now()\n : () => Date.now();\nlet raf = is_client ? cb => requestAnimationFrame(cb) : noop;\n// used internally for testing\nfunction set_now(fn) {\n now = fn;\n}\nfunction set_raf(fn) {\n raf = fn;\n}\n\nconst tasks = new Set();\nfunction run_tasks(now) {\n tasks.forEach(task => {\n if (!task.c(now)) {\n tasks.delete(task);\n task.f();\n }\n });\n if (tasks.size !== 0)\n raf(run_tasks);\n}\n/**\n * For testing purposes only!\n */\nfunction clear_loops() {\n tasks.clear();\n}\n/**\n * Creates a new task that runs on each raf frame\n * until it returns a falsy value or is aborted\n */\nfunction loop(callback) {\n let task;\n if (tasks.size === 0)\n raf(run_tasks);\n return {\n promise: new Promise(fulfill => {\n tasks.add(task = { c: callback, f: fulfill });\n }),\n abort() {\n tasks.delete(task);\n }\n };\n}\n\n// Track which nodes are claimed during hydration. Unclaimed nodes can then be removed from the DOM\n// at the end of hydration without touching the remaining nodes.\nlet is_hydrating = false;\nfunction start_hydrating() {\n is_hydrating = true;\n}\nfunction end_hydrating() {\n is_hydrating = false;\n}\nfunction upper_bound(low, high, key, value) {\n // Return first index of value larger than input value in the range [low, high)\n while (low < high) {\n const mid = low + ((high - low) >> 1);\n if (key(mid) <= value) {\n low = mid + 1;\n }\n else {\n high = mid;\n }\n }\n return low;\n}\nfunction init_hydrate(target) {\n if (target.hydrate_init)\n return;\n target.hydrate_init = true;\n // We know that all children have claim_order values since the unclaimed have been detached if target is not \n let children = target.childNodes;\n // If target is , there may be children without claim_order\n if (target.nodeName === 'HEAD') {\n const myChildren = [];\n for (let i = 0; i < children.length; i++) {\n const node = children[i];\n if (node.claim_order !== undefined) {\n myChildren.push(node);\n }\n }\n children = myChildren;\n }\n /*\n * Reorder claimed children optimally.\n * We can reorder claimed children optimally by finding the longest subsequence of\n * nodes that are already claimed in order and only moving the rest. The longest\n * subsequence subsequence of nodes that are claimed in order can be found by\n * computing the longest increasing subsequence of .claim_order values.\n *\n * This algorithm is optimal in generating the least amount of reorder operations\n * possible.\n *\n * Proof:\n * We know that, given a set of reordering operations, the nodes that do not move\n * always form an increasing subsequence, since they do not move among each other\n * meaning that they must be already ordered among each other. Thus, the maximal\n * set of nodes that do not move form a longest increasing subsequence.\n */\n // Compute longest increasing subsequence\n // m: subsequence length j => index k of smallest value that ends an increasing subsequence of length j\n const m = new Int32Array(children.length + 1);\n // Predecessor indices + 1\n const p = new Int32Array(children.length);\n m[0] = -1;\n let longest = 0;\n for (let i = 0; i < children.length; i++) {\n const current = children[i].claim_order;\n // Find the largest subsequence length such that it ends in a value less than our current value\n // upper_bound returns first greater value, so we subtract one\n // with fast path for when we are on the current longest subsequence\n const seqLen = ((longest > 0 && children[m[longest]].claim_order <= current) ? longest + 1 : upper_bound(1, longest, idx => children[m[idx]].claim_order, current)) - 1;\n p[i] = m[seqLen] + 1;\n const newLen = seqLen + 1;\n // We can guarantee that current is the smallest value. Otherwise, we would have generated a longer sequence.\n m[newLen] = i;\n longest = Math.max(newLen, longest);\n }\n // The longest increasing subsequence of nodes (initially reversed)\n const lis = [];\n // The rest of the nodes, nodes that will be moved\n const toMove = [];\n let last = children.length - 1;\n for (let cur = m[longest] + 1; cur != 0; cur = p[cur - 1]) {\n lis.push(children[cur - 1]);\n for (; last >= cur; last--) {\n toMove.push(children[last]);\n }\n last--;\n }\n for (; last >= 0; last--) {\n toMove.push(children[last]);\n }\n lis.reverse();\n // We sort the nodes being moved to guarantee that their insertion order matches the claim order\n toMove.sort((a, b) => a.claim_order - b.claim_order);\n // Finally, we move the nodes\n for (let i = 0, j = 0; i < toMove.length; i++) {\n while (j < lis.length && toMove[i].claim_order >= lis[j].claim_order) {\n j++;\n }\n const anchor = j < lis.length ? lis[j] : null;\n target.insertBefore(toMove[i], anchor);\n }\n}\nfunction append(target, node) {\n target.appendChild(node);\n}\nfunction append_styles(target, style_sheet_id, styles) {\n const append_styles_to = get_root_for_style(target);\n if (!append_styles_to.getElementById(style_sheet_id)) {\n const style = element('style');\n style.id = style_sheet_id;\n style.textContent = styles;\n append_stylesheet(append_styles_to, style);\n }\n}\nfunction get_root_for_style(node) {\n if (!node)\n return document;\n const root = node.getRootNode ? node.getRootNode() : node.ownerDocument;\n if (root && root.host) {\n return root;\n }\n return node.ownerDocument;\n}\nfunction append_empty_stylesheet(node) {\n const style_element = element('style');\n append_stylesheet(get_root_for_style(node), style_element);\n return style_element;\n}\nfunction append_stylesheet(node, style) {\n append(node.head || node, style);\n}\nfunction append_hydration(target, node) {\n if (is_hydrating) {\n init_hydrate(target);\n if ((target.actual_end_child === undefined) || ((target.actual_end_child !== null) && (target.actual_end_child.parentElement !== target))) {\n target.actual_end_child = target.firstChild;\n }\n // Skip nodes of undefined ordering\n while ((target.actual_end_child !== null) && (target.actual_end_child.claim_order === undefined)) {\n target.actual_end_child = target.actual_end_child.nextSibling;\n }\n if (node !== target.actual_end_child) {\n // We only insert if the ordering of this node should be modified or the parent node is not target\n if (node.claim_order !== undefined || node.parentNode !== target) {\n target.insertBefore(node, target.actual_end_child);\n }\n }\n else {\n target.actual_end_child = node.nextSibling;\n }\n }\n else if (node.parentNode !== target || node.nextSibling !== null) {\n target.appendChild(node);\n }\n}\nfunction insert(target, node, anchor) {\n target.insertBefore(node, anchor || null);\n}\nfunction insert_hydration(target, node, anchor) {\n if (is_hydrating && !anchor) {\n append_hydration(target, node);\n }\n else if (node.parentNode !== target || node.nextSibling != anchor) {\n target.insertBefore(node, anchor || null);\n }\n}\nfunction detach(node) {\n node.parentNode.removeChild(node);\n}\nfunction destroy_each(iterations, detaching) {\n for (let i = 0; i < iterations.length; i += 1) {\n if (iterations[i])\n iterations[i].d(detaching);\n }\n}\nfunction element(name) {\n return document.createElement(name);\n}\nfunction element_is(name, is) {\n return document.createElement(name, { is });\n}\nfunction object_without_properties(obj, exclude) {\n const target = {};\n for (const k in obj) {\n if (has_prop(obj, k)\n // @ts-ignore\n && exclude.indexOf(k) === -1) {\n // @ts-ignore\n target[k] = obj[k];\n }\n }\n return target;\n}\nfunction svg_element(name) {\n return document.createElementNS('http://www.w3.org/2000/svg', name);\n}\nfunction text(data) {\n return document.createTextNode(data);\n}\nfunction space() {\n return text(' ');\n}\nfunction empty() {\n return text('');\n}\nfunction listen(node, event, handler, options) {\n node.addEventListener(event, handler, options);\n return () => node.removeEventListener(event, handler, options);\n}\nfunction prevent_default(fn) {\n return function (event) {\n event.preventDefault();\n // @ts-ignore\n return fn.call(this, event);\n };\n}\nfunction stop_propagation(fn) {\n return function (event) {\n event.stopPropagation();\n // @ts-ignore\n return fn.call(this, event);\n };\n}\nfunction self(fn) {\n return function (event) {\n // @ts-ignore\n if (event.target === this)\n fn.call(this, event);\n };\n}\nfunction trusted(fn) {\n return function (event) {\n // @ts-ignore\n if (event.isTrusted)\n fn.call(this, event);\n };\n}\nfunction attr(node, attribute, value) {\n if (value == null)\n node.removeAttribute(attribute);\n else if (node.getAttribute(attribute) !== value)\n node.setAttribute(attribute, value);\n}\nfunction set_attributes(node, attributes) {\n // @ts-ignore\n const descriptors = Object.getOwnPropertyDescriptors(node.__proto__);\n for (const key in attributes) {\n if (attributes[key] == null) {\n node.removeAttribute(key);\n }\n else if (key === 'style') {\n node.style.cssText = attributes[key];\n }\n else if (key === '__value') {\n node.value = node[key] = attributes[key];\n }\n else if (descriptors[key] && descriptors[key].set) {\n node[key] = attributes[key];\n }\n else {\n attr(node, key, attributes[key]);\n }\n }\n}\nfunction set_svg_attributes(node, attributes) {\n for (const key in attributes) {\n attr(node, key, attributes[key]);\n }\n}\nfunction set_custom_element_data(node, prop, value) {\n if (prop in node) {\n node[prop] = typeof node[prop] === 'boolean' && value === '' ? true : value;\n }\n else {\n attr(node, prop, value);\n }\n}\nfunction xlink_attr(node, attribute, value) {\n node.setAttributeNS('http://www.w3.org/1999/xlink', attribute, value);\n}\nfunction get_binding_group_value(group, __value, checked) {\n const value = new Set();\n for (let i = 0; i < group.length; i += 1) {\n if (group[i].checked)\n value.add(group[i].__value);\n }\n if (!checked) {\n value.delete(__value);\n }\n return Array.from(value);\n}\nfunction to_number(value) {\n return value === '' ? null : +value;\n}\nfunction time_ranges_to_array(ranges) {\n const array = [];\n for (let i = 0; i < ranges.length; i += 1) {\n array.push({ start: ranges.start(i), end: ranges.end(i) });\n }\n return array;\n}\nfunction children(element) {\n return Array.from(element.childNodes);\n}\nfunction init_claim_info(nodes) {\n if (nodes.claim_info === undefined) {\n nodes.claim_info = { last_index: 0, total_claimed: 0 };\n }\n}\nfunction claim_node(nodes, predicate, processNode, createNode, dontUpdateLastIndex = false) {\n // Try to find nodes in an order such that we lengthen the longest increasing subsequence\n init_claim_info(nodes);\n const resultNode = (() => {\n // We first try to find an element after the previous one\n for (let i = nodes.claim_info.last_index; i < nodes.length; i++) {\n const node = nodes[i];\n if (predicate(node)) {\n const replacement = processNode(node);\n if (replacement === undefined) {\n nodes.splice(i, 1);\n }\n else {\n nodes[i] = replacement;\n }\n if (!dontUpdateLastIndex) {\n nodes.claim_info.last_index = i;\n }\n return node;\n }\n }\n // Otherwise, we try to find one before\n // We iterate in reverse so that we don't go too far back\n for (let i = nodes.claim_info.last_index - 1; i >= 0; i--) {\n const node = nodes[i];\n if (predicate(node)) {\n const replacement = processNode(node);\n if (replacement === undefined) {\n nodes.splice(i, 1);\n }\n else {\n nodes[i] = replacement;\n }\n if (!dontUpdateLastIndex) {\n nodes.claim_info.last_index = i;\n }\n else if (replacement === undefined) {\n // Since we spliced before the last_index, we decrease it\n nodes.claim_info.last_index--;\n }\n return node;\n }\n }\n // If we can't find any matching node, we create a new one\n return createNode();\n })();\n resultNode.claim_order = nodes.claim_info.total_claimed;\n nodes.claim_info.total_claimed += 1;\n return resultNode;\n}\nfunction claim_element_base(nodes, name, attributes, create_element) {\n return claim_node(nodes, (node) => node.nodeName === name, (node) => {\n const remove = [];\n for (let j = 0; j < node.attributes.length; j++) {\n const attribute = node.attributes[j];\n if (!attributes[attribute.name]) {\n remove.push(attribute.name);\n }\n }\n remove.forEach(v => node.removeAttribute(v));\n return undefined;\n }, () => create_element(name));\n}\nfunction claim_element(nodes, name, attributes) {\n return claim_element_base(nodes, name, attributes, element);\n}\nfunction claim_svg_element(nodes, name, attributes) {\n return claim_element_base(nodes, name, attributes, svg_element);\n}\nfunction claim_text(nodes, data) {\n return claim_node(nodes, (node) => node.nodeType === 3, (node) => {\n const dataStr = '' + data;\n if (node.data.startsWith(dataStr)) {\n if (node.data.length !== dataStr.length) {\n return node.splitText(dataStr.length);\n }\n }\n else {\n node.data = dataStr;\n }\n }, () => text(data), true // Text nodes should not update last index since it is likely not worth it to eliminate an increasing subsequence of actual elements\n );\n}\nfunction claim_space(nodes) {\n return claim_text(nodes, ' ');\n}\nfunction find_comment(nodes, text, start) {\n for (let i = start; i < nodes.length; i += 1) {\n const node = nodes[i];\n if (node.nodeType === 8 /* comment node */ && node.textContent.trim() === text) {\n return i;\n }\n }\n return nodes.length;\n}\nfunction claim_html_tag(nodes) {\n // find html opening tag\n const start_index = find_comment(nodes, 'HTML_TAG_START', 0);\n const end_index = find_comment(nodes, 'HTML_TAG_END', start_index);\n if (start_index === end_index) {\n return new HtmlTagHydration();\n }\n init_claim_info(nodes);\n const html_tag_nodes = nodes.splice(start_index, end_index + 1);\n detach(html_tag_nodes[0]);\n detach(html_tag_nodes[html_tag_nodes.length - 1]);\n const claimed_nodes = html_tag_nodes.slice(1, html_tag_nodes.length - 1);\n for (const n of claimed_nodes) {\n n.claim_order = nodes.claim_info.total_claimed;\n nodes.claim_info.total_claimed += 1;\n }\n return new HtmlTagHydration(claimed_nodes);\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 select.selectedIndex = -1; // no option should be selected\n}\nfunction select_options(select, value) {\n for (let i = 0; i < select.options.length; i += 1) {\n const option = select.options[i];\n option.selected = ~value.indexOf(option.__value);\n }\n}\nfunction select_value(select) {\n const selected_option = select.querySelector(':checked') || select.options[0];\n return selected_option && selected_option.__value;\n}\nfunction select_multiple_value(select) {\n return [].map.call(select.querySelectorAll(':checked'), option => option.__value);\n}\n// unfortunately this can't be a constant as that wouldn't be tree-shakeable\n// so we cache the result instead\nlet crossorigin;\nfunction is_crossorigin() {\n if (crossorigin === undefined) {\n crossorigin = false;\n try {\n if (typeof window !== 'undefined' && window.parent) {\n void window.parent.document;\n }\n }\n catch (error) {\n crossorigin = true;\n }\n }\n return crossorigin;\n}\nfunction add_resize_listener(node, fn) {\n const computed_style = getComputedStyle(node);\n if (computed_style.position === 'static') {\n node.style.position = 'relative';\n }\n const iframe = element('iframe');\n iframe.setAttribute('style', 'display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; ' +\n 'overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;');\n iframe.setAttribute('aria-hidden', 'true');\n iframe.tabIndex = -1;\n const crossorigin = is_crossorigin();\n let unsubscribe;\n if (crossorigin) {\n iframe.src = \"data:text/html,\";\n unsubscribe = listen(window, 'message', (event) => {\n if (event.source === iframe.contentWindow)\n fn();\n });\n }\n else {\n iframe.src = 'about:blank';\n iframe.onload = () => {\n unsubscribe = listen(iframe.contentWindow, 'resize', fn);\n };\n }\n append(node, iframe);\n return () => {\n if (crossorigin) {\n unsubscribe();\n }\n else if (unsubscribe && iframe.contentWindow) {\n unsubscribe();\n }\n detach(iframe);\n };\n}\nfunction toggle_class(element, name, toggle) {\n element.classList[toggle ? 'add' : 'remove'](name);\n}\nfunction custom_event(type, detail, bubbles = false) {\n const e = document.createEvent('CustomEvent');\n e.initCustomEvent(type, bubbles, 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() {\n this.e = this.n = null;\n }\n c(html) {\n this.h(html);\n }\n m(html, target, anchor = null) {\n if (!this.e) {\n this.e = element(target.nodeName);\n this.t = target;\n this.c(html);\n }\n this.i(anchor);\n }\n h(html) {\n this.e.innerHTML = html;\n this.n = Array.from(this.e.childNodes);\n }\n i(anchor) {\n for (let i = 0; i < this.n.length; i += 1) {\n insert(this.t, this.n[i], anchor);\n }\n }\n p(html) {\n this.d();\n this.h(html);\n this.i(this.a);\n }\n d() {\n this.n.forEach(detach);\n }\n}\nclass HtmlTagHydration extends HtmlTag {\n constructor(claimed_nodes) {\n super();\n this.e = this.n = null;\n this.l = claimed_nodes;\n }\n c(html) {\n if (this.l) {\n this.n = this.l;\n }\n else {\n super.c(html);\n }\n }\n i(anchor) {\n for (let i = 0; i < this.n.length; i += 1) {\n insert_hydration(this.t, this.n[i], anchor);\n }\n }\n}\nfunction attribute_to_object(attributes) {\n const result = {};\n for (const attribute of attributes) {\n result[attribute.name] = attribute.value;\n }\n return result;\n}\nfunction get_custom_elements_slots(element) {\n const result = {};\n element.childNodes.forEach((node) => {\n result[node.slot || 'default'] = true;\n });\n return result;\n}\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 = get_root_for_style(node);\n active_docs.add(doc);\n const stylesheet = doc.__svelte_stylesheet || (doc.__svelte_stylesheet = append_empty_stylesheet(node).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 getAllContexts() {\n return get_current_component().$$.context;\n}\nfunction hasContext(key) {\n return get_current_component().$$.context.has(key);\n}\n// TODO figure out if we still want to support\n// shorthand events, or if we want to implement\n// a real bubbling mechanism\nfunction bubble(component, event) {\n const callbacks = component.$$.callbacks[event.type];\n if (callbacks) {\n // @ts-ignore\n callbacks.slice().forEach(fn => fn.call(this, event));\n }\n}\n\nconst dirty_components = [];\nconst intros = { enabled: false };\nconst binding_callbacks = [];\nconst render_callbacks = [];\nconst flush_callbacks = [];\nconst resolved_promise = Promise.resolve();\nlet update_scheduled = false;\nfunction schedule_update() {\n if (!update_scheduled) {\n update_scheduled = true;\n resolved_promise.then(flush);\n }\n}\nfunction tick() {\n schedule_update();\n return resolved_promise;\n}\nfunction add_render_callback(fn) {\n render_callbacks.push(fn);\n}\nfunction add_flush_callback(fn) {\n flush_callbacks.push(fn);\n}\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 started = true;\n delete_rule(node);\n if (is_function(config)) {\n config = config();\n wait().then(go);\n }\n else {\n go();\n }\n },\n invalidate() {\n started = false;\n },\n end() {\n if (running) {\n cleanup();\n running = false;\n }\n }\n };\n}\nfunction create_out_transition(node, fn, params) {\n let config = fn(node, params);\n let running = true;\n let animation_name;\n const group = outros;\n group.r += 1;\n function go() {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n if (css)\n animation_name = create_rule(node, 1, 0, duration, delay, easing, css);\n const start_time = now() + delay;\n const end_time = start_time + duration;\n add_render_callback(() => dispatch(node, false, 'start'));\n loop(now => {\n if (running) {\n if (now >= end_time) {\n tick(0, 1);\n dispatch(node, false, 'end');\n if (!--group.r) {\n // this will result in `end()` being called,\n // so we don't need to clean up here\n run_all(group.c);\n }\n return false;\n }\n if (now >= start_time) {\n const t = easing((now - start_time) / duration);\n tick(1 - t, t);\n }\n }\n return running;\n });\n }\n if (is_function(config)) {\n wait().then(() => {\n // @ts-ignore\n config = config();\n go();\n });\n }\n else {\n go();\n }\n return {\n end(reset) {\n if (reset && config.tick) {\n config.tick(1, 0);\n }\n if (running) {\n if (animation_name)\n delete_rule(node, animation_name);\n running = false;\n }\n }\n };\n}\nfunction create_bidirectional_transition(node, fn, params, intro) {\n let config = fn(node, params);\n let t = intro ? 0 : 1;\n let running_program = null;\n let pending_program = null;\n let animation_name = null;\n function clear_animation() {\n if (animation_name)\n delete_rule(node, animation_name);\n }\n function init(program, duration) {\n const d = (program.b - t);\n duration *= Math.abs(d);\n return {\n a: t,\n b: program.b,\n d,\n duration,\n start: program.start,\n end: program.start + duration,\n group: program.group\n };\n }\n function go(b) {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n const program = {\n start: now() + delay,\n b\n };\n if (!b) {\n // @ts-ignore todo: improve typings\n program.group = outros;\n outros.r += 1;\n }\n if (running_program || pending_program) {\n pending_program = program;\n }\n else {\n // if this is an intro, and there's a delay, we need to do\n // an initial tick and/or apply CSS animation immediately\n if (css) {\n clear_animation();\n animation_name = create_rule(node, t, b, duration, delay, easing, css);\n }\n if (b)\n tick(0, 1);\n running_program = init(program, duration);\n add_render_callback(() => dispatch(node, b, 'start'));\n loop(now => {\n if (pending_program && now > pending_program.start) {\n running_program = init(pending_program, duration);\n pending_program = null;\n dispatch(node, running_program.b, 'start');\n if (css) {\n clear_animation();\n animation_name = create_rule(node, t, running_program.b, running_program.duration, 0, easing, config.css);\n }\n }\n if (running_program) {\n if (now >= running_program.end) {\n tick(t = running_program.b, 1 - t);\n dispatch(node, running_program.b, 'end');\n if (!pending_program) {\n // we're done\n if (running_program.b) {\n // intro — 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}=\"${value}\"`;\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 escape_attribute_value(value) {\n return typeof value === 'string' ? escape(value) : value;\n}\nfunction escape_object(obj) {\n const result = {};\n for (const key in obj) {\n result[key] = escape_attribute_value(obj[key]);\n }\n return result;\n}\nfunction each(items, fn) {\n let str = '';\n for (let i = 0; i < items.length; i += 1) {\n str += fn(items[i], i);\n }\n return str;\n}\nconst missing_component = {\n $$render: () => ''\n};\nfunction validate_component(component, name) {\n if (!component || !component.$$render) {\n if (name === 'svelte:component')\n name += ' this={...}';\n throw new Error(`<${name}> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules`);\n }\n return component;\n}\nfunction debug(file, line, column, values) {\n console.log(`{@debug} ${file ? file + ' ' : ''}(${line}:${column})`); // eslint-disable-line no-console\n console.log(values); // eslint-disable-line no-console\n return '';\n}\nlet on_destroy;\nfunction create_ssr_component(fn) {\n function $$render(result, props, bindings, slots, context) {\n const parent_component = current_component;\n const $$ = {\n on_destroy,\n context: new Map(context || (parent_component ? parent_component.$$.context : [])),\n // these will be immediately discarded\n on_mount: [],\n before_update: [],\n after_update: [],\n callbacks: blank_object()\n };\n set_current_component({ $$ });\n const html = fn(result, props, bindings, slots);\n set_current_component(parent_component);\n return html;\n }\n return {\n render: (props = {}, { $$slots = {}, context = new Map() } = {}) => {\n on_destroy = [];\n const result = { title: '', head: '', css: new Set() };\n const html = $$render(result, props, {}, $$slots, context);\n run_all(on_destroy);\n return {\n html,\n css: {\n code: Array.from(result.css).map(css => css.code).join('\\n'),\n map: null // TODO\n },\n head: result.title + result.head\n };\n },\n $$render\n };\n}\nfunction add_attribute(name, value, boolean) {\n if (value == null || (boolean && !value))\n return '';\n 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, append_styles, 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(options.context || (parent_component ? parent_component.$$.context : [])),\n // everything else\n callbacks: blank_object(),\n dirty,\n skip_bound: false,\n root: options.target || parent_component.$$.root\n };\n append_styles && append_styles($$.root);\n let ready = false;\n $$.ctx = instance\n ? instance(component, options.props || {}, (i, ret, ...rest) => {\n const value = rest.length ? rest[0] : ret;\n if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) {\n if (!$$.skip_bound && $$.bound[i])\n $$.bound[i](value);\n if (ready)\n make_dirty(component, i);\n }\n return ret;\n })\n : [];\n $$.update();\n ready = true;\n run_all($$.before_update);\n // `false` as a special case of no DOM component\n $$.fragment = create_fragment ? create_fragment($$.ctx) : false;\n if (options.target) {\n if (options.hydrate) {\n start_hydrating();\n const nodes = children(options.target);\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.l(nodes);\n nodes.forEach(detach);\n }\n else {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.c();\n }\n if (options.intro)\n transition_in(component.$$.fragment);\n mount_component(component, options.target, options.anchor, options.customElement);\n end_hydrating();\n flush();\n }\n set_current_component(parent_component);\n}\nlet SvelteElement;\nif (typeof HTMLElement === 'function') {\n SvelteElement = class extends HTMLElement {\n constructor() {\n super();\n this.attachShadow({ mode: 'open' });\n }\n connectedCallback() {\n const { on_mount } = this.$$;\n this.$$.on_disconnect = on_mount.map(run).filter(is_function);\n // @ts-ignore todo: improve typings\n for (const key in this.$$.slotted) {\n // @ts-ignore todo: improve typings\n this.appendChild(this.$$.slotted[key]);\n }\n }\n attributeChangedCallback(attr, _oldValue, newValue) {\n this[attr] = newValue;\n }\n disconnectedCallback() {\n run_all(this.$$.on_disconnect);\n }\n $destroy() {\n destroy_component(this, 1);\n this.$destroy = noop;\n }\n $on(type, callback) {\n // TODO should this delegate to addEventListener?\n 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.43.1' }, detail), true));\n}\nfunction append_dev(target, node) {\n dispatch_dev('SvelteDOMInsert', { target, node });\n append(target, node);\n}\nfunction append_hydration_dev(target, node) {\n dispatch_dev('SvelteDOMInsert', { target, node });\n append_hydration(target, node);\n}\nfunction insert_dev(target, node, anchor) {\n dispatch_dev('SvelteDOMInsert', { target, node, anchor });\n insert(target, node, anchor);\n}\nfunction insert_hydration_dev(target, node, anchor) {\n dispatch_dev('SvelteDOMInsert', { target, node, anchor });\n insert_hydration(target, node, anchor);\n}\nfunction detach_dev(node) {\n dispatch_dev('SvelteDOMRemove', { node });\n detach(node);\n}\nfunction detach_between_dev(before, after) {\n while (before.nextSibling && before.nextSibling !== after) {\n detach_dev(before.nextSibling);\n }\n}\nfunction detach_before_dev(after) {\n while (after.previousSibling) {\n detach_dev(after.previousSibling);\n }\n}\nfunction detach_after_dev(before) {\n while (before.nextSibling) {\n detach_dev(before.nextSibling);\n }\n}\nfunction listen_dev(node, event, handler, options, has_prevent_default, has_stop_propagation) {\n const modifiers = options === true ? ['capture'] : options ? Array.from(Object.keys(options)) : [];\n if (has_prevent_default)\n modifiers.push('preventDefault');\n if (has_stop_propagation)\n modifiers.push('stopPropagation');\n dispatch_dev('SvelteDOMAddEventListener', { node, event, handler, modifiers });\n const dispose = listen(node, event, handler, options);\n return () => {\n dispatch_dev('SvelteDOMRemoveEventListener', { node, event, handler, modifiers });\n dispose();\n };\n}\nfunction attr_dev(node, attribute, value) {\n attr(node, attribute, value);\n if (value == null)\n dispatch_dev('SvelteDOMRemoveAttribute', { node, attribute });\n else\n dispatch_dev('SvelteDOMSetAttribute', { node, attribute, value });\n}\nfunction prop_dev(node, property, value) {\n node[property] = value;\n dispatch_dev('SvelteDOMSetProperty', { node, property, value });\n}\nfunction dataset_dev(node, property, value) {\n node.dataset[property] = value;\n dispatch_dev('SvelteDOMSetDataset', { node, property, value });\n}\nfunction set_data_dev(text, data) {\n data = '' + data;\n if (text.wholeText === data)\n return;\n dispatch_dev('SvelteDOMSetData', { node: text, data });\n text.data = data;\n}\nfunction validate_each_argument(arg) {\n if (typeof arg !== 'string' && !(arg && typeof arg === 'object' && 'length' in arg)) {\n let msg = '{#each} only iterates over array-like objects.';\n if (typeof Symbol === 'function' && arg && Symbol.iterator in arg) {\n msg += ' You can use a spread to convert this iterable into an array.';\n }\n throw new Error(msg);\n }\n}\nfunction validate_slots(name, slot, keys) {\n for (const slot_key of Object.keys(slot)) {\n if (!~keys.indexOf(slot_key)) {\n console.warn(`<${name}> received an unexpected slot \"${slot_key}\".`);\n }\n }\n}\n/**\n * Base class for Svelte components with some minor dev-enhancements. Used when dev=true.\n */\nclass SvelteComponentDev extends SvelteComponent {\n constructor(options) {\n if (!options || (!options.target && !options.$$inline)) {\n throw new Error(\"'target' is a required option\");\n }\n super();\n }\n $destroy() {\n super.$destroy();\n this.$destroy = () => {\n console.warn('Component was already destroyed'); // eslint-disable-line no-console\n };\n }\n $capture_state() { }\n $inject_state() { }\n}\n/**\n * Base class to create strongly typed Svelte components.\n * This only exists for typing purposes and should be used in `.d.ts` files.\n *\n * ### Example:\n *\n * You have component library on npm called `component-library`, from which\n * you export a component called `MyComponent`. For Svelte+TypeScript users,\n * you want to provide typings. Therefore you create a `index.d.ts`:\n * ```ts\n * import { SvelteComponentTyped } from \"svelte\";\n * export class MyComponent extends SvelteComponentTyped<{foo: string}> {}\n * ```\n * Typing this makes it possible for IDEs like VS Code with the Svelte extension\n * to provide intellisense and to use the component like this in a Svelte file\n * with TypeScript:\n * ```svelte\n * \n * \n * ```\n *\n * #### Why not make this part of `SvelteComponent(Dev)`?\n * Because\n * ```ts\n * class ASubclassOfSvelteComponent extends SvelteComponent<{foo: string}> {}\n * const component: typeof SvelteComponent = ASubclassOfSvelteComponent;\n * ```\n * will throw a type error, so we need to separate the more strictly typed class.\n */\nclass SvelteComponentTyped extends SvelteComponentDev {\n constructor(options) {\n super(options);\n }\n}\nfunction loop_guard(timeout) {\n const start = Date.now();\n return () => {\n if (Date.now() - start > timeout) {\n throw new Error('Infinite loop detected');\n }\n };\n}\n\nexport { HtmlTag, HtmlTagHydration, SvelteComponent, SvelteComponentDev, SvelteComponentTyped, SvelteElement, action_destroyer, add_attribute, add_classes, add_flush_callback, add_location, add_render_callback, add_resize_listener, add_transform, afterUpdate, append, append_dev, append_empty_stylesheet, append_hydration, append_hydration_dev, append_styles, assign, attr, attr_dev, attribute_to_object, beforeUpdate, bind, binding_callbacks, blank_object, bubble, check_outros, children, claim_component, claim_element, claim_html_tag, claim_space, claim_svg_element, claim_text, clear_loops, component_subscribe, compute_rest_props, compute_slots, createEventDispatcher, create_animation, create_bidirectional_transition, create_component, create_in_transition, create_out_transition, create_slot, create_ssr_component, current_component, custom_event, dataset_dev, debug, destroy_block, destroy_component, destroy_each, detach, detach_after_dev, detach_before_dev, detach_between_dev, detach_dev, dirty_components, dispatch_dev, each, element, element_is, empty, end_hydrating, escape, escape_attribute_value, escape_object, escaped, exclude_internal_props, fix_and_destroy_block, fix_and_outro_and_destroy_block, fix_position, flush, getAllContexts, getContext, get_all_dirty_from_scope, get_binding_group_value, get_current_component, get_custom_elements_slots, get_root_for_style, get_slot_changes, get_spread_object, get_spread_update, get_store_value, globals, group_outros, handle_promise, hasContext, has_prop, identity, init, insert, insert_dev, insert_hydration, insert_hydration_dev, intros, invalid_attribute_name_character, is_client, is_crossorigin, is_empty, is_function, is_promise, 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, src_url_equal, start_hydrating, stop_propagation, subscribe, svg_element, text, tick, time_ranges_to_array, to_number, toggle_class, transition_in, transition_out, trusted, update_await_block_branch, update_keyed_each, update_slot, update_slot_base, validate_component, validate_each_argument, validate_each_keys, validate_slots, validate_store, xlink_attr };\n","/*\n * QRious v4.0.2\n * Copyright (C) 2017 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global.QRious = factory());\n }(this, (function () { 'use strict';\n \n /*\n * Copyright (C) 2017 Alasdair Mercer, !ninja\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n \n /**\n * A bare-bones constructor for surrogate prototype swapping.\n *\n * @private\n * @constructor\n */\n var Constructor = /* istanbul ignore next */ function() {};\n /**\n * A reference to Object.prototype.hasOwnProperty.\n *\n * @private\n * @type {Function}\n */\n var hasOwnProperty = Object.prototype.hasOwnProperty;\n /**\n * A reference to Array.prototype.slice.\n *\n * @private\n * @type {Function}\n */\n var slice = Array.prototype.slice;\n \n /**\n * Creates an object which inherits the given prototype.\n *\n * Optionally, the created object can be extended further with the specified properties.\n *\n * @param {Object} prototype - the prototype to be inherited by the created object\n * @param {Object} [properties] - the optional properties to be extended by the created object\n * @return {Object} The newly created object.\n * @private\n */\n function createObject(prototype, properties) {\n var result;\n /* istanbul ignore next */\n if (typeof Object.create === 'function') {\n result = Object.create(prototype);\n } else {\n Constructor.prototype = prototype;\n result = new Constructor();\n Constructor.prototype = null;\n }\n \n if (properties) {\n extendObject(true, result, properties);\n }\n \n return result;\n }\n \n /**\n * Extends the constructor to which this method is associated with the prototype and/or\n * statics provided.\n *\n * If name is provided, it will be used as the class name and can be accessed via a special\n * class_ property on the child constructor, otherwise the class name of the super constructor will be used\n * instead. The class name may also be used string representation for instances of the child constructor (via\n * toString), but this is not applicable to the lite version of Nevis.\n *\n * If constructor is provided, it will be used as the constructor for the child, otherwise a simple\n * constructor which only calls the super constructor will be used instead.\n *\n * The super constructor can be accessed via a special super_ property on the child constructor.\n *\n * @param {string} [name=this.class_] - the class name to be used for the child constructor\n * @param {Function} [constructor] - the constructor for the child\n * @param {Object} [prototype] - the prototype properties to be defined for the child\n * @param {Object} [statics] - the static properties to be defined for the child\n * @return {Function} The child constructor provided or the one created if none was given.\n * @public\n */\n function extend(name, constructor, prototype, statics) {\n var superConstructor = this;\n \n if (typeof name !== 'string') {\n statics = prototype;\n prototype = constructor;\n constructor = name;\n name = null;\n }\n \n if (typeof constructor !== 'function') {\n statics = prototype;\n prototype = constructor;\n constructor = function() {\n return superConstructor.apply(this, arguments);\n };\n }\n \n extendObject(false, constructor, superConstructor, statics);\n \n constructor.prototype = createObject(superConstructor.prototype, prototype);\n constructor.prototype.constructor = constructor;\n \n constructor.class_ = name || superConstructor.class_;\n constructor.super_ = superConstructor;\n \n return constructor;\n }\n \n /**\n * Extends the specified target object with the properties in each of the sources provided.\n *\n * if any source is null it will be ignored.\n *\n * @param {boolean} own - true to only copy own properties from sources onto\n * target; otherwise false\n * @param {Object} target - the target object which should be extended\n * @param {...Object} [sources] - the source objects whose properties are to be copied onto target\n * @return {void}\n * @private\n */\n function extendObject(own, target, sources) {\n sources = slice.call(arguments, 2);\n \n var property;\n var source;\n \n for (var i = 0, length = sources.length; i < length; i++) {\n source = sources[i];\n \n for (property in source) {\n if (!own || hasOwnProperty.call(source, property)) {\n target[property] = source[property];\n }\n }\n }\n }\n \n var extend_1 = extend;\n \n /**\n * The base class from which all others should extend.\n *\n * @public\n * @constructor\n */\n function Nevis() {}\n Nevis.class_ = 'Nevis';\n Nevis.super_ = Object;\n \n /**\n * Extends the constructor to which this method is associated with the prototype and/or\n * statics provided.\n *\n * If name is provided, it will be used as the class name and can be accessed via a special\n * class_ property on the child constructor, otherwise the class name of the super constructor will be used\n * instead. The class name may also be used string representation for instances of the child constructor (via\n * toString), but this is not applicable to the lite version of Nevis.\n *\n * If constructor is provided, it will be used as the constructor for the child, otherwise a simple\n * constructor which only calls the super constructor will be used instead.\n *\n * The super constructor can be accessed via a special super_ property on the child constructor.\n *\n * @param {string} [name=this.class_] - the class name to be used for the child constructor\n * @param {Function} [constructor] - the constructor for the child\n * @param {Object} [prototype] - the prototype properties to be defined for the child\n * @param {Object} [statics] - the static properties to be defined for the child\n * @return {Function} The child constructor provided or the one created if none was given.\n * @public\n * @static\n * @memberof Nevis\n */\n Nevis.extend = extend_1;\n \n var nevis = Nevis;\n \n var lite = nevis;\n \n /**\n * Responsible for rendering a QR code {@link Frame} on a specific type of element.\n *\n * A renderer may be dependant on the rendering of another element, so the ordering of their execution is important.\n *\n * The rendering of a element can be deferred by disabling the renderer initially, however, any attempt get the element\n * from the renderer will result in it being immediately enabled and the element being rendered.\n *\n * @param {QRious} qrious - the {@link QRious} instance to be used\n * @param {*} element - the element onto which the QR code is to be rendered\n * @param {boolean} [enabled] - true this {@link Renderer} is enabled; otherwise false.\n * @public\n * @class\n * @extends Nevis\n */\n var Renderer = lite.extend(function(qrious, element, enabled) {\n /**\n * The {@link QRious} instance.\n *\n * @protected\n * @type {QRious}\n * @memberof Renderer#\n */\n this.qrious = qrious;\n \n /**\n * The element onto which this {@link Renderer} is rendering the QR code.\n *\n * @protected\n * @type {*}\n * @memberof Renderer#\n */\n this.element = element;\n this.element.qrious = qrious;\n \n /**\n * Whether this {@link Renderer} is enabled.\n *\n * @protected\n * @type {boolean}\n * @memberof Renderer#\n */\n this.enabled = Boolean(enabled);\n }, {\n \n /**\n * Draws the specified QR code frame on the underlying element.\n *\n * Implementations of {@link Renderer} must override this method with their own specific logic.\n *\n * @param {Frame} frame - the {@link Frame} to be drawn\n * @return {void}\n * @protected\n * @abstract\n * @memberof Renderer#\n */\n draw: function(frame) {},\n \n /**\n * Returns the element onto which this {@link Renderer} is rendering the QR code.\n *\n * If this method is called while this {@link Renderer} is disabled, it will be immediately enabled and rendered\n * before the element is returned.\n *\n * @return {*} The element.\n * @public\n * @memberof Renderer#\n */\n getElement: function() {\n if (!this.enabled) {\n this.enabled = true;\n this.render();\n }\n \n return this.element;\n },\n \n /**\n * Calculates the size (in pixel units) to represent an individual module within the QR code based on the\n * frame provided.\n *\n * Any configured padding will be excluded from the returned size.\n *\n * The returned value will be at least one, even in cases where the size of the QR code does not fit its contents.\n * This is done so that the inevitable clipping is handled more gracefully since this way at least something is\n * displayed instead of just a blank space filled by the background color.\n *\n * @param {Frame} frame - the {@link Frame} from which the module size is to be derived\n * @return {number} The pixel size for each module in the QR code which will be no less than one.\n * @protected\n * @memberof Renderer#\n */\n getModuleSize: function(frame) {\n var qrious = this.qrious;\n var padding = qrious.padding || 0;\n var pixels = Math.floor((qrious.size - (padding * 2)) / frame.width);\n \n return Math.max(1, pixels);\n },\n\n /**\n * Renders a QR code on the underlying element based on the frame provided.\n *\n * @param {Frame} frame - the {@link Frame} to be rendered\n * @return {void}\n * @public\n * @memberof Renderer#\n */\n render: function(frame) {\n if (this.enabled) {\n this.resize();\n this.reset();\n this.draw(frame);\n }\n },\n \n /**\n * Resets the underlying element, effectively clearing any previously rendered QR code.\n *\n * Implementations of {@link Renderer} must override this method with their own specific logic.\n *\n * @return {void}\n * @protected\n * @abstract\n * @memberof Renderer#\n */\n reset: function() {},\n \n /**\n * Ensures that the size of the underlying element matches that defined on the associated {@link QRious} instance.\n *\n * Implementations of {@link Renderer} must override this method with their own specific logic.\n *\n * @return {void}\n * @protected\n * @abstract\n * @memberof Renderer#\n */\n resize: function() {}\n \n });\n \n var Renderer_1 = Renderer;\n \n /**\n * An implementation of {@link Renderer} for working with canvas elements.\n *\n * @public\n * @class\n * @extends Renderer\n */\n var CanvasRenderer = Renderer_1.extend({\n \n /**\n * @override\n */\n draw: function(frame) {\n var i, j;\n var qrious = this.qrious;\n var moduleSize = this.getModuleSize(frame);\n var offset = parseInt((this.element.width-(frame.width * moduleSize)) / 2);\n var context = this.element.getContext('2d');\n \n context.fillStyle = qrious.foreground;\n context.globalAlpha = qrious.foregroundAlpha;\n \n for (i = 0; i < frame.width; i++) {\n for (j = 0; j < frame.width; j++) {\n if (frame.buffer[(j * frame.width) + i]) {\n context.fillRect((moduleSize * i) + offset, (moduleSize * j) + offset, moduleSize, moduleSize);\n }\n }\n }\n },\n \n /**\n * @override\n */\n reset: function() {\n var qrious = this.qrious;\n var context = this.element.getContext('2d');\n var size = qrious.size;\n \n context.lineWidth = 1;\n context.clearRect(0, 0, size, size);\n context.fillStyle = qrious.background;\n context.globalAlpha = qrious.backgroundAlpha;\n context.fillRect(0, 0, size, size);\n },\n \n /**\n * @override\n */\n resize: function() {\n var element = this.element;\n \n element.width = element.height = this.qrious.size;\n }\n \n });\n \n var CanvasRenderer_1 = CanvasRenderer;\n \n /* eslint no-multi-spaces: \"off\" */\n \n \n \n /**\n * Contains alignment pattern information.\n *\n * @public\n * @class\n * @extends Nevis\n */\n var Alignment = lite.extend(null, {\n \n /**\n * The alignment pattern block.\n *\n * @public\n * @static\n * @type {number[]}\n * @memberof Alignment\n */\n BLOCK: [\n 0, 11, 15, 19, 23, 27, 31,\n 16, 18, 20, 22, 24, 26, 28, 20, 22, 24, 24, 26, 28, 28, 22, 24, 24,\n 26, 26, 28, 28, 24, 24, 26, 26, 26, 28, 28, 24, 26, 26, 26, 28, 28\n ]\n \n });\n \n var Alignment_1 = Alignment;\n \n /* eslint no-multi-spaces: \"off\" */\n \n \n \n /**\n * Contains error correction information.\n *\n * @public\n * @class\n * @extends Nevis\n */\n var ErrorCorrection = lite.extend(null, {\n \n /**\n * The error correction blocks.\n *\n * There are four elements per version. The first two indicate the number of blocks, then the data width, and finally\n * the ECC width.\n *\n * @public\n * @static\n * @type {number[]}\n * @memberof ErrorCorrection\n */\n BLOCKS: [\n 1, 0, 19, 7, 1, 0, 16, 10, 1, 0, 13, 13, 1, 0, 9, 17,\n 1, 0, 34, 10, 1, 0, 28, 16, 1, 0, 22, 22, 1, 0, 16, 28,\n 1, 0, 55, 15, 1, 0, 44, 26, 2, 0, 17, 18, 2, 0, 13, 22,\n 1, 0, 80, 20, 2, 0, 32, 18, 2, 0, 24, 26, 4, 0, 9, 16,\n 1, 0, 108, 26, 2, 0, 43, 24, 2, 2, 15, 18, 2, 2, 11, 22,\n 2, 0, 68, 18, 4, 0, 27, 16, 4, 0, 19, 24, 4, 0, 15, 28,\n 2, 0, 78, 20, 4, 0, 31, 18, 2, 4, 14, 18, 4, 1, 13, 26,\n 2, 0, 97, 24, 2, 2, 38, 22, 4, 2, 18, 22, 4, 2, 14, 26,\n 2, 0, 116, 30, 3, 2, 36, 22, 4, 4, 16, 20, 4, 4, 12, 24,\n 2, 2, 68, 18, 4, 1, 43, 26, 6, 2, 19, 24, 6, 2, 15, 28,\n 4, 0, 81, 20, 1, 4, 50, 30, 4, 4, 22, 28, 3, 8, 12, 24,\n 2, 2, 92, 24, 6, 2, 36, 22, 4, 6, 20, 26, 7, 4, 14, 28,\n 4, 0, 107, 26, 8, 1, 37, 22, 8, 4, 20, 24, 12, 4, 11, 22,\n 3, 1, 115, 30, 4, 5, 40, 24, 11, 5, 16, 20, 11, 5, 12, 24,\n 5, 1, 87, 22, 5, 5, 41, 24, 5, 7, 24, 30, 11, 7, 12, 24,\n 5, 1, 98, 24, 7, 3, 45, 28, 15, 2, 19, 24, 3, 13, 15, 30,\n 1, 5, 107, 28, 10, 1, 46, 28, 1, 15, 22, 28, 2, 17, 14, 28,\n 5, 1, 120, 30, 9, 4, 43, 26, 17, 1, 22, 28, 2, 19, 14, 28,\n 3, 4, 113, 28, 3, 11, 44, 26, 17, 4, 21, 26, 9, 16, 13, 26,\n 3, 5, 107, 28, 3, 13, 41, 26, 15, 5, 24, 30, 15, 10, 15, 28,\n 4, 4, 116, 28, 17, 0, 42, 26, 17, 6, 22, 28, 19, 6, 16, 30,\n 2, 7, 111, 28, 17, 0, 46, 28, 7, 16, 24, 30, 34, 0, 13, 24,\n 4, 5, 121, 30, 4, 14, 47, 28, 11, 14, 24, 30, 16, 14, 15, 30,\n 6, 4, 117, 30, 6, 14, 45, 28, 11, 16, 24, 30, 30, 2, 16, 30,\n 8, 4, 106, 26, 8, 13, 47, 28, 7, 22, 24, 30, 22, 13, 15, 30,\n 10, 2, 114, 28, 19, 4, 46, 28, 28, 6, 22, 28, 33, 4, 16, 30,\n 8, 4, 122, 30, 22, 3, 45, 28, 8, 26, 23, 30, 12, 28, 15, 30,\n 3, 10, 117, 30, 3, 23, 45, 28, 4, 31, 24, 30, 11, 31, 15, 30,\n 7, 7, 116, 30, 21, 7, 45, 28, 1, 37, 23, 30, 19, 26, 15, 30,\n 5, 10, 115, 30, 19, 10, 47, 28, 15, 25, 24, 30, 23, 25, 15, 30,\n 13, 3, 115, 30, 2, 29, 46, 28, 42, 1, 24, 30, 23, 28, 15, 30,\n 17, 0, 115, 30, 10, 23, 46, 28, 10, 35, 24, 30, 19, 35, 15, 30,\n 17, 1, 115, 30, 14, 21, 46, 28, 29, 19, 24, 30, 11, 46, 15, 30,\n 13, 6, 115, 30, 14, 23, 46, 28, 44, 7, 24, 30, 59, 1, 16, 30,\n 12, 7, 121, 30, 12, 26, 47, 28, 39, 14, 24, 30, 22, 41, 15, 30,\n 6, 14, 121, 30, 6, 34, 47, 28, 46, 10, 24, 30, 2, 64, 15, 30,\n 17, 4, 122, 30, 29, 14, 46, 28, 49, 10, 24, 30, 24, 46, 15, 30,\n 4, 18, 122, 30, 13, 32, 46, 28, 48, 14, 24, 30, 42, 32, 15, 30,\n 20, 4, 117, 30, 40, 7, 47, 28, 43, 22, 24, 30, 10, 67, 15, 30,\n 19, 6, 118, 30, 18, 31, 47, 28, 34, 34, 24, 30, 20, 61, 15, 30\n ],\n \n /**\n * The final format bits with mask (level << 3 | mask).\n *\n * @public\n * @static\n * @type {number[]}\n * @memberof ErrorCorrection\n */\n FINAL_FORMAT: [\n // L\n 0x77c4, 0x72f3, 0x7daa, 0x789d, 0x662f, 0x6318, 0x6c41, 0x6976,\n // M\n 0x5412, 0x5125, 0x5e7c, 0x5b4b, 0x45f9, 0x40ce, 0x4f97, 0x4aa0,\n // Q\n 0x355f, 0x3068, 0x3f31, 0x3a06, 0x24b4, 0x2183, 0x2eda, 0x2bed,\n // H\n 0x1689, 0x13be, 0x1ce7, 0x19d0, 0x0762, 0x0255, 0x0d0c, 0x083b\n ],\n \n /**\n * A map of human-readable ECC levels.\n *\n * @public\n * @static\n * @type {Object.}\n * @memberof ErrorCorrection\n */\n LEVELS: {\n L: 1,\n M: 2,\n Q: 3,\n H: 4\n }\n \n });\n \n var ErrorCorrection_1 = ErrorCorrection;\n \n /**\n * Contains Galois field information.\n *\n * @public\n * @class\n * @extends Nevis\n */\n var Galois = lite.extend(null, {\n \n /**\n * The Galois field exponent table.\n *\n * @public\n * @static\n * @type {number[]}\n * @memberof Galois\n */\n EXPONENT: [\n 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1d, 0x3a, 0x74, 0xe8, 0xcd, 0x87, 0x13, 0x26,\n 0x4c, 0x98, 0x2d, 0x5a, 0xb4, 0x75, 0xea, 0xc9, 0x8f, 0x03, 0x06, 0x0c, 0x18, 0x30, 0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 0x59, 0xb2, 0x79, 0xf2, 0xf9, 0xef, 0xc3, 0x9b, 0x2b, 0x56, 0xac, 0x45, 0x8a, 0x09,\n 0x12, 0x24, 0x48, 0x90, 0x3d, 0x7a, 0xf4, 0xf5, 0xf7, 0xf3, 0xfb, 0xeb, 0xcb, 0x8b, 0x0b, 0x16,\n 0x2c, 0x58, 0xb0, 0x7d, 0xfa, 0xe9, 0xcf, 0x83, 0x1b, 0x36, 0x6c, 0xd8, 0xad, 0x47, 0x8e, 0x00\n ],\n \n /**\n * The Galois field log table.\n *\n * @public\n * @static\n * @type {number[]}\n * @memberof Galois\n */\n LOG: [\n 0xff, 0x00, 0x01, 0x19, 0x02, 0x32, 0x1a, 0xc6, 0x03, 0xdf, 0x33, 0xee, 0x1b, 0x68, 0xc7, 0x4b,\n 0x04, 0x64, 0xe0, 0x0e, 0x34, 0x8d, 0xef, 0x81, 0x1c, 0xc1, 0x69, 0xf8, 0xc8, 0x08, 0x4c, 0x71,\n 0x05, 0x8a, 0x65, 0x2f, 0xe1, 0x24, 0x0f, 0x21, 0x35, 0x93, 0x8e, 0xda, 0xf0, 0x12, 0x82, 0x45,\n 0x1d, 0xb5, 0xc2, 0x7d, 0x6a, 0x27, 0xf9, 0xb9, 0xc9, 0x9a, 0x09, 0x78, 0x4d, 0xe4, 0x72, 0xa6,\n 0x06, 0xbf, 0x8b, 0x62, 0x66, 0xdd, 0x30, 0xfd, 0xe2, 0x98, 0x25, 0xb3, 0x10, 0x91, 0x22, 0x88,\n 0x36, 0xd0, 0x94, 0xce, 0x8f, 0x96, 0xdb, 0xbd, 0xf1, 0xd2, 0x13, 0x5c, 0x83, 0x38, 0x46, 0x40,\n 0x1e, 0x42, 0xb6, 0xa3, 0xc3, 0x48, 0x7e, 0x6e, 0x6b, 0x3a, 0x28, 0x54, 0xfa, 0x85, 0xba, 0x3d,\n 0xca, 0x5e, 0x9b, 0x9f, 0x0a, 0x15, 0x79, 0x2b, 0x4e, 0xd4, 0xe5, 0xac, 0x73, 0xf3, 0xa7, 0x57,\n 0x07, 0x70, 0xc0, 0xf7, 0x8c, 0x80, 0x63, 0x0d, 0x67, 0x4a, 0xde, 0xed, 0x31, 0xc5, 0xfe, 0x18,\n 0xe3, 0xa5, 0x99, 0x77, 0x26, 0xb8, 0xb4, 0x7c, 0x11, 0x44, 0x92, 0xd9, 0x23, 0x20, 0x89, 0x2e,\n 0x37, 0x3f, 0xd1, 0x5b, 0x95, 0xbc, 0xcf, 0xcd, 0x90, 0x87, 0x97, 0xb2, 0xdc, 0xfc, 0xbe, 0x61,\n 0xf2, 0x56, 0xd3, 0xab, 0x14, 0x2a, 0x5d, 0x9e, 0x84, 0x3c, 0x39, 0x53, 0x47, 0x6d, 0x41, 0xa2,\n 0x1f, 0x2d, 0x43, 0xd8, 0xb7, 0x7b, 0xa4, 0x76, 0xc4, 0x17, 0x49, 0xec, 0x7f, 0x0c, 0x6f, 0xf6,\n 0x6c, 0xa1, 0x3b, 0x52, 0x29, 0x9d, 0x55, 0xaa, 0xfb, 0x60, 0x86, 0xb1, 0xbb, 0xcc, 0x3e, 0x5a,\n 0xcb, 0x59, 0x5f, 0xb0, 0x9c, 0xa9, 0xa0, 0x51, 0x0b, 0xf5, 0x16, 0xeb, 0x7a, 0x75, 0x2c, 0xd7,\n 0x4f, 0xae, 0xd5, 0xe9, 0xe6, 0xe7, 0xad, 0xe8, 0x74, 0xd6, 0xf4, 0xea, 0xa8, 0x50, 0x58, 0xaf\n ]\n \n });\n \n var Galois_1 = Galois;\n \n /**\n * Contains version pattern information.\n *\n * @public\n * @class\n * @extends Nevis\n */\n var Version = lite.extend(null, {\n \n /**\n * The version pattern block.\n *\n * @public\n * @static\n * @type {number[]}\n * @memberof Version\n */\n BLOCK: [\n 0xc94, 0x5bc, 0xa99, 0x4d3, 0xbf6, 0x762, 0x847, 0x60d, 0x928, 0xb78, 0x45d, 0xa17, 0x532,\n 0x9a6, 0x683, 0x8c9, 0x7ec, 0xec4, 0x1e1, 0xfab, 0x08e, 0xc1a, 0x33f, 0xd75, 0x250, 0x9d5,\n 0x6f0, 0x8ba, 0x79f, 0xb0b, 0x42e, 0xa64, 0x541, 0xc69\n ]\n \n });\n \n var Version_1 = Version;\n \n /**\n * Generates information for a QR code frame based on a specific value to be encoded.\n *\n * @param {Frame~Options} options - the options to be used\n * @public\n * @class\n * @extends Nevis\n */\n var Frame = lite.extend(function(options) {\n var dataBlock, eccBlock, index, neccBlock1, neccBlock2;\n var valueLength = options.value.length;\n \n this._badness = [];\n this._level = ErrorCorrection_1.LEVELS[options.level];\n this._polynomial = [];\n this._value = options.value;\n this._version = 0;\n this._stringBuffer = [];\n \n while (this._version < 40) {\n this._version++;\n \n index = ((this._level - 1) * 4) + ((this._version - 1) * 16);\n \n neccBlock1 = ErrorCorrection_1.BLOCKS[index++];\n neccBlock2 = ErrorCorrection_1.BLOCKS[index++];\n dataBlock = ErrorCorrection_1.BLOCKS[index++];\n eccBlock = ErrorCorrection_1.BLOCKS[index];\n \n index = (dataBlock * (neccBlock1 + neccBlock2)) + neccBlock2 - 3 + (this._version <= 9);\n \n if (valueLength <= index) {\n break;\n }\n }\n \n this._dataBlock = dataBlock;\n this._eccBlock = eccBlock;\n this._neccBlock1 = neccBlock1;\n this._neccBlock2 = neccBlock2;\n \n /**\n * The data width is based on version.\n *\n * @public\n * @type {number}\n * @memberof Frame#\n */\n // FIXME: Ensure that it fits instead of being truncated.\n var width = this.width = 17 + (4 * this._version);\n \n /**\n * The image buffer.\n *\n * @public\n * @type {number[]}\n * @memberof Frame#\n */\n this.buffer = Frame._createArray(width * width);\n \n this._ecc = Frame._createArray(dataBlock + ((dataBlock + eccBlock) * (neccBlock1 + neccBlock2)) + neccBlock2);\n this._mask = Frame._createArray(((width * (width + 1)) + 1) / 2);\n \n this._insertFinders();\n this._insertAlignments();\n \n // Insert single foreground cell.\n this.buffer[8 + (width * (width - 8))] = 1;\n \n this._insertTimingGap();\n this._reverseMask();\n this._insertTimingRowAndColumn();\n this._insertVersion();\n this._syncMask();\n this._convertBitStream(valueLength);\n this._calculatePolynomial();\n this._appendEccToData();\n this._interleaveBlocks();\n this._pack();\n this._finish();\n }, {\n \n _addAlignment: function(x, y) {\n var i;\n var buffer = this.buffer;\n var width = this.width;\n \n buffer[x + (width * y)] = 1;\n \n for (i = -2; i < 2; i++) {\n buffer[x + i + (width * (y - 2))] = 1;\n buffer[x - 2 + (width * (y + i + 1))] = 1;\n buffer[x + 2 + (width * (y + i))] = 1;\n buffer[x + i + 1 + (width * (y + 2))] = 1;\n }\n \n for (i = 0; i < 2; i++) {\n this._setMask(x - 1, y + i);\n this._setMask(x + 1, y - i);\n this._setMask(x - i, y - 1);\n this._setMask(x + i, y + 1);\n }\n },\n \n _appendData: function(data, dataLength, ecc, eccLength) {\n var bit, i, j;\n var polynomial = this._polynomial;\n var stringBuffer = this._stringBuffer;\n \n for (i = 0; i < eccLength; i++) {\n stringBuffer[ecc + i] = 0;\n }\n \n for (i = 0; i < dataLength; i++) {\n bit = Galois_1.LOG[stringBuffer[data + i] ^ stringBuffer[ecc]];\n \n if (bit !== 255) {\n for (j = 1; j < eccLength; j++) {\n stringBuffer[ecc + j - 1] = stringBuffer[ecc + j] ^\n Galois_1.EXPONENT[Frame._modN(bit + polynomial[eccLength - j])];\n }\n } else {\n for (j = ecc; j < ecc + eccLength; j++) {\n stringBuffer[j] = stringBuffer[j + 1];\n }\n }\n \n stringBuffer[ecc + eccLength - 1] = bit === 255 ? 0 : Galois_1.EXPONENT[Frame._modN(bit + polynomial[0])];\n }\n },\n \n _appendEccToData: function() {\n var i;\n var data = 0;\n var dataBlock = this._dataBlock;\n var ecc = this._calculateMaxLength();\n var eccBlock = this._eccBlock;\n \n for (i = 0; i < this._neccBlock1; i++) {\n this._appendData(data, dataBlock, ecc, eccBlock);\n \n data += dataBlock;\n ecc += eccBlock;\n }\n \n for (i = 0; i < this._neccBlock2; i++) {\n this._appendData(data, dataBlock + 1, ecc, eccBlock);\n \n data += dataBlock + 1;\n ecc += eccBlock;\n }\n },\n \n _applyMask: function(mask) {\n var r3x, r3y, x, y;\n var buffer = this.buffer;\n var width = this.width;\n \n switch (mask) {\n case 0:\n for (y = 0; y < width; y++) {\n for (x = 0; x < width; x++) {\n if (!((x + y) & 1) && !this._isMasked(x, y)) {\n buffer[x + (y * width)] ^= 1;\n }\n }\n }\n \n break;\n case 1:\n for (y = 0; y < width; y++) {\n for (x = 0; x < width; x++) {\n if (!(y & 1) && !this._isMasked(x, y)) {\n buffer[x + (y * width)] ^= 1;\n }\n }\n }\n \n break;\n case 2:\n for (y = 0; y < width; y++) {\n for (r3x = 0, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0;\n }\n \n if (!r3x && !this._isMasked(x, y)) {\n buffer[x + (y * width)] ^= 1;\n }\n }\n }\n \n break;\n case 3:\n for (r3y = 0, y = 0; y < width; y++, r3y++) {\n if (r3y === 3) {\n r3y = 0;\n }\n \n for (r3x = r3y, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0;\n }\n \n if (!r3x && !this._isMasked(x, y)) {\n buffer[x + (y * width)] ^= 1;\n }\n }\n }\n \n break;\n case 4:\n for (y = 0; y < width; y++) {\n for (r3x = 0, r3y = (y >> 1) & 1, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0;\n r3y = !r3y;\n }\n \n if (!r3y && !this._isMasked(x, y)) {\n buffer[x + (y * width)] ^= 1;\n }\n }\n }\n \n break;\n case 5:\n for (r3y = 0, y = 0; y < width; y++, r3y++) {\n if (r3y === 3) {\n r3y = 0;\n }\n \n for (r3x = 0, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0;\n }\n \n if (!((x & y & 1) + !(!r3x | !r3y)) && !this._isMasked(x, y)) {\n buffer[x + (y * width)] ^= 1;\n }\n }\n }\n \n break;\n case 6:\n for (r3y = 0, y = 0; y < width; y++, r3y++) {\n if (r3y === 3) {\n r3y = 0;\n }\n \n for (r3x = 0, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0;\n }\n \n if (!((x & y & 1) + (r3x && r3x === r3y) & 1) && !this._isMasked(x, y)) {\n buffer[x + (y * width)] ^= 1;\n }\n }\n }\n \n break;\n case 7:\n for (r3y = 0, y = 0; y < width; y++, r3y++) {\n if (r3y === 3) {\n r3y = 0;\n }\n \n for (r3x = 0, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0;\n }\n \n if (!((r3x && r3x === r3y) + (x + y & 1) & 1) && !this._isMasked(x, y)) {\n buffer[x + (y * width)] ^= 1;\n }\n }\n }\n \n break;\n }\n },\n \n _calculateMaxLength: function() {\n return (this._dataBlock * (this._neccBlock1 + this._neccBlock2)) + this._neccBlock2;\n },\n \n _calculatePolynomial: function() {\n var i, j;\n var eccBlock = this._eccBlock;\n var polynomial = this._polynomial;\n \n polynomial[0] = 1;\n \n for (i = 0; i < eccBlock; i++) {\n polynomial[i + 1] = 1;\n \n for (j = i; j > 0; j--) {\n polynomial[j] = polynomial[j] ? polynomial[j - 1] ^\n Galois_1.EXPONENT[Frame._modN(Galois_1.LOG[polynomial[j]] + i)] : polynomial[j - 1];\n }\n \n polynomial[0] = Galois_1.EXPONENT[Frame._modN(Galois_1.LOG[polynomial[0]] + i)];\n }\n \n // Use logs for generator polynomial to save calculation step.\n for (i = 0; i <= eccBlock; i++) {\n polynomial[i] = Galois_1.LOG[polynomial[i]];\n }\n },\n \n _checkBadness: function() {\n var b, b1, h, x, y;\n var bad = 0;\n var badness = this._badness;\n var buffer = this.buffer;\n var width = this.width;\n \n // Blocks of same colour.\n for (y = 0; y < width - 1; y++) {\n for (x = 0; x < width - 1; x++) {\n // All foreground colour.\n if ((buffer[x + (width * y)] &&\n buffer[x + 1 + (width * y)] &&\n buffer[x + (width * (y + 1))] &&\n buffer[x + 1 + (width * (y + 1))]) ||\n // All background colour.\n !(buffer[x + (width * y)] ||\n buffer[x + 1 + (width * y)] ||\n buffer[x + (width * (y + 1))] ||\n buffer[x + 1 + (width * (y + 1))])) {\n bad += Frame.N2;\n }\n }\n }\n \n var bw = 0;\n \n // X runs.\n for (y = 0; y < width; y++) {\n h = 0;\n \n badness[0] = 0;\n \n for (b = 0, x = 0; x < width; x++) {\n b1 = buffer[x + (width * y)];\n \n if (b === b1) {\n badness[h]++;\n } else {\n badness[++h] = 1;\n }\n \n b = b1;\n bw += b ? 1 : -1;\n }\n \n bad += this._getBadness(h);\n }\n \n if (bw < 0) {\n bw = -bw;\n }\n \n var count = 0;\n var big = bw;\n big += big << 2;\n big <<= 1;\n \n while (big > width * width) {\n big -= width * width;\n count++;\n }\n \n bad += count * Frame.N4;\n \n // Y runs.\n for (x = 0; x < width; x++) {\n h = 0;\n \n badness[0] = 0;\n \n for (b = 0, y = 0; y < width; y++) {\n b1 = buffer[x + (width * y)];\n \n if (b === b1) {\n badness[h]++;\n } else {\n badness[++h] = 1;\n }\n \n b = b1;\n }\n \n bad += this._getBadness(h);\n }\n \n return bad;\n },\n \n _convertBitStream: function(length) {\n var bit, i;\n var ecc = this._ecc;\n var version = this._version;\n \n // Convert string to bit stream. 8-bit data to QR-coded 8-bit data (numeric, alphanumeric, or kanji not supported).\n for (i = 0; i < length; i++) {\n ecc[i] = this._value.charCodeAt(i);\n }\n \n var stringBuffer = this._stringBuffer = ecc.slice();\n var maxLength = this._calculateMaxLength();\n \n if (length >= maxLength - 2) {\n length = maxLength - 2;\n \n if (version > 9) {\n length--;\n }\n }\n \n // Shift and re-pack to insert length prefix.\n var index = length;\n \n if (version > 9) {\n stringBuffer[index + 2] = 0;\n stringBuffer[index + 3] = 0;\n \n while (index--) {\n bit = stringBuffer[index];\n \n stringBuffer[index + 3] |= 255 & (bit << 4);\n stringBuffer[index + 2] = bit >> 4;\n }\n \n stringBuffer[2] |= 255 & (length << 4);\n stringBuffer[1] = length >> 4;\n stringBuffer[0] = 0x40 | (length >> 12);\n } else {\n stringBuffer[index + 1] = 0;\n stringBuffer[index + 2] = 0;\n \n while (index--) {\n bit = stringBuffer[index];\n \n stringBuffer[index + 2] |= 255 & (bit << 4);\n stringBuffer[index + 1] = bit >> 4;\n }\n \n stringBuffer[1] |= 255 & (length << 4);\n stringBuffer[0] = 0x40 | (length >> 4);\n }\n \n // Fill to end with pad pattern.\n index = length + 3 - (version < 10);\n \n while (index < maxLength) {\n stringBuffer[index++] = 0xec;\n stringBuffer[index++] = 0x11;\n }\n },\n \n _getBadness: function(length) {\n var i;\n var badRuns = 0;\n var badness = this._badness;\n \n for (i = 0; i <= length; i++) {\n if (badness[i] >= 5) {\n badRuns += Frame.N1 + badness[i] - 5;\n }\n }\n \n // FBFFFBF as in finder.\n for (i = 3; i < length - 1; i += 2) {\n if (badness[i - 2] === badness[i + 2] &&\n badness[i + 2] === badness[i - 1] &&\n badness[i - 1] === badness[i + 1] &&\n badness[i - 1] * 3 === badness[i] &&\n // Background around the foreground pattern? Not part of the specs.\n (badness[i - 3] === 0 || i + 3 > length ||\n badness[i - 3] * 3 >= badness[i] * 4 ||\n badness[i + 3] * 3 >= badness[i] * 4)) {\n badRuns += Frame.N3;\n }\n }\n \n return badRuns;\n },\n \n _finish: function() {\n // Save pre-mask copy of frame.\n this._stringBuffer = this.buffer.slice();\n \n var currentMask, i;\n var bit = 0;\n var mask = 30000;\n \n /*\n * Using for instead of while since in original Arduino code if an early mask was \"good enough\" it wouldn't try for\n * a better one since they get more complex and take longer.\n */\n for (i = 0; i < 8; i++) {\n // Returns foreground-background imbalance.\n this._applyMask(i);\n \n currentMask = this._checkBadness();\n \n // Is current mask better than previous best?\n if (currentMask < mask) {\n mask = currentMask;\n bit = i;\n }\n \n // Don't increment \"i\" to a void redoing mask.\n if (bit === 7) {\n break;\n }\n \n // Reset for next pass.\n this.buffer = this._stringBuffer.slice();\n }\n \n // Redo best mask as none were \"good enough\" (i.e. last wasn't bit).\n if (bit !== i) {\n this._applyMask(bit);\n }\n \n // Add in final mask/ECC level bytes.\n mask = ErrorCorrection_1.FINAL_FORMAT[bit + (this._level - 1 << 3)];\n \n var buffer = this.buffer;\n var width = this.width;\n \n // Low byte.\n for (i = 0; i < 8; i++, mask >>= 1) {\n if (mask & 1) {\n buffer[width - 1 - i + (width * 8)] = 1;\n \n if (i < 6) {\n buffer[8 + (width * i)] = 1;\n } else {\n buffer[8 + (width * (i + 1))] = 1;\n }\n }\n }\n \n // High byte.\n for (i = 0; i < 7; i++, mask >>= 1) {\n if (mask & 1) {\n buffer[8 + (width * (width - 7 + i))] = 1;\n \n if (i) {\n buffer[6 - i + (width * 8)] = 1;\n } else {\n buffer[7 + (width * 8)] = 1;\n }\n }\n }\n },\n \n _interleaveBlocks: function() {\n var i, j;\n var dataBlock = this._dataBlock;\n var ecc = this._ecc;\n var eccBlock = this._eccBlock;\n var k = 0;\n var maxLength = this._calculateMaxLength();\n var neccBlock1 = this._neccBlock1;\n var neccBlock2 = this._neccBlock2;\n var stringBuffer = this._stringBuffer;\n \n for (i = 0; i < dataBlock; i++) {\n for (j = 0; j < neccBlock1; j++) {\n ecc[k++] = stringBuffer[i + (j * dataBlock)];\n }\n \n for (j = 0; j < neccBlock2; j++) {\n ecc[k++] = stringBuffer[(neccBlock1 * dataBlock) + i + (j * (dataBlock + 1))];\n }\n }\n \n for (j = 0; j < neccBlock2; j++) {\n ecc[k++] = stringBuffer[(neccBlock1 * dataBlock) + i + (j * (dataBlock + 1))];\n }\n \n for (i = 0; i < eccBlock; i++) {\n for (j = 0; j < neccBlock1 + neccBlock2; j++) {\n ecc[k++] = stringBuffer[maxLength + i + (j * eccBlock)];\n }\n }\n \n this._stringBuffer = ecc;\n },\n \n _insertAlignments: function() {\n var i, x, y;\n var version = this._version;\n var width = this.width;\n \n if (version > 1) {\n i = Alignment_1.BLOCK[version];\n y = width - 7;\n \n for (;;) {\n x = width - 7;\n \n while (x > i - 3) {\n this._addAlignment(x, y);\n \n if (x < i) {\n break;\n }\n \n x -= i;\n }\n \n if (y <= i + 9) {\n break;\n }\n \n y -= i;\n \n this._addAlignment(6, y);\n this._addAlignment(y, 6);\n }\n }\n },\n \n _insertFinders: function() {\n var i, j, x, y;\n var buffer = this.buffer;\n var width = this.width;\n \n for (i = 0; i < 3; i++) {\n j = 0;\n y = 0;\n \n if (i === 1) {\n j = width - 7;\n }\n if (i === 2) {\n y = width - 7;\n }\n \n buffer[y + 3 + (width * (j + 3))] = 1;\n \n for (x = 0; x < 6; x++) {\n buffer[y + x + (width * j)] = 1;\n buffer[y + (width * (j + x + 1))] = 1;\n buffer[y + 6 + (width * (j + x))] = 1;\n buffer[y + x + 1 + (width * (j + 6))] = 1;\n }\n \n for (x = 1; x < 5; x++) {\n this._setMask(y + x, j + 1);\n this._setMask(y + 1, j + x + 1);\n this._setMask(y + 5, j + x);\n this._setMask(y + x + 1, j + 5);\n }\n \n for (x = 2; x < 4; x++) {\n buffer[y + x + (width * (j + 2))] = 1;\n buffer[y + 2 + (width * (j + x + 1))] = 1;\n buffer[y + 4 + (width * (j + x))] = 1;\n buffer[y + x + 1 + (width * (j + 4))] = 1;\n }\n }\n },\n \n _insertTimingGap: function() {\n var x, y;\n var width = this.width;\n \n for (y = 0; y < 7; y++) {\n this._setMask(7, y);\n this._setMask(width - 8, y);\n this._setMask(7, y + width - 7);\n }\n \n for (x = 0; x < 8; x++) {\n this._setMask(x, 7);\n this._setMask(x + width - 8, 7);\n this._setMask(x, width - 8);\n }\n },\n \n _insertTimingRowAndColumn: function() {\n var x;\n var buffer = this.buffer;\n var width = this.width;\n \n for (x = 0; x < width - 14; x++) {\n if (x & 1) {\n this._setMask(8 + x, 6);\n this._setMask(6, 8 + x);\n } else {\n buffer[8 + x + (width * 6)] = 1;\n buffer[6 + (width * (8 + x))] = 1;\n }\n }\n },\n \n _insertVersion: function() {\n var i, j, x, y;\n var buffer = this.buffer;\n var version = this._version;\n var width = this.width;\n \n if (version > 6) {\n i = Version_1.BLOCK[version - 7];\n j = 17;\n \n for (x = 0; x < 6; x++) {\n for (y = 0; y < 3; y++, j--) {\n if (1 & (j > 11 ? version >> j - 12 : i >> j)) {\n buffer[5 - x + (width * (2 - y + width - 11))] = 1;\n buffer[2 - y + width - 11 + (width * (5 - x))] = 1;\n } else {\n this._setMask(5 - x, 2 - y + width - 11);\n this._setMask(2 - y + width - 11, 5 - x);\n }\n }\n }\n }\n },\n \n _isMasked: function(x, y) {\n var bit = Frame._getMaskBit(x, y);\n \n return this._mask[bit] === 1;\n },\n \n _pack: function() {\n var bit, i, j;\n var k = 1;\n var v = 1;\n var width = this.width;\n var x = width - 1;\n var y = width - 1;\n \n // Interleaved data and ECC codes.\n var length = ((this._dataBlock + this._eccBlock) * (this._neccBlock1 + this._neccBlock2)) + this._neccBlock2;\n \n for (i = 0; i < length; i++) {\n bit = this._stringBuffer[i];\n \n for (j = 0; j < 8; j++, bit <<= 1) {\n if (0x80 & bit) {\n this.buffer[x + (width * y)] = 1;\n }\n \n // Find next fill position.\n do {\n if (v) {\n x--;\n } else {\n x++;\n \n if (k) {\n if (y !== 0) {\n y--;\n } else {\n x -= 2;\n k = !k;\n \n if (x === 6) {\n x--;\n y = 9;\n }\n }\n } else if (y !== width - 1) {\n y++;\n } else {\n x -= 2;\n k = !k;\n \n if (x === 6) {\n x--;\n y -= 8;\n }\n }\n }\n \n v = !v;\n } while (this._isMasked(x, y));\n }\n }\n },\n \n _reverseMask: function() {\n var x, y;\n var width = this.width;\n \n for (x = 0; x < 9; x++) {\n this._setMask(x, 8);\n }\n \n for (x = 0; x < 8; x++) {\n this._setMask(x + width - 8, 8);\n this._setMask(8, x);\n }\n \n for (y = 0; y < 7; y++) {\n this._setMask(8, y + width - 7);\n }\n },\n \n _setMask: function(x, y) {\n var bit = Frame._getMaskBit(x, y);\n \n this._mask[bit] = 1;\n },\n \n _syncMask: function() {\n var x, y;\n var width = this.width;\n \n for (y = 0; y < width; y++) {\n for (x = 0; x <= y; x++) {\n if (this.buffer[x + (width * y)]) {\n this._setMask(x, y);\n }\n }\n }\n }\n \n }, {\n \n _createArray: function(length) {\n var i;\n var array = [];\n \n for (i = 0; i < length; i++) {\n array[i] = 0;\n }\n \n return array;\n },\n \n _getMaskBit: function(x, y) {\n var bit;\n \n if (x > y) {\n bit = x;\n x = y;\n y = bit;\n }\n \n bit = y;\n bit += y * y;\n bit >>= 1;\n bit += x;\n \n return bit;\n },\n \n _modN: function(x) {\n while (x >= 255) {\n x -= 255;\n x = (x >> 8) + (x & 255);\n }\n \n return x;\n },\n \n // *Badness* coefficients.\n N1: 3,\n N2: 3,\n N3: 40,\n N4: 10\n \n });\n \n var Frame_1 = Frame;\n \n /**\n * The options used by {@link Frame}.\n *\n * @typedef {Object} Frame~Options\n * @property {string} level - The ECC level to be used.\n * @property {string} value - The value to be encoded.\n */\n \n /**\n * An implementation of {@link Renderer} for working with img elements.\n *\n * This depends on {@link CanvasRenderer} being executed first as this implementation simply applies the data URL from\n * the rendered canvas element as the src for the img element being rendered.\n *\n * @public\n * @class\n * @extends Renderer\n */\n var ImageRenderer = Renderer_1.extend({\n \n /**\n * @override\n */\n draw: function() {\n this.element.src = this.qrious.toDataURL();\n },\n \n /**\n * @override\n */\n reset: function() {\n this.element.src = '';\n },\n \n /**\n * @override\n */\n resize: function() {\n var element = this.element;\n \n element.width = element.height = this.qrious.size;\n }\n \n });\n \n var ImageRenderer_1 = ImageRenderer;\n \n /**\n * Defines an available option while also configuring how values are applied to the target object.\n *\n * Optionally, a default value can be specified as well a value transformer for greater control over how the option\n * value is applied.\n *\n * If no value transformer is specified, then any specified option will be applied directly. All values are maintained\n * on the target object itself as a field using the option name prefixed with a single underscore.\n *\n * When an option is specified as modifiable, the {@link OptionManager} will be required to include a setter for the\n * property that is defined on the target object that uses the option name.\n *\n * @param {string} name - the name to be used\n * @param {boolean} [modifiable] - true if the property defined on target objects should include a setter;\n * otherwise false\n * @param {*} [defaultValue] - the default value to be used\n * @param {Option~ValueTransformer} [valueTransformer] - the value transformer to be used\n * @public\n * @class\n * @extends Nevis\n */\n var Option = lite.extend(function(name, modifiable, defaultValue, valueTransformer) {\n /**\n * The name for this {@link Option}.\n *\n * @public\n * @type {string}\n * @memberof Option#\n */\n this.name = name;\n \n /**\n * Whether a setter should be included on the property defined on target objects for this {@link Option}.\n *\n * @public\n * @type {boolean}\n * @memberof Option#\n */\n this.modifiable = Boolean(modifiable);\n \n /**\n * The default value for this {@link Option}.\n *\n * @public\n * @type {*}\n * @memberof Option#\n */\n this.defaultValue = defaultValue;\n \n this._valueTransformer = valueTransformer;\n }, {\n \n /**\n * Transforms the specified value so that it can be applied for this {@link Option}.\n *\n * If a value transformer has been specified for this {@link Option}, it will be called upon to transform\n * value. Otherwise, value will be returned directly.\n *\n * @param {*} value - the value to be transformed\n * @return {*} The transformed value or value if no value transformer is specified.\n * @public\n * @memberof Option#\n */\n transform: function(value) {\n var transformer = this._valueTransformer;\n if (typeof transformer === 'function') {\n return transformer(value, this);\n }\n \n return value;\n }\n \n });\n \n var Option_1 = Option;\n \n /**\n * Returns a transformed value for the specified value to be applied for the option provided.\n *\n * @callback Option~ValueTransformer\n * @param {*} value - the value to be transformed\n * @param {Option} option - the {@link Option} for which value is being transformed\n * @return {*} The transform value.\n */\n \n /**\n * Contains utility methods that are useful throughout the library.\n *\n * @public\n * @class\n * @extends Nevis\n */\n var Utilities = lite.extend(null, {\n \n /**\n * Returns the absolute value of a given number.\n *\n * This method is simply a convenient shorthand for Math.abs while ensuring that nulls are returned as\n * null instead of zero.\n *\n * @param {number} value - the number whose absolute value is to be returned\n * @return {number} The absolute value of value or null if value is\n * null.\n * @public\n * @static\n * @memberof Utilities\n */\n abs: function(value) {\n return value != null ? Math.abs(value) : null;\n },\n \n /**\n * Returns whether the specified object has a property with the specified name as an own\n * (not inherited) property.\n *\n * @param {Object} object - the object on which the property is to be checked\n * @param {string} name - the name of the property to be checked\n * @return {boolean} true if object has an own property with name.\n * @public\n * @static\n * @memberof Utilities\n */\n hasOwn: function(object, name) {\n return Object.prototype.hasOwnProperty.call(object, name);\n },\n \n /**\n * A non-operation method that does absolutely nothing.\n *\n * @return {void}\n * @public\n * @static\n * @memberof Utilities\n */\n noop: function() {},\n \n /**\n * Transforms the specified string to upper case while remaining null-safe.\n *\n * @param {string} string - the string to be transformed to upper case\n * @return {string} string transformed to upper case if string is not null.\n * @public\n * @static\n * @memberof Utilities\n */\n toUpperCase: function(string) {\n return string != null ? string.toUpperCase() : null;\n }\n \n });\n \n var Utilities_1 = Utilities;\n \n /**\n * Manages multiple {@link Option} instances that are intended to be used by multiple implementations.\n *\n * Although the option definitions are shared between targets, the values are maintained on the targets themselves.\n *\n * @param {Option[]} options - the options to be used\n * @public\n * @class\n * @extends Nevis\n */\n var OptionManager = lite.extend(function(options) {\n /**\n * The available options for this {@link OptionManager}.\n *\n * @public\n * @type {Object.}\n * @memberof OptionManager#\n */\n this.options = {};\n \n options.forEach(function(option) {\n this.options[option.name] = option;\n }, this);\n }, {\n \n /**\n * Returns whether an option with the specified name is available.\n *\n * @param {string} name - the name of the {@link Option} whose existence is to be checked\n * @return {boolean} true if an {@link Option} exists with name; otherwise\n * false.\n * @public\n * @memberof OptionManager#\n */\n exists: function(name) {\n return this.options[name] != null;\n },\n \n /**\n * Returns the value of the option with the specified name on the target object provided.\n *\n * @param {string} name - the name of the {@link Option} whose value on target is to be returned\n * @param {Object} target - the object from which the value of the named {@link Option} is to be returned\n * @return {*} The value of the {@link Option} with name on target.\n * @public\n * @memberof OptionManager#\n */\n get: function(name, target) {\n return OptionManager._get(this.options[name], target);\n },\n \n /**\n * Returns a copy of all of the available options on the target object provided.\n *\n * @param {Object} target - the object from which the option name/value pairs are to be returned\n * @return {Object.} A hash containing the name/value pairs of all options on target.\n * @public\n * @memberof OptionManager#\n */\n getAll: function(target) {\n var name;\n var options = this.options;\n var result = {};\n \n for (name in options) {\n if (Utilities_1.hasOwn(options, name)) {\n result[name] = OptionManager._get(options[name], target);\n }\n }\n \n return result;\n },\n \n /**\n * Initializes the available options for the target object provided and then applies the initial values\n * within the speciifed options.\n *\n * This method will throw an error if any of the names within options does not match an available option.\n *\n * This involves setting the default values and defining properties for all of the available options on\n * target before finally calling {@link OptionMananger#setAll} with options and\n * target. Any options that are configured to be modifiable will have a setter included in their defined\n * property that will allow its corresponding value to be modified.\n *\n * If a change handler is specified, it will be called whenever the value changes on target for a\n * modifiable option, but only when done so via the defined property's setter.\n *\n * @param {Object.} options - the name/value pairs of the initial options to be set\n * @param {Object} target - the object on which the options are to be initialized\n * @param {Function} [changeHandler] - the function to be called whenever the value of an modifiable option changes on\n * target\n * @return {void}\n * @throws {Error} If options contains an invalid option name.\n * @public\n * @memberof OptionManager#\n */\n init: function(options, target, changeHandler) {\n if (typeof changeHandler !== 'function') {\n changeHandler = Utilities_1.noop;\n }\n \n var name, option;\n \n for (name in this.options) {\n if (Utilities_1.hasOwn(this.options, name)) {\n option = this.options[name];\n \n OptionManager._set(option, option.defaultValue, target);\n OptionManager._createAccessor(option, target, changeHandler);\n }\n }\n \n this._setAll(options, target, true);\n },\n \n /**\n * Sets the value of the option with the specified name on the target object provided to\n * value.\n *\n * This method will throw an error if name does not match an available option or matches an option that\n * cannot be modified.\n *\n * If value is null and the {@link Option} has a default value configured, then that default\n * value will be used instead. If the {@link Option} also has a value transformer configured, it will be used to\n * transform whichever value was determined to be used.\n *\n * This method returns whether the value of the underlying field on target was changed as a result.\n *\n * @param {string} name - the name of the {@link Option} whose value is to be set\n * @param {*} value - the value to be set for the named {@link Option} on target\n * @param {Object} target - the object on which value is to be set for the named {@link Option}\n * @return {boolean} true if the underlying field on target was changed; otherwise\n * false.\n * @throws {Error} If name is invalid or is for an option that cannot be modified.\n * @public\n * @memberof OptionManager#\n */\n set: function(name, value, target) {\n return this._set(name, value, target);\n },\n \n /**\n * Sets all of the specified options on the target object provided to their corresponding\n * values.\n *\n * This method will throw an error if any of the names within options does not match an available option\n * or matches an option that cannot be modified.\n *\n * If any value within options is null and the corresponding {@link Option} has a default\n * value configured, then that default value will be used instead. If an {@link Option} also has a value transformer\n * configured, it will be used to transform whichever value was determined to be used.\n *\n * This method returns whether the value for any of the underlying fields on target were changed as a\n * result.\n *\n * @param {Object.} options - the name/value pairs of options to be set\n * @param {Object} target - the object on which the options are to be set\n * @return {boolean} true if any of the underlying fields on target were changed; otherwise\n * false.\n * @throws {Error} If options contains an invalid option name or an option that cannot be modiifed.\n * @public\n * @memberof OptionManager#\n */\n setAll: function(options, target) {\n return this._setAll(options, target);\n },\n \n _set: function(name, value, target, allowUnmodifiable) {\n var option = this.options[name];\n if (!option) {\n throw new Error('Invalid option: ' + name);\n }\n if (!option.modifiable && !allowUnmodifiable) {\n throw new Error('Option cannot be modified: ' + name);\n }\n \n return OptionManager._set(option, value, target);\n },\n \n _setAll: function(options, target, allowUnmodifiable) {\n if (!options) {\n return false;\n }\n \n var name;\n var changed = false;\n \n for (name in options) {\n if (Utilities_1.hasOwn(options, name) && this._set(name, options[name], target, allowUnmodifiable)) {\n changed = true;\n }\n }\n \n return changed;\n }\n \n }, {\n \n _createAccessor: function(option, target, changeHandler) {\n var descriptor = {\n get: function() {\n return OptionManager._get(option, target);\n }\n };\n \n if (option.modifiable) {\n descriptor.set = function(value) {\n if (OptionManager._set(option, value, target)) {\n changeHandler(value, option);\n }\n };\n }\n \n Object.defineProperty(target, option.name, descriptor);\n },\n \n _get: function(option, target) {\n return target['_' + option.name];\n },\n \n _set: function(option, value, target) {\n var fieldName = '_' + option.name;\n var oldValue = target[fieldName];\n var newValue = option.transform(value != null ? value : option.defaultValue);\n \n target[fieldName] = newValue;\n \n return newValue !== oldValue;\n }\n \n });\n \n var OptionManager_1 = OptionManager;\n \n /**\n * Called whenever the value of a modifiable {@link Option} is changed on a target object via the defined property's\n * setter.\n *\n * @callback OptionManager~ChangeHandler\n * @param {*} value - the new value for option on the target object\n * @param {Option} option - the modifable {@link Option} whose value has changed on the target object.\n * @return {void}\n */\n \n /**\n * A basic manager for {@link Service} implementations that are mapped to simple names.\n *\n * @public\n * @class\n * @extends Nevis\n */\n var ServiceManager = lite.extend(function() {\n this._services = {};\n }, {\n \n /**\n * Returns the {@link Service} being managed with the specified name.\n *\n * @param {string} name - the name of the {@link Service} to be returned\n * @return {Service} The {@link Service} is being managed with name.\n * @throws {Error} If no {@link Service} is being managed with name.\n * @public\n * @memberof ServiceManager#\n */\n getService: function(name) {\n var service = this._services[name];\n if (!service) {\n throw new Error('Service is not being managed with name: ' + name);\n }\n \n return service;\n },\n \n /**\n * Sets the {@link Service} implementation to be managed for the specified name to the\n * service provided.\n *\n * @param {string} name - the name of the {@link Service} to be managed with name\n * @param {Service} service - the {@link Service} implementation to be managed\n * @return {void}\n * @throws {Error} If a {@link Service} is already being managed with the same name.\n * @public\n * @memberof ServiceManager#\n */\n setService: function(name, service) {\n if (this._services[name]) {\n throw new Error('Service is already managed with name: ' + name);\n }\n \n if (service) {\n this._services[name] = service;\n }\n }\n \n });\n \n var ServiceManager_1 = ServiceManager;\n \n var optionManager = new OptionManager_1([\n new Option_1('background', true, 'white'),\n new Option_1('backgroundAlpha', true, 1, Utilities_1.abs),\n new Option_1('element'),\n new Option_1('foreground', true, 'black'),\n new Option_1('foregroundAlpha', true, 1, Utilities_1.abs),\n new Option_1('level', true, 'L', Utilities_1.toUpperCase),\n new Option_1('mime', true, 'image/png'),\n new Option_1('padding', true, null, Utilities_1.abs),\n new Option_1('size', true, 100, Utilities_1.abs),\n new Option_1('value', true, '')\n ]);\n var serviceManager = new ServiceManager_1();\n \n /**\n * Enables configuration of a QR code generator which uses HTML5 canvas for rendering.\n *\n * @param {QRious~Options} [options] - the options to be used\n * @throws {Error} If any options are invalid.\n * @public\n * @class\n * @extends Nevis\n */\n var QRious = lite.extend(function(options) {\n optionManager.init(options, this, this.update.bind(this));\n \n var element = optionManager.get('element', this);\n var elementService = serviceManager.getService('element');\n var canvas = element && elementService.isCanvas(element) ? element : elementService.createCanvas();\n var image = element && elementService.isImage(element) ? element : elementService.createImage();\n \n this._canvasRenderer = new CanvasRenderer_1(this, canvas, true);\n this._imageRenderer = new ImageRenderer_1(this, image, image === element);\n \n this.update();\n }, {\n \n /**\n * Returns all of the options configured for this {@link QRious}.\n *\n * Any changes made to the returned object will not be reflected in the options themselves or their corresponding\n * underlying fields.\n *\n * @return {Object.} A copy of the applied options.\n * @public\n * @memberof QRious#\n */\n get: function() {\n return optionManager.getAll(this);\n },\n \n /**\n * Sets all of the specified options and automatically updates this {@link QRious} if any of the\n * underlying fields are changed as a result.\n *\n * This is the preferred method for updating multiple options at one time to avoid unnecessary updates between\n * changes.\n *\n * @param {QRious~Options} options - the options to be set\n * @return {void}\n * @throws {Error} If any options are invalid or cannot be modified.\n * @public\n * @memberof QRious#\n */\n set: function(options) {\n if (optionManager.setAll(options, this)) {\n this.update();\n }\n },\n \n /**\n * Returns the image data URI for the generated QR code using the mime provided.\n *\n * @param {string} [mime] - the MIME type for the image\n * @return {string} The image data URI for the QR code.\n * @public\n * @memberof QRious#\n */\n toDataURL: function(mime) {\n return this.canvas.toDataURL(mime || this.mime);\n },\n \n /**\n * Updates this {@link QRious} by generating a new {@link Frame} and re-rendering the QR code.\n *\n * @return {void}\n * @protected\n * @memberof QRious#\n */\n update: function() {\n var frame = new Frame_1({\n level: this.level,\n value: this.value\n });\n \n this._canvasRenderer.render(frame);\n this._imageRenderer.render(frame);\n }\n \n }, {\n \n /**\n * Configures the service provided to be used by all {@link QRious} instances.\n *\n * @param {Service} service - the {@link Service} to be configured\n * @return {void}\n * @throws {Error} If a {@link Service} has already been configured with the same name.\n * @public\n * @static\n * @memberof QRious\n */\n use: function(service) {\n serviceManager.setService(service.getName(), service);\n }\n \n });\n \n Object.defineProperties(QRious.prototype, {\n \n canvas: {\n /**\n * Returns the canvas element being used to render the QR code for this {@link QRious}.\n *\n * @return {*} The canvas element.\n * @public\n * @memberof QRious#\n * @alias canvas\n */\n get: function() {\n return this._canvasRenderer.getElement();\n }\n },\n \n image: {\n /**\n * Returns the img element being used to render the QR code for this {@link QRious}.\n *\n * @return {*} The img element.\n * @public\n * @memberof QRious#\n * @alias image\n */\n get: function() {\n return this._imageRenderer.getElement();\n }\n }\n \n });\n \n var QRious_1$2 = QRious;\n \n /**\n * The options used by {@link QRious}.\n *\n * @typedef {Object} QRious~Options\n * @property {string} [background=\"white\"] - The background color to be applied to the QR code.\n * @property {number} [backgroundAlpha=1] - The background alpha to be applied to the QR code.\n * @property {*} [element] - The element to be used to render the QR code which may either be an canvas or\n * img. The element(s) will be created if needed.\n * @property {string} [foreground=\"black\"] - The foreground color to be applied to the QR code.\n * @property {number} [foregroundAlpha=1] - The foreground alpha to be applied to the QR code.\n * @property {string} [level=\"L\"] - The error correction level to be applied to the QR code.\n * @property {string} [mime=\"image/png\"] - The MIME type to be used to render the image for the QR code.\n * @property {number} [padding] - The padding for the QR code in pixels.\n * @property {number} [size=100] - The size of the QR code in pixels.\n * @property {string} [value=\"\"] - The value to be encoded within the QR code.\n */\n \n var index = QRious_1$2;\n \n /**\n * Defines a service contract that must be met by all implementations.\n *\n * @public\n * @class\n * @extends Nevis\n */\n var Service = lite.extend({\n \n /**\n * Returns the name of this {@link Service}.\n *\n * @return {string} The service name.\n * @public\n * @abstract\n * @memberof Service#\n */\n getName: function() {}\n \n });\n \n var Service_1 = Service;\n \n /**\n * A service for working with elements.\n *\n * @public\n * @class\n * @extends Service\n */\n var ElementService = Service_1.extend({\n \n /**\n * Creates an instance of a canvas element.\n *\n * Implementations of {@link ElementService} must override this method with their own specific logic.\n *\n * @return {*} The newly created canvas element.\n * @public\n * @abstract\n * @memberof ElementService#\n */\n createCanvas: function() {},\n \n /**\n * Creates an instance of a image element.\n *\n * Implementations of {@link ElementService} must override this method with their own specific logic.\n *\n * @return {*} The newly created image element.\n * @public\n * @abstract\n * @memberof ElementService#\n */\n createImage: function() {},\n \n /**\n * @override\n */\n getName: function() {\n return 'element';\n },\n \n /**\n * Returns whether the specified element is a canvas.\n *\n * Implementations of {@link ElementService} must override this method with their own specific logic.\n *\n * @param {*} element - the element to be checked\n * @return {boolean} true if element is a canvas; otherwise false.\n * @public\n * @abstract\n * @memberof ElementService#\n */\n isCanvas: function(element) {},\n \n /**\n * Returns whether the specified element is an image.\n *\n * Implementations of {@link ElementService} must override this method with their own specific logic.\n *\n * @param {*} element - the element to be checked\n * @return {boolean} true if element is an image; otherwise false.\n * @public\n * @abstract\n * @memberof ElementService#\n */\n isImage: function(element) {}\n \n });\n \n var ElementService_1 = ElementService;\n \n /**\n * An implementation of {@link ElementService} intended for use within a browser environment.\n *\n * @public\n * @class\n * @extends ElementService\n */\n var BrowserElementService = ElementService_1.extend({\n \n /**\n * @override\n */\n createCanvas: function() {\n return document.createElement('canvas');\n },\n \n /**\n * @override\n */\n createImage: function() {\n return document.createElement('img');\n },\n \n /**\n * @override\n */\n isCanvas: function(element) {\n return element instanceof HTMLCanvasElement;\n },\n \n /**\n * @override\n */\n isImage: function(element) {\n return element instanceof HTMLImageElement;\n }\n \n });\n \n var BrowserElementService_1 = BrowserElementService;\n \n index.use(new BrowserElementService_1());\n \n var QRious_1 = index;\n \n return QRious_1;\n \n })));","\n\n{value}","\n\n\n \n\n\n\n\n
\n\t

福强图文

\n
\n\n
\n
\n\n
\n
\n
\n
\n
\n
\n \"\"\n\n
\n
\n

\n\t\t\t\t\t\t\t\t\t{book.description}\n

\n
\n
\n {book.price}\n
\n \n\t\t\t\t\t\t\t\t\t{book.title}\n \n
\n
\n\n\n
\n\n
\n
\n
\n\n
\n
\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n
\n\n\t\t\t
\n\t\t\t\t

点击二维码或者扫描二维码进行支付

\n\t\t\t
\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n
\n\n
\n\n\t\n
\n\n","import App from './App.svelte';\n\nconst app = new App({\n\ttarget: document.body,\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","src_url_equal_anchor","current_component","src_url_equal","element_src","url","document","createElement","href","append","target","node","appendChild","insert","anchor","insertBefore","detach","parentNode","removeChild","element","name","text","data","createTextNode","space","listen","event","handler","options","addEventListener","removeEventListener","attr","attribute","value","removeAttribute","getAttribute","setAttribute","set_data","wholeText","set_input_value","input","set_style","key","important","style","setProperty","set_current_component","component","onMount","Error","get_current_component","$$","on_mount","push","dirty_components","binding_callbacks","render_callbacks","flush_callbacks","resolved_promise","Promise","resolve","update_scheduled","add_render_callback","flushing","seen_callbacks","Set","flush","i","length","update","pop","callback","has","add","clear","fragment","before_update","dirty","p","ctx","after_update","outroing","transition_in","block","local","delete","mount_component","customElement","on_destroy","m","new_on_destroy","map","filter","destroy_component","detaching","d","make_dirty","then","fill","init","instance","create_fragment","not_equal","props","append_styles","parent_component","bound","on_disconnect","context","Map","callbacks","skip_bound","root","ready","ret","rest","hydrate","nodes","Array","from","childNodes","children","l","c","intro","SvelteComponent","$destroy","this","$on","type","index","indexOf","splice","$set","$$props","obj","$$set","keys","module","Constructor","hasOwnProperty","prototype","slice","createObject","properties","result","extendObject","extend","constructor","statics","superConstructor","apply","arguments","class_","super_","own","sources","property","source","call","extend_1","Nevis","lite","Renderer","qrious","enabled","Boolean","draw","frame","getElement","render","getModuleSize","padding","pixels","Math","floor","size","width","max","resize","reset","Renderer_1","CanvasRenderer","j","moduleSize","offset","parseInt","getContext","fillStyle","foreground","globalAlpha","foregroundAlpha","buffer","fillRect","lineWidth","clearRect","background","backgroundAlpha","height","CanvasRenderer_1","Alignment_1","BLOCK","ErrorCorrection_1","BLOCKS","FINAL_FORMAT","LEVELS","L","M","Q","H","Galois_1","EXPONENT","LOG","Version_1","Frame","dataBlock","eccBlock","neccBlock1","neccBlock2","valueLength","_badness","_level","level","_polynomial","_value","_version","_stringBuffer","_dataBlock","_eccBlock","_neccBlock1","_neccBlock2","_createArray","_ecc","_mask","_insertFinders","_insertAlignments","_insertTimingGap","_reverseMask","_insertTimingRowAndColumn","_insertVersion","_syncMask","_convertBitStream","_calculatePolynomial","_appendEccToData","_interleaveBlocks","_pack","_finish","_addAlignment","x","y","_setMask","_appendData","dataLength","ecc","eccLength","bit","polynomial","stringBuffer","_modN","_calculateMaxLength","_applyMask","mask","r3x","r3y","_isMasked","_checkBadness","b1","h","bad","badness","N2","bw","_getBadness","count","big","N4","version","charCodeAt","maxLength","badRuns","N1","N3","currentMask","k","_getMaskBit","v","array","Frame_1","ImageRenderer","src","toDataURL","ImageRenderer_1","Option_1","modifiable","defaultValue","valueTransformer","_valueTransformer","transform","transformer","Utilities_1","abs","hasOwn","object","toUpperCase","string","OptionManager","option","exists","get","_get","getAll","changeHandler","_set","_createAccessor","_setAll","set","setAll","allowUnmodifiable","changed","descriptor","defineProperty","fieldName","oldValue","newValue","OptionManager_1","ServiceManager_1","_services","getService","service","setService","optionManager","serviceManager","QRious","bind","elementService","canvas","isCanvas","createCanvas","image","isImage","createImage","_canvasRenderer","_imageRenderer","mime","use","getName","defineProperties","BrowserElementService","HTMLCanvasElement","HTMLImageElement","BrowserElementService_1","factory","QRcode","QrCode","errorCorrection","color","className","generateQrCode","description","price","title","cover","o","outros","bookListUrl","urlParams","URLSearchParams","window","location","search","books","deepThinkingBook","id","paymentUrl","mgtBook","fuyuPamphlet","tekBizBook","book","disabledEmail","qrcode","enabledClass","email","qrcodeVis","disabledButton","URL","params","searchParams","toString","body"],"mappings":"gCAAA,SAASA,KAgBT,SAASC,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,EAEhF,IAAIE,EAo4BAC,EAn4BJ,SAASC,EAAcC,EAAaC,GAKhC,OAJKJ,IACDA,EAAuBK,SAASC,cAAc,MAElDN,EAAqBO,KAAOH,EACrBD,IAAgBH,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