{"version":3,"file":"ballerine-sdk.umd.cjs","sources":["../../../node_modules/.pnpm/svelte@3.57.0/node_modules/svelte/internal/index.mjs","../../../node_modules/.pnpm/svelte@3.57.0/node_modules/svelte/easing/index.mjs","../../../node_modules/.pnpm/svelte@3.57.0/node_modules/svelte/transition/index.mjs","../../../node_modules/.pnpm/svelte@3.57.0/node_modules/svelte/animate/index.mjs","../../../node_modules/.pnpm/svelte@3.57.0/node_modules/svelte/store/index.mjs","../../../node_modules/.pnpm/@zerodevx+svelte-toast@0.8.2/node_modules/@zerodevx/svelte-toast/src/stores.js","../../../node_modules/.pnpm/svelte@3.57.0/node_modules/svelte/motion/index.mjs","../../../node_modules/.pnpm/@zerodevx+svelte-toast@0.8.2/node_modules/@zerodevx/svelte-toast/src/ToastItem.svelte","../../../node_modules/.pnpm/@zerodevx+svelte-toast@0.8.2/node_modules/@zerodevx/svelte-toast/src/SvelteToast.svelte","../src/lib/utils/check-connection.ts","../src/lib/contexts/configuration/types.ts","../src/lib/configuration/configuration.ts","../src/lib/contexts/configuration/store.ts","../../../packages/common/dist/esm/utils/is-object/is-object.js","../../../packages/common/dist/esm/utils/is-empty-object/is-empty-object.js","../src/lib/utils/string-utils/resolve-string-template.ts","../src/lib/contexts/configuration/getters.ts","../../../node_modules/.pnpm/deepmerge@4.3.1/node_modules/deepmerge/dist/cjs.js","../src/lib/services/merge-service/utils.ts","../../../node_modules/.pnpm/jslib-html5-camera-photo@3.3.4/node_modules/jslib-html5-camera-photo/build/index.js","../src/lib/services/css-manager/constants.ts","../src/lib/services/css-manager/utils.ts","../src/lib/atoms/Button/Button.svelte","../src/lib/atoms/NextStepButton/Loader/Loader.svelte","../src/lib/atoms/NextStepButton/NextStepButton.svelte","../src/lib/atoms/Title/Title.svelte","../src/lib/atoms/Image/Image.svelte","../src/lib/atoms/Paragraph/Paragraph.svelte","../src/lib/atoms/Container/Container.svelte","../src/lib/atoms/IconButton/IconButton.svelte","../src/lib/atoms/ButtonWithIcon/ButtonWithIcon.svelte","../src/lib/atoms/Loader/Loader.svelte","../src/lib/atoms/Photo/Photo.svelte","../src/lib/atoms/CameraButton/CameraButton.svelte","../src/lib/atoms/VideoContainer/VideoContainer.svelte","../src/lib/atoms/ListItem/ListItem.svelte","../src/lib/atoms/FlyingText/FlyingText.svelte","../src/lib/atoms/Overlay/utils.ts","../src/lib/contexts/app-state/types.ts","../src/lib/atoms/Overlay/Overlay.svelte","../src/lib/atoms/IconCloseButton/IconCloseButton.svelte","../src/lib/contexts/flows/hooks.ts","../src/lib/molecules/List/utils.ts","../src/lib/molecules/List/List.svelte","../src/lib/utils/event-service/types.ts","../src/lib/services/flow-event-bus/enums.ts","../src/lib/services/flow-event-bus/flow-event-bus.ts","../src/lib/utils/event-service/constants.ts","../src/lib/utils/event-service/utils.ts","../src/lib/services/preload-service/utils.ts","../src/lib/pages/Welcome.svelte","../src/lib/atoms/Icons/Card.svelte","../src/lib/atoms/Icons/Passport.svelte","../src/lib/atoms/Icons/License.svelte","../src/lib/atoms/Icons/PassportTwo.svelte","../src/lib/atoms/Icons/Voter.svelte","../src/lib/atoms/Icons/Icon.svelte","../../../node_modules/.pnpm/compressorjs@1.2.1/node_modules/compressorjs/dist/compressor.esm.js","../src/lib/utils/photo-utils.ts","../src/lib/hooks/createToggle/createToggle.ts","../src/lib/molecules/DocumentOption/DocumentOption.svelte","../src/lib/services/camera-manager/utils.ts","../src/lib/organisms/DocumentOptions/DocumentOptions.svelte","../src/lib/pages/DocumentSelection.svelte","../src/lib/utils/documents-utils.ts","../src/lib/pages/DocumentStart.svelte","../src/lib/pages/DocumentPhoto.svelte","../src/lib/molecules/NavigationButtons/NavigationButtons.svelte","../src/lib/pages/CheckDocument.svelte","../src/lib/pages/DocumentPhotoBackStart.svelte","../src/lib/pages/DocumentPhotoBack.svelte","../src/lib/pages/CheckDocumentPhotoBack.svelte","../src/lib/services/analytics.ts","../src/lib/pages/Final.svelte","../src/lib/pages/SelfieStart.svelte","../src/lib/utils/is-mobile.ts","../src/lib/pages/Selfie.svelte","../src/lib/pages/CheckSelfie.svelte","../src/lib/services/http/index.ts","../src/lib/utils/api-utils.ts","../src/lib/pages/Loading.svelte","../src/lib/atoms/ErrorText/ErrorText.svelte","../src/lib/pages/Resubmission.svelte","../src/lib/pages/Decline.svelte","../src/lib/pages/ErrorPage.svelte","../src/lib/contexts/navigation/constants.ts","../src/lib/contexts/navigation/hooks.ts","../src/lib/contexts/app-state/stores.ts","../src/lib/contexts/app-state/utils.ts","../src/lib/ui-packs/default/theme.ts","../src/lib/ui-packs/store.ts","../src/lib/ui-packs/types.ts","../src/lib/services/theme-manager/utils.ts","../src/lib/ui-packs/utils.ts","../src/lib/ui-packs/future/theme.ts","../src/lib/ui-packs/index.ts","../src/lib/services/configuration-manager/configuration-manager.ts","../src/lib/contexts/translation/hooks.ts","../src/lib/contexts/translation/T.svelte","../src/Routes.svelte","../src/lib/atoms/MetricsPixel/MetricsPixel.svelte","../src/App.svelte","../src/ConfigurationProvider.svelte","../src/lib/utils/get-config-from-query-params.ts","../src/main.ts"],"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}\n// Adapted from https://github.com/then/is-promise/blob/master/index.js\n// Distributed under MIT License https://github.com/then/is-promise/blob/master/LICENSE\nfunction is_promise(value) {\n    return !!value && (typeof value === 'object' || typeof value === 'function') && 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}\nfunction split_css_unit(value) {\n    const split = typeof value === 'string' && value.match(/^\\s*(-?[\\d.]+)([^\\s]*)\\s*$/);\n    return split ? [parseFloat(split[1]), split[2] || 'px'] : [value, 'px'];\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 <head>\n    let children = target.childNodes;\n    // If target is <head>, 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 of nodes that are claimed in order can be found by\n    * computing the longest increasing subsequence of .claim_order values.\n    *\n    * This algorithm is optimal in generating the least amount of reorder operations\n    * possible.\n    *\n    * Proof:\n    * We know that, given a set of reordering operations, the nodes that do not move\n    * always form an increasing subsequence, since they do not move among each other\n    * meaning that they must be already ordered among each other. Thus, the maximal\n    * set of nodes that do not move form a longest increasing subsequence.\n    */\n    // Compute longest increasing subsequence\n    // m: subsequence length j => index k of smallest value that ends an increasing subsequence of length j\n    const m = new Int32Array(children.length + 1);\n    // Predecessor indices + 1\n    const p = new Int32Array(children.length);\n    m[0] = -1;\n    let longest = 0;\n    for (let i = 0; i < children.length; i++) {\n        const current = children[i].claim_order;\n        // Find the largest subsequence length such that it ends in a value less than our current value\n        // upper_bound returns first greater value, so we subtract one\n        // with fast path for when we are on the current longest subsequence\n        const seqLen = ((longest > 0 && children[m[longest]].claim_order <= current) ? longest + 1 : upper_bound(1, longest, idx => children[m[idx]].claim_order, current)) - 1;\n        p[i] = m[seqLen] + 1;\n        const newLen = seqLen + 1;\n        // We can guarantee that current is the smallest value. Otherwise, we would have generated a longer sequence.\n        m[newLen] = i;\n        longest = Math.max(newLen, longest);\n    }\n    // The longest increasing subsequence of nodes (initially reversed)\n    const lis = [];\n    // The rest of the nodes, nodes that will be moved\n    const toMove = [];\n    let last = children.length - 1;\n    for (let cur = m[longest] + 1; cur != 0; cur = p[cur - 1]) {\n        lis.push(children[cur - 1]);\n        for (; last >= cur; last--) {\n            toMove.push(children[last]);\n        }\n        last--;\n    }\n    for (; last >= 0; last--) {\n        toMove.push(children[last]);\n    }\n    lis.reverse();\n    // We sort the nodes being moved to guarantee that their insertion order matches the claim order\n    toMove.sort((a, b) => a.claim_order - b.claim_order);\n    // Finally, we move the nodes\n    for (let i = 0, j = 0; i < toMove.length; i++) {\n        while (j < lis.length && toMove[i].claim_order >= lis[j].claim_order) {\n            j++;\n        }\n        const anchor = j < lis.length ? lis[j] : null;\n        target.insertBefore(toMove[i], anchor);\n    }\n}\nfunction append(target, node) {\n    target.appendChild(node);\n}\nfunction append_styles(target, style_sheet_id, styles) {\n    const append_styles_to = get_root_for_style(target);\n    if (!append_styles_to.getElementById(style_sheet_id)) {\n        const style = element('style');\n        style.id = style_sheet_id;\n        style.textContent = styles;\n        append_stylesheet(append_styles_to, style);\n    }\n}\nfunction get_root_for_style(node) {\n    if (!node)\n        return document;\n    const root = node.getRootNode ? node.getRootNode() : node.ownerDocument;\n    if (root && root.host) {\n        return root;\n    }\n    return node.ownerDocument;\n}\nfunction append_empty_stylesheet(node) {\n    const style_element = element('style');\n    append_stylesheet(get_root_for_style(node), style_element);\n    return style_element.sheet;\n}\nfunction append_stylesheet(node, style) {\n    append(node.head || node, style);\n    return style.sheet;\n}\nfunction append_hydration(target, node) {\n    if (is_hydrating) {\n        init_hydrate(target);\n        if ((target.actual_end_child === undefined) || ((target.actual_end_child !== null) && (target.actual_end_child.parentNode !== target))) {\n            target.actual_end_child = target.firstChild;\n        }\n        // Skip nodes of undefined ordering\n        while ((target.actual_end_child !== null) && (target.actual_end_child.claim_order === undefined)) {\n            target.actual_end_child = target.actual_end_child.nextSibling;\n        }\n        if (node !== target.actual_end_child) {\n            // We only insert if the ordering of this node should be modified or the parent node is not target\n            if (node.claim_order !== undefined || node.parentNode !== target) {\n                target.insertBefore(node, target.actual_end_child);\n            }\n        }\n        else {\n            target.actual_end_child = node.nextSibling;\n        }\n    }\n    else if (node.parentNode !== target || node.nextSibling !== null) {\n        target.appendChild(node);\n    }\n}\nfunction insert(target, node, anchor) {\n    target.insertBefore(node, anchor || null);\n}\nfunction insert_hydration(target, node, anchor) {\n    if (is_hydrating && !anchor) {\n        append_hydration(target, node);\n    }\n    else if (node.parentNode !== target || node.nextSibling != anchor) {\n        target.insertBefore(node, anchor || null);\n    }\n}\nfunction detach(node) {\n    if (node.parentNode) {\n        node.parentNode.removeChild(node);\n    }\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 stop_immediate_propagation(fn) {\n    return function (event) {\n        event.stopImmediatePropagation();\n        // @ts-ignore\n        return fn.call(this, event);\n    };\n}\nfunction self(fn) {\n    return function (event) {\n        // @ts-ignore\n        if (event.target === this)\n            fn.call(this, event);\n    };\n}\nfunction trusted(fn) {\n    return function (event) {\n        // @ts-ignore\n        if (event.isTrusted)\n            fn.call(this, event);\n    };\n}\nfunction attr(node, attribute, value) {\n    if (value == null)\n        node.removeAttribute(attribute);\n    else if (node.getAttribute(attribute) !== value)\n        node.setAttribute(attribute, value);\n}\nfunction set_attributes(node, attributes) {\n    // @ts-ignore\n    const descriptors = Object.getOwnPropertyDescriptors(node.__proto__);\n    for (const key in attributes) {\n        if (attributes[key] == null) {\n            node.removeAttribute(key);\n        }\n        else if (key === 'style') {\n            node.style.cssText = attributes[key];\n        }\n        else if (key === '__value') {\n            node.value = node[key] = attributes[key];\n        }\n        else if (descriptors[key] && descriptors[key].set) {\n            node[key] = attributes[key];\n        }\n        else {\n            attr(node, key, attributes[key]);\n        }\n    }\n}\nfunction set_svg_attributes(node, attributes) {\n    for (const key in attributes) {\n        attr(node, key, attributes[key]);\n    }\n}\nfunction set_custom_element_data_map(node, data_map) {\n    Object.keys(data_map).forEach((key) => {\n        set_custom_element_data(node, key, data_map[key]);\n    });\n}\nfunction set_custom_element_data(node, prop, value) {\n    if (prop in node) {\n        node[prop] = typeof node[prop] === 'boolean' && value === '' ? true : value;\n    }\n    else {\n        attr(node, prop, value);\n    }\n}\nfunction set_dynamic_element_data(tag) {\n    return (/-/.test(tag)) ? set_custom_element_data_map : set_attributes;\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 init_binding_group(group) {\n    let _inputs;\n    return {\n        /* push */ p(...inputs) {\n            _inputs = inputs;\n            _inputs.forEach(input => group.push(input));\n        },\n        /* remove */ r() {\n            _inputs.forEach(input => group.splice(group.indexOf(input), 1));\n        }\n    };\n}\nfunction init_binding_group_dynamic(group, indexes) {\n    let _group = get_binding_group(group);\n    let _inputs;\n    function get_binding_group(group) {\n        for (let i = 0; i < indexes.length; i++) {\n            group = group[indexes[i]] = group[indexes[i]] || [];\n        }\n        return group;\n    }\n    function push() {\n        _inputs.forEach(input => _group.push(input));\n    }\n    function remove() {\n        _inputs.forEach(input => _group.splice(_group.indexOf(input), 1));\n    }\n    return {\n        /* update */ u(new_indexes) {\n            indexes = new_indexes;\n            const new_group = get_binding_group(group);\n            if (new_group !== _group) {\n                remove();\n                _group = new_group;\n                push();\n            }\n        },\n        /* push */ p(...inputs) {\n            _inputs = inputs;\n            push();\n        },\n        /* remove */ r: remove\n    };\n}\nfunction to_number(value) {\n    return value === '' ? null : +value;\n}\nfunction time_ranges_to_array(ranges) {\n    const array = [];\n    for (let i = 0; i < ranges.length; i += 1) {\n        array.push({ start: ranges.start(i), end: ranges.end(i) });\n    }\n    return array;\n}\nfunction children(element) {\n    return Array.from(element.childNodes);\n}\nfunction init_claim_info(nodes) {\n    if (nodes.claim_info === undefined) {\n        nodes.claim_info = { last_index: 0, total_claimed: 0 };\n    }\n}\nfunction claim_node(nodes, predicate, processNode, createNode, dontUpdateLastIndex = false) {\n    // Try to find nodes in an order such that we lengthen the longest increasing subsequence\n    init_claim_info(nodes);\n    const resultNode = (() => {\n        // We first try to find an element after the previous one\n        for (let i = nodes.claim_info.last_index; i < nodes.length; i++) {\n            const node = nodes[i];\n            if (predicate(node)) {\n                const replacement = processNode(node);\n                if (replacement === undefined) {\n                    nodes.splice(i, 1);\n                }\n                else {\n                    nodes[i] = replacement;\n                }\n                if (!dontUpdateLastIndex) {\n                    nodes.claim_info.last_index = i;\n                }\n                return node;\n            }\n        }\n        // Otherwise, we try to find one before\n        // We iterate in reverse so that we don't go too far back\n        for (let i = nodes.claim_info.last_index - 1; i >= 0; i--) {\n            const node = nodes[i];\n            if (predicate(node)) {\n                const replacement = processNode(node);\n                if (replacement === undefined) {\n                    nodes.splice(i, 1);\n                }\n                else {\n                    nodes[i] = replacement;\n                }\n                if (!dontUpdateLastIndex) {\n                    nodes.claim_info.last_index = i;\n                }\n                else if (replacement === undefined) {\n                    // Since we spliced before the last_index, we decrease it\n                    nodes.claim_info.last_index--;\n                }\n                return node;\n            }\n        }\n        // If we can't find any matching node, we create a new one\n        return createNode();\n    })();\n    resultNode.claim_order = nodes.claim_info.total_claimed;\n    nodes.claim_info.total_claimed += 1;\n    return resultNode;\n}\nfunction claim_element_base(nodes, name, attributes, create_element) {\n    return claim_node(nodes, (node) => node.nodeName === name, (node) => {\n        const remove = [];\n        for (let j = 0; j < node.attributes.length; j++) {\n            const attribute = node.attributes[j];\n            if (!attributes[attribute.name]) {\n                remove.push(attribute.name);\n            }\n        }\n        remove.forEach(v => node.removeAttribute(v));\n        return undefined;\n    }, () => create_element(name));\n}\nfunction claim_element(nodes, name, attributes) {\n    return claim_element_base(nodes, name, attributes, element);\n}\nfunction claim_svg_element(nodes, name, attributes) {\n    return claim_element_base(nodes, name, attributes, svg_element);\n}\nfunction claim_text(nodes, data) {\n    return claim_node(nodes, (node) => node.nodeType === 3, (node) => {\n        const dataStr = '' + data;\n        if (node.data.startsWith(dataStr)) {\n            if (node.data.length !== dataStr.length) {\n                return node.splitText(dataStr.length);\n            }\n        }\n        else {\n            node.data = dataStr;\n        }\n    }, () => text(data), true // Text nodes should not update last index since it is likely not worth it to eliminate an increasing subsequence of actual elements\n    );\n}\nfunction claim_space(nodes) {\n    return claim_text(nodes, ' ');\n}\nfunction find_comment(nodes, text, start) {\n    for (let i = start; i < nodes.length; i += 1) {\n        const node = nodes[i];\n        if (node.nodeType === 8 /* comment node */ && node.textContent.trim() === text) {\n            return i;\n        }\n    }\n    return nodes.length;\n}\nfunction claim_html_tag(nodes, is_svg) {\n    // find html opening tag\n    const start_index = find_comment(nodes, 'HTML_TAG_START', 0);\n    const end_index = find_comment(nodes, 'HTML_TAG_END', start_index);\n    if (start_index === end_index) {\n        return new HtmlTagHydration(undefined, is_svg);\n    }\n    init_claim_info(nodes);\n    const html_tag_nodes = nodes.splice(start_index, end_index - start_index + 1);\n    detach(html_tag_nodes[0]);\n    detach(html_tag_nodes[html_tag_nodes.length - 1]);\n    const claimed_nodes = html_tag_nodes.slice(1, html_tag_nodes.length - 1);\n    for (const n of claimed_nodes) {\n        n.claim_order = nodes.claim_info.total_claimed;\n        nodes.claim_info.total_claimed += 1;\n    }\n    return new HtmlTagHydration(claimed_nodes, is_svg);\n}\nfunction set_data(text, data) {\n    data = '' + data;\n    if (text.wholeText !== data)\n        text.data = data;\n}\nfunction set_input_value(input, value) {\n    input.value = value == null ? '' : value;\n}\nfunction set_input_type(input, type) {\n    try {\n        input.type = type;\n    }\n    catch (e) {\n        // do nothing\n    }\n}\nfunction set_style(node, key, value, important) {\n    if (value === null) {\n        node.style.removeProperty(key);\n    }\n    else {\n        node.style.setProperty(key, value, important ? 'important' : '');\n    }\n}\nfunction select_option(select, value, mounting) {\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    if (!mounting || value !== undefined) {\n        select.selectedIndex = -1; // no option should be selected\n    }\n}\nfunction select_options(select, value) {\n    for (let i = 0; i < select.options.length; i += 1) {\n        const option = select.options[i];\n        option.selected = ~value.indexOf(option.__value);\n    }\n}\nfunction select_value(select) {\n    const selected_option = select.querySelector(':checked');\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,<script>onresize=function(){parent.postMessage(0,'*')}</script>\";\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            // make sure an initial resize event is fired _after_ the iframe is loaded (which is asynchronous)\n            // see https://github.com/sveltejs/svelte/issues/4233\n            fn();\n        };\n    }\n    append(node, iframe);\n    return () => {\n        if (crossorigin) {\n            unsubscribe();\n        }\n        else if (unsubscribe && iframe.contentWindow) {\n            unsubscribe();\n        }\n        detach(iframe);\n    };\n}\nfunction toggle_class(element, name, toggle) {\n    element.classList[toggle ? 'add' : 'remove'](name);\n}\nfunction custom_event(type, detail, { bubbles = false, cancelable = false } = {}) {\n    const e = document.createEvent('CustomEvent');\n    e.initCustomEvent(type, bubbles, cancelable, detail);\n    return e;\n}\nfunction query_selector_all(selector, parent = document.body) {\n    return Array.from(parent.querySelectorAll(selector));\n}\nfunction head_selector(nodeId, head) {\n    const result = [];\n    let started = 0;\n    for (const node of head.childNodes) {\n        if (node.nodeType === 8 /* comment node */) {\n            const comment = node.textContent.trim();\n            if (comment === `HEAD_${nodeId}_END`) {\n                started -= 1;\n                result.push(node);\n            }\n            else if (comment === `HEAD_${nodeId}_START`) {\n                started += 1;\n                result.push(node);\n            }\n        }\n        else if (started > 0) {\n            result.push(node);\n        }\n    }\n    return result;\n}\nclass HtmlTag {\n    constructor(is_svg = false) {\n        this.is_svg = false;\n        this.is_svg = is_svg;\n        this.e = this.n = null;\n    }\n    c(html) {\n        this.h(html);\n    }\n    m(html, target, anchor = null) {\n        if (!this.e) {\n            if (this.is_svg)\n                this.e = svg_element(target.nodeName);\n            /** #7364  target for <template> may be provided as #document-fragment(11) */\n            else\n                this.e = element((target.nodeType === 11 ? 'TEMPLATE' : target.nodeName));\n            this.t = target.tagName !== 'TEMPLATE' ? target : target.content;\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.nodeName === 'TEMPLATE' ? this.e.content.childNodes : this.e.childNodes);\n    }\n    i(anchor) {\n        for (let i = 0; i < this.n.length; i += 1) {\n            insert(this.t, this.n[i], anchor);\n        }\n    }\n    p(html) {\n        this.d();\n        this.h(html);\n        this.i(this.a);\n    }\n    d() {\n        this.n.forEach(detach);\n    }\n}\nclass HtmlTagHydration extends HtmlTag {\n    constructor(claimed_nodes, is_svg = false) {\n        super(is_svg);\n        this.e = this.n = null;\n        this.l = claimed_nodes;\n    }\n    c(html) {\n        if (this.l) {\n            this.n = this.l;\n        }\n        else {\n            super.c(html);\n        }\n    }\n    i(anchor) {\n        for (let i = 0; i < this.n.length; i += 1) {\n            insert_hydration(this.t, this.n[i], anchor);\n        }\n    }\n}\nfunction attribute_to_object(attributes) {\n    const result = {};\n    for (const attribute of attributes) {\n        result[attribute.name] = attribute.value;\n    }\n    return result;\n}\nfunction get_custom_elements_slots(element) {\n    const result = {};\n    element.childNodes.forEach((node) => {\n        result[node.slot || 'default'] = true;\n    });\n    return result;\n}\nfunction construct_svelte_component(component, props) {\n    return new component(props);\n}\n\n// we need to store the information for multiple documents because a Svelte application could also contain iframes\n// https://github.com/sveltejs/svelte/issues/3624\nconst managed_styles = new Map();\nlet active = 0;\n// https://github.com/darkskyapp/string-hash/blob/master/index.js\nfunction hash(str) {\n    let hash = 5381;\n    let i = str.length;\n    while (i--)\n        hash = ((hash << 5) - hash) ^ str.charCodeAt(i);\n    return hash >>> 0;\n}\nfunction create_style_information(doc, node) {\n    const info = { stylesheet: append_empty_stylesheet(node), rules: {} };\n    managed_styles.set(doc, info);\n    return info;\n}\nfunction create_rule(node, a, b, duration, delay, ease, fn, uid = 0) {\n    const step = 16.666 / duration;\n    let keyframes = '{\\n';\n    for (let p = 0; p <= 1; p += step) {\n        const t = a + (b - a) * ease(p);\n        keyframes += p * 100 + `%{${fn(t, 1 - t)}}\\n`;\n    }\n    const rule = keyframes + `100% {${fn(b, 1 - b)}}\\n}`;\n    const name = `__svelte_${hash(rule)}_${uid}`;\n    const doc = get_root_for_style(node);\n    const { stylesheet, rules } = managed_styles.get(doc) || create_style_information(doc, node);\n    if (!rules[name]) {\n        rules[name] = true;\n        stylesheet.insertRule(`@keyframes ${name} ${rule}`, stylesheet.cssRules.length);\n    }\n    const animation = node.style.animation || '';\n    node.style.animation = `${animation ? `${animation}, ` : ''}${name} ${duration}ms linear ${delay}ms 1 both`;\n    active += 1;\n    return name;\n}\nfunction delete_rule(node, name) {\n    const previous = (node.style.animation || '').split(', ');\n    const next = previous.filter(name\n        ? anim => anim.indexOf(name) < 0 // remove specific animation\n        : anim => anim.indexOf('__svelte') === -1 // remove all Svelte animations\n    );\n    const deleted = previous.length - next.length;\n    if (deleted) {\n        node.style.animation = next.join(', ');\n        active -= deleted;\n        if (!active)\n            clear_rules();\n    }\n}\nfunction clear_rules() {\n    raf(() => {\n        if (active)\n            return;\n        managed_styles.forEach(info => {\n            const { ownerNode } = info.stylesheet;\n            // there is no ownerNode if it runs on jsdom.\n            if (ownerNode)\n                detach(ownerNode);\n        });\n        managed_styles.clear();\n    });\n}\n\nfunction create_animation(node, from, fn, params) {\n    if (!from)\n        return noop;\n    const to = node.getBoundingClientRect();\n    if (from.left === to.left && from.right === to.right && from.top === to.top && from.bottom === to.bottom)\n        return noop;\n    const { delay = 0, duration = 300, easing = identity, \n    // @ts-ignore todo: should this be separated from destructuring? Or start/end added to public api and documentation?\n    start: start_time = now() + delay, \n    // @ts-ignore todo:\n    end = start_time + duration, tick = noop, css } = fn(node, { from, to }, params);\n    let running = true;\n    let started = false;\n    let name;\n    function start() {\n        if (css) {\n            name = create_rule(node, 0, 1, duration, delay, easing, css);\n        }\n        if (!delay) {\n            started = true;\n        }\n    }\n    function stop() {\n        if (css)\n            delete_rule(node, name);\n        running = false;\n    }\n    loop(now => {\n        if (!started && now >= start_time) {\n            started = true;\n        }\n        if (started && now >= end) {\n            tick(1, 0);\n            stop();\n        }\n        if (!running) {\n            return false;\n        }\n        if (started) {\n            const p = now - start_time;\n            const t = 0 + 1 * easing(p / duration);\n            tick(t, 1 - t);\n        }\n        return true;\n    });\n    start();\n    tick(0, 1);\n    return stop;\n}\nfunction fix_position(node) {\n    const style = getComputedStyle(node);\n    if (style.position !== 'absolute' && style.position !== 'fixed') {\n        const { width, height } = style;\n        const a = node.getBoundingClientRect();\n        node.style.position = 'absolute';\n        node.style.width = width;\n        node.style.height = height;\n        add_transform(node, a);\n    }\n}\nfunction add_transform(node, a) {\n    const b = node.getBoundingClientRect();\n    if (a.left !== b.left || a.top !== b.top) {\n        const style = getComputedStyle(node);\n        const transform = style.transform === 'none' ? '' : style.transform;\n        node.style.transform = `${transform} translate(${a.left - b.left}px, ${a.top - b.top}px)`;\n    }\n}\n\nlet current_component;\nfunction set_current_component(component) {\n    current_component = component;\n}\nfunction get_current_component() {\n    if (!current_component)\n        throw new Error('Function called outside component initialization');\n    return current_component;\n}\n/**\n * Schedules a callback to run immediately before the component is updated after any state change.\n *\n * The first time the callback runs will be before the initial `onMount`\n *\n * https://svelte.dev/docs#run-time-svelte-beforeupdate\n */\nfunction beforeUpdate(fn) {\n    get_current_component().$$.before_update.push(fn);\n}\n/**\n * The `onMount` function schedules a callback to run as soon as the component has been mounted to the DOM.\n * It must be called during the component's initialisation (but doesn't need to live *inside* the component;\n * it can be called from an external module).\n *\n * `onMount` does not run inside a [server-side component](/docs#run-time-server-side-component-api).\n *\n * https://svelte.dev/docs#run-time-svelte-onmount\n */\nfunction onMount(fn) {\n    get_current_component().$$.on_mount.push(fn);\n}\n/**\n * Schedules a callback to run immediately after the component has been updated.\n *\n * The first time the callback runs will be after the initial `onMount`\n */\nfunction afterUpdate(fn) {\n    get_current_component().$$.after_update.push(fn);\n}\n/**\n * Schedules a callback to run immediately before the component is unmounted.\n *\n * Out of `onMount`, `beforeUpdate`, `afterUpdate` and `onDestroy`, this is the\n * only one that runs inside a server-side component.\n *\n * https://svelte.dev/docs#run-time-svelte-ondestroy\n */\nfunction onDestroy(fn) {\n    get_current_component().$$.on_destroy.push(fn);\n}\n/**\n * Creates an event dispatcher that can be used to dispatch [component events](/docs#template-syntax-component-directives-on-eventname).\n * Event dispatchers are functions that can take two arguments: `name` and `detail`.\n *\n * Component events created with `createEventDispatcher` create a\n * [CustomEvent](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent).\n * These events do not [bubble](https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Building_blocks/Events#Event_bubbling_and_capture).\n * The `detail` argument corresponds to the [CustomEvent.detail](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/detail)\n * property and can contain any type of data.\n *\n * https://svelte.dev/docs#run-time-svelte-createeventdispatcher\n */\nfunction createEventDispatcher() {\n    const component = get_current_component();\n    return (type, detail, { cancelable = false } = {}) => {\n        const callbacks = component.$$.callbacks[type];\n        if (callbacks) {\n            // TODO are there situations where events could be dispatched\n            // in a server (non-DOM) environment?\n            const event = custom_event(type, detail, { cancelable });\n            callbacks.slice().forEach(fn => {\n                fn.call(component, event);\n            });\n            return !event.defaultPrevented;\n        }\n        return true;\n    };\n}\n/**\n * Associates an arbitrary `context` object with the current component and the specified `key`\n * and returns that object. The context is then available to children of the component\n * (including slotted content) with `getContext`.\n *\n * Like lifecycle functions, this must be called during component initialisation.\n *\n * https://svelte.dev/docs#run-time-svelte-setcontext\n */\nfunction setContext(key, context) {\n    get_current_component().$$.context.set(key, context);\n    return context;\n}\n/**\n * Retrieves the context that belongs to the closest parent component with the specified `key`.\n * Must be called during component initialisation.\n *\n * https://svelte.dev/docs#run-time-svelte-getcontext\n */\nfunction getContext(key) {\n    return get_current_component().$$.context.get(key);\n}\n/**\n * Retrieves the whole context map that belongs to the closest parent component.\n * Must be called during component initialisation. Useful, for example, if you\n * programmatically create a component and want to pass the existing context to it.\n *\n * https://svelte.dev/docs#run-time-svelte-getallcontexts\n */\nfunction getAllContexts() {\n    return get_current_component().$$.context;\n}\n/**\n * Checks whether a given `key` has been set in the context of a parent component.\n * Must be called during component initialisation.\n *\n * https://svelte.dev/docs#run-time-svelte-hascontext\n */\nfunction hasContext(key) {\n    return get_current_component().$$.context.has(key);\n}\n// TODO figure out if we still want to support\n// shorthand events, or if we want to implement\n// a real bubbling mechanism\nfunction bubble(component, event) {\n    const callbacks = component.$$.callbacks[event.type];\n    if (callbacks) {\n        // @ts-ignore\n        callbacks.slice().forEach(fn => fn.call(this, event));\n    }\n}\n\nconst dirty_components = [];\nconst intros = { enabled: false };\nconst binding_callbacks = [];\nlet render_callbacks = [];\nconst flush_callbacks = [];\nconst resolved_promise = /* @__PURE__ */ Promise.resolve();\nlet update_scheduled = false;\nfunction schedule_update() {\n    if (!update_scheduled) {\n        update_scheduled = true;\n        resolved_promise.then(flush);\n    }\n}\nfunction tick() {\n    schedule_update();\n    return resolved_promise;\n}\nfunction add_render_callback(fn) {\n    render_callbacks.push(fn);\n}\nfunction add_flush_callback(fn) {\n    flush_callbacks.push(fn);\n}\n// flush() calls callbacks in this order:\n// 1. All beforeUpdate callbacks, in order: parents before children\n// 2. All bind:this callbacks, in reverse order: children before parents.\n// 3. All afterUpdate callbacks, in order: parents before children. EXCEPT\n//    for afterUpdates called during the initial onMount, which are called in\n//    reverse order: children before parents.\n// Since callbacks might update component values, which could trigger another\n// call to flush(), the following steps guard against this:\n// 1. During beforeUpdate, any updated components will be added to the\n//    dirty_components array and will cause a reentrant call to flush(). Because\n//    the flush index is kept outside the function, the reentrant call will pick\n//    up where the earlier call left off and go through all dirty components. The\n//    current_component value is saved and restored so that the reentrant call will\n//    not interfere with the \"parent\" flush() call.\n// 2. bind:this callbacks cannot trigger new flush() calls.\n// 3. During afterUpdate, any updated components will NOT have their afterUpdate\n//    callback called a second time; the seen_callbacks set, outside the flush()\n//    function, guarantees this behavior.\nconst seen_callbacks = new Set();\nlet flushidx = 0; // Do *not* move this inside the flush() function\nfunction flush() {\n    // Do not reenter flush while dirty components are updated, as this can\n    // result in an infinite loop. Instead, let the inner flush handle it.\n    // Reentrancy is ok afterwards for bindings etc.\n    if (flushidx !== 0) {\n        return;\n    }\n    const saved_component = current_component;\n    do {\n        // first, call beforeUpdate functions\n        // and update components\n        try {\n            while (flushidx < dirty_components.length) {\n                const component = dirty_components[flushidx];\n                flushidx++;\n                set_current_component(component);\n                update(component.$$);\n            }\n        }\n        catch (e) {\n            // reset dirty state to not end up in a deadlocked state and then rethrow\n            dirty_components.length = 0;\n            flushidx = 0;\n            throw e;\n        }\n        set_current_component(null);\n        dirty_components.length = 0;\n        flushidx = 0;\n        while (binding_callbacks.length)\n            binding_callbacks.pop()();\n        // then, once components are updated, call\n        // afterUpdate functions. This may cause\n        // subsequent updates...\n        for (let i = 0; i < render_callbacks.length; i += 1) {\n            const callback = render_callbacks[i];\n            if (!seen_callbacks.has(callback)) {\n                // ...so guard against infinite loops\n                seen_callbacks.add(callback);\n                callback();\n            }\n        }\n        render_callbacks.length = 0;\n    } while (dirty_components.length);\n    while (flush_callbacks.length) {\n        flush_callbacks.pop()();\n    }\n    update_scheduled = false;\n    seen_callbacks.clear();\n    set_current_component(saved_component);\n}\nfunction update($$) {\n    if ($$.fragment !== null) {\n        $$.update();\n        run_all($$.before_update);\n        const dirty = $$.dirty;\n        $$.dirty = [-1];\n        $$.fragment && $$.fragment.p($$.ctx, dirty);\n        $$.after_update.forEach(add_render_callback);\n    }\n}\n/**\n * Useful for example to execute remaining `afterUpdate` callbacks before executing `destroy`.\n */\nfunction flush_render_callbacks(fns) {\n    const filtered = [];\n    const targets = [];\n    render_callbacks.forEach((c) => fns.indexOf(c) === -1 ? filtered.push(c) : targets.push(c));\n    targets.forEach((c) => c());\n    render_callbacks = filtered;\n}\n\nlet promise;\nfunction wait() {\n    if (!promise) {\n        promise = Promise.resolve();\n        promise.then(() => {\n            promise = null;\n        });\n    }\n    return promise;\n}\nfunction dispatch(node, direction, kind) {\n    node.dispatchEvent(custom_event(`${direction ? 'intro' : 'outro'}${kind}`));\n}\nconst outroing = new Set();\nlet outros;\nfunction group_outros() {\n    outros = {\n        r: 0,\n        c: [],\n        p: outros // parent group\n    };\n}\nfunction check_outros() {\n    if (!outros.r) {\n        run_all(outros.c);\n    }\n    outros = outros.p;\n}\nfunction transition_in(block, local) {\n    if (block && block.i) {\n        outroing.delete(block);\n        block.i(local);\n    }\n}\nfunction transition_out(block, local, detach, callback) {\n    if (block && block.o) {\n        if (outroing.has(block))\n            return;\n        outroing.add(block);\n        outros.c.push(() => {\n            outroing.delete(block);\n            if (callback) {\n                if (detach)\n                    block.d(1);\n                callback();\n            }\n        });\n        block.o(local);\n    }\n    else if (callback) {\n        callback();\n    }\n}\nconst null_transition = { duration: 0 };\nfunction create_in_transition(node, fn, params) {\n    const options = { direction: 'in' };\n    let config = fn(node, params, options);\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(options);\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    const options = { direction: 'out' };\n    let config = fn(node, params, options);\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(options);\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    const options = { direction: 'both' };\n    let config = fn(node, params, options);\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(options);\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    const updates = [];\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            // defer updates until all the DOM shuffling is done\n            updates.push(() => 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    run_all(updates);\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\nconst _boolean_attributes = [\n    'allowfullscreen',\n    'allowpaymentrequest',\n    'async',\n    'autofocus',\n    'autoplay',\n    'checked',\n    'controls',\n    'default',\n    'defer',\n    'disabled',\n    'formnovalidate',\n    'hidden',\n    'inert',\n    'ismap',\n    'itemscope',\n    'loop',\n    'multiple',\n    'muted',\n    'nomodule',\n    'novalidate',\n    'open',\n    'playsinline',\n    'readonly',\n    'required',\n    'reversed',\n    'selected'\n];\n/**\n * List of HTML boolean attributes (e.g. `<input disabled>`).\n * Source: https://html.spec.whatwg.org/multipage/indices.html\n */\nconst boolean_attributes = new Set([..._boolean_attributes]);\n\n/** regex of all html void element names */\nconst void_element_names = /^(?:area|base|br|col|command|embed|hr|img|input|keygen|link|meta|param|source|track|wbr)$/;\nfunction is_void(name) {\n    return void_element_names.test(name) || name.toLowerCase() === '!doctype';\n}\n\nconst invalid_attribute_name_character = /[\\s'\">/=\\u{FDD0}-\\u{FDEF}\\u{FFFE}\\u{FFFF}\\u{1FFFE}\\u{1FFFF}\\u{2FFFE}\\u{2FFFF}\\u{3FFFE}\\u{3FFFF}\\u{4FFFE}\\u{4FFFF}\\u{5FFFE}\\u{5FFFF}\\u{6FFFE}\\u{6FFFF}\\u{7FFFE}\\u{7FFFF}\\u{8FFFE}\\u{8FFFF}\\u{9FFFE}\\u{9FFFF}\\u{AFFFE}\\u{AFFFF}\\u{BFFFE}\\u{BFFFF}\\u{CFFFE}\\u{CFFFF}\\u{DFFFE}\\u{DFFFF}\\u{EFFFE}\\u{EFFFF}\\u{FFFFE}\\u{FFFFF}\\u{10FFFE}\\u{10FFFF}]/u;\n// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\n// https://infra.spec.whatwg.org/#noncharacter\nfunction spread(args, attrs_to_add) {\n    const attributes = Object.assign({}, ...args);\n    if (attrs_to_add) {\n        const classes_to_add = attrs_to_add.classes;\n        const styles_to_add = attrs_to_add.styles;\n        if (classes_to_add) {\n            if (attributes.class == null) {\n                attributes.class = classes_to_add;\n            }\n            else {\n                attributes.class += ' ' + classes_to_add;\n            }\n        }\n        if (styles_to_add) {\n            if (attributes.style == null) {\n                attributes.style = style_object_to_string(styles_to_add);\n            }\n            else {\n                attributes.style = style_object_to_string(merge_ssr_styles(attributes.style, styles_to_add));\n            }\n        }\n    }\n    let str = '';\n    Object.keys(attributes).forEach(name => {\n        if (invalid_attribute_name_character.test(name))\n            return;\n        const value = attributes[name];\n        if (value === true)\n            str += ' ' + name;\n        else if (boolean_attributes.has(name.toLowerCase())) {\n            if (value)\n                str += ' ' + name;\n        }\n        else if (value != null) {\n            str += ` ${name}=\"${value}\"`;\n        }\n    });\n    return str;\n}\nfunction merge_ssr_styles(style_attribute, style_directive) {\n    const style_object = {};\n    for (const individual_style of style_attribute.split(';')) {\n        const colon_index = individual_style.indexOf(':');\n        const name = individual_style.slice(0, colon_index).trim();\n        const value = individual_style.slice(colon_index + 1).trim();\n        if (!name)\n            continue;\n        style_object[name] = value;\n    }\n    for (const name in style_directive) {\n        const value = style_directive[name];\n        if (value) {\n            style_object[name] = value;\n        }\n        else {\n            delete style_object[name];\n        }\n    }\n    return style_object;\n}\nconst ATTR_REGEX = /[&\"]/g;\nconst CONTENT_REGEX = /[&<]/g;\n/**\n * Note: this method is performance sensitive and has been optimized\n * https://github.com/sveltejs/svelte/pull/5701\n */\nfunction escape(value, is_attr = false) {\n    const str = String(value);\n    const pattern = is_attr ? ATTR_REGEX : CONTENT_REGEX;\n    pattern.lastIndex = 0;\n    let escaped = '';\n    let last = 0;\n    while (pattern.test(str)) {\n        const i = pattern.lastIndex - 1;\n        const ch = str[i];\n        escaped += str.substring(last, i) + (ch === '&' ? '&amp;' : (ch === '\"' ? '&quot;' : '&lt;'));\n        last = i + 1;\n    }\n    return escaped + str.substring(last);\n}\nfunction escape_attribute_value(value) {\n    // keep booleans, null, and undefined for the sake of `spread`\n    const should_escape = typeof value === 'string' || (value && typeof value === 'object');\n    return should_escape ? escape(value, true) : value;\n}\nfunction escape_object(obj) {\n    const result = {};\n    for (const key in obj) {\n        result[key] = escape_attribute_value(obj[key]);\n    }\n    return result;\n}\nfunction each(items, fn) {\n    let str = '';\n    for (let i = 0; i < items.length; i += 1) {\n        str += fn(items[i], i);\n    }\n    return str;\n}\nconst missing_component = {\n    $$render: () => ''\n};\nfunction validate_component(component, name) {\n    if (!component || !component.$$render) {\n        if (name === 'svelte:component')\n            name += ' this={...}';\n        throw new Error(`<${name}> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules. Otherwise you may need to fix a <${name}>.`);\n    }\n    return component;\n}\nfunction debug(file, line, column, values) {\n    console.log(`{@debug} ${file ? file + ' ' : ''}(${line}:${column})`); // eslint-disable-line no-console\n    console.log(values); // eslint-disable-line no-console\n    return '';\n}\nlet on_destroy;\nfunction create_ssr_component(fn) {\n    function $$render(result, props, bindings, slots, context) {\n        const parent_component = current_component;\n        const $$ = {\n            on_destroy,\n            context: new Map(context || (parent_component ? parent_component.$$.context : [])),\n            // these will be immediately discarded\n            on_mount: [],\n            before_update: [],\n            after_update: [],\n            callbacks: blank_object()\n        };\n        set_current_component({ $$ });\n        const html = fn(result, props, bindings, slots);\n        set_current_component(parent_component);\n        return html;\n    }\n    return {\n        render: (props = {}, { $$slots = {}, context = new Map() } = {}) => {\n            on_destroy = [];\n            const result = { title: '', head: '', css: new Set() };\n            const html = $$render(result, props, {}, $$slots, context);\n            run_all(on_destroy);\n            return {\n                html,\n                css: {\n                    code: Array.from(result.css).map(css => css.code).join('\\n'),\n                    map: null // TODO\n                },\n                head: result.title + result.head\n            };\n        },\n        $$render\n    };\n}\nfunction add_attribute(name, value, boolean) {\n    if (value == null || (boolean && !value))\n        return '';\n    const assignment = (boolean && value === true) ? '' : `=\"${escape(value, true)}\"`;\n    return ` ${name}${assignment}`;\n}\nfunction add_classes(classes) {\n    return classes ? ` class=\"${classes}\"` : '';\n}\nfunction style_object_to_string(style_object) {\n    return Object.keys(style_object)\n        .filter(key => style_object[key])\n        .map(key => `${key}: ${escape_attribute_value(style_object[key])};`)\n        .join(' ');\n}\nfunction add_styles(style_object) {\n    const styles = style_object_to_string(style_object);\n    return styles ? ` style=\"${styles}\"` : '';\n}\n\nfunction bind(component, name, callback) {\n    const index = component.$$.props[name];\n    if (index !== undefined) {\n        component.$$.bound[index] = callback;\n        callback(component.$$.ctx[index]);\n    }\n}\nfunction create_component(block) {\n    block && block.c();\n}\nfunction claim_component(block, parent_nodes) {\n    block && block.l(parent_nodes);\n}\nfunction mount_component(component, target, anchor, customElement) {\n    const { fragment, after_update } = component.$$;\n    fragment && fragment.m(target, anchor);\n    if (!customElement) {\n        // onMount happens before the initial afterUpdate\n        add_render_callback(() => {\n            const new_on_destroy = component.$$.on_mount.map(run).filter(is_function);\n            // if the component was destroyed immediately\n            // it will update the `$$.on_destroy` reference to `null`.\n            // the destructured on_destroy may still reference to the old array\n            if (component.$$.on_destroy) {\n                component.$$.on_destroy.push(...new_on_destroy);\n            }\n            else {\n                // Edge case - component was destroyed immediately,\n                // most likely as a result of a binding initialising\n                run_all(new_on_destroy);\n            }\n            component.$$.on_mount = [];\n        });\n    }\n    after_update.forEach(add_render_callback);\n}\nfunction destroy_component(component, detaching) {\n    const $$ = component.$$;\n    if ($$.fragment !== null) {\n        flush_render_callbacks($$.after_update);\n        run_all($$.on_destroy);\n        $$.fragment && $$.fragment.d(detaching);\n        // TODO null out other refs, including component.$$ (but need to\n        // preserve final state?)\n        $$.on_destroy = $$.fragment = null;\n        $$.ctx = [];\n    }\n}\nfunction make_dirty(component, i) {\n    if (component.$$.dirty[0] === -1) {\n        dirty_components.push(component);\n        schedule_update();\n        component.$$.dirty.fill(0);\n    }\n    component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31));\n}\nfunction init(component, options, instance, create_fragment, not_equal, props, append_styles, dirty = [-1]) {\n    const parent_component = current_component;\n    set_current_component(component);\n    const $$ = component.$$ = {\n        fragment: null,\n        ctx: [],\n        // state\n        props,\n        update: noop,\n        not_equal,\n        bound: blank_object(),\n        // lifecycle\n        on_mount: [],\n        on_destroy: [],\n        on_disconnect: [],\n        before_update: [],\n        after_update: [],\n        context: new Map(options.context || (parent_component ? parent_component.$$.context : [])),\n        // everything else\n        callbacks: blank_object(),\n        dirty,\n        skip_bound: false,\n        root: options.target || parent_component.$$.root\n    };\n    append_styles && append_styles($$.root);\n    let ready = false;\n    $$.ctx = instance\n        ? instance(component, options.props || {}, (i, ret, ...rest) => {\n            const value = rest.length ? rest[0] : ret;\n            if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) {\n                if (!$$.skip_bound && $$.bound[i])\n                    $$.bound[i](value);\n                if (ready)\n                    make_dirty(component, i);\n            }\n            return ret;\n        })\n        : [];\n    $$.update();\n    ready = true;\n    run_all($$.before_update);\n    // `false` as a special case of no DOM component\n    $$.fragment = create_fragment ? create_fragment($$.ctx) : false;\n    if (options.target) {\n        if (options.hydrate) {\n            start_hydrating();\n            const nodes = children(options.target);\n            // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n            $$.fragment && $$.fragment.l(nodes);\n            nodes.forEach(detach);\n        }\n        else {\n            // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n            $$.fragment && $$.fragment.c();\n        }\n        if (options.intro)\n            transition_in(component.$$.fragment);\n        mount_component(component, options.target, options.anchor, options.customElement);\n        end_hydrating();\n        flush();\n    }\n    set_current_component(parent_component);\n}\nlet SvelteElement;\nif (typeof HTMLElement === 'function') {\n    SvelteElement = class extends HTMLElement {\n        constructor() {\n            super();\n            this.attachShadow({ mode: 'open' });\n        }\n        connectedCallback() {\n            const { on_mount } = this.$$;\n            this.$$.on_disconnect = on_mount.map(run).filter(is_function);\n            // @ts-ignore todo: improve typings\n            for (const key in this.$$.slotted) {\n                // @ts-ignore todo: improve typings\n                this.appendChild(this.$$.slotted[key]);\n            }\n        }\n        attributeChangedCallback(attr, _oldValue, newValue) {\n            this[attr] = newValue;\n        }\n        disconnectedCallback() {\n            run_all(this.$$.on_disconnect);\n        }\n        $destroy() {\n            destroy_component(this, 1);\n            this.$destroy = noop;\n        }\n        $on(type, callback) {\n            // TODO should this delegate to addEventListener?\n            if (!is_function(callback)) {\n                return noop;\n            }\n            const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n            callbacks.push(callback);\n            return () => {\n                const index = callbacks.indexOf(callback);\n                if (index !== -1)\n                    callbacks.splice(index, 1);\n            };\n        }\n        $set($$props) {\n            if (this.$$set && !is_empty($$props)) {\n                this.$$.skip_bound = true;\n                this.$$set($$props);\n                this.$$.skip_bound = false;\n            }\n        }\n    };\n}\n/**\n * Base class for Svelte components. Used when dev=false.\n */\nclass SvelteComponent {\n    $destroy() {\n        destroy_component(this, 1);\n        this.$destroy = noop;\n    }\n    $on(type, callback) {\n        if (!is_function(callback)) {\n            return noop;\n        }\n        const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n        callbacks.push(callback);\n        return () => {\n            const index = callbacks.indexOf(callback);\n            if (index !== -1)\n                callbacks.splice(index, 1);\n        };\n    }\n    $set($$props) {\n        if (this.$$set && !is_empty($$props)) {\n            this.$$.skip_bound = true;\n            this.$$set($$props);\n            this.$$.skip_bound = false;\n        }\n    }\n}\n\nfunction dispatch_dev(type, detail) {\n    document.dispatchEvent(custom_event(type, Object.assign({ version: '3.57.0' }, detail), { bubbles: true }));\n}\nfunction append_dev(target, node) {\n    dispatch_dev('SvelteDOMInsert', { target, node });\n    append(target, node);\n}\nfunction append_hydration_dev(target, node) {\n    dispatch_dev('SvelteDOMInsert', { target, node });\n    append_hydration(target, node);\n}\nfunction insert_dev(target, node, anchor) {\n    dispatch_dev('SvelteDOMInsert', { target, node, anchor });\n    insert(target, node, anchor);\n}\nfunction insert_hydration_dev(target, node, anchor) {\n    dispatch_dev('SvelteDOMInsert', { target, node, anchor });\n    insert_hydration(target, node, anchor);\n}\nfunction detach_dev(node) {\n    dispatch_dev('SvelteDOMRemove', { node });\n    detach(node);\n}\nfunction detach_between_dev(before, after) {\n    while (before.nextSibling && before.nextSibling !== after) {\n        detach_dev(before.nextSibling);\n    }\n}\nfunction detach_before_dev(after) {\n    while (after.previousSibling) {\n        detach_dev(after.previousSibling);\n    }\n}\nfunction detach_after_dev(before) {\n    while (before.nextSibling) {\n        detach_dev(before.nextSibling);\n    }\n}\nfunction listen_dev(node, event, handler, options, has_prevent_default, has_stop_propagation, has_stop_immediate_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    if (has_stop_immediate_propagation)\n        modifiers.push('stopImmediatePropagation');\n    dispatch_dev('SvelteDOMAddEventListener', { node, event, handler, modifiers });\n    const dispose = listen(node, event, handler, options);\n    return () => {\n        dispatch_dev('SvelteDOMRemoveEventListener', { node, event, handler, modifiers });\n        dispose();\n    };\n}\nfunction attr_dev(node, attribute, value) {\n    attr(node, attribute, value);\n    if (value == null)\n        dispatch_dev('SvelteDOMRemoveAttribute', { node, attribute });\n    else\n        dispatch_dev('SvelteDOMSetAttribute', { node, attribute, value });\n}\nfunction prop_dev(node, property, value) {\n    node[property] = value;\n    dispatch_dev('SvelteDOMSetProperty', { node, property, value });\n}\nfunction dataset_dev(node, property, value) {\n    node.dataset[property] = value;\n    dispatch_dev('SvelteDOMSetDataset', { node, property, value });\n}\nfunction set_data_dev(text, data) {\n    data = '' + data;\n    if (text.wholeText === data)\n        return;\n    dispatch_dev('SvelteDOMSetData', { node: text, data });\n    text.data = data;\n}\nfunction validate_each_argument(arg) {\n    if (typeof arg !== 'string' && !(arg && typeof arg === 'object' && 'length' in arg)) {\n        let msg = '{#each} only iterates over array-like objects.';\n        if (typeof Symbol === 'function' && arg && Symbol.iterator in arg) {\n            msg += ' You can use a spread to convert this iterable into an array.';\n        }\n        throw new Error(msg);\n    }\n}\nfunction validate_slots(name, slot, keys) {\n    for (const slot_key of Object.keys(slot)) {\n        if (!~keys.indexOf(slot_key)) {\n            console.warn(`<${name}> received an unexpected slot \"${slot_key}\".`);\n        }\n    }\n}\nfunction validate_dynamic_element(tag) {\n    const is_string = typeof tag === 'string';\n    if (tag && !is_string) {\n        throw new Error('<svelte:element> expects \"this\" attribute to be a string.');\n    }\n}\nfunction validate_void_dynamic_element(tag) {\n    if (tag && is_void(tag)) {\n        console.warn(`<svelte:element this=\"${tag}\"> is self-closing and cannot have content.`);\n    }\n}\nfunction construct_svelte_component_dev(component, props) {\n    const error_message = 'this={...} of <svelte:component> should specify a Svelte component.';\n    try {\n        const instance = new component(props);\n        if (!instance.$$ || !instance.$set || !instance.$on || !instance.$destroy) {\n            throw new Error(error_message);\n        }\n        return instance;\n    }\n    catch (err) {\n        const { message } = err;\n        if (typeof message === 'string' && message.indexOf('is not a constructor') !== -1) {\n            throw new Error(error_message);\n        }\n        else {\n            throw err;\n        }\n    }\n}\n/**\n * Base class for Svelte components with some minor dev-enhancements. Used when dev=true.\n */\nclass SvelteComponentDev extends SvelteComponent {\n    constructor(options) {\n        if (!options || (!options.target && !options.$$inline)) {\n            throw new Error(\"'target' is a required option\");\n        }\n        super();\n    }\n    $destroy() {\n        super.$destroy();\n        this.$destroy = () => {\n            console.warn('Component was already destroyed'); // eslint-disable-line no-console\n        };\n    }\n    $capture_state() { }\n    $inject_state() { }\n}\n/**\n * Base class to create strongly typed Svelte components.\n * This only exists for typing purposes and should be used in `.d.ts` files.\n *\n * ### Example:\n *\n * You have component library on npm called `component-library`, from which\n * you export a component called `MyComponent`. For Svelte+TypeScript users,\n * you want to provide typings. Therefore you create a `index.d.ts`:\n * ```ts\n * import { SvelteComponentTyped } from \"svelte\";\n * export class MyComponent extends SvelteComponentTyped<{foo: string}> {}\n * ```\n * Typing this makes it possible for IDEs like VS Code with the Svelte extension\n * to provide intellisense and to use the component like this in a Svelte file\n * with TypeScript:\n * ```svelte\n * <script lang=\"ts\">\n * \timport { MyComponent } from \"component-library\";\n * </script>\n * <MyComponent foo={'bar'} />\n * ```\n *\n * #### Why not make this part of `SvelteComponent(Dev)`?\n * Because\n * ```ts\n * class ASubclassOfSvelteComponent extends SvelteComponent<{foo: string}> {}\n * const component: typeof SvelteComponent = ASubclassOfSvelteComponent;\n * ```\n * will throw a type error, so we need to separate the more strictly typed class.\n */\nclass SvelteComponentTyped extends SvelteComponentDev {\n    constructor(options) {\n        super(options);\n    }\n}\nfunction loop_guard(timeout) {\n    const start = Date.now();\n    return () => {\n        if (Date.now() - start > timeout) {\n            throw new Error('Infinite loop detected');\n        }\n    };\n}\n\nexport { HtmlTag, HtmlTagHydration, SvelteComponent, SvelteComponentDev, SvelteComponentTyped, SvelteElement, action_destroyer, add_attribute, add_classes, add_flush_callback, add_location, add_render_callback, add_resize_listener, add_styles, add_transform, afterUpdate, append, append_dev, append_empty_stylesheet, append_hydration, append_hydration_dev, append_styles, assign, attr, attr_dev, attribute_to_object, beforeUpdate, bind, binding_callbacks, blank_object, bubble, check_outros, children, claim_component, claim_element, claim_html_tag, claim_space, claim_svg_element, claim_text, clear_loops, component_subscribe, compute_rest_props, compute_slots, construct_svelte_component, construct_svelte_component_dev, createEventDispatcher, create_animation, create_bidirectional_transition, create_component, create_in_transition, create_out_transition, create_slot, create_ssr_component, current_component, custom_event, dataset_dev, debug, destroy_block, destroy_component, destroy_each, detach, detach_after_dev, detach_before_dev, detach_between_dev, detach_dev, dirty_components, dispatch_dev, each, element, element_is, empty, end_hydrating, escape, escape_attribute_value, escape_object, exclude_internal_props, fix_and_destroy_block, fix_and_outro_and_destroy_block, fix_position, flush, flush_render_callbacks, getAllContexts, getContext, get_all_dirty_from_scope, get_binding_group_value, get_current_component, get_custom_elements_slots, get_root_for_style, get_slot_changes, get_spread_object, get_spread_update, get_store_value, globals, group_outros, handle_promise, hasContext, has_prop, head_selector, identity, init, init_binding_group, init_binding_group_dynamic, insert, insert_dev, insert_hydration, insert_hydration_dev, intros, invalid_attribute_name_character, is_client, is_crossorigin, is_empty, is_function, is_promise, is_void, listen, listen_dev, loop, loop_guard, merge_ssr_styles, missing_component, mount_component, noop, not_equal, now, null_to_empty, object_without_properties, onDestroy, onMount, once, outro_and_destroy_block, prevent_default, prop_dev, query_selector_all, raf, run, run_all, safe_not_equal, schedule_update, select_multiple_value, select_option, select_options, select_value, self, setContext, set_attributes, set_current_component, set_custom_element_data, set_custom_element_data_map, set_data, set_data_dev, set_dynamic_element_data, set_input_type, set_input_value, set_now, set_raf, set_store_value, set_style, set_svg_attributes, space, split_css_unit, spread, src_url_equal, start_hydrating, stop_immediate_propagation, stop_propagation, subscribe, svg_element, text, tick, time_ranges_to_array, to_number, toggle_class, transition_in, transition_out, trusted, update_await_block_branch, update_keyed_each, update_slot, update_slot_base, validate_component, validate_dynamic_element, validate_each_argument, validate_each_keys, validate_slots, validate_store, validate_void_dynamic_element, xlink_attr };\n","export { identity as linear } from '../internal/index.mjs';\n\n/*\nAdapted from https://github.com/mattdesl\nDistributed under MIT License https://github.com/mattdesl/eases/blob/master/LICENSE.md\n*/\nfunction backInOut(t) {\n    const s = 1.70158 * 1.525;\n    if ((t *= 2) < 1)\n        return 0.5 * (t * t * ((s + 1) * t - s));\n    return 0.5 * ((t -= 2) * t * ((s + 1) * t + s) + 2);\n}\nfunction backIn(t) {\n    const s = 1.70158;\n    return t * t * ((s + 1) * t - s);\n}\nfunction backOut(t) {\n    const s = 1.70158;\n    return --t * t * ((s + 1) * t + s) + 1;\n}\nfunction bounceOut(t) {\n    const a = 4.0 / 11.0;\n    const b = 8.0 / 11.0;\n    const c = 9.0 / 10.0;\n    const ca = 4356.0 / 361.0;\n    const cb = 35442.0 / 1805.0;\n    const cc = 16061.0 / 1805.0;\n    const t2 = t * t;\n    return t < a\n        ? 7.5625 * t2\n        : t < b\n            ? 9.075 * t2 - 9.9 * t + 3.4\n            : t < c\n                ? ca * t2 - cb * t + cc\n                : 10.8 * t * t - 20.52 * t + 10.72;\n}\nfunction bounceInOut(t) {\n    return t < 0.5\n        ? 0.5 * (1.0 - bounceOut(1.0 - t * 2.0))\n        : 0.5 * bounceOut(t * 2.0 - 1.0) + 0.5;\n}\nfunction bounceIn(t) {\n    return 1.0 - bounceOut(1.0 - t);\n}\nfunction circInOut(t) {\n    if ((t *= 2) < 1)\n        return -0.5 * (Math.sqrt(1 - t * t) - 1);\n    return 0.5 * (Math.sqrt(1 - (t -= 2) * t) + 1);\n}\nfunction circIn(t) {\n    return 1.0 - Math.sqrt(1.0 - t * t);\n}\nfunction circOut(t) {\n    return Math.sqrt(1 - --t * t);\n}\nfunction cubicInOut(t) {\n    return t < 0.5 ? 4.0 * t * t * t : 0.5 * Math.pow(2.0 * t - 2.0, 3.0) + 1.0;\n}\nfunction cubicIn(t) {\n    return t * t * t;\n}\nfunction cubicOut(t) {\n    const f = t - 1.0;\n    return f * f * f + 1.0;\n}\nfunction elasticInOut(t) {\n    return t < 0.5\n        ? 0.5 *\n            Math.sin(((+13.0 * Math.PI) / 2) * 2.0 * t) *\n            Math.pow(2.0, 10.0 * (2.0 * t - 1.0))\n        : 0.5 *\n            Math.sin(((-13.0 * Math.PI) / 2) * (2.0 * t - 1.0 + 1.0)) *\n            Math.pow(2.0, -10.0 * (2.0 * t - 1.0)) +\n            1.0;\n}\nfunction elasticIn(t) {\n    return Math.sin((13.0 * t * Math.PI) / 2) * Math.pow(2.0, 10.0 * (t - 1.0));\n}\nfunction elasticOut(t) {\n    return (Math.sin((-13.0 * (t + 1.0) * Math.PI) / 2) * Math.pow(2.0, -10.0 * t) + 1.0);\n}\nfunction expoInOut(t) {\n    return t === 0.0 || t === 1.0\n        ? t\n        : t < 0.5\n            ? +0.5 * Math.pow(2.0, 20.0 * t - 10.0)\n            : -0.5 * Math.pow(2.0, 10.0 - t * 20.0) + 1.0;\n}\nfunction expoIn(t) {\n    return t === 0.0 ? t : Math.pow(2.0, 10.0 * (t - 1.0));\n}\nfunction expoOut(t) {\n    return t === 1.0 ? t : 1.0 - Math.pow(2.0, -10.0 * t);\n}\nfunction quadInOut(t) {\n    t /= 0.5;\n    if (t < 1)\n        return 0.5 * t * t;\n    t--;\n    return -0.5 * (t * (t - 2) - 1);\n}\nfunction quadIn(t) {\n    return t * t;\n}\nfunction quadOut(t) {\n    return -t * (t - 2.0);\n}\nfunction quartInOut(t) {\n    return t < 0.5\n        ? +8.0 * Math.pow(t, 4.0)\n        : -8.0 * Math.pow(t - 1.0, 4.0) + 1.0;\n}\nfunction quartIn(t) {\n    return Math.pow(t, 4.0);\n}\nfunction quartOut(t) {\n    return Math.pow(t - 1.0, 3.0) * (1.0 - t) + 1.0;\n}\nfunction quintInOut(t) {\n    if ((t *= 2) < 1)\n        return 0.5 * t * t * t * t * t;\n    return 0.5 * ((t -= 2) * t * t * t * t + 2);\n}\nfunction quintIn(t) {\n    return t * t * t * t * t;\n}\nfunction quintOut(t) {\n    return --t * t * t * t * t + 1;\n}\nfunction sineInOut(t) {\n    return -0.5 * (Math.cos(Math.PI * t) - 1);\n}\nfunction sineIn(t) {\n    const v = Math.cos(t * Math.PI * 0.5);\n    if (Math.abs(v) < 1e-14)\n        return 1;\n    else\n        return 1 - v;\n}\nfunction sineOut(t) {\n    return Math.sin((t * Math.PI) / 2);\n}\n\nexport { backIn, backInOut, backOut, bounceIn, bounceInOut, bounceOut, circIn, circInOut, circOut, cubicIn, cubicInOut, cubicOut, elasticIn, elasticInOut, elasticOut, expoIn, expoInOut, expoOut, quadIn, quadInOut, quadOut, quartIn, quartInOut, quartOut, quintIn, quintInOut, quintOut, sineIn, sineInOut, sineOut };\n","import { cubicInOut, linear, cubicOut } from '../easing/index.mjs';\nimport { split_css_unit, is_function, assign } from '../internal/index.mjs';\n\n/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n\r\nfunction __rest(s, e) {\r\n    var t = {};\r\n    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n        t[p] = s[p];\r\n    if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n            if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n                t[p[i]] = s[p[i]];\r\n        }\r\n    return t;\r\n}\n\nfunction blur(node, { delay = 0, duration = 400, easing = cubicInOut, amount = 5, opacity = 0 } = {}) {\n    const style = getComputedStyle(node);\n    const target_opacity = +style.opacity;\n    const f = style.filter === 'none' ? '' : style.filter;\n    const od = target_opacity * (1 - opacity);\n    const [value, unit] = split_css_unit(amount);\n    return {\n        delay,\n        duration,\n        easing,\n        css: (_t, u) => `opacity: ${target_opacity - (od * u)}; filter: ${f} blur(${u * value}${unit});`\n    };\n}\nfunction fade(node, { delay = 0, duration = 400, easing = linear } = {}) {\n    const o = +getComputedStyle(node).opacity;\n    return {\n        delay,\n        duration,\n        easing,\n        css: t => `opacity: ${t * o}`\n    };\n}\nfunction fly(node, { delay = 0, duration = 400, easing = cubicOut, x = 0, y = 0, opacity = 0 } = {}) {\n    const style = getComputedStyle(node);\n    const target_opacity = +style.opacity;\n    const transform = style.transform === 'none' ? '' : style.transform;\n    const od = target_opacity * (1 - opacity);\n    const [xValue, xUnit] = split_css_unit(x);\n    const [yValue, yUnit] = split_css_unit(y);\n    return {\n        delay,\n        duration,\n        easing,\n        css: (t, u) => `\n\t\t\ttransform: ${transform} translate(${(1 - t) * xValue}${xUnit}, ${(1 - t) * yValue}${yUnit});\n\t\t\topacity: ${target_opacity - (od * u)}`\n    };\n}\nfunction slide(node, { delay = 0, duration = 400, easing = cubicOut, axis = 'y' } = {}) {\n    const style = getComputedStyle(node);\n    const opacity = +style.opacity;\n    const primary_property = axis === 'y' ? 'height' : 'width';\n    const primary_property_value = parseFloat(style[primary_property]);\n    const secondary_properties = axis === 'y' ? ['top', 'bottom'] : ['left', 'right'];\n    const capitalized_secondary_properties = secondary_properties.map((e) => `${e[0].toUpperCase()}${e.slice(1)}`);\n    const padding_start_value = parseFloat(style[`padding${capitalized_secondary_properties[0]}`]);\n    const padding_end_value = parseFloat(style[`padding${capitalized_secondary_properties[1]}`]);\n    const margin_start_value = parseFloat(style[`margin${capitalized_secondary_properties[0]}`]);\n    const margin_end_value = parseFloat(style[`margin${capitalized_secondary_properties[1]}`]);\n    const border_width_start_value = parseFloat(style[`border${capitalized_secondary_properties[0]}Width`]);\n    const border_width_end_value = parseFloat(style[`border${capitalized_secondary_properties[1]}Width`]);\n    return {\n        delay,\n        duration,\n        easing,\n        css: t => 'overflow: hidden;' +\n            `opacity: ${Math.min(t * 20, 1) * opacity};` +\n            `${primary_property}: ${t * primary_property_value}px;` +\n            `padding-${secondary_properties[0]}: ${t * padding_start_value}px;` +\n            `padding-${secondary_properties[1]}: ${t * padding_end_value}px;` +\n            `margin-${secondary_properties[0]}: ${t * margin_start_value}px;` +\n            `margin-${secondary_properties[1]}: ${t * margin_end_value}px;` +\n            `border-${secondary_properties[0]}-width: ${t * border_width_start_value}px;` +\n            `border-${secondary_properties[1]}-width: ${t * border_width_end_value}px;`\n    };\n}\nfunction scale(node, { delay = 0, duration = 400, easing = cubicOut, start = 0, opacity = 0 } = {}) {\n    const style = getComputedStyle(node);\n    const target_opacity = +style.opacity;\n    const transform = style.transform === 'none' ? '' : style.transform;\n    const sd = 1 - start;\n    const od = target_opacity * (1 - opacity);\n    return {\n        delay,\n        duration,\n        easing,\n        css: (_t, u) => `\n\t\t\ttransform: ${transform} scale(${1 - (sd * u)});\n\t\t\topacity: ${target_opacity - (od * u)}\n\t\t`\n    };\n}\nfunction draw(node, { delay = 0, speed, duration, easing = cubicInOut } = {}) {\n    let len = node.getTotalLength();\n    const style = getComputedStyle(node);\n    if (style.strokeLinecap !== 'butt') {\n        len += parseInt(style.strokeWidth);\n    }\n    if (duration === undefined) {\n        if (speed === undefined) {\n            duration = 800;\n        }\n        else {\n            duration = len / speed;\n        }\n    }\n    else if (typeof duration === 'function') {\n        duration = duration(len);\n    }\n    return {\n        delay,\n        duration,\n        easing,\n        css: (_, u) => `\n\t\t\tstroke-dasharray: ${len};\n\t\t\tstroke-dashoffset: ${u * len};\n\t\t`\n    };\n}\nfunction crossfade(_a) {\n    var { fallback } = _a, defaults = __rest(_a, [\"fallback\"]);\n    const to_receive = new Map();\n    const to_send = new Map();\n    function crossfade(from_node, node, params) {\n        const { delay = 0, duration = d => Math.sqrt(d) * 30, easing = cubicOut } = assign(assign({}, defaults), params);\n        const from = from_node.getBoundingClientRect();\n        const to = node.getBoundingClientRect();\n        const dx = from.left - to.left;\n        const dy = from.top - to.top;\n        const dw = from.width / to.width;\n        const dh = from.height / to.height;\n        const d = Math.sqrt(dx * dx + dy * dy);\n        const style = getComputedStyle(node);\n        const transform = style.transform === 'none' ? '' : style.transform;\n        const opacity = +style.opacity;\n        return {\n            delay,\n            duration: is_function(duration) ? duration(d) : duration,\n            easing,\n            css: (t, u) => `\n\t\t\t\topacity: ${t * opacity};\n\t\t\t\ttransform-origin: top left;\n\t\t\t\ttransform: ${transform} translate(${u * dx}px,${u * dy}px) scale(${t + (1 - t) * dw}, ${t + (1 - t) * dh});\n\t\t\t`\n        };\n    }\n    function transition(items, counterparts, intro) {\n        return (node, params) => {\n            items.set(params.key, node);\n            return () => {\n                if (counterparts.has(params.key)) {\n                    const other_node = counterparts.get(params.key);\n                    counterparts.delete(params.key);\n                    return crossfade(other_node, node, params);\n                }\n                // if the node is disappearing altogether\n                // (i.e. wasn't claimed by the other list)\n                // then we need to supply an outro\n                items.delete(params.key);\n                return fallback && fallback(node, params, intro);\n            };\n        };\n    }\n    return [\n        transition(to_send, to_receive, false),\n        transition(to_receive, to_send, true)\n    ];\n}\n\nexport { blur, crossfade, draw, fade, fly, scale, slide };\n","import { cubicOut } from '../easing/index.mjs';\nimport { is_function } from '../internal/index.mjs';\n\nfunction flip(node, { from, to }, params = {}) {\n    const style = getComputedStyle(node);\n    const transform = style.transform === 'none' ? '' : style.transform;\n    const [ox, oy] = style.transformOrigin.split(' ').map(parseFloat);\n    const dx = (from.left + from.width * ox / to.width) - (to.left + ox);\n    const dy = (from.top + from.height * oy / to.height) - (to.top + oy);\n    const { delay = 0, duration = (d) => Math.sqrt(d) * 120, easing = cubicOut } = params;\n    return {\n        delay,\n        duration: is_function(duration) ? duration(Math.sqrt(dx * dx + dy * dy)) : duration,\n        easing,\n        css: (t, u) => {\n            const x = u * dx;\n            const y = u * dy;\n            const sx = t + u * from.width / to.width;\n            const sy = t + u * from.height / to.height;\n            return `transform: ${transform} translate(${x}px, ${y}px) scale(${sx}, ${sy});`;\n        }\n    };\n}\n\nexport { flip };\n","import { noop, safe_not_equal, subscribe, run_all, is_function } from '../internal/index.mjs';\nexport { get_store_value as get } from '../internal/index.mjs';\n\nconst subscriber_queue = [];\n/**\n * Creates a `Readable` store that allows reading by subscription.\n * @param value initial value\n * @param {StartStopNotifier}start start and stop notifications for subscriptions\n */\nfunction readable(value, start) {\n    return {\n        subscribe: writable(value, start).subscribe\n    };\n}\n/**\n * Create a `Writable` store that allows both updating and reading by subscription.\n * @param {*=}value initial value\n * @param {StartStopNotifier=}start start and stop notifications for subscriptions\n */\nfunction writable(value, start = noop) {\n    let stop;\n    const subscribers = new Set();\n    function set(new_value) {\n        if (safe_not_equal(value, new_value)) {\n            value = new_value;\n            if (stop) { // store is ready\n                const run_queue = !subscriber_queue.length;\n                for (const subscriber of subscribers) {\n                    subscriber[1]();\n                    subscriber_queue.push(subscriber, value);\n                }\n                if (run_queue) {\n                    for (let i = 0; i < subscriber_queue.length; i += 2) {\n                        subscriber_queue[i][0](subscriber_queue[i + 1]);\n                    }\n                    subscriber_queue.length = 0;\n                }\n            }\n        }\n    }\n    function update(fn) {\n        set(fn(value));\n    }\n    function subscribe(run, invalidate = noop) {\n        const subscriber = [run, invalidate];\n        subscribers.add(subscriber);\n        if (subscribers.size === 1) {\n            stop = start(set) || noop;\n        }\n        run(value);\n        return () => {\n            subscribers.delete(subscriber);\n            if (subscribers.size === 0 && stop) {\n                stop();\n                stop = null;\n            }\n        };\n    }\n    return { set, update, subscribe };\n}\nfunction derived(stores, fn, initial_value) {\n    const single = !Array.isArray(stores);\n    const stores_array = single\n        ? [stores]\n        : stores;\n    const auto = fn.length < 2;\n    return readable(initial_value, (set) => {\n        let started = false;\n        const values = [];\n        let pending = 0;\n        let cleanup = noop;\n        const sync = () => {\n            if (pending) {\n                return;\n            }\n            cleanup();\n            const result = fn(single ? values[0] : values, set);\n            if (auto) {\n                set(result);\n            }\n            else {\n                cleanup = is_function(result) ? result : noop;\n            }\n        };\n        const unsubscribers = stores_array.map((store, i) => subscribe(store, (value) => {\n            values[i] = value;\n            pending &= ~(1 << i);\n            if (started) {\n                sync();\n            }\n        }, () => {\n            pending |= (1 << i);\n        }));\n        started = true;\n        sync();\n        return function stop() {\n            run_all(unsubscribers);\n            cleanup();\n            // We need to set this to false because callbacks can still happen despite having unsubscribed:\n            // Callbacks might already be placed in the queue which doesn't know it should no longer\n            // invoke this derived store.\n            started = false;\n        };\n    });\n}\n/**\n * Takes a store and returns a new one derived from the old one that is readable.\n *\n * @param store - store to make readonly\n */\nfunction readonly(store) {\n    return {\n        subscribe: store.subscribe.bind(store)\n    };\n}\n\nexport { derived, readable, readonly, writable };\n","import { writable } from 'svelte/store'\n\nconst defaults = {\n  duration: 4000,\n  initial: 1,\n  next: 0,\n  pausable: false,\n  dismissable: true,\n  reversed: false,\n  intro: { x: 256 }\n}\n\nconst createToast = () => {\n  const { subscribe, update } = writable([])\n  let count = 0\n  const options = {}\n  const _obj = (obj) => obj instanceof Object\n  const push = (msg, opts = {}) => {\n    const param = { target: 'default', ...(_obj(msg) ? msg : { ...opts, msg }) }\n    const conf = options[param.target] || {}\n    const entry = {\n      ...defaults,\n      ...conf,\n      ...param,\n      theme: { ...conf.theme, ...param.theme },\n      classes: [...(conf.classes || []), ...(param.classes || [])],\n      id: ++count\n    }\n    update((n) => (entry.reversed ? [...n, entry] : [entry, ...n]))\n    return count\n  }\n  const pop = (id) => {\n    update((n) => {\n      if (!n.length || id === 0) return []\n      if (_obj(id)) return n.filter((i) => id(i))\n      const target = id || Math.max(...n.map((i) => i.id))\n      return n.filter((i) => i.id !== target)\n    })\n  }\n  const set = (id, opts = {}) => {\n    const param = _obj(id) ? { ...id } : { ...opts, id }\n    update((n) => {\n      const idx = n.findIndex((i) => i.id === param.id)\n      if (idx > -1) {\n        n[idx] = { ...n[idx], ...param }\n      }\n      return n\n    })\n  }\n  const _init = (target = 'default', opts = {}) => {\n    options[target] = opts\n    return options\n  }\n  return { subscribe, push, pop, set, _init }\n}\n\nexport const toast = createToast()\n","import { writable } from '../store/index.mjs';\nimport { now, loop, assign } from '../internal/index.mjs';\nimport { linear } from '../easing/index.mjs';\n\nfunction is_date(obj) {\n    return Object.prototype.toString.call(obj) === '[object Date]';\n}\n\nfunction tick_spring(ctx, last_value, current_value, target_value) {\n    if (typeof current_value === 'number' || is_date(current_value)) {\n        // @ts-ignore\n        const delta = target_value - current_value;\n        // @ts-ignore\n        const velocity = (current_value - last_value) / (ctx.dt || 1 / 60); // guard div by 0\n        const spring = ctx.opts.stiffness * delta;\n        const damper = ctx.opts.damping * velocity;\n        const acceleration = (spring - damper) * ctx.inv_mass;\n        const d = (velocity + acceleration) * ctx.dt;\n        if (Math.abs(d) < ctx.opts.precision && Math.abs(delta) < ctx.opts.precision) {\n            return target_value; // settled\n        }\n        else {\n            ctx.settled = false; // signal loop to keep ticking\n            // @ts-ignore\n            return is_date(current_value) ?\n                new Date(current_value.getTime() + d) : current_value + d;\n        }\n    }\n    else if (Array.isArray(current_value)) {\n        // @ts-ignore\n        return current_value.map((_, i) => tick_spring(ctx, last_value[i], current_value[i], target_value[i]));\n    }\n    else if (typeof current_value === 'object') {\n        const next_value = {};\n        for (const k in current_value) {\n            // @ts-ignore\n            next_value[k] = tick_spring(ctx, last_value[k], current_value[k], target_value[k]);\n        }\n        // @ts-ignore\n        return next_value;\n    }\n    else {\n        throw new Error(`Cannot spring ${typeof current_value} values`);\n    }\n}\nfunction spring(value, opts = {}) {\n    const store = writable(value);\n    const { stiffness = 0.15, damping = 0.8, precision = 0.01 } = opts;\n    let last_time;\n    let task;\n    let current_token;\n    let last_value = value;\n    let target_value = value;\n    let inv_mass = 1;\n    let inv_mass_recovery_rate = 0;\n    let cancel_task = false;\n    function set(new_value, opts = {}) {\n        target_value = new_value;\n        const token = current_token = {};\n        if (value == null || opts.hard || (spring.stiffness >= 1 && spring.damping >= 1)) {\n            cancel_task = true; // cancel any running animation\n            last_time = now();\n            last_value = new_value;\n            store.set(value = target_value);\n            return Promise.resolve();\n        }\n        else if (opts.soft) {\n            const rate = opts.soft === true ? .5 : +opts.soft;\n            inv_mass_recovery_rate = 1 / (rate * 60);\n            inv_mass = 0; // infinite mass, unaffected by spring forces\n        }\n        if (!task) {\n            last_time = now();\n            cancel_task = false;\n            task = loop(now => {\n                if (cancel_task) {\n                    cancel_task = false;\n                    task = null;\n                    return false;\n                }\n                inv_mass = Math.min(inv_mass + inv_mass_recovery_rate, 1);\n                const ctx = {\n                    inv_mass,\n                    opts: spring,\n                    settled: true,\n                    dt: (now - last_time) * 60 / 1000\n                };\n                const next_value = tick_spring(ctx, last_value, value, target_value);\n                last_time = now;\n                last_value = value;\n                store.set(value = next_value);\n                if (ctx.settled) {\n                    task = null;\n                }\n                return !ctx.settled;\n            });\n        }\n        return new Promise(fulfil => {\n            task.promise.then(() => {\n                if (token === current_token)\n                    fulfil();\n            });\n        });\n    }\n    const spring = {\n        set,\n        update: (fn, opts) => set(fn(target_value, value), opts),\n        subscribe: store.subscribe,\n        stiffness,\n        damping,\n        precision\n    };\n    return spring;\n}\n\nfunction get_interpolator(a, b) {\n    if (a === b || a !== a)\n        return () => a;\n    const type = typeof a;\n    if (type !== typeof b || Array.isArray(a) !== Array.isArray(b)) {\n        throw new Error('Cannot interpolate values of different type');\n    }\n    if (Array.isArray(a)) {\n        const arr = b.map((bi, i) => {\n            return get_interpolator(a[i], bi);\n        });\n        return t => arr.map(fn => fn(t));\n    }\n    if (type === 'object') {\n        if (!a || !b)\n            throw new Error('Object cannot be null');\n        if (is_date(a) && is_date(b)) {\n            a = a.getTime();\n            b = b.getTime();\n            const delta = b - a;\n            return t => new Date(a + t * delta);\n        }\n        const keys = Object.keys(b);\n        const interpolators = {};\n        keys.forEach(key => {\n            interpolators[key] = get_interpolator(a[key], b[key]);\n        });\n        return t => {\n            const result = {};\n            keys.forEach(key => {\n                result[key] = interpolators[key](t);\n            });\n            return result;\n        };\n    }\n    if (type === 'number') {\n        const delta = b - a;\n        return t => a + t * delta;\n    }\n    throw new Error(`Cannot interpolate ${type} values`);\n}\nfunction tweened(value, defaults = {}) {\n    const store = writable(value);\n    let task;\n    let target_value = value;\n    function set(new_value, opts) {\n        if (value == null) {\n            store.set(value = new_value);\n            return Promise.resolve();\n        }\n        target_value = new_value;\n        let previous_task = task;\n        let started = false;\n        let { delay = 0, duration = 400, easing = linear, interpolate = get_interpolator } = assign(assign({}, defaults), opts);\n        if (duration === 0) {\n            if (previous_task) {\n                previous_task.abort();\n                previous_task = null;\n            }\n            store.set(value = target_value);\n            return Promise.resolve();\n        }\n        const start = now() + delay;\n        let fn;\n        task = loop(now => {\n            if (now < start)\n                return true;\n            if (!started) {\n                fn = interpolate(value, new_value);\n                if (typeof duration === 'function')\n                    duration = duration(value, new_value);\n                started = true;\n            }\n            if (previous_task) {\n                previous_task.abort();\n                previous_task = null;\n            }\n            const elapsed = now - start;\n            if (elapsed > duration) {\n                store.set(value = new_value);\n                return false;\n            }\n            // @ts-ignore\n            store.set(value = fn(easing(elapsed / duration)));\n            return true;\n        });\n        return task.promise;\n    }\n    return {\n        set,\n        update: (fn, opts) => set(fn(target_value, value), opts),\n        subscribe: store.subscribe\n    };\n}\n\nexport { spring, tweened };\n","<script>\nimport { onMount, onDestroy } from 'svelte'\nimport { tweened } from 'svelte/motion'\nimport { linear } from 'svelte/easing'\nimport { toast } from './stores.js'\n\nexport let item\n\nconst progress = tweened(item.initial, { duration: item.duration, easing: linear })\nconst close = () => toast.pop(item.id)\nconst autoclose = () => {\n  if ($progress === 1 || $progress === 0) {\n    close()\n  }\n}\nlet next = item.initial\nlet prev = next\nlet paused = false\n\n$: if (next !== item.next) {\n  next = item.next\n  prev = $progress\n  paused = false\n  progress.set(next).then(autoclose)\n}\n\nconst pause = () => {\n  if (!paused && $progress !== next) {\n    progress.set($progress, { duration: 0 })\n    paused = true\n  }\n}\n\nconst resume = () => {\n  if (paused) {\n    const d = item.duration\n    const duration = d - d * (($progress - prev) / (next - prev))\n    progress.set(next, { duration }).then(autoclose)\n    paused = false\n  }\n}\n\nlet componentProps = {}\n$: if (item.component) {\n  const { props = {}, sendIdTo } = item.component\n  componentProps = { ...props, ...(sendIdTo && { [sendIdTo]: item.id }) }\n}\n\nconst check = (prop, kind = 'undefined') => typeof prop === kind\n// `progress` has been renamed to `next`; shim included for backward compatibility, to remove in next major\n$: if (!check(item.progress)) {\n  item.next = item.progress\n}\n\nlet unlisten\nconst listen = (d = document) => {\n  if (check(d.hidden)) return\n  const handler = () => (d.hidden ? pause() : resume())\n  const name = 'visibilitychange'\n  d.addEventListener(name, handler)\n  unlisten = () => d.removeEventListener(name, handler)\n  handler()\n}\n\nonMount(listen)\nonDestroy(() => {\n  if (check(item.onpop, 'function')) {\n    item.onpop(item.id)\n  }\n  unlisten && unlisten()\n})\n</script>\n\n<div\n  class=\"_toastItem\"\n  class:pe={item.pausable}\n  on:mouseenter={() => {\n    if (item.pausable) pause()\n  }}\n  on:mouseleave={resume}\n>\n  <div role=\"status\" class=\"_toastMsg\" class:pe={item.component}>\n    {#if item.component}\n      <svelte:component this={item.component.src} {...componentProps} />\n    {:else}\n      {@html item.msg}\n    {/if}\n  </div>\n  {#if item.dismissable}\n    <div\n      class=\"_toastBtn pe\"\n      role=\"button\"\n      tabindex=\"0\"\n      on:click={close}\n      on:keydown={(e) => {\n        if (e instanceof KeyboardEvent && ['Enter', ' '].includes(e.key)) close()\n      }}\n    />\n  {/if}\n  <progress class=\"_toastBar\" value={$progress} />\n</div>\n\n<style>\n._toastItem {\n  width: var(--toastWidth, 16rem);\n  height: var(--toastHeight, auto);\n  min-height: var(--toastMinHeight, 3.5rem);\n  margin: var(--toastMargin, 0 0 0.5rem 0);\n  padding: var(--toastPadding, 0);\n  background: var(--toastBackground, rgba(66, 66, 66, 0.9));\n  color: var(--toastColor, #fff);\n  box-shadow: var(\n    --toastBoxShadow,\n    0 4px 6px -1px rgba(0, 0, 0, 0.1),\n    0 2px 4px -1px rgba(0, 0, 0, 0.06)\n  );\n  border: var(--toastBorder, none);\n  border-radius: var(--toastBorderRadius, 0.125rem);\n  position: relative;\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n  overflow: hidden;\n  will-change: transform, opacity;\n  -webkit-tap-highlight-color: transparent;\n}\n._toastMsg {\n  padding: var(--toastMsgPadding, 0.75rem 0.5rem);\n  flex: 1 1 0%;\n}\n.pe,\n._toastMsg :global(a) {\n  pointer-events: auto;\n}\n._toastBtn {\n  width: var(--toastBtnWidth, 2rem);\n  height: var(--toastBtnHeight, 100%);\n  cursor: pointer;\n  outline: none;\n}\n._toastBtn::after {\n  content: var(--toastBtnContent, '✕');\n  font: var(--toastBtnFont, 1rem sans-serif);\n  display: flex;\n  align-items: center;\n  justify-content: center;\n}\n._toastBar {\n  top: var(--toastBarTop, auto);\n  right: var(--toastBarRight, auto);\n  bottom: var(--toastBarBottom, 0);\n  left: var(--toastBarLeft, 0);\n  height: var(--toastBarHeight, 6px);\n  width: var(--toastBarWidth, 100%);\n  position: absolute;\n  display: block;\n  -webkit-appearance: none;\n  -moz-appearance: none;\n  appearance: none;\n  border: none;\n  background: transparent;\n  pointer-events: none;\n}\n._toastBar::-webkit-progress-bar {\n  background: transparent;\n}\n/* `--toastProgressBackground` renamed to `--toastBarBackground`; override included for backward compatibility */\n._toastBar::-webkit-progress-value {\n  background: var(--toastProgressBackground, var(--toastBarBackground, rgba(33, 150, 243, 0.75)));\n}\n._toastBar::-moz-progress-bar {\n  background: var(--toastProgressBackground, var(--toastBarBackground, rgba(33, 150, 243, 0.75)));\n}\n</style>\n","<script>\nimport { fade, fly } from 'svelte/transition'\nimport { flip } from 'svelte/animate'\nimport { toast } from './stores.js'\nimport ToastItem from './ToastItem.svelte'\n\nexport let options = {}\nexport let target = 'default'\n\n$: toast._init(target, options)\n\nlet items\n$: items = $toast.filter((i) => i.target === target)\n\nconst getCss = (theme) => Object.keys(theme).reduce((a, c) => `${a}${c}:${theme[c]};`, '')\n</script>\n\n<ul class=\"_toastContainer\">\n  {#each items as item (item.id)}\n    <li\n      class={item.classes.join(' ')}\n      in:fly={item.intro}\n      out:fade\n      animate:flip={{ duration: 200 }}\n      style={getCss(item.theme)}\n    >\n      <ToastItem {item} />\n    </li>\n  {/each}\n</ul>\n\n<style>\n._toastContainer {\n  top: var(--toastContainerTop, 1.5rem);\n  right: var(--toastContainerRight, 2rem);\n  bottom: var(--toastContainerBottom, auto);\n  left: var(--toastContainerLeft, auto);\n  position: fixed;\n  margin: 0;\n  padding: 0;\n  list-style-type: none;\n  pointer-events: none;\n  z-index: var(--toastContainerZIndex, 9999);\n}\n</style>\n","import { toast } from '@zerodevx/svelte-toast';\n\nexport const initConnectionCheck = (t: (namespace: string, key: string) => string) => {\n  window.addEventListener('online', () => {\n    toast.push(t('general', 'online'));\n  });\n  window.addEventListener('offline', () => {\n    toast.push(t('general', 'offline'));\n  });\n};\n","import { INavigationButtons } from '../../molecules/NavigationButtons';\nimport { IDocumentOptions } from '../../organisms/DocumentOptions';\nimport type { CaptureConfigOption } from 'jslib-html5-camera-photo';\nimport { IFlow } from '../flows';\nimport {\n  EndUserInfo,\n  FlowsBackendConfig,\n  FlowsEventsConfig,\n  FlowsGeneralTheme,\n} from '../../../types/BallerineSDK';\nimport { ICSSProperties } from '../../services/css-manager';\nimport { ObjectValues, TDocumentKind, TDocumentType } from '../app-state/types';\nimport { MetricsConfig } from '../../../types/BallerineSDK';\n\nexport const Steps = {\n  Welcome: 'welcome',\n  DocumentSelection: 'document-selection',\n  DocumentStart: 'document-start',\n  DocumentPhoto: 'document-photo',\n  CheckDocument: 'check-document',\n  DocumentPhotoBackStart: 'document-photo-back-start',\n  DocumentPhotoBack: 'document-photo-back',\n  CheckDocumentPhotoBack: 'check-document-photo-back',\n  SelfieStart: 'selfie-start',\n  Selfie: 'selfie',\n  CheckSelfie: 'check-selfie',\n  A4DocumentStart: 'a4-document-start',\n  A4DocumentPhoto: 'a4-document-photo',\n  CheckA4Document: 'check-a4-document',\n  Registration: 'registration',\n  Final: 'final',\n  Loading: 'loading',\n  Resubmission: 'resubmission',\n  Decline: 'decline',\n  Error: 'error',\n} as const;\n\nexport type TSteps = ObjectValues<typeof Steps>;\n\nexport const Elements = {\n  Image: 'image',\n  Photo: 'photo',\n  Title: 'title',\n  Paragraph: 'paragraph',\n  Button: 'button',\n  Input: 'input',\n  Container: 'container',\n  DocumentOption: 'document-option',\n  IconButton: 'icon-button',\n  IconCloseButton: 'icon-close-button',\n  CameraButton: 'camera-button',\n  VideoContainer: 'video-container',\n  List: 'list',\n  ErrorText: 'error-text',\n  Loader: 'loader',\n} as const;\n\nexport type TElements = ObjectValues<typeof Elements>;\n\nexport type Icons = 'Card' | 'Passport' | 'License' | 'PassportTwo' | 'Voter';\n\ninterface IAttributesAll {\n  icon: Icons;\n  src: string;\n  alt: string;\n  width: string | number;\n  height: string | number;\n  value: string;\n  name: string;\n  type: string;\n  placeholder: string;\n  length: number; // mostly for elements with a number of elements\n  validate: () => boolean;\n  defaultValue: string;\n}\nexport type IAttributes = Partial<IAttributesAll>;\n\nexport interface IFormProps {\n  persistence: 'session' | 'local';\n  action: 'store' | 'api';\n  storeKey?: string;\n  apiUrl?: string;\n}\n\nexport interface IButton {\n  theme: 'primary' | 'secondary';\n}\n\nexport interface IElementProps {\n  style?: ICSSProperties;\n  attributes?: IAttributes;\n  context?: string;\n}\n\nexport interface IElement {\n  id: string;\n  props: IElementProps;\n  type: TElements;\n  disabled?: boolean;\n  orderIndex: number;\n  elements?: IElement[];\n}\n\nexport interface IStepConfiguration {\n  name: TSteps;\n  style?: ICSSProperties;\n  overlayStyle?: ICSSProperties;\n  elements: IElement[];\n  form?: IFormProps;\n  type?: TDocumentType;\n  id: string;\n  namespace?: string;\n  cameraConfig?: CaptureConfigOption;\n  documentOptions?: { type: TDocumentType; kind: TDocumentKind }[];\n}\n\nexport interface IOverlayStyles {\n  card?: ICSSProperties;\n  passport?: ICSSProperties;\n  a4?: ICSSProperties;\n  selfie?: ICSSProperties;\n}\n\nexport type TStepsConfigurations = IStepConfiguration[];\nexport interface IConfigurationComponents {\n  container?: ICSSProperties;\n  button?: ICSSProperties;\n  buttonWithIcon?: ICSSProperties;\n  iconButton?: ICSSProperties;\n  iconCloseButton?: ICSSProperties;\n  layout?: ICSSProperties;\n  photo?: ICSSProperties;\n  title?: ICSSProperties;\n  paragraph?: ICSSProperties;\n  navigationButtons?: INavigationButtons;\n  documentOptions?: IDocumentOptions;\n  image?: ICSSProperties;\n  cameraButton?: ICSSProperties;\n  videoContainer?: ICSSProperties;\n  input?: ICSSProperties;\n  loader?: ICSSProperties;\n  errorText?: ICSSProperties;\n  overlay?: ICSSProperties;\n}\n\nexport interface IAppConfigurationUI {\n  uiPack?: string;\n  general?: FlowsGeneralTheme;\n  components?: IConfigurationComponents;\n  flows?: {\n    [key: string]: {\n      steps?: RecursivePartial<IStepConfiguration>[];\n      userType?: string;\n      mobileNativeCamera?: boolean;\n      syncFlow?: boolean;\n      useFinalQueryParams?: boolean;\n      firstScreenBackButton?: boolean;\n      showCloseButton?: boolean;\n      callbacks?: FlowsEventsConfig;\n    };\n  };\n  settings?: ConfigSettings;\n}\n\nexport interface IAppConfiguration extends Partial<IAppConfigurationUI> {\n  isDevelopment: boolean;\n  backendConfig: FlowsBackendConfig;\n  endUserInfo: Omit<EndUserInfo, 'dateOfBirth' | 'endUserMetadata'> & {\n    token?: string;\n  };\n  flows: { [key: string]: IFlow };\n  defaultLanguage: 'en' | 'es';\n  metricsConfig: MetricsConfig;\n}\n\nexport interface ConfigSettings {\n  cameraSettings: CaptureConfigOption;\n  selfieCameraSettings: CaptureConfigOption;\n}\n","import { IAppConfiguration, Steps } from '../contexts/configuration';\nimport { IFlow } from '../contexts/flows';\n\n// Config prioritiztion:\n// 3. Theme configuration\n// 2. Step configuration\n// 1. Components configuration\n\nconst defaultFlowOrder = [\n  Steps.Welcome,\n  Steps.DocumentSelection,\n  Steps.DocumentPhoto,\n  Steps.CheckDocument,\n  Steps.DocumentPhotoBackStart,\n  Steps.DocumentPhotoBack,\n  Steps.CheckDocumentPhotoBack,\n  Steps.SelfieStart,\n  Steps.Selfie,\n  Steps.CheckSelfie,\n  Steps.Loading,\n];\n\nexport const configuration: IAppConfiguration = {\n  backendConfig: {\n    baseUrl: 'https://api-dev.ballerine.io',\n    auth: {\n      method: 'jwt',\n      authorizationHeader:\n        'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbmRVc2VySWQiOiJhMzE5Yzk1ZC03ODY4LTQyNDAtOTQ5YS1mMDRmNDEwMzRlYzEiLCJjbGllbnRJZCI6IjJlOGJiZTJjLTJhYjktNGRkZi1iOWI5LTZlZWM5M2Q3YjQzMSIsImlhdCI6MTY1OTM1NDAwNywiZXhwIjoxODczODcyOTU4Njc0MTM4OCwiaXNzIjoiMmU4YmJlMmMtMmFiOS00ZGRmLWI5YjktNmVlYzkzZDdiNDMxIn0.aEaz4y7pBYG6Ia1Yb74cUOp0E0UsgtCItgLd2EXjo3U',\n    },\n    endpoints: {\n      startVerification: '/v2/enduser/verify',\n      getVerificationStatus: '/v2/enduser/verify/status/{verificationId}',\n      processStepData: '/v2/enduser/verify/partial',\n      getConfig: '/v2/clients/{clientId}/config',\n    },\n  },\n  isDevelopment: false,\n  defaultLanguage: 'en',\n  endUserInfo: {\n    id: 'test-id123',\n  },\n  flows: {\n    default: {\n      name: 'default',\n      stepsOrder: defaultFlowOrder,\n      syncFlow: true,\n      useFinalQueryParams: true,\n    } as IFlow,\n  },\n  metricsConfig: {\n    enabled: true,\n  },\n};\n","import { writable } from 'svelte/store';\nimport { IAppConfiguration } from './types';\nimport { configuration as defaultConfiguration } from '../../configuration/configuration';\n\nexport const configuration = writable<IAppConfiguration>(defaultConfiguration);\n\nObject.defineProperty(window, 'configStore', {\n  get: () => {\n    return configuration.subscribe(e => console.log(e));\n  },\n});\n","/**\n * workflow-core\n *\n * Copyright (c) Ballerine\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */\nvar isObject = function isObject(obj) {\n  return !Array.isArray(obj) && obj !== null && typeof obj === 'object';\n};\n\nexport { isObject };\n//# sourceMappingURL=is-object.js.map\n","/**\n * workflow-core\n *\n * Copyright (c) Ballerine\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */\nimport { isObject } from '../is-object/is-object.js';\n\nvar isEmptyObject = function isEmptyObject(obj) {\n  return isObject(obj) && Object.keys(obj).length === 0;\n};\n\nexport { isEmptyObject };\n//# sourceMappingURL=is-empty-object.js.map\n","import { isEmptyObject } from '@ballerine/common';\n\nexport const resolveStringTemplate = (str: string, obj?: StringKV) => {\n  // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n  if (!obj || isEmptyObject(obj)) return str;\n  return str.replace(/\\${(.*?)}/g, (x, g: string) => obj[g]);\n};\n","import { get } from 'svelte/store';\nimport { configuration } from '../configuration';\nimport { FlowsBackendConfig, FlowsBackendConfigEndpoints } from '../../../types/BallerineSDK';\nimport { resolveStringTemplate } from '../../utils/string-utils/resolve-string-template';\n\nexport const getBackendConfig = (): FlowsBackendConfig => {\n  return get(configuration).backendConfig;\n};\n\nexport const resolveEndpoint = (\n  endpointName: keyof FlowsBackendConfigEndpoints,\n  templateParams?: StringKV,\n): string => {\n  const backendConfig = getBackendConfig();\n\n  return `${backendConfig.baseUrl ?? ''}${resolveStringTemplate(\n    backendConfig.endpoints?.[endpointName] ?? '',\n    templateParams,\n  )}`;\n};\n\nexport const getStartVerificationEndpoint = (templateParams?: StringKV): string =>\n  resolveEndpoint('startVerification', templateParams);\nexport const getVerificationStatusEndpoint = (templateParams?: StringKV): string =>\n  resolveEndpoint('getVerificationStatus', templateParams);\nexport const processStepDataEndpoint = (templateParams?: StringKV): string =>\n  resolveEndpoint('processStepData', templateParams);\nexport const getConfigEndpoint = (templateParams?: StringKV): string =>\n  resolveEndpoint('getConfig', templateParams);\n\nexport const getAuthorizationHeader = (): string => {\n  const backendConfig = getBackendConfig();\n  const { auth } = backendConfig;\n  if (!auth) return '';\n\n  return auth.authorizationHeader || '';\n};\n\nexport const getIsDevelopment = (): boolean => {\n  return get(configuration).isDevelopment;\n};\n","'use strict';\n\nvar isMergeableObject = function isMergeableObject(value) {\n\treturn isNonNullObject(value)\n\t\t&& !isSpecial(value)\n};\n\nfunction isNonNullObject(value) {\n\treturn !!value && typeof value === 'object'\n}\n\nfunction isSpecial(value) {\n\tvar stringValue = Object.prototype.toString.call(value);\n\n\treturn stringValue === '[object RegExp]'\n\t\t|| stringValue === '[object Date]'\n\t\t|| isReactElement(value)\n}\n\n// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25\nvar canUseSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;\n\nfunction isReactElement(value) {\n\treturn value.$$typeof === REACT_ELEMENT_TYPE\n}\n\nfunction emptyTarget(val) {\n\treturn Array.isArray(val) ? [] : {}\n}\n\nfunction cloneUnlessOtherwiseSpecified(value, options) {\n\treturn (options.clone !== false && options.isMergeableObject(value))\n\t\t? deepmerge(emptyTarget(value), value, options)\n\t\t: value\n}\n\nfunction defaultArrayMerge(target, source, options) {\n\treturn target.concat(source).map(function(element) {\n\t\treturn cloneUnlessOtherwiseSpecified(element, options)\n\t})\n}\n\nfunction getMergeFunction(key, options) {\n\tif (!options.customMerge) {\n\t\treturn deepmerge\n\t}\n\tvar customMerge = options.customMerge(key);\n\treturn typeof customMerge === 'function' ? customMerge : deepmerge\n}\n\nfunction getEnumerableOwnPropertySymbols(target) {\n\treturn Object.getOwnPropertySymbols\n\t\t? Object.getOwnPropertySymbols(target).filter(function(symbol) {\n\t\t\treturn Object.propertyIsEnumerable.call(target, symbol)\n\t\t})\n\t\t: []\n}\n\nfunction getKeys(target) {\n\treturn Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))\n}\n\nfunction propertyIsOnObject(object, property) {\n\ttry {\n\t\treturn property in object\n\t} catch(_) {\n\t\treturn false\n\t}\n}\n\n// Protects from prototype poisoning and unexpected merging up the prototype chain.\nfunction propertyIsUnsafe(target, key) {\n\treturn propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,\n\t\t&& !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,\n\t\t\t&& Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable.\n}\n\nfunction mergeObject(target, source, options) {\n\tvar destination = {};\n\tif (options.isMergeableObject(target)) {\n\t\tgetKeys(target).forEach(function(key) {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(target[key], options);\n\t\t});\n\t}\n\tgetKeys(source).forEach(function(key) {\n\t\tif (propertyIsUnsafe(target, key)) {\n\t\t\treturn\n\t\t}\n\n\t\tif (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {\n\t\t\tdestination[key] = getMergeFunction(key, options)(target[key], source[key], options);\n\t\t} else {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(source[key], options);\n\t\t}\n\t});\n\treturn destination\n}\n\nfunction deepmerge(target, source, options) {\n\toptions = options || {};\n\toptions.arrayMerge = options.arrayMerge || defaultArrayMerge;\n\toptions.isMergeableObject = options.isMergeableObject || isMergeableObject;\n\t// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()\n\t// implementations can use it. The caller may not replace it.\n\toptions.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;\n\n\tvar sourceIsArray = Array.isArray(source);\n\tvar targetIsArray = Array.isArray(target);\n\tvar sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;\n\n\tif (!sourceAndTargetTypesMatch) {\n\t\treturn cloneUnlessOtherwiseSpecified(source, options)\n\t} else if (sourceIsArray) {\n\t\treturn options.arrayMerge(target, source, options)\n\t} else {\n\t\treturn mergeObject(target, source, options)\n\t}\n}\n\ndeepmerge.all = function deepmergeAll(array, options) {\n\tif (!Array.isArray(array)) {\n\t\tthrow new Error('first argument should be an array')\n\t}\n\n\treturn array.reduce(function(prev, next) {\n\t\treturn deepmerge(prev, next, options)\n\t}, {})\n};\n\nvar deepmerge_1 = deepmerge;\n\nmodule.exports = deepmerge_1;\n","import deepmerge from 'deepmerge';\nimport merge from 'deepmerge';\nimport { FlowsGeneralTheme, FlowsTranslations } from '../../../types/BallerineSDK';\nimport {\n  IAppConfiguration,\n  IConfigurationComponents,\n  IElement,\n  IStepConfiguration,\n} from '../../contexts/configuration';\nimport { IFlow } from '../../contexts/flows';\nimport { TranslationType } from '../../contexts/translation';\nimport { IUIPackTheme } from '../../ui-packs/types';\n\nexport const mergeStepConfig = (\n  defaultConfig: IStepConfiguration,\n  overrides: IStepConfiguration,\n): IStepConfiguration => {\n  const mergedConfig = merge(defaultConfig, overrides);\n  return {\n    ...mergedConfig,\n    elements: overrides.elements || defaultConfig.elements,\n    namespace: mergedConfig.namespace || mergedConfig.id || mergedConfig.name,\n  };\n};\n\nexport const isUrl = (url?: string) => {\n  if (!url) return false;\n  const pattern = new RegExp(\n    '^(https?:\\\\/\\\\/)?' + // protocol\n      '((([a-z\\\\d]([a-z\\\\d-]*[a-z\\\\d])*)\\\\.)+[a-z]{2,}|' + // domain name\n      '((\\\\d{1,3}\\\\.){3}\\\\d{1,3}))' + // OR ip (v4) address\n      '(\\\\:\\\\d+)?(\\\\/[-a-z\\\\d%_.~+]*)*' + // port and path\n      '(\\\\?[;&a-z\\\\d%_.~+=-]*)?' + // query string\n      '(\\\\#[-a-z\\\\d_]*)?$',\n    'i',\n  ); // fragment locator\n  return !!pattern.test(url);\n};\n\n/**\n * @description Merges the default translations with the\n * @param original default app translations\n * @param overridesTranslationConfiguration translation configuration provided by the user\n */\nexport const mergeTranslations = async (\n  original: TranslationType,\n  overridesTranslationConfiguration: FlowsTranslations,\n): Promise<TranslationType> => {\n  // When overrides provided by the user in the configuration\n  if (overridesTranslationConfiguration.overrides) {\n    return deepmerge(original, overridesTranslationConfiguration.overrides);\n  }\n  // When remote url provided by the user\n  if (overridesTranslationConfiguration.remoteUrl) {\n    try {\n      const response = await fetch(overridesTranslationConfiguration.remoteUrl);\n      const overrides = (await response.json()) as TranslationType;\n      return deepmerge(original, overrides);\n    } catch (error) {\n      console.error(error);\n    }\n  }\n  return original;\n};\n\n/**\n * @description Merges configuration flows and components with uiPack\n * @param configuration provided user configuration\n * @param uiTheme selected default ui theme\n */\nexport const mergeConfigurationWithUiPack = (\n  configuration: IAppConfiguration,\n  uiTheme: IUIPackTheme,\n): IAppConfiguration => {\n  let flows: { [key: string]: IFlow } = {};\n  Object.keys(configuration.flows).map(flowName => {\n    const flow = mergeConfigurationFlowsWithUiPack(flowName, configuration, uiTheme);\n    flows = {\n      ...flows,\n      [flowName]: flow,\n    };\n  });\n\n  const mergedConfiguration = deepmerge(uiTheme, configuration);\n\n  return {\n    ...mergedConfiguration,\n    components: mergeComponents(uiTheme.components, configuration.components),\n    general: mergeGeneral(uiTheme.general, configuration.general),\n    flows,\n  };\n};\n\n/**\n * @description Merges particular flow with uiPack\n * @param flowName current flow name\n * @param configuration provided user configuration\n * @param uiTheme selected default ui theme\n */\nconst mergeConfigurationFlowsWithUiPack = (\n  flowName: string,\n  configuration: IAppConfiguration,\n  uiTheme: IUIPackTheme,\n): IFlow => {\n  const flowSteps = configuration.flows[flowName].steps;\n  let steps: IStepConfiguration[] = uiTheme.steps;\n  if (flowSteps) {\n    steps = flowSteps.map(flowStep => {\n      const themeStep = uiTheme.steps.find(s => s.id === flowStep.id);\n      if (!themeStep) {\n        throw new Error(`Invalid step id provided: ${flowStep.id as string}`);\n      }\n      const mergedStep = deepmerge(themeStep, flowStep);\n      return {\n        ...mergedStep,\n        id: mergedStep.type ? `${mergedStep.id}-${mergedStep.type}` : mergedStep.id,\n        namespace: mergedStep.namespace ? mergedStep.namespace : mergedStep.id,\n        elements: mergeStepElements(\n          themeStep.elements,\n          flowStep.elements as RecursivePartial<IElement>[] | undefined,\n        ),\n      };\n    }) as IStepConfiguration[];\n  }\n\n  return {\n    ...configuration.flows[flowName],\n    steps,\n  };\n};\n\n/**\n * @description Merges components configuration with ui theme configuration\n * @param uiThemeComponents theme components configuration\n * @param configurationComponents components configuration provided by user\n */\nconst mergeComponents = (\n  uiThemeComponents: IConfigurationComponents,\n  configurationComponents?: IConfigurationComponents,\n): IConfigurationComponents => {\n  if (!configurationComponents) return uiThemeComponents;\n  return deepmerge(uiThemeComponents, configurationComponents);\n};\n\n/**\n * @description Merges general configuration with ui theme configuration\n * @param uiThemeGeneral theme general configuration\n * @param configurationGeneral general configuration provided by user\n */\nconst mergeGeneral = (\n  uiThemeGeneral: FlowsGeneralTheme,\n  configurationGeneral?: FlowsGeneralTheme,\n): FlowsGeneralTheme => {\n  if (!configurationGeneral) return uiThemeGeneral;\n  return deepmerge(uiThemeGeneral, configurationGeneral);\n};\n\n/**\n * @description Merges ui theme configuration with provided by user configuration\n * @param uiThemeElements theme elements configuration\n * @param configurationElements elements configuration provided by user\n */\nconst mergeStepElements = (\n  uiThemeElements: IElement[],\n  configurationElements?: RecursivePartial<IElement>[],\n) => {\n  if (!configurationElements) return uiThemeElements;\n  // Elements update\n  const elements = uiThemeElements\n    .map(uiThemeElement => {\n      const configurationElement = configurationElements.find(e => e.id === uiThemeElement.id);\n      if (configurationElement) {\n        return deepmerge(uiThemeElement, configurationElement);\n      }\n      return uiThemeElement;\n    })\n    .filter(e => !e.disabled);\n\n  const newElements = configurationElements.filter(\n    element => !uiThemeElements.some(e => e.id === element.id),\n  );\n\n  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n  return [...elements, ...newElements].sort((e1, e2) => e1.orderIndex! - e2.orderIndex!);\n};\n","!function(e,t){if(\"object\"===typeof exports&&\"object\"===typeof module)module.exports=t();else if(\"function\"===typeof define&&define.amd)define([],t);else{var n=t();for(var i in n)(\"object\"===typeof exports?exports:e)[i]=n[i]}}(this,function(){return function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,\"a\",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p=\"\",t(t.s=4)}([function(e,t,n){\"use strict\";n.d(t,\"b\",function(){return o}),n.d(t,\"c\",function(){return a});var i=n(1),r=n(7);n.d(t,\"a\",function(){return r.a}),n.d(t,\"d\",function(){return i.b});var o=i.a.FACING_MODES,a=i.a.IMAGE_TYPES},function(e,t,n){\"use strict\";var i=n(6);n.d(t,\"a\",function(){return i.a});var r=n(2);n.d(t,\"b\",function(){return r.a})},function(e,t,n){\"use strict\";function i(e,t){if(!(t>=0&&t<=1))throw new Error(t+\" is invalid imageCompression, choose between: [0, 1]\");if(!l.f.includes(e))throw new Error(e+\" is invalid imageType, choose between: \"+l.f.join(\", \"));return!0}function r(e,t){var n={};try{i(e,t),n.imageType=e,n.imageCompression=t}catch(e){console.error(e),console.error(\"default value of \"+l.c.PNG+\" is used\"),n.imageType=l.c.PNG,n.imageCompression=null}return n}function o(){var e=window.navigator.platform,t=window.navigator.userAgent;return e||t}function a(){return\"ontouchend\"in document}function u(e,t,n){var i=e*parseFloat(n);return{imageWidth:i,imageHeight:t/(e/i)}}function c(e,t,n){return r(t,n).imageType===l.c.JPG?n?e.toDataURL(l.b[l.c.JPG],n):e.toDataURL(l.b[l.c.JPG]):e.toDataURL(l.b[t])}function s(e,t){return e||t}function f(){var e=o();if(/iPad|iPhone|iPod/.test(e))return!0;var t=a();return!(!/Mac/.test(e)||!t)}function d(){return{userAgent:window.navigator.userAgent,platform:window.navigator.platform,_getStringWithPlatform:o(),_getHasTouchEvents:a(),getIsIOS:f()}}t.c=u,t.b=c,t.e=s,t.d=f,t.a=d;var l=n(3)},function(e,t,n){\"use strict\";function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,\"e\",function(){return o}),n.d(t,\"a\",function(){return a}),n.d(t,\"f\",function(){return u}),n.d(t,\"c\",function(){return c}),n.d(t,\"b\",function(){return s}),n.d(t,\"d\",function(){return f});var r,o=[\"user\",\"environment\"],a={USER:\"user\",ENVIRONMENT:\"environment\"},u=[\"jpg\",\"png\"],c={PNG:\"png\",JPG:\"jpg\"},s=(r={},i(r,\"jpg\",\"image/jpeg\"),i(r,\"png\",\"image/png\"),r),f={audio:!1,video:!0}},function(e,t,n){e.exports=n(5)},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(0);n.d(t,\"FACING_MODES\",function(){return i.b}),n.d(t,\"IMAGE_TYPES\",function(){return i.c}),n.d(t,\"_getDebugPlatformInfo\",function(){return i.d});var r=n(9);n.d(t,\"downloadPhoto\",function(){return r.a}),t.default=i.a},function(e,t,n){\"use strict\";function i(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}n.d(t,\"a\",function(){return u});var r=n(2),o=n(3),a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,\"value\"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=function(){function e(){i(this,e)}return a(e,null,[{key:\"getDataUri\",value:function(e,t){var n=t.sizeFactor,i=t.imageType,o=t.imageCompression,a=t.isImageMirror,u=e.videoWidth,c=e.videoHeight,s=Object(r.c)(u,c,n),f=s.imageWidth,d=s.imageHeight,l=document.createElement(\"canvas\");l.width=f,l.height=d;var v=l.getContext(\"2d\");return a&&v.setTransform(-1,0,0,1,l.width,0),v.drawImage(e,0,0,f,d),Object(r.b)(l,i,o)}},{key:\"getWindowURL\",value:function(){return window.URL||window.webkitURL||window.mozURL||window.msURL}},{key:\"getNavigatorMediaDevices\",value:function(){var e=null,t=!(!navigator.mediaDevices||!navigator.mediaDevices.getUserMedia),n=!(!navigator.mozGetUserMedia&&!navigator.webkitGetUserMedia);if(t)e=navigator.mediaDevices;else if(n){var i=navigator.mozGetUserMedia||navigator.webkitGetUserMedia,r={getUserMedia:function(e){return new Promise(function(t,n){i.call(navigator,e,t,n)})}};e=Object.assign(i,r)}return e}},{key:\"isSupportedFacingMode\",value:function(){return e.getNavigatorMediaDevices().getSupportedConstraints().facingMode}},{key:\"getIdealConstraints\",value:function(t,n){if(!Object(r.e)(t,n))return o.d;var i=e.getNavigatorMediaDevices().getSupportedConstraints();if(!i.width||!i.height)return console.error(\"Constraint width or height not supported! fallback to default resolution\"),o.d;var a=void 0,u=void 0;if(t){o.e.includes(t)?a=t:u={exact:t}}return{audio:!1,video:{facingMode:a,deviceId:u,width:n&&n.width,height:n&&n.height}}}},{key:\"getMaxResolutionConstraints\",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:\"\",n=arguments[1];console.warn(\"getMaxResolutionConstraints() numberOfMaxResolutionTry:\",n);var i=[{width:{min:640}},{width:{min:800}},{width:{min:900}},{width:{min:1024}},{width:{min:1080}},{width:{min:1280}},{width:{min:1920}},{width:{min:2560}},{width:{min:3840}}],o=e.getIdealConstraints(t,{});if(0===n){if(Object(r.d)()){console.warn(\"fallback to iOS constraints\");return e.getIdealConstraints(t,{width:{min:640,ideal:3840},height:{min:480,ideal:2160}})}return o.video.advanced=i,o}if(n<i.length){var a=i.slice(0,-n);return o.video.advanced=a,o}return null}},{key:\"FACING_MODES\",get:function(){return o.a}},{key:\"IMAGE_TYPES\",get:function(){return o.c}}]),e}()},function(e,t,n){\"use strict\";function i(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}n.d(t,\"a\",function(){return c});var r=n(1),o=n(8),a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,\"value\"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=r.a.IMAGE_TYPES.PNG,c=function(){function e(t){i(this,e),this.videoElement=t,this.stream=null,this.numberOfMaxResolutionTry=0,this.settings=null,this.cameras=[],this.windowURL=r.a.getWindowURL(),this.mediaDevices=r.a.getNavigatorMediaDevices()}return a(e,[{key:\"_getStreamDevice\",value:function(e,t){var n=this;return new Promise(function(i,o){var a=r.a.getIdealConstraints(e,t);n.mediaDevices.getUserMedia(a).then(function(e){n._gotStream(e),i(e)}).catch(function(e){o(e)})})}},{key:\"_getStreamDeviceMaxResolution\",value:function(e){var t=this,n=r.a.getMaxResolutionConstraints(e,this.numberOfMaxResolutionTry);if(null==n){var i={};return this._getStreamDevice(e,i)}return new Promise(function(i,r){t.mediaDevices.getUserMedia(n).then(function(e){t._gotStream(e),i(e)}).catch(function(n){setTimeout(function(){t.numberOfMaxResolutionTry+=1,t._getStreamDeviceMaxResolution(e).catch(function(){r(n)})},20)})})}},{key:\"_setVideoSrc\",value:function(e){if(\"srcObject\"in this.videoElement)this.videoElement.srcObject=e;else{var t=this.windowURL.createObjectURL(e);this.videoElement.src=t}}},{key:\"_setSettings\",value:function(e){this.settings=null;var t=e&&e.getTracks?e.getTracks():[];t.length>0&&t[0].getSettings&&(this.settings=t[0].getSettings())}},{key:\"_enumerateCamerasPromise\",value:function(){var e=this;return new Promise(function(t,n){var i=[];e.mediaDevices.enumerateDevices().then(function(e){e.forEach(function(e){\"videoinput\"===e.kind&&e.deviceId&&i.push(e)}),t(i)}).catch(function(e){n(e)})})}},{key:\"_gotStream\",value:function(e){this.stream=e,this._setSettings(e),this._setVideoSrc(e)}},{key:\"getCameraSettings\",value:function(){return this.settings}},{key:\"enumerateCameras\",value:function(){var e=this;return this.stream?this._enumerateCamerasPromise():this.stopCamera().then(function(){}).catch(function(){}).then(function(){var t={video:!0};return e.mediaDevices.getUserMedia(t).then(function(e){setTimeout(function(){e.getTracks().forEach(function(e){e.stop()})},20)}).then(function(){}).catch(function(){}).then(function(){return e._enumerateCamerasPromise()})})}},{key:\"startCamera\",value:function(e,t){var n=this;return this.stopCamera().then(function(){}).catch(function(){}).then(function(){return n._getStreamDevice(e,t)})}},{key:\"startCameraMaxResolution\",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:\"\";return this.numberOfMaxResolutionTry=0,this.stopCamera().then(function(){}).catch(function(){}).then(function(){return e._getStreamDeviceMaxResolution(t)})}},{key:\"getDataUri\",value:function(e){var t={sizeFactor:void 0===e.sizeFactor?o.c:e.sizeFactor,imageType:void 0===e.imageType?u:e.imageType,imageCompression:void 0===e.imageCompression?o.a:e.imageCompression,isImageMirror:void 0===e.isImageMirror?o.b:e.isImageMirror};return r.a.getDataUri(this.videoElement,t)}},{key:\"stopCamera\",value:function(){var e=this;return new Promise(function(t,n){e.stream&&(e.stream.getTracks().forEach(function(e){e.stop()}),e.videoElement.src=\"\",e.stream=null,e._setSettings(null),t()),n(Error(\"no stream to stop!\"))})}}]),e}()},function(e,t,n){\"use strict\";n.d(t,\"c\",function(){return i}),n.d(t,\"a\",function(){return r}),n.d(t,\"b\",function(){return o});var i=1,r=null,o=!1},function(e,t,n){\"use strict\";var i=n(10);n.d(t,\"a\",function(){return i.a})},function(e,t,n){\"use strict\";function i(e){for(var t=atob(e.split(\",\")[1]),n=e.split(\",\")[0].split(\":\")[1].split(\";\")[0],i=new ArrayBuffer(t.length),r=new Uint8Array(i),o=0;o<t.length;o++)r[o]=t.charCodeAt(o);return new Blob([i],{type:n})}function r(e,t){return e+=\"\",e.length>=t?e:new Array(t-e.length+1).join(\"0\")+e}function o(e){var t=s.c.PNG;return\"image/jpeg\"===e&&(t=s.c.JPG),t}function a(e,t,n){return e+\"-\"+r(t,4)+\".\"+o(n)}function u(e,t,n){window.URL=window.webkitURL||window.URL;var i=document.createElement(\"a\");i.download=a(t,n,e.type),i.href=window.URL.createObjectURL(e);var r=document.createEvent(\"MouseEvents\");r.initMouseEvent(\"click\",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,0,null),i.dispatchEvent(r)}function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:\"photo\",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;u(i(e),t,n)}t.a=c;var s=n(0)}])});\n//# sourceMappingURL=index.js.map","import { ICSSProperties } from './types';\n\nexport const cssProperties: (keyof ICSSProperties)[] = [\n  'margin',\n  'padding',\n  'font-family',\n  'font-size',\n  'font-weight',\n  'line-height',\n  'vertical-align',\n  'width',\n  'height',\n  'background',\n  'color',\n  'border-radius',\n  'border',\n  'display',\n  'align-items',\n  'text-align',\n  'justify-content',\n  'cursor',\n  'position',\n  'top',\n  'bottom',\n  'left',\n  'right',\n  'hover',\n  'active',\n  'box-shadow',\n  '-webkit-box-shadow',\n  'flex-direction',\n  'align-self',\n  'fill',\n  'flex-grow',\n  'background-position-y',\n  'outline',\n  'z-index',\n];\n\nexport const hexTransparencies = {\n  100: 'FF',\n  99: 'FC',\n  98: 'FA',\n  97: 'F7',\n  96: 'F5',\n  95: 'F2',\n  94: 'F0',\n  93: 'ED',\n  92: 'EB',\n  91: 'E8',\n  90: 'E6',\n  89: 'E3',\n  88: 'E0',\n  87: 'DE',\n  86: 'DB',\n  85: 'D9',\n  84: 'D6',\n  83: 'D4',\n  82: 'D1',\n  81: 'CF',\n  80: 'CC',\n  79: 'C9',\n  78: 'C7',\n  77: 'C4',\n  76: 'C2',\n  75: 'BF',\n  74: 'BD',\n  73: 'BA',\n  72: 'B8',\n  71: 'B5',\n  70: 'B3',\n  69: 'B0',\n  68: 'AD',\n  67: 'AB',\n  66: 'A8',\n  65: 'A6',\n  64: 'A3',\n  63: 'A1',\n  62: '9E',\n  61: '9C',\n  60: '99',\n  59: '96',\n  58: '94',\n  57: '91',\n  56: '8F',\n  55: '8C',\n  54: '8A',\n  53: '87',\n  52: '85',\n  51: '82',\n  50: '80',\n  49: '7D',\n  48: '7A',\n  47: '78',\n  46: '75',\n  45: '73',\n  44: '70',\n  43: '6E',\n  42: '6B',\n  41: '69',\n  40: '66',\n  39: '63',\n  38: '61',\n  37: '5E',\n  36: '5C',\n  35: '59',\n  34: '57',\n  33: '54',\n  32: '52',\n  31: '4F',\n  30: '4D',\n  29: '4A',\n  28: '47',\n  27: '45',\n  26: '42',\n  25: '40',\n  24: '3D',\n  23: '3B',\n  22: '38',\n  21: '36',\n  20: '33',\n  19: '30',\n  18: '2E',\n  17: '2B',\n  16: '29',\n  15: '26',\n  14: '24',\n  13: '21',\n  12: '1F',\n  11: '1C',\n  10: '1A',\n  9: '17',\n  8: '14',\n  7: '12',\n  6: '0F',\n  5: '0D',\n  4: '0A',\n  3: '08',\n  2: '05',\n  1: '03',\n  0: '00',\n};\n","import { cssProperties, hexTransparencies } from './constants';\nimport { ICSSProperties, IOpacityColor } from './types';\n\nconst setBackgroundWithOpacity = (\n  style: IOpacityColor,\n  styles: string[],\n  prefix = '',\n): string[] => {\n  if (style.color.includes('primary')) {\n    const app = document.getElementById('blrn-app') as HTMLDivElement;\n    const color = getComputedStyle(app).getPropertyValue('--general-colors-primary');\n    return [\n      ...styles,\n      `--${prefix}background: ${color}${\n        hexTransparencies[Math.round(style.opacity * 100) as keyof typeof hexTransparencies]\n      };`,\n    ];\n  }\n  return styles;\n};\n\nexport const makeStylesFromConfiguration = (\n  globalComponentStyles: ICSSProperties = {},\n  configStyles: ICSSProperties = {},\n): string => {\n  let styles: string[] = [];\n\n  const setProperties = (\n    globalCss: ICSSProperties,\n    localCss: ICSSProperties,\n    property: keyof ICSSProperties,\n    prefix = '',\n  ) => {\n    if (localCss && localCss[property]) {\n      if (typeof localCss[property] === 'object' && property === 'background') {\n        styles = setBackgroundWithOpacity(localCss[property] as IOpacityColor, styles, prefix);\n        return;\n      }\n      styles.push(`--${prefix}${property}: ${String(localCss[property])};`);\n      return;\n    }\n    if (globalCss && globalCss[property]) {\n      if (typeof globalCss[property] === 'object' && property === 'background') {\n        styles = setBackgroundWithOpacity(globalCss[property] as IOpacityColor, styles, prefix);\n        return;\n      }\n      styles.push(`--${prefix}${property}: ${String(globalCss[property])};`);\n      return;\n    }\n  };\n\n  cssProperties.map(property => {\n    if (property === 'hover') {\n      cssProperties.map(hoverProperty => {\n        const globalHoverProperties = globalComponentStyles.hover as ICSSProperties;\n        const localHoverProperties = configStyles.hover as ICSSProperties;\n        setProperties(globalHoverProperties, localHoverProperties, hoverProperty, 'hover-');\n      });\n      return;\n    }\n    if (property === 'active') {\n      cssProperties.map(property => {\n        const globalActiveProperties = globalComponentStyles.active as ICSSProperties;\n        const localActiveHoverProperties = configStyles.active as ICSSProperties;\n        setProperties(globalActiveProperties, localActiveHoverProperties, property, 'active-');\n      });\n      return;\n    }\n    setProperties(globalComponentStyles, configStyles, property);\n  });\n\n  return styles.join('\\n');\n};\n\nexport const makesLocalStyles = (configStyles: ICSSProperties) => {\n  let styles: string[] = [];\n\n  const setProperties = (css: ICSSProperties, property: keyof ICSSProperties, prefix = '') => {\n    if (typeof css[property] === 'object' && property === 'background') {\n      styles = setBackgroundWithOpacity(css[property] as IOpacityColor, styles, prefix);\n      return;\n    }\n    if (css[property]) styles.push(`--${prefix}${property}: ${String(css[property])};`);\n  };\n\n  cssProperties.map(property => {\n    if (property === 'hover' && configStyles.hover) {\n      cssProperties.map(hoverProperty => {\n        const cssHoverProperties = configStyles.hover as ICSSProperties;\n        setProperties(cssHoverProperties, hoverProperty, 'hover-');\n      });\n      return;\n    }\n    if (property === 'active' && configStyles.active) {\n      cssProperties.map(property => {\n        const cssActiveProperties = configStyles.active as ICSSProperties;\n        setProperties(cssActiveProperties, property, 'active-');\n      });\n      return;\n    }\n    setProperties(configStyles, property);\n  });\n\n  return styles.join('\\n');\n};\n","<script lang=\"ts\">\n  import {\n    configuration as globalConfiguration,\n    IElementProps,\n  } from '../../contexts/configuration';\n  import { makeStylesFromConfiguration } from '../../services/css-manager';\n\n  export let configuration: IElementProps;\n  export let isBack = false;\n\n  const background = !isBack\n    ? $globalConfiguration.components?.button?.background ||\n      $globalConfiguration.general?.colors?.primary\n    : undefined;\n\n  const styleProps = {\n    ...configuration?.style,\n    background,\n  };\n\n  const buttonConfiguration = isBack\n    ? configuration?.style\n    : $globalConfiguration.components?.button;\n\n  const style = makeStylesFromConfiguration(buttonConfiguration, styleProps);\n</script>\n\n<button {style} on:click>\n  <slot />\n</button>\n\n<style>\n  button {\n    cursor: pointer;\n    border: var(--border);\n    outline: none;\n    padding: var(--padding);\n    font-size: var(--font-size);\n    font-weight: var(--font-weight);\n    width: var(--width);\n    background: var(--background);\n    color: var(--color);\n    border-radius: var(--border-radius);\n    box-shadow: var(--box-shadow);\n    margin: var(--margin);\n    z-index: 1;\n  }\n</style>\n","<script lang=\"ts\">\n  import merge from 'deepmerge';\n  import { configuration } from '../../../contexts/configuration';\n  import { ICSSProperties, makesLocalStyles } from '../../../services/css-manager';\n\n  const loader = {\n    background: $configuration.general?.colors.primary,\n  };\n\n  const styleProps = merge(loader, $configuration.loader ?? {}) as ICSSProperties;\n\n  const style = makesLocalStyles(styleProps);\n</script>\n\n<div {style} class=\"loader small\" />\n\n<style>\n  .loader {\n    border-radius: 50%;\n    animation: loader-rotate 1s linear infinite;\n  }\n\n  .small {\n    width: 41px;\n    height: 41px;\n    border: 4px solid #fff;\n    border-right-color: transparent;\n  }\n\n  @keyframes loader-rotate {\n    0% {\n      transform: rotate(0);\n    }\n    100% {\n      transform: rotate(360deg);\n    }\n  }\n</style>\n","<script lang=\"ts\">\n  import { goToNextStep } from '../../contexts/navigation';\n  import type { IElementProps } from '../../contexts/configuration';\n  import { configuration as globalConfiguration } from '../../contexts/configuration';\n  import { currentStepId } from '../../contexts/app-state';\n  import { makeStylesFromConfiguration } from '../../services/css-manager';\n  import { Loader } from './Loader';\n\n  // TODO: Use the createToggle hook, and make sure an exported prop is not being mutated.\n  export let isDisabled = false;\n  export let isLoading = false;\n  export let configuration: IElementProps;\n  export let skipType: string;\n\n  const background =\n    $globalConfiguration.components?.button?.background ||\n    $globalConfiguration.general?.colors?.primary;\n\n  const styleProps = {\n    ...configuration?.style,\n    background,\n  };\n\n  const style = makeStylesFromConfiguration(\n    $globalConfiguration.components?.button || {},\n    styleProps,\n  );\n\n  let disabled: boolean;\n  const onClick = () => {\n    if (disabled) return;\n\n    goToNextStep(currentStepId, $globalConfiguration, $currentStepId, skipType);\n    isDisabled = true;\n  };\n\n  $: disabled = isDisabled || isLoading;\n</script>\n\n<button {style} {disabled} on:click={onClick}>\n  {#if isLoading}\n    <div class=\"loader-container\">\n      <Loader />\n    </div>\n  {/if}\n  <slot />\n</button>\n\n<style>\n  button:disabled .loader-container {\n    margin-inline-end: 1rem;\n  }\n\n  button {\n    cursor: pointer;\n    border: none;\n    outline: none;\n    padding: var(--padding);\n    font-size: var(--font-size);\n    font-weight: var(--font-weight);\n    width: var(--width);\n    background: var(--background);\n    color: var(--color);\n    border-radius: var(--border-radius);\n    box-shadow: var(--box-shadow);\n    margin: var(--margin);\n    position: var(--position);\n    bottom: var(--bottom);\n    left: var(--left);\n  }\n\n  button:disabled {\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    cursor: not-allowed;\n    opacity: 0.5;\n  }\n</style>\n","<script lang=\"ts\">\n  import {\n    configuration as globalConfiguration,\n    IElementProps,\n  } from '../../contexts/configuration';\n  import { ICSSProperties } from '../../services/css-manager';\n  import { getComponentStyles } from '../../ui-packs';\n\n  export let configuration: IElementProps;\n  const styleProps = configuration.style as ICSSProperties;\n  const style = getComponentStyles($globalConfiguration.components?.title || {}, styleProps);\n</script>\n\n<h1 {style}>\n  <slot />\n</h1>\n\n<style>\n  h1 {\n    font-size: var(--font-size);\n    font-weight: var(--font-weight);\n    margin: var(--margin);\n    width: var(--width);\n    padding: var(--padding);\n    text-align: var(--text-align);\n    color: var(--color);\n    align-self: var(--align-self);\n    z-index: 2;\n  }\n</style>\n","<script lang=\"ts\">\n  import {\n    configuration as globalConfiguration,\n    IElementProps,\n    IAttributes,\n  } from '../../contexts/configuration';\n  import { ICSSProperties } from '../../services/css-manager';\n  import { getComponentStyles } from '../../ui-packs';\n\n  export let configuration: IElementProps;\n  const styleProps = configuration.style as ICSSProperties;\n  const attributes = configuration.attributes as IAttributes;\n  const style = getComponentStyles($globalConfiguration.components?.image || {}, styleProps);\n</script>\n\n<div {style} height={attributes.height} width={attributes.width} class=\"container\">\n  {@html attributes.src}\n</div>\n\n<style>\n  .container {\n    margin: var(--margin);\n    position: var(--position);\n    display: var(--display);\n    align-items: var(--align-items);\n    justify-content: var(--justify-content);\n    top: var(--top);\n    bottom: var(--bottom);\n    right: var(--right);\n    left: var(--left);\n    flex-grow: var(--flex-grow, 0);\n    text-align: center;\n  }\n  .container > :global(svg) {\n    max-width: 100%;\n    width: var(--width);\n  }\n</style>\n","<script lang=\"ts\">\n  import {\n    configuration as globalConfiguration,\n    IElementProps,\n  } from '../../contexts/configuration';\n  import { ICSSProperties } from '../../services/css-manager';\n  import { getComponentStyles } from '../../ui-packs';\n\n  export let configuration: IElementProps;\n  export let active = false;\n\n  const styleProps = configuration.style as ICSSProperties;\n\n  const style = getComponentStyles($globalConfiguration.components?.paragraph || {}, styleProps);\n</script>\n\n<p {style} class:active>\n  <slot />\n</p>\n\n<style>\n  p {\n    transition: all 0.1s ease-in;\n    font-size: var(--font-size);\n    font-weight: var(--font-weight);\n    margin: var(--margin);\n    text-align: var(--text-align);\n    color: var(--color);\n    z-index: 2;\n    align-self: var(--align-self);\n  }\n  p.active {\n    color: var(--active-color);\n  }\n</style>\n","<script lang=\"ts\">\n  import {\n    configuration as globalConfiguration,\n    IElementProps,\n  } from '../../contexts/configuration';\n  import { ICSSProperties } from '../../services/css-manager';\n  import { getComponentStyles } from '../../ui-packs';\n\n  export let configuration: IElementProps;\n  export let active = false;\n  const styleProps = configuration.style as ICSSProperties;\n\n  const style = getComponentStyles($globalConfiguration.components?.container || {}, styleProps);\n</script>\n\n<div {style} class=\"container\" class:active>\n  <slot />\n</div>\n\n<style>\n  .container {\n    margin: var(--margin);\n    padding: var(--padding);\n    width: var(--width);\n    min-width: var(--width);\n    height: var(--height);\n    background: var(--background);\n    border-radius: var(--border-radius);\n    display: var(--display);\n    align-items: var(--align-items);\n    justify-content: var(--justify-content);\n    transition: all 0.1s ease-in;\n  }\n  .container.active {\n    background: var(--active-background);\n  }\n</style>\n","<script lang=\"ts\">\n  import {\n    configuration as globalConfiguration,\n    IAttributes,\n    IElementProps,\n  } from '../../contexts/configuration';\n  import { ICSSProperties } from '../../services/css-manager';\n  import { getComponentStyles } from '../../ui-packs';\n\n  export let configuration: IElementProps;\n  const styleProps = configuration.style as ICSSProperties;\n  const attributes = configuration.attributes as IAttributes;\n\n  const style = getComponentStyles($globalConfiguration.components?.iconButton || {}, styleProps);\n</script>\n\n<button {style} on:click width={attributes.width} height={attributes.height}>\n  {@html attributes.src}\n</button>\n\n<style>\n  button {\n    cursor: pointer;\n    border: none;\n    outline: none;\n    width: var(--width);\n    min-width: var(--width);\n    height: var(--height);\n    background: var(--background);\n    border-radius: var(--border-radius);\n    position: var(--position);\n    display: var(--display);\n    align-items: var(--align-items);\n    justify-content: var(--justify-content);\n    top: var(--top);\n    left: var(--left);\n    right: var(--right);\n    z-index: 3;\n  }\n</style>\n","<script lang=\"ts\">\n  import {\n    configuration as globalConfiguration,\n    IAttributes,\n    IElementProps,\n  } from '../../contexts/configuration';\n  import { getComponentStyles } from '../../ui-packs';\n  import { ICSSProperties } from '../../services/css-manager';\n\n  export let configuration: IElementProps;\n  const styleProps = configuration.style as ICSSProperties;\n  const attributes = configuration.attributes as IAttributes;\n\n  const style = getComponentStyles(\n    $globalConfiguration.components?.buttonWithIcon || {},\n    styleProps,\n  );\n</script>\n\n<button {style} on:click>\n  <slot />\n  <img\n    src={attributes.src}\n    alt={attributes.alt}\n    width={attributes.width}\n    height={attributes.height}\n  />\n</button>\n\n<style>\n  button {\n    cursor: pointer;\n    display: flex;\n    justify-content: space-between;\n    border: none;\n    outline: none;\n    padding: var(--padding);\n    font-size: var(--font-size);\n    width: var(--width);\n    background: var(--background);\n    color: var(--color);\n    border-radius: var(--border-radius);\n  }\n</style>\n","<script lang=\"ts\">\n  import merge from 'deepmerge';\n  import { configuration } from '../../contexts/configuration';\n  import { ICSSProperties, makesLocalStyles } from '../../services/css-manager';\n\n  export let size: 'small' | 'medium' = 'medium';\n  export let fullPage = true;\n\n  const loader = {\n    background: $configuration.general?.colors?.primary as string,\n  };\n\n  const styleProps = merge(loader, $configuration.components?.loader || {}) as ICSSProperties;\n\n  const style = makesLocalStyles(styleProps);\n</script>\n\n{#if fullPage}\n  <div class=\"container\">\n    <div class=\"loader-wrapper\">\n      <div {style} class:small={size === 'small'} class:medium={size === 'medium'} class=\"loader\" />\n    </div>\n  </div>\n{:else}\n  <div class=\"loader-wrapper\">\n    <div {style} class:small={size === 'small'} class:medium={size === 'medium'} class=\"loader\" />\n  </div>\n{/if}\n\n<style>\n  .container {\n    width: 100%;\n    height: 100%;\n    top: 0px;\n    left: 0px;\n    position: absolute;\n    display: flex;\n    justify-content: center;\n    align-items: center;\n    background: 'transparent';\n  }\n\n  .loader-wrapper {\n    position: relative;\n  }\n\n  .loader {\n    position: relative;\n    top: 50%;\n    margin: -28px auto 0;\n    border-radius: 50%;\n    animation: loader-rotate 1s linear infinite;\n  }\n\n  .small {\n    width: 41px;\n    height: 41px;\n    border: 4px solid var(--background);\n    border-right-color: transparent;\n  }\n\n  .medium {\n    width: 56px;\n    height: 56px;\n    border: 8px solid var(--background);\n    border-right-color: transparent;\n  }\n\n  .small::after {\n    content: '';\n    width: 4px;\n    height: 4px;\n    background: var(--background);\n    border-radius: 50%;\n    position: absolute;\n    top: 1px;\n    left: 27px;\n  }\n\n  .medium::after {\n    content: '';\n    width: 8px;\n    height: 8px;\n    background: var(--background);\n    border-radius: 50%;\n    position: absolute;\n    top: -1px;\n    left: 33px;\n  }\n\n  @keyframes loader-rotate {\n    0% {\n      transform: rotate(0);\n    }\n    100% {\n      transform: rotate(360deg);\n    }\n  }\n</style>\n","<script lang=\"ts\">\n  import merge from 'deepmerge';\n  import {\n    configuration as globalConfiguration,\n    IElementProps,\n  } from '../../contexts/configuration';\n  import { ICSSProperties, makeStylesFromConfiguration } from '../../services/css-manager';\n  import Loader from '../Loader/Loader.svelte';\n\n  export let configuration: IElementProps;\n  export let src: string;\n  const styleProps = configuration.style as ICSSProperties;\n\n  const defaultStyle = {\n    'border-radius': $globalConfiguration.general?.borderRadius,\n  };\n\n  const style = makeStylesFromConfiguration(\n    merge(defaultStyle, $globalConfiguration.components?.photo || {}),\n    styleProps,\n  );\n</script>\n\n<div class=\"container\">\n  {#if src}\n    <img {src} alt=\"result\" {style} />\n  {:else}\n    <Loader size=\"small\" fullPage={false} />\n  {/if}\n</div>\n\n<style>\n  div.container {\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    flex: 1;\n  }\n  img {\n    border-radius: var(--border-radius);\n    margin: var(--margin);\n    max-width: 100%;\n    max-height: 35vh;\n    animation: slide-in-bottom 0.8s linear both;\n  }\n  @keyframes slide-in-bottom {\n    0% {\n      transform: translateY(20px);\n      opacity: 0;\n    }\n    70% {\n      transform: translateY(-5px);\n      opacity: 1;\n    }\n    100% {\n      transform: translateY(0);\n      opacity: 1;\n    }\n  }\n</style>\n","<script lang=\"ts\">\n  import {\n    configuration as globalConfiguration,\n    IElementProps,\n  } from '../../contexts/configuration';\n  import { ICSSProperties, makeStylesFromConfiguration } from '../../services/css-manager';\n\n  export let configuration: IElementProps;\n  export let isDisabled = false;\n  const styleProps = configuration.style as ICSSProperties;\n\n  const style = makeStylesFromConfiguration(\n    $globalConfiguration.components?.cameraButton || {},\n    styleProps,\n  );\n</script>\n\n<button {style} on:click aria-label=\"take picture\" disabled={isDisabled}>\n  <span class=\"inner-container\" />\n</button>\n\n<style>\n  button {\n    margin: var(--margin);\n    width: 76px;\n    height: 76px;\n    border-radius: 50%;\n    border: 5px solid #fff;\n    display: flex;\n    justify-content: center;\n    align-items: center;\n    background: transparent;\n    outline: none;\n    cursor: pointer;\n    z-index: 2;\n  }\n\n  .inner-container {\n    width: 64px;\n    height: 64px;\n    min-width: 64px;\n    background: #fff;\n    border-radius: 50%;\n  }\n\n  button:disabled {\n    opacity: 0.5;\n    cursor: not-allowed;\n  }\n</style>\n","<script lang=\"ts\">\n  import {\n    configuration as globalConfiguration,\n    IElementProps,\n  } from '../../contexts/configuration';\n  import { ICSSProperties, makeStylesFromConfiguration } from '../../services/css-manager';\n\n  export let configuration: IElementProps;\n  export let isSelfie = false;\n\n  const styleProps = configuration.style as ICSSProperties;\n\n  const style = makeStylesFromConfiguration(\n    $globalConfiguration.components?.videoContainer || {},\n    styleProps,\n  );\n</script>\n\n<div class=\"container\" class:mirror={isSelfie} {style}>\n  <slot />\n</div>\n\n<style>\n  .container {\n    display: flex;\n    align-items: center;\n    justify-content: center;\n  }\n  .mirror :global(video) {\n    transform: rotateY(180deg);\n  }\n  .container :global(video) {\n    position: absolute;\n    width: 100%;\n    height: 100%;\n    top: 0px;\n    left: 0px;\n    right: 0;\n    bottom: 0;\n    object-fit: cover;\n    z-index: 1;\n  }\n</style>\n","<script lang=\"ts\">\n  import { IElementProps } from '../../contexts/configuration';\n  import { ICSSProperties, makesLocalStyles } from '../../services/css-manager';\n\n  export let configuration: IElementProps;\n  const styleProps = configuration.style as ICSSProperties;\n\n  const style = makesLocalStyles(styleProps);\n</script>\n\n<li {style}>\n  <slot />\n</li>\n\n<style>\n  li {\n    font-size: var(--font-size);\n    font-weight: var(--font-weight);\n    margin: var(--margin);\n    text-align: var(--text-align);\n    color: var(--color);\n    z-index: 2;\n  }\n</style>\n","<script lang=\"ts\">\n  import { onDestroy } from 'svelte';\n  import { fly } from 'svelte/transition';\n\n  type Text = {\n    text: string;\n    startTime: number;\n    endTime: number | 'infinity';\n  };\n\n  export let texts: Text[];\n\n  let text = '';\n\n  const intervals: NodeJS.Timeout[] = [];\n\n  for (const item of texts) {\n    const start = setTimeout(() => {\n      text = item.text;\n    }, item.startTime);\n\n    intervals.push(start);\n\n    if (item.endTime !== 'infinity') {\n      const end = setTimeout(() => {\n        text = '';\n      }, item.endTime);\n\n      intervals.push(end);\n    }\n  }\n\n  onDestroy(() => {\n    for (const interval of intervals) {\n      clearInterval(interval);\n    }\n  });\n</script>\n\n{#key text}\n  <p in:fly={{ y: 16 }} out:fly={{ y: 16 }}>{text}</p>\n{/key}\n\n<style>\n  p {\n    font-size: 16px;\n    line-height: 1;\n    margin: 0;\n  }\n</style>\n","import { DocumentType } from '../../contexts/app-state';\nimport { TDocumentType } from '../../contexts/app-state/types';\n\nexport const getOverlayDocumentType = (\n  documentType: TDocumentType,\n): 'card' | 'passport' | 'a4' | 'selfie' => {\n  const cardOverlayDocumentTypes: TDocumentType[] = [\n    DocumentType.DRIVERS_LICENSE,\n    DocumentType.RESIDENCE_PERMIT,\n    DocumentType.ID_CARD,\n    DocumentType.VOTER_ID,\n    DocumentType.WORK_PERMIT,\n    DocumentType.VISA,\n  ];\n\n  if (cardOverlayDocumentTypes.includes(documentType)) {\n    return 'card';\n  }\n  if (documentType === DocumentType.PASSPORT) {\n    return 'passport';\n  }\n  if (documentType === DocumentType.SELFIE) {\n    return 'selfie';\n  }\n  return 'a4';\n};\n","import { SvelteComponent } from 'svelte';\nimport { TSteps } from '../configuration/types';\n\nexport const DocumentType = {\n  PASSPORT: 'passport', // CARD\n  DRIVERS_LICENSE: 'drivers_license', // CARD\n  RESIDENCE_PERMIT: 'residence_permit', // CARD\n  ID_CARD: 'id_card', // CARD\n  VOTER_ID: 'voter_id', // CARD\n  WORK_PERMIT: 'work_permit', // CARD\n  VISA: 'visa', // CARD\n  BANK_STATEMENT: 'bank_statement', // A4\n  PROOF_OF_BUSINESS_TAX_ID: 'proof_of_business_tax_id', // A4\n  OPERATING_LICENSE: 'operating_license', // A4\n  BUSINESS_REGISTRATION: 'business_registration', // A4\n  SELFIE: 'selfie',\n} as const;\n\nexport type ObjectValues<TObject> = TObject[keyof TObject];\n\nexport type TDocumentType = ObjectValues<typeof DocumentType>;\n\nexport const DocumentKind = {\n  PASSPORT: 'passport',\n  ID_CARD: 'id_card',\n  DRIVERS_LICENSE: 'drivers_license',\n  SELFIE: 'selfie',\n  VOTER_ID: 'voter_id',\n  IFE_CARD: 'ife_card',\n  INE_CARD: 'ine_card',\n} as const;\n\nexport type TDocumentKind = ObjectValues<typeof DocumentKind>;\n\nexport const DocumentVariant = {\n  A4: 'a4',\n  REGULAR: 'regular',\n} as const;\n\nexport type TDocumentVariant = ObjectValues<typeof DocumentVariant>;\n\nexport interface IDocumentInfo {\n  backSide: boolean;\n  variant: TDocumentVariant;\n  type: TDocumentType;\n  kind: TDocumentKind;\n  orderIndex: number;\n}\n\nexport type IPageSide = 'front' | 'back';\nexport interface IDocumentPage {\n  base64?: string;\n  uri?: string;\n  side: IPageSide;\n}\n\nexport interface IDocument {\n  type: TDocumentType;\n  kind?: TDocumentKind;\n  metadata: Record<string, string>;\n  pages: IDocumentPage[];\n}\n\nexport interface IStoreData {\n  docs: IDocument[];\n  selectedDocumentInfo?: IDocumentInfo;\n  selfie?: string;\n}\n\nexport interface IStep {\n  name: TSteps;\n  id: string;\n  component: typeof SvelteComponent;\n}\n\nexport interface IStore {\n  currentStepIndex: number;\n  data: IStoreData;\n}\n\nexport const DecisionStatus = {\n  APPROVED: 'approved',\n  RESUBMISSION_REQUESTED: 'resubmission_requested',\n  DECLINED: 'declined',\n  EXPIRED: 'expired',\n  ABANDONED: 'abandoned',\n  REVIEW: 'review',\n} as const;\n\nexport type TDecisionStatus = ObjectValues<typeof DecisionStatus>;\n\nexport interface DevMocks {\n  resultTime: number | string;\n  reasonCode: number;\n  code: number;\n  idvResult: TDecisionStatus;\n}\n\nexport interface IAppState {\n  currentStepIdx: number;\n  currentPage: string;\n  previousPage: string;\n}\n\nexport type ISelectedParams = Record<string, string | boolean>;\n","<script lang=\"ts\">\n  import { getOverlayDocumentType } from './utils';\n  import { TDocumentType } from '../../contexts/app-state/types';\n\n  export let type: TDocumentType;\n\n  const overlayType = getOverlayDocumentType(type);\n</script>\n\n<div class=\"overlay-container\">\n  <div class=\"overlay {overlayType}\" />\n</div>\n\n<style>\n  .overlay-container {\n    flex: 1;\n    width: 100%;\n    display: flex;\n    justify-content: center;\n    align-items: center;\n  }\n  .overlay {\n    z-index: 1;\n    position: relative;\n    margin: 10px 0px 0px 0px;\n    max-height: 100%;\n    -webkit-box-shadow: 0px 0px 0px 1000px rgba(0, 0, 0, 0.7);\n    -moz-box-shadow: 0px 0px 0px 1000px rgba(0, 0, 0, 0.7);\n    box-shadow: 0px 0px 0px 1000px rgba(0, 0, 0, 0.7);\n    border: 3px solid #ffffff4d;\n    width: 100%;\n  }\n  .overlay.card {\n    border-radius: 12px;\n    aspect-ratio: 4/3;\n  }\n  .overlay.passport {\n    border-radius: 12px;\n    aspect-ratio: 3/4;\n    width: 90%;\n    max-height: 80%;\n  }\n  .overlay.a4 {\n    border-radius: 12px;\n    aspect-ratio: 3/4;\n    max-width: 80%;\n  }\n  .overlay.selfie {\n    border-radius: 100%;\n    aspect-ratio: 3/4;\n    max-height: 80%;\n    width: 80%;\n  }\n</style>\n","<script lang=\"ts\">\n  import {\n    configuration as globalConfiguration,\n    IAttributes,\n    IElementProps,\n  } from '../../contexts/configuration';\n  import { getComponentStyles } from '../../ui-packs';\n  import { ICSSProperties } from '../../services/css-manager';\n\n  export let configuration: IElementProps;\n  const styleProps = configuration.style as ICSSProperties;\n  const attributes = configuration.attributes as IAttributes;\n\n  const style = getComponentStyles(\n    $globalConfiguration.components?.iconCloseButton || {},\n    styleProps,\n  );\n</script>\n\n<button {style} on:click>\n  {@html attributes.src}\n</button>\n\n<style>\n  button {\n    cursor: pointer;\n    border: none;\n    outline: none;\n    width: var(--width);\n    min-width: var(--width);\n    height: var(--height);\n    background: var(--background);\n    border-radius: var(--border-radius);\n    position: var(--position);\n    display: var(--display);\n    align-items: var(--align-items);\n    justify-content: var(--justify-content);\n    top: var(--top);\n    left: var(--left);\n    right: var(--right);\n    z-index: 3;\n  }\n</style>\n","import { IAppConfiguration } from '../configuration';\nimport { IFlow } from './types';\n\nconst FLOW_STORE_KEY = 'flow';\n\nexport const setFlowName = (flows: { [key: string]: IFlow }, name: string | null) => {\n  if (name && flows[name]) return sessionStorage.setItem(FLOW_STORE_KEY, name);\n\n  const savedFlow = sessionStorage.getItem(FLOW_STORE_KEY);\n\n  if (!savedFlow || !flows[savedFlow]) sessionStorage.setItem(FLOW_STORE_KEY, 'default');\n};\n\nexport const getFlowName = (): string => sessionStorage.getItem(FLOW_STORE_KEY) || 'default';\n\nexport const getFlowOrders = (configuration: IAppConfiguration) => {\n  const flowName = sessionStorage.getItem(FLOW_STORE_KEY);\n  if (!flowName) {\n    return new Error(\"Flow name wasn't provided\");\n  }\n  const flowConfiguration = configuration.flows[flowName];\n  if (!flowConfiguration || !flowConfiguration.steps) {\n    return new Error(`Flow configuration doesn't exist for the name: ${flowName}`);\n  }\n  return flowConfiguration.steps.map(s => s.id);\n};\n\nexport const getFlowConfig = (configuration: IAppConfiguration): IFlow => {\n  const flowName = sessionStorage.getItem(FLOW_STORE_KEY);\n  if (!flowName) {\n    throw new Error(\"Flow name wasn't provided\");\n  }\n  const flowConfiguration = configuration.flows[flowName];\n  if (!flowConfiguration) {\n    throw new Error(`Flow configuration doesn't exist for the name: ${flowName}`);\n  }\n  return flowConfiguration;\n};\n\nexport const isNativeCamera = (configuration: IAppConfiguration): boolean => {\n  const flowName = sessionStorage.getItem(FLOW_STORE_KEY) as string;\n  const flowConfiguration = configuration.flows[flowName];\n  return !!flowConfiguration?.mobileNativeCamera;\n};\n","import { Languages, TranslationType } from '../../contexts/translation';\nimport { texts } from '../../services/configuration-manager';\n\nexport const getListLength = <\n  TLanguage extends Languages,\n  TNamespace extends keyof TranslationType[TLanguage],\n>(\n  language: TLanguage,\n  namespace: TNamespace,\n) => {\n  const list = texts[language][namespace];\n\n  return Object.keys(list as Record<PropertyKey, unknown>).length - 1;\n};\n","<script lang=\"ts\">\n  import { ListItem, Title } from '../../atoms';\n  import {\n    configuration as globalConfiguration,\n    IElementProps,\n  } from '../../contexts/configuration';\n  import { getFlowName } from '../../contexts/flows';\n  import { currentLanguage, T, TranslationType } from '../../contexts/translation';\n  import { ICSSProperties, makeStylesFromConfiguration } from '../../services/css-manager';\n  import { getListLength } from './utils';\n  import { uiPack } from '../../ui-packs';\n\n  export let configuration: IElementProps;\n\n  const globalListProps =\n    ($globalConfiguration.list?.listProps as IElementProps) || $uiPack.list.listProps;\n  const globalListStyles = globalListProps.style as ICSSProperties;\n  const titleProps =\n    ($globalConfiguration.list?.titleProps as IElementProps) || $uiPack.list.titleProps;\n  const listElementProps =\n    ($globalConfiguration.list?.listElementProps as IElementProps) || $uiPack.list.listElementProps;\n\n  const style = makeStylesFromConfiguration(globalListStyles, configuration.style);\n\n  const flowId = getFlowName();\n  // There's no list-${flowId} key in the translations json.\n  const listItems = new Array(\n    getListLength($currentLanguage, `list-${flowId}` as TranslationType[typeof $currentLanguage]),\n  ).fill(null);\n</script>\n\n<div {style} class=\"container\">\n  <Title configuration={titleProps}>\n    <T key=\"title\" namespace={`list-${flowId}`} />\n  </Title>\n  {#each listItems as item, index}\n    <ListItem configuration={listElementProps}>\n      <T key={`item-${index + 1}`} namespace={`list-${flowId}`} />\n    </ListItem>\n  {/each}\n</div>\n\n<style>\n  .container {\n    margin: var(--margin);\n    padding: var(--padding);\n    align-items: var(--align-items);\n    text-align: var(--text-align);\n    justify-content: var(--justify-content);\n  }\n</style>\n","import { ObjectValues, TDecisionStatus } from '../../contexts/app-state/types';\n\nexport const EventTypes = {\n  SYNC_FLOW_COMPLETE: 'sync_flow_complete',\n  ASYNC_FLOW_COMPLETE: 'async_flow_complete',\n  VERIFICATION_UPDATE: 'verification_update',\n  NAVIGATION_UPDATE: 'navigation_update',\n  BUTTON_CLICK: 'button_click',\n  FLOW_ERROR: 'flow_error',\n} as const;\n\nexport type TEventTypes = ObjectValues<typeof EventTypes>;\n\nexport const ActionNames = {\n  CLOSE: 'close',\n};\n\nexport type TActionNames = ObjectValues<typeof ActionNames>;\n\nexport const VerificationStatuses = {\n  COMPLETED: 'completed',\n  PENDING: 'pending',\n  ERROR: 'error',\n  DATA_COLLECTION: 'data_collection',\n} as const;\n\nexport type TVerificationStatuses = ObjectValues<typeof VerificationStatuses>;\n\nexport interface ISendDocumentsResponse {\n  status: 'success' | 'fail';\n}\n\nexport interface IDocumentVerificationResponse {\n  status: TVerificationStatuses;\n  idvResult?: TDecisionStatus;\n  code?: number;\n  reasonCode?: number;\n}\n\nexport interface IOuterEvent {\n  eventName: string;\n  config: Record<string, string>;\n  shouldExit: boolean;\n}\n","export const FlowEventTypes = {\n  FLOW_COMPLETE: 'FLOW_COMPLETE',\n  FLOW_EXIT: 'FLOW_EXIT',\n  FLOW_ERROR: 'FLOW_ERROR',\n  FLOW_NAVIGATION_UPDATE: 'FLOW_NAVIGATION_UPDATE',\n} as const;\nexport type FlowEventType = keyof typeof FlowEventTypes;\n","import { getFlowConfig } from '../../contexts/flows/hooks';\nimport { get } from 'svelte/store';\nimport { configuration } from '../../contexts/configuration';\nimport { FlowEventBusFn } from './interfaces';\nimport { FlowEventTypes } from './enums';\n\nexport const flowEventBus: FlowEventBusFn = ({ type, payload }) => {\n  const { callbacks } = getFlowConfig(get(configuration));\n\n  switch (type) {\n    case FlowEventTypes.FLOW_COMPLETE:\n      callbacks?.onFlowComplete?.(payload);\n      break;\n    case FlowEventTypes.FLOW_EXIT:\n      callbacks?.onFlowExit?.(payload);\n      break;\n    case FlowEventTypes.FLOW_ERROR:\n      callbacks?.onFlowError?.(payload);\n      break;\n    case FlowEventTypes.FLOW_NAVIGATION_UPDATE:\n      callbacks?.onFlowNavigationUpdate?.(payload);\n      break;\n    default:\n      throw new Error(`Unknown flow event type ${JSON.stringify(type)}`);\n  }\n};\n","export const BALLERINE_EVENT = 'blrn_event';\n","import { appState, IAppState } from '../../contexts/app-state';\nimport { currentLanguage, Languages } from '../../contexts/translation';\nimport { EventTypes, IDocumentVerificationResponse, IOuterEvent, TActionNames } from './types';\nimport { get } from 'svelte/store';\nimport { flowEventBus } from '../../services/flow-event-bus/flow-event-bus';\nimport { FlowEventTypes } from '../../services/flow-event-bus/enums';\nimport { BALLERINE_EVENT } from './constants';\nimport { IEventOptions, IFlowErrorPayload } from '../../services/flow-event-bus/interfaces';\nimport { configuration } from '../../contexts/configuration';\nimport { getFlowConfig } from '../../contexts/flows/hooks';\nimport { IFlowCompletePayload } from '../../services/flow-event-bus/interfaces';\n\nexport const subscribe = () => {\n  window.addEventListener('message', e => {\n    const event = e.data as IOuterEvent;\n    if (event.eventName === 'blrn_set_lang') {\n      const language = event.config.lang as Languages;\n      currentLanguage.set(language);\n    }\n  });\n};\n\nexport const sendIframeEvent = (eventOptions: IEventOptions) => {\n  window.parent.postMessage(eventOptions, '*'); // iframe\n};\n\n// without arguments sending events without payload\nexport const sendFlowCompleteEvent = (verificationResponse?: IDocumentVerificationResponse) => {\n  const { syncFlow } = getFlowConfig(get(configuration));\n  const { status, idvResult } = verificationResponse ?? {};\n  const eventOptions: IFlowCompletePayload = {\n    eventName: BALLERINE_EVENT,\n    eventType: syncFlow ? EventTypes.SYNC_FLOW_COMPLETE : EventTypes.ASYNC_FLOW_COMPLETE,\n    payload: {\n      // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n      status: status!,\n      code: -1,\n      idvResult,\n    },\n  };\n\n  sendIframeEvent(eventOptions);\n  // Should finalize the signature on the callbacks interface\n  flowEventBus({\n    type: FlowEventTypes.FLOW_COMPLETE,\n    payload: eventOptions,\n  });\n};\n\nexport const sendVerificationUpdateEvent = (\n  details: IDocumentVerificationResponse,\n  shouldExit = false,\n) => {\n  const eventOptions = {\n    eventName: BALLERINE_EVENT,\n    eventType: EventTypes.VERIFICATION_UPDATE,\n    shouldExit,\n    details,\n  };\n  window.parent.postMessage(eventOptions, '*');\n};\n\nexport const sendNavigationUpdateEvent = () => {\n  const as = get(appState);\n\n  const eventOptions = {\n    eventName: BALLERINE_EVENT,\n    eventType: EventTypes.NAVIGATION_UPDATE,\n    details: {\n      currentIdx: as.currentStepIdx,\n      // FIXME: currentPage and previousPage typed as a string by IAppState.\n      currentPage: as.currentPage,\n      previousPage: as.previousPage,\n    },\n  };\n  window.parent.postMessage(eventOptions, '*');\n  flowEventBus({\n    type: FlowEventTypes.FLOW_NAVIGATION_UPDATE,\n    payload: eventOptions,\n  });\n};\n\nexport const sendButtonClickEvent = (\n  actionName: TActionNames,\n  status: IDocumentVerificationResponse,\n  as: IAppState,\n  shouldExit = false,\n) => {\n  const eventOptions = {\n    eventName: BALLERINE_EVENT,\n    eventType: EventTypes.BUTTON_CLICK,\n    shouldExit,\n    details: {\n      actionName,\n      currentIdx: as.currentStepIdx,\n      currentPage: as.currentPage,\n      status,\n    },\n  };\n\n  window.parent.postMessage(eventOptions, '*');\n};\n\nexport const sendFlowErrorEvent = (_error: Error, _shouldExit = false) => {\n  // const as = get(appState);\n\n  const eventOptions: IFlowErrorPayload = {\n    eventName: BALLERINE_EVENT,\n    eventType: EventTypes.FLOW_ERROR,\n    payload: {},\n    // shouldExit: shouldExit,\n    // details: {\n    //   currentIdx: as.currentStepIdx,\n    //   currentPage: as.currentPage,\n    // },\n  };\n  window.parent.postMessage(eventOptions, '*');\n  flowEventBus({\n    type: FlowEventTypes.FLOW_ERROR,\n    payload: eventOptions,\n  });\n};\n","import { Writable } from 'svelte/store';\nimport { IAppConfiguration, IStepConfiguration } from '../../contexts/configuration';\nimport { getFlowName } from '../../contexts/flows';\nimport { getNextStepId } from '../../contexts/navigation';\n\nconst preloadByExtension = async (src: string): Promise<string> => {\n  if (src.includes('</svg>')) return src;\n  const extension = src.split('.').pop();\n  let svg: string | undefined;\n\n  if (extension === 'svg') {\n    const response = await fetch(src);\n\n    svg = await response.text();\n  }\n\n  return new Promise((resolve, reject) => {\n    if (svg) return resolve(svg);\n\n    const img = new Image();\n    img.onload = () => resolve(img.src);\n    img.onerror = reject;\n    img.src = src;\n  });\n};\n\nexport const preloadStepImages = async (step: IStepConfiguration): Promise<IStepConfiguration> => {\n  const elements = [];\n  for (const element of step.elements) {\n    if (element.props.attributes?.src) {\n      const src = await preloadByExtension(element.props.attributes?.src);\n      elements.push({\n        ...element,\n        props: {\n          ...element.props,\n          attributes: {\n            ...element.props.attributes,\n            src,\n          },\n        },\n      });\n    } else {\n      elements.push(element);\n    }\n  }\n  return {\n    ...step,\n    elements,\n  };\n};\n\n// To prevent preload twice\nconst preloadedSteps: Record<string, Record<string, boolean>> = {};\n\nlet isPreloadingInProgress = false;\n\nexport const preloadNextStepByCurrent = async (\n  globalConfiguration: IAppConfiguration,\n  configuration: Writable<IAppConfiguration>,\n  currentStepId: string,\n  skipType?: string,\n) => {\n  if (isPreloadingInProgress) {\n    return setTimeout(() => {\n      void preloadNextStepByCurrent(globalConfiguration, configuration, currentStepId, skipType);\n    }, 100);\n  }\n  isPreloadingInProgress = true;\n  const flowName: string = getFlowName();\n  const nextStepId = getNextStepId(globalConfiguration, currentStepId, skipType);\n  if (!nextStepId || (preloadedSteps[flowName] && preloadedSteps[flowName][nextStepId])) {\n    isPreloadingInProgress = false;\n    return;\n  }\n  const steps = globalConfiguration.flows[flowName].steps as IStepConfiguration[];\n  const step = steps.find(s => s.id === nextStepId) as IStepConfiguration;\n  const updatedStep = await preloadStepImages(step);\n  const updatedSteps = steps.map(s => (s.id === nextStepId ? updatedStep : s));\n  const updatedConfiguration: IAppConfiguration = {\n    ...globalConfiguration,\n    flows: {\n      ...globalConfiguration.flows,\n      [flowName]: {\n        ...globalConfiguration.flows[flowName],\n        steps: updatedSteps,\n      },\n    },\n  };\n  configuration.set(updatedConfiguration);\n  if (!preloadedSteps[flowName]) preloadedSteps[flowName] = {};\n  preloadedSteps[flowName][nextStepId] = true;\n  isPreloadingInProgress = false;\n};\n\nexport const preloadStepById = async (\n  globalConfiguration: IAppConfiguration,\n  configuration: Writable<IAppConfiguration>,\n  stepId: string,\n  flowName: string,\n) => {\n  const steps = globalConfiguration.flows[flowName].steps as IStepConfiguration[];\n  const step = steps.find(s => s.id === stepId) as IStepConfiguration;\n  const updatedStep = await preloadStepImages(step);\n  const updatedSteps = steps.map(step => (step.id === updatedStep.id ? updatedStep : step));\n  const updatedConfiguration: IAppConfiguration = {\n    ...globalConfiguration,\n    flows: {\n      ...globalConfiguration.flows,\n      [flowName]: {\n        ...globalConfiguration.flows[flowName],\n        steps: updatedSteps,\n      },\n    },\n  };\n  configuration.set(updatedConfiguration);\n};\n","<script lang=\"ts\">\n  import { IconButton, IconCloseButton, Image, NextStepButton, Paragraph, Title } from '../atoms';\n  import { configuration } from '../contexts/configuration';\n  import { Elements } from '../contexts/configuration/types';\n  import List from '../molecules/List/List.svelte';\n  import { T } from '../contexts/translation';\n  import { sendButtonClickEvent } from '../utils/event-service/utils';\n  import { appState } from '../contexts/app-state';\n  import { preloadNextStepByCurrent } from '../services/preload-service';\n  import { ActionNames, VerificationStatuses } from '../utils/event-service';\n  import { getLayoutStyles, getStepConfiguration } from '../ui-packs';\n  import { getFlowConfig } from '../contexts/flows/hooks';\n\n  export let stepId;\n\n  const step = getStepConfiguration($configuration, stepId);\n  const flow = getFlowConfig($configuration);\n  const style = getLayoutStyles($configuration, step);\n\n  const stepNamespace = step.namespace!;\n\n  preloadNextStepByCurrent($configuration, configuration, stepId);\n</script>\n\n<div class=\"container\" {style}>\n  {#each step.elements as element}\n    {#if element.type === Elements.IconButton && flow.firstScreenBackButton}\n      <div>\n        <IconButton\n          configuration={element.props}\n          on:click={() => {\n            sendButtonClickEvent(\n              ActionNames.CLOSE,\n              { status: VerificationStatuses.DATA_COLLECTION },\n              $appState,\n              true,\n            );\n          }}\n        />\n      </div>\n    {/if}\n    {#if element.type === Elements.IconCloseButton && flow.showCloseButton}\n      <IconCloseButton\n        configuration={element.props}\n        on:click={() => {\n          sendButtonClickEvent(\n            ActionNames.CLOSE,\n            { status: VerificationStatuses.DATA_COLLECTION },\n            $appState,\n            true,\n          );\n        }}\n      />\n    {/if}\n    {#if element.type === Elements.Image}\n      <Image configuration={element.props} />\n    {/if}\n    {#if element.type === Elements.Title}\n      <Title configuration={element.props}>\n        <T key=\"title\" namespace={stepNamespace} />\n      </Title>\n    {/if}\n    {#if element.type === Elements.Paragraph}\n      <Paragraph configuration={element.props}>\n        <T key={element.props.context || 'description'} namespace={stepNamespace} />\n      </Paragraph>\n    {/if}\n    {#if element.type === Elements.List}\n      <List configuration={element.props} />\n    {/if}\n    {#if element.type === Elements.Button}\n      <NextStepButton configuration={element.props}>\n        <T key=\"button\" namespace={stepNamespace} />\n      </NextStepButton>\n    {/if}\n  {/each}\n</div>\n\n<style>\n  .container {\n    display: flex;\n    flex-direction: column;\n    height: 100%;\n    padding: var(--padding);\n    position: var(--position);\n    background: var(--background);\n    line-height: var(--line-height);\n    text-align: center;\n  }\n</style>\n","<svg width=\"41\" height=\"41\" viewBox=\"0 0 41 41\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n  <rect x=\"3\" y=\"3\" width=\"35\" height=\"35\" rx=\"17.5\" fill=\"var(--general-colors-primary)\" />\n  <rect\n    x=\"3\"\n    y=\"3\"\n    width=\"35\"\n    height=\"35\"\n    rx=\"17.5\"\n    stroke=\"var(--general-colors-primary)\"\n    stroke-opacity=\"0.2\"\n    stroke-width=\"5\"\n  />\n  <path\n    fill-rule=\"evenodd\"\n    clip-rule=\"evenodd\"\n    d=\"M12.8167 16.8333C12.8167 15.3973 13.9807 14.2333 15.4167 14.2333H25.5833C27.0193 14.2333 28.1833 15.3973 28.1833 16.8333V24.1666C28.1833 25.6026 27.0193 26.7666 25.5833 26.7666H15.4167C13.9807 26.7666 12.8167 25.6026 12.8167 24.1666V16.8333ZM15.4167 15.4333C14.6435 15.4333 14.0167 16.0601 14.0167 16.8333V24.1666C14.0167 24.9398 14.6435 25.5666 15.4167 25.5666H25.5833C26.3565 25.5666 26.9833 24.9398 26.9833 24.1666V16.8333C26.9833 16.0601 26.3565 15.4333 25.5833 15.4333H15.4167ZM16.0042 19.4374C16.0042 18.3237 16.907 17.4208 18.0208 17.4208C19.1346 17.4208 20.0375 18.3237 20.0375 19.4374C20.0375 19.9311 19.8601 20.3834 19.5656 20.7339C20.2785 21.2254 20.7458 22.0477 20.7458 22.9791C20.7458 23.3105 20.4772 23.5791 20.1458 23.5791C19.8144 23.5791 19.5458 23.3105 19.5458 22.9791C19.5458 22.1369 18.8631 21.4541 18.0208 21.4541C17.1786 21.4541 16.4958 22.1369 16.4958 22.9791C16.4958 23.3105 16.2272 23.5791 15.8958 23.5791C15.5644 23.5791 15.2958 23.3105 15.2958 22.9791C15.2958 22.0477 15.7631 21.2254 16.4761 20.7339C16.1815 20.3834 16.0042 19.9311 16.0042 19.4374ZM18.0208 18.6208C17.5698 18.6208 17.2042 18.9864 17.2042 19.4374C17.2042 19.8885 17.5698 20.2541 18.0208 20.2541C18.4719 20.2541 18.8375 19.8885 18.8375 19.4374C18.8375 18.9864 18.4719 18.6208 18.0208 18.6208ZM21.3166 19.0833C21.3166 18.7519 21.5853 18.4833 21.9166 18.4833H24.75C25.0814 18.4833 25.35 18.7519 25.35 19.0833C25.35 19.4146 25.0814 19.6833 24.75 19.6833H21.9166C21.5853 19.6833 21.3166 19.4146 21.3166 19.0833ZM22.625 21.3166C22.2936 21.3166 22.025 21.5852 22.025 21.9166C22.025 22.248 22.2936 22.5166 22.625 22.5166H24.75C25.0814 22.5166 25.35 22.248 25.35 21.9166C25.35 21.5852 25.0814 21.3166 24.75 21.3166H22.625Z\"\n    fill=\"white\"\n  />\n</svg>\n","<svg width=\"41\" height=\"41\" viewBox=\"0 0 41 41\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n  <rect x=\"3\" y=\"3\" width=\"35\" height=\"35\" rx=\"17.5\" fill=\"var(--general-colors-primary)\" />\n  <rect\n    x=\"3\"\n    y=\"3\"\n    width=\"35\"\n    height=\"35\"\n    rx=\"17.5\"\n    stroke=\"var(--general-colors-primary)\"\n    stroke-opacity=\"0.2\"\n    stroke-width=\"5\"\n  />\n  <path\n    fill-rule=\"evenodd\"\n    clip-rule=\"evenodd\"\n    d=\"M16 13H25C26.1046 13 27 13.8954 27 15V26C27 27.1046 26.1046 28 25 28H16C14.8954 28 14 27.1046 14 26V15C14 13.8954 14.8954 13 16 13ZM13 15C13 13.3431 14.3431 12 16 12H25C26.6569 12 28 13.3431 28 15V26C28 27.6569 26.6569 29 25 29H16C14.3431 29 13 27.6569 13 26V15ZM19.3626 17.7811C19.5921 17.3986 19.8307 17.1657 20.05 17.0363V20.05H18.7152C18.7773 19.1333 19.0253 18.3432 19.3626 17.7811ZM19.0297 16.7251C18.3606 17.4506 17.8964 18.6568 17.8134 20.05H16.4747C16.6429 18.5288 17.6535 17.2615 19.0297 16.7251ZM19.0297 24.2749C18.3606 23.5494 17.8964 22.3432 17.8134 20.95H16.4747C16.6429 22.4712 17.6535 23.7385 19.0297 24.2749ZM19.3626 23.2189C19.5921 23.6014 19.8307 23.8343 20.05 23.9637V20.95H18.7152C18.7773 21.8667 19.0253 22.6568 19.3626 23.2189ZM24.5253 20.95C24.3571 22.4711 23.3465 23.7384 21.9704 24.2748C22.6395 23.5493 23.1037 22.3431 23.1867 20.95H24.5253ZM21.6375 23.2189C21.9748 22.6568 22.2228 21.8667 22.2849 20.95H20.95L20.95 23.9638C21.1693 23.8344 21.408 23.6015 21.6375 23.2189ZM24.5253 20.05H23.1867C23.1037 18.6569 22.6395 17.4507 21.9704 16.7252C23.3465 17.2616 24.3571 18.5289 24.5253 20.05ZM21.6375 17.7811C21.408 17.3985 21.1693 17.1656 20.95 17.0362L20.95 20.05H22.2849C22.2228 19.1333 21.9748 18.3432 21.6375 17.7811ZM20.5 15.55C17.7662 15.55 15.55 17.7662 15.55 20.5C15.55 23.2338 17.7662 25.45 20.5 25.45C23.2338 25.45 25.45 23.2338 25.45 20.5C25.45 17.7662 23.2338 15.55 20.5 15.55Z\"\n    fill=\"white\"\n  />\n</svg>\n","<svg width=\"41\" height=\"41\" viewBox=\"0 0 41 41\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n  <rect x=\"3\" y=\"3\" width=\"35\" height=\"35\" rx=\"17.5\" fill=\"var(--general-colors-primary)\" />\n  <rect\n    x=\"3\"\n    y=\"3\"\n    width=\"35\"\n    height=\"35\"\n    rx=\"17.5\"\n    stroke=\"var(--general-colors-primary)\"\n    stroke-opacity=\"0.2\"\n    stroke-width=\"5\"\n  />\n  <path\n    fill-rule=\"evenodd\"\n    clip-rule=\"evenodd\"\n    d=\"M15.6655 15.7143C15.7693 15.2691 16.1661 14.9542 16.6232 14.9542H24.4164C24.8769 14.9542 25.2758 15.2737 25.3761 15.7232C25.3785 15.7336 25.3811 15.7439 25.3839 15.7542L26.2568 18.8707C26.3024 19.0337 26.4148 19.1699 26.5662 19.2456L26.8354 19.3802C27.4368 19.6809 27.8166 20.2955 27.8166 20.9678V23.8542C27.8166 24.1786 27.5536 24.4417 27.2291 24.4417H26.4387C26.1073 24.4417 25.8387 24.7103 25.8387 25.0417V25.4375C25.8387 25.9806 25.3984 26.4208 24.8554 26.4208C24.3107 26.4208 23.8708 25.9803 23.8708 25.4375V25.0417C23.8708 24.7103 23.6021 24.4417 23.2708 24.4417H17.7291C17.3977 24.4417 17.1291 24.7103 17.1291 25.0417V25.4376C17.1291 25.9806 16.6889 26.4208 16.1459 26.4208C15.6029 26.4208 15.1627 25.9806 15.1627 25.4376V25.0417C15.1627 24.7103 14.894 24.4417 14.5627 24.4417H13.7708C13.4463 24.4417 13.1833 24.1786 13.1833 23.8542V20.9684C13.1833 20.2959 13.5634 19.6811 14.165 19.3805L14.435 19.2457C14.5844 19.171 14.6959 19.0375 14.7428 18.8771L15.6571 15.7463C15.6602 15.7357 15.663 15.725 15.6655 15.7143ZM16.6232 13.7542C15.6142 13.7542 14.7376 14.4453 14.501 15.4245L13.6643 18.2892L13.6287 18.307C12.6204 18.8108 11.9833 19.8412 11.9833 20.9684V23.8542C11.9833 24.8414 12.7836 25.6417 13.7708 25.6417H13.9721C14.075 26.7517 15.0089 27.6208 16.1459 27.6208C17.2828 27.6208 18.2168 26.7517 18.3197 25.6417H22.6802C22.7832 26.752 23.7175 27.6208 24.8554 27.6208C25.9923 27.6208 26.9263 26.7518 27.0293 25.6417H27.2291C28.2163 25.6417 29.0166 24.8414 29.0166 23.8542V20.9678C29.0166 19.841 28.38 18.8109 27.3721 18.3069L27.3406 18.2912L26.5435 15.4448C26.3145 14.4558 25.4331 13.7542 24.4164 13.7542H16.6232ZM17.3332 22.0729C17.3332 22.6194 16.8901 23.0625 16.3436 23.0625C15.7971 23.0625 15.354 22.6194 15.354 22.0729C15.354 21.5264 15.7971 21.0833 16.3436 21.0833C16.8901 21.0833 17.3332 21.5264 17.3332 22.0729ZM24.6561 23.0625C25.2026 23.0625 25.6457 22.6194 25.6457 22.0729C25.6457 21.5264 25.2026 21.0833 24.6561 21.0833C24.1096 21.0833 23.6665 21.5264 23.6665 22.0729C23.6665 22.6194 24.1096 23.0625 24.6561 23.0625ZM16.9375 18.5042C16.6061 18.5042 16.3375 18.7728 16.3375 19.1042C16.3375 19.4355 16.6061 19.7042 16.9375 19.7042H24.0625C24.3939 19.7042 24.6625 19.4355 24.6625 19.1042C24.6625 18.7728 24.3939 18.5042 24.0625 18.5042H16.9375Z\"\n    fill=\"white\"\n  />\n</svg>\n","<svg width=\"41\" height=\"41\" viewBox=\"0 0 41 41\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n  <rect x=\"3\" y=\"3\" width=\"35\" height=\"35\" rx=\"17.5\" fill=\"var(--general-colors-primary)\" />\n  <rect\n    x=\"3\"\n    y=\"3\"\n    width=\"35\"\n    height=\"35\"\n    rx=\"17.5\"\n    stroke=\"var(--general-colors-primary)\"\n    stroke-opacity=\"0.2\"\n    stroke-width=\"5\"\n  />\n  <path\n    fill-rule=\"evenodd\"\n    clip-rule=\"evenodd\"\n    d=\"M16 13H25C26.1046 13 27 13.8954 27 15V26C27 27.1046 26.1046 28 25 28H16C14.8954 28 14 27.1046 14 26V15C14 13.8954 14.8954 13 16 13ZM13 15C13 13.3431 14.3431 12 16 12H25C26.6569 12 28 13.3431 28 15V26C28 27.6569 26.6569 29 25 29H16C14.3431 29 13 27.6569 13 26V15ZM19.3626 17.7811C19.5921 17.3986 19.8307 17.1657 20.05 17.0363V20.05H18.7152C18.7773 19.1333 19.0253 18.3432 19.3626 17.7811ZM19.0297 16.7251C18.3606 17.4506 17.8964 18.6568 17.8134 20.05H16.4747C16.6429 18.5288 17.6535 17.2615 19.0297 16.7251ZM19.0297 24.2749C18.3606 23.5494 17.8964 22.3432 17.8134 20.95H16.4747C16.6429 22.4712 17.6535 23.7385 19.0297 24.2749ZM19.3626 23.2189C19.5921 23.6014 19.8307 23.8343 20.05 23.9637V20.95H18.7152C18.7773 21.8667 19.0253 22.6568 19.3626 23.2189ZM24.5253 20.95C24.3571 22.4711 23.3465 23.7384 21.9704 24.2748C22.6395 23.5493 23.1037 22.3431 23.1867 20.95H24.5253ZM21.6375 23.2189C21.9748 22.6568 22.2228 21.8667 22.2849 20.95H20.95L20.95 23.9638C21.1693 23.8344 21.408 23.6015 21.6375 23.2189ZM24.5253 20.05H23.1867C23.1037 18.6569 22.6395 17.4507 21.9704 16.7252C23.3465 17.2616 24.3571 18.5289 24.5253 20.05ZM21.6375 17.7811C21.408 17.3985 21.1693 17.1656 20.95 17.0362L20.95 20.05H22.2849C22.2228 19.1333 21.9748 18.3432 21.6375 17.7811ZM20.5 15.55C17.7662 15.55 15.55 17.7662 15.55 20.5C15.55 23.2338 17.7662 25.45 20.5 25.45C23.2338 25.45 25.45 23.2338 25.45 20.5C25.45 17.7662 23.2338 15.55 20.5 15.55Z\"\n    fill=\"white\"\n  />\n</svg>\n","<svg width=\"41\" height=\"41\" viewBox=\"0 0 41 41\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n  <rect x=\"3\" y=\"3\" width=\"35\" height=\"35\" rx=\"17.5\" fill=\"var(--general-colors-primary)\" />\n  <rect\n    x=\"3\"\n    y=\"3\"\n    width=\"35\"\n    height=\"35\"\n    rx=\"17.5\"\n    stroke=\"var(--general-colors-primary)\"\n    stroke-opacity=\"0.2\"\n    stroke-width=\"5\"\n  />\n  <path\n    fill-rule=\"evenodd\"\n    clip-rule=\"evenodd\"\n    d=\"M12.825 17.0589C12.8195 17.1427 12.8167 17.2273 12.8167 17.3125V23.6875C12.8167 25.7793 14.5124 27.475 16.6042 27.475H24.3959C26.4876 27.475 28.1834 25.7793 28.1834 23.6875V17.3125C28.1834 17.2272 28.1805 17.1425 28.175 17.0586C28.1805 17.026 28.1833 16.9925 28.1833 16.9583C28.1833 16.8782 28.1676 16.8018 28.1391 16.7319C27.8598 14.9158 26.2902 13.525 24.3959 13.525H16.6042C14.7099 13.525 13.1405 14.9156 12.8609 16.7316C12.8324 16.8016 12.8167 16.8781 12.8167 16.9583C12.8167 16.9926 12.8195 17.0262 12.825 17.0589ZM14.0167 17.5583V23.6875C14.0167 25.1165 15.1752 26.275 16.6042 26.275H24.3959C25.8249 26.275 26.9834 25.1165 26.9834 23.6875V17.5583H14.0167ZM26.8017 16.3583C26.4219 15.4015 25.4879 14.725 24.3959 14.725H16.6042C15.5121 14.725 14.5781 15.4015 14.1983 16.3583H26.8017ZM18.4834 20.5C18.4834 20.1686 18.752 19.9 19.0834 19.9H24.75C25.0814 19.9 25.35 20.1686 25.35 20.5C25.35 20.8314 25.0814 21.1 24.75 21.1H19.0834C18.752 21.1 18.4834 20.8314 18.4834 20.5ZM19.0834 22.7333C18.752 22.7333 18.4834 23.002 18.4834 23.3333C18.4834 23.6647 18.752 23.9333 19.0834 23.9333H24.75C25.0814 23.9333 25.35 23.6647 25.35 23.3333C25.35 23.002 25.0814 22.7333 24.75 22.7333H19.0834ZM15.6499 20.5C15.6499 20.1686 15.9186 19.9 16.2499 19.9H16.9583C17.2896 19.9 17.5583 20.1686 17.5583 20.5C17.5583 20.8314 17.2896 21.1 16.9583 21.1H16.2499C15.9186 21.1 15.6499 20.8314 15.6499 20.5ZM16.2499 22.7333C15.9186 22.7333 15.6499 23.002 15.6499 23.3333C15.6499 23.6647 15.9186 23.9333 16.2499 23.9333H16.9583C17.2896 23.9333 17.5583 23.6647 17.5583 23.3333C17.5583 23.002 17.2896 22.7333 16.9583 22.7333H16.2499Z\"\n    fill=\"white\"\n  />\n</svg>\n","<script lang=\"ts\">\n  import Card from './Card.svelte';\n  import Passport from './Passport.svelte';\n  import License from './License.svelte';\n  import PassportTwo from './PassportTwo.svelte';\n  import Voter from './Voter.svelte';\n  import { ICSSProperties, makesLocalStyles } from '../../services/css-manager';\n\n  import type { SvelteComponent } from 'svelte';\n  import type { Icons } from '../../contexts/configuration/types';\n  import type { IElementProps } from '../../contexts/configuration';\n\n  let icons: Record<Icons, typeof SvelteComponent> = {\n    Card,\n    Passport,\n    License,\n    PassportTwo,\n    Voter,\n  };\n\n  export let name: Icons = 'Card';\n  export let width: number | string = 16;\n  export let height: number | string = 16;\n  export let active = false;\n  export let configuration: IElementProps;\n\n  const style = makesLocalStyles(configuration.style as ICSSProperties);\n  const icon = icons[name];\n</script>\n\n<div {style} class=\"icon\" class:active>\n  <svelte:component this={icon} {height} {width} style=\"transition: fill 0.3s\" />\n</div>\n\n<style>\n  .icon {\n    display: contents;\n    fill: var(--fill);\n    color: var(--fill);\n  }\n  .icon.active {\n    fill: var(--active-fill);\n    color: var(--active-fill);\n  }\n</style>\n","/*!\n * Compressor.js v1.2.1\n * https://fengyuanchen.github.io/compressorjs\n *\n * Copyright 2018-present Chen Fengyuan\n * Released under the MIT license\n *\n * Date: 2023-02-28T14:09:41.732Z\n */\n\nfunction ownKeys(object, enumerableOnly) {\n  var keys = Object.keys(object);\n  if (Object.getOwnPropertySymbols) {\n    var symbols = Object.getOwnPropertySymbols(object);\n    enumerableOnly && (symbols = symbols.filter(function (sym) {\n      return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n    })), keys.push.apply(keys, symbols);\n  }\n  return keys;\n}\nfunction _objectSpread2(target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = null != arguments[i] ? arguments[i] : {};\n    i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {\n      _defineProperty(target, key, source[key]);\n    }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {\n      Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n    });\n  }\n  return target;\n}\nfunction _classCallCheck(instance, Constructor) {\n  if (!(instance instanceof Constructor)) {\n    throw new TypeError(\"Cannot call a class as a function\");\n  }\n}\nfunction _defineProperties(target, props) {\n  for (var i = 0; i < props.length; i++) {\n    var descriptor = props[i];\n    descriptor.enumerable = descriptor.enumerable || false;\n    descriptor.configurable = true;\n    if (\"value\" in descriptor) descriptor.writable = true;\n    Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);\n  }\n}\nfunction _createClass(Constructor, protoProps, staticProps) {\n  if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n  if (staticProps) _defineProperties(Constructor, staticProps);\n  Object.defineProperty(Constructor, \"prototype\", {\n    writable: false\n  });\n  return Constructor;\n}\nfunction _defineProperty(obj, key, value) {\n  key = _toPropertyKey(key);\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n  return obj;\n}\nfunction _extends() {\n  _extends = Object.assign ? Object.assign.bind() : function (target) {\n    for (var i = 1; i < arguments.length; i++) {\n      var source = arguments[i];\n      for (var key in source) {\n        if (Object.prototype.hasOwnProperty.call(source, key)) {\n          target[key] = source[key];\n        }\n      }\n    }\n    return target;\n  };\n  return _extends.apply(this, arguments);\n}\nfunction _toPrimitive(input, hint) {\n  if (typeof input !== \"object\" || input === null) return input;\n  var prim = input[Symbol.toPrimitive];\n  if (prim !== undefined) {\n    var res = prim.call(input, hint || \"default\");\n    if (typeof res !== \"object\") return res;\n    throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n  }\n  return (hint === \"string\" ? String : Number)(input);\n}\nfunction _toPropertyKey(arg) {\n  var key = _toPrimitive(arg, \"string\");\n  return typeof key === \"symbol\" ? key : String(key);\n}\n\nvar canvasToBlob = {exports: {}};\n\n/*\n * JavaScript Canvas to Blob\n * https://github.com/blueimp/JavaScript-Canvas-to-Blob\n *\n * Copyright 2012, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on stackoverflow user Stoive's code snippet:\n * http://stackoverflow.com/q/4998908\n */\n(function (module) {\n  if (typeof window === 'undefined') {\n    return;\n  }\n  (function (window) {\n\n    var CanvasPrototype = window.HTMLCanvasElement && window.HTMLCanvasElement.prototype;\n    var hasBlobConstructor = window.Blob && function () {\n      try {\n        return Boolean(new Blob());\n      } catch (e) {\n        return false;\n      }\n    }();\n    var hasArrayBufferViewSupport = hasBlobConstructor && window.Uint8Array && function () {\n      try {\n        return new Blob([new Uint8Array(100)]).size === 100;\n      } catch (e) {\n        return false;\n      }\n    }();\n    var BlobBuilder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder || window.MSBlobBuilder;\n    var dataURIPattern = /^data:((.*?)(;charset=.*?)?)(;base64)?,/;\n    var dataURLtoBlob = (hasBlobConstructor || BlobBuilder) && window.atob && window.ArrayBuffer && window.Uint8Array && function (dataURI) {\n      var matches, mediaType, isBase64, dataString, byteString, arrayBuffer, intArray, i, bb;\n      // Parse the dataURI components as per RFC 2397\n      matches = dataURI.match(dataURIPattern);\n      if (!matches) {\n        throw new Error('invalid data URI');\n      }\n      // Default to text/plain;charset=US-ASCII\n      mediaType = matches[2] ? matches[1] : 'text/plain' + (matches[3] || ';charset=US-ASCII');\n      isBase64 = !!matches[4];\n      dataString = dataURI.slice(matches[0].length);\n      if (isBase64) {\n        // Convert base64 to raw binary data held in a string:\n        byteString = atob(dataString);\n      } else {\n        // Convert base64/URLEncoded data component to raw binary:\n        byteString = decodeURIComponent(dataString);\n      }\n      // Write the bytes of the string to an ArrayBuffer:\n      arrayBuffer = new ArrayBuffer(byteString.length);\n      intArray = new Uint8Array(arrayBuffer);\n      for (i = 0; i < byteString.length; i += 1) {\n        intArray[i] = byteString.charCodeAt(i);\n      }\n      // Write the ArrayBuffer (or ArrayBufferView) to a blob:\n      if (hasBlobConstructor) {\n        return new Blob([hasArrayBufferViewSupport ? intArray : arrayBuffer], {\n          type: mediaType\n        });\n      }\n      bb = new BlobBuilder();\n      bb.append(arrayBuffer);\n      return bb.getBlob(mediaType);\n    };\n    if (window.HTMLCanvasElement && !CanvasPrototype.toBlob) {\n      if (CanvasPrototype.mozGetAsFile) {\n        CanvasPrototype.toBlob = function (callback, type, quality) {\n          var self = this;\n          setTimeout(function () {\n            if (quality && CanvasPrototype.toDataURL && dataURLtoBlob) {\n              callback(dataURLtoBlob(self.toDataURL(type, quality)));\n            } else {\n              callback(self.mozGetAsFile('blob', type));\n            }\n          });\n        };\n      } else if (CanvasPrototype.toDataURL && dataURLtoBlob) {\n        if (CanvasPrototype.msToBlob) {\n          CanvasPrototype.toBlob = function (callback, type, quality) {\n            var self = this;\n            setTimeout(function () {\n              if ((type && type !== 'image/png' || quality) && CanvasPrototype.toDataURL && dataURLtoBlob) {\n                callback(dataURLtoBlob(self.toDataURL(type, quality)));\n              } else {\n                callback(self.msToBlob(type));\n              }\n            });\n          };\n        } else {\n          CanvasPrototype.toBlob = function (callback, type, quality) {\n            var self = this;\n            setTimeout(function () {\n              callback(dataURLtoBlob(self.toDataURL(type, quality)));\n            });\n          };\n        }\n      }\n    }\n    if (module.exports) {\n      module.exports = dataURLtoBlob;\n    } else {\n      window.dataURLtoBlob = dataURLtoBlob;\n    }\n  })(window);\n})(canvasToBlob);\nvar toBlob = canvasToBlob.exports;\n\nvar isBlob = function isBlob(value) {\n  if (typeof Blob === 'undefined') {\n    return false;\n  }\n  return value instanceof Blob || Object.prototype.toString.call(value) === '[object Blob]';\n};\n\nvar DEFAULTS = {\n  /**\n   * Indicates if output the original image instead of the compressed one\n   * when the size of the compressed image is greater than the original one's\n   * @type {boolean}\n   */\n  strict: true,\n  /**\n   * Indicates if read the image's Exif Orientation information,\n   * and then rotate or flip the image automatically.\n   * @type {boolean}\n   */\n  checkOrientation: true,\n  /**\n   * Indicates if retain the image's Exif information after compressed.\n   * @type {boolean}\n  */\n  retainExif: false,\n  /**\n   * The max width of the output image.\n   * @type {number}\n   */\n  maxWidth: Infinity,\n  /**\n   * The max height of the output image.\n   * @type {number}\n   */\n  maxHeight: Infinity,\n  /**\n   * The min width of the output image.\n   * @type {number}\n   */\n  minWidth: 0,\n  /**\n   * The min height of the output image.\n   * @type {number}\n   */\n  minHeight: 0,\n  /**\n   * The width of the output image.\n   * If not specified, the natural width of the source image will be used.\n   * @type {number}\n   */\n  width: undefined,\n  /**\n   * The height of the output image.\n   * If not specified, the natural height of the source image will be used.\n   * @type {number}\n   */\n  height: undefined,\n  /**\n   * Sets how the size of the image should be resized to the container\n   * specified by the `width` and `height` options.\n   * @type {string}\n   */\n  resize: 'none',\n  /**\n   * The quality of the output image.\n   * It must be a number between `0` and `1`,\n   * and only available for `image/jpeg` and `image/webp` images.\n   * Check out {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob canvas.toBlob}.\n   * @type {number}\n   */\n  quality: 0.8,\n  /**\n   * The mime type of the output image.\n   * By default, the original mime type of the source image file will be used.\n   * @type {string}\n   */\n  mimeType: 'auto',\n  /**\n   * Files whose file type is included in this list,\n   * and whose file size exceeds the `convertSize` value will be converted to JPEGs.\n   * @type {string｜Array}\n   */\n  convertTypes: ['image/png'],\n  /**\n   * PNG files over this size (5 MB by default) will be converted to JPEGs.\n   * To disable this, just set the value to `Infinity`.\n   * @type {number}\n   */\n  convertSize: 5000000,\n  /**\n   * The hook function to execute before draw the image into the canvas for compression.\n   * @type {Function}\n   * @param {CanvasRenderingContext2D} context - The 2d rendering context of the canvas.\n   * @param {HTMLCanvasElement} canvas - The canvas for compression.\n   * @example\n   * function (context, canvas) {\n   *   context.fillStyle = '#fff';\n   * }\n   */\n  beforeDraw: null,\n  /**\n   * The hook function to execute after drew the image into the canvas for compression.\n   * @type {Function}\n   * @param {CanvasRenderingContext2D} context - The 2d rendering context of the canvas.\n   * @param {HTMLCanvasElement} canvas - The canvas for compression.\n   * @example\n   * function (context, canvas) {\n   *   context.filter = 'grayscale(100%)';\n   * }\n   */\n  drew: null,\n  /**\n   * The hook function to execute when success to compress the image.\n   * @type {Function}\n   * @param {File} file - The compressed image File object.\n   * @example\n   * function (file) {\n   *   console.log(file);\n   * }\n   */\n  success: null,\n  /**\n   * The hook function to execute when fail to compress the image.\n   * @type {Function}\n   * @param {Error} err - An Error object.\n   * @example\n   * function (err) {\n   *   console.log(err.message);\n   * }\n   */\n  error: null\n};\n\nvar IS_BROWSER = typeof window !== 'undefined' && typeof window.document !== 'undefined';\nvar WINDOW = IS_BROWSER ? window : {};\n\n/**\n * Check if the given value is a positive number.\n * @param {*} value - The value to check.\n * @returns {boolean} Returns `true` if the given value is a positive number, else `false`.\n */\nvar isPositiveNumber = function isPositiveNumber(value) {\n  return value > 0 && value < Infinity;\n};\nvar slice = Array.prototype.slice;\n\n/**\n * Convert array-like or iterable object to an array.\n * @param {*} value - The value to convert.\n * @returns {Array} Returns a new array.\n */\nfunction toArray(value) {\n  return Array.from ? Array.from(value) : slice.call(value);\n}\nvar REGEXP_IMAGE_TYPE = /^image\\/.+$/;\n\n/**\n * Check if the given value is a mime type of image.\n * @param {*} value - The value to check.\n * @returns {boolean} Returns `true` if the given is a mime type of image, else `false`.\n */\nfunction isImageType(value) {\n  return REGEXP_IMAGE_TYPE.test(value);\n}\n\n/**\n * Convert image type to extension.\n * @param {string} value - The image type to convert.\n * @returns {boolean} Returns the image extension.\n */\nfunction imageTypeToExtension(value) {\n  var extension = isImageType(value) ? value.substr(6) : '';\n  if (extension === 'jpeg') {\n    extension = 'jpg';\n  }\n  return \".\".concat(extension);\n}\nvar fromCharCode = String.fromCharCode;\n\n/**\n * Get string from char code in data view.\n * @param {DataView} dataView - The data view for read.\n * @param {number} start - The start index.\n * @param {number} length - The read length.\n * @returns {string} The read result.\n */\nfunction getStringFromCharCode(dataView, start, length) {\n  var str = '';\n  var i;\n  length += start;\n  for (i = start; i < length; i += 1) {\n    str += fromCharCode(dataView.getUint8(i));\n  }\n  return str;\n}\nvar btoa = WINDOW.btoa;\n\n/**\n * Transform array buffer to Data URL.\n * @param {ArrayBuffer} arrayBuffer - The array buffer to transform.\n * @param {string} mimeType - The mime type of the Data URL.\n * @returns {string} The result Data URL.\n */\nfunction arrayBufferToDataURL(arrayBuffer, mimeType) {\n  var chunks = [];\n  var chunkSize = 8192;\n  var uint8 = new Uint8Array(arrayBuffer);\n  while (uint8.length > 0) {\n    // XXX: Babel's `toConsumableArray` helper will throw error in IE or Safari 9\n    // eslint-disable-next-line prefer-spread\n    chunks.push(fromCharCode.apply(null, toArray(uint8.subarray(0, chunkSize))));\n    uint8 = uint8.subarray(chunkSize);\n  }\n  return \"data:\".concat(mimeType, \";base64,\").concat(btoa(chunks.join('')));\n}\n\n/**\n * Get orientation value from given array buffer.\n * @param {ArrayBuffer} arrayBuffer - The array buffer to read.\n * @returns {number} The read orientation value.\n */\nfunction resetAndGetOrientation(arrayBuffer) {\n  var dataView = new DataView(arrayBuffer);\n  var orientation;\n\n  // Ignores range error when the image does not have correct Exif information\n  try {\n    var littleEndian;\n    var app1Start;\n    var ifdStart;\n\n    // Only handle JPEG image (start by 0xFFD8)\n    if (dataView.getUint8(0) === 0xFF && dataView.getUint8(1) === 0xD8) {\n      var length = dataView.byteLength;\n      var offset = 2;\n      while (offset + 1 < length) {\n        if (dataView.getUint8(offset) === 0xFF && dataView.getUint8(offset + 1) === 0xE1) {\n          app1Start = offset;\n          break;\n        }\n        offset += 1;\n      }\n    }\n    if (app1Start) {\n      var exifIDCode = app1Start + 4;\n      var tiffOffset = app1Start + 10;\n      if (getStringFromCharCode(dataView, exifIDCode, 4) === 'Exif') {\n        var endianness = dataView.getUint16(tiffOffset);\n        littleEndian = endianness === 0x4949;\n        if (littleEndian || endianness === 0x4D4D /* bigEndian */) {\n          if (dataView.getUint16(tiffOffset + 2, littleEndian) === 0x002A) {\n            var firstIFDOffset = dataView.getUint32(tiffOffset + 4, littleEndian);\n            if (firstIFDOffset >= 0x00000008) {\n              ifdStart = tiffOffset + firstIFDOffset;\n            }\n          }\n        }\n      }\n    }\n    if (ifdStart) {\n      var _length = dataView.getUint16(ifdStart, littleEndian);\n      var _offset;\n      var i;\n      for (i = 0; i < _length; i += 1) {\n        _offset = ifdStart + i * 12 + 2;\n        if (dataView.getUint16(_offset, littleEndian) === 0x0112 /* Orientation */) {\n          // 8 is the offset of the current tag's value\n          _offset += 8;\n\n          // Get the original orientation value\n          orientation = dataView.getUint16(_offset, littleEndian);\n\n          // Override the orientation with its default value\n          dataView.setUint16(_offset, 1, littleEndian);\n          break;\n        }\n      }\n    }\n  } catch (e) {\n    orientation = 1;\n  }\n  return orientation;\n}\n\n/**\n * Parse Exif Orientation value.\n * @param {number} orientation - The orientation to parse.\n * @returns {Object} The parsed result.\n */\nfunction parseOrientation(orientation) {\n  var rotate = 0;\n  var scaleX = 1;\n  var scaleY = 1;\n  switch (orientation) {\n    // Flip horizontal\n    case 2:\n      scaleX = -1;\n      break;\n\n    // Rotate left 180°\n    case 3:\n      rotate = -180;\n      break;\n\n    // Flip vertical\n    case 4:\n      scaleY = -1;\n      break;\n\n    // Flip vertical and rotate right 90°\n    case 5:\n      rotate = 90;\n      scaleY = -1;\n      break;\n\n    // Rotate right 90°\n    case 6:\n      rotate = 90;\n      break;\n\n    // Flip horizontal and rotate right 90°\n    case 7:\n      rotate = 90;\n      scaleX = -1;\n      break;\n\n    // Rotate left 90°\n    case 8:\n      rotate = -90;\n      break;\n  }\n  return {\n    rotate: rotate,\n    scaleX: scaleX,\n    scaleY: scaleY\n  };\n}\nvar REGEXP_DECIMALS = /\\.\\d*(?:0|9){12}\\d*$/;\n\n/**\n * Normalize decimal number.\n * Check out {@link https://0.30000000000000004.com/}\n * @param {number} value - The value to normalize.\n * @param {number} [times=100000000000] - The times for normalizing.\n * @returns {number} Returns the normalized number.\n */\nfunction normalizeDecimalNumber(value) {\n  var times = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100000000000;\n  return REGEXP_DECIMALS.test(value) ? Math.round(value * times) / times : value;\n}\n\n/**\n * Get the max sizes in a rectangle under the given aspect ratio.\n * @param {Object} data - The original sizes.\n * @param {string} [type='contain'] - The adjust type.\n * @returns {Object} The result sizes.\n */\nfunction getAdjustedSizes(_ref) {\n  var aspectRatio = _ref.aspectRatio,\n    height = _ref.height,\n    width = _ref.width;\n  var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'none';\n  var isValidWidth = isPositiveNumber(width);\n  var isValidHeight = isPositiveNumber(height);\n  if (isValidWidth && isValidHeight) {\n    var adjustedWidth = height * aspectRatio;\n    if ((type === 'contain' || type === 'none') && adjustedWidth > width || type === 'cover' && adjustedWidth < width) {\n      height = width / aspectRatio;\n    } else {\n      width = height * aspectRatio;\n    }\n  } else if (isValidWidth) {\n    height = width / aspectRatio;\n  } else if (isValidHeight) {\n    width = height * aspectRatio;\n  }\n  return {\n    width: width,\n    height: height\n  };\n}\n\n/**\n * Get Exif information from the given array buffer.\n * @param {ArrayBuffer} arrayBuffer - The array buffer to read.\n * @returns {Array} The read Exif information.\n */\nfunction getExif(arrayBuffer) {\n  var array = toArray(new Uint8Array(arrayBuffer));\n  var length = array.length;\n  var segments = [];\n  var start = 0;\n  while (start + 3 < length) {\n    var value = array[start];\n    var next = array[start + 1];\n\n    // SOS (Start of Scan)\n    if (value === 0xFF && next === 0xDA) {\n      break;\n    }\n\n    // SOI (Start of Image)\n    if (value === 0xFF && next === 0xD8) {\n      start += 2;\n    } else {\n      var offset = array[start + 2] * 256 + array[start + 3];\n      var end = start + offset + 2;\n      var segment = array.slice(start, end);\n      segments.push(segment);\n      start = end;\n    }\n  }\n  return segments.reduce(function (exifArray, current) {\n    if (current[0] === 0xFF && current[1] === 0xE1) {\n      return exifArray.concat(current);\n    }\n    return exifArray;\n  }, []);\n}\n\n/**\n * Insert Exif information into the given array buffer.\n * @param {ArrayBuffer} arrayBuffer - The array buffer to transform.\n * @param {Array} exifArray - The Exif information to insert.\n * @returns {ArrayBuffer} The transformed array buffer.\n */\nfunction insertExif(arrayBuffer, exifArray) {\n  var array = toArray(new Uint8Array(arrayBuffer));\n  if (array[2] !== 0xFF || array[3] !== 0xE0) {\n    return arrayBuffer;\n  }\n  var app0Length = array[4] * 256 + array[5];\n  var newArrayBuffer = [0xFF, 0xD8].concat(exifArray, array.slice(4 + app0Length));\n  return new Uint8Array(newArrayBuffer);\n}\n\nvar ArrayBuffer$1 = WINDOW.ArrayBuffer,\n  FileReader = WINDOW.FileReader;\nvar URL = WINDOW.URL || WINDOW.webkitURL;\nvar REGEXP_EXTENSION = /\\.\\w+$/;\nvar AnotherCompressor = WINDOW.Compressor;\n\n/**\n * Creates a new image compressor.\n * @class\n */\nvar Compressor = /*#__PURE__*/function () {\n  /**\n   * The constructor of Compressor.\n   * @param {File|Blob} file - The target image file for compressing.\n   * @param {Object} [options] - The options for compressing.\n   */\n  function Compressor(file, options) {\n    _classCallCheck(this, Compressor);\n    this.file = file;\n    this.exif = [];\n    this.image = new Image();\n    this.options = _objectSpread2(_objectSpread2({}, DEFAULTS), options);\n    this.aborted = false;\n    this.result = null;\n    this.init();\n  }\n  _createClass(Compressor, [{\n    key: \"init\",\n    value: function init() {\n      var _this = this;\n      var file = this.file,\n        options = this.options;\n      if (!isBlob(file)) {\n        this.fail(new Error('The first argument must be a File or Blob object.'));\n        return;\n      }\n      var mimeType = file.type;\n      if (!isImageType(mimeType)) {\n        this.fail(new Error('The first argument must be an image File or Blob object.'));\n        return;\n      }\n      if (!URL || !FileReader) {\n        this.fail(new Error('The current browser does not support image compression.'));\n        return;\n      }\n      if (!ArrayBuffer$1) {\n        options.checkOrientation = false;\n        options.retainExif = false;\n      }\n      var isJPEGImage = mimeType === 'image/jpeg';\n      var checkOrientation = isJPEGImage && options.checkOrientation;\n      var retainExif = isJPEGImage && options.retainExif;\n      if (URL && !checkOrientation && !retainExif) {\n        this.load({\n          url: URL.createObjectURL(file)\n        });\n      } else {\n        var reader = new FileReader();\n        this.reader = reader;\n        reader.onload = function (_ref) {\n          var target = _ref.target;\n          var result = target.result;\n          var data = {};\n          var orientation = 1;\n          if (checkOrientation) {\n            // Reset the orientation value to its default value 1\n            // as some iOS browsers will render image with its orientation\n            orientation = resetAndGetOrientation(result);\n            if (orientation > 1) {\n              _extends(data, parseOrientation(orientation));\n            }\n          }\n          if (retainExif) {\n            _this.exif = getExif(result);\n          }\n          if (checkOrientation || retainExif) {\n            if (!URL\n\n            // Generate a new URL with the default orientation value 1.\n            || orientation > 1) {\n              data.url = arrayBufferToDataURL(result, mimeType);\n            } else {\n              data.url = URL.createObjectURL(file);\n            }\n          } else {\n            data.url = result;\n          }\n          _this.load(data);\n        };\n        reader.onabort = function () {\n          _this.fail(new Error('Aborted to read the image with FileReader.'));\n        };\n        reader.onerror = function () {\n          _this.fail(new Error('Failed to read the image with FileReader.'));\n        };\n        reader.onloadend = function () {\n          _this.reader = null;\n        };\n        if (checkOrientation || retainExif) {\n          reader.readAsArrayBuffer(file);\n        } else {\n          reader.readAsDataURL(file);\n        }\n      }\n    }\n  }, {\n    key: \"load\",\n    value: function load(data) {\n      var _this2 = this;\n      var file = this.file,\n        image = this.image;\n      image.onload = function () {\n        _this2.draw(_objectSpread2(_objectSpread2({}, data), {}, {\n          naturalWidth: image.naturalWidth,\n          naturalHeight: image.naturalHeight\n        }));\n      };\n      image.onabort = function () {\n        _this2.fail(new Error('Aborted to load the image.'));\n      };\n      image.onerror = function () {\n        _this2.fail(new Error('Failed to load the image.'));\n      };\n\n      // Match all browsers that use WebKit as the layout engine in iOS devices,\n      // such as Safari for iOS, Chrome for iOS, and in-app browsers.\n      if (WINDOW.navigator && /(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(WINDOW.navigator.userAgent)) {\n        // Fix the `The operation is insecure` error (#57)\n        image.crossOrigin = 'anonymous';\n      }\n      image.alt = file.name;\n      image.src = data.url;\n    }\n  }, {\n    key: \"draw\",\n    value: function draw(_ref2) {\n      var _this3 = this;\n      var naturalWidth = _ref2.naturalWidth,\n        naturalHeight = _ref2.naturalHeight,\n        _ref2$rotate = _ref2.rotate,\n        rotate = _ref2$rotate === void 0 ? 0 : _ref2$rotate,\n        _ref2$scaleX = _ref2.scaleX,\n        scaleX = _ref2$scaleX === void 0 ? 1 : _ref2$scaleX,\n        _ref2$scaleY = _ref2.scaleY,\n        scaleY = _ref2$scaleY === void 0 ? 1 : _ref2$scaleY;\n      var file = this.file,\n        image = this.image,\n        options = this.options;\n      var canvas = document.createElement('canvas');\n      var context = canvas.getContext('2d');\n      var is90DegreesRotated = Math.abs(rotate) % 180 === 90;\n      var resizable = (options.resize === 'contain' || options.resize === 'cover') && isPositiveNumber(options.width) && isPositiveNumber(options.height);\n      var maxWidth = Math.max(options.maxWidth, 0) || Infinity;\n      var maxHeight = Math.max(options.maxHeight, 0) || Infinity;\n      var minWidth = Math.max(options.minWidth, 0) || 0;\n      var minHeight = Math.max(options.minHeight, 0) || 0;\n      var aspectRatio = naturalWidth / naturalHeight;\n      var width = options.width,\n        height = options.height;\n      if (is90DegreesRotated) {\n        var _ref3 = [maxHeight, maxWidth];\n        maxWidth = _ref3[0];\n        maxHeight = _ref3[1];\n        var _ref4 = [minHeight, minWidth];\n        minWidth = _ref4[0];\n        minHeight = _ref4[1];\n        var _ref5 = [height, width];\n        width = _ref5[0];\n        height = _ref5[1];\n      }\n      if (resizable) {\n        aspectRatio = width / height;\n      }\n      var _getAdjustedSizes = getAdjustedSizes({\n        aspectRatio: aspectRatio,\n        width: maxWidth,\n        height: maxHeight\n      }, 'contain');\n      maxWidth = _getAdjustedSizes.width;\n      maxHeight = _getAdjustedSizes.height;\n      var _getAdjustedSizes2 = getAdjustedSizes({\n        aspectRatio: aspectRatio,\n        width: minWidth,\n        height: minHeight\n      }, 'cover');\n      minWidth = _getAdjustedSizes2.width;\n      minHeight = _getAdjustedSizes2.height;\n      if (resizable) {\n        var _getAdjustedSizes3 = getAdjustedSizes({\n          aspectRatio: aspectRatio,\n          width: width,\n          height: height\n        }, options.resize);\n        width = _getAdjustedSizes3.width;\n        height = _getAdjustedSizes3.height;\n      } else {\n        var _getAdjustedSizes4 = getAdjustedSizes({\n          aspectRatio: aspectRatio,\n          width: width,\n          height: height\n        });\n        var _getAdjustedSizes4$wi = _getAdjustedSizes4.width;\n        width = _getAdjustedSizes4$wi === void 0 ? naturalWidth : _getAdjustedSizes4$wi;\n        var _getAdjustedSizes4$he = _getAdjustedSizes4.height;\n        height = _getAdjustedSizes4$he === void 0 ? naturalHeight : _getAdjustedSizes4$he;\n      }\n      width = Math.floor(normalizeDecimalNumber(Math.min(Math.max(width, minWidth), maxWidth)));\n      height = Math.floor(normalizeDecimalNumber(Math.min(Math.max(height, minHeight), maxHeight)));\n      var destX = -width / 2;\n      var destY = -height / 2;\n      var destWidth = width;\n      var destHeight = height;\n      var params = [];\n      if (resizable) {\n        var srcX = 0;\n        var srcY = 0;\n        var srcWidth = naturalWidth;\n        var srcHeight = naturalHeight;\n        var _getAdjustedSizes5 = getAdjustedSizes({\n          aspectRatio: aspectRatio,\n          width: naturalWidth,\n          height: naturalHeight\n        }, {\n          contain: 'cover',\n          cover: 'contain'\n        }[options.resize]);\n        srcWidth = _getAdjustedSizes5.width;\n        srcHeight = _getAdjustedSizes5.height;\n        srcX = (naturalWidth - srcWidth) / 2;\n        srcY = (naturalHeight - srcHeight) / 2;\n        params.push(srcX, srcY, srcWidth, srcHeight);\n      }\n      params.push(destX, destY, destWidth, destHeight);\n      if (is90DegreesRotated) {\n        var _ref6 = [height, width];\n        width = _ref6[0];\n        height = _ref6[1];\n      }\n      canvas.width = width;\n      canvas.height = height;\n      if (!isImageType(options.mimeType)) {\n        options.mimeType = file.type;\n      }\n      var fillStyle = 'transparent';\n\n      // Converts PNG files over the `convertSize` to JPEGs.\n      if (file.size > options.convertSize && options.convertTypes.indexOf(options.mimeType) >= 0) {\n        options.mimeType = 'image/jpeg';\n      }\n      var isJPEGImage = options.mimeType === 'image/jpeg';\n      if (isJPEGImage) {\n        fillStyle = '#fff';\n      }\n\n      // Override the default fill color (#000, black)\n      context.fillStyle = fillStyle;\n      context.fillRect(0, 0, width, height);\n      if (options.beforeDraw) {\n        options.beforeDraw.call(this, context, canvas);\n      }\n      if (this.aborted) {\n        return;\n      }\n      context.save();\n      context.translate(width / 2, height / 2);\n      context.rotate(rotate * Math.PI / 180);\n      context.scale(scaleX, scaleY);\n      context.drawImage.apply(context, [image].concat(params));\n      context.restore();\n      if (options.drew) {\n        options.drew.call(this, context, canvas);\n      }\n      if (this.aborted) {\n        return;\n      }\n      var callback = function callback(blob) {\n        if (!_this3.aborted) {\n          var done = function done(result) {\n            return _this3.done({\n              naturalWidth: naturalWidth,\n              naturalHeight: naturalHeight,\n              result: result\n            });\n          };\n          if (blob && isJPEGImage && options.retainExif && _this3.exif && _this3.exif.length > 0) {\n            var next = function next(arrayBuffer) {\n              return done(toBlob(arrayBufferToDataURL(insertExif(arrayBuffer, _this3.exif), options.mimeType)));\n            };\n            if (blob.arrayBuffer) {\n              blob.arrayBuffer().then(next).catch(function () {\n                _this3.fail(new Error('Failed to read the compressed image with Blob.arrayBuffer().'));\n              });\n            } else {\n              var reader = new FileReader();\n              _this3.reader = reader;\n              reader.onload = function (_ref7) {\n                var target = _ref7.target;\n                next(target.result);\n              };\n              reader.onabort = function () {\n                _this3.fail(new Error('Aborted to read the compressed image with FileReader.'));\n              };\n              reader.onerror = function () {\n                _this3.fail(new Error('Failed to read the compressed image with FileReader.'));\n              };\n              reader.onloadend = function () {\n                _this3.reader = null;\n              };\n              reader.readAsArrayBuffer(blob);\n            }\n          } else {\n            done(blob);\n          }\n        }\n      };\n      if (canvas.toBlob) {\n        canvas.toBlob(callback, options.mimeType, options.quality);\n      } else {\n        callback(toBlob(canvas.toDataURL(options.mimeType, options.quality)));\n      }\n    }\n  }, {\n    key: \"done\",\n    value: function done(_ref8) {\n      var naturalWidth = _ref8.naturalWidth,\n        naturalHeight = _ref8.naturalHeight,\n        result = _ref8.result;\n      var file = this.file,\n        image = this.image,\n        options = this.options;\n      if (URL && image.src.indexOf('blob:') === 0) {\n        URL.revokeObjectURL(image.src);\n      }\n      if (result) {\n        // Returns original file if the result is greater than it and without size related options\n        if (options.strict && !options.retainExif && result.size > file.size && options.mimeType === file.type && !(options.width > naturalWidth || options.height > naturalHeight || options.minWidth > naturalWidth || options.minHeight > naturalHeight || options.maxWidth < naturalWidth || options.maxHeight < naturalHeight)) {\n          result = file;\n        } else {\n          var date = new Date();\n          result.lastModified = date.getTime();\n          result.lastModifiedDate = date;\n          result.name = file.name;\n\n          // Convert the extension to match its type\n          if (result.name && result.type !== file.type) {\n            result.name = result.name.replace(REGEXP_EXTENSION, imageTypeToExtension(result.type));\n          }\n        }\n      } else {\n        // Returns original file if the result is null in some cases.\n        result = file;\n      }\n      this.result = result;\n      if (options.success) {\n        options.success.call(this, result);\n      }\n    }\n  }, {\n    key: \"fail\",\n    value: function fail(err) {\n      var options = this.options;\n      if (options.error) {\n        options.error.call(this, err);\n      } else {\n        throw err;\n      }\n    }\n  }, {\n    key: \"abort\",\n    value: function abort() {\n      if (!this.aborted) {\n        this.aborted = true;\n        if (this.reader) {\n          this.reader.abort();\n        } else if (!this.image.complete) {\n          this.image.onload = null;\n          this.image.onabort();\n        } else {\n          this.fail(new Error('The compression process has been aborted.'));\n        }\n      }\n    }\n\n    /**\n     * Get the no conflict compressor class.\n     * @returns {Compressor} The compressor class.\n     */\n  }], [{\n    key: \"noConflict\",\n    value: function noConflict() {\n      window.Compressor = AnotherCompressor;\n      return Compressor;\n    }\n\n    /**\n     * Change the default options.\n     * @param {Object} options - The new default options.\n     */\n  }, {\n    key: \"setDefaults\",\n    value: function setDefaults(options) {\n      _extends(DEFAULTS, options);\n    }\n  }]);\n  return Compressor;\n}();\n\nexport { Compressor as default };\n","import { IAppConfiguration, IAppConfigurationUI } from '../contexts/configuration';\nimport { IDocument, IDocumentPage } from '../contexts/app-state';\nimport Compressor from 'compressorjs';\nimport { IDocumentOptions } from '../organisms/DocumentOptions';\nimport { TDocumentType } from '../contexts/app-state/types';\n\nexport type FileEventTarget = EventTarget & { files: FileList };\nexport type ICameraEvent = Event & { currentTarget: EventTarget & HTMLInputElement };\n\nexport const nativeCameraHandler = (e: ICameraEvent): Promise<string> => {\n  return new Promise((resolve, reject) => {\n    if (!e.target) {\n      return reject('Event target is missing');\n    }\n    const target = e.target as FileEventTarget;\n    const image = target.files[0];\n    const reader1 = new FileReader();\n    reader1.readAsDataURL(image);\n\n    new Compressor(image, {\n      quality: 0.6,\n      success(result) {\n        const reader = new FileReader();\n        reader.readAsDataURL(result);\n        reader.onload = e => {\n          const image = e.target?.result;\n          resolve(image as string);\n        };\n      },\n      error(err) {\n        return reject(err.message);\n      },\n    });\n  });\n};\n\nexport const clearDocs = (\n  type: TDocumentType,\n  configuration: IAppConfiguration,\n  uiPack: IAppConfigurationUI,\n  documents: IDocument[],\n): IDocument[] => {\n  const documentOptionsConfiguration = configuration.components\n    ?.documentOptions as IDocumentOptions;\n  const { options } = documentOptionsConfiguration;\n  const isFromOptions = Object.keys(options).find(t => t === type);\n  if (isFromOptions) {\n    return documents.filter(d => !Object.keys(options).find(t => t === d.type));\n  }\n  return documents.filter(d => type !== d.type);\n};\n\nexport const addDocument = (\n  type: TDocumentType,\n  base64: string,\n  configuration: IAppConfiguration,\n  uiPack: IAppConfigurationUI,\n  documents: IDocument[],\n  document: IDocument,\n): IDocument[] => {\n  const clearedDocuments = clearDocs(type, configuration, uiPack, documents);\n  return [\n    ...clearedDocuments,\n    {\n      ...document,\n      pages: [{ side: 'front', base64 }],\n    },\n  ];\n};\n\nconst getUpdatedPages = (base64: string, doc: IDocument): IDocumentPage[] => {\n  const existingPage = doc.pages.find(p => p.side === 'back');\n  if (existingPage) {\n    return doc.pages.map(page => {\n      if (page.side === 'back') {\n        return {\n          ...page,\n          base64,\n          side: 'back',\n        };\n      }\n      return page;\n    });\n  }\n  return [...doc.pages, { base64, side: 'back' }];\n};\n\nexport const updateDocument = (\n  document: IDocument,\n  base64: string,\n  documents: IDocument[],\n): IDocument[] => {\n  return documents.map(doc => {\n    if ((document.kind && document.kind === doc.kind) || doc.type === document.type) {\n      const newPagesState = getUpdatedPages(base64, doc);\n      return { ...doc, pages: newPagesState };\n    }\n    return doc;\n  });\n};\n","import { writable } from 'svelte/store';\n\nexport const createToggle = (initialState = false) => {\n  const { subscribe, update } = writable(initialState);\n  const toggle = (nextState?: boolean) =>\n    update(prevState => (typeof nextState === 'boolean' ? nextState : !prevState));\n  const toggleOn = () => toggle(true);\n  const toggleOff = () => toggle(false);\n\n  return [{ subscribe, update }, toggle, toggleOn, toggleOff] as const;\n};\n","<script lang=\"ts\">\n  import { createEventDispatcher } from 'svelte';\n  import { Container } from '../../atoms';\n  import Paragraph from '../../atoms/Paragraph/Paragraph.svelte';\n  import { configuration as globalConfiguration, IAttributes } from '../../contexts/configuration';\n  import { ICSSProperties } from '../../services/css-manager';\n  import { IDocumentInfo } from '../../contexts/app-state';\n  import { T } from '../../contexts/translation';\n  import { IDocumentOptions } from '../../organisms/DocumentOptions';\n  import { makesLocalStyles } from '../../services/css-manager';\n  import Icon from '../../atoms/Icons/Icon.svelte';\n  import { ICameraEvent, nativeCameraHandler } from '../../utils/photo-utils';\n  import { isNativeCamera } from '../../contexts/flows/hooks';\n  import { createToggle } from '../../hooks/createToggle/createToggle';\n\n  export let configuration: IDocumentOptions;\n  export let active: boolean;\n  export let attributes: IAttributes;\n  export let document: IDocumentInfo;\n\n  const [isDisabled, , toggleOnIsDisabled] = createToggle();\n  let hover = false;\n\n  const setHover = (status: boolean) => (hover = status);\n\n  const dispatch = createEventDispatcher();\n  const handleSelect = () => {\n    if ($isDisabled) return;\n\n    dispatch('selectOption', document.kind);\n    toggleOnIsDisabled();\n  };\n\n  const handler = async (e: ICameraEvent) => {\n    if (!e.target) return;\n    const image = await nativeCameraHandler(e);\n    dispatch('photoTake', { image, type: document.type });\n  };\n\n  const style = makesLocalStyles(configuration.optionProps.style as ICSSProperties);\n</script>\n\n<!-- svelte-ignore a11y-click-events-have-key-events -->\n<div\n  {style}\n  class=\"document-option\"\n  class:disabled={$isDisabled}\n  class:active\n  on:click={handleSelect}\n  on:mouseover={() => setHover(true)}\n  on:focus={() => setHover(true)}\n  on:mouseleave={() => setHover(false)}\n>\n  {#if isNativeCamera($globalConfiguration)}\n    <input\n      class=\"camera-input\"\n      type=\"file\"\n      accept=\"image/*\"\n      capture=\"environment\"\n      on:change={handler}\n    />\n  {/if}\n  <Container configuration={configuration.iconContainerProps} active={hover || active}>\n    <Icon\n      name={attributes.icon}\n      width={attributes.width}\n      height={attributes.height}\n      configuration={configuration.iconProps}\n      active={hover || active}\n    />\n  </Container>\n  <div class=\"text-container\">\n    <Paragraph configuration={configuration.titleProps} active={hover || active}>\n      <T key={`${document.kind}-title`} namespace=\"document-options\" />\n    </Paragraph>\n    {#if configuration.descriptionProps}\n      <Paragraph configuration={configuration.descriptionProps} active={hover || active}>\n        <T key={`${document.kind}-description`} namespace=\"document-options\" />\n      </Paragraph>\n    {/if}\n  </div>\n</div>\n\n<style>\n  .document-option {\n    cursor: pointer;\n    border-radius: var(--border-radius);\n    padding: var(--padding);\n    margin: var(--margin);\n    width: var(--width);\n    border: var(--border);\n    display: var(--display);\n    text-align: var(--text-align);\n    align-items: var(--align-items);\n    background: var(--background);\n    transition: all 0.1s ease-in;\n    user-select: none;\n    position: relative;\n  }\n  .document-option:hover {\n    background: var(--hover-background);\n    border: var(--hover-border);\n  }\n  .document-option:active {\n    background: var(--hover-background);\n    border: var(--hover-border);\n  }\n  .document-option.active {\n    background: var(--hover-background);\n    border: var(--hover-border);\n  }\n  .camera-input {\n    position: absolute;\n    width: 100%;\n    height: 100%;\n    top: 0px;\n    left: 0px;\n    z-index: 3;\n    opacity: 0;\n  }\n\n  .disabled {\n    cursor: not-allowed;\n    opacity: 0.5;\n  }\n</style>\n","import { toast } from '@zerodevx/svelte-toast';\nimport { t } from '../../contexts/translation/hooks';\n\nexport const checkIsCameraAvailable = async (): Promise<boolean> => {\n  try {\n    const stream = await navigator.mediaDevices.getUserMedia({ video: true });\n    if (stream) {\n      stream.getTracks().forEach(track => track.stop());\n    }\n    return true;\n  } catch (error) {\n    console.error(error);\n    toast.push(t('general', 'errorCameraAccess'));\n    return false;\n  }\n};\n","<script lang=\"ts\">\n  import { configuration, IStepConfiguration } from '../../contexts/configuration';\n  import DocumentOption from '../../molecules/DocumentOption/DocumentOption.svelte';\n  import { goToNextStep } from '../../contexts/navigation';\n  import type { IDocument, IDocumentInfo } from '../../contexts/app-state';\n  import { currentStepId, documents, selectedDocumentInfo } from '../../contexts/app-state/stores';\n  import { addDocument } from '../../utils/photo-utils';\n  import { isNativeCamera } from '../../contexts/flows/hooks';\n  import { IDocumentOption } from '../../molecules/DocumentOption';\n  import { checkIsCameraAvailable } from '../../services/camera-manager';\n  import { uiPack } from '../../ui-packs';\n  import { IDocumentOptions } from './types';\n  import { TDocumentKind, TDocumentType } from '../../contexts/app-state/types';\n\n  export let step: IStepConfiguration;\n\n  const documentOptions: IDocumentOption[] = [];\n\n  const documentOptionsConfiguration = $configuration.components\n    ?.documentOptions as IDocumentOptions;\n\n  if (step.documentOptions) {\n    step.documentOptions.forEach(option => {\n      if (documentOptionsConfiguration.options[option.type]) {\n        const configurationOption = documentOptionsConfiguration.options[\n          option.type\n        ] as IDocumentOption;\n        documentOptions.push({\n          ...configurationOption,\n          document: {\n            ...configurationOption.document,\n            kind: option.kind,\n          },\n        });\n      }\n    });\n  } else {\n    Object.keys(documentOptionsConfiguration.options).forEach((key: string) => {\n      const type = key as TDocumentType;\n      const option = documentOptionsConfiguration.options[type] as IDocumentOption;\n      documentOptions.push(option);\n    });\n  }\n\n  const handleSelectOption = async ({ detail }: { detail: string }) => {\n    if (isNativeCamera($configuration)) return;\n    const kind = detail as TDocumentKind;\n    const option = documentOptions.find(o => o.document.kind === kind) as IDocumentOption;\n    $selectedDocumentInfo = option?.document as IDocumentInfo;\n    const isCameraAvailable = await checkIsCameraAvailable();\n    if (!isCameraAvailable) return;\n    goToNextStep(currentStepId, $configuration, $currentStepId);\n  };\n\n  const handleTakePhoto = async ({\n    detail,\n  }: {\n    detail: { image: string; type: TDocumentType };\n  }) => {\n    const option = documentOptionsConfiguration.options[detail.type];\n    const document: IDocument = { type: detail.type, metadata: {}, pages: [] };\n    const newDocumentsState: IDocument[] = addDocument(\n      document.type,\n      detail.image,\n      $configuration,\n      $uiPack,\n      $documents,\n      document,\n    );\n    $selectedDocumentInfo = option?.document as IDocumentInfo;\n    $documents = newDocumentsState;\n    goToNextStep(currentStepId, $configuration, $currentStepId);\n  };\n</script>\n\n<div class=\"document-options\">\n  {#each documentOptions.sort((o1, o2) => o1.document.orderIndex - o2.document.orderIndex) as documentOption}\n    <DocumentOption\n      on:selectOption={handleSelectOption}\n      on:photoTake={handleTakePhoto}\n      configuration={documentOptionsConfiguration}\n      attributes={documentOption.attributes}\n      document={documentOption.document}\n      active={$selectedDocumentInfo?.type === documentOption.document.type}\n    />\n  {/each}\n</div>\n","<script lang=\"ts\">\n  import { T } from '../contexts/translation';\n  import { IconButton, IconCloseButton, Image, Paragraph, Title } from '../atoms';\n  import { configuration, Elements } from '../contexts/configuration';\n  import { DocumentOptions } from '../organisms';\n  import { goToPrevStep } from '../contexts/navigation';\n  import { preloadNextStepByCurrent } from '../services/preload-service';\n  import { appState, currentStepId } from '../contexts/app-state';\n  import { ActionNames, sendButtonClickEvent, VerificationStatuses } from '../utils/event-service';\n  import { getLayoutStyles, getStepConfiguration } from '../ui-packs';\n  import { getFlowConfig } from '../contexts/flows/hooks';\n\n  export let stepId;\n\n  const step = getStepConfiguration($configuration, stepId);\n  const flow = getFlowConfig($configuration);\n  const style = getLayoutStyles($configuration, step);\n\n  const stepNamespace = step.namespace!;\n\n  preloadNextStepByCurrent($configuration, configuration, stepId);\n</script>\n\n<div class=\"container\" {style}>\n  {#each step.elements as element}\n    {#if element.type === Elements.IconButton}\n      <IconButton\n        configuration={element.props}\n        on:click={() => goToPrevStep(currentStepId, $configuration, $currentStepId)}\n      />\n    {/if}\n    {#if element.type === Elements.IconCloseButton && flow.showCloseButton}\n      <IconCloseButton\n        configuration={element.props}\n        on:click={() => {\n          sendButtonClickEvent(\n            ActionNames.CLOSE,\n            { status: VerificationStatuses.DATA_COLLECTION },\n            $appState,\n            true,\n          );\n        }}\n      />\n    {/if}\n    {#if element.type === Elements.Image}\n      <Image configuration={element.props} />\n    {/if}\n    {#if element.type === Elements.Title}\n      <Title configuration={element.props}>\n        <T key=\"title\" namespace={stepNamespace} />\n      </Title>\n    {/if}\n    {#if element.type === Elements.Paragraph}\n      <Paragraph configuration={element.props}>\n        <T key={element.props.context || 'description'} namespace={stepNamespace} />\n      </Paragraph>\n    {/if}\n  {/each}\n  <DocumentOptions {step} />\n</div>\n\n<style>\n  .container {\n    position: var(--position);\n    padding: var(--padding);\n    text-align: center;\n    background: var(--background);\n    height: 100%;\n  }\n</style>\n","import { IDocumentInfo } from '../contexts/app-state';\nimport { IAppConfiguration, IStepConfiguration, Steps } from '../contexts/configuration';\nimport { getFlowName } from '../contexts/flows';\nimport { TDocumentType } from '../contexts/app-state/types';\n\nexport const getDocumentType = (step: IStepConfiguration, selectedDocumentInfo?: IDocumentInfo) => {\n  return (step.type as TDocumentType) || selectedDocumentInfo?.type;\n};\n\nexport const isDocumentSelectionStepExists = (configuration: IAppConfiguration) => {\n  const flowName: string = getFlowName();\n\n  const steps = configuration.flows[flowName].steps as IStepConfiguration[];\n  return !!steps.find(s => s.name === Steps.DocumentSelection);\n};\n","<script lang=\"ts\">\n  import { T } from '../contexts/translation';\n  import { Button, IconButton, IconCloseButton, Image, Paragraph, Title } from '../atoms';\n  import { configuration } from '../contexts/configuration';\n  import { goToNextStep, goToPrevStep } from '../contexts/navigation/hooks';\n  import { Elements } from '../contexts/configuration/types';\n  import { currentStepId, IDocument } from '../contexts/app-state';\n  import { getFlowConfig, isNativeCamera } from '../contexts/flows/hooks';\n  import { addDocument, ICameraEvent, nativeCameraHandler } from '../utils/photo-utils';\n  import { appState, documents, selectedDocumentInfo } from '../contexts/app-state/stores';\n  import { ActionNames, sendButtonClickEvent, VerificationStatuses } from '../utils/event-service';\n  import { checkIsCameraAvailable } from '../services/camera-manager';\n  import { getLayoutStyles, getStepConfiguration, uiPack } from '../ui-packs';\n  import { getDocumentType } from '../utils/documents-utils';\n  import { preloadNextStepByCurrent } from '../services/preload-service';\n\n  export let stepId;\n\n  const step = getStepConfiguration($configuration, stepId);\n  const flow = getFlowConfig($configuration);\n  const style = getLayoutStyles($configuration, step);\n\n  const documentType = getDocumentType(step, $selectedDocumentInfo);\n\n  $: {\n    if (!documentType) goToPrevStep(currentStepId, $configuration, $currentStepId);\n  }\n\n  const stepNamespace = `${step.namespace}.${documentType}`;\n\n  const handleGoToNextStep = async () => {\n    const isCameraAvailable = await checkIsCameraAvailable();\n    if (!isCameraAvailable) return;\n    goToNextStep(currentStepId, $configuration, $currentStepId);\n  };\n\n  const handler = async (e: ICameraEvent) => {\n    if (!e.target) return;\n    const image = await nativeCameraHandler(e);\n    if (!documentType) {\n      throw Error(\"document context wasn't provided\");\n    }\n    const document: IDocument = { type: documentType, metadata: {}, pages: [] };\n    const newDocumentsState: IDocument[] = addDocument(\n      document.type,\n      image,\n      $configuration,\n      $uiPack,\n      $documents,\n      document,\n    );\n    $documents = newDocumentsState;\n    goToNextStep(currentStepId, $configuration, $currentStepId);\n  };\n\n  preloadNextStepByCurrent($configuration, configuration, $currentStepId);\n</script>\n\n<div class=\"container\" {style}>\n  {#each step.elements as element}\n    {#if element.type === Elements.IconButton}\n      <IconButton\n        configuration={element.props}\n        on:click={() => goToPrevStep(currentStepId, $configuration, $currentStepId)}\n      />\n    {/if}\n    {#if element.type === Elements.IconCloseButton && flow.showCloseButton}\n      <IconCloseButton\n        configuration={element.props}\n        on:click={() => {\n          sendButtonClickEvent(\n            ActionNames.CLOSE,\n            { status: VerificationStatuses.DATA_COLLECTION },\n            $appState,\n            true,\n          );\n        }}\n      />\n    {/if}\n    {#if element.type === Elements.Image}\n      <Image configuration={element.props} />\n    {/if}\n    {#if element.type === Elements.Title}\n      <Title configuration={element.props}>\n        <T key={'title'} namespace={stepNamespace} />\n      </Title>\n    {/if}\n    {#if element.type === Elements.Paragraph}\n      <Paragraph configuration={element.props}>\n        <T key={'description'} namespace={stepNamespace} />\n      </Paragraph>\n    {/if}\n    {#if element.type === Elements.Button}\n      <div class=\"button-container\">\n        {#if isNativeCamera($configuration)}\n          <input\n            class=\"camera-input\"\n            type=\"file\"\n            accept=\"image/*\"\n            capture=\"environment\"\n            on:change={handler}\n          />\n        {/if}\n        <Button on:click={handleGoToNextStep} configuration={element.props}>\n          <T key={'button'} namespace={stepNamespace} />\n        </Button>\n      </div>\n    {/if}\n  {/each}\n</div>\n\n<style>\n  .container {\n    height: 100%;\n    padding: var(--padding);\n    position: var(--position);\n    background: var(--background);\n    text-align: center;\n  }\n  .button-container {\n    position: relative;\n  }\n  .camera-input {\n    position: absolute;\n    width: 100%;\n    height: 100%;\n    top: 0px;\n    left: 0px;\n    z-index: 3;\n    opacity: 0;\n    cursor: pointer;\n  }\n</style>\n","<script lang=\"ts\">\n  import CameraPhoto, { CaptureConfigOption, FACING_MODES } from 'jslib-html5-camera-photo';\n  import { T } from '../contexts/translation';\n  import { configuration } from '../contexts/configuration';\n  import { onDestroy, onMount } from 'svelte';\n  import {\n    CameraButton,\n    IconButton,\n    IconCloseButton,\n    Loader,\n    Overlay,\n    Paragraph,\n    VideoContainer,\n  } from '../atoms';\n  import { Elements } from '../contexts/configuration/types';\n  import { appState, IDocument } from '../contexts/app-state';\n  import { goToNextStep, goToPrevStep } from '../contexts/navigation';\n  import Title from '../atoms/Title/Title.svelte';\n  import { currentStepId, documents, selectedDocumentInfo } from '../contexts/app-state/stores';\n  import { preloadNextStepByCurrent } from '../services/preload-service';\n  import { ActionNames, sendButtonClickEvent, VerificationStatuses } from '../utils/event-service';\n  import { getLayoutStyles, getStepConfiguration } from '../ui-packs';\n  import { createToggle } from '../hooks/createToggle/createToggle';\n  import { getDocumentType } from '../utils/documents-utils';\n  import { IDocumentOptions } from '../organisms/DocumentOptions';\n  import { TDocumentType } from '../contexts/app-state/types';\n\n  export let stepId;\n\n  let video: HTMLVideoElement;\n  let container: HTMLDivElement;\n  let cameraPhoto: CameraPhoto | undefined = undefined;\n\n  const step = getStepConfiguration($configuration, stepId);\n  const style = getLayoutStyles($configuration, step);\n\n  const [isDisabled, , toggleOnIsDisabled, toggleOffIsDisabled] = createToggle(true);\n\n  const documentOptionsConfiguration = $configuration.components\n    ?.documentOptions as IDocumentOptions;\n\n  const documentType = getDocumentType(step, $selectedDocumentInfo);\n\n  const documentKind = $selectedDocumentInfo ? $selectedDocumentInfo.kind : undefined;\n\n  let stream: MediaStream;\n  const stepNamespace = `${step.namespace}.${documentKind || documentType}`;\n\n  $: {\n    if (!documentType) goToPrevStep(currentStepId, $configuration, $currentStepId);\n  }\n\n  onMount(() => {\n    if (!video) return;\n    cameraPhoto = new CameraPhoto(video);\n    cameraPhoto\n      .startCamera(FACING_MODES.ENVIRONMENT, {\n        width: 1920,\n        height: 1080,\n      })\n      .then(cameraStream => {\n        console.log('stream', cameraStream);\n        stream = cameraStream;\n        toggleOffIsDisabled();\n      })\n      .catch(error => {\n        console.log('error', error);\n      });\n  });\n\n  onDestroy(() => {\n    cameraPhoto?.stopCamera();\n  });\n\n  const clearDocs = (type: TDocumentType): IDocument[] => {\n    const { options } = documentOptionsConfiguration;\n    const isFromOptions = Object.keys(options).find(key => key === type);\n    if (isFromOptions) {\n      return $documents.filter(d => !Object.keys(options).find(key => key === d.type));\n    }\n    return $documents.filter(d => type !== d.type);\n  };\n\n  const addDocument = (type: TDocumentType, base64: string, document: IDocument): IDocument[] => {\n    const clearedDocuments = clearDocs(type);\n    return [\n      ...clearedDocuments,\n      {\n        ...document,\n        pages: [{ side: 'front', base64 }],\n      },\n    ];\n  };\n\n  const handleTakePhoto = () => {\n    if (!cameraPhoto || $isDisabled) return;\n\n    toggleOnIsDisabled();\n    const base64 = cameraPhoto.getDataUri(\n      $configuration.settings?.cameraSettings as CaptureConfigOption,\n    );\n    if (documentType) {\n      const document = {\n        type: documentType,\n        pages: [],\n        metadata: {},\n        kind: $selectedDocumentInfo?.kind,\n      };\n      $documents = addDocument(document.type, base64, document);\n      return goToNextStep(currentStepId, $configuration, $currentStepId);\n    }\n    return goToPrevStep(currentStepId, $configuration, $currentStepId);\n  };\n\n  preloadNextStepByCurrent($configuration, configuration, $currentStepId);\n</script>\n\n<div class=\"container\" {style} bind:this={container}>\n  {#each step.elements as element}\n    {#if element.type === Elements.IconButton}\n      <IconButton\n        configuration={element.props}\n        on:click={() => goToPrevStep(currentStepId, $configuration, $currentStepId)}\n      />\n    {/if}\n    {#if element.type === Elements.IconCloseButton}\n      <IconCloseButton\n        configuration={element.props}\n        on:click={() => {\n          sendButtonClickEvent(\n            ActionNames.CLOSE,\n            { status: VerificationStatuses.DATA_COLLECTION },\n            $appState,\n            true,\n          );\n        }}\n      />\n    {/if}\n    {#if element.type === Elements.VideoContainer}\n      <VideoContainer configuration={element.props}>\n        <!-- svelte-ignore a11y-media-has-caption -->\n        <video bind:this={video} autoplay playsinline />\n      </VideoContainer>\n    {/if}\n    {#if element.type === Elements.Loader && stream === undefined}\n      <Loader />\n    {/if}\n  {/each}\n  <div class=\"header\">\n    {#each step.elements as element}\n      {#if element.type === Elements.Title}\n        <Title configuration={element.props}>\n          <T key={'title'} namespace={stepNamespace} />\n        </Title>\n      {/if}\n      {#if element.type === Elements.Paragraph}\n        <Paragraph configuration={element.props}>\n          <T key={'description'} namespace={stepNamespace} />\n        </Paragraph>\n      {/if}\n    {/each}\n  </div>\n  {#if documentType}\n    <Overlay type={documentType} />\n  {/if}\n  {#each step.elements as element}\n    {#if element.type === Elements.CameraButton}\n      <CameraButton\n        on:click={handleTakePhoto}\n        configuration={element.props}\n        isDisabled={$isDisabled}\n      />\n    {/if}\n  {/each}\n</div>\n\n<style>\n  .container {\n    height: 100%;\n    position: var(--position);\n    background: var(--background);\n    padding: var(--padding);\n    text-align: center;\n    display: flex;\n    flex-direction: column;\n    align-items: center;\n  }\n\n  .header {\n    text-align: center;\n    display: flex;\n    flex-direction: column;\n    align-items: center;\n    justify-content: center;\n  }\n</style>\n","<script lang=\"ts\">\n  import { Button, ButtonWithIcon, IconButton, NextStepButton } from '../../atoms';\n  import { configuration as globalConfiguration } from '../../contexts/configuration';\n  import { goToNextStep, goToPrevStep } from '../../contexts/navigation';\n  import { T } from '../../contexts/translation';\n  import { ICSSProperties, makesLocalStyles } from '../../services/css-manager';\n  import { currentStepId } from '../../contexts/app-state';\n\n  const { navigationButtons: userConfiguration } = $globalConfiguration.components;\n\n  const configuration = userConfiguration;\n\n  export let skipBackSide = false;\n\n  const style = makesLocalStyles(configuration.props.style as ICSSProperties);\n\n  const skipType = skipBackSide ? 'back-side' : undefined;\n</script>\n\n<div {style} class=\"navigation-buttons\">\n  {#if configuration.backButton.type === 'button'}\n    <Button\n      isBack\n      configuration={configuration.backButton.props}\n      on:click={() => goToPrevStep(currentStepId, $globalConfiguration, $currentStepId, skipType)}\n    >\n      <T key=\"back\" namespace=\"navigation-buttons\" />\n    </Button>\n  {:else if configuration.backButton.type === 'iconButton'}\n    <IconButton\n      configuration={configuration.backButton.props}\n      on:click={() => goToPrevStep(currentStepId, $globalConfiguration, $currentStepId, skipType)}\n    />\n  {:else}\n    <ButtonWithIcon\n      configuration={configuration.backButton.props}\n      on:click={() => goToPrevStep(currentStepId, $globalConfiguration, $currentStepId, skipType)}\n    >\n      <T key=\"back\" namespace=\"navigation-buttons\" />\n    </ButtonWithIcon>\n  {/if}\n  {#if configuration.nextButton.type === 'button'}\n    <NextStepButton configuration={configuration.nextButton.props} {skipType}>\n      <T key=\"next\" namespace=\"navigation-buttons\" />\n    </NextStepButton>\n  {:else if configuration.nextButton.type === 'iconButton'}\n    <IconButton\n      configuration={configuration.nextButton.props}\n      on:click={() => goToNextStep(currentStepId, $globalConfiguration, $currentStepId, skipType)}\n    />\n  {:else}\n    <ButtonWithIcon\n      configuration={configuration.nextButton.props}\n      on:click={() => goToNextStep(currentStepId, $globalConfiguration, $currentStepId, skipType)}\n    >\n      <T key=\"next\" namespace=\"navigation-buttons\" />\n    </ButtonWithIcon>\n  {/if}\n</div>\n\n<style>\n  .navigation-buttons {\n    display: var(--display);\n    padding: var(--padding);\n    position: var(--position);\n    bottom: var(--bottom);\n    left: var(--left);\n    width: var(--width);\n    box-shadow: var(--box-shadow);\n    justify-content: var(--justify-content);\n    align-items: var(--align-items);\n    flex-direction: var(--flex-direction);\n  }\n</style>\n","<script lang=\"ts\">\n  import { T } from '../contexts/translation';\n  import { IconButton, IconCloseButton, Image, Paragraph, Photo, Title } from '../atoms';\n  import { configuration } from '../contexts/configuration';\n  import { Elements } from '../contexts/configuration/types';\n  import { goToPrevStep } from '../contexts/navigation';\n  import { appState, getDocImage } from '../contexts/app-state';\n  import { NavigationButtons } from '../molecules';\n  import { currentStepId, documents, selectedDocumentInfo } from '../contexts/app-state/stores';\n  import { preloadNextStepByCurrent } from '../services/preload-service';\n  import { ActionNames, sendButtonClickEvent, VerificationStatuses } from '../utils/event-service';\n  import { getLayoutStyles, getStepConfiguration } from '../ui-packs';\n  import { getFlowConfig } from '../contexts/flows/hooks';\n  import { getDocumentType } from '../utils/documents-utils';\n\n  export let stepId;\n\n  const step = getStepConfiguration($configuration, stepId);\n  const flow = getFlowConfig($configuration);\n  const style = getLayoutStyles($configuration, step);\n\n  const stepNamespace = step.namespace!;\n  const documentType = getDocumentType(step, $selectedDocumentInfo);\n\n  let image = '';\n  let skipBackSide = false;\n\n  $: {\n    if (!documentType) {\n      goToPrevStep(currentStepId, $configuration, $currentStepId);\n    }\n    if (documentType) {\n      image = getDocImage(documentType, $documents);\n    }\n    if ($selectedDocumentInfo && !$selectedDocumentInfo.backSide) {\n      skipBackSide = true;\n    }\n    preloadNextStepByCurrent(\n      $configuration,\n      configuration,\n      $currentStepId,\n      skipBackSide ? 'back-side' : undefined,\n    );\n  }\n</script>\n\n<div class=\"container\" {style}>\n  {#each step.elements as element}\n    {#if element.type === Elements.IconButton}\n      <IconButton\n        configuration={element.props}\n        on:click={() => goToPrevStep(currentStepId, $configuration, $currentStepId)}\n      />\n    {/if}\n    {#if element.type === Elements.IconCloseButton && flow.showCloseButton}\n      <IconCloseButton\n        configuration={element.props}\n        on:click={() => {\n          sendButtonClickEvent(\n            ActionNames.CLOSE,\n            { status: VerificationStatuses.DATA_COLLECTION },\n            $appState,\n            true,\n          );\n        }}\n      />\n    {/if}\n    {#if element.type === Elements.Title}\n      <Title configuration={element.props}>\n        <T key={'title'} namespace={stepNamespace} />\n      </Title>\n    {/if}\n    {#if element.type === Elements.Paragraph}\n      <Paragraph configuration={element.props}>\n        <T key={'description'} namespace={stepNamespace} />\n      </Paragraph>\n    {/if}\n    {#if element.type === Elements.Photo}\n      <Photo configuration={element.props} src={image} />\n    {/if}\n    {#if element.type === Elements.Image}\n      <Image configuration={element.props} />\n    {/if}\n  {/each}\n  <NavigationButtons {skipBackSide} />\n</div>\n\n<style>\n  .container {\n    padding: var(--padding);\n    position: var(--position);\n    background: var(--background);\n    text-align: center;\n    height: 100%;\n    display: flex;\n    flex-direction: column;\n  }\n</style>\n","<script lang=\"ts\">\n  import { T } from '../contexts/translation';\n  import { Button, IconButton, IconCloseButton, Image, Paragraph, Title } from '../atoms';\n  import { configuration } from '../contexts/configuration';\n  import { goToNextStep, goToPrevStep } from '../contexts/navigation';\n  import { Elements } from '../contexts/configuration/types';\n  import { ICameraEvent, nativeCameraHandler, updateDocument } from '../utils/photo-utils';\n  import { appState, currentStepId, IDocument, IDocumentInfo } from '../contexts/app-state';\n  import { isNativeCamera } from '../contexts/flows';\n  import { documents, selectedDocumentInfo } from '../contexts/app-state/stores';\n  import { preloadNextStepByCurrent } from '../services/preload-service';\n  import { ActionNames, sendButtonClickEvent, VerificationStatuses } from '../utils/event-service';\n  import { getLayoutStyles, getStepConfiguration } from '../ui-packs';\n  import { getFlowConfig } from '../contexts/flows/hooks';\n\n  export let stepId;\n\n  const step = getStepConfiguration($configuration, stepId);\n  const flow = getFlowConfig($configuration);\n  const style = getLayoutStyles($configuration, step);\n\n  const stepNamespace = step.namespace!;\n\n  let documentInfo: IDocumentInfo | undefined = undefined;\n  let document: IDocument | undefined;\n\n  $: {\n    documentInfo = step.documentInfo || $selectedDocumentInfo;\n    if (!documentInfo) goToPrevStep(currentStepId, $configuration, $currentStepId);\n    document = $documents.find(d => d.type === documentInfo?.type);\n    if (!document) goToPrevStep(currentStepId, $configuration, $currentStepId);\n  }\n\n  const handler = async (e: ICameraEvent) => {\n    const image = await nativeCameraHandler(e);\n    if (!documentInfo) {\n      throw Error(\"document context wasn't provided\");\n    }\n    if (!document) return;\n    const newDocumentsState = updateDocument(document, image, $documents);\n    $documents = newDocumentsState;\n    goToNextStep(currentStepId, $configuration, $currentStepId);\n  };\n\n  preloadNextStepByCurrent($configuration, configuration, $currentStepId);\n</script>\n\n<div class=\"container\" {style}>\n  {#each step.elements as element}\n    {#if element.type === Elements.IconButton}\n      <IconButton\n        configuration={element.props}\n        on:click={() => goToPrevStep(currentStepId, $configuration, $currentStepId)}\n      />\n    {/if}\n    {#if element.type === Elements.IconCloseButton && flow.showCloseButton}\n      <IconCloseButton\n        configuration={element.props}\n        on:click={() => {\n          sendButtonClickEvent(\n            ActionNames.CLOSE,\n            { status: VerificationStatuses.DATA_COLLECTION },\n            $appState,\n            true,\n          );\n        }}\n      />\n    {/if}\n    {#if element.type === Elements.Image}\n      <Image configuration={element.props} />\n    {/if}\n    {#if element.type === Elements.Title}\n      <Title configuration={element.props}>\n        <T key=\"title\" namespace={stepNamespace} />\n      </Title>\n    {/if}\n    {#if element.type === Elements.Paragraph}\n      <Paragraph configuration={element.props}>\n        <T key=\"description\" namespace={stepNamespace} />\n      </Paragraph>\n    {/if}\n    {#if element.type === Elements.Button}\n      <div class=\"button-container\">\n        {#if isNativeCamera($configuration)}\n          <input\n            class=\"camera-input\"\n            type=\"file\"\n            accept=\"image/*\"\n            capture=\"environment\"\n            on:change={handler}\n          />\n        {/if}\n        <Button\n          on:click={() => goToNextStep(currentStepId, $configuration, $currentStepId)}\n          configuration={element.props}\n        >\n          <T key=\"button\" namespace={stepNamespace} />\n        </Button>\n      </div>\n    {/if}\n  {/each}\n</div>\n\n<style>\n  .container {\n    display: flex;\n    flex-direction: column;\n    height: 100%;\n    padding: var(--padding);\n    position: var(--position);\n    background: var(--background);\n    text-align: center;\n  }\n\n  .button-container {\n    position: relative;\n  }\n  .camera-input {\n    position: absolute;\n    width: 100%;\n    height: 100%;\n    top: 0px;\n    left: 0px;\n    z-index: 3;\n    opacity: 0;\n  }\n</style>\n","<script lang=\"ts\">\n  import CameraPhoto, { CaptureConfigOption, FACING_MODES } from 'jslib-html5-camera-photo';\n  import { T } from '../contexts/translation';\n  import { configuration } from '../contexts/configuration';\n  import { onDestroy, onMount } from 'svelte';\n  import {\n    CameraButton,\n    IconButton,\n    Loader,\n    Overlay,\n    Paragraph,\n    Title,\n    VideoContainer,\n  } from '../atoms';\n  import { Elements } from '../contexts/configuration/types';\n  import { goToNextStep, goToPrevStep } from '../contexts/navigation';\n  import { currentStepId } from '../contexts/app-state';\n  import { documents, selectedDocumentInfo } from '../contexts/app-state/stores';\n  import { updateDocument } from '../utils/photo-utils';\n  import { createToggle } from '../hooks/createToggle/createToggle';\n  import { preloadNextStepByCurrent } from '../services/preload-service';\n  import { getLayoutStyles, getStepConfiguration } from '../ui-packs';\n  import { getDocumentType } from '../utils/documents-utils';\n\n  export let stepId;\n\n  let video: HTMLVideoElement;\n  let cameraPhoto: CameraPhoto | undefined = undefined;\n\n  const step = getStepConfiguration($configuration, stepId);\n  const style = getLayoutStyles($configuration, step);\n\n  const [isDisabled, , toggleOnIsDisabled, toggleOffIsDisabled] = createToggle(true);\n\n  const documentType = getDocumentType(step, $selectedDocumentInfo);\n\n  const documentKind = $selectedDocumentInfo ? $selectedDocumentInfo.kind : undefined;\n\n  let stream: MediaStream;\n  const stepNamespace = `${step.namespace}.${documentKind || documentType}`;\n  $: {\n    if (!documentType) goToPrevStep(currentStepId, $configuration, $currentStepId);\n  }\n\n  onMount(() => {\n    if (!video) return;\n    cameraPhoto = new CameraPhoto(video);\n    cameraPhoto\n      .startCamera(FACING_MODES.ENVIRONMENT, {\n        width: 1920,\n        height: 1080,\n      })\n      .then(cameraStream => {\n        console.log('stream', cameraStream);\n        stream = cameraStream;\n        toggleOffIsDisabled();\n      })\n      .catch(error => {\n        console.log('error', error);\n      });\n  });\n\n  onDestroy(() => {\n    cameraPhoto?.stopCamera();\n  });\n\n  const handleTakePhoto = () => {\n    const document = $documents.find(\n      d => (d.kind && d.kind === documentKind) || d.type === documentType,\n    );\n    if (!cameraPhoto || !document || $isDisabled) return;\n    const base64 = cameraPhoto.getDataUri(\n      $configuration.settings?.cameraSettings as CaptureConfigOption,\n    );\n    const newDocumentsState = updateDocument(document, base64, $documents);\n    $documents = newDocumentsState;\n    goToNextStep(currentStepId, $configuration, $currentStepId);\n    toggleOnIsDisabled();\n  };\n\n  preloadNextStepByCurrent($configuration, configuration, $currentStepId);\n</script>\n\n<div class=\"container\" {style}>\n  {#each step.elements as element}\n    {#if element.type === Elements.IconButton}\n      <IconButton\n        configuration={element.props}\n        on:click={() => goToPrevStep(currentStepId, $configuration, $currentStepId)}\n      />\n    {/if}\n    {#if element.type === Elements.VideoContainer}\n      <VideoContainer configuration={element.props}>\n        <!-- svelte-ignore a11y-media-has-caption -->\n        <video bind:this={video} autoplay playsinline />\n      </VideoContainer>\n    {/if}\n    {#if element.type === Elements.Loader && stream === undefined}\n      <Loader />\n    {/if}\n  {/each}\n  <div class=\"header\">\n    {#each step.elements as element}\n      {#if element.type === Elements.Title}\n        <Title configuration={element.props}>\n          <T key={`title`} namespace={stepNamespace} />\n        </Title>\n      {/if}\n      {#if element.type === Elements.Paragraph}\n        <Paragraph configuration={element.props}>\n          <T key={`description`} namespace={stepNamespace} />\n        </Paragraph>\n      {/if}\n    {/each}\n  </div>\n  {#if documentType}\n    <Overlay type={documentType} />\n  {/if}\n  {#each step.elements as element}\n    {#if element.type === Elements.CameraButton}\n      <CameraButton\n        on:click={handleTakePhoto}\n        configuration={element.props}\n        isDisabled={$isDisabled}\n      />\n    {/if}\n  {/each}\n</div>\n\n<style>\n  .container {\n    height: 100%;\n    position: var(--position);\n    background: var(--background);\n    padding: var(--padding);\n    text-align: center;\n    display: flex;\n    flex-direction: column;\n    align-items: center;\n    justify-content: space-between;\n  }\n  .header {\n    text-align: center;\n    display: flex;\n    flex-direction: column;\n    align-items: center;\n    justify-content: center;\n  }\n</style>\n","<script lang=\"ts\">\n  import { T } from '../contexts/translation';\n  import { IconButton, IconCloseButton, Image, Paragraph, Photo, Title } from '../atoms';\n  import { configuration } from '../contexts/configuration';\n  import { Elements } from '../contexts/configuration/types';\n  import { goToPrevStep } from '../contexts/navigation';\n  import {\n    appState,\n    currentStepId,\n    documents,\n    getDocImage,\n    IDocumentInfo,\n    selectedDocumentInfo,\n  } from '../contexts/app-state';\n  import { NavigationButtons } from '../molecules';\n  import { getLayoutStyles, getStepConfiguration } from '../ui-packs';\n  import { preloadNextStepByCurrent } from '../services/preload-service';\n  import { ActionNames, sendButtonClickEvent, VerificationStatuses } from '../utils/event-service';\n  import { getFlowConfig } from '../contexts/flows/hooks';\n\n  export let stepId;\n\n  const step = getStepConfiguration($configuration, stepId);\n  const flow = getFlowConfig($configuration);\n  const style = getLayoutStyles($configuration, step);\n\n  const stepNamespace = step.namespace!;\n\n  let image: string;\n  let documentInfo: IDocumentInfo | undefined = undefined;\n\n  $: {\n    documentInfo = step.documentInfo || $selectedDocumentInfo;\n    if ($documents.length === 0 || !documentInfo) {\n      goToPrevStep(currentStepId, $configuration, $currentStepId);\n    }\n    if (documentInfo) {\n      image = getDocImage(documentInfo.type, $documents, 'back');\n    }\n  }\n\n  preloadNextStepByCurrent($configuration, configuration, $currentStepId);\n</script>\n\n<div class=\"container\" {style}>\n  {#each step.elements as element}\n    {#if element.type === Elements.IconButton}\n      <IconButton\n        configuration={element.props}\n        on:click={() => goToPrevStep(currentStepId, $configuration, $currentStepId)}\n      />\n    {/if}\n    {#if element.type === Elements.IconCloseButton && flow.showCloseButton}\n      <IconCloseButton\n        configuration={element.props}\n        on:click={() => {\n          sendButtonClickEvent(\n            ActionNames.CLOSE,\n            { status: VerificationStatuses.DATA_COLLECTION },\n            $appState,\n            true,\n          );\n        }}\n      />\n    {/if}\n    {#if element.type === Elements.Title}\n      <Title configuration={element.props}>\n        <T key=\"title\" namespace={stepNamespace} />\n      </Title>\n    {/if}\n    {#if element.type === Elements.Paragraph}\n      <Paragraph configuration={element.props}>\n        <T key=\"description\" namespace={stepNamespace} />\n      </Paragraph>\n    {/if}\n    {#if element.type === Elements.Photo}\n      <Photo configuration={element.props} src={image} />\n    {/if}\n    {#if element.type === Elements.Image}\n      <Image configuration={element.props} />\n    {/if}\n  {/each}\n  <NavigationButtons />\n</div>\n\n<style>\n  .container {\n    padding: var(--padding);\n    position: var(--position);\n    background: var(--background);\n    text-align: center;\n    height: 100%;\n    display: flex;\n    flex-direction: column;\n  }\n</style>\n","export const flowStart = () => {\n  return;\n};\n\nexport const visitedPage = (_pathname: string, _search: string) => {\n  return;\n};\n\nexport const flowApproved = () => {\n  return;\n};\n\nexport const flowDeclined = () => {\n  return;\n};\n\nexport const flowResubmission = () => {\n  return;\n};\n\nexport const flowUploadLoader = () => {\n  return;\n};\n\nexport const flowError = () => {\n  return;\n};\n","<script lang=\"ts\">\n  import { onDestroy } from 'svelte';\n  import { T } from '../contexts/translation';\n  import { Button, IconButton, IconCloseButton, Image, Paragraph, Title } from '../atoms';\n  import { configuration } from '../contexts/configuration';\n  import { appState, currentParams } from '../contexts/app-state';\n  import { Elements } from '../contexts/configuration/types';\n  import { flowApproved } from '../services/analytics';\n  import {\n    ActionNames,\n    sendButtonClickEvent,\n    sendFlowCompleteEvent,\n    VerificationStatuses,\n  } from '../utils/event-service';\n  import { DecisionStatus } from '../contexts/app-state/types';\n  import { getLayoutStyles, getStepConfiguration } from '../ui-packs';\n  import { getFlowConfig } from '../contexts/flows/hooks';\n\n  export let stepId;\n\n  const step = getStepConfiguration($configuration, stepId);\n  const flow = getFlowConfig($configuration);\n  const style = getLayoutStyles($configuration, step);\n\n  const stepNamespace = step.namespace!;\n\n  flowApproved();\n\n  const handleClose = () => {\n    sendFlowCompleteEvent({\n      status: VerificationStatuses.COMPLETED,\n      idvResult: DecisionStatus.APPROVED,\n    });\n  };\n\n  onDestroy(() => {\n    $currentParams = null;\n  });\n</script>\n\n<div class=\"container\" {style}>\n  {#each step.elements as element}\n    {#if element.type === Elements.IconButton}\n      <IconButton configuration={element.props} />\n    {/if}\n    {#if element.type === Elements.IconCloseButton && flow.showCloseButton}\n      <IconCloseButton\n        configuration={element.props}\n        on:click={() => {\n          sendButtonClickEvent(\n            ActionNames.CLOSE,\n            { status: VerificationStatuses.DATA_COLLECTION },\n            $appState,\n            true,\n          );\n        }}\n      />\n    {/if}\n    {#if element.type === Elements.Image}\n      <Image configuration={element.props} />\n    {/if}\n    {#if element.type === Elements.Title}\n      <Title configuration={element.props}>\n        <T key=\"title\" namespace={stepNamespace} />\n      </Title>\n    {/if}\n    {#if element.type === Elements.Paragraph}\n      <Paragraph configuration={element.props}>\n        <T key={element.props.context || 'description'} namespace={stepNamespace} />\n      </Paragraph>\n    {/if}\n    {#if element.type === Elements.Button}\n      <Button on:click={handleClose} configuration={element.props}>\n        <T key=\"button\" namespace={stepNamespace} />\n      </Button>\n    {/if}\n  {/each}\n</div>\n\n<style>\n  .container {\n    display: flex;\n    flex-direction: column;\n    padding: var(--padding);\n    position: relative;\n    background: var(--background);\n    text-align: center;\n    height: 100%;\n  }\n</style>\n","<script lang=\"ts\">\n  import { T } from '../contexts/translation';\n  import { IconButton, IconCloseButton, Image, NextStepButton, Paragraph, Title } from '../atoms';\n  import { configuration } from '../contexts/configuration';\n  import { goToNextStep, goToPrevStep } from '../contexts/navigation/hooks';\n  import { Elements } from '../contexts/configuration/types';\n  import { ICameraEvent, nativeCameraHandler } from '../utils/photo-utils';\n  import { getFlowConfig, isNativeCamera } from '../contexts/flows/hooks';\n  import { preloadNextStepByCurrent } from '../services/preload-service';\n  import {\n    appState,\n    currentStepId,\n    selectedDocumentInfo,\n    selfieUri,\n  } from '../contexts/app-state/stores';\n  import { ActionNames, sendButtonClickEvent, VerificationStatuses } from '../utils/event-service';\n  import { getLayoutStyles, getStepConfiguration } from '../ui-packs';\n  import { createToggle } from '../hooks/createToggle/createToggle';\n\n  export let stepId;\n\n  const step = getStepConfiguration($configuration, stepId);\n  const flow = getFlowConfig($configuration);\n  const style = getLayoutStyles($configuration, step);\n\n  const stepNamespace = step.namespace!;\n\n  let skipBackSide = false;\n\n  $: {\n    if ($selectedDocumentInfo && !$selectedDocumentInfo.backSide) {\n      skipBackSide = true;\n    }\n  }\n\n  const [isDisabled, , toggleOnIsDisabled] = createToggle();\n  const handler = async (e: ICameraEvent) => {\n    if (!e.target || $isDisabled) return;\n    $selfieUri = await nativeCameraHandler(e);\n    goToNextStep(currentStepId, $configuration, $currentStepId);\n    toggleOnIsDisabled();\n  };\n\n  preloadNextStepByCurrent($configuration, configuration, $currentStepId);\n</script>\n\n<div class=\"container\" {style}>\n  {#each step.elements as element}\n    {#if element.type === Elements.IconButton}\n      <IconButton\n        configuration={element.props}\n        on:click={() =>\n          goToPrevStep(\n            currentStepId,\n            $configuration,\n            $currentStepId,\n            skipBackSide ? 'back-side' : undefined,\n          )}\n      />\n    {/if}\n    {#if element.type === Elements.IconCloseButton && flow.showCloseButton}\n      <IconCloseButton\n        configuration={element.props}\n        on:click={() => {\n          sendButtonClickEvent(\n            ActionNames.CLOSE,\n            { status: VerificationStatuses.DATA_COLLECTION },\n            $appState,\n            true,\n          );\n        }}\n      />\n    {/if}\n    {#if element.type === Elements.Image}\n      <Image configuration={element.props} />\n    {/if}\n    {#if element.type === Elements.Title}\n      <Title configuration={element.props}>\n        <T key=\"title\" namespace={stepNamespace} />\n      </Title>\n    {/if}\n    {#if element.type === Elements.Paragraph}\n      <Paragraph configuration={element.props}>\n        <T key={element.props.context || 'description'} namespace={stepNamespace} />\n      </Paragraph>\n    {/if}\n    {#if element.type === Elements.Button}\n      <div class=\"button-container\">\n        {#if isNativeCamera($configuration)}\n          <input\n            class=\"camera-input\"\n            type=\"file\"\n            accept=\"image/*\"\n            capture=\"user\"\n            on:change={handler}\n          />\n        {/if}\n        <NextStepButton configuration={element.props} disabled={$isDisabled}>\n          <T key=\"button\" namespace={stepNamespace} />\n        </NextStepButton>\n      </div>\n    {/if}\n  {/each}\n</div>\n\n<style>\n  .container {\n    display: flex;\n    flex-direction: column;\n    padding: var(--padding);\n    position: var(--position);\n    text-align: center;\n    height: 100%;\n    background: var(--background);\n  }\n  .button-container {\n    position: relative;\n  }\n  .camera-input {\n    position: absolute;\n    width: 100%;\n    height: 100%;\n    top: 0px;\n    left: 0px;\n    z-index: 3;\n    opacity: 0;\n    cursor: pointer;\n  }\n</style>\n","export const isMobile = () => {\n  const toMatch = [\n    /Android/i,\n    /webOS/i,\n    /iPhone/i,\n    /iPad/i,\n    /iPod/i,\n    /BlackBerry/i,\n    /Windows Phone/i,\n  ];\n\n  return toMatch.some(toMatchItem => {\n    return navigator.userAgent.match(toMatchItem);\n  });\n};\n","<script lang=\"ts\">\n  import CameraPhoto, { CaptureConfigOption, FACING_MODES } from 'jslib-html5-camera-photo';\n  import { T } from '../contexts/translation';\n  import { configuration } from '../contexts/configuration';\n  import { onDestroy, onMount } from 'svelte';\n  import {\n    CameraButton,\n    IconButton,\n    IconCloseButton,\n    Loader,\n    Overlay,\n    Paragraph,\n    VideoContainer,\n  } from '../atoms';\n  import { Elements } from '../contexts/configuration/types';\n  import { goToNextStep, goToPrevStep } from '../contexts/navigation';\n  import { currentStepId, DocumentType } from '../contexts/app-state';\n  import Title from '../atoms/Title/Title.svelte';\n  import { appState, selfieUri } from '../contexts/app-state/stores';\n  import { isMobile } from '../utils/is-mobile';\n  import { createToggle } from '../hooks/createToggle/createToggle';\n  import { preloadNextStepByCurrent } from '../services/preload-service';\n  import { ActionNames, sendButtonClickEvent, VerificationStatuses } from '../utils/event-service';\n  import { getLayoutStyles, getStepConfiguration } from '../ui-packs';\n\n  let video: HTMLVideoElement;\n  let cameraPhoto: CameraPhoto | undefined = undefined;\n\n  export let stepId;\n\n  const step = getStepConfiguration($configuration, stepId);\n  const stepNamespace = step.namespace!;\n  const style = getLayoutStyles($configuration, step);\n\n  const [isDisabled, , toggleOnIsDisabled, toggleOffIsDisabled] = createToggle(true);\n\n  const facingMode = isMobile() ? FACING_MODES.USER : FACING_MODES.ENVIRONMENT;\n  let stream: MediaStream;\n\n  onMount(() => {\n    if (!video) return;\n    cameraPhoto = new CameraPhoto(video);\n    cameraPhoto\n      .startCamera(facingMode, {\n        width: 1920,\n        height: 1080,\n      })\n      .then(cameraStream => {\n        console.log('stream', cameraStream);\n        stream = cameraStream;\n        toggleOffIsDisabled();\n      })\n      .catch(error => {\n        console.log('error', error);\n      });\n  });\n\n  onDestroy(() => {\n    cameraPhoto?.stopCamera();\n  });\n\n  const handleTakePhoto = () => {\n    if (!cameraPhoto || $isDisabled) return;\n\n    const dataUri = cameraPhoto.getDataUri(\n      $configuration.settings?.selfieCameraSettings as CaptureConfigOption,\n    );\n    $selfieUri = dataUri;\n    goToNextStep(currentStepId, $configuration, $currentStepId);\n    toggleOnIsDisabled();\n  };\n\n  preloadNextStepByCurrent($configuration, configuration, $currentStepId);\n</script>\n\n<div class=\"container\" {style}>\n  {#each step.elements as element}\n    {#if element.type === Elements.IconButton}\n      <IconButton\n        configuration={element.props}\n        on:click={() => goToPrevStep(currentStepId, $configuration, $currentStepId)}\n      />\n    {/if}\n    {#if element.type === Elements.IconCloseButton}\n      <IconCloseButton\n        configuration={element.props}\n        on:click={() => {\n          sendButtonClickEvent(\n            ActionNames.CLOSE,\n            { status: VerificationStatuses.DATA_COLLECTION },\n            $appState,\n            true,\n          );\n        }}\n      />\n    {/if}\n    {#if element.type === Elements.VideoContainer}\n      <VideoContainer configuration={element.props} isSelfie>\n        <!-- svelte-ignore a11y-media-has-caption -->\n        <video bind:this={video} autoplay playsinline />\n      </VideoContainer>\n    {/if}\n    {#if element.type === Elements.Loader && stream === undefined}\n      <Loader />\n    {/if}\n  {/each}\n  <div class=\"header\">\n    {#each step.elements as element}\n      {#if element.type === Elements.Title}\n        <Title configuration={element.props}>\n          <T key={'title'} namespace={stepNamespace} />\n        </Title>\n      {/if}\n      {#if element.type === Elements.Paragraph}\n        <Paragraph configuration={element.props}>\n          <T key={'description'} namespace={stepNamespace} />\n        </Paragraph>\n      {/if}\n    {/each}\n  </div>\n  <Overlay type={DocumentType.SELFIE} />\n  {#each step.elements as element}\n    {#if element.type === Elements.CameraButton}\n      <CameraButton\n        on:click={handleTakePhoto}\n        configuration={element.props}\n        isDisabled={$isDisabled}\n      />\n    {/if}\n  {/each}\n</div>\n\n<style>\n  .container {\n    height: 100%;\n    position: var(--position);\n    background: var(--background);\n    padding: var(--padding);\n    text-align: center;\n    display: flex;\n    flex-direction: column;\n    align-items: center;\n    justify-content: center;\n  }\n  .header {\n    text-align: center;\n    display: flex;\n    flex-direction: column;\n    align-items: center;\n    justify-content: center;\n  }\n</style>\n","<script lang=\"ts\">\n  import { T } from '../contexts/translation';\n  import { IconButton, IconCloseButton, Image, Title } from '../atoms';\n  import { configuration } from '../contexts/configuration';\n  import { Elements } from '../contexts/configuration/types';\n  import { goToPrevStep } from '../contexts/navigation';\n  import Paragraph from '../atoms/Paragraph/Paragraph.svelte';\n  import NavigationButtons from '../molecules/NavigationButtons/NavigationButtons.svelte';\n  import Photo from '../atoms/Photo/Photo.svelte';\n  import { appState, currentStepId, selfieUri } from '../contexts/app-state';\n  import { ActionNames, sendButtonClickEvent, VerificationStatuses } from '../utils/event-service';\n  import { getLayoutStyles, getStepConfiguration } from '../ui-packs';\n  import { getFlowConfig } from '../contexts/flows/hooks';\n\n  export let stepId;\n\n  const step = getStepConfiguration($configuration, stepId);\n  const flow = getFlowConfig($configuration);\n  const style = getLayoutStyles($configuration, step);\n\n  const stepNamespace = step.namespace!;\n</script>\n\n<div class=\"container\" {style}>\n  {#each step.elements as element}\n    {#if element.type === Elements.Photo}\n      <Photo src={$selfieUri} configuration={element.props} />\n    {/if}\n    {#if element.type === Elements.IconButton}\n      <IconButton\n        configuration={element.props}\n        on:click={() => goToPrevStep(currentStepId, $configuration, $currentStepId)}\n      />\n    {/if}\n    {#if element.type === Elements.IconCloseButton && flow.showCloseButton}\n      <IconCloseButton\n        configuration={element.props}\n        on:click={() => {\n          sendButtonClickEvent(\n            ActionNames.CLOSE,\n            { status: VerificationStatuses.DATA_COLLECTION },\n            $appState,\n            true,\n          );\n        }}\n      />\n    {/if}\n    {#if element.type === Elements.Title}\n      <Title configuration={element.props}>\n        <T key=\"title\" namespace={stepNamespace} />\n      </Title>\n    {/if}\n    {#if element.type === Elements.Paragraph}\n      <Paragraph configuration={element.props}>\n        <T key=\"description\" namespace={stepNamespace} />\n      </Paragraph>\n    {/if}\n    {#if element.type === Elements.Image}\n      <Image configuration={element.props} />\n    {/if}\n  {/each}\n  <NavigationButtons />\n</div>\n\n<style>\n  .container {\n    padding: var(--padding);\n    position: var(--position);\n    background: var(--background);\n    text-align: center;\n    height: 100%;\n    display: flex;\n    flex-direction: column;\n  }\n</style>\n","import { DevMocks, ISelectedParams, IStoreData } from '../../contexts/app-state';\nimport { IDocumentVerificationResponse, ISendDocumentsResponse } from './types';\nimport { getFlowConfig } from '../../contexts/flows/hooks';\nimport { IAppConfiguration } from '../../contexts/configuration';\nimport {\n  getAuthorizationHeader,\n  getIsDevelopment,\n  getStartVerificationEndpoint,\n  getVerificationStatusEndpoint,\n} from '../../contexts/configuration/getters';\nimport { DecisionStatus } from '../../contexts/app-state/types';\nimport { AnyRecord } from '../../../types';\n\nconst outerScopeContext = window.__blrn_context;\nconst docTypeMapping = {\n  documentBack: 'document-back',\n  documentFront: 'document-front',\n  selfie: 'face',\n};\n\nexport const generateParams = (data: IDocumentVerificationResponse): ISelectedParams => {\n  const params: ISelectedParams = { sync: true };\n  Object.keys(data).forEach(key => {\n    const value = data[key as keyof IDocumentVerificationResponse] as string;\n    params[key] = value;\n  });\n  return params;\n};\n\nconst staticHeaders = {\n  mode: 'no-cors',\n  'Content-Type': 'application/json',\n};\n\nconst httpPost = async <TResponse>(url: string, body: AnyRecord) => {\n  const response = await fetch(url, {\n    method: 'POST',\n    headers: {\n      Authorization: getAuthorizationHeader(),\n      ...staticHeaders,\n    },\n    body: JSON.stringify(body),\n  });\n  if (!response.ok) {\n    throw new Error(\n      `Error fetching ${url}. http code: ${response.status}, ${response.statusText}.`,\n    );\n  }\n  return response.json() as Promise<TResponse>;\n};\n\nconst httpGet = async (url: string) => {\n  const response = await fetch(url, {\n    method: 'GET',\n    headers: {\n      Authorization: getAuthorizationHeader(),\n    },\n  });\n  if (!response.ok) {\n    throw new Error(\n      `Error fetching ${url}. http code: ${response.status}, ${response.statusText}.`,\n    );\n  }\n  return response.json();\n};\n\nexport const getVerificationStatus = async (_endUserId: string) => {\n  const verificationId = localStorage.getItem('verificationId') as string;\n  const endpointUrl = getVerificationStatusEndpoint({ verificationId });\n  // Enter a validation step here that would infer the response's type\n  return httpGet(endpointUrl) as Promise<IDocumentVerificationResponse>;\n};\n\nexport const verifyDocuments = async (\n  data: IStoreData,\n  endUserId: string,\n  configuration: IAppConfiguration,\n): Promise<ISendDocumentsResponse> => {\n  const documentsForUpload: {\n    metadata: Record<string, string>;\n    type: string;\n    pages: unknown;\n  }[] = [];\n  if (data.selfie) {\n    documentsForUpload.push({\n      type: docTypeMapping['selfie'],\n      metadata: {},\n      pages: [{ base64: data.selfie }],\n    });\n  }\n  documentsForUpload.push(...data.docs);\n\n  const endUserInfo = {\n    firstName: configuration.endUserInfo.firstName,\n    lastName: configuration.endUserInfo.lastName,\n    id: endUserId,\n    type: getFlowConfig(configuration).userType,\n    phone: configuration.endUserInfo.phone,\n    email: configuration.endUserInfo.email,\n    language: configuration.endUserInfo.language,\n  };\n  const payload: {\n    endUserInfo: typeof endUserInfo;\n    documents: typeof documentsForUpload;\n    devMocks?: DevMocks;\n  } = {\n    endUserInfo,\n    documents: documentsForUpload,\n  };\n\n  if (getIsDevelopment()) {\n    const devMocks: DevMocks = {\n      resultTime: (outerScopeContext && outerScopeContext.mockResultTime) || 7, // 3 seconds default\n      reasonCode: outerScopeContext && outerScopeContext.mockReasonCode,\n      code: outerScopeContext && outerScopeContext.mockCode,\n      idvResult: (outerScopeContext && outerScopeContext.mockIdvResult) || DecisionStatus.APPROVED,\n    };\n    payload.devMocks = devMocks;\n  }\n\n  const verificationRes = await httpPost<\n    ISendDocumentsResponse & {\n      verificationId: string;\n    }\n  >(getStartVerificationEndpoint(), payload);\n  localStorage.setItem('verificationId', verificationRes.verificationId);\n  return verificationRes;\n};\n","import {\n  documents,\n  IDocument,\n  IStoreData,\n  selectedDocumentInfo,\n  selfieUri,\n} from '../contexts/app-state';\nimport { IAppConfiguration } from '../contexts/configuration';\nimport { verifyDocuments } from '../services/http';\n\nexport const broofa = () => {\n  return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\n    const r = (Math.random() * 16) | 0,\n      v = c == 'x' ? r : (r & 0x3) | 0x8;\n    return v.toString(16);\n  });\n};\n\nexport const verifyDocumentsAndCloseFlow = (configuration: IAppConfiguration) => {\n  const endUserId = configuration.endUserInfo.id || broofa();\n  let _documents: IDocument[] = [];\n  let _selectedDocumentInfo;\n  let _selfie;\n  documents.update(d => {\n    _documents = d;\n    return d;\n  });\n  selectedDocumentInfo.update(d => {\n    _selectedDocumentInfo = d;\n    return d;\n  });\n  selfieUri.update(d => {\n    _selfie = d;\n    return d;\n  });\n  const data: IStoreData = {\n    docs: _documents,\n    selectedDocumentInfo: _selectedDocumentInfo,\n    selfie: _selfie,\n  };\n  return verifyDocuments(data, endUserId, configuration);\n};\n","<script lang=\"ts\">\n  import { toast } from '@zerodevx/svelte-toast';\n  import { Elements } from '../contexts/configuration/types';\n  import { FlyingText, Image, Loader } from '../atoms';\n  import { configuration } from '../contexts/configuration';\n  import {\n    currentParams,\n    currentStepId,\n    documents,\n    ISelectedParams,\n    IStoreData,\n    selectedDocumentInfo,\n    selfieUri,\n  } from '../contexts/app-state';\n  import { sendVerificationUpdateEvent } from '../utils/event-service';\n  import { ISendDocumentsResponse, VerificationStatuses } from '../utils/event-service/types';\n  import { onDestroy, onMount } from 'svelte';\n  import { t } from '../contexts/translation/hooks';\n  import { flowUploadLoader } from '../services/analytics';\n  import { getFlowConfig, getFlowName } from '../contexts/flows/hooks';\n  import { generateParams, getVerificationStatus, verifyDocuments } from '../services/http';\n  import { DecisionStatus } from '../contexts/app-state/types';\n  import { preloadStepById } from '../services/preload-service';\n  import { getLayoutStyles, getStepConfiguration } from '../ui-packs';\n  import { broofa } from '../utils/api-utils';\n  import { sendFlowErrorEvent } from '../utils/event-service/utils';\n\n  flowUploadLoader();\n\n  const WAITING_TIME = 1000 * 60 * 3; // 3 minutes\n\n  export let stepId;\n  const flowName: string = getFlowName();\n  const step = getStepConfiguration($configuration, stepId);\n  const style = getLayoutStyles($configuration, step);\n  const stepNamespace = step.namespace!;\n\n  let timeout: NodeJS.Timeout;\n  let veryficationTimeout: NodeJS.Timeout;\n  let dataVerified = false;\n  let review = false;\n  let showText = true;\n\n  const endUserId = $configuration.endUserInfo.id || broofa();\n  const checkStatus = async (data: ISendDocumentsResponse) => {\n    try {\n      const response = await getVerificationStatus(endUserId);\n      if (response.status === VerificationStatuses.PENDING) {\n        veryficationTimeout = setTimeout(() => checkStatus(data), 2000);\n        return;\n      }\n\n      const params = generateParams(response);\n      sendVerificationUpdateEvent(response, response.idvResult === DecisionStatus.APPROVED);\n\n      showText = false;\n      if (\n        response.idvResult === DecisionStatus.DECLINED ||\n        response.idvResult === DecisionStatus.REVIEW\n      ) {\n        $currentParams = params;\n        await preloadStepById($configuration, configuration, 'decline', flowName);\n        $currentStepId = 'decline';\n      }\n      if (response.idvResult === DecisionStatus.RESUBMISSION_REQUESTED) {\n        $currentParams = params;\n        await preloadStepById($configuration, configuration, 'resubmission', flowName);\n        $currentStepId = 'resubmission';\n      }\n      if (response.idvResult === DecisionStatus.APPROVED) {\n        $currentParams = params;\n        await preloadStepById($configuration, configuration, 'final', flowName);\n        $currentStepId = 'final';\n      }\n    } catch (error) {\n      toast.push(t('general', 'errorDocumentVerification'));\n      veryficationTimeout = setTimeout(() => checkStatus(data), 2000);\n    }\n  };\n\n  const makeRequest = async (data: IStoreData) => {\n    let res;\n    try {\n      res = await verifyDocuments(data, endUserId, $configuration);\n    } catch (error) {\n      toast.push(t('general', 'errorDocuments'));\n      console.error('Error sending documents', error);\n      $currentParams = { message: error } as ISelectedParams;\n      await preloadStepById($configuration, configuration, 'error', flowName);\n      //$currentStepId = 'error';\n\n      sendFlowErrorEvent(error);\n\n      return;\n    }\n\n    dataVerified = true;\n    const flowConfig = getFlowConfig($configuration);\n    if (flowConfig.syncFlow) {\n      checkStatus(res);\n      return;\n    }\n    showText = false;\n    await preloadStepById($configuration, configuration, 'final', flowName);\n    $currentStepId = 'final';\n  };\n\n  onMount(() => {\n    const data: IStoreData = {\n      docs: $documents,\n      selectedDocumentInfo: $selectedDocumentInfo,\n      selfie: $selfieUri,\n    };\n    makeRequest(data);\n    timeout = setTimeout(async () => {\n      showText = false;\n      await preloadStepById($configuration, configuration, 'decline', flowName);\n      //$currentStepId = 'decline';\n    }, WAITING_TIME);\n  });\n\n  onDestroy(() => {\n    if (timeout) {\n      clearTimeout(timeout);\n    }\n    if (veryficationTimeout) {\n      clearTimeout(veryficationTimeout);\n    }\n  });\n</script>\n\n<div class=\"container\" {style}>\n  {#if showText}\n    {#if !review}\n      <div class=\"text-container\">\n        <FlyingText\n          texts={[\n            { text: t('loader', 'text-one'), startTime: 10, endTime: 5000 },\n            { text: t('loader', 'text-two'), startTime: 6000, endTime: 'infinity' },\n          ]}\n        />\n      </div>\n    {:else}\n      <div class=\"text-container\">\n        <FlyingText\n          texts={[{ text: t('loader', 'text-three'), startTime: 1000, endTime: 'infinity' }]}\n        />\n      </div>\n    {/if}\n  {/if}\n  {#each step.elements as element}\n    {#if element.type === Elements.Image}\n      <Image configuration={element.props} />\n    {/if}\n  {/each}\n  <Loader />\n</div>\n\n<style>\n  .container {\n    padding: var(--padding);\n    color: var(--color);\n    position: relative;\n    background: var(--background);\n    text-align: center;\n    height: 100%;\n  }\n\n  .text-container {\n    position: absolute;\n    top: 50%;\n    left: 50%;\n    transform: translate(-50%, calc(-50% + -86px));\n    z-index: 100;\n  }\n</style>\n","<script lang=\"ts\">\n  import {\n    configuration as globalConfiguration,\n    IElementProps,\n  } from '../../contexts/configuration';\n  import { ICSSProperties } from '../../services/css-manager';\n  import { getComponentStyles } from '../../ui-packs';\n\n  export let configuration: IElementProps;\n\n  const styleProps = configuration.style as ICSSProperties;\n\n  const style = getComponentStyles($globalConfiguration.components?.errorText || {}, styleProps);\n</script>\n\n<div {style}>\n  <slot />\n</div>\n\n<style>\n  div {\n    background: var(--background);\n    border: var(--border);\n    color: var(--color);\n    border-radius: var(--border-radius);\n    padding: var(--padding);\n    margin: var(--margin);\n    font-size: var(--font-size);\n    text-align: var(--text-align);\n  }\n</style>\n","<script lang=\"ts\">\n  import { T } from '../contexts/translation';\n  import { Button, IconCloseButton, Image, Title } from '../atoms';\n  import { configuration } from '../contexts/configuration';\n  import { appState, currentParams, currentStepId } from '../contexts/app-state';\n  import { Elements } from '../contexts/configuration/types';\n  import ErrorText from '../atoms/ErrorText/ErrorText.svelte';\n  import { flowResubmission } from '../services/analytics';\n  import { onDestroy } from 'svelte';\n  import { ActionNames, sendButtonClickEvent, VerificationStatuses } from '../utils/event-service';\n  import { getLayoutStyles, getStepConfiguration } from '../ui-packs';\n  import { getFlowConfig } from '../contexts/flows/hooks';\n  import { isDocumentSelectionStepExists } from '../utils/documents-utils';\n\n  export let stepId;\n\n  const step = getStepConfiguration($configuration, stepId);\n  const flow = getFlowConfig($configuration);\n  const style = getLayoutStyles($configuration, step);\n\n  const stepNamespace = step.namespace!;\n  const hasDocumentSelection = isDocumentSelectionStepExists($configuration);\n\n  const reasonCode = $currentParams ? $currentParams.reasonCode : null;\n\n  const handleNavigate = () => {\n    if (hasDocumentSelection) {\n      $currentStepId = 'select-document';\n      return;\n    }\n    $currentStepId = 'document-start';\n  };\n\n  onDestroy(() => {\n    $currentParams = null;\n  });\n\n  flowResubmission();\n</script>\n\n<div class=\"container\" {style}>\n  {#each step.elements as element}\n    {#if element.type === Elements.Image}\n      <Image configuration={element.props} />\n    {/if}\n    {#if element.type === Elements.IconCloseButton && flow.showCloseButton}\n      <IconCloseButton\n        configuration={element.props}\n        on:click={() => {\n          sendButtonClickEvent(\n            ActionNames.CLOSE,\n            { status: VerificationStatuses.DATA_COLLECTION },\n            $appState,\n            true,\n          );\n        }}\n      />\n    {/if}\n    {#if element.type === Elements.Title}\n      <Title configuration={element.props}>\n        <T key={`${reasonCode}-title`} namespace={stepNamespace} />\n      </Title>\n    {/if}\n    {#if element.type === Elements.ErrorText}\n      <ErrorText configuration={element.props}>\n        <T key={`${reasonCode}-description`} namespace={stepNamespace} />\n      </ErrorText>\n    {/if}\n    {#if element.type === Elements.Button}\n      <Button configuration={element.props} on:click={handleNavigate}>\n        <T key={`${reasonCode}-button`} namespace={stepNamespace} />\n      </Button>\n    {/if}\n  {/each}\n</div>\n\n<style>\n  .container {\n    padding: var(--padding);\n    position: relative;\n    background: var(--background);\n    text-align: center;\n    height: 100%;\n    display: flex;\n    flex-direction: column;\n  }\n</style>\n","<script lang=\"ts\">\n  import { onDestroy } from 'svelte';\n  import { T } from '../contexts/translation';\n  import { Button, IconCloseButton, Image, Title } from '../atoms';\n  import { configuration } from '../contexts/configuration';\n  import { Elements } from '../contexts/configuration/types';\n  import ErrorText from '../atoms/ErrorText/ErrorText.svelte';\n  import {\n    ActionNames,\n    sendButtonClickEvent,\n    sendFlowCompleteEvent,\n    VerificationStatuses,\n  } from '../utils/event-service';\n  import { flowDeclined } from '../services/analytics';\n  import { appState, currentParams } from '../contexts/app-state';\n  import { DecisionStatus } from '../contexts/app-state/types';\n  import { getLayoutStyles, getStepConfiguration, uiPack } from '../ui-packs';\n  import { getFlowConfig } from '../contexts/flows/hooks';\n\n  export let stepId;\n\n  const step = getStepConfiguration($configuration, $uiPack, stepId);\n  const flow = getFlowConfig($configuration);\n  const style = getLayoutStyles($configuration, $uiPack, step);\n\n  const stepNamespace = step.namespace!;\n\n  const handleClose = () => {\n    sendFlowCompleteEvent({\n      status: VerificationStatuses.COMPLETED,\n      idvResult: DecisionStatus.DECLINED,\n    });\n  };\n\n  onDestroy(() => {\n    $currentParams = null;\n  });\n\n  flowDeclined();\n</script>\n\n<div class=\"container\" {style}>\n  {#each step.elements as element}\n    {#if element.type === Elements.IconCloseButton && flow.showCloseButton}\n      <IconCloseButton\n        configuration={element.props}\n        on:click={() => {\n          sendButtonClickEvent(\n            ActionNames.CLOSE,\n            { status: VerificationStatuses.DATA_COLLECTION },\n            $appState,\n            true,\n          );\n        }}\n      />\n    {/if}\n    {#if element.type === Elements.Image}\n      <Image configuration={element.props} />\n    {/if}\n    {#if element.type === Elements.Title}\n      <Title configuration={element.props}>\n        <T key=\"title\" namespace={stepNamespace} />\n      </Title>\n    {/if}\n    {#if element.type === Elements.ErrorText}\n      <ErrorText configuration={element.props}>\n        <T key=\"description\" namespace={stepNamespace} />\n      </ErrorText>\n    {/if}\n    {#if element.type === Elements.Button}\n      <Button configuration={element.props} on:click={handleClose}>\n        <T key=\"button\" namespace={stepNamespace} />\n      </Button>\n    {/if}\n  {/each}\n</div>\n\n<style>\n  .container {\n    padding: var(--padding);\n    position: relative;\n    background: var(--background);\n    text-align: center;\n    height: 100%;\n    display: flex;\n    flex-direction: column;\n  }\n</style>\n","<script lang=\"ts\">\n  import { T } from '../contexts/translation';\n  import { onDestroy } from 'svelte';\n  import { Button, IconCloseButton, Image, Title } from '../atoms';\n  import { configuration } from '../contexts/configuration';\n  import { appState, currentParams } from '../contexts/app-state';\n  import { Elements } from '../contexts/configuration/types';\n  import ErrorText from '../atoms/ErrorText/ErrorText.svelte';\n  import {\n    ActionNames,\n    sendButtonClickEvent,\n    sendFlowCompleteEvent,\n    VerificationStatuses,\n  } from '../utils/event-service';\n  import { flowError } from '../services/analytics';\n  import { DecisionStatus } from '../contexts/app-state/types';\n  import { getLayoutStyles, getStepConfiguration } from '../ui-packs';\n  import { getFlowConfig } from '../contexts/flows/hooks';\n\n  export let stepId;\n  const step = getStepConfiguration($configuration, stepId);\n  const flow = getFlowConfig($configuration);\n  const style = getLayoutStyles($configuration, step);\n  const stepNamespace = step.namespace!;\n  const message = $currentParams ? $currentParams.message : '';\n\n  const handleClose = () => {\n    sendFlowCompleteEvent({\n      status: VerificationStatuses.ERROR,\n      idvResult: DecisionStatus.DECLINED,\n    });\n  };\n\n  flowError();\n\n  onDestroy(() => {\n    $currentParams = null;\n  });\n</script>\n\n<div class=\"container\" {style}>\n  {#each step.elements as element}\n    {#if element.type === Elements.Image}\n      <Image configuration={element.props} />\n    {/if}\n    {#if element.type === Elements.IconCloseButton && flow.showCloseButton}\n      <IconCloseButton\n        configuration={element.props}\n        on:click={() => {\n          sendButtonClickEvent(\n            ActionNames.CLOSE,\n            { status: VerificationStatuses.DATA_COLLECTION },\n            $appState,\n            true,\n          );\n        }}\n      />\n    {/if}\n    {#if element.type === Elements.Title}\n      <Title configuration={element.props}>\n        <T key=\"title\" namespace={stepNamespace} />\n      </Title>\n    {/if}\n    {#if element.type === Elements.ErrorText}\n      <ErrorText configuration={element.props}>\n        {#if message}\n          {message}\n        {:else}\n          <T key=\"description\" namespace={stepNamespace} />\n        {/if}\n      </ErrorText>\n    {/if}\n    {#if element.type === Elements.Button}\n      <Button configuration={element.props} on:click={handleClose}>\n        <T key=\"button\" namespace={stepNamespace} />\n      </Button>\n    {/if}\n  {/each}\n</div>\n\n<style>\n  .container {\n    padding: var(--padding);\n    position: relative;\n    background: var(--background);\n    text-align: center;\n    height: 100%;\n    display: flex;\n    flex-direction: column;\n  }\n</style>\n","import { Steps } from '../configuration';\nimport {\n  Welcome,\n  DocumentSelection,\n  DocumentStart,\n  DocumentPhoto,\n  CheckDocument,\n  DocumentPhotoBack,\n  CheckDocumentPhotoBack,\n  SelfieStart,\n  Selfie,\n  CheckSelfie,\n  Final,\n  DocumentPhotoBackStart,\n  Loading,\n  Resubmission,\n  Decline,\n  ErrorPage,\n} from '../../pages';\n\nexport const steps = [\n  { name: Steps.Welcome, component: Welcome },\n  { name: Steps.DocumentSelection, component: DocumentSelection },\n  { name: Steps.DocumentStart, component: DocumentStart },\n  { name: Steps.DocumentPhoto, component: DocumentPhoto },\n  { name: Steps.CheckDocument, component: CheckDocument },\n  {\n    name: Steps.DocumentPhotoBackStart,\n    component: DocumentPhotoBackStart,\n    type: 'back-side',\n  },\n  {\n    name: Steps.DocumentPhotoBack,\n    component: DocumentPhotoBack,\n    type: 'back-side',\n  },\n  {\n    name: Steps.CheckDocumentPhotoBack,\n    component: CheckDocumentPhotoBack,\n    type: 'back-side',\n  },\n  { name: Steps.SelfieStart, component: SelfieStart },\n  { name: Steps.Selfie, component: Selfie },\n  { name: Steps.CheckSelfie, component: CheckSelfie },\n  { name: Steps.Loading, component: Loading },\n  {\n    name: Steps.Resubmission,\n    component: Resubmission,\n    type: 'no-flow-part',\n  },\n  { name: Steps.Decline, component: Decline, type: 'no-flow-part' },\n  { name: Steps.Error, component: ErrorPage, type: 'no-flow-part' },\n  { name: Steps.Final, component: Final, type: 'no-flow-part' },\n];\n","import { IAppConfiguration, IStepConfiguration } from '../configuration';\nimport { steps } from './constants';\nimport { getFlowName, getFlowOrders } from '../flows/hooks';\nimport { Writable } from '../../../../node_modules/svelte/types/runtime/store/index';\nimport { verifyDocumentsAndCloseFlow } from '../../utils/api-utils';\nimport { sendFlowCompleteEvent } from '../../utils/event-service';\nimport { sendFlowErrorEvent } from '../../utils/event-service/utils';\n\nconst filterOutByType = (flowIds: string[], configuration: IAppConfiguration, type?: string) => {\n  if (!type) return flowIds;\n\n  const flowName: string = getFlowName();\n  return flowIds.filter(id => {\n    const flowSteps = configuration.flows[flowName].steps as IStepConfiguration[];\n    const stepConfiguration = flowSteps.find(s => s.id === id) as IStepConfiguration;\n    const step = steps.find(s => s.name === stepConfiguration.name);\n    return step?.type !== type;\n  });\n};\n\nexport const getNextStepId = (\n  globalConfiguration: IAppConfiguration,\n  currentStepId: string,\n  skipType?: string,\n) => {\n  const stepsOrder = getFlowOrders(globalConfiguration) as string[];\n  const filteredFlows = filterOutByType(stepsOrder, globalConfiguration, skipType);\n  const currentFlowIndex = filteredFlows.findIndex(i => i === currentStepId);\n  if (currentFlowIndex === filteredFlows.length - 1) {\n    // end of the flow\n    void verifyDocumentsAndCloseFlow(globalConfiguration).catch((err: Error) =>\n      sendFlowErrorEvent(err),\n    );\n    sendFlowCompleteEvent();\n    return;\n  }\n  return filteredFlows[currentFlowIndex + 1];\n};\n\nexport const goToNextStep = (\n  currentStepIdStore: Writable<string>,\n  globalConfiguration: IAppConfiguration,\n  currentStepId: string,\n  skipType?: string,\n) => {\n  const nextStepId = getNextStepId(globalConfiguration, currentStepId, skipType);\n  if (nextStepId) currentStepIdStore.set(nextStepId);\n};\n\nexport const goToPrevStep = (\n  currentStepIdStore: Writable<string>,\n  globalConfiguration: IAppConfiguration,\n  currentStepId: string,\n  skipType?: string,\n) => {\n  const flows = getFlowOrders(globalConfiguration) as string[];\n  const filteredFlows = filterOutByType(flows, globalConfiguration, skipType);\n  const currentFlowIndex = filteredFlows.findIndex(i => i === currentStepId);\n  if (currentFlowIndex === 0) {\n    throw Error('Error moving step back, this is the first step');\n  }\n  currentStepIdStore.set(filteredFlows[currentFlowIndex - 1]);\n};\n","import { derived, writable } from 'svelte/store';\nimport { steps } from '../navigation';\nimport { IAppState, IDocument, IDocumentInfo, ISelectedParams } from './types';\n\n// const STORAGE_SELFIE_KEY = \"selfie\";\n// const STORAGE_DOCUMENTS_KEY = \"documents\";\n// const STORAGE_DOCUMENT_INFO_KEY = \"document-info\";\n\n//selfie uir\n// export const selfieUri = writable<string>(sessionStorage.getItem(STORAGE_SELFIE_KEY) || \"\");\n// selfieUri.subscribe(selfie => {\n//   sessionStorage.setItem(STORAGE_SELFIE_KEY, selfie);\n// });\nexport const selfieUri = writable<string>('');\n\n//docs\nexport const documents = writable<IDocument[]>([]);\n// let savedDocs = sessionStorage.getItem(STORAGE_DOCUMENTS_KEY);\n// export const documents = writable<IDocument[]>(savedDocs ? JSON.parse(savedDocs) : []);\n// documents.subscribe(docs => {\n//   sessionStorage.setItem(STORAGE_DOCUMENTS_KEY, JSON.stringify(docs));\n// });\n\n//selected docs\nexport const selectedDocumentInfo = writable<IDocumentInfo | undefined>();\n// let savedSelectedDocs = sessionStorage.getItem(STORAGE_DOCUMENT_INFO_KEY);\n// export const selectedDocumentInfo = writable<IDocumentInfo>(savedSelectedDocs ? JSON.parse(savedSelectedDocs) : \"\");\n// selectedDocumentInfo.subscribe(docInfo => {\n//   sessionStorage.setItem(STORAGE_DOCUMENT_INFO_KEY, JSON.stringify(docInfo));\n// });\n\n// const APP_STATE_KEY = \"appState\";\n\n//reload state from session storage if it exists\n// let savedState = sessionStorage.getItem(APP_STATE_KEY);\n// let savedStateObj;\n// if (savedState) savedStateObj = JSON.parse(savedState);\n\nexport const currentStepIdx = writable<number>(0);\nexport const currentParams = writable<ISelectedParams | null>(null);\nexport const currentRoute = writable<string>();\n\nlet previousPage = 'none';\n\nexport const appState = derived(currentRoute, $currentRoute => {\n  const index = steps.findIndex(s => s.name === $currentRoute);\n\n  const appState: IAppState = {\n    currentStepIdx: index,\n    currentPage: $currentRoute,\n    previousPage,\n  };\n\n  previousPage = $currentRoute;\n\n  return appState;\n});\n\nexport const currentStepId = writable<string>('welcome');\n","import { IDocument, IPageSide, TDocumentType } from './types';\nimport {\n  currentParams,\n  currentRoute,\n  currentStepId,\n  currentStepIdx,\n  documents,\n  selectedDocumentInfo,\n  selfieUri,\n} from './stores';\nimport { Steps } from '../configuration';\n\nexport const getDocImage = (\n  type: TDocumentType,\n  docs: IDocument[],\n  pageSide?: IPageSide,\n): string => {\n  const doc = docs.find(d => d.type === type);\n  if (!doc) return '';\n  const page = doc.pages.find(p => p.side === pageSide) || doc.pages[0];\n  if (!page) return '';\n  return page.base64 as string;\n};\n\nexport const resetAppState = () => {\n  selfieUri.set('');\n  documents.set([]);\n  selectedDocumentInfo.set(undefined);\n  currentStepIdx.set(0);\n  currentParams.set(null);\n  currentRoute.set(Steps.Welcome);\n  currentStepId.set(Steps.Welcome);\n};\n","import { IMAGE_TYPES } from 'jslib-html5-camera-photo';\nimport { DocumentType } from '../../contexts/app-state';\nimport { DocumentKind, DocumentVariant } from '../../contexts/app-state/types';\nimport {\n  Elements,\n  IAppConfigurationUI,\n  IElement,\n  Steps,\n  TStepsConfigurations,\n} from '../../contexts/configuration';\nimport { IUIPackTheme } from '../types';\n\nconst backIconButton: IElement = {\n  id: 'back-icon-button',\n  orderIndex: 10,\n  type: Elements.IconButton,\n  props: {\n    attributes: {\n      src: 'https://cdn.ballerine.io/ui-packs/default/images/back.svg',\n      alt: 'back',\n      width: '28px',\n      height: '28px',\n    },\n    style: {\n      left: '26px',\n      background: 'transparent',\n    },\n  },\n};\n\nconst closeIconButton: IElement = {\n  id: 'close-icon-button',\n  orderIndex: 20,\n  type: Elements.IconCloseButton,\n  props: {\n    attributes: {\n      src: 'https://cdn.ballerine.io/ui-packs/default/images/close.svg',\n      alt: 'back',\n      width: '18px',\n      height: '18px',\n    },\n    style: {\n      right: '26px',\n      background: 'transparent',\n    },\n  },\n};\n\nconst backWhiteIconButton: IElement = {\n  id: 'back-white-icon-button',\n  orderIndex: 10,\n  type: Elements.IconButton,\n  props: {\n    attributes: {\n      ...backIconButton.props.attributes,\n      src: 'https://cdn.ballerine.io/ui-packs/default/images/back-white.svg',\n    },\n    style: backIconButton.props.style,\n  },\n};\n\nconst stepsTheme: TStepsConfigurations = [\n  {\n    name: Steps.Welcome,\n    id: Steps.Welcome,\n    style: {},\n    elements: [\n      backIconButton,\n      closeIconButton,\n      {\n        type: Elements.Title,\n        orderIndex: 30,\n        id: 'title',\n        props: {},\n      },\n      {\n        type: Elements.Paragraph,\n        orderIndex: 40,\n        id: 'description',\n        props: {},\n      },\n      {\n        type: Elements.Image,\n        orderIndex: 50,\n        id: 'image',\n        props: {\n          attributes: {\n            src: 'https://cdn.ballerine.io/ui-packs/default/images/welcome.svg',\n            alt: 'welcome',\n            width: '248px',\n            height: '212px',\n          },\n        },\n      },\n      {\n        type: Elements.Button,\n        orderIndex: 60,\n        id: 'button',\n        props: {},\n      },\n      {\n        type: Elements.Paragraph,\n        orderIndex: 70,\n        id: 'tip',\n        props: {\n          style: {\n            margin: '32px 0px 0px',\n            'font-size': '16px',\n          },\n          context: 'tip',\n        },\n      },\n    ],\n  },\n  {\n    name: Steps.DocumentStart,\n    id: Steps.DocumentStart,\n    elements: [\n      backIconButton,\n      closeIconButton,\n      {\n        id: 'title',\n        orderIndex: 40,\n        type: Elements.Title,\n        props: {},\n      },\n      {\n        id: 'description',\n        orderIndex: 50,\n        type: Elements.Paragraph,\n        props: {},\n      },\n      {\n        id: 'image',\n        orderIndex: 60,\n        type: Elements.Image,\n        props: {\n          attributes: {\n            src: 'https://cdn.ballerine.io/ui-packs/default/images/welcome.svg',\n            alt: 'welcome',\n            width: '248px',\n            height: '212px',\n          },\n        },\n      },\n      {\n        id: 'button',\n        orderIndex: 80,\n        type: Elements.Button,\n        props: {},\n      },\n    ],\n  },\n  {\n    name: Steps.DocumentSelection,\n    id: Steps.DocumentSelection,\n    elements: [\n      backIconButton,\n      closeIconButton,\n      {\n        id: 'title',\n        orderIndex: 30,\n        type: Elements.Title,\n        props: {},\n      },\n      {\n        id: 'description',\n        orderIndex: 40,\n        type: Elements.Paragraph,\n        props: {},\n      },\n    ],\n  },\n  {\n    name: Steps.DocumentPhoto,\n    id: Steps.DocumentPhoto,\n    elements: [\n      backWhiteIconButton,\n      {\n        id: 'title',\n        orderIndex: 20,\n        type: Elements.Title,\n        props: {\n          style: {\n            color: '#fff',\n          },\n        },\n      },\n      {\n        id: 'description',\n        orderIndex: 30,\n        type: Elements.Paragraph,\n        props: {\n          style: {\n            color: '#fff',\n          },\n        },\n      },\n      {\n        id: 'video',\n        orderIndex: 40,\n        type: Elements.VideoContainer,\n        props: {},\n      },\n      {\n        id: 'loader',\n        orderIndex: 50,\n        type: Elements.Loader,\n        props: {},\n      },\n      {\n        id: 'button',\n        orderIndex: 60,\n        type: Elements.CameraButton,\n        props: {},\n      },\n    ],\n  },\n  {\n    name: Steps.DocumentPhoto,\n    id: Steps.DocumentPhoto,\n    elements: [\n      backWhiteIconButton,\n      {\n        id: 'title',\n        orderIndex: 20,\n        type: Elements.Title,\n        props: {\n          style: {\n            color: '#fff',\n          },\n        },\n      },\n      {\n        id: 'description',\n        orderIndex: 30,\n        type: Elements.Paragraph,\n        props: {\n          style: {\n            color: '#fff',\n          },\n        },\n      },\n      {\n        id: 'video',\n        orderIndex: 40,\n        type: Elements.VideoContainer,\n        props: {},\n      },\n      {\n        id: 'loader',\n        orderIndex: 50,\n        type: Elements.Loader,\n        props: {},\n      },\n      {\n        id: 'button',\n        orderIndex: 60,\n        type: Elements.CameraButton,\n        props: {},\n      },\n    ],\n  },\n  {\n    name: Steps.CheckDocument,\n    id: Steps.CheckDocument,\n    elements: [\n      backIconButton,\n      closeIconButton,\n      {\n        id: 'title',\n        orderIndex: 30,\n        type: Elements.Title,\n        props: {},\n      },\n      {\n        id: 'description',\n        orderIndex: 40,\n        type: Elements.Paragraph,\n        props: {},\n      },\n      {\n        id: 'photo',\n        orderIndex: 50,\n        type: Elements.Photo,\n        props: {},\n      },\n    ],\n  },\n  {\n    name: Steps.DocumentPhotoBackStart,\n    id: Steps.DocumentPhotoBackStart,\n    style: {},\n    elements: [\n      backIconButton,\n      closeIconButton,\n      {\n        type: Elements.Title,\n        orderIndex: 30,\n        id: 'title',\n        props: {},\n      },\n      {\n        id: 'description',\n        orderIndex: 40,\n        type: Elements.Paragraph,\n        props: {},\n      },\n      {\n        id: 'image',\n        orderIndex: 50,\n        type: Elements.Image,\n        props: {\n          attributes: {\n            src: 'https://cdn.ballerine.io/ui-packs/default/images/document-photo-back-start.svg',\n            alt: 'document-photo-back-start',\n            width: '260px',\n            height: '212px',\n          },\n        },\n      },\n      {\n        id: 'button',\n        orderIndex: 60,\n        type: Elements.Button,\n        props: {},\n      },\n    ],\n  },\n  {\n    name: Steps.DocumentPhotoBack,\n    id: Steps.DocumentPhotoBack,\n    elements: [\n      backWhiteIconButton,\n      {\n        id: 'title',\n        orderIndex: 20,\n        type: Elements.Title,\n        props: {\n          style: {\n            color: '#fff',\n          },\n        },\n      },\n      {\n        id: 'description',\n        orderIndex: 30,\n        type: Elements.Paragraph,\n        props: {\n          style: {\n            color: '#fff',\n          },\n        },\n      },\n      {\n        id: 'loader',\n        orderIndex: 40,\n        type: Elements.Loader,\n        props: {},\n      },\n      {\n        id: 'video',\n        orderIndex: 50,\n        type: Elements.VideoContainer,\n        props: {},\n      },\n      {\n        id: 'button',\n        orderIndex: 60,\n        type: Elements.CameraButton,\n        props: {},\n      },\n    ],\n  },\n  {\n    name: Steps.CheckDocumentPhotoBack,\n    id: Steps.CheckDocumentPhotoBack,\n    elements: [\n      backIconButton,\n      closeIconButton,\n      {\n        id: 'title',\n        orderIndex: 30,\n        type: Elements.Title,\n        props: {},\n      },\n      {\n        id: 'description',\n        orderIndex: 40,\n        type: Elements.Paragraph,\n        props: {},\n      },\n      {\n        id: 'photo',\n        orderIndex: 50,\n        type: Elements.Photo,\n        props: {},\n      },\n    ],\n  },\n  {\n    name: Steps.SelfieStart,\n    id: Steps.SelfieStart,\n    style: {},\n    elements: [\n      backIconButton,\n      closeIconButton,\n      {\n        id: 'title',\n        orderIndex: 30,\n        type: Elements.Title,\n        props: {},\n      },\n      {\n        id: 'description',\n        orderIndex: 40,\n        type: Elements.Paragraph,\n        props: {},\n      },\n      {\n        id: 'image',\n        orderIndex: 50,\n        type: Elements.Image,\n        props: {\n          attributes: {\n            src: 'https://cdn.ballerine.io/ui-packs/default/images/selfie-start.svg',\n            alt: 'selfie-start',\n            width: '300x',\n            height: '300px',\n          },\n        },\n      },\n      {\n        id: 'button',\n        orderIndex: 60,\n        type: Elements.Button,\n        props: {},\n      },\n    ],\n  },\n  {\n    name: Steps.Selfie,\n    id: Steps.Selfie,\n    elements: [\n      backWhiteIconButton,\n      {\n        id: 'title',\n        orderIndex: 20,\n        type: Elements.Title,\n        props: {\n          style: {\n            color: '#fff',\n          },\n        },\n      },\n      {\n        id: 'description',\n        orderIndex: 30,\n        type: Elements.Paragraph,\n        props: {\n          style: {\n            color: '#fff',\n          },\n        },\n      },\n      {\n        id: 'loader',\n        orderIndex: 40,\n        type: Elements.Loader,\n        props: {},\n      },\n      {\n        id: 'video',\n        orderIndex: 50,\n        type: Elements.VideoContainer,\n        props: {},\n      },\n      {\n        id: 'button',\n        orderIndex: 60,\n        type: Elements.CameraButton,\n        props: {},\n      },\n    ],\n  },\n  {\n    name: Steps.CheckSelfie,\n    id: Steps.CheckSelfie,\n    elements: [\n      backIconButton,\n      closeIconButton,\n      {\n        id: 'title',\n        orderIndex: 30,\n        type: Elements.Title,\n        props: {},\n      },\n      {\n        id: 'description',\n        orderIndex: 40,\n        type: Elements.Paragraph,\n        props: {},\n      },\n      {\n        id: 'photo',\n        orderIndex: 50,\n        type: Elements.Photo,\n        props: {},\n      },\n    ],\n  },\n  {\n    name: Steps.Loading,\n    id: Steps.Loading,\n    elements: [],\n  },\n  {\n    name: Steps.Resubmission,\n    id: Steps.Resubmission,\n    elements: [\n      closeIconButton,\n      {\n        id: 'image',\n        orderIndex: 20,\n        type: Elements.Image,\n        props: {\n          style: {\n            'flex-grow': '0',\n            margin: '40% 0 0 0',\n          },\n          attributes: {\n            src: 'https://cdn.ballerine.io/ui-packs/default/images/resubmit.svg',\n            alt: 'decline',\n            width: '80px',\n            height: '80px',\n          },\n        },\n      },\n      {\n        id: 'title',\n        orderIndex: 30,\n        type: Elements.Title,\n        props: {},\n      },\n      {\n        id: 'description',\n        orderIndex: 40,\n        type: Elements.Paragraph,\n        props: {},\n      },\n      {\n        id: 'error-text',\n        orderIndex: 50,\n        type: Elements.ErrorText,\n        props: {},\n      },\n      {\n        id: 'button',\n        orderIndex: 60,\n        type: Elements.Button,\n        props: {\n          style: {\n            margin: 'auto 0 0 0',\n          },\n        },\n      },\n    ],\n  },\n  {\n    name: Steps.Decline,\n    id: Steps.Decline,\n    elements: [\n      closeIconButton,\n      {\n        id: 'image',\n        orderIndex: 20,\n        type: Elements.Image,\n        props: {\n          style: {\n            'flex-grow': '0',\n            margin: '40% 0 0 0',\n          },\n          attributes: {\n            src: 'https://cdn.ballerine.io/ui-packs/default/images/decline.svg',\n            alt: 'decline',\n            width: '80px',\n            height: '80px',\n          },\n        },\n      },\n      {\n        id: 'title',\n        orderIndex: 30,\n        type: Elements.Title,\n        props: {},\n      },\n      {\n        id: 'description',\n        orderIndex: 40,\n        type: Elements.Paragraph,\n        props: {},\n      },\n      {\n        id: 'error-text',\n        orderIndex: 50,\n        type: Elements.ErrorText,\n        props: {},\n      },\n      {\n        id: 'button',\n        orderIndex: 60,\n        type: Elements.Button,\n        props: {\n          style: {\n            margin: 'auto 0 0 0',\n          },\n        },\n      },\n    ],\n  },\n  {\n    name: Steps.Error,\n    id: Steps.Error,\n    elements: [\n      closeIconButton,\n      {\n        id: 'image',\n        orderIndex: 20,\n        type: Elements.Image,\n        props: {\n          style: {\n            'flex-grow': '0',\n            margin: '40% 0 0 0',\n          },\n          attributes: {\n            src: 'https://cdn.ballerine.io/ui-packs/default/images/decline.svg',\n            alt: 'decline',\n            width: '80px',\n            height: '80px',\n          },\n        },\n      },\n      {\n        id: 'title',\n        orderIndex: 30,\n        type: Elements.Title,\n        props: {},\n      },\n      {\n        id: 'description',\n        orderIndex: 40,\n        type: Elements.Paragraph,\n        props: {},\n      },\n      {\n        id: 'error-text',\n        orderIndex: 50,\n        type: Elements.ErrorText,\n        props: {},\n      },\n      {\n        id: 'button',\n        orderIndex: 60,\n        type: Elements.Button,\n        props: {\n          style: {\n            margin: 'auto 0 0 0',\n          },\n        },\n      },\n    ],\n  },\n  {\n    name: Steps.Final,\n    id: Steps.Final,\n    style: {},\n    elements: [\n      closeIconButton,\n      {\n        id: 'image',\n        orderIndex: 20,\n        type: Elements.Image,\n        props: {\n          style: {\n            'flex-grow': '0',\n            margin: '40% 0 0 0',\n          },\n          attributes: {\n            src: 'https://cdn.ballerine.io/ui-packs/default/images/final.svg',\n            alt: 'final',\n            width: '80px',\n            height: '80px',\n          },\n        },\n      },\n      {\n        id: 'title',\n        orderIndex: 30,\n        type: Elements.Title,\n        props: {},\n      },\n      {\n        id: 'description',\n        orderIndex: 40,\n        type: Elements.Paragraph,\n        props: {},\n      },\n      {\n        id: 'button',\n        orderIndex: 50,\n        type: Elements.Button,\n        props: {\n          style: {\n            margin: 'auto 0 0 0',\n          },\n        },\n      },\n    ],\n  },\n];\n\nexport const uiTheme: IUIPackTheme & Pick<IAppConfigurationUI, 'settings'> = {\n  general: {\n    progress: false,\n    borderRadius: '16px',\n    padding: '24px',\n    colors: {\n      primary: '#007AFF',\n      secondary: '#080444',\n      text: '#788597',\n      danger: 'rgba(173, 0, 0, 0.8);',\n    },\n    fonts: {\n      name: 'Inter',\n      weight: [400, 500, 600, 700],\n      link: 'https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700',\n    },\n  },\n  components: {\n    photo: {},\n    paragraph: {\n      'font-size': '14px',\n      'text-align': 'center',\n      color: '#788597',\n    },\n    cameraButton: {\n      margin: '24px 0px 30px',\n    },\n    videoContainer: {},\n    input: {},\n    loader: {},\n    button: {\n      'font-size': '16px',\n      padding: '20px 20px',\n      width: '100%',\n      color: '#fff',\n      'font-weight': 700,\n      'border-radius': '12px',\n      'box-shadow': '0px 6px 9px 5px #007AFF1a;-webkit-box-shadow: 0px 6px 9px 5px #007AFF1a;',\n    },\n    buttonWithIcon: {\n      'font-size': '16px',\n      padding: '20px 20px',\n      width: '100%',\n      color: '#fff',\n      'font-weight': 700,\n      'border-radius': '12px',\n      'box-shadow': '0px 6px 9px 5px #007AFF1a;-webkit-box-shadow: 0px 6px 9px 5px #007AFF1a;',\n    },\n    iconButton: {\n      background: '#F2F3F4',\n      width: '40px',\n      height: '40px',\n      position: 'absolute',\n      top: '45px',\n      right: '32px',\n    },\n    iconCloseButton: {\n      background: '#F2F3F4',\n      width: '40px',\n      height: '40px',\n      position: 'absolute',\n      top: '45px',\n      right: '32px',\n    },\n    navigationButtons: {\n      props: {\n        style: {\n          display: 'flex',\n          'flex-direction': 'row',\n          margin: '70px 0px 0px',\n          padding: '0px',\n        },\n      },\n      backButton: {\n        type: 'button',\n        props: {\n          style: {\n            width: '100%',\n            margin: '67px 20px 0px 0px',\n            padding: '0px',\n            'font-weight': 400,\n            background: '#fff',\n            color: '#6A6A6A',\n            border: '1px solid #BFBFBF',\n            'border-radius': '12px',\n            'box-shadow':\n              '0px 6px 9px 5px rgba(0,122,255,0);-webkit-box-shadow: 0px 6px 9px 5px rgba(0,122,255,0);',\n          },\n        },\n      },\n      nextButton: {\n        type: 'button',\n        props: {\n          style: {\n            width: '100%',\n          },\n        },\n      },\n    },\n    errorText: {\n      background: 'transparent',\n      margin: '0px 0px 48px',\n      border: 'none',\n      color: '#788597',\n    },\n    layout: {\n      padding: '40px',\n      position: 'relative',\n      background: 'linear-gradient(180deg, #fff 0%, #fff 75%, #007AFF 250%)',\n    },\n    documentOptions: {\n      options: {\n        [DocumentType.ID_CARD]: {\n          document: {\n            type: DocumentType.ID_CARD,\n            kind: DocumentKind.ID_CARD,\n            backSide: true,\n            variant: DocumentVariant.REGULAR,\n            orderIndex: 10,\n          },\n          attributes: {\n            icon: 'Card',\n            width: 40,\n            height: 40,\n          },\n        },\n        [DocumentType.DRIVERS_LICENSE]: {\n          document: {\n            type: DocumentType.DRIVERS_LICENSE,\n            kind: DocumentKind.DRIVERS_LICENSE,\n            backSide: true,\n            variant: DocumentVariant.REGULAR,\n            orderIndex: 20,\n          },\n          attributes: {\n            icon: 'License',\n            width: 40,\n            height: 40,\n          },\n        },\n        [DocumentType.PASSPORT]: {\n          document: {\n            type: DocumentType.PASSPORT,\n            kind: DocumentKind.PASSPORT,\n            backSide: false,\n            variant: DocumentVariant.REGULAR,\n            orderIndex: 30,\n          },\n          attributes: {\n            icon: 'PassportTwo',\n            width: 40,\n            height: 40,\n          },\n        },\n        [DocumentType.VOTER_ID]: {\n          document: {\n            type: DocumentType.VOTER_ID,\n            kind: DocumentKind.VOTER_ID,\n            backSide: true,\n            variant: DocumentVariant.REGULAR,\n            orderIndex: 40,\n          },\n          attributes: {\n            icon: 'Voter',\n            width: 40,\n            height: 40,\n          },\n        },\n      },\n      props: {},\n      descriptionProps: {\n        style: {\n          'font-size': '12px',\n          color: '#788597',\n          margin: '3px 0px 0px 0px',\n          hover: {\n            color: '#788597',\n          },\n          active: {\n            color: '#788597',\n          },\n        },\n      },\n      optionProps: {\n        style: {\n          background: '#fff',\n          margin: '20px 0 0',\n          border: '1px solid #ffffff',\n          'border-radius': '13px',\n          width: '100%',\n          padding: '20px 18px',\n          'box-shadow':\n            '0px 6px 30px 0px #007AFF1a , 0px 3px 10px 0px #0000000a ;-webkit-box-shadow: 0px 6px 30px 0px #007AFF1a , 0px 3px 10px 0px #0000000a ;',\n          display: 'flex',\n          'text-align': 'left',\n          hover: {\n            border: '1px solid #BADBFF',\n            background: '#fff',\n          },\n          active: {\n            border: '1px solid #BADBFF',\n            background: '#F1F1F1',\n          },\n        },\n      },\n      iconContainerProps: {\n        style: {\n          width: '45px',\n          height: '45px',\n          margin: '0px 15px 0px 0px',\n          padding: '0px',\n          background: 'transparent',\n          active: {\n            background: '#fff',\n          },\n        },\n      },\n      iconProps: {\n        style: {\n          fill: '#000',\n          active: {\n            fill: '#0079FA',\n          },\n        },\n      },\n      titleProps: {\n        style: {\n          color: '#434345',\n          'text-align': 'left',\n          margin: '4px 0px 0px',\n          active: {\n            color: '#434345',\n          },\n        },\n      },\n    },\n    container: {\n      width: '100%',\n      display: 'flex',\n      'justify-content': 'center',\n      'align-items': 'center',\n    },\n    image: {\n      margin: '0px',\n      'flex-grow': 1,\n      display: 'flex',\n      'align-items': 'center',\n      'justify-content': 'center',\n    },\n    title: {\n      'font-weight': 700,\n      'font-size': '18px',\n      'text-align': 'center',\n      padding: '10px 0px 24px',\n      color: '#001B39',\n    },\n  },\n  settings: {\n    cameraSettings: {\n      sizeFactor: 1,\n      imageType: IMAGE_TYPES.JPG,\n      imageCompression: 0,\n      isImageMirror: false,\n    },\n    selfieCameraSettings: {\n      sizeFactor: 1,\n      imageType: IMAGE_TYPES.JPG,\n      imageCompression: 0,\n      isImageMirror: true,\n    },\n  },\n  steps: stepsTheme,\n};\n","import { writable } from 'svelte/store';\nimport { uiTheme } from './default/theme';\nimport { IUIPackTheme } from './types';\n\nexport const uiPack = writable<IUIPackTheme>(uiTheme);\n","import { FlowsGeneralTheme } from '../../types/BallerineSDK';\nimport { IConfigurationComponents, TStepsConfigurations } from '../contexts/configuration';\nimport { ObjectValues } from '../contexts/app-state/types';\n\nexport interface IUIPackTheme {\n  general: FlowsGeneralTheme;\n  components: IConfigurationComponents;\n  steps: TStepsConfigurations;\n}\n\nexport const UIPackType = {\n  default: 'default',\n  future: 'future',\n} as const;\n\nexport const UIPackTypes = [UIPackType.default, UIPackType.future];\n\nexport type TUIPackType = ObjectValues<typeof UIPackType>;\n\nexport type TUIPacks = Record<TUIPackType, IUIPackTheme>;\n","import { ICSSProperties } from '../css-manager';\n\nexport const injectPrimaryIntoLayoutGradient = (\n  layoutStyles: ICSSProperties,\n  primaryColor: string,\n): ICSSProperties => {\n  if (typeof layoutStyles.background === 'string' && layoutStyles.background.includes('gradient')) {\n    return {\n      ...layoutStyles,\n      background: `linear-gradient(180deg, #fff 0%, #fff 75%, ${primaryColor} 250%)`,\n    };\n  }\n  return layoutStyles;\n};\n","import { IAppConfiguration, IStepConfiguration } from '../contexts/configuration';\nimport { injectPrimaryIntoLayoutGradient } from '../services/theme-manager';\nimport { makeStylesFromConfiguration, ICSSProperties } from '../services/css-manager';\nimport { getFlowName } from '../contexts/flows';\n\nexport const getStepConfiguration = (configuration: IAppConfiguration, stepId: string) => {\n  const flowName: string = getFlowName();\n  const steps = configuration.flows[flowName].steps as IStepConfiguration[];\n  return steps.find(step => step.id === stepId) as IStepConfiguration;\n};\n\nexport const getLayoutStyles = (configuration: IAppConfiguration, step: IStepConfiguration) => {\n  return makeStylesFromConfiguration(\n    injectPrimaryIntoLayoutGradient(\n      configuration.components?.layout || {},\n      configuration.general?.colors?.primary as string,\n    ),\n    step.style,\n  );\n};\n\nexport const getComponentStyles = (configurationStyles: ICSSProperties, style: ICSSProperties) => {\n  return makeStylesFromConfiguration(configurationStyles || {}, style);\n};\n","import { IMAGE_TYPES } from 'jslib-html5-camera-photo';\nimport { DocumentType } from '../../contexts/app-state';\nimport { DocumentKind, DocumentVariant } from '../../contexts/app-state/types';\nimport {\n  Elements,\n  IAppConfigurationUI,\n  IElement,\n  Steps,\n  TStepsConfigurations,\n} from '../../contexts/configuration';\n\nconst backIconButton: IElement = {\n  id: 'back-icon-button',\n  orderIndex: 10,\n  type: Elements.IconButton,\n  props: {\n    attributes: {\n      src: 'https://cdn.ballerine.io/ui-packs/default/images/back.svg',\n      alt: 'back',\n      width: '28px',\n      height: '28px',\n    },\n    style: {\n      left: '26px',\n      background: 'transparent',\n    },\n  },\n};\n\nconst closeIconButton: IElement = {\n  orderIndex: 20,\n  id: 'close-icon-button',\n  type: Elements.IconCloseButton,\n  props: {\n    attributes: {\n      src: 'https://cdn.ballerine.io/ui-packs/default/images/close.svg',\n      alt: 'back',\n      width: '18px',\n      height: '18px',\n    },\n    style: {\n      right: '26px',\n      background: 'transparent',\n    },\n  },\n};\n\nconst imageTopStyles = {\n  position: 'absolute',\n  top: '0px',\n  right: '0px',\n};\n\nconst imageBottomStyle = {\n  position: 'absolute',\n  bottom: '-5px',\n  left: '0px',\n};\n\nconst ellipseRedTop: IElement = {\n  id: 'ellipse-red-top',\n  orderIndex: 50,\n  type: Elements.Image,\n  props: {\n    style: imageTopStyles,\n    attributes: {\n      src: 'https://cdn.ballerine.io/ui-packs/future/ellipse-red-top.svg',\n      alt: 'ellipse-red',\n    },\n  },\n};\n\nconst ellipseRedBottom: IElement = {\n  id: 'ellipse-red-bottom',\n  orderIndex: 50,\n  type: Elements.Image,\n  props: {\n    style: imageBottomStyle,\n    attributes: {\n      src: 'https://cdn.ballerine.io/ui-packs/future/ellipse-red-bottom.svg',\n      alt: 'ellipse-red',\n    },\n  },\n};\n\nconst ellipseBlueTop: IElement = {\n  id: 'ellipse-blue-top',\n  orderIndex: 60,\n  type: Elements.Image,\n  props: {\n    style: imageTopStyles,\n    attributes: {\n      src: 'https://cdn.ballerine.io/ui-packs/future/ellipse-blue-top.svg',\n      alt: 'ellipse-blue',\n    },\n  },\n};\n\nconst ellipseBlueBottom: IElement = {\n  id: 'ellipse-blue-bottom',\n  orderIndex: 60,\n  type: Elements.Image,\n  props: {\n    style: imageBottomStyle,\n    attributes: {\n      src: 'https://cdn.ballerine.io/ui-packs/future/ellipse-blue-bottom.svg',\n      alt: 'ellipse-blue',\n    },\n  },\n};\n\nconst backWhiteIconButton: IElement = {\n  id: 'back-white-icon-button',\n  orderIndex: 10,\n  type: Elements.IconButton,\n  props: {\n    attributes: {\n      ...backIconButton.props.attributes,\n      src: 'https://cdn.ballerine.io/ui-packs/default/images/back-white.svg',\n    },\n    style: backIconButton.props.style,\n  },\n};\n\nexport const stepsTheme: TStepsConfigurations = [\n  {\n    name: Steps.Welcome,\n    id: Steps.Welcome,\n    elements: [\n      backWhiteIconButton,\n      closeIconButton,\n      {\n        id: 'title',\n        orderIndex: 30,\n        type: Elements.Title,\n        props: {\n          style: {\n            padding: '28px 0px 70px',\n          },\n        },\n      },\n      {\n        id: 'image',\n        orderIndex: 40,\n        type: Elements.Image,\n        props: {\n          style: {\n            margin: '0px auto 25px',\n            'flex-grow': 1,\n          },\n          attributes: {\n            src: 'https://cdn.ballerine.io/ui-packs/future/welcome.svg',\n            alt: 'welcome',\n            width: '218px',\n            height: '218px',\n          },\n        },\n      },\n      ellipseRedTop,\n      ellipseBlueBottom,\n      {\n        id: 'description',\n        orderIndex: 70,\n        type: Elements.Paragraph,\n        props: {\n          style: {\n            'text-align': 'center',\n            margin: '0px 0px 50px',\n            'font-size': '16px',\n          },\n        },\n      },\n      {\n        id: 'button',\n        orderIndex: 80,\n        type: Elements.Button,\n        props: {\n          style: {},\n        },\n      },\n    ],\n  },\n  {\n    name: Steps.DocumentStart,\n    id: Steps.DocumentStart,\n    elements: [\n      backWhiteIconButton,\n      closeIconButton,\n      {\n        id: 'title',\n        orderIndex: 30,\n        type: Elements.Title,\n        props: {\n          style: {\n            padding: '28px 0px 70px',\n          },\n        },\n      },\n      {\n        id: 'image',\n        orderIndex: 40,\n        type: Elements.Image,\n        props: {\n          style: {\n            margin: '0px auto 25px',\n            'flex-grow': 1,\n          },\n          attributes: {\n            src: 'https://cdn.ballerine.io/ui-packs/future/welcome.svg',\n            alt: 'welcome',\n            width: '218px',\n            height: '218px',\n          },\n        },\n      },\n      ellipseRedTop,\n      ellipseBlueBottom,\n      {\n        id: 'description',\n        orderIndex: 70,\n        type: Elements.Paragraph,\n        props: {\n          style: {\n            'text-align': 'center',\n            margin: '0px 0px 50px',\n            'font-size': '16px',\n          },\n        },\n      },\n      {\n        id: 'button',\n        orderIndex: 80,\n        type: Elements.Button,\n        props: {\n          style: {},\n        },\n      },\n    ],\n  },\n  {\n    name: Steps.DocumentSelection,\n    id: Steps.DocumentSelection,\n    elements: [\n      backWhiteIconButton,\n      closeIconButton,\n      {\n        id: 'title',\n        orderIndex: 30,\n        type: Elements.Title,\n        props: {\n          style: {\n            padding: '5px 24px 18px',\n          },\n        },\n      },\n      {\n        id: 'description',\n        orderIndex: 40,\n        type: Elements.Paragraph,\n        props: {\n          style: {\n            margin: '0 20px 30px 20px',\n          },\n          context: 'description',\n        },\n      },\n      ellipseRedBottom,\n      ellipseBlueTop,\n    ],\n  },\n  {\n    name: Steps.DocumentPhoto,\n    id: Steps.DocumentPhoto,\n    elements: [\n      backWhiteIconButton,\n      {\n        id: 'title',\n        orderIndex: 20,\n        type: Elements.Title,\n        props: {\n          style: {\n            color: '#fff',\n            'font-weight': 700,\n            'font-size': '18px',\n            'align-self': 'center',\n            padding: '5px 0px 18px 0px',\n          },\n        },\n      },\n      {\n        id: 'description',\n        orderIndex: 30,\n        type: Elements.Paragraph,\n        props: {\n          style: {\n            margin: '0px 20px 18px 40px',\n            color: '#DDDDDD',\n            'text-align': 'center',\n          },\n        },\n      },\n      {\n        id: 'title',\n        orderIndex: 40,\n        type: Elements.Loader,\n        props: {},\n      },\n      {\n        id: 'video',\n        orderIndex: 50,\n        type: Elements.VideoContainer,\n        props: {\n          style: {\n            margin: '0px',\n          },\n        },\n      },\n      {\n        id: 'button',\n        orderIndex: 60,\n        type: Elements.CameraButton,\n        props: {\n          style: {\n            margin: '24px 0px 30px',\n          },\n        },\n      },\n    ],\n  },\n  {\n    name: Steps.CheckDocument,\n    id: Steps.CheckDocument,\n    elements: [\n      backWhiteIconButton,\n      closeIconButton,\n      {\n        id: 'title',\n        orderIndex: 30,\n        type: Elements.Title,\n        props: {\n          style: {\n            padding: '8px 30px 18px',\n          },\n        },\n      },\n      {\n        id: 'description',\n        orderIndex: 40,\n        type: Elements.Paragraph,\n        props: {\n          style: {\n            margin: '0px 0px 48px',\n          },\n        },\n      },\n      {\n        id: 'photo',\n        orderIndex: 50,\n        type: Elements.Photo,\n        props: {\n          style: {\n            margin: '0px',\n          },\n        },\n      },\n      {\n        ...ellipseRedTop,\n        orderIndex: 60,\n      },\n      {\n        ...ellipseBlueBottom,\n        orderIndex: 70,\n      },\n    ],\n  },\n  {\n    name: Steps.DocumentPhotoBackStart,\n    id: Steps.DocumentPhotoBackStart,\n    style: {},\n    elements: [\n      backWhiteIconButton,\n      closeIconButton,\n      {\n        id: 'title',\n        orderIndex: 30,\n        type: Elements.Title,\n        props: {\n          style: {\n            padding: '5px 24px 18px',\n          },\n        },\n      },\n      {\n        id: 'description',\n        orderIndex: 40,\n        type: Elements.Paragraph,\n        props: {\n          style: {\n            margin: '0',\n          },\n        },\n      },\n      {\n        id: 'image',\n        orderIndex: 50,\n        type: Elements.Image,\n        props: {\n          style: {\n            margin: '8px auto',\n            'flex-grow': 1,\n          },\n          attributes: {\n            src: 'https://cdn.ballerine.io/ui-packs/future/document-photo-back-start.svg',\n            alt: 'document-photo-back-start',\n            width: '260px',\n            height: '212px',\n          },\n        },\n      },\n      {\n        ...ellipseRedTop,\n        orderIndex: 60,\n      },\n      {\n        ...ellipseBlueBottom,\n        orderIndex: 70,\n      },\n      {\n        id: 'button',\n        orderIndex: 80,\n        type: Elements.Button,\n        props: {\n          style: {\n            margin: '0px 0px 100px 0px',\n          },\n        },\n      },\n    ],\n  },\n  {\n    name: Steps.DocumentPhotoBack,\n    id: Steps.DocumentPhotoBack,\n    elements: [\n      backWhiteIconButton,\n      {\n        id: 'title',\n        orderIndex: 20,\n        type: Elements.Title,\n        props: {\n          style: {\n            color: '#fff',\n            'font-weight': 700,\n            'align-self': 'center',\n            'font-size': '18px',\n            padding: '8px 0px 18px 0px',\n          },\n        },\n      },\n      {\n        id: 'description',\n        orderIndex: 30,\n        type: Elements.Paragraph,\n        props: {\n          style: {\n            margin: '0px 20px 18px 40px',\n            color: '#DDDDDD',\n          },\n        },\n      },\n      {\n        id: 'video',\n        orderIndex: 40,\n        type: Elements.VideoContainer,\n        props: {\n          style: {\n            margin: '0px',\n          },\n        },\n      },\n      {\n        id: 'loader',\n        orderIndex: 50,\n        type: Elements.Loader,\n        props: {},\n      },\n      {\n        id: 'camera',\n        orderIndex: 60,\n        type: Elements.CameraButton,\n        props: {\n          style: {\n            margin: '24px 0px 30px',\n          },\n        },\n      },\n    ],\n  },\n  {\n    name: Steps.CheckDocumentPhotoBack,\n    id: Steps.CheckDocumentPhotoBack,\n    elements: [\n      backWhiteIconButton,\n      closeIconButton,\n      {\n        id: 'title',\n        orderIndex: 30,\n        type: Elements.Title,\n        props: {\n          style: {\n            padding: '5px 24px 18px',\n          },\n        },\n      },\n      {\n        id: 'description',\n        orderIndex: 40,\n        type: Elements.Paragraph,\n        props: {\n          style: {\n            margin: '0px 0px 48px',\n          },\n        },\n      },\n      {\n        id: 'photo',\n        orderIndex: 50,\n        type: Elements.Photo,\n        props: {\n          style: {\n            margin: '0px',\n          },\n        },\n      },\n      {\n        ...ellipseRedTop,\n        orderIndex: 60,\n      },\n      {\n        ...ellipseBlueBottom,\n        orderIndex: 70,\n      },\n    ],\n  },\n  {\n    name: Steps.SelfieStart,\n    id: Steps.SelfieStart,\n    style: {},\n    elements: [\n      backWhiteIconButton,\n      closeIconButton,\n      {\n        id: 'title',\n        orderIndex: 30,\n        type: Elements.Title,\n        props: {\n          style: {\n            padding: '5px 24px 18px',\n          },\n        },\n      },\n      {\n        id: 'description',\n        orderIndex: 40,\n        type: Elements.Paragraph,\n        props: {\n          style: {\n            margin: '0',\n          },\n        },\n      },\n      {\n        id: 'image',\n        orderIndex: 50,\n        type: Elements.Image,\n        props: {\n          style: {\n            margin: '8px auto',\n            'flex-grow': 1,\n          },\n          attributes: {\n            src: 'https://cdn.ballerine.io/ui-packs/future/selfie-start.svg',\n            alt: 'selfie-start',\n            width: '300x',\n            height: '300px',\n          },\n        },\n      },\n      {\n        ...ellipseRedTop,\n        orderIndex: 60,\n      },\n      {\n        ...ellipseBlueBottom,\n        orderIndex: 70,\n      },\n      {\n        id: 'button',\n        orderIndex: 80,\n        type: Elements.Button,\n        props: {},\n      },\n    ],\n  },\n  {\n    name: Steps.Selfie,\n    id: Steps.Selfie,\n    elements: [\n      backWhiteIconButton,\n      {\n        id: 'title',\n        orderIndex: 20,\n        type: Elements.Title,\n        props: {\n          style: {\n            color: '#fff',\n            'font-weight': 700,\n            'align-self': 'center',\n            'font-size': '18px',\n            padding: '48px 0px 18px 0px',\n          },\n        },\n      },\n      {\n        id: 'description',\n        orderIndex: 30,\n        type: Elements.Paragraph,\n        props: {\n          style: {\n            margin: '0px 20px 18px 40px',\n            color: '#DDDDDD',\n          },\n        },\n      },\n      {\n        id: 'video',\n        orderIndex: 40,\n        type: Elements.VideoContainer,\n        props: {\n          style: {\n            margin: '0px',\n          },\n        },\n      },\n      {\n        id: 'loader',\n        orderIndex: 50,\n        type: Elements.Loader,\n        props: {},\n      },\n      {\n        id: 'button',\n        orderIndex: 60,\n        type: Elements.CameraButton,\n        props: {\n          style: {\n            margin: '24px 0px 30px',\n          },\n        },\n      },\n    ],\n  },\n  {\n    name: Steps.CheckSelfie,\n    id: Steps.CheckSelfie,\n    elements: [\n      backWhiteIconButton,\n      closeIconButton,\n      {\n        id: 'title',\n        orderIndex: 30,\n        type: Elements.Title,\n        props: {\n          style: {\n            padding: '5px 24px 18px',\n          },\n        },\n      },\n      {\n        id: 'description',\n        orderIndex: 40,\n        type: Elements.Paragraph,\n        props: {\n          style: {\n            margin: '0px 0px 48px',\n          },\n        },\n      },\n      {\n        id: 'photo',\n        orderIndex: 50,\n        type: Elements.Photo,\n        props: {\n          style: {\n            margin: '0px',\n          },\n        },\n      },\n      {\n        ...ellipseRedTop,\n        orderIndex: 60,\n      },\n      {\n        ...ellipseBlueBottom,\n        orderIndex: 70,\n      },\n    ],\n  },\n  {\n    name: Steps.Loading,\n    id: Steps.Loading,\n    style: {\n      color: '#fff',\n    },\n    elements: [\n      {\n        ...ellipseRedTop,\n        orderIndex: 10,\n      },\n      {\n        ...ellipseBlueBottom,\n        orderIndex: 20,\n      },\n    ],\n  },\n  {\n    name: Steps.Resubmission,\n    id: Steps.Resubmission,\n    elements: [\n      closeIconButton,\n      {\n        id: 'title',\n        orderIndex: 20,\n        type: Elements.Title,\n        props: {\n          style: {\n            padding: '8px 0px 6px',\n            'text-align': 'center',\n          },\n        },\n      },\n      {\n        id: 'image',\n        orderIndex: 30,\n        type: Elements.Image,\n        props: {\n          style: {\n            margin: '120px 0px 16px',\n            'align-self': 'center',\n          },\n          attributes: {\n            src: 'https://cdn.ballerine.io/ui-packs/future/resubmit.svg',\n            alt: 'decline',\n            width: '80px',\n            height: '80px',\n          },\n        },\n      },\n      ellipseRedTop,\n      ellipseBlueBottom,\n      {\n        id: 'description',\n        orderIndex: 60,\n        type: Elements.Paragraph,\n        props: {\n          style: {\n            background: 'transparent',\n            margin: '0px 0px 48px',\n            border: 'none',\n            color: '#788597',\n          },\n        },\n      },\n      {\n        id: 'error-text',\n        orderIndex: 70,\n        type: Elements.ErrorText,\n        props: {\n          style: {\n            background: 'transparent',\n            margin: '0px 0px 48px',\n            border: 'none',\n            color: '#788597',\n          },\n        },\n      },\n      {\n        id: 'button',\n        orderIndex: 80,\n        type: Elements.Button,\n        props: {},\n      },\n    ],\n  },\n  {\n    name: Steps.Decline,\n    id: Steps.Decline,\n    elements: [\n      closeIconButton,\n      {\n        id: 'title',\n        orderIndex: 20,\n        type: Elements.Title,\n        props: {\n          style: {\n            padding: '8px 0px 6px',\n            'text-align': 'center',\n          },\n        },\n      },\n      {\n        id: 'image',\n        orderIndex: 30,\n        type: Elements.Image,\n        props: {\n          style: {\n            margin: '120px 0px 16px',\n          },\n          attributes: {\n            src: 'https://cdn.ballerine.io/ui-packs/future/decline.svg',\n            alt: 'decline',\n            width: '80px',\n            height: '80px',\n          },\n        },\n      },\n      ellipseRedTop,\n      ellipseBlueBottom,\n      {\n        id: 'description',\n        orderIndex: 60,\n        type: Elements.Paragraph,\n        props: {\n          style: {\n            background: 'transparent',\n            margin: '0px 0px 48px',\n            border: 'none',\n            color: '#788597',\n          },\n        },\n      },\n      {\n        id: 'error-text',\n        orderIndex: 70,\n        type: Elements.ErrorText,\n        props: {},\n      },\n      {\n        id: 'button',\n        orderIndex: 80,\n        type: Elements.Button,\n        props: {},\n      },\n    ],\n  },\n  {\n    name: Steps.Error,\n    id: Steps.Error,\n    elements: [\n      closeIconButton,\n      {\n        id: 'title',\n        orderIndex: 20,\n        type: Elements.Title,\n        props: {\n          style: {\n            padding: '8px 0px 6px',\n            'text-align': 'center',\n          },\n        },\n      },\n      {\n        id: 'image',\n        orderIndex: 30,\n        type: Elements.Image,\n        props: {\n          style: {\n            margin: '120px 0px 16px',\n          },\n          attributes: {\n            src: 'https://cdn.ballerine.io/ui-packs/future/decline.svg',\n            alt: 'decline',\n            width: '80px',\n            height: '80px',\n          },\n        },\n      },\n      ellipseRedTop,\n      ellipseBlueBottom,\n      {\n        id: 'description',\n        orderIndex: 60,\n        type: Elements.Paragraph,\n        props: {\n          style: {\n            background: 'transparent',\n            margin: '0px 0px 48px',\n            border: 'none',\n            color: '#788597',\n          },\n        },\n      },\n      {\n        id: 'error-text',\n        orderIndex: 70,\n        type: Elements.ErrorText,\n        props: {\n          style: {\n            margin: '20px 0px',\n          },\n        },\n      },\n      {\n        id: 'button',\n        orderIndex: 80,\n        type: Elements.Button,\n        props: {},\n      },\n    ],\n  },\n  {\n    name: Steps.Final,\n    id: Steps.Final,\n    style: {},\n    elements: [\n      closeIconButton,\n      {\n        id: 'title',\n        orderIndex: 20,\n        type: Elements.Title,\n        props: {\n          style: {\n            padding: '8px 0px 6px',\n            'text-align': 'none',\n          },\n        },\n      },\n      {\n        id: 'ellipse-red',\n        orderIndex: 30,\n        type: Elements.Image,\n        props: {\n          style: {\n            position: 'absolute',\n            top: '0px',\n            left: '0px',\n            right: '0px',\n            width: '100%',\n          },\n          attributes: {\n            src: 'https://cdn.ballerine.io/ui-packs/future/ellipse-red-final.svg',\n            alt: 'ellipse-red',\n          },\n        },\n      },\n      {\n        orderIndex: 40,\n        id: 'ellipse-blue',\n        type: Elements.Image,\n        props: {\n          style: {\n            position: 'absolute',\n            top: '0px',\n            left: '0px',\n            right: '0px',\n            width: '100%',\n          },\n          attributes: {\n            src: 'https://cdn.ballerine.io/ui-packs/future/ellipse-blue-final.svg',\n            alt: 'ellipse-blue',\n          },\n        },\n      },\n      {\n        orderIndex: 50,\n        id: 'ellipse-red',\n        type: Elements.Image,\n        props: {\n          style: {\n            margin: '170px auto 16px',\n            'align-self': 'center',\n          },\n          attributes: {\n            src: 'https://cdn.ballerine.io/ui-packs/future/final.svg',\n            alt: 'final',\n            width: '80px',\n            height: '80px',\n          },\n        },\n      },\n      {\n        orderIndex: 60,\n        id: 'description',\n        type: Elements.Paragraph,\n        props: {\n          style: {\n            margin: '0px 0px 60px',\n            'text-align': 'center',\n          },\n        },\n      },\n      {\n        id: 'button',\n        orderIndex: 70,\n        type: Elements.Button,\n        props: {},\n      },\n    ],\n  },\n];\n\nexport const uiTheme: IAppConfigurationUI = {\n  general: {\n    progress: false,\n    borderRadius: '16px',\n    padding: '24px',\n    colors: {\n      primary: '#F260FF',\n      secondary: '#7000FF',\n      text: '#788597',\n      danger: 'rgba(173, 0, 0, 0.8);',\n    },\n    fonts: {\n      name: 'IBM Plex Mono',\n      weight: [400, 500, 700],\n      link: 'https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;700&display=swap',\n    },\n  },\n  components: {\n    photo: {},\n    paragraph: {\n      color: '#926A90',\n      'font-size': '16x',\n    },\n    cameraButton: {},\n    videoContainer: {},\n    input: {},\n    loader: {},\n    button: {\n      'font-size': '16px',\n      padding: '15px 20px',\n      width: '100%',\n      color: '#fff',\n      background:\n        'linear-gradient(267.68deg, var(--general-colors-primary) 23.95%, var(--general-colors-secondary) 95.08%)',\n      'font-weight': 700,\n      'border-radius': '100px',\n      'box-shadow': '0px 6px 9px 5px #007AFF1a;-webkit-box-shadow: 0px 6px 9px 5px #007AFF1a;',\n    },\n    buttonWithIcon: {\n      'font-size': '16px',\n      padding: '20px 20px',\n      width: '100%',\n      color: '#fff',\n      'font-weight': 700,\n      'border-radius': '12px',\n      'box-shadow': '0px 6px 9px 5px #007AFF1a;-webkit-box-shadow: 0px 6px 9px 5px #007AFF1a;',\n    },\n    iconButton: {\n      background: '#F2F3F4',\n      width: '40px',\n      height: '40px',\n      position: 'absolute',\n      top: '45px',\n      right: '32px',\n    },\n    iconCloseButton: {\n      background: '#F2F3F4',\n      width: '40px',\n      height: '40px',\n      position: 'absolute',\n      top: '45px',\n      right: '32px',\n    },\n    navigationButtons: {\n      props: {\n        style: {\n          display: 'flex',\n          'flex-direction': 'column-reverse',\n          margin: '70px 0px 0px',\n          padding: '0px',\n        },\n      },\n      backButton: {\n        type: 'button',\n        props: {\n          style: {\n            width: '100%',\n            margin: '32px 0px 0px 0px',\n            padding: '15px 20px',\n            'font-weight': 400,\n            background: {\n              color: 'var(--general-colors-primary)',\n              opacity: 0.2,\n            },\n            color: '#fff',\n            border: '1px solid var(--general-colors-primary)',\n            'border-radius': '100px',\n            'box-shadow': '0px 3px 10px rgba(0, 0, 0, 0.05), 0px 6px 30px rgba(0, 122, 255, 0.1)',\n          },\n        },\n      },\n      nextButton: {\n        type: 'button',\n        props: {\n          style: {\n            'font-size': '16px',\n            padding: '15px 20px',\n            width: '100%',\n            color: '#fff',\n            'font-weight': 700,\n            'border-radius': '100px',\n            'box-shadow':\n              '0px 6px 9px 5px #007AFF1a;-webkit-box-shadow: 0px 6px 9px 5px #007AFF1a;',\n          },\n        },\n      },\n    },\n    errorText: {\n      border: '1px solid #DF2222',\n      background: 'rgba(223, 34, 34, 0.2)',\n      'border-radius': '6px',\n      padding: '8px',\n    },\n    layout: {\n      padding: '40px',\n      position: 'relative',\n      background: '#000',\n    },\n    documentOptions: {\n      options: {\n        [DocumentType.ID_CARD]: {\n          document: {\n            orderIndex: 10,\n            type: DocumentType.ID_CARD,\n            kind: DocumentKind.ID_CARD,\n            backSide: true,\n            variant: DocumentVariant.REGULAR,\n          },\n          attributes: {\n            icon: 'Card',\n            width: 40,\n            height: 40,\n          },\n        },\n        [DocumentType.DRIVERS_LICENSE]: {\n          document: {\n            orderIndex: 20,\n            type: DocumentType.DRIVERS_LICENSE,\n            kind: DocumentKind.DRIVERS_LICENSE,\n            backSide: true,\n            variant: DocumentVariant.REGULAR,\n          },\n          attributes: {\n            icon: 'License',\n            width: 40,\n            height: 40,\n          },\n        },\n        [DocumentType.PASSPORT]: {\n          document: {\n            orderIndex: 30,\n            type: DocumentType.PASSPORT,\n            kind: DocumentKind.PASSPORT,\n            backSide: false,\n            variant: DocumentVariant.REGULAR,\n          },\n          attributes: {\n            icon: 'PassportTwo',\n            width: 40,\n            height: 40,\n          },\n        },\n        [DocumentType.VOTER_ID]: {\n          document: {\n            orderIndex: 40,\n            type: DocumentType.VOTER_ID,\n            kind: DocumentKind.VOTER_ID,\n            backSide: true,\n            variant: DocumentVariant.REGULAR,\n          },\n          attributes: {\n            icon: 'Voter',\n            width: 40,\n            height: 40,\n          },\n        },\n      },\n      props: {},\n      descriptionProps: {\n        style: {\n          'font-size': '12px',\n          color: '#926A90',\n          margin: '3px 0px 0px 0px',\n          hover: {\n            color: '#926A90',\n          },\n          active: {\n            color: '#926A90',\n          },\n        },\n      },\n      optionProps: {\n        style: {\n          background: {\n            color: 'var(--general-colors-primary)',\n            opacity: 0.2,\n          },\n          margin: '0 0 22px 0px',\n          border: '1px solid var(--general-colors-primary)',\n          'border-radius': '13px',\n          width: '100%',\n          padding: '14px 18px',\n          'box-shadow':\n            '0px 6px 30px 0px #007AFF1a , 0px 3px 10px 0px #0000000a ;-webkit-box-shadow: 0px 6px 30px 0px #007AFF1a , 0px 3px 10px 0px #0000000a ;',\n          display: 'flex',\n          'text-align': 'left',\n          hover: {\n            border: '1px solid var(--general-colors-primary)',\n            background: {\n              color: 'var(--general-colors-primary)',\n              opacity: 0.4,\n            },\n          },\n          active: {\n            border: '1px solid var(--general-colors-primary)',\n            background: {\n              color: 'var(--general-colors-primary)',\n              opacity: 0.4,\n            },\n          },\n        },\n      },\n      iconContainerProps: {\n        style: {\n          width: '45px',\n          height: '45px',\n          margin: '0px 15px 0px 0px',\n          padding: '0px',\n          background: 'transparent',\n          hover: {\n            background: 'transparent',\n          },\n          active: {\n            background: 'transparent',\n          },\n        },\n      },\n      iconProps: {\n        style: {},\n      },\n      titleProps: {\n        style: {\n          color: '#fff',\n          'text-align': 'left',\n          margin: '4px 0px 0px',\n          hover: {\n            color: '#fff',\n          },\n          active: {\n            color: '#fff',\n          },\n        },\n      },\n    },\n\n    container: {\n      width: '100%',\n      display: 'flex',\n      'justify-content': 'center',\n      'align-items': 'center',\n    },\n    image: {\n      margin: '0px',\n    },\n    title: {\n      'font-weight': 700,\n      'font-size': '27px',\n      'text-align': 'center',\n      color: '#fff',\n    },\n  },\n  settings: {\n    cameraSettings: {\n      sizeFactor: 1,\n      imageType: IMAGE_TYPES.JPG,\n      imageCompression: 0,\n      isImageMirror: false,\n    },\n    selfieCameraSettings: {\n      sizeFactor: 1,\n      imageType: IMAGE_TYPES.JPG,\n      imageCompression: 0,\n      isImageMirror: true,\n    },\n  },\n};\n","export { uiPack } from './store';\nexport { UIPackType } from './types';\nexport type { TUIPacks, IUIPackTheme } from './types';\nexport { getStepConfiguration, getComponentStyles, getLayoutStyles } from './utils';\nimport { uiTheme as future, stepsTheme } from './future/theme';\nimport { uiTheme as blue } from './default/theme';\nimport { IUIPackTheme, TUIPacks } from './types';\n\nexport const packs: TUIPacks = {\n  future: {\n    ...(future as Required<IUIPackTheme>),\n    steps: stepsTheme,\n  },\n  default: blue,\n};\n","import {\n  FlowsEventsConfig,\n  FlowsInitOptions,\n  FlowsTranslations,\n} from '../../../types/BallerineSDK';\nimport { TranslationType } from '../../contexts/translation';\nimport translation from '../../configuration/translation.json';\nimport { isUrl, mergeConfigurationWithUiPack, mergeTranslations } from '../merge-service';\nimport {\n  configuration as configurationStore,\n  IAppConfiguration,\n  IStepConfiguration,\n  Steps,\n} from '../../contexts/configuration';\nimport deepmerge from 'deepmerge';\nimport { get } from 'svelte/store';\nimport { IUIPackTheme, packs, uiPack as uiPackStore } from '../../ui-packs';\nimport { preloadStepImages } from '../preload-service/utils';\nimport { IFlow } from '../../contexts/flows';\nimport { TUIPackType, UIPackTypes } from '../../ui-packs/types';\n\nexport let texts: TranslationType = translation;\n\nexport const appInit = async (overrides: FlowsInitOptions) => {\n  let configuration = mergeConfigOverrides(overrides);\n  configuration = await populateConfigurationByUiPack(configuration);\n  configuration = await preloadFlowBasicSteps(configuration);\n  configurationStore.update(() => configuration);\n};\n\n/**\n * @description Merges default configuration and overrides provided by the user\n * Updates store with merged configuration\n * @param overrides configuration provided by the user\n */\nexport const mergeConfigOverrides = (overrides: FlowsInitOptions): IAppConfiguration => {\n  let mergedConfiguration = get(configurationStore);\n  configurationStore.update(configuration => {\n    const { uiConfig, ...restConfig } = overrides;\n    mergedConfiguration = deepmerge(configuration, restConfig) as IAppConfiguration;\n    if (uiConfig) {\n      mergedConfiguration = deepmerge(mergedConfiguration, uiConfig) as IAppConfiguration;\n    }\n    return mergedConfiguration;\n  });\n  return mergedConfiguration;\n};\n\n/**\n * @description Extends provided by user configuration with selected ui pack\n * @param configuration provided user configuration\n */\nexport const populateConfigurationByUiPack = async (\n  configuration: IAppConfiguration,\n): Promise<IAppConfiguration> => {\n  const packType = configuration.uiPack;\n  if (isUrl(packType)) {\n    const response = await fetch(packType as string);\n    const uiPack = (await response.json()) as IUIPackTheme;\n    uiPackStore.set(uiPack);\n    return mergeConfigurationWithUiPack(configuration, uiPack);\n  }\n  if (!packType) {\n    return mergeConfigurationWithUiPack(configuration, packs.default);\n  }\n  if (!UIPackTypes.includes(packType as TUIPackType)) {\n    return mergeConfigurationWithUiPack(configuration, packs.default);\n  }\n\n  return mergeConfigurationWithUiPack(configuration, packs[packType as TUIPackType]);\n};\n\n/**\n * @description Sets flow callbacks from the configuration to the selected flow config\n * @param flowName selected flow\n * @param callbacks callbacks to set\n */\nexport const setFlowCallbacks = (flowName: string, callbacks?: FlowsEventsConfig) => {\n  return configurationStore.update(configuration => {\n    if (!callbacks) return configuration;\n    return {\n      ...configuration,\n      flows: {\n        ...configuration.flows,\n        [flowName]: {\n          ...configuration.flows[flowName],\n          callbacks,\n        },\n      },\n    };\n  });\n};\n\n/**\n * @description Merges the default translations with the translations provided by the user\n * @param translations translation overrides provided by the user\n */\nexport const mergeTranslationsOverrides = async (translations?: FlowsTranslations) => {\n  if (!translations) return texts;\n  texts = await mergeTranslations(texts, translations);\n  return texts;\n};\n\n/**\n * @description Preload basic steps in the flow in case they exist\n * @param configuration merged general configuration\n */\nexport const preloadFlowBasicSteps = async (\n  configuration: IAppConfiguration,\n): Promise<IAppConfiguration> => {\n  let flows: { [key: string]: IFlow } = {};\n  for (const flowName of Object.keys(configuration.flows)) {\n    const preloadedFlow = await preloadBasicSteps(configuration.flows[flowName]);\n    flows = {\n      ...flows,\n      [flowName]: preloadedFlow,\n    };\n  }\n  return {\n    ...configuration,\n    flows,\n  };\n};\n\n/**\n * @description Preload basic steps in specific flow\n * @param flow\n */\nconst preloadBasicSteps = async (flow: IFlow): Promise<IFlow> => {\n  const steps = flow.steps as IStepConfiguration[];\n  let preloadedSteps = steps;\n  // Welcome step preload\n  const welcomeStep = steps.find(s => s.name === Steps.Welcome);\n  if (welcomeStep) {\n    const updatedWelcomeStep = await preloadStepImages(welcomeStep);\n    preloadedSteps = preloadedSteps.map(s =>\n      s.name === welcomeStep.name ? updatedWelcomeStep : s,\n    );\n  }\n  // Loading step preload\n  const loadingStep = steps.find(s => s.name === Steps.Loading);\n  if (loadingStep) {\n    const updatedLoadingStep = await preloadStepImages(loadingStep);\n    preloadedSteps = preloadedSteps.map(s =>\n      s.name === loadingStep.name ? updatedLoadingStep : s,\n    );\n  }\n  return {\n    ...flow,\n    steps: preloadedSteps,\n  };\n};\n\n/**\n * @description If {@link configuration.backendConfig.auth.method} is set to 'jwt' sets {@link configuration.backendConfig.auth.authorizationHeader} to \\`Bearer ${jwt}\\`\n * @param jwt - JWT token as string\n *\n * @see {@link configuration.backendConfig.auth}\n */\nexport const setAuthorizationHeaderJwt = (jwt: string) => {\n  const { backendConfig } = get(configurationStore);\n  const { method } = backendConfig?.auth ?? {};\n\n  if (method !== 'jwt') return;\n\n  return configurationStore.update(config => ({\n    ...config,\n    backendConfig: {\n      ...config.backendConfig,\n      auth: {\n        ...config.backendConfig.auth,\n        authorizationHeader: `Bearer ${jwt}`,\n      },\n    },\n  }));\n};\n","import { writable } from 'svelte/store';\nimport { Languages } from './types';\nimport { texts } from '../../services/configuration-manager';\n\nexport const currentLanguage = writable<Languages>('en');\n\nlet language: string;\n\ncurrentLanguage.subscribe(lang => {\n  language = lang;\n});\n\nexport const t = (namespace: string, key: string) => {\n  let path = `${language}.${namespace}.${key}`;\n\n  let text = get(texts, path);\n  if (!text) {\n    const namespacePath = namespace.split('.');\n    const lastKey = namespacePath.pop();\n    path = `${language}.${namespacePath.join('.')}.${key}`;\n    text = get(texts, path);\n    console.log('fallback to default translation, missing key', lastKey);\n  }\n  return text || 'Missing translation: ' + path;\n};\n\nconst get = (obj: Record<string, unknown>, path: string): string => {\n  // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n  // @ts-ignore\n  const result = path.split('.').reduce((res, key) => res && res[key], obj);\n  return result;\n};\n","<script lang=\"ts\">\n  import { t } from './hooks';\n  import { currentLanguage } from './hooks';\n\n  export let namespace: string;\n  export let key: string;\n  let text: string;\n\n  currentLanguage.subscribe(() => {\n    text = t(namespace, key);\n  });\n</script>\n\n{text}\n","<script lang=\"ts\">\n  import { fly } from 'svelte/transition';\n  import { steps } from './lib/contexts/navigation';\n  import { configuration, IStepConfiguration } from './lib/contexts/configuration';\n  import { sendNavigationUpdateEvent } from './lib/utils/event-service';\n  import { visitedPage } from './lib/services/analytics';\n  import { currentStepId, currentStepIdx, currentParams } from './lib/contexts/app-state';\n  import { getFlowName } from './lib/contexts/flows';\n\n  const getFlowSteps = () => {\n    const flowName = getFlowName();\n    const flow = $configuration.flows[flowName];\n    return flow.steps as RecursivePartial<IStepConfiguration>[];\n  };\n  const flowSteps = getFlowSteps();\n  const configurationStepIds = flowSteps.map(s => s.id) as string[];\n  let stepId = configurationStepIds[0];\n  const flowStep = flowSteps.find(s => s.id === stepId) as IStepConfiguration;\n\n  let step = steps.find(s => s.name === flowStep.name);\n\n  const routeInit = (currentStepId: string, currentStepIdx: number) => {\n    const flowSteps = getFlowSteps();\n    const configurationStepIds = flowSteps.map(s => s.id) as string[];\n    const configurationStepId = configurationStepIds.find((id: string) => id === currentStepId);\n    if (configurationStepId === stepId) return;\n    if (!configurationStepId) {\n      stepId = currentStepId;\n      const flowStep = flowSteps.find(s => s.id === currentStepId) as IStepConfiguration;\n      step = steps.find(s => s.name === flowStep.name);\n    } else {\n      stepId = configurationStepId;\n      const flowStep = flowSteps.find(s => s.id === currentStepId) as IStepConfiguration;\n      step = steps.find(s => s.name === flowStep.name);\n      const newStepIndex = configurationStepIds.indexOf(stepId);\n      if (newStepIndex !== currentStepIdx) {\n        currentStepIdx = newStepIndex;\n        sendNavigationUpdateEvent();\n        visitedPage(currentStepId, $currentParams ? $currentParams.toString() : '');\n      } else {\n        // 404 error handling here\n      }\n    }\n  };\n\n  $: {\n    routeInit($currentStepId, $currentStepIdx);\n  }\n</script>\n\n{#if step}\n  {#key step.component}\n    <div\n      class=\"container\"\n      in:fly={{ x: -50, duration: 250, delay: 300 }}\n      out:fly={{ x: -50, duration: 250 }}\n    >\n      <svelte:component this={step.component} {stepId} />\n    </div>\n  {/key}\n{/if}\n\n<style>\n  .container {\n    height: 100%;\n  }\n</style>\n","<script lang=\"ts\">\n  import { configuration } from '../../../lib/contexts/configuration';\n  import { getFlowConfig } from '../../contexts/flows/hooks';\n\n  // let baseURL = import.meta.env.VITE_METRICS_BASE_URL\n  let baseURL = 'https://api-dev.ballerine.io';\n  export let enabled = $configuration.metricsConfig.enabled;\n  let flow = getFlowConfig($configuration);\n\n  const meta = {\n    flowName: flow.name,\n    flowSteps: flow.stepsOrder,\n  };\n\n  let payload = window.btoa(JSON.stringify(meta));\n  console.log('is metrics enabled', enabled);\n  export let endpoint = `${baseURL}/v2/metrics/png?meta=${payload}`;\n</script>\n\n{#if enabled}\n  <img alt=\"ballerine metrics\" src={endpoint} />\n{/if}\n\n<style>\n  img {\n    height: 1px;\n    width: 1px;\n    border-style: none;\n  }\n</style>\n","<script lang=\"ts\">\n  import { SvelteToast } from '@zerodevx/svelte-toast';\n  import { initConnectionCheck } from './lib/utils/check-connection';\n  import { configuration } from './lib/contexts/configuration';\n  import { currentLanguage, Languages } from './lib/contexts/translation';\n  import { subscribe } from './lib/utils/event-service';\n  import Routes from './Routes.svelte';\n  import { t } from './lib/contexts/translation/hooks';\n  import { setFlowName } from './lib/contexts/flows';\n  import { uiPack } from './lib/ui-packs';\n  import MetricsPixel from './lib/atoms/MetricsPixel/MetricsPixel.svelte';\n\n  subscribe();\n  initConnectionCheck(t);\n\n  const urlParams = new URLSearchParams(window.location.search);\n\n  // const flowName = urlParams.get(\"b_fid\");\n  export let flowName;\n  setFlowName($configuration.flows, flowName);\n\n  $currentLanguage =\n    ($configuration.endUserInfo.language as Languages) || $configuration.defaultLanguage;\n\n  const style = `\n    --general-fonts-name: ${$configuration.general?.fonts?.name || $uiPack.general.fonts.name};\n    --general-colors-primary: ${\n      $configuration.general?.colors?.primary || $uiPack.general.colors.primary\n    };\n    --general-colors-secondary: ${\n      $configuration.general?.colors?.secondary || $uiPack.general.colors.secondary\n    };\n  `;\n</script>\n\n<svelte:head>\n  {#if $configuration.general?.fonts?.link || $uiPack.general.fonts.link}\n    <link\n      href={$configuration.general?.fonts?.link || $uiPack.general.fonts.link}\n      rel=\"stylesheet\"\n    />\n  {/if}\n</svelte:head>\n\n<main {style} id=\"blrn-app\">\n  <!-- <button on:click={handle}>Change</button> -->\n  <Routes />\n  <SvelteToast\n    options={{\n      theme: {\n        '--toastBackground':\n          $configuration.general?.colors?.primary || $uiPack.general.colors.primary,\n        '--toastBarBackground':\n          $configuration.general?.colors?.primary || $uiPack.general.colors.primary,\n      },\n    }}\n  />\n  <MetricsPixel />\n</main>\n\n<style>\n  main {\n    max-width: 500px;\n    width: 100%;\n    margin: 0 auto;\n    height: 100%;\n    overflow: hidden;\n  }\n\n  :global(html, body, #app) {\n    height: 100%;\n  }\n\n  :global(html, body, p, div, input) {\n    box-sizing: border-box;\n  }\n\n  :global(body) {\n    margin: 0px;\n  }\n\n  :global(p, div, body, button) {\n    font-family: var(--general-fonts-name);\n  }\n</style>\n","<script lang=\"ts\">\n  import { onMount, setContext } from 'svelte';\n  import App from './App.svelte';\n  import { BALLERINE_EVENT } from './lib/utils/event-service';\n  import { IOuterEvent } from './lib/utils/event-service/types';\n  import { isMobile } from './lib/utils/is-mobile';\n\n  let loading = true;\n  let modalOpened = true;\n  let mounted = true;\n\n  onMount(async () => {\n    loading = false;\n\n    const loader = document.getElementById('blrn-loader') as HTMLDivElement;\n    loader.style.display = 'none';\n  });\n\n  export let flowName: string;\n  setContext('flowName', flowName);\n\n  export let useModal = false;\n\n  window.addEventListener(\n    'message',\n    e => {\n      const event = e.data as IOuterEvent;\n      if (event.eventName !== BALLERINE_EVENT) return;\n      if (event.shouldExit) {\n        modalOpened = false;\n        mounted = false;\n      }\n    },\n    false,\n  );\n</script>\n\n{#if !isMobile() && useModal}\n  {#if !loading && modalOpened}\n    <div class=\"background\">\n      <div class=\"content\">\n        <App {flowName} />\n      </div>\n    </div>\n  {/if}\n{:else if !loading}\n  {#if mounted}\n    <App {flowName} />\n  {/if}\n{/if}\n\n<style>\n  .background {\n    z-index: 9999;\n    position: fixed;\n    top: 0px;\n    left: 0px;\n    overflow: hidden;\n    width: 100%;\n    height: 100%;\n    background: rgba(0, 0, 0, 0.6);\n    display: flex;\n    align-items: center;\n    justify-content: center;\n  }\n  .content {\n    width: 415px;\n    height: 660px;\n    box-shadow: 0px 20px 40px rgba(0, 0, 0, 0.05);\n    border-radius: 35px;\n    overflow: hidden;\n  }\n</style>\n","/**\n * @description Gets config specific query params as an object - see -docs url here-\n */\nexport const getConfigFromQueryParams = () => {\n  // Make sure non-unrelated query params are passed to the config\n  const {\n    b_uid,\n    b_cid,\n    b_t,\n    b_fn,\n    b_ln,\n    b_fid,\n    b_ph,\n    b_em,\n    b_lang,\n    b_eut,\n    // /?b_uid=&b_cid= --> { b_uid: '', b_cid: '' };\n  } = Object.fromEntries(new URLSearchParams(window.location.search));\n\n  const queryParamsConfig = {\n    flowName: b_fid,\n    clientId: b_cid,\n    id: b_uid,\n    token: b_t,\n    firstName: b_fn,\n    lastName: b_ln,\n    phone: b_ph,\n    email: b_em,\n    language: b_lang,\n    type: b_eut,\n  };\n\n  // Make sure no empty strings are passed to the config\n  return Object.entries(queryParamsConfig).reduce((acc, [key, value]) => {\n    if (!value) return acc;\n\n    // TODO: Remove casting and fix the type\n    acc[key as keyof typeof queryParamsConfig] = value;\n\n    return acc;\n  }, {} as typeof queryParamsConfig);\n};\n","import ConfigurationProvider from './ConfigurationProvider.svelte';\nimport type { BallerineSDKFlows, FlowsInitOptions } from './types/BallerineSDK';\nimport {\n  setAuthorizationHeaderJwt,\n  setFlowCallbacks,\n  appInit,\n  mergeTranslationsOverrides,\n} from './lib/services/configuration-manager';\nimport { getConfigFromQueryParams } from './lib/utils/get-config-from-query-params';\nimport { configuration } from './lib/contexts/configuration';\nimport { configuration as defaultConfiguration } from './lib/configuration/configuration';\nimport { resetAppState } from './lib/contexts/app-state/utils';\n//\nexport const flows: BallerineSDKFlows = {\n  init: config => {\n    return new Promise((resolve, reject) => {\n      console.log(\n        'BallerineSDK: Initializing BallerineSDK with version: ',\n        __APP_VERSION__,\n        config,\n      );\n\n      // Always init with no state. This ensures using init to reset the flow returns to the first step with no data.\n      void resetAppState();\n      // Always init with no configuration. This handles multiple calls to init, i.e React re-renders.\n      // Otherwise, the steps array could keep growing.\n      configuration.set(defaultConfiguration);\n\n      const { translations: _translations, ...configWithoutTranslations } = config;\n\n      // Extract config from query params\n      const {\n        clientId: _clientId,\n        flowName: _flowName,\n        ...endUserInfoFromQueryParams\n      } = getConfigFromQueryParams();\n\n      // Merge the two config objects\n      const mergedConfig: FlowsInitOptions = {\n        ...configWithoutTranslations,\n        endUserInfo: {\n          ...configWithoutTranslations.endUserInfo,\n          ...endUserInfoFromQueryParams,\n        },\n      };\n      const configPromise = appInit(mergedConfig);\n      const translationsPromise = mergeTranslationsOverrides(config.translations);\n      Promise.all([configPromise, translationsPromise])\n        .then(() => resolve())\n        .catch(reject);\n    });\n  },\n  // Use the b_fid query param as the default flowName, fallback to the passed flowName arg.\n  // Optional args/args with default values should probably be last.\n  mount({\n    flowName = getConfigFromQueryParams().flowName,\n    callbacks,\n    jwt,\n    useModal = false,\n    elementId = '',\n  }) {\n    const hostElement = useModal\n      ? document.querySelector('body')\n      : document.getElementById(elementId);\n\n    if (hostElement) {\n      hostElement.innerHTML = `<div class=\"loader-container\" id=\"blrn-loader\">\n      <div class=\"loader\"></div>\n    </div>\n    `;\n    } else {\n      const message = useModal ? 'body' : `with id ${elementId}`;\n\n      console.error(`BallerineSDK: Could not find element ${message}`);\n    }\n\n    // Merge the passed in callbacks into the Svelte configuration store of the specified flow.\n    // Calling setFlowCallbacks below ConfigurationProvider results in stale state for instances of get(configuration).\n    setFlowCallbacks(flowName, callbacks);\n\n    // Skipped if not using JWT auth.\n    if (jwt) {\n      setAuthorizationHeaderJwt(jwt);\n    }\n\n    new ConfigurationProvider({\n      target: hostElement as HTMLElement,\n      props: {\n        flowName,\n        useModal,\n      },\n    });\n  },\n  setConfig: function (_config: FlowsInitOptions): Promise<void> {\n    throw new Error('Function not implemented.');\n  },\n};\n"],"names":["noop","identity","x","assign","tar","src","k","run","fn","blank_object","run_all","fns","is_function","thing","safe_not_equal","a","b","src_url_equal_anchor","src_url_equal","element_src","url","is_empty","obj","subscribe","store","callbacks","unsub","get_store_value","value","_","component_subscribe","component","callback","create_slot","definition","ctx","$$scope","slot_ctx","get_slot_context","get_slot_changes","dirty","lets","merged","len","i","update_slot_base","slot","slot_definition","slot_changes","get_slot_context_fn","slot_context","get_all_dirty_from_scope","length","null_to_empty","set_store_value","ret","split_css_unit","split","is_client","now","raf","cb","tasks","run_tasks","task","loop","fulfill","append","target","node","append_styles","style_sheet_id","styles","append_styles_to","get_root_for_style","style","element","append_stylesheet","root","append_empty_stylesheet","style_element","insert","anchor","detach","destroy_each","iterations","detaching","name","svg_element","text","data","space","empty","listen","event","handler","options","attr","attribute","children","set_data","toggle_class","toggle","custom_event","type","detail","bubbles","cancelable","e","HtmlTag","is_svg","html","construct_svelte_component","props","managed_styles","active","hash","str","create_style_information","doc","info","create_rule","duration","delay","ease","uid","step","keyframes","p","t","rule","stylesheet","rules","animation","delete_rule","previous","next","anim","deleted","clear_rules","ownerNode","create_animation","from","params","to","easing","start_time","end","tick","css","running","started","start","stop","fix_position","width","height","add_transform","transform","current_component","set_current_component","get_current_component","onMount","onDestroy","createEventDispatcher","setContext","key","context","bubble","dirty_components","binding_callbacks","render_callbacks","flush_callbacks","resolved_promise","update_scheduled","schedule_update","flush","add_render_callback","seen_callbacks","flushidx","saved_component","update","$$","flush_render_callbacks","filtered","targets","c","promise","wait","dispatch","direction","kind","outroing","outros","group_outros","check_outros","transition_in","block","local","transition_out","null_transition","create_in_transition","config","animation_name","cleanup","go","end_time","create_out_transition","group","reset","outro_and_destroy_block","lookup","fix_and_outro_and_destroy_block","update_keyed_each","old_blocks","get_key","dynamic","list","destroy","create_each_block","get_context","o","n","old_indexes","new_blocks","new_lookup","deltas","updates","child_ctx","will_move","did_move","new_block","old_block","new_key","old_key","get_spread_update","levels","to_null_out","accounted_for","get_spread_object","spread_props","create_component","mount_component","customElement","fragment","after_update","new_on_destroy","destroy_component","make_dirty","init","instance","create_fragment","not_equal","parent_component","ready","rest","nodes","SvelteComponent","index","$$props","cubicOut","f","fade","linear","fly","y","opacity","target_opacity","od","xValue","xUnit","yValue","yUnit","u","flip","ox","oy","dx","dy","d","sx","sy","subscriber_queue","readable","writable","subscribers","set","new_value","run_queue","subscriber","invalidate","derived","stores","initial_value","single","stores_array","auto","values","pending","sync","result","unsubscribers","defaults","toast","count","_obj","msg","opts","param","conf","entry","id","idx","is_date","get_interpolator","arr","bi","delta","keys","interpolators","tweened","target_value","previous_task","interpolate","elapsed","raw_value","html_tag","div","if_block1","create_if_block","div0","div1","progress_1","item","progress","close","autoclose","$progress","prev","paused","pause","resume","componentProps","check","prop","unlisten","$$invalidate","sendIdTo","li","li_class_value","current","stop_animation","rect","li_intro","ul","items","getCss","theme","$toast","initConnectionCheck","Steps","Elements","defaultFlowOrder","configuration","defaultConfiguration","isObject","isEmptyObject","resolveStringTemplate","g","getBackendConfig","get","resolveEndpoint","endpointName","templateParams","backendConfig","_a","getStartVerificationEndpoint","getVerificationStatusEndpoint","getAuthorizationHeader","auth","getIsDevelopment","isMergeableObject","isNonNullObject","isSpecial","stringValue","isReactElement","canUseSymbol","REACT_ELEMENT_TYPE","emptyTarget","val","cloneUnlessOtherwiseSpecified","deepmerge","defaultArrayMerge","source","getMergeFunction","customMerge","getEnumerableOwnPropertySymbols","symbol","getKeys","propertyIsOnObject","object","property","propertyIsUnsafe","mergeObject","destination","sourceIsArray","targetIsArray","sourceAndTargetTypesMatch","array","deepmerge_1","cjs","isUrl","mergeTranslations","original","overridesTranslationConfiguration","overrides","error","mergeConfigurationWithUiPack","uiTheme","flows","flowName","flow","mergeConfigurationFlowsWithUiPack","mergeComponents","mergeGeneral","flowSteps","steps","flowStep","themeStep","mergedStep","mergeStepElements","uiThemeComponents","configurationComponents","uiThemeGeneral","configurationGeneral","uiThemeElements","configurationElements","elements","uiThemeElement","configurationElement","newElements","e1","e2","module","this","r","l","s","v","cssProperties","hexTransparencies","setBackgroundWithOpacity","prefix","app","color","makeStylesFromConfiguration","globalComponentStyles","configStyles","setProperties","globalCss","localCss","hoverProperty","globalHoverProperties","localHoverProperties","globalActiveProperties","localActiveHoverProperties","makesLocalStyles","cssHoverProperties","cssActiveProperties","button","_b","_c","_d","_e","isBack","background","$globalConfiguration","styleProps","buttonConfiguration","loader","$configuration","merge","isDisabled","isLoading","skipType","disabled","onClick","goToNextStep","currentStepId","$currentStepId","h1","getComponentStyles","attributes","img","img_src_value","div2","size","fullPage","defaultStyle","span","isSelfie","p_intro","p_outro","texts","intervals","interval","getOverlayDocumentType","documentType","DocumentType","DocumentKind","DocumentVariant","DecisionStatus","overlayType","FLOW_STORE_KEY","setFlowName","savedFlow","getFlowName","getFlowOrders","flowConfiguration","getFlowConfig","isNativeCamera","getListLength","language","namespace","each_blocks","globalListStyles","$uiPack","titleProps","listElementProps","flowId","listItems","$currentLanguage","EventTypes","ActionNames","VerificationStatuses","FlowEventTypes","flowEventBus","payload","BALLERINE_EVENT","currentLanguage","sendIframeEvent","eventOptions","sendFlowCompleteEvent","verificationResponse","syncFlow","status","idvResult","sendVerificationUpdateEvent","details","shouldExit","sendNavigationUpdateEvent","as","appState","sendButtonClickEvent","actionName","sendFlowErrorEvent","_error","_shouldExit","preloadByExtension","extension","svg","resolve","reject","preloadStepImages","preloadedSteps","isPreloadingInProgress","preloadNextStepByCurrent","globalConfiguration","nextStepId","getNextStepId","updatedStep","updatedSteps","updatedConfiguration","preloadStepById","stepId","create_if_block_6","create_if_block_5","if_block2","create_if_block_4","if_block3","create_if_block_3","if_block4","create_if_block_2","if_block5","create_if_block_1","if_block6","if_block0","each_value","getStepConfiguration","getLayoutStyles","stepNamespace","$appState","rect0","rect1","path","icons","Card","Passport","License","PassportTwo","Voter","icon","ownKeys","enumerableOnly","symbols","sym","_objectSpread2","_defineProperty","_classCallCheck","Constructor","_defineProperties","descriptor","_toPropertyKey","_createClass","protoProps","staticProps","_extends","_toPrimitive","input","hint","prim","res","arg","canvasToBlob","window","CanvasPrototype","hasBlobConstructor","hasArrayBufferViewSupport","BlobBuilder","dataURIPattern","dataURLtoBlob","dataURI","matches","mediaType","isBase64","dataString","byteString","arrayBuffer","intArray","bb","quality","self","toBlob","isBlob","DEFAULTS","IS_BROWSER","WINDOW","isPositiveNumber","slice","toArray","REGEXP_IMAGE_TYPE","isImageType","imageTypeToExtension","fromCharCode","getStringFromCharCode","dataView","btoa","arrayBufferToDataURL","mimeType","chunks","chunkSize","uint8","resetAndGetOrientation","orientation","littleEndian","app1Start","ifdStart","offset","exifIDCode","tiffOffset","endianness","firstIFDOffset","_length","_offset","parseOrientation","rotate","scaleX","scaleY","REGEXP_DECIMALS","normalizeDecimalNumber","times","getAdjustedSizes","_ref","aspectRatio","isValidWidth","isValidHeight","adjustedWidth","getExif","segments","segment","exifArray","insertExif","app0Length","newArrayBuffer","ArrayBuffer$1","FileReader","URL","REGEXP_EXTENSION","AnotherCompressor","Compressor","file","_this","isJPEGImage","checkOrientation","retainExif","reader","_this2","image","_ref2","_this3","naturalWidth","naturalHeight","_ref2$rotate","_ref2$scaleX","_ref2$scaleY","canvas","is90DegreesRotated","resizable","maxWidth","maxHeight","minWidth","minHeight","_ref3","_ref4","_ref5","_getAdjustedSizes","_getAdjustedSizes2","_getAdjustedSizes3","_getAdjustedSizes4","_getAdjustedSizes4$wi","_getAdjustedSizes4$he","destX","destY","destWidth","destHeight","srcX","srcY","srcWidth","srcHeight","_getAdjustedSizes5","_ref6","fillStyle","blob","done","_ref7","_ref8","date","err","nativeCameraHandler","clearDocs","uiPack","documents","documentOptionsConfiguration","addDocument","base64","document","getUpdatedPages","page","updateDocument","newPagesState","createToggle","initialState","nextState","prevState","icon_changes","t_changes","paragraph_changes","show_if","container_changes","toggleOnIsDisabled","hover","setHover","handleSelect","$isDisabled","mouseover_handler","focus_handler","mouseleave_handler","checkIsCameraAvailable","stream","track","documentoption_changes","func","o1","o2","documentOptions","option","configurationOption","handleSelectOption","$selectedDocumentInfo","handleTakePhoto","newDocumentsState","$documents","click_handler","goToPrevStep","getDocumentType","selectedDocumentInfo","isDocumentSelectionStepExists","handleGoToNextStep","video_1","create_if_block_7","if_block","each_value_2","each_value_1","each_blocks_2","each_blocks_1","video","container","cameraPhoto","toggleOffIsDisabled","documentKind","CameraPhoto","FACING_MODES","cameraStream","$$value","userConfiguration","skipBackSide","click_handler_1","click_handler_2","click_handler_3","click_handler_4","getDocImage","documentInfo","visitedPage","_pathname","_search","handleClose","currentParams","$currentParams","$selfieUri","isMobile","toMatchItem","overlay","Overlay","facingMode","dataUri","selfieUri","outerScopeContext","docTypeMapping","generateParams","staticHeaders","httpPost","body","response","httpGet","getVerificationStatus","_endUserId","verificationId","endpointUrl","verifyDocuments","endUserId","documentsForUpload","devMocks","verificationRes","broofa","verifyDocumentsAndCloseFlow","_documents","_selectedDocumentInfo","_selfie","WAITING_TIME","timeout","veryficationTimeout","showText","checkStatus","makeRequest","hasDocumentSelection","reasonCode","handleNavigate","message","Welcome","DocumentSelection","DocumentStart","DocumentPhoto","CheckDocument","DocumentPhotoBackStart","DocumentPhotoBack","CheckDocumentPhotoBack","SelfieStart","Selfie","CheckSelfie","Loading","Resubmission","Decline","ErrorPage","Final","filterOutByType","flowIds","stepConfiguration","stepsOrder","filteredFlows","currentFlowIndex","currentStepIdStore","currentStepIdx","currentRoute","previousPage","$currentRoute","docs","pageSide","resetAppState","backIconButton","closeIconButton","backWhiteIconButton","stepsTheme","IMAGE_TYPES","UIPackType","UIPackTypes","injectPrimaryIntoLayoutGradient","layoutStyles","primaryColor","configurationStyles","imageTopStyles","imageBottomStyle","ellipseRedTop","ellipseRedBottom","ellipseBlueTop","ellipseBlueBottom","packs","blue","translation","appInit","mergeConfigOverrides","populateConfigurationByUiPack","preloadFlowBasicSteps","configurationStore","mergedConfiguration","uiConfig","restConfig","packType","uiPackStore","setFlowCallbacks","mergeTranslationsOverrides","translations","preloadedFlow","preloadBasicSteps","welcomeStep","updatedWelcomeStep","loadingStep","updatedLoadingStep","setAuthorizationHeaderJwt","jwt","method","lang","namespacePath","lastKey","previous_key","switch_value","div_outro","getFlowSteps","routeInit","configurationStepIds","configurationStepId","newStepIndex","$currentStepIdx","baseURL","enabled","meta","endpoint","link","link_href_value","_f","main","loading","modalOpened","mounted","useModal","getConfigFromQueryParams","b_uid","b_cid","b_t","b_fn","b_ln","b_fid","b_ph","b_em","b_lang","b_eut","acc","_translations","configWithoutTranslations","_clientId","_flowName","endUserInfoFromQueryParams","mergedConfig","configPromise","translationsPromise","elementId","hostElement","ConfigurationProvider","_config"],"mappings":"yRAAA,SAASA,GAAO,CAAG,CACnB,MAAMC,GAAWC,GAAKA,EACtB,SAASC,GAAOC,EAAKC,EAAK,CAEtB,UAAWC,KAAKD,EACZD,EAAIE,CAAC,EAAID,EAAIC,CAAC,EAClB,OAAOF,CACX,CAWA,SAASG,GAAIC,EAAI,CACb,OAAOA,EAAE,CACb,CACA,SAASC,IAAe,CACpB,OAAO,OAAO,OAAO,IAAI,CAC7B,CACA,SAASC,GAAQC,EAAK,CAClBA,EAAI,QAAQJ,EAAG,CACnB,CACA,SAASK,GAAYC,EAAO,CACxB,OAAO,OAA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B,GACAD,GACA,CACE,GAAI,QACJ,WAAY,GACZ,KAAM1hB,EAAS,MACf,MAAO,CACL,MAAO,CACL,QAAS,eACX,CACF,CACF,EACA,CACE,GAAI,cACJ,WAAY,GACZ,KAAMA,EAAS,UACf,MAAO,CACL,MAAO,CACL,OAAQ,cACV,CACF,CACF,EACA,CACE,GAAI,QACJ,WAAY,GACZ,KAAMA,EAAS,MACf,MAAO,CACL,MAAO,CACL,OAAQ,KACV,CACF,CACF,EACA,CACE,GAAGsiB,GACH,WAAY,EACd,EACA,CACE,GAAGG,GACH,WAAY,EACd,CACF,CACF,EACA,CACE,KAAM1iB,EAAM,uBACZ,GAAIA,EAAM,uBACV,MAAO,CAAC,EACR,SAAU,CACR4hB,GACAD,GACA,CACE,GAAI,QACJ,WAAY,GACZ,KAAM1hB,EAAS,MACf,MAAO,CACL,MAAO,CACL,QAAS,eACX,CACF,CACF,EACA,CACE,GAAI,cACJ,WAAY,GACZ,KAAMA,EAAS,UACf,MAAO,CACL,MAAO,CACL,OAAQ,GACV,CACF,CACF,EACA,CACE,GAAI,QACJ,WAAY,GACZ,KAAMA,EAAS,MACf,MAAO,CACL,MAAO,CACL,OAAQ,WACR,YAAa,CACf,EACA,WAAY,CACV,IAAK,yEACL,IAAK,4BACL,MAAO,QACP,OAAQ,OACV,CACF,CACF,EACA,CACE,GAAGsiB,GACH,WAAY,EACd,EACA,CACE,GAAGG,GACH,WAAY,EACd,EACA,CACE,GAAI,SACJ,WAAY,GACZ,KAAMziB,EAAS,OACf,MAAO,CACL,MAAO,CACL,OAAQ,mBACV,CACF,CACF,CACF,CACF,EACA,CACE,KAAMD,EAAM,kBACZ,GAAIA,EAAM,kBACV,SAAU,CACR4hB,GACA,CACE,GAAI,QACJ,WAAY,GACZ,KAAM3hB,EAAS,MACf,MAAO,CACL,MAAO,CACL,MAAO,OACP,cAAe,IACf,aAAc,SACd,YAAa,OACb,QAAS,kBACX,CACF,CACF,EACA,CACE,GAAI,cACJ,WAAY,GACZ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