forked from 3pod-us/3pod-us.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Plans.js.map
1 lines (1 loc) · 295 KB
/
Plans.js.map
1
{"version":3,"file":"Plans.js","sources":["../../node_modules/rollup-plugin-styles/dist/runtime/inject-css.js","../../node_modules/svelte/internal/index.mjs","../../src/libraries/random_string.js","../../src/Styles.svelte","../../src/libraries/linkCSS.js","../../node_modules/svelte/store/index.mjs","../../src/plans/Plans.store.js","../../src/plans/SubscriptionsStore.js","../../src/libraries/formatNumber.js","../../src/EmailMarketingSlider.svelte","../../src/register/steps/StoreForm.js","../../src/components/Elements/CurrencyFormatter.svelte","../../src/libraries/parseHtmlString.js","../../src/register/steps/StoreCart.js","../../src/plans/CardPlans.svelte","../../src/components/Modals/SimpleModal.svelte","../../src/components/Modals/ModalAlert.svelte","../../src/components/Elements/Spinner.svelte","../../src/libraries/selectData.js","../../src/libraries/parseDate.js","../../src/plans/Subscriptions.svelte","../../src/components/Elements/Switch.svelte","../../src/libraries/turpial.js","../../src/libraries/Connect3Pod.js","../../src/plans/CorePlans.svelte","../../src/libraries/sortItems.js","../../src/Plans.svelte","../../src/controllers/Plans.js"],"sourcesContent":["var e=[],t=[];function n(n,r){if(n&&\"undefined\"!=typeof document){var a,s=!0===r.prepend?\"prepend\":\"append\",d=!0===r.singleTag,i=\"string\"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName(\"head\")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c()}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n))}function c(){var e=document.createElement(\"style\");if(e.setAttribute(\"type\",\"text/css\"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a=\"prepend\"===s?\"afterbegin\":\"beforeend\";return i.insertAdjacentElement(a,e),e}}export{n as default};\n","function noop() { }\nconst identity = x => x;\nfunction assign(tar, src) {\n // @ts-ignore\n for (const k in src)\n tar[k] = src[k];\n return tar;\n}\nfunction is_promise(value) {\n return value && typeof value === 'object' && typeof value.then === 'function';\n}\nfunction add_location(element, file, line, column, char) {\n element.__svelte_meta = {\n loc: { file, line, column, char }\n };\n}\nfunction run(fn) {\n return fn();\n}\nfunction blank_object() {\n return Object.create(null);\n}\nfunction run_all(fns) {\n fns.forEach(run);\n}\nfunction is_function(thing) {\n return typeof thing === 'function';\n}\nfunction safe_not_equal(a, b) {\n return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');\n}\nlet src_url_equal_anchor;\nfunction src_url_equal(element_src, url) {\n if (!src_url_equal_anchor) {\n src_url_equal_anchor = document.createElement('a');\n }\n src_url_equal_anchor.href = url;\n return element_src === src_url_equal_anchor.href;\n}\nfunction not_equal(a, b) {\n return a != a ? b == b : a !== b;\n}\nfunction is_empty(obj) {\n return Object.keys(obj).length === 0;\n}\nfunction validate_store(store, name) {\n if (store != null && typeof store.subscribe !== 'function') {\n throw new Error(`'${name}' is not a store with a 'subscribe' method`);\n }\n}\nfunction subscribe(store, ...callbacks) {\n if (store == null) {\n return noop;\n }\n const unsub = store.subscribe(...callbacks);\n return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub;\n}\nfunction get_store_value(store) {\n let value;\n subscribe(store, _ => value = _)();\n return value;\n}\nfunction component_subscribe(component, store, callback) {\n component.$$.on_destroy.push(subscribe(store, callback));\n}\nfunction create_slot(definition, ctx, $$scope, fn) {\n if (definition) {\n const slot_ctx = get_slot_context(definition, ctx, $$scope, fn);\n return definition[0](slot_ctx);\n }\n}\nfunction get_slot_context(definition, ctx, $$scope, fn) {\n return definition[1] && fn\n ? assign($$scope.ctx.slice(), definition[1](fn(ctx)))\n : $$scope.ctx;\n}\nfunction get_slot_changes(definition, $$scope, dirty, fn) {\n if (definition[2] && fn) {\n const lets = definition[2](fn(dirty));\n if ($$scope.dirty === undefined) {\n return lets;\n }\n if (typeof lets === 'object') {\n const merged = [];\n const len = Math.max($$scope.dirty.length, lets.length);\n for (let i = 0; i < len; i += 1) {\n merged[i] = $$scope.dirty[i] | lets[i];\n }\n return merged;\n }\n return $$scope.dirty | lets;\n }\n return $$scope.dirty;\n}\nfunction update_slot_base(slot, slot_definition, ctx, $$scope, slot_changes, get_slot_context_fn) {\n if (slot_changes) {\n const slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn);\n slot.p(slot_context, slot_changes);\n }\n}\nfunction update_slot(slot, slot_definition, ctx, $$scope, dirty, get_slot_changes_fn, get_slot_context_fn) {\n const slot_changes = get_slot_changes(slot_definition, $$scope, dirty, get_slot_changes_fn);\n update_slot_base(slot, slot_definition, ctx, $$scope, slot_changes, get_slot_context_fn);\n}\nfunction get_all_dirty_from_scope($$scope) {\n if ($$scope.ctx.length > 32) {\n const dirty = [];\n const length = $$scope.ctx.length / 32;\n for (let i = 0; i < length; i++) {\n dirty[i] = -1;\n }\n return dirty;\n }\n return -1;\n}\nfunction exclude_internal_props(props) {\n const result = {};\n for (const k in props)\n if (k[0] !== '$')\n result[k] = props[k];\n return result;\n}\nfunction compute_rest_props(props, keys) {\n const rest = {};\n keys = new Set(keys);\n for (const k in props)\n if (!keys.has(k) && k[0] !== '$')\n rest[k] = props[k];\n return rest;\n}\nfunction compute_slots(slots) {\n const result = {};\n for (const key in slots) {\n result[key] = true;\n }\n return result;\n}\nfunction once(fn) {\n let ran = false;\n return function (...args) {\n if (ran)\n return;\n ran = true;\n fn.call(this, ...args);\n };\n}\nfunction null_to_empty(value) {\n return value == null ? '' : value;\n}\nfunction set_store_value(store, ret, value) {\n store.set(value);\n return ret;\n}\nconst has_prop = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);\nfunction action_destroyer(action_result) {\n return action_result && is_function(action_result.destroy) ? action_result.destroy : noop;\n}\n\nconst is_client = typeof window !== 'undefined';\nlet now = is_client\n ? () => window.performance.now()\n : () => Date.now();\nlet raf = is_client ? cb => requestAnimationFrame(cb) : noop;\n// used internally for testing\nfunction set_now(fn) {\n now = fn;\n}\nfunction set_raf(fn) {\n raf = fn;\n}\n\nconst tasks = new Set();\nfunction run_tasks(now) {\n tasks.forEach(task => {\n if (!task.c(now)) {\n tasks.delete(task);\n task.f();\n }\n });\n if (tasks.size !== 0)\n raf(run_tasks);\n}\n/**\n * For testing purposes only!\n */\nfunction clear_loops() {\n tasks.clear();\n}\n/**\n * Creates a new task that runs on each raf frame\n * until it returns a falsy value or is aborted\n */\nfunction loop(callback) {\n let task;\n if (tasks.size === 0)\n raf(run_tasks);\n return {\n promise: new Promise(fulfill => {\n tasks.add(task = { c: callback, f: fulfill });\n }),\n abort() {\n tasks.delete(task);\n }\n };\n}\n\n// Track which nodes are claimed during hydration. Unclaimed nodes can then be removed from the DOM\n// at the end of hydration without touching the remaining nodes.\nlet is_hydrating = false;\nfunction start_hydrating() {\n is_hydrating = true;\n}\nfunction end_hydrating() {\n is_hydrating = false;\n}\nfunction upper_bound(low, high, key, value) {\n // Return first index of value larger than input value in the range [low, high)\n while (low < high) {\n const mid = low + ((high - low) >> 1);\n if (key(mid) <= value) {\n low = mid + 1;\n }\n else {\n high = mid;\n }\n }\n return low;\n}\nfunction init_hydrate(target) {\n if (target.hydrate_init)\n return;\n target.hydrate_init = true;\n // We know that all children have claim_order values since the unclaimed have been detached if target is not <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 subsequence of nodes that are claimed in order can be found by\n * computing the longest increasing subsequence of .claim_order values.\n *\n * This algorithm is optimal in generating the least amount of reorder operations\n * possible.\n *\n * Proof:\n * We know that, given a set of reordering operations, the nodes that do not move\n * always form an increasing subsequence, since they do not move among each other\n * meaning that they must be already ordered among each other. Thus, the maximal\n * set of nodes that do not move form a longest increasing subsequence.\n */\n // Compute longest increasing subsequence\n // m: subsequence length j => index k of smallest value that ends an increasing subsequence of length j\n const m = new Int32Array(children.length + 1);\n // Predecessor indices + 1\n const p = new Int32Array(children.length);\n m[0] = -1;\n let longest = 0;\n for (let i = 0; i < children.length; i++) {\n const current = children[i].claim_order;\n // Find the largest subsequence length such that it ends in a value less than our current value\n // upper_bound returns first greater value, so we subtract one\n // with fast path for when we are on the current longest subsequence\n const seqLen = ((longest > 0 && children[m[longest]].claim_order <= current) ? longest + 1 : upper_bound(1, longest, idx => children[m[idx]].claim_order, current)) - 1;\n p[i] = m[seqLen] + 1;\n const newLen = seqLen + 1;\n // We can guarantee that current is the smallest value. Otherwise, we would have generated a longer sequence.\n m[newLen] = i;\n longest = Math.max(newLen, longest);\n }\n // The longest increasing subsequence of nodes (initially reversed)\n const lis = [];\n // The rest of the nodes, nodes that will be moved\n const toMove = [];\n let last = children.length - 1;\n for (let cur = m[longest] + 1; cur != 0; cur = p[cur - 1]) {\n lis.push(children[cur - 1]);\n for (; last >= cur; last--) {\n toMove.push(children[last]);\n }\n last--;\n }\n for (; last >= 0; last--) {\n toMove.push(children[last]);\n }\n lis.reverse();\n // We sort the nodes being moved to guarantee that their insertion order matches the claim order\n toMove.sort((a, b) => a.claim_order - b.claim_order);\n // Finally, we move the nodes\n for (let i = 0, j = 0; i < toMove.length; i++) {\n while (j < lis.length && toMove[i].claim_order >= lis[j].claim_order) {\n j++;\n }\n const anchor = j < lis.length ? lis[j] : null;\n target.insertBefore(toMove[i], anchor);\n }\n}\nfunction append(target, node) {\n target.appendChild(node);\n}\nfunction append_styles(target, style_sheet_id, styles) {\n const append_styles_to = get_root_for_style(target);\n if (!append_styles_to.getElementById(style_sheet_id)) {\n const style = element('style');\n style.id = style_sheet_id;\n style.textContent = styles;\n append_stylesheet(append_styles_to, style);\n }\n}\nfunction get_root_for_style(node) {\n if (!node)\n return document;\n const root = node.getRootNode ? node.getRootNode() : node.ownerDocument;\n if (root && root.host) {\n return root;\n }\n return node.ownerDocument;\n}\nfunction append_empty_stylesheet(node) {\n const style_element = element('style');\n append_stylesheet(get_root_for_style(node), style_element);\n return style_element;\n}\nfunction append_stylesheet(node, style) {\n append(node.head || node, style);\n}\nfunction append_hydration(target, node) {\n if (is_hydrating) {\n init_hydrate(target);\n if ((target.actual_end_child === undefined) || ((target.actual_end_child !== null) && (target.actual_end_child.parentElement !== target))) {\n target.actual_end_child = target.firstChild;\n }\n // Skip nodes of undefined ordering\n while ((target.actual_end_child !== null) && (target.actual_end_child.claim_order === undefined)) {\n target.actual_end_child = target.actual_end_child.nextSibling;\n }\n if (node !== target.actual_end_child) {\n // We only insert if the ordering of this node should be modified or the parent node is not target\n if (node.claim_order !== undefined || node.parentNode !== target) {\n target.insertBefore(node, target.actual_end_child);\n }\n }\n else {\n target.actual_end_child = node.nextSibling;\n }\n }\n else if (node.parentNode !== target || node.nextSibling !== null) {\n target.appendChild(node);\n }\n}\nfunction insert(target, node, anchor) {\n target.insertBefore(node, anchor || null);\n}\nfunction insert_hydration(target, node, anchor) {\n if (is_hydrating && !anchor) {\n append_hydration(target, node);\n }\n else if (node.parentNode !== target || node.nextSibling != anchor) {\n target.insertBefore(node, anchor || null);\n }\n}\nfunction detach(node) {\n node.parentNode.removeChild(node);\n}\nfunction destroy_each(iterations, detaching) {\n for (let i = 0; i < iterations.length; i += 1) {\n if (iterations[i])\n iterations[i].d(detaching);\n }\n}\nfunction element(name) {\n return document.createElement(name);\n}\nfunction element_is(name, is) {\n return document.createElement(name, { is });\n}\nfunction object_without_properties(obj, exclude) {\n const target = {};\n for (const k in obj) {\n if (has_prop(obj, k)\n // @ts-ignore\n && exclude.indexOf(k) === -1) {\n // @ts-ignore\n target[k] = obj[k];\n }\n }\n return target;\n}\nfunction svg_element(name) {\n return document.createElementNS('http://www.w3.org/2000/svg', name);\n}\nfunction text(data) {\n return document.createTextNode(data);\n}\nfunction space() {\n return text(' ');\n}\nfunction empty() {\n return text('');\n}\nfunction listen(node, event, handler, options) {\n node.addEventListener(event, handler, options);\n return () => node.removeEventListener(event, handler, options);\n}\nfunction prevent_default(fn) {\n return function (event) {\n event.preventDefault();\n // @ts-ignore\n return fn.call(this, event);\n };\n}\nfunction stop_propagation(fn) {\n return function (event) {\n event.stopPropagation();\n // @ts-ignore\n return fn.call(this, event);\n };\n}\nfunction self(fn) {\n return function (event) {\n // @ts-ignore\n if (event.target === this)\n fn.call(this, event);\n };\n}\nfunction trusted(fn) {\n return function (event) {\n // @ts-ignore\n if (event.isTrusted)\n fn.call(this, event);\n };\n}\nfunction attr(node, attribute, value) {\n if (value == null)\n node.removeAttribute(attribute);\n else if (node.getAttribute(attribute) !== value)\n node.setAttribute(attribute, value);\n}\nfunction set_attributes(node, attributes) {\n // @ts-ignore\n const descriptors = Object.getOwnPropertyDescriptors(node.__proto__);\n for (const key in attributes) {\n if (attributes[key] == null) {\n node.removeAttribute(key);\n }\n else if (key === 'style') {\n node.style.cssText = attributes[key];\n }\n else if (key === '__value') {\n node.value = node[key] = attributes[key];\n }\n else if (descriptors[key] && descriptors[key].set) {\n node[key] = attributes[key];\n }\n else {\n attr(node, key, attributes[key]);\n }\n }\n}\nfunction set_svg_attributes(node, attributes) {\n for (const key in attributes) {\n attr(node, key, attributes[key]);\n }\n}\nfunction set_custom_element_data(node, prop, value) {\n if (prop in node) {\n node[prop] = typeof node[prop] === 'boolean' && value === '' ? true : value;\n }\n else {\n attr(node, prop, value);\n }\n}\nfunction xlink_attr(node, attribute, value) {\n node.setAttributeNS('http://www.w3.org/1999/xlink', attribute, value);\n}\nfunction get_binding_group_value(group, __value, checked) {\n const value = new Set();\n for (let i = 0; i < group.length; i += 1) {\n if (group[i].checked)\n value.add(group[i].__value);\n }\n if (!checked) {\n value.delete(__value);\n }\n return Array.from(value);\n}\nfunction to_number(value) {\n return value === '' ? null : +value;\n}\nfunction time_ranges_to_array(ranges) {\n const array = [];\n for (let i = 0; i < ranges.length; i += 1) {\n array.push({ start: ranges.start(i), end: ranges.end(i) });\n }\n return array;\n}\nfunction children(element) {\n return Array.from(element.childNodes);\n}\nfunction init_claim_info(nodes) {\n if (nodes.claim_info === undefined) {\n nodes.claim_info = { last_index: 0, total_claimed: 0 };\n }\n}\nfunction claim_node(nodes, predicate, processNode, createNode, dontUpdateLastIndex = false) {\n // Try to find nodes in an order such that we lengthen the longest increasing subsequence\n init_claim_info(nodes);\n const resultNode = (() => {\n // We first try to find an element after the previous one\n for (let i = nodes.claim_info.last_index; i < nodes.length; i++) {\n const node = nodes[i];\n if (predicate(node)) {\n const replacement = processNode(node);\n if (replacement === undefined) {\n nodes.splice(i, 1);\n }\n else {\n nodes[i] = replacement;\n }\n if (!dontUpdateLastIndex) {\n nodes.claim_info.last_index = i;\n }\n return node;\n }\n }\n // Otherwise, we try to find one before\n // We iterate in reverse so that we don't go too far back\n for (let i = nodes.claim_info.last_index - 1; i >= 0; i--) {\n const node = nodes[i];\n if (predicate(node)) {\n const replacement = processNode(node);\n if (replacement === undefined) {\n nodes.splice(i, 1);\n }\n else {\n nodes[i] = replacement;\n }\n if (!dontUpdateLastIndex) {\n nodes.claim_info.last_index = i;\n }\n else if (replacement === undefined) {\n // Since we spliced before the last_index, we decrease it\n nodes.claim_info.last_index--;\n }\n return node;\n }\n }\n // If we can't find any matching node, we create a new one\n return createNode();\n })();\n resultNode.claim_order = nodes.claim_info.total_claimed;\n nodes.claim_info.total_claimed += 1;\n return resultNode;\n}\nfunction claim_element_base(nodes, name, attributes, create_element) {\n return claim_node(nodes, (node) => node.nodeName === name, (node) => {\n const remove = [];\n for (let j = 0; j < node.attributes.length; j++) {\n const attribute = node.attributes[j];\n if (!attributes[attribute.name]) {\n remove.push(attribute.name);\n }\n }\n remove.forEach(v => node.removeAttribute(v));\n return undefined;\n }, () => create_element(name));\n}\nfunction claim_element(nodes, name, attributes) {\n return claim_element_base(nodes, name, attributes, element);\n}\nfunction claim_svg_element(nodes, name, attributes) {\n return claim_element_base(nodes, name, attributes, svg_element);\n}\nfunction claim_text(nodes, data) {\n return claim_node(nodes, (node) => node.nodeType === 3, (node) => {\n const dataStr = '' + data;\n if (node.data.startsWith(dataStr)) {\n if (node.data.length !== dataStr.length) {\n return node.splitText(dataStr.length);\n }\n }\n else {\n node.data = dataStr;\n }\n }, () => text(data), true // Text nodes should not update last index since it is likely not worth it to eliminate an increasing subsequence of actual elements\n );\n}\nfunction claim_space(nodes) {\n return claim_text(nodes, ' ');\n}\nfunction find_comment(nodes, text, start) {\n for (let i = start; i < nodes.length; i += 1) {\n const node = nodes[i];\n if (node.nodeType === 8 /* comment node */ && node.textContent.trim() === text) {\n return i;\n }\n }\n return nodes.length;\n}\nfunction claim_html_tag(nodes) {\n // find html opening tag\n const start_index = find_comment(nodes, 'HTML_TAG_START', 0);\n const end_index = find_comment(nodes, 'HTML_TAG_END', start_index);\n if (start_index === end_index) {\n return new HtmlTagHydration();\n }\n init_claim_info(nodes);\n const html_tag_nodes = nodes.splice(start_index, end_index + 1);\n detach(html_tag_nodes[0]);\n detach(html_tag_nodes[html_tag_nodes.length - 1]);\n const claimed_nodes = html_tag_nodes.slice(1, html_tag_nodes.length - 1);\n for (const n of claimed_nodes) {\n n.claim_order = nodes.claim_info.total_claimed;\n nodes.claim_info.total_claimed += 1;\n }\n return new HtmlTagHydration(claimed_nodes);\n}\nfunction set_data(text, data) {\n data = '' + data;\n if (text.wholeText !== data)\n text.data = data;\n}\nfunction set_input_value(input, value) {\n input.value = value == null ? '' : value;\n}\nfunction set_input_type(input, type) {\n try {\n input.type = type;\n }\n catch (e) {\n // do nothing\n }\n}\nfunction set_style(node, key, value, important) {\n node.style.setProperty(key, value, important ? 'important' : '');\n}\nfunction select_option(select, value) {\n for (let i = 0; i < select.options.length; i += 1) {\n const option = select.options[i];\n if (option.__value === value) {\n option.selected = true;\n return;\n }\n }\n select.selectedIndex = -1; // no option should be selected\n}\nfunction select_options(select, value) {\n for (let i = 0; i < select.options.length; i += 1) {\n const option = select.options[i];\n option.selected = ~value.indexOf(option.__value);\n }\n}\nfunction select_value(select) {\n const selected_option = select.querySelector(':checked') || select.options[0];\n return selected_option && selected_option.__value;\n}\nfunction select_multiple_value(select) {\n return [].map.call(select.querySelectorAll(':checked'), option => option.__value);\n}\n// unfortunately this can't be a constant as that wouldn't be tree-shakeable\n// so we cache the result instead\nlet crossorigin;\nfunction is_crossorigin() {\n if (crossorigin === undefined) {\n crossorigin = false;\n try {\n if (typeof window !== 'undefined' && window.parent) {\n void window.parent.document;\n }\n }\n catch (error) {\n crossorigin = true;\n }\n }\n return crossorigin;\n}\nfunction add_resize_listener(node, fn) {\n const computed_style = getComputedStyle(node);\n if (computed_style.position === 'static') {\n node.style.position = 'relative';\n }\n const iframe = element('iframe');\n iframe.setAttribute('style', 'display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; ' +\n 'overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;');\n iframe.setAttribute('aria-hidden', 'true');\n iframe.tabIndex = -1;\n const crossorigin = is_crossorigin();\n let unsubscribe;\n if (crossorigin) {\n iframe.src = \"data:text/html,<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 };\n }\n append(node, iframe);\n return () => {\n if (crossorigin) {\n unsubscribe();\n }\n else if (unsubscribe && iframe.contentWindow) {\n unsubscribe();\n }\n detach(iframe);\n };\n}\nfunction toggle_class(element, name, toggle) {\n element.classList[toggle ? 'add' : 'remove'](name);\n}\nfunction custom_event(type, detail, bubbles = false) {\n const e = document.createEvent('CustomEvent');\n e.initCustomEvent(type, bubbles, false, detail);\n return e;\n}\nfunction query_selector_all(selector, parent = document.body) {\n return Array.from(parent.querySelectorAll(selector));\n}\nclass HtmlTag {\n constructor() {\n this.e = this.n = null;\n }\n c(html) {\n this.h(html);\n }\n m(html, target, anchor = null) {\n if (!this.e) {\n this.e = element(target.nodeName);\n this.t = target;\n this.c(html);\n }\n this.i(anchor);\n }\n h(html) {\n this.e.innerHTML = html;\n this.n = Array.from(this.e.childNodes);\n }\n i(anchor) {\n for (let i = 0; i < this.n.length; i += 1) {\n insert(this.t, this.n[i], anchor);\n }\n }\n p(html) {\n this.d();\n this.h(html);\n this.i(this.a);\n }\n d() {\n this.n.forEach(detach);\n }\n}\nclass HtmlTagHydration extends HtmlTag {\n constructor(claimed_nodes) {\n super();\n this.e = this.n = null;\n this.l = claimed_nodes;\n }\n c(html) {\n if (this.l) {\n this.n = this.l;\n }\n else {\n super.c(html);\n }\n }\n i(anchor) {\n for (let i = 0; i < this.n.length; i += 1) {\n insert_hydration(this.t, this.n[i], anchor);\n }\n }\n}\nfunction attribute_to_object(attributes) {\n const result = {};\n for (const attribute of attributes) {\n result[attribute.name] = attribute.value;\n }\n return result;\n}\nfunction get_custom_elements_slots(element) {\n const result = {};\n element.childNodes.forEach((node) => {\n result[node.slot || 'default'] = true;\n });\n return result;\n}\n\nconst active_docs = new Set();\nlet active = 0;\n// https://github.com/darkskyapp/string-hash/blob/master/index.js\nfunction hash(str) {\n let hash = 5381;\n let i = str.length;\n while (i--)\n hash = ((hash << 5) - hash) ^ str.charCodeAt(i);\n return hash >>> 0;\n}\nfunction create_rule(node, a, b, duration, delay, ease, fn, uid = 0) {\n const step = 16.666 / duration;\n let keyframes = '{\\n';\n for (let p = 0; p <= 1; p += step) {\n const t = a + (b - a) * ease(p);\n keyframes += p * 100 + `%{${fn(t, 1 - t)}}\\n`;\n }\n const rule = keyframes + `100% {${fn(b, 1 - b)}}\\n}`;\n const name = `__svelte_${hash(rule)}_${uid}`;\n const doc = get_root_for_style(node);\n active_docs.add(doc);\n const stylesheet = doc.__svelte_stylesheet || (doc.__svelte_stylesheet = append_empty_stylesheet(node).sheet);\n const current_rules = doc.__svelte_rules || (doc.__svelte_rules = {});\n if (!current_rules[name]) {\n current_rules[name] = true;\n stylesheet.insertRule(`@keyframes ${name} ${rule}`, stylesheet.cssRules.length);\n }\n const animation = node.style.animation || '';\n node.style.animation = `${animation ? `${animation}, ` : ''}${name} ${duration}ms linear ${delay}ms 1 both`;\n active += 1;\n return name;\n}\nfunction delete_rule(node, name) {\n const previous = (node.style.animation || '').split(', ');\n const next = previous.filter(name\n ? anim => anim.indexOf(name) < 0 // remove specific animation\n : anim => anim.indexOf('__svelte') === -1 // remove all Svelte animations\n );\n const deleted = previous.length - next.length;\n if (deleted) {\n node.style.animation = next.join(', ');\n active -= deleted;\n if (!active)\n clear_rules();\n }\n}\nfunction clear_rules() {\n raf(() => {\n if (active)\n return;\n active_docs.forEach(doc => {\n const stylesheet = doc.__svelte_stylesheet;\n let i = stylesheet.cssRules.length;\n while (i--)\n stylesheet.deleteRule(i);\n doc.__svelte_rules = {};\n });\n active_docs.clear();\n });\n}\n\nfunction create_animation(node, from, fn, params) {\n if (!from)\n return noop;\n const to = node.getBoundingClientRect();\n if (from.left === to.left && from.right === to.right && from.top === to.top && from.bottom === to.bottom)\n return noop;\n const { delay = 0, duration = 300, easing = identity, \n // @ts-ignore todo: should this be separated from destructuring? Or start/end added to public api and documentation?\n start: start_time = now() + delay, \n // @ts-ignore todo:\n end = start_time + duration, tick = noop, css } = fn(node, { from, to }, params);\n let running = true;\n let started = false;\n let name;\n function start() {\n if (css) {\n name = create_rule(node, 0, 1, duration, delay, easing, css);\n }\n if (!delay) {\n started = true;\n }\n }\n function stop() {\n if (css)\n delete_rule(node, name);\n running = false;\n }\n loop(now => {\n if (!started && now >= start_time) {\n started = true;\n }\n if (started && now >= end) {\n tick(1, 0);\n stop();\n }\n if (!running) {\n return false;\n }\n if (started) {\n const p = now - start_time;\n const t = 0 + 1 * easing(p / duration);\n tick(t, 1 - t);\n }\n return true;\n });\n start();\n tick(0, 1);\n return stop;\n}\nfunction fix_position(node) {\n const style = getComputedStyle(node);\n if (style.position !== 'absolute' && style.position !== 'fixed') {\n const { width, height } = style;\n const a = node.getBoundingClientRect();\n node.style.position = 'absolute';\n node.style.width = width;\n node.style.height = height;\n add_transform(node, a);\n }\n}\nfunction add_transform(node, a) {\n const b = node.getBoundingClientRect();\n if (a.left !== b.left || a.top !== b.top) {\n const style = getComputedStyle(node);\n const transform = style.transform === 'none' ? '' : style.transform;\n node.style.transform = `${transform} translate(${a.left - b.left}px, ${a.top - b.top}px)`;\n }\n}\n\nlet current_component;\nfunction set_current_component(component) {\n current_component = component;\n}\nfunction get_current_component() {\n if (!current_component)\n throw new Error('Function called outside component initialization');\n return current_component;\n}\nfunction beforeUpdate(fn) {\n get_current_component().$$.before_update.push(fn);\n}\nfunction onMount(fn) {\n get_current_component().$$.on_mount.push(fn);\n}\nfunction afterUpdate(fn) {\n get_current_component().$$.after_update.push(fn);\n}\nfunction onDestroy(fn) {\n get_current_component().$$.on_destroy.push(fn);\n}\nfunction createEventDispatcher() {\n const component = get_current_component();\n return (type, detail) => {\n const callbacks = component.$$.callbacks[type];\n if (callbacks) {\n // TODO are there situations where events could be dispatched\n // in a server (non-DOM) environment?\n const event = custom_event(type, detail);\n callbacks.slice().forEach(fn => {\n fn.call(component, event);\n });\n }\n };\n}\nfunction setContext(key, context) {\n get_current_component().$$.context.set(key, context);\n}\nfunction getContext(key) {\n return get_current_component().$$.context.get(key);\n}\nfunction getAllContexts() {\n return get_current_component().$$.context;\n}\nfunction hasContext(key) {\n return get_current_component().$$.context.has(key);\n}\n// TODO figure out if we still want to support\n// shorthand events, or if we want to implement\n// a real bubbling mechanism\nfunction bubble(component, event) {\n const callbacks = component.$$.callbacks[event.type];\n if (callbacks) {\n // @ts-ignore\n callbacks.slice().forEach(fn => fn.call(this, event));\n }\n}\n\nconst dirty_components = [];\nconst intros = { enabled: false };\nconst binding_callbacks = [];\nconst render_callbacks = [];\nconst flush_callbacks = [];\nconst resolved_promise = Promise.resolve();\nlet update_scheduled = false;\nfunction schedule_update() {\n if (!update_scheduled) {\n update_scheduled = true;\n resolved_promise.then(flush);\n }\n}\nfunction tick() {\n schedule_update();\n return resolved_promise;\n}\nfunction add_render_callback(fn) {\n render_callbacks.push(fn);\n}\nfunction add_flush_callback(fn) {\n flush_callbacks.push(fn);\n}\n// flush() calls callbacks in this order:\n// 1. All beforeUpdate callbacks, in order: parents before children\n// 2. All bind:this callbacks, in reverse order: children before parents.\n// 3. All afterUpdate callbacks, in order: parents before children. EXCEPT\n// for afterUpdates called during the initial onMount, which are called in\n// reverse order: children before parents.\n// Since callbacks might update component values, which could trigger another\n// call to flush(), the following steps guard against this:\n// 1. During beforeUpdate, any updated components will be added to the\n// dirty_components array and will cause a reentrant call to flush(). Because\n// the flush index is kept outside the function, the reentrant call will pick\n// up where the earlier call left off and go through all dirty components. The\n// current_component value is saved and restored so that the reentrant call will\n// not interfere with the \"parent\" flush() call.\n// 2. bind:this callbacks cannot trigger new flush() calls.\n// 3. During afterUpdate, any updated components will NOT have their afterUpdate\n// callback called a second time; the seen_callbacks set, outside the flush()\n// function, guarantees this behavior.\nconst seen_callbacks = new Set();\nlet flushidx = 0; // Do *not* move this inside the flush() function\nfunction flush() {\n const saved_component = current_component;\n do {\n // first, call beforeUpdate functions\n // and update components\n while (flushidx < dirty_components.length) {\n const component = dirty_components[flushidx];\n flushidx++;\n set_current_component(component);\n update(component.$$);\n }\n set_current_component(null);\n dirty_components.length = 0;\n flushidx = 0;\n while (binding_callbacks.length)\n binding_callbacks.pop()();\n // then, once components are updated, call\n // afterUpdate functions. This may cause\n // subsequent updates...\n for (let i = 0; i < render_callbacks.length; i += 1) {\n const callback = render_callbacks[i];\n if (!seen_callbacks.has(callback)) {\n // ...so guard against infinite loops\n seen_callbacks.add(callback);\n callback();\n }\n }\n render_callbacks.length = 0;\n } while (dirty_components.length);\n while (flush_callbacks.length) {\n flush_callbacks.pop()();\n }\n update_scheduled = false;\n seen_callbacks.clear();\n set_current_component(saved_component);\n}\nfunction update($$) {\n if ($$.fragment !== null) {\n $$.update();\n run_all($$.before_update);\n const dirty = $$.dirty;\n $$.dirty = [-1];\n $$.fragment && $$.fragment.p($$.ctx, dirty);\n $$.after_update.forEach(add_render_callback);\n }\n}\n\nlet promise;\nfunction wait() {\n if (!promise) {\n promise = Promise.resolve();\n promise.then(() => {\n promise = null;\n });\n }\n return promise;\n}\nfunction dispatch(node, direction, kind) {\n node.dispatchEvent(custom_event(`${direction ? 'intro' : 'outro'}${kind}`));\n}\nconst outroing = new Set();\nlet outros;\nfunction group_outros() {\n outros = {\n r: 0,\n c: [],\n p: outros // parent group\n };\n}\nfunction check_outros() {\n if (!outros.r) {\n run_all(outros.c);\n }\n outros = outros.p;\n}\nfunction transition_in(block, local) {\n if (block && block.i) {\n outroing.delete(block);\n block.i(local);\n }\n}\nfunction transition_out(block, local, detach, callback) {\n if (block && block.o) {\n if (outroing.has(block))\n return;\n outroing.add(block);\n outros.c.push(() => {\n outroing.delete(block);\n if (callback) {\n if (detach)\n block.d(1);\n callback();\n }\n });\n block.o(local);\n }\n}\nconst null_transition = { duration: 0 };\nfunction create_in_transition(node, fn, params) {\n let config = fn(node, params);\n let running = false;\n let animation_name;\n let task;\n let uid = 0;\n function cleanup() {\n if (animation_name)\n delete_rule(node, animation_name);\n }\n function go() {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n if (css)\n animation_name = create_rule(node, 0, 1, duration, delay, easing, css, uid++);\n tick(0, 1);\n const start_time = now() + delay;\n const end_time = start_time + duration;\n if (task)\n task.abort();\n running = true;\n add_render_callback(() => dispatch(node, true, 'start'));\n task = loop(now => {\n if (running) {\n if (now >= end_time) {\n tick(1, 0);\n dispatch(node, true, 'end');\n cleanup();\n return running = false;\n }\n if (now >= start_time) {\n const t = easing((now - start_time) / duration);\n tick(t, 1 - t);\n }\n }\n return running;\n });\n }\n let started = false;\n return {\n start() {\n if (started)\n return;\n started = true;\n delete_rule(node);\n if (is_function(config)) {\n config = config();\n wait().then(go);\n }\n else {\n go();\n }\n },\n invalidate() {\n started = false;\n },\n end() {\n if (running) {\n cleanup();\n running = false;\n }\n }\n };\n}\nfunction create_out_transition(node, fn, params) {\n let config = fn(node, params);\n let running = true;\n let animation_name;\n const group = outros;\n group.r += 1;\n function go() {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n if (css)\n animation_name = create_rule(node, 1, 0, duration, delay, easing, css);\n const start_time = now() + delay;\n const end_time = start_time + duration;\n add_render_callback(() => dispatch(node, false, 'start'));\n loop(now => {\n if (running) {\n if (now >= end_time) {\n tick(0, 1);\n dispatch(node, false, 'end');\n if (!--group.r) {\n // this will result in `end()` being called,\n // so we don't need to clean up here\n run_all(group.c);\n }\n return false;\n }\n if (now >= start_time) {\n const t = easing((now - start_time) / duration);\n tick(1 - t, t);\n }\n }\n return running;\n });\n }\n if (is_function(config)) {\n wait().then(() => {\n // @ts-ignore\n config = config();\n go();\n });\n }\n else {\n go();\n }\n return {\n end(reset) {\n if (reset && config.tick) {\n config.tick(1, 0);\n }\n if (running) {\n if (animation_name)\n delete_rule(node, animation_name);\n running = false;\n }\n }\n };\n}\nfunction create_bidirectional_transition(node, fn, params, intro) {\n let config = fn(node, params);\n let t = intro ? 0 : 1;\n let running_program = null;\n let pending_program = null;\n let animation_name = null;\n function clear_animation() {\n if (animation_name)\n delete_rule(node, animation_name);\n }\n function init(program, duration) {\n const d = (program.b - t);\n duration *= Math.abs(d);\n return {\n a: t,\n b: program.b,\n d,\n duration,\n start: program.start,\n end: program.start + duration,\n group: program.group\n };\n }\n function go(b) {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n const program = {\n start: now() + delay,\n b\n };\n if (!b) {\n // @ts-ignore todo: improve typings\n program.group = outros;\n outros.r += 1;\n }\n if (running_program || pending_program) {\n pending_program = program;\n }\n else {\n // if this is an intro, and there's a delay, we need to do\n // an initial tick and/or apply CSS animation immediately\n if (css) {\n clear_animation();\n animation_name = create_rule(node, t, b, duration, delay, easing, css);\n }\n if (b)\n tick(0, 1);\n running_program = init(program, duration);\n add_render_callback(() => dispatch(node, b, 'start'));\n loop(now => {\n if (pending_program && now > pending_program.start) {\n running_program = init(pending_program, duration);\n pending_program = null;\n dispatch(node, running_program.b, 'start');\n if (css) {\n clear_animation();\n animation_name = create_rule(node, t, running_program.b, running_program.duration, 0, easing, config.css);\n }\n }\n if (running_program) {\n if (now >= running_program.end) {\n tick(t = running_program.b, 1 - t);\n dispatch(node, running_program.b, 'end');\n if (!pending_program) {\n // we're done\n if (running_program.b) {\n // intro — we can tidy up immediately\n clear_animation();\n }\n else {\n // outro — needs to be coordinated\n if (!--running_program.group.r)\n run_all(running_program.group.c);\n }\n }\n running_program = null;\n }\n else if (now >= running_program.start) {\n const p = now - running_program.start;\n t = running_program.a + running_program.d * easing(p / running_program.duration);\n tick(t, 1 - t);\n }\n }\n return !!(running_program || pending_program);\n });\n }\n }\n return {\n run(b) {\n if (is_function(config)) {\n wait().then(() => {\n // @ts-ignore\n config = config();\n go(b);\n });\n }\n else {\n go(b);\n }\n },\n end() {\n clear_animation();\n running_program = pending_program = null;\n }\n };\n}\n\nfunction handle_promise(promise, info) {\n const token = info.token = {};\n function update(type, index, key, value) {\n if (info.token !== token)\n return;\n info.resolved = value;\n let child_ctx = info.ctx;\n if (key !== undefined) {\n child_ctx = child_ctx.slice();\n child_ctx[key] = value;\n }\n const block = type && (info.current = type)(child_ctx);\n let needs_flush = false;\n if (info.block) {\n if (info.blocks) {\n info.blocks.forEach((block, i) => {\n if (i !== index && block) {\n group_outros();\n transition_out(block, 1, 1, () => {\n if (info.blocks[i] === block) {\n info.blocks[i] = null;\n }\n });\n check_outros();\n }\n });\n }\n else {\n info.block.d(1);\n }\n block.c();\n transition_in(block, 1);\n block.m(info.mount(), info.anchor);\n needs_flush = true;\n }\n info.block = block;\n if (info.blocks)\n info.blocks[index] = block;\n if (needs_flush) {\n flush();\n }\n }\n if (is_promise(promise)) {\n const current_component = get_current_component();\n promise.then(value => {\n set_current_component(current_component);\n update(info.then, 1, info.value, value);\n set_current_component(null);\n }, error => {\n set_current_component(current_component);\n update(info.catch, 2, info.error, error);\n set_current_component(null);\n if (!info.hasCatch) {\n throw error;\n }\n });\n // if we previously had a then/catch block, destroy it\n if (info.current !== info.pending) {\n update(info.pending, 0);\n return true;\n }\n }\n else {\n if (info.current !== info.then) {\n update(info.then, 1, info.value, promise);\n return true;\n }\n info.resolved = promise;\n }\n}\nfunction update_await_block_branch(info, ctx, dirty) {\n const child_ctx = ctx.slice();\n const { resolved } = info;\n if (info.current === info.then) {\n child_ctx[info.value] = resolved;\n }\n if (info.current === info.catch) {\n child_ctx[info.error] = resolved;\n }\n info.block.p(child_ctx, dirty);\n}\n\nconst globals = (typeof window !== 'undefined'\n ? window\n : typeof globalThis !== 'undefined'\n ? globalThis\n : global);\n\nfunction destroy_block(block, lookup) {\n block.d(1);\n lookup.delete(block.key);\n}\nfunction outro_and_destroy_block(block, lookup) {\n transition_out(block, 1, 1, () => {\n lookup.delete(block.key);\n });\n}\nfunction fix_and_destroy_block(block, lookup) {\n block.f();\n destroy_block(block, lookup);\n}\nfunction fix_and_outro_and_destroy_block(block, lookup) {\n block.f();\n outro_and_destroy_block(block, lookup);\n}\nfunction update_keyed_each(old_blocks, dirty, get_key, dynamic, ctx, list, lookup, node, destroy, create_each_block, next, get_context) {\n let o = old_blocks.length;\n let n = list.length;\n let i = o;\n const old_indexes = {};\n while (i--)\n old_indexes[old_blocks[i].key] = i;\n const new_blocks = [];\n const new_lookup = new Map();\n const deltas = new Map();\n i = n;\n while (i--) {\n const child_ctx = get_context(ctx, list, i);\n const key = get_key(child_ctx);\n let block = lookup.get(key);\n if (!block) {\n block = create_each_block(key, child_ctx);\n block.c();\n }\n else if (dynamic) {\n block.p(child_ctx, dirty);\n }\n new_lookup.set(key, new_blocks[i] = block);\n if (key in old_indexes)\n deltas.set(key, Math.abs(i - old_indexes[key]));\n }\n const will_move = new Set();\n const did_move = new Set();\n function insert(block) {\n transition_in(block, 1);\n block.m(node, next);\n lookup.set(block.key, block);\n next = block.first;\n n--;\n }\n while (o && n) {\n const new_block = new_blocks[n - 1];\n const old_block = old_blocks[o - 1];\n const new_key = new_block.key;\n const old_key = old_block.key;\n if (new_block === old_block) {\n // do nothing\n next = new_block.first;\n o--;\n n--;\n }\n else if (!new_lookup.has(old_key)) {\n // remove old block\n destroy(old_block, lookup);\n o--;\n }\n else if (!lookup.has(new_key) || will_move.has(new_key)) {\n insert(new_block);\n }\n else if (did_move.has(old_key)) {\n o--;\n }\n else if (deltas.get(new_key) > deltas.get(old_key)) {\n did_move.add(new_key);\n insert(new_block);\n }\n else {\n will_move.add(old_key);\n o--;\n }\n }\n while (o--) {\n const old_block = old_blocks[o];\n if (!new_lookup.has(old_block.key))\n destroy(old_block, lookup);\n }\n while (n)\n insert(new_blocks[n - 1]);\n return new_blocks;\n}\nfunction validate_each_keys(ctx, list, get_context, get_key) {\n const keys = new Set();\n for (let i = 0; i < list.length; i++) {\n const key = get_key(get_context(ctx, list, i));\n if (keys.has(key)) {\n throw new Error('Cannot have duplicate keys in a keyed each');\n }\n keys.add(key);\n }\n}\n\nfunction get_spread_update(levels, updates) {\n const update = {};\n const to_null_out = {};\n const accounted_for = { $$scope: 1 };\n let i = levels.length;\n while (i--) {\n const o = levels[i];\n const n = updates[i];\n if (n) {\n for (const key in o) {\n if (!(key in n))\n to_null_out[key] = 1;\n }\n for (const key in n) {\n if (!accounted_for[key]) {\n update[key] = n[key];\n accounted_for[key] = 1;\n }\n }\n levels[i] = n;\n }\n else {\n for (const key in o) {\n accounted_for[key] = 1;\n }\n }\n }\n for (const key in to_null_out) {\n if (!(key in update))\n update[key] = undefined;\n }\n return update;\n}\nfunction get_spread_object(spread_props) {\n return typeof spread_props === 'object' && spread_props !== null ? spread_props : {};\n}\n\n// source: https://html.spec.whatwg.org/multipage/indices.html\nconst boolean_attributes = new Set([\n 'allowfullscreen',\n 'allowpaymentrequest',\n 'async',\n 'autofocus',\n 'autoplay',\n 'checked',\n 'controls',\n 'default',\n 'defer',\n 'disabled',\n 'formnovalidate',\n 'hidden',\n 'ismap',\n 'loop',\n 'multiple',\n 'muted',\n 'nomodule',\n 'novalidate',\n 'open',\n 'playsinline',\n 'readonly',\n 'required',\n 'reversed',\n 'selected'\n]);\n\nconst invalid_attribute_name_character = /[\\s'\">/=\\u{FDD0}-\\u{FDEF}\\u{FFFE}\\u{FFFF}\\u{1FFFE}\\u{1FFFF}\\u{2FFFE}\\u{2FFFF}\\u{3FFFE}\\u{3FFFF}\\u{4FFFE}\\u{4FFFF}\\u{5FFFE}\\u{5FFFF}\\u{6FFFE}\\u{6FFFF}\\u{7FFFE}\\u{7FFFF}\\u{8FFFE}\\u{8FFFF}\\u{9FFFE}\\u{9FFFF}\\u{AFFFE}\\u{AFFFF}\\u{BFFFE}\\u{BFFFF}\\u{CFFFE}\\u{CFFFF}\\u{DFFFE}\\u{DFFFF}\\u{EFFFE}\\u{EFFFF}\\u{FFFFE}\\u{FFFFF}\\u{10FFFE}\\u{10FFFF}]/u;\n// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\n// https://infra.spec.whatwg.org/#noncharacter\nfunction spread(args, classes_to_add) {\n const attributes = Object.assign({}, ...args);\n if (classes_to_add) {\n if (attributes.class == null) {\n attributes.class = classes_to_add;\n }\n else {\n attributes.class += ' ' + classes_to_add;\n }\n }\n let str = '';\n Object.keys(attributes).forEach(name => {\n if (invalid_attribute_name_character.test(name))\n return;\n const value = attributes[name];\n if (value === true)\n str += ' ' + name;\n else if (boolean_attributes.has(name.toLowerCase())) {\n if (value)\n str += ' ' + name;\n }\n else if (value != null) {\n str += ` ${name}=\"${value}\"`;\n }\n });\n return str;\n}\nconst escaped = {\n '\"': '"',\n \"'\": ''',\n '&': '&',\n '<': '<',\n '>': '>'\n};\nfunction escape(html) {\n return String(html).replace(/[\"'&<>]/g, match => escaped[match]);\n}\nfunction escape_attribute_value(value) {\n return typeof value === 'string' ? escape(value) : value;\n}\nfunction escape_object(obj) {\n const result = {};\n for (const key in obj) {\n result[key] = escape_attribute_value(obj[key]);\n }\n return result;\n}\nfunction each(items, fn) {\n let str = '';\n for (let i = 0; i < items.length; i += 1) {\n str += fn(items[i], i);\n }\n return str;\n}\nconst missing_component = {\n $$render: () => ''\n};\nfunction validate_component(component, name) {\n if (!component || !component.$$render) {\n if (name === 'svelte:component')\n name += ' this={...}';\n throw new Error(`<${name}> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules`);\n }\n return component;\n}\nfunction debug(file, line, column, values) {\n console.log(`{@debug} ${file ? file + ' ' : ''}(${line}:${column})`); // eslint-disable-line no-console\n console.log(values); // eslint-disable-line no-console\n return '';\n}\nlet on_destroy;\nfunction create_ssr_component(fn) {\n function $$render(result, props, bindings, slots, context) {\n const parent_component = current_component;\n const $$ = {\n on_destroy,\n context: new Map(context || (parent_component ? parent_component.$$.context : [])),\n // these will be immediately discarded\n on_mount: [],\n before_update: [],\n after_update: [],\n callbacks: blank_object()\n };\n set_current_component({ $$ });\n const html = fn(result, props, bindings, slots);\n set_current_component(parent_component);\n return html;\n }\n return {\n render: (props = {}, { $$slots = {}, context = new Map() } = {}) => {\n on_destroy = [];\n const result = { title: '', head: '', css: new Set() };\n const html = $$render(result, props, {}, $$slots, context);\n run_all(on_destroy);\n return {\n html,\n css: {\n code: Array.from(result.css).map(css => css.code).join('\\n'),\n map: null // TODO\n },\n head: result.title + result.head\n };\n },\n $$render\n };\n}\nfunction add_attribute(name, value, boolean) {\n if (value == null || (boolean && !value))\n return '';\n return ` ${name}${value === true ? '' : `=${typeof value === 'string' ? JSON.stringify(escape(value)) : `\"${value}\"`}`}`;\n}\nfunction add_classes(classes) {\n return classes ? ` class=\"${classes}\"` : '';\n}\n\nfunction bind(component, name, callback) {\n const index = component.$$.props[name];\n if (index !== undefined) {\n component.$$.bound[index] = callback;\n callback(component.$$.ctx[index]);\n }\n}\nfunction create_component(block) {\n block && block.c();\n}\nfunction claim_component(block, parent_nodes) {\n block && block.l(parent_nodes);\n}\nfunction mount_component(component, target, anchor, customElement) {\n const { fragment, on_mount, on_destroy, after_update } = component.$$;\n fragment && fragment.m(target, anchor);\n if (!customElement) {\n // onMount happens before the initial afterUpdate\n add_render_callback(() => {\n const new_on_destroy = on_mount.map(run).filter(is_function);\n if (on_destroy) {\n on_destroy.push(...new_on_destroy);\n }\n else {\n // Edge case - component was destroyed immediately,\n // most likely as a result of a binding initialising\n run_all(new_on_destroy);\n }\n component.$$.on_mount = [];\n });\n }\n after_update.forEach(add_render_callback);\n}\nfunction destroy_component(component, detaching) {\n const $$ = component.$$;\n if ($$.fragment !== null) {\n run_all($$.on_destroy);\n $$.fragment && $$.fragment.d(detaching);\n // TODO null out other refs, including component.$$ (but need to\n // preserve final state?)\n $$.on_destroy = $$.fragment = null;\n $$.ctx = [];\n }\n}\nfunction make_dirty(component, i) {\n if (component.$$.dirty[0] === -1) {\n dirty_components.push(component);\n schedule_update();\n component.$$.dirty.fill(0);\n }\n component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31));\n}\nfunction init(component, options, instance, create_fragment, not_equal, props, append_styles, dirty = [-1]) {\n const parent_component = current_component;\n set_current_component(component);\n const $$ = component.$$ = {\n fragment: null,\n ctx: null,\n // state\n props,\n update: noop,\n not_equal,\n bound: blank_object(),\n // lifecycle\n on_mount: [],\n on_destroy: [],\n on_disconnect: [],\n before_update: [],\n after_update: [],\n context: new Map(options.context || (parent_component ? parent_component.$$.context : [])),\n // everything else\n callbacks: blank_object(),\n dirty,\n skip_bound: false,\n root: options.target || parent_component.$$.root\n };\n append_styles && append_styles($$.root);\n let ready = false;\n $$.ctx = instance\n ? instance(component, options.props || {}, (i, ret, ...rest) => {\n const value = rest.length ? rest[0] : ret;\n if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) {\n if (!$$.skip_bound && $$.bound[i])\n $$.bound[i](value);\n if (ready)\n make_dirty(component, i);\n }\n return ret;\n })\n : [];\n $$.update();\n ready = true;\n run_all($$.before_update);\n // `false` as a special case of no DOM component\n $$.fragment = create_fragment ? create_fragment($$.ctx) : false;\n if (options.target) {\n if (options.hydrate) {\n start_hydrating();\n const nodes = children(options.target);\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.l(nodes);\n nodes.forEach(detach);\n }\n else {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.c();\n }\n if (options.intro)\n transition_in(component.$$.fragment);\n mount_component(component, options.target, options.anchor, options.customElement);\n end_hydrating();\n flush();\n }\n set_current_component(parent_component);\n}\nlet SvelteElement;\nif (typeof HTMLElement === 'function') {\n SvelteElement = class extends HTMLElement {\n constructor() {\n super();\n this.attachShadow({ mode: 'open' });\n }\n connectedCallback() {\n const { on_mount } = this.$$;\n this.$$.on_disconnect = on_mount.map(run).filter(is_function);\n // @ts-ignore todo: improve typings\n for (const key in this.$$.slotted) {\n // @ts-ignore todo: improve typings\n this.appendChild(this.$$.slotted[key]);\n }\n }\n attributeChangedCallback(attr, _oldValue, newValue) {\n this[attr] = newValue;\n }\n disconnectedCallback() {\n run_all(this.$$.on_disconnect);\n }\n $destroy() {\n destroy_component(this, 1);\n this.$destroy = noop;\n }\n $on(type, callback) {\n // TODO should this delegate to addEventListener?\n const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n callbacks.push(callback);\n return () => {\n const index = callbacks.indexOf(callback);\n if (index !== -1)\n callbacks.splice(index, 1);\n };\n }\n $set($$props) {\n if (this.$$set && !is_empty($$props)) {\n this.$$.skip_bound = true;\n this.$$set($$props);\n this.$$.skip_bound = false;\n }\n }\n };\n}\n/**\n * Base class for Svelte components. Used when dev=false.\n */\nclass SvelteComponent {\n $destroy() {\n destroy_component(this, 1);\n this.$destroy = noop;\n }\n $on(type, callback) {\n const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n callbacks.push(callback);\n return () => {\n const index = callbacks.indexOf(callback);\n if (index !== -1)\n callbacks.splice(index, 1);\n };\n }\n $set($$props) {\n if (this.$$set && !is_empty($$props)) {\n this.$$.skip_bound = true;\n this.$$set($$props);\n this.$$.skip_bound = false;\n }\n }\n}\n\nfunction dispatch_dev(type, detail) {\n document.dispatchEvent(custom_event(type, Object.assign({ version: '3.44.3' }, detail), true));\n}\nfunction append_dev(target, node) {\n dispatch_dev('SvelteDOMInsert', { target, node });\n append(target, node);\n}\nfunction append_hydration_dev(target, node) {\n dispatch_dev('SvelteDOMInsert', { target, node });\n append_hydration(target, node);\n}\nfunction insert_dev(target, node, anchor) {\n dispatch_dev('SvelteDOMInsert', { target, node, anchor });\n insert(target, node, anchor);\n}\nfunction insert_hydration_dev(target, node, anchor) {\n dispatch_dev('SvelteDOMInsert', { target, node, anchor });\n insert_hydration(target, node, anchor);\n}\nfunction detach_dev(node) {\n dispatch_dev('SvelteDOMRemove', { node });\n detach(node);\n}\nfunction detach_between_dev(before, after) {\n while (before.nextSibling && before.nextSibling !== after) {\n detach_dev(before.nextSibling);\n }\n}\nfunction detach_before_dev(after) {\n while (after.previousSibling) {\n detach_dev(after.previousSibling);\n }\n}\nfunction detach_after_dev(before) {\n while (before.nextSibling) {\n detach_dev(before.nextSibling);\n }\n}\nfunction listen_dev(node, event, handler, options, has_prevent_default, has_stop_propagation) {\n const modifiers = options === true ? ['capture'] : options ? Array.from(Object.keys(options)) : [];\n if (has_prevent_default)\n modifiers.push('preventDefault');\n if (has_stop_propagation)\n modifiers.push('stopPropagation');\n dispatch_dev('SvelteDOMAddEventListener', { node, event, handler, modifiers });\n const dispose = listen(node, event, handler, options);\n return () => {\n dispatch_dev('SvelteDOMRemoveEventListener', { node, event, handler, modifiers });\n dispose();\n };\n}\nfunction attr_dev(node, attribute, value) {\n attr(node, attribute, value);\n if (value == null)\n dispatch_dev('SvelteDOMRemoveAttribute', { node, attribute });\n else\n dispatch_dev('SvelteDOMSetAttribute', { node, attribute, value });\n}\nfunction prop_dev(node, property, value) {\n node[property] = value;\n dispatch_dev('SvelteDOMSetProperty', { node, property, value });\n}\nfunction dataset_dev(node, property, value) {\n node.dataset[property] = value;\n dispatch_dev('SvelteDOMSetDataset', { node, property, value });\n}\nfunction set_data_dev(text, data) {\n data = '' + data;\n if (text.wholeText === data)\n return;\n dispatch_dev('SvelteDOMSetData', { node: text, data });\n text.data = data;\n}\nfunction validate_each_argument(arg) {\n if (typeof arg !== 'string' && !(arg && typeof arg === 'object' && 'length' in arg)) {\n let msg = '{#each} only iterates over array-like objects.';\n if (typeof Symbol === 'function' && arg && Symbol.iterator in arg) {\n msg += ' You can use a spread to convert this iterable into an array.';\n }\n throw new Error(msg);\n }\n}\nfunction validate_slots(name, slot, keys) {\n for (const slot_key of Object.keys(slot)) {\n if (!~keys.indexOf(slot_key)) {\n console.warn(`<${name}> received an unexpected slot \"${slot_key}\".`);\n }\n }\n}\n/**\n * Base class for Svelte components with some minor dev-enhancements. Used when dev=true.\n */\nclass SvelteComponentDev extends SvelteComponent {\n constructor(options) {\n if (!options || (!options.target && !options.$$inline)) {\n throw new Error(\"'target' is a required option\");\n }\n super();\n }\n $destroy() {\n super.$destroy();\n this.$destroy = () => {\n console.warn('Component was already destroyed'); // eslint-disable-line no-console\n };\n }\n $capture_state() { }\n $inject_state() { }\n}\n/**\n * Base class to create strongly typed Svelte components.\n * This only exists for typing purposes and should be used in `.d.ts` files.\n *\n * ### Example:\n *\n * You have component library on npm called `component-library`, from which\n * you export a component called `MyComponent`. For Svelte+TypeScript users,\n * you want to provide typings. Therefore you create a `index.d.ts`:\n * ```ts\n * import { SvelteComponentTyped } from \"svelte\";\n * export class MyComponent extends SvelteComponentTyped<{foo: string}> {}\n * ```\n * Typing this makes it possible for IDEs like VS Code with the Svelte extension\n * to provide intellisense and to use the component like this in a Svelte file\n * with TypeScript:\n * ```svelte\n * <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_transform, afterUpdate, append, append_dev, append_empty_stylesheet, append_hydration, append_hydration_dev, append_styles, assign, attr, attr_dev, attribute_to_object, beforeUpdate, bind, binding_callbacks, blank_object, bubble, check_outros, children, claim_component, claim_element, claim_html_tag, claim_space, claim_svg_element, claim_text, clear_loops, component_subscribe, compute_rest_props, compute_slots, createEventDispatcher, create_animation, create_bidirectional_transition, create_component, create_in_transition, create_out_transition, create_slot, create_ssr_component, current_component, custom_event, dataset_dev, debug, destroy_block, destroy_component, destroy_each, detach, detach_after_dev, detach_before_dev, detach_between_dev, detach_dev, dirty_components, dispatch_dev, each, element, element_is, empty, end_hydrating, escape, escape_attribute_value, escape_object, escaped, exclude_internal_props, fix_and_destroy_block, fix_and_outro_and_destroy_block, fix_position, flush, getAllContexts, getContext, get_all_dirty_from_scope, get_binding_group_value, get_current_component, get_custom_elements_slots, get_root_for_style, get_slot_changes, get_spread_object, get_spread_update, get_store_value, globals, group_outros, handle_promise, hasContext, has_prop, identity, init, insert, insert_dev, insert_hydration, insert_hydration_dev, intros, invalid_attribute_name_character, is_client, is_crossorigin, is_empty, is_function, is_promise, listen, listen_dev, loop, loop_guard, missing_component, mount_component, noop, not_equal, now, null_to_empty, object_without_properties, onDestroy, onMount, once, outro_and_destroy_block, prevent_default, prop_dev, query_selector_all, raf, run, run_all, safe_not_equal, schedule_update, select_multiple_value, select_option, select_options, select_value, self, setContext, set_attributes, set_current_component, set_custom_element_data, set_data, set_data_dev, set_input_type, set_input_value, set_now, set_raf, set_store_value, set_style, set_svg_attributes, space, spread, src_url_equal, start_hydrating, stop_propagation, subscribe, svg_element, text, tick, time_ranges_to_array, to_number, toggle_class, transition_in, transition_out, trusted, update_await_block_branch, update_keyed_each, update_slot, update_slot_base, validate_component, validate_each_argument, validate_each_keys, validate_slots, validate_store, xlink_attr };\n","const random_string = (length) => {\r\n \"undefined\"==typeof length&&(length=6);for(var result=\"\",characters=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\",charactersLength=characters.length,i=0;i<length;i++)result+=characters.charAt(Math.floor(Math.random()*charactersLength));\r\n return result;\r\n}\r\n\r\nexport {random_string};","<script>\r\nimport BulmaStyles from './BulmaStyles.svelte';\r\nimport { linkCSS } from \"./libraries/linkCSS\";\r\n// svelte CSS global variables\r\n\r\nlinkCSS([\r\n \"https://fonts.googleapis.com/css2?family=Montserrat:wght@200;400;500;600;700&display=swap\",\r\n \"https://use.fontawesome.com/releases/v5.15.1/css/all.css\"\r\n]);\r\n</script>\r\n<BulmaStyles />\r\n<style>\r\n/**\r\n* global styles.\r\n*/\r\n:global(:root){\r\n\t--color-primary: #344fff;\r\n\t--color-info: #51527c;\r\n\t--color-yellow: #FDE203;\r\n\t--color-light-grey: #657786;\r\n\t--color-normal-grey: #eff1ff;\r\n\t--color-dark-grey: #415B76;\r\n\t--color-green: #34de80;\r\n\t--color-beige-light: #f5f5f5;\r\n\t--color-beige-lighter: #f5f5f5;\r\n\t--color-link: #00ffff;\r\n\t--color-red: #f72e2e;\r\n\t--color-white: #ffffff;\r\n\t--color-purple: #8033ff;\r\n\t--color-black-bis: #292929;\r\n}\r\n:global(.fw100){font-weight: 100 !important;}\r\n:global(.fw200){font-weight: 200 !important;}\r\n:global(.fw300){font-weight: 300 !important;}\r\n:global(.fw400){font-weight: 400 !important;}\r\n:global(.fw500){font-weight: 500 !important;}\r\n:global(.fw600){font-weight: 600 !important;}\r\n:global(.fw700){font-weight: 700 !important;}\r\n:global(.fw800){font-weight: 800 !important;}\r\n:global(.fw900){font-weight: 900 !important;}\r\n:global(input.input){\r\n\tborder: 1px solid #acb8c2;\r\n}\r\n:global(input.is-hovered.is-rounded), :global(button.button), :global(input.input), :global(.select select){\r\n\tborder: 1px solid #AAB8C2;\r\n}\r\n:global(input.is-hovered.is-rounded:focus), :global(button.button:focus), :global(input.input:focus), :global(.select select:focus){\r\n\tborder: 1px solid var(--color-primary);\r\n box-shadow: inherit;\r\n}\r\n:global(.box){\r\n\tborder-radius: 20px !important;\r\n box-shadow: 5px 5px 32px rgb(205 205 205 / 29%);\r\n}\r\n:global(.pointer){\r\n\tcursor: pointer;\r\n}\r\n:global(.label-text){\r\n margin-left: 0.80rem;\r\n}\r\n:global(.svelte-module button[type=\"submit\"].is-success), :global(.svelte-module .button-success-3pod){\r\n background: transparent linear-gradient(180deg, #35EB00 0%, #3DCC14 100%) 0% 0% no-repeat padding-box;\r\n}\r\n:global(.svelte-module button[type=\"submit\"].is-primary), :global(.svelte-module .button-primary-3pod){\r\n background: transparent linear-gradient(180deg, #15B8FF 0%, #296FFF 100%) 0% 0% no-repeat padding-box;\r\n}\r\n:global(.svelte-module button.is-primary.outlined-white), :global(.svelte-module button.outlined-white){\r\n border: 1px solid #fff;\r\n}\r\n\r\n:global(form button[type=\"submit\"]:not(.button-default):not(.default)){\r\n padding: 1.45rem 4.25rem;\r\n}\r\n:global(.has-shadow){\r\n box-shadow: 5px 5px 32px rgb(205 205 205 / 29%);\r\n}\r\n:global(.tag.is-primary.tripod), :global(.button.is-primary.tripod), :global(.button.is-primary.tripod:hover){\r\n background: transparent linear-gradient(8deg, #344fff 7%, #09E2FF 100%) 0% 0% no-repeat padding-box;\r\n}\r\n:global(.progress[value]::-webkit-progress-value){\r\n background: transparent linear-gradient(90deg, #344FFF 0%, #09E2FF 100%) 0% 0% no-repeat padding-box;\r\n}\r\n:global(.progress-bar progress){\r\n\tborder: 1px solid rgba(0,0,0,0.15);\r\n}\r\n:global(.progress-bar progress::-webkit-progress-bar) {\r\n background-color: transparent;\r\n}\r\n:global(.progress-bar){\r\n margin-top: 1.25rem !important;\r\n padding: 1rem 0;\r\n position: relative;\r\n width: 100%;\r\n margin: auto;\r\n}\r\n:global(.steps-texts){\r\n position: absolute;\r\n width: 100%;\r\n text-align: center;\r\n top: 1rem;\r\n left: 0.45rem;\r\n}\r\n</style>","import { random_string } from \"./random_string\";\r\nfunction linkCSS(urls){\r\n urls.map(( url )=>{\r\n var head = document.getElementsByTagName('head')[0];\r\n var link = document.createElement('link');\r\n link.id = \"css--exported-\"+random_string(6);\r\n link.rel = 'stylesheet';\r\n link.type = 'text/css';\r\n link.href = url;\r\n link.media = 'all';\r\n head.appendChild(link);\r\n })\r\n}\r\n\r\nexport {linkCSS};","import { noop, safe_not_equal, subscribe, run_all, is_function } from '../internal/index.mjs';\nexport { get_store_value as get } from '../internal/index.mjs';\n\nconst subscriber_queue = [];\n/**\n * Creates a `Readable` store that allows reading by subscription.\n * @param value initial value\n * @param {StartStopNotifier}start start and stop notifications for subscriptions\n */\nfunction readable(value, start) {\n return {\n subscribe: writable(value, start).subscribe\n };\n}\n/**\n * Create a `Writable` store that allows both updating and reading by subscription.\n * @param {*=}value initial value\n * @param {StartStopNotifier=}start start and stop notifications for subscriptions\n */\nfunction writable(value, start = noop) {\n let stop;\n const subscribers = new Set();\n function set(new_value) {\n if (safe_not_equal(value, new_value)) {\n value = new_value;\n if (stop) { // store is ready\n const run_queue = !subscriber_queue.length;\n for (const subscriber of subscribers) {\n subscriber[1]();\n subscriber_queue.push(subscriber, value);\n }\n if (run_queue) {\n for (let i = 0; i < subscriber_queue.length; i += 2) {\n subscriber_queue[i][0](subscriber_queue[i + 1]);\n }\n subscriber_queue.length = 0;\n }\n }\n }\n }\n function update(fn) {\n set(fn(value));\n }\n function subscribe(run, invalidate = noop) {\n const subscriber = [run, invalidate];\n subscribers.add(subscriber);\n if (subscribers.size === 1) {\n stop = start(set) || noop;\n }\n run(value);\n return () => {\n subscribers.delete(subscriber);\n if (subscribers.size === 0) {\n stop();\n stop = null;\n }\n };\n }\n return { set, update, subscribe };\n}\nfunction derived(stores, fn, initial_value) {\n const single = !Array.isArray(stores);\n const stores_array = single\n ? [stores]\n : stores;\n const auto = fn.length < 2;\n return readable(initial_value, (set) => {\n let inited = false;\n const values = [];\n let pending = 0;\n let cleanup = noop;\n const sync = () => {\n if (pending) {\n return;\n }\n cleanup();\n const result = fn(single ? values[0] : values, set);\n if (auto) {\n set(result);\n }\n else {\n cleanup = is_function(result) ? result : noop;\n }\n };\n const unsubscribers = stores_array.map((store, i) => subscribe(store, (value) => {\n values[i] = value;\n pending &= ~(1 << i);\n if (inited) {\n sync();\n }\n }, () => {\n pending |= (1 << i);\n }));\n inited = true;\n sync();\n return function stop() {\n run_all(unsubscribers);\n cleanup();\n };\n });\n}\n\nexport { derived, readable, writable };\n","import { writable } from \"svelte/store\";\r\n\r\n\r\nfunction Controller(){\r\n const {subscribe, set, update} = writable({\r\n plans_views: [],\r\n })\r\n\r\n\r\n\r\n const controller = {\r\n subscribe,\r\n update: (field, content)=>{\r\n update(( data )=>{\r\n data[field] = content;\r\n return data;\r\n })\r\n }\r\n }\r\n\r\n\r\n return controller;\r\n}\r\n\r\n\r\nexport const PlansStore = Controller();","import { writable } from \"svelte/store\";\r\n\r\n\r\nfunction Controller(){\r\n const {subscribe, set, update} = writable({\r\n atLeastOneSubscription: false,\r\n rendered_data: false,\r\n stripe_subs: [],\r\n registered_subscriptions: [],\r\n registered_plans: [],\r\n subscriptions: [],\r\n })\r\n\r\n\r\n\r\n const controller = {\r\n subscribe,\r\n update: (input, field)=>{\r\n if(field === \"subscriptions\"){ \r\n console.warn(\"No puedes modificar este campo.\")\r\n return; \r\n }\r\n update((data)=>{\r\n data[field] = input;\r\n return data;\r\n })\r\n },\r\n setSubscriptions: (subscriptions)=>{\r\n update(( data )=>{\r\n data.subscriptions = subscriptions;\r\n return data;\r\n })\r\n }\r\n }\r\n\r\n\r\n return controller;\r\n}\r\n\r\n\r\nconst UpdateSubscriptions = function(){\r\n \r\n \r\n\r\n function render(subs){\r\n let registered_plans = []; \r\n\r\n subs.map(( sub )=>{\r\n sub.items.data.map(( plan )=>{\r\n let metadata = sub.metadata;\r\n let addons = metadata?.addons ?? \"[]\";\r\n \r\n addons = JSON.parse(addons);\r\n plan.current_period_start = sub.current_period_start;\r\n plan.nextInvoice = sub.nextInvoice;\r\n plan.current_period_end = sub.current_period_end;\r\n plan.discount = sub.discount;\r\n plan.status = sub.status;\r\n plan.id_sub = sub.id;\r\n plan.id_plan = plan.plan.id.split(\"stripe_plan_\").join(\"\");\r\n plan.is_addon = false;\r\n plan.cancel_at = sub.cancel_at ?? null;\r\n plan.canceled_at = sub.canceled_at ?? null;\r\n plan.cancel_at_period_end = sub.cancel_at_period_end ?? null;\r\n plan.registered_at_stripe = typeof sub.id === \"string\" ? true : false;\r\n if(addons !== null){\r\n Object.values(addons).map(( addon, key )=>{\r\n let type = Object.keys(addons)[key];\r\n addon.type = type;\r\n if(plan.plan.id === \"stripe_plan_\"+addon.addonPlan){\r\n plan.is_addon = true;\r\n plan.addon = addon;\r\n }\r\n })\r\n }\r\n \r\n registered_plans.push(plan)\r\n })\r\n registered_plans = registered_plans;\r\n })\r\n\r\n let registered_subscriptions = Object.values(tripod_plans.subscriptions).filter(( subscription )=>{\r\n if(subscription.registered_at_stripe === true){\r\n SubscriptionsStore.update(true, \"atLeastOneSubscription\");\r\n return subscription;\r\n }\r\n })\r\n SubscriptionsStore.setSubscriptions(subs);\r\n SubscriptionsStore.update(registered_subscriptions, \"registered_subscriptions\")\r\n SubscriptionsStore.update(registered_plans, \"registered_plans\");\r\n SubscriptionsStore.update(true, \"rendered_data\");\r\n \r\n }\r\n \r\n \r\n if(typeof user === \"undefined\"){\r\n return false;\r\n }\r\n\r\n if(typeof user?.public_key !== \"undefined\"){\r\n turpial.fetch({\r\n url: [HOST+\"/private/api/v1/user/subscriptions/get_subscriptions_stripe?id=\"+user.public_key],\r\n method: \"GET\",\r\n type: \"text\",\r\n ready: function(results){\r\n results = JSON.parse(results[0]);\r\n render(results);\r\n console.log(\"Fetched Subscriptions!\")\r\n }\r\n })\r\n \r\n }else{\r\n return false;\r\n }\r\n \r\n\r\n}\r\n\r\nconst SubscriptionsStore = Controller();\r\nexport {SubscriptionsStore, UpdateSubscriptions}","/**\r\n * FormatNumber:\r\n * - Create a format for numbers to transform number in US currency.\r\n */\r\n function FormatNumber(number, isCurrency){\r\n\r\n let options = { style: 'currency', currency: 'USD' };\r\n let numberFormat = new Intl.NumberFormat('es-CO', isCurrency ? options : \"\");\r\n return numberFormat.format(number)\r\n}\r\nexport { FormatNumber }","<script>\r\n import { FormatNumber } from \"./libraries/formatNumber\";\r\n export let current = 0;\r\n let inputValue = 0;\r\n\r\n \r\n let max = 6;\r\n let section;\r\n let price = 0;\r\n let email_marketing = null;\r\n let info_plan = null;\r\n let inputRangeElement = null;\r\n let main_container = null;\r\n let info_text_container = null;\r\n let selected_element = null;\r\n let selected_addon = {};\r\n let list = [];\r\n export let id = $$props.id ?? null;\r\n export let version = $$props.version ?? null;\r\n export let lang =\r\n (typeof ComponentSliderEmailMarketing !== \"undefined\" &&\r\n ComponentSliderEmailMarketing.lang) ??\r\n \"\";\r\n export let interval = $$props.interval ?? \"month\";\r\n export let onUpdate = function(){};\r\n interval = interval.toLowerCase();\r\n\r\n \r\n\r\n\r\n $: {\r\n if(inputValue){\r\n inputRangeElement.style.pointerEvents = \"all\";\r\n \r\n onUpdate({\r\n selected_addon: selected_addon,\r\n value: inputValue,\r\n selected: current,\r\n list: list,\r\n });\r\n }\r\n }\r\n\r\n\r\n /**Cuando el intervalo cambie*/\r\n function setIntervalPlan() {\r\n let interval_text = info_plan.querySelector(\".interval\");\r\n interval_text.innerText = lang[interval];\r\n }\r\n\r\n $: {\r\n if (interval || email_marketing !== null) {\r\n if(info_plan !== null && selected_element !== null){\r\n setIntervalPlan();\r\n getBall(selected_element);\r\n }\r\n }\r\n }\r\n\r\n $: {\r\n if (inputValue) {\r\n setBallById(inputValue);\r\n }\r\n }\r\n\r\n function changeInputValue(value){\r\n let { items } = email_marketing.response[0];\r\n let ball = section.querySelector(`.balls[data-price='${value}']`)\r\n .dataset.price;\r\n\r\n let pricePosition = items[ball - 1].price;\r\n let emailPosition = items[ball - 1].limit;\r\n let inputResults = section.querySelector(\"input.input-range-selector\");\r\n inputValue = value;\r\n selected_addon = {\r\n price: pricePosition,\r\n limit: emailPosition,\r\n addonPlan: email_marketing.response[0].__id__,\r\n }\r\n inputResults.value = btoa(\r\n JSON.stringify(selected_addon)\r\n );\r\n }\r\n\r\n $: { \r\n if (inputValue) {\r\n changeInputValue(inputValue)\r\n }\r\n }\r\n\r\n function getApiConnection() {\r\n fetch(\"https://app.3pod.io/api/getAddons/funnels\")\r\n .then((response) => {\r\n return response.json();\r\n })\r\n .then((response) => {\r\n if ((response.status || \"error\") === \"error\") {\r\n console.error(\"Error al conectar con la API\");\r\n return;\r\n }\r\n email_marketing = response;\r\n email_marketing.response[0].items.map((item, key) => {\r\n email_marketing.response[0].items[key].prices = {\r\n month: email_marketing.response[0].items[key].price,\r\n year: email_marketing.response[0].items[key].price * 12,\r\n };\r\n });\r\n list = email_marketing.response[0].items;\r\n let current_key = 0;\r\n let search_current = email_marketing.response[0].items.find(( item, key )=>{\r\n if(item.limit === current){\r\n current_key = key+1;\r\n return item;\r\n }\r\n })\r\n\r\n if(typeof search_current !== \"undefined\"){\r\n current = current_key\r\n }\r\n \r\n \r\n setTimeout(() => {\r\n let key = 0;\r\n key = current;\r\n selected_element = main_container.querySelector(`.balls[data-item='${key}']`);\r\n }, 500);\r\n \r\n });\r\n }\r\n \r\n getApiConnection();\r\n \r\n\r\n\r\n function setBallById(id){\r\n let node = section.querySelector(`.balls[data-item='${id}']`);\r\n getBall(node);\r\n }\r\n \r\n function getBall(node) {\r\n selected_element = node;\r\n let position = node.dataset.position;\r\n let item = node.dataset.item;\r\n \r\n function setPositionRange(){\r\n let nodes = [...section.querySelectorAll(\".balls\")];\r\n nodes.map((node) => {\r\n node.classList.remove(\"selected\");\r\n });\r\n node.classList.add(\"selected\");\r\n }\r\n setPositionRange();\r\n\r\n\r\n let priceElement = info_text_container.querySelector(\".price-marketing\");\r\n let suscribersMarketingElement = info_text_container.querySelector(\".subscribers-marketing\");\r\n \r\n let totalPrice = email_marketing.response[0].items[position].prices[interval];\r\n let limit = email_marketing.response[0].items[position].limit;\r\n \r\n priceElement.innerText = `${FormatNumber(totalPrice, true)}`;\r\n suscribersMarketingElement.innerText = `${FormatNumber(limit, false)}`;\r\n\r\n \r\n changeInputValue(+(item))\r\n }\r\n</script>\r\n\r\n{#if email_marketing !== null}\r\n <div class=\"wrapper {version}\" bind:this=\"{main_container}\">\r\n <section class=\"section-content\">\r\n <div class=\"container-email\" bind:this={price}>\r\n <div class=\"email\">\r\n <img\r\n class=\"email-icon\"\r\n src=\"https://raw.githubusercontent.com/Yerikmiller/3pod-us.github.io/master/src/email-icon-3pod.svg\"\r\n alt=\"Email Marketing Icon\"\r\n />\r\n </div>\r\n <div class=\"info\" bind:this={info_plan}>\r\n <p>\r\n <span class=\"info_text_container\" bind:this=\"{info_text_container}\">\r\n {@html lang.benefits}\r\n </span>\r\n </p>\r\n </div>\r\n </div>\r\n </section>\r\n <section bind:this={section} class=\"section-balls {version}\">\r\n <div class=\"container-balls \">\r\n <input type=\"hidden\" class=\"input-range-selector\" value=\"\" />\r\n <input\r\n class=\"range\"\r\n {id}\r\n type=\"range\"\r\n bind:value={inputValue}\r\n bind:this={inputRangeElement}\r\n min=\"1\"\r\n {max}\r\n step=\"1\"\r\n />\r\n\r\n <div class=\"container-ball-child\">\r\n {#each email_marketing.response[0].items as item, key}\r\n <p\r\n on:click={function () {\r\n getBall(this);\r\n }}\r\n class=\"ball{key} balls {key === 0 && 'selected'}\"\r\n data-item={key + 1}\r\n data-limit={item.limit}\r\n data-price={key + 1}\r\n data-position={key}\r\n >\r\n <span class=\"limit-span\">\r\n +{FormatNumber(item.limit, false)}\r\n </span>\r\n <span class=\"hiddenSpan\"></span>\r\n </p>\r\n {/each}\r\n </div>\r\n </div>\r\n </section>\r\n </div>\r\n{/if}\r\n<style>\r\n :global(body) {\r\n margin: 0;\r\n padding: 0;\r\n box-sizing: border-box;\r\n font-family: \"Montserrat\", \"Montserrat\", sans-serif;\r\n }\r\n\r\n :global(.wrapper.default) {\r\n height: 8.125rem;\r\n }\r\n\r\n section {\r\n margin: 1.25rem 0;\r\n margin-bottom: 1.75rem;\r\n }\r\n\r\n .section-balls {\r\n display: flex;\r\n justify-content: center;\r\n }\r\n .section-balls.recommended .balls:global(.selected span) {\r\n color: #fff;\r\n font-weight: 800;\r\n }\r\n .balls {\r\n content: \"\";\r\n position: absolute;\r\n display: inline-flex;\r\n top: 0.125rem;\r\n background-color: #fff;\r\n border-radius: 0.625rem;\r\n width: 0.75rem;\r\n height: 0.75rem;\r\n border: 0.0187rem solid #e0e7ec;\r\n justify-content: center;\r\n cursor: pointer;\r\n }\r\n\r\n .balls:global(.selected) {\r\n background-color: #344fff;\r\n transform: scale(1.125);\r\n }\r\n .balls:global(.selected span) {\r\n color: #344fff;\r\n font-weight: 600;\r\n }\r\n\r\n .wrapper.recommended .container-email :global(.price-marketing) {\r\n color: #fde203;\r\n font-weight: 700;\r\n font-size: 0.875rem;\r\n }\r\n .wrapper .container-email :global(.subscribers-marketing) {\r\n font-weight: 500;\r\n color: #415b76;\r\n font-size: 0.875rem;\r\n }\r\n .wrapper.recommended .container-email :global(.subscribers-marketing) {\r\n color: #fff;\r\n }\r\n .wrapper.recommended .container-email {\r\n color: #fff;\r\n }\r\n\r\n .section-balls.recommended .container-balls:global(.container-balls) {\r\n margin-bottom: 5rem;\r\n }\r\n\r\n .wrapper.default\r\n .container-email :global(.subscribers-marketing) {\r\n font-weight: 500;\r\n color: #415b76;\r\n font-size: 0.875rem;\r\n }\r\n\r\n .wrapper.default .container-email :global(.email) {\r\n background-color: rgb(52 79 255 / 7%);\r\n }\r\n\r\n .wrapper.default .container-email :global(.info) {\r\n color: #415b76;\r\n }\r\n\r\n .wrapper.default .container-email :global(.bold-marketing) {\r\n color: #415b76;\r\n }\r\n\r\n .wrapper.default .container-email :global(.price-marketing) {\r\n font-weight: bolder;\r\n font-weight: 500;\r\n color: #415b76;\r\n font-size: 14px;\r\n }\r\n\r\n input {\r\n -webkit-appearance: none;\r\n background-color: #fde203;\r\n border-radius: 10%;\r\n height: 0.5rem;\r\n position: absolute;\r\n top: 0;\r\n width: 100%;\r\n border-radius: 20px;\r\n cursor: pointer;\r\n }\r\n\r\n input[type=\"range\"]::-webkit-slider-thumb {\r\n -webkit-appearance: none;\r\n width: 1.0625rem;\r\n height: 1.0625rem;\r\n border-radius: 50%;\r\n z-index: 10000;\r\n position: sticky;\r\n }\r\n\r\n .section-balls.recommended span {\r\n color: #fff;\r\n }\r\n\r\n span.limit-span {\r\n position: relative;\r\n margin-top: 1rem;\r\n font-size: 11px;\r\n color: #aab8c2; \r\n }\r\n\r\n .container-balls {\r\n position: relative;\r\n width: 15.625rem;\r\n }\r\n\r\n .container-ball-child {\r\n position: absolute;\r\n top: -0.3rem;\r\n }\r\n\r\n .ball0 {\r\n left: 0px;\r\n }\r\n\r\n .ball1 {\r\n left: 3.125rem;\r\n }\r\n\r\n .ball2 {\r\n left: 5.75rem;\r\n }\r\n\r\n .ball3 {\r\n left: 8.875rem;\r\n }\r\n\r\n .ball4 {\r\n left: 11.75rem;\r\n }\r\n\r\n .ball5 {\r\n left: 14.9375rem;\r\n }\r\n\r\n .container-email {\r\n display: flex;\r\n justify-content: flex-start;\r\n width: 100%;\r\n }\r\n\r\n .container-email .email {\r\n background-color: #fde203;\r\n width: 3.25rem;\r\n height: 3.25rem;\r\n border-radius: 50%;\r\n margin-right: 0.5rem;\r\n }\r\n\r\n .container-email .info {\r\n width: 80%;\r\n font-size: 0.875rem;\r\n line-height: 1.5625rem;\r\n }\r\n\r\n .bold-marketing {\r\n font-weight: 500;\r\n color: #fff;\r\n font-size: 0.875rem;\r\n }\r\n\r\n .email {\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n }\r\n\r\n .email-icon {\r\n width: 2.75rem;\r\n height: 2.75rem;\r\n }\r\n\r\n .hiddenSpan {\r\n position: absolute;\r\n top: -18px;\r\n z-index: 10000;\r\n width: 0.75rem;\r\n height: 0.75rem;\r\n }\r\n</style>\r\n","import { writable } from 'svelte/store';\r\n\r\nfunction storeForm() {\r\n\tconst { subscribe, set, update } = writable({\r\n dataForm: {},\r\n plansFetched: [\r\n /*{\r\n \"CreationDate\": \"2021-10-13\",\r\n \"time\": \"1634103576\",\r\n \"FromDB\": \"plans\",\r\n \"__id__\": \"pyji\",\r\n \"name_plan\": \"El funnel del dinero\",\r\n \"limit_service\": \"0\",\r\n \"membership_type\": \"funnels\",\r\n \"position_plan\": \"10\",\r\n \"price_plan\": \"25\",\r\n \"is_pexels_available\": \"DEACTIVATED\",\r\n \"img_plan\": \"https://i.ibb.co/BtZmHtz/3-Pod-Dashboard-Icons-Websites-2x.png\",\r\n \"availableCategories\": \"[]\",\r\n \"type\": \"PLAN\",\r\n \"items\": \"{\\\"El funnel del dinero\\\":\\\"El funnel del dinero\\\"}\",\r\n \"account_group\": \"\",\r\n \"unit_code\": \"\",\r\n \"product_name_siigo\": \"\",\r\n \"unit_coin\": \"USD\",\r\n \"comments\": \"\",\r\n \"doc_code\": \"\",\r\n \"limit_budget\": \"0\",\r\n \"projects_at_same_time\": \"1\",\r\n \"SalesmanIdentification\": \"\",\r\n \"stripe_plan\": \"stripe_plan_pyji\",\r\n \"stripe_product\": \"stripe_product_pyji\",\r\n \"interval_year_price\": 20\r\n }*/\r\n ],\r\n });\r\n const form = {\r\n subscribe,\r\n update: function(field, dataForm, merge_with){\r\n merge_with = merge_with ?? null;\r\n update((data)=>{\r\n if(merge_with !== null){\r\n Object.values(dataForm).map((item, key)=>{\r\n let name = Object.keys(dataForm)[key];\r\n merge_with[name] = item;\r\n })\r\n dataForm = merge_with;\r\n }\r\n \r\n\r\n data[field] = dataForm;\r\n return data;\r\n })\r\n },\r\n }\r\n return form;\r\n}\r\n\r\n\r\nexport const StoreForm = storeForm();","<script>\r\nexport let number;\r\nexport let digits = 2;\r\nexport let parseCents = null;\r\nlet stringNumber = [];\r\nfunction parse(number){\r\n number = new Intl.NumberFormat(['en-US'], {maximumFractionDigits: digits}).format(number);\r\n var splitter = number.split(\".\");\r\n if(typeof splitter[1] !== \"undefined\"){\t\t\t\r\n if(splitter[1].length === 1){\r\n number += \"0\"; \r\n }\r\n }\r\n parseCents = parseCents || null;\r\n if(parseCents === true){\r\n number = number.split(\".\");\r\n var string = `<span class=\"CurrencyFormatter\" data-number=\"${number.join(\"\")}\">\r\n <span class=\"CurrencyFormatter--price\">\r\n ${number[0]}\r\n </span>\r\n <span>\r\n ${typeof number[1] !== \"undefined\" ? \".\" : \"\"}\r\n </span>\r\n <span class=\"CurrencyFormatter--cents\">\r\n ${number[1] || \"\"}\r\n </span>\r\n </span>`\r\n return string;\r\n }\r\n return number;\r\n}\r\nstringNumber = parse(number);\r\n$: {\r\n if(number){\r\n stringNumber = parse(number)\r\n }\r\n}\r\n</script>\r\n<style>\r\n.CurrencyFormatter--container :global(.CurrencyFormatter--cents){\r\n font-size: calc(8px + 0.3em);\r\n}\r\n.CurrencyFormatter--container :global(.CurrencyFormatter){\r\n display: inline-flex;\r\n align-items: baseline;\r\n}\r\n</style>\r\n<span data-number=\"{number}\" class=\"CurrencyFormatter--container\">\r\n {@html stringNumber}\r\n</span>","const parseHtmlString = (string)=>{\r\n string = string.split(\"<\").join(\"<\");\r\n string = string.split(\">\").join(\">\");\r\n return string;\r\n}\r\n\r\nexport {parseHtmlString};","import { writable } from 'svelte/store';\r\nimport { random_string } from \"../../libraries/random_string\"\r\n\r\nfunction parse(n){\r\n return Number.parseFloat(Number.parseFloat(n).toFixed(2));\r\n}\r\n\r\nfunction storeCart() {\r\n const defaultValues = {\r\n items: {},\r\n has_discount: false,\r\n discounts: {year: 0, month: 0},\r\n subtotal: {year: 0, month: 0},\r\n total: {year: 0, month: 0},\r\n }\r\n\tconst { subscribe, set, update } = writable(defaultValues);\r\n const Cart = {\r\n subscribe,\r\n restore: function(){\r\n update((data)=>{\r\n data = defaultValues;\r\n return data;\r\n })\r\n },\r\n updateSubtotals: function(prices){\r\n\r\n update((data)=>{\r\n data.subtotal.year = parse(data.subtotal.year + prices.year.current);\r\n data.subtotal.month = parse(data.subtotal.month + prices.month.current);\r\n return data;\r\n })\r\n\r\n },\r\n updateTotals: function(prices){\r\n update((data)=>{\r\n data.total.year = parse(data.total.year + prices.year);\r\n data.total.month = parse(data.total.month + prices.month);\r\n return data;\r\n })\r\n },\r\n updateDiscounts: function(discount, interval){\r\n\r\n update((data)=>{\r\n data.discounts[interval] = parse(data.discounts[interval] + discount);\r\n data.has_discount = true;\r\n return data;\r\n })\r\n \r\n },\r\n update: function(item, id){\r\n update((data)=>{\r\n data.items[id] = item;\r\n return data;\r\n })\r\n },\r\n remove: function(id){\r\n update((data)=>{\r\n try {\r\n delete data.items[id];\r\n } catch (error) {\r\n console.warn(\"No hay un elemento con esta ID. \"+id)\r\n }\r\n \r\n return data;\r\n })\r\n }\r\n }\r\n return Cart;\r\n}\r\n\r\n\r\n\r\n\r\nclass ItemCart\r\n{\r\n constructor({prices, id, name, icon, discountPercent, interval, type, plan}){\r\n let item = {};\r\n item.id = id ?? (\"item-\"+random_string(6));\r\n item.icon = icon ?? \"plan-icon-startup\";\r\n item.prices = prices,\r\n item.name = name ?? \"-\",\r\n item.interval = interval ?? \"month\",\r\n item.discount = discountPercent ?? 0;\r\n \r\n\r\n this.discountable = function(price, interval){\r\n price = parse(price)\r\n if(discountPercent <= 0){\r\n return null;\r\n }\r\n let discount = parse( ((discountPercent/100)*price) );\r\n \r\n StoreCart.updateDiscounts(discount, interval);\r\n\r\n return parse(price-discount);\r\n }\r\n\r\n \r\n \r\n\r\n if(discountPercent > 0){\r\n item.prices.month.with_discount = this.discountable(item.prices.month.current, \"month\");\r\n item.prices.year.with_discount = this.discountable(item.prices.year.current, \"year\");\r\n\r\n\r\n\r\n StoreCart.updateSubtotals(prices);\r\n StoreCart.updateTotals({\r\n year: item.prices.year.with_discount,\r\n month: item.prices.month.with_discount,\r\n });\r\n \r\n \r\n }else{\r\n\r\n StoreCart.updateSubtotals(prices);\r\n StoreCart.updateTotals({\r\n year: item.prices.year.current,\r\n month: item.prices.month.current,\r\n });\r\n\r\n }\r\n\r\n\r\n this.item = item;\r\n\r\n\r\n }\r\n add(){\r\n StoreCart.update(this.item, this.item.id)\r\n }\r\n delete(){\r\n StoreCart.remove(item.id)\r\n }\r\n}\r\n\r\n\r\n/**\r\n * Parser code\r\n */\r\nclass CartParserAddons \r\n{\r\n constructor(addons)\r\n {\r\n this.addons = addons ?? {};\r\n\r\n \r\n Object.values(this.addons).map(( addon, key )=>{\r\n let type = Object.keys(this.addons)[key];\r\n\r\n this.addons[type] = this[type](addon);\r\n if(this.addons[type] === false){\r\n delete this.addons[type];\r\n }\r\n })\r\n\r\n return this.addons;\r\n }\r\n email_marketing(addon)\r\n {\r\n if(addon.limit <= 0){\r\n return false;\r\n }\r\n return addon;\r\n }\r\n}\r\n\r\nconst StoreCart = storeCart();\r\nexport {StoreCart, ItemCart, CartParserAddons};","<script>\r\nimport EmailMarketingSlider from './../EmailMarketingSlider.svelte';\r\nimport { StoreForm } from './../register/steps/StoreForm.js';\r\nimport CurrencyFormatter from './../components/Elements/CurrencyFormatter.svelte';\r\nimport { PlansStore } from './Plans.store.js';\r\nimport { parseHtmlString } from \"../libraries/parseHtmlString\";\r\nimport { random_string } from '../libraries/random_string';\r\nimport { CartParserAddons } from '../register/steps/StoreCart';\r\nimport { SubscriptionsStore } from './SubscriptionsStore';\r\nexport let tripod_plans;\r\nexport let interval;\r\nexport let affiliate = {};\r\nexport let user = {};\r\nexport let membership_selected;\r\nexport let onSelectPlan = function(){}; // for internal modules\r\nlet metadata = tripod_plans;\r\nlet showProducts = tripod_plans?.showProducts ?? true;\r\nlet currentPlan = tripod_plans?.currentPlan ?? false;\r\nlet lang = metadata.lang;\r\n\r\n\r\n// this will work only in register widget.\r\nlet subscriptions = [];\r\nif(($StoreForm?.dataForm?.subscriptions)){\r\n subscriptions = $StoreForm?.dataForm?.subscriptions ?? []; \r\n}\r\n\r\nlet email_marketing_purchased = false;\r\n\r\nfunction EmailMarketingSliderUpdate({\r\n selected_addon,\r\n value,\r\n selected,\r\n list,\r\n}){\r\n \r\n if(selected === value){\r\n email_marketing_purchased = true;\r\n }else{\r\n email_marketing_purchased = false;\r\n }\r\n}\r\n\r\nfunction SelectPlanInit(){\r\n let button = this;\r\n let plan_id = button.dataset.planId;\r\n let plan = parsedPlans.find(( plan )=>{\r\n if(plan.__id__ === plan_id){\r\n return plan;\r\n }\r\n })\r\n\r\n selectPlan(button, plan);\r\n}\r\n\r\nfunction selectPlan(target, plan){\r\n let email_marketing = document.querySelector(`.container-plan-${plan.__id__} .email-marketing-slider-module .input-range-selector`);\r\n plan.addons = {};\r\n if(email_marketing !== \"\"){\r\n try {\r\n plan.addons.email_marketing = JSON.parse(atob(email_marketing.value))\r\n } catch (error) {\r\n \r\n }\r\n }\r\n plan.addons = new CartParserAddons( plan.addons );\r\n let button = target;\r\n // will be executed outside any module\r\n tripod_plans.onSelect(plan, interval, plan.interval, button);\r\n\r\n // will be executed in internal modules\r\n \r\n onSelectPlan({\r\n plan: plan, interval: interval, button: button\r\n });\r\n}\r\n\r\nlet parsedPlans = [];\r\n\r\nlet current_plan = null;\r\n\r\n\r\n$: {\r\n if($PlansStore || $SubscriptionsStore.subscriptions){\r\n parsedPlans = $PlansStore.plans_views.filter(( plan )=>{\r\n let discountPlans = affiliate?.referralDiscounts?.plans ?? null;\r\n let interval_price;\r\n let percentOff = 0;\r\n plan.has_discount = \"\";\r\n plan.is_selected = false;\r\n plan.upgrades = [];\r\n plan.downgrades = [];\r\n $SubscriptionsStore.subscriptions.map(( subscription )=>{ \r\n let metadata = subscription.metadata;\r\n let items = subscription.items.data;\r\n items.map(( item )=>{\r\n let subscription_plan = item.plan;\r\n let id = item.id_plan;\r\n if(plan.__id__ === id && metadata.membership_type === membership_selected){\r\n let addons = metadata?.addons ?? null;\r\n if(addons !== null){\r\n addons = JSON.parse(addons);\r\n plan.active_addons = addons;\r\n }\r\n\r\n\r\n plan.is_selected = true;\r\n plan.interval = subscription_plan.interval;\r\n plan.status = subscription.status;\r\n current_plan = plan;\r\n plan.subscription = subscription;\r\n\r\n }\r\n if(metadata.membership_type === membership_selected){\r\n plan.subscription = subscription;\r\n }\r\n })\r\n\r\n \r\n\r\n })\r\n\r\n\r\n if(interval !== \"month\"){\r\n if(typeof plan[`interval_${interval}_price`] === \"undefined\" || plan[`interval_${interval}_price`] === \"\"){\r\n interval_price = plan.price_plan;\r\n percentOff = 0;\r\n }else{\r\n interval_price = plan[`interval_${interval}_price`];\r\n percentOff = (plan.price_plan*100)/plan[`interval_${interval}_price`]-100;\r\n percentOff = isNaN(percentOff) === false ? percentOff : 0;\r\n percentOff = Number.parseInt(percentOff);\r\n plan.has_discount = \"has_discount\";\r\n }\r\n }else{\r\n interval_price = plan.price_plan;\r\n percentOff = 0;\r\n }\r\n function onDicountsPlan(discountPlan){\r\n if(discountPlan.plan === plan.__id__){\r\n plan.interval_current_price = interval_price; \r\n interval_price = interval_price - ((discountPlan.discountPercent/100)*interval_price);\r\n plan.interval_discount = plan.interval_current_price - interval_price;\r\n plan.hasReferralDiscounts = discountPlan.discountPercent;\r\n plan.has_discount = \"has_discount\";\r\n }\r\n }\r\n plan.interval_selected = interval;\r\n // in case of discounts by referrals\r\n if(discountPlans !== null){\r\n Object.values(discountPlans).map(( dp )=>{\r\n onDicountsPlan(dp);\r\n })\r\n }else{\r\n // in case of discounts by tag\r\n if((plan.discountsPlan ?? null) !== null){\r\n onDicountsPlan(plan.discountsPlan);\r\n }\r\n }\r\n \r\n\r\n\r\n \r\n\r\n interval_price = Number.parseFloat(Number.parseFloat(interval_price).toFixed(2))\r\n plan.interval_price = interval_price;\r\n plan.percentOff = percentOff;\r\n\r\n let currency = plan.currency ?? null !== null ? plan.currency : tripod_plans.currency;\r\n let is_recommended = ((plan.is_recommended ?? \"Default\") === \"Recomendado\") ? \"recommended\" : plan.is_recommended||\"\";\r\n let yearly = typeof plan.interval_year_price === \"undefined\" ? null : plan.interval_year_price;\r\n plan.currency = currency;\r\n plan.is_recommended = is_recommended;\r\n plan.yearly = is_recommended;\r\n plan.is_available = plan.is_available || \"public\";\r\n\r\n plan.active = false;\r\n\r\n\r\n let same_interval = (plan?.interval ?? null) === interval;\r\n if(plan.is_selected){\r\n plan.active = true;\r\n email_marketing_purchased = true;\r\n if(!same_interval){\r\n plan.active = false;\r\n }\r\n }\r\n \r\n\r\n if(plan.status === \"canceled\"){\r\n plan.active = false;\r\n }\r\n \r\n\r\n\r\n currentPlan.__id__ !== plan.__id__ && plan.is_selected === false && ((plan?.interval ?? null) === interval) === false\r\n\r\n let tag = user?.userFromCampaign ?? \"\";\r\n\r\n if(plan.is_available === \"public\" || tag === (plan?.tag || null)){\r\n return plan;\r\n }\r\n })\r\n\r\n \r\n /*parsedPlans = parsedPlans.filter(( plan )=>{\r\n plan.upgrades = [];\r\n\r\n \r\n let parse = function(n){\r\n return Number.parseFloat((Number.parseFloat(n)).toFixed(2));\r\n }\r\n let parsePrice = function(n, discountPercent){\r\n let origin = parse(n);\r\n if(discountPercent > 0){\r\n n = (origin-(origin*(discountPercent/100)))\r\n }\r\n return n;\r\n }\r\n\r\n\r\n if(current_plan === null){\r\n parsedPlans.map(( item )=>{\r\n let discountItem = item?.discountPercent ?? 0;\r\n let month_price = parsePrice(item.price_plan, discountItem);\r\n let year_price = parsePrice(parse(item.interval_year_price)*12, discountItem);\r\n plan.upgrades.push( {\r\n id: item.__id__,\r\n prices: {\r\n real_year_price: year_price,\r\n real_month_price: month_price,\r\n year: year_price,\r\n month: month_price\r\n }\r\n })\r\n\r\n plan.downgrades.push( {\r\n id: item.__id__,\r\n prices: {\r\n real_year_price: year_price,\r\n real_month_price: month_price,\r\n year: 0,\r\n month: 0\r\n }\r\n } )\r\n });\r\n return plan;\r\n }\r\n \r\n \r\n let current_subscription = current_plan.subscription;\r\n let current_invoices = current_subscription?.invoices.data[0] ?? {}; \r\n let last_amount = current_invoices?.amount_paid ?? 0;\r\n\r\n let lines = current_invoices?.lines?.data ?? [];\r\n \r\n let amounts_lines = 0;\r\n lines.map((line)=>{\r\n if(line.amount < 0){\r\n amounts_lines = amounts_lines + Math.abs(line.amount)\r\n last_amount = Math.abs(amounts_lines + last_amount);\r\n }\r\n })\r\n last_amount = last_amount/100;\r\n plan.last_amount = last_amount;\r\n plan.current_invoices = current_invoices;\r\n\r\n \r\n \r\n let today = Number.parseInt(new Date().getTime()/1000);\r\n let days_in_month = plan.subscription.calc_period.days_in_month\r\n let period_start = current_plan.subscription.current_period_start;\r\n let period_ends = current_plan.subscription.current_period_end;\r\n let total_days = (period_ends - period_start) / (3600*24);\r\n let days_left = period_ends - today;\r\n days_left = parse( (days_left / (3600*24)) );\r\n\r\n \r\n \r\n \r\n \r\n if(total_days < 30){\r\n days_left = (days_left * 30) / days_in_month\r\n }\r\n\r\n let current_interval = current_plan.interval;\r\n \r\n \r\n \r\n\r\n parsedPlans.map(( item )=>{\r\n let discountItem = item?.discountPercent ?? 0;\r\n let month_price = parsePrice(item.price_plan, discountItem);\r\n let year_price = parsePrice(parse(item.interval_year_price)*12, discountItem);\r\n plan.current_interval = current_interval;\r\n let days = 30;\r\n if(current_interval === \"year\"){\r\n days = 365;\r\n }\r\n\r\n \r\n let type = \"upgrade\";\r\n if(month_price > last_amount){\r\n type = \"upgrade\";\r\n }else{\r\n type = \"downgrade\";\r\n }\r\n \r\n plan.upgrades.push( {\r\n id: item.__id__,\r\n prices: {\r\n real_year_price: year_price,\r\n real_month_price: month_price,\r\n year: parse( (year_price-((days_left*last_amount)/days)) ),\r\n month: parse( (month_price-((days_left*last_amount)/days)) )\r\n }\r\n })\r\n\r\n plan.downgrades.push( {\r\n id: item.__id__,\r\n prices: {\r\n real_year_price: year_price,\r\n real_month_price: month_price,\r\n year: 0,\r\n month: 0\r\n }\r\n } )\r\n })\r\n\r\n return plan;\r\n })*/\r\n\r\n }\r\n}\r\n\r\n\r\n</script>\r\n{#if $PlansStore.plans_views.length <= 0}\r\n Cargando planes...\r\n{/if}\r\n{#each parsedPlans as plan}\r\n {#if plan.type === \"PLAN\"}\r\n <div class=\"column column-card-plan container-plan-{plan.__id__}\">\r\n <section class=\"{plan.is_recommended} is-plan\">\r\n <div class=\"container-discount\">\r\n {#if typeof plan?.hasReferralDiscounts === \"undefined\"}\r\n {#if Number.isInteger(plan.percentOff)}\r\n {#if plan.percentOff > 0}\r\n <p class=\"has-text-left\">\r\n <span class=\"tag is-small percent-off-tag tag-percent fw400 is-rounded {plan.is_recommended} tag-percent-off\">\r\n Ahorra {plan.percentOff}%\r\n </span>\r\n </p>\r\n {/if}\r\n {/if}\r\n {:else}\r\n <p class=\"has-text-left\">\r\n <span class=\"tag is-small percent-off-tag tag-percent fw400 is-rounded {plan.is_recommended} tag-percent-off\">\r\n Ahorra {plan.hasReferralDiscounts}%\r\n </span>\r\n </p>\r\n {/if}\r\n </div>\r\n <header class=\"is-flex\">\r\n {#if plan.is_recommended === \"Recomendado\" || plan.is_recommended === \"recommended\"}\r\n <h4 class=\"defaultItem {plan.has_discount} has-text-centered\">\r\n {metadata.lang.defaultItem}\r\n </h4>\r\n {/if}\r\n <div> \r\n <h2 class=\"is-size-4 has-text-weight-bold is-flex Title-Plan-{plan.is_recommended}\">\r\n <span>\r\n <span class=\"{plan.img_plan} plan-icons-container\"><span class=\"path1\"></span><span class=\"path2\"></span></span>\r\n </span>\r\n <span class=\"name_plan-span\">\r\n {plan.name_plan}\r\n </span>\r\n </h2>\r\n {#if typeof plan.hasReferralDiscounts !== \"undefined\"}\r\n <p class=\"has-text-centered is-size-4 has-text-weight-semibold price-element-container dontpay-price\">\r\n <span class=\"price-element\">\r\n <span class=\"is-size-7 has-text-weight-light currency-symbol\">\r\n {plan.currency[0]}\r\n </span>\r\n <span style=\"text-decoration: line-through;\">\r\n <CurrencyFormatter parseCents={true} number={plan.interval_current_price} />\r\n </span>\r\n </span>\r\n <span class=\"is-size-7 has-text-weight-light currency-code\">\r\n {plan.currency[1]}\r\n </span><span class=\"is-size-7 has-text-weight-semibold\"> / \r\n {metadata.lang.eachMonth}\r\n </span>\r\n </p>\r\n {/if}\r\n <p class=\"has-text-centered is-size-3 has-text-weight-semibold price-element-container main-price {plan.is_recommended}\">\r\n <span class=\"price-element\">\r\n <span class=\"is-size-6 has-text-weight-light currency-symbol\">\r\n {plan.currency[0]}\r\n </span>\r\n <CurrencyFormatter parseCents={true} number={plan.interval_price} />\r\n </span>\r\n <span class=\"is-size-7 has-text-weight-light currency-code\">\r\n {plan.currency[1]}\r\n </span><span class=\"is-size-7 has-text-weight-semibold\"> / \r\n {metadata.lang.eachMonth}\r\n </span>\r\n </p>\r\n {#if plan.yearly !== null && interval === \"year\"}\r\n {#if plan[`interval_${interval}_price`] ?? \"\" !== \"\"}\r\n <p class=\"has-text-centered is-size-7\">\r\n {plan.currency[0]}<span>\r\n {#if interval === \"year\"}\r\n <CurrencyFormatter parseCents={true} number={plan.interval_price*12} />\r\n {/if}\r\n </span> \r\n {plan.currency[1]} / \r\n <span class=\"is-lowercase\">\r\n {metadata.lang.year}\r\n </span>\r\n </p>\r\n {/if}\r\n \r\n {/if} \r\n </div>\r\n </header>\r\n <main>\r\n <ul class=\"container-items\">\r\n {#each Object.values(JSON.parse(plan.items)) as item}\r\n <li class=\"item-list\">\r\n <span class=\"icon\">\r\n <i class=\"fas fa-check\"></i>\r\n </span>\r\n <span class=\"content-item\">\r\n {@html parseHtmlString(item)}\r\n </span>\r\n </li>\r\n {/each}\r\n </ul>\r\n </main>\r\n <footer>\r\n {#if plan.membership_type === \"funnels\"}\r\n {#if (lang?.slider?.benefits||null) !== null}\r\n <div class=\"columns is-multiline\">\r\n <div class=\"column email-marketing-slider-module {plan.__id__}\">\r\n <EmailMarketingSlider interval={interval} onUpdate={EmailMarketingSliderUpdate} current={(plan?.active_addons?.email_marketing?.limit ?? 1)} version={plan.is_recommended.toLowerCase()} id={\"slider-\"+random_string(3)} lang={lang.slider} />\r\n </div>\r\n </div>\r\n {/if}\r\n {/if}\r\n {#if plan.active === false }\r\n <div class=\"buttons is-grouped is-centered button-container-select\">\r\n <button\r\n on:click=\"{SelectPlanInit}\"\r\n data-plan-id=\"{plan.__id__}\" \r\n data-price-on-year-monthly=\"{plan.price_on_year_monthly}\"\r\n data-position-plan=\"{plan.position_plan}\"\r\n data-type=\"{plan.type}\"\r\n data-membership-type=\"{plan.membership_type}\"\r\n data-interval=\"{interval}\"\r\n type=\"button\" class=\"button is-success button-select-plan is-rounded fw400 has-text-white button-success-3pod\">\r\n <span class=\"is-capitalized\">\r\n {lang.setPlan}\r\n </span>\r\n </button>\r\n </div>\r\n {:else}\r\n {#if email_marketing_purchased === true}\r\n <div class=\"buttons is-grouped is-centered button-container-select\">\r\n <button \r\n type=\"button\" class=\"button is-primary is outlined-white is-rounded fw400 has-text-white button-primary-3pod outlined-white\" disabled>\r\n <span class=\"is-capitalized\">\r\n {lang.currentPlan}\r\n </span>\r\n </button>\r\n </div>\r\n {:else}\r\n <div class=\"buttons is-grouped is-centered button-container-select\">\r\n <button \r\n on:click=\"{SelectPlanInit}\"\r\n data-plan-id=\"{plan.__id__}\" \r\n data-type=\"{plan.type}\"\r\n data-membership-type=\"{plan.membership_type}\"\r\n data-interval=\"{interval}\"\r\n type=\"button\" class=\"button is-primary button-select-plan is outlined-white is-rounded fw400 has-text-white button-primary-3pod outlined-white\">\r\n <span class=\"is-capitalized\">\r\n {lang.updatePlan ?? lang.setPlan}\r\n </span>\r\n </button>\r\n </div>\r\n {/if}\r\n {/if}\r\n </footer>\r\n </section>\r\n </div>\r\n {/if} \r\n{/each}\r\n{#if showProducts === true}\r\n <div class=\"column is-12\">\r\n <hr>\r\n </div>\r\n {#each parsedPlans as plan}\r\n {#if plan.type === \"PRODUCT\"}\r\n <div class=\"column is-12\">\r\n <div class=\"box\">\r\n <section class=\"is-product columns is-multiline\">\r\n <header class=\"column is-4\">\r\n <div class=\"container-discount\">\r\n {#if typeof plan?.hasReferralDiscounts === \"undefined\"}\r\n {#if Number.isInteger(plan.percentOff)}\r\n {#if plan.percentOff > 0}\r\n <p class=\"has-text-left\">\r\n <span class=\"tag is-small percent-off-tag tag-percent fw400 is-rounded {plan.is_recommended} tag-percent-off\">\r\n Ahorra {plan.percentOff}%\r\n </span>\r\n </p>\r\n {/if}\r\n {/if}\r\n {:else}\r\n <p class=\"has-text-left\">\r\n <span class=\"tag is-small percent-off-tag tag-percent fw400 is-rounded {plan.is_recommended} tag-percent-off\">\r\n Ahorra {plan.hasReferralDiscounts}%\r\n </span>\r\n </p>\r\n {/if}\r\n </div>\r\n <h2 class=\"is-size-4 has-text-weight-bold is-flex Title-Plan-{plan.is_recommended}\">\r\n <span>\r\n <span class=\"{plan.img_plan} plan-icons-container\"><span class=\"path1\"></span><span class=\"path2\"></span></span>\r\n </span>\r\n <span class=\"name_plan-span\">\r\n {plan.name_plan}\r\n </span>\r\n </h2>\r\n {#if typeof plan.hasReferralDiscounts !== \"undefined\"}\r\n <p class=\"has-text-centered is-size-4 has-text-weight-semibold price-element-container-product dontpay-price\">\r\n <span class=\"price-element price-element-product\">\r\n <span class=\"is-size-7 has-text-weight-light currency-symbol\">\r\n {plan.currency[0]}\r\n </span>\r\n <span style=\"text-decoration: line-through;\">\r\n <CurrencyFormatter parseCents={true} number={plan.interval_current_price} />\r\n </span>\r\n </span>\r\n <span class=\"is-size-7 has-text-weight-light currency-code\">\r\n {plan.currency[1]}\r\n </span><span class=\"is-size-7 has-text-weight-semibold\"> / \r\n {metadata.lang.eachMonth}\r\n </span>\r\n </p>\r\n {/if}\r\n <p class=\"is-block is-size-3 has-text-weight-semibold price-element-container-product main-price {plan.is_recommended}\">\r\n <span class=\"price-element price-element-product\">\r\n <span class=\"is-size-6 has-text-weight-light currency-symbol\">\r\n {plan.currency[0]}\r\n </span>\r\n <CurrencyFormatter parseCents={true} number={plan.interval_price} />\r\n </span>\r\n <span class=\"is-size-7 has-text-weight-light currency-code\">\r\n {plan.currency[1]}\r\n </span><span class=\"is-size-7 has-text-weight-semibold\"> / \r\n {metadata.lang.eachMonth}\r\n </span>\r\n </p>\r\n </header>\r\n <main class=\"column is-8\">\r\n <ul class=\"container-items-product\">\r\n {#each Object.values(JSON.parse(plan.items)) as item}\r\n <li class=\"item-list item-list-product\">\r\n <span class=\"icon\">\r\n <i class=\"fas fa-check\"></i>\r\n </span>\r\n <span class=\"content-item\">\r\n {@html parseHtmlString(item)}\r\n </span>\r\n </li>\r\n {/each}\r\n </ul> \r\n </main> \r\n </section>\r\n <div>\r\n <div class=\"buttons is-flex is-grouped button-container-select-product\">\r\n <button \r\n on:click=\"{SelectPlanInit}\"\r\n data-plan-id=\"{plan.__id__}\" \r\n data-price-on-year-monthly=\"{plan.price_on_year_monthly}\"\r\n data-position-plan=\"{plan.position_plan}\"\r\n data-type=\"{plan.type}\"\r\n data-membership-type=\"{plan.membership_type}\"\r\n data-interval=\"{interval}\"\r\n type=\"button\" class=\"button is-success button-select-plan is-rounded fw400 has-text-white button-success-3pod\">\r\n <span class=\"is-capitalized\">\r\n {lang.setProduct}\r\n </span>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n {/if}\r\n {/each}\r\n{/if}\r\n\r\n<style>\r\n\r\n:global(.section) .Title-Plan-Default, :global(.section) .Title-Plan-Default .name_plan-span{\r\n color: var(--color-dark-grey);\r\n}\r\n:global(.section) .Title-Plan-recommended, :global(.section) .Title-Plan-recommended .name_plan-span{\r\n color: #fff;\r\n}\r\nheader{\r\n justify-content: center;\r\n position: relative;\r\n}\r\nsection.is-plan{\r\n color: var(--color-dark-grey);\r\n padding: 2.5rem 2rem;\r\n padding-top: 4rem;\r\n overflow: clip;\r\n position: relative;\r\n height: 100%;\r\n max-width: 425px;\r\n padding-bottom: 2rem;\r\n margin: auto;\r\n}\r\nsection.is-product{\r\n margin-top: 1.25rem;\r\n}\r\n@media only screen and (max-width:1023px){\r\n section.is-product{\r\n display: grid;\r\n justify-items: center;\r\n }\r\n}\r\n.email-marketing-slider-module{\r\n margin-bottom: 1.75rem;\r\n}\r\n@media only screen and (max-width: 1268px){\r\n .email-marketing-slider-module{\r\n margin-bottom: 2.75rem;\r\n }\r\n}\r\n@media only screen and (max-width: 425px){\r\n .email-marketing-slider-module{\r\n margin-bottom: 3.75rem;\r\n }\r\n}\r\nsection:global(.recommended){\r\n background: transparent linear-gradient(180deg, #344fff 0%, #09E2FF 100%) 0% 0% no-repeat padding-box;\r\n border-radius: 20px;\r\n transform: scale(1.06);\r\n}\r\nsection:global(.recommended) header{\r\n color: #fff;\r\n}\r\n.main-price, .dontpay-price{\r\n position: relative;\r\n margin-bottom: 0;\r\n}\r\n.currency-symbol{\r\n position: relative;\r\n bottom: 12px;\r\n}\r\n.item-list{\r\n font-size: 0.85rem;\r\n padding: 0.25rem;\r\n}\r\nsection:global(.recommended .item-list){\r\n color: #fff;\r\n}\r\n.item-list .icon{\r\n width: 9px;\r\n height: 9px;\r\n padding: 9px;\r\n font-size: 9px;\r\n border-radius: 40px;\r\n background: var(--color-primary);\r\n color: #fff;\r\n}\r\nsection:global(.recommended .item-list .icon){\r\n background: var(--color-yellow);\r\n color: var(--color-dark-grey);\r\n}\r\n.text-on-current{\r\n color: #415B76;\r\n}\r\nsection:global(.recommended .text-on-current){\r\n color: #fff;\r\n}\r\n\r\n.container-items{\r\n padding: 1.25rem 1rem;\r\n}\r\n.container-items-product{\r\n padding: 0.25rem 2rem;\r\n}\r\n.content-item{\r\n margin-left: 12px;\r\n}\r\n.item-list-product {\r\n display: inline-flex;\r\n width: 320px;\r\n}\r\n.defaultItem{\r\n position: absolute;\r\n transform: rotate(45deg);\r\n padding: 0 4rem !important;\r\n background: var(--color-yellow);\r\n color: var(--color-dark-grey);\r\n font-size: 14px !important;\r\n font-weight: 600 !important;\r\n}\r\n.defaultItem:global(.has_discount){\r\n top: -70px;\r\n right: -89px;\r\n}\r\n.defaultItem:not(.has_discount){\r\n top: -40px;\r\n right: -89px;\r\n}\r\nfooter{\r\n padding: 0 !important;\r\n padding-top: 2rem !important; \r\n}\r\n.button-container-select{\r\n left: 0;\r\n margin: auto;\r\n position: absolute;\r\n width: 100%;\r\n bottom: 1rem;\r\n}\r\n.button-container-select button{\r\n padding: 24px 22px;\r\n}\r\n.button-container-select-product{\r\n margin: 1.25rem auto;\r\n}\r\n.button-container-select-product{\r\n justify-content: right;\r\n margin-right: 4rem;\r\n}\r\n@media only screen and (max-width:1023px){\r\n .button-container-select-product{\r\n justify-content: center;\r\n margin-right: 0rem;\r\n }\r\n}\r\n.plan-icons-container{\r\n font-size: 3rem;\r\n margin-right: 1.25rem;\r\n}\r\n.plan-icons-container .path1:before, .plan-icons-container .path2:before{\r\n color: var(--color-primary);\r\n}\r\n.recommended .plan-icons-container .path1:before, .recommended .plan-icons-container .path2:before{\r\n color: #fff\r\n}\r\n.recommended .content-item :global(strong){\r\n color: #fff\r\n}\r\n.content-item :global(strong){\r\n color: var(--color-primary);\r\n}\r\n.column-card-plan{\r\n min-width: 340px;\r\n}\r\n.special-discount-from-referral{\r\n background: var(--color-purple) !important;\r\n color:#fff !important;\r\n}\r\n.main-price.recommended .price-element{\r\n color: var(--color-yellow);\r\n \r\n}\r\n.price-element, .price-element-container{\r\n display: flex;\r\n align-items: baseline;\r\n}\r\n.price-element-container{\r\n justify-content: center;\r\n}\r\n.price-element-container-product{\r\n margin-left: 4.25rem;\r\n color: var(--color-dark-grey);\r\n}\r\n.price-element-product{\r\n display: inline-flex;\r\n}\r\n.tag-percent-off{\r\n color: var(--color-dark-grey);\r\n background-color: rgb(252 253 255 / 25%);\r\n color:#fff;\r\n font-size: 11px;\r\n}\r\n.percent-off-tag:not(.recommended){\r\n background: #f3f5ff;\r\n color: var(--color-black-bis);\r\n}\r\n.tag-percent{\r\n padding: 10px 12px;\r\n}\r\n.container-discount p{\r\n margin-bottom: 1rem;\r\n margin-left: 0.75rem;\r\n}\r\n</style>","<script>\r\nimport { random_string } from \"../../libraries/random_string\";\r\n\r\n\r\nexport let id = \"modal-\"+random_string(6);\r\nexport let classes = \"\";\r\nexport let classesContent = \"\";\r\nexport let classesHeader = \"\";\r\nexport let triggerClass = \"\";\r\nexport let styles = \"\";\r\nexport let closeOnClickOverlay = true;\r\nexport let onClose = function(){};\r\nexport let onOpen = function(){};\r\nexport let active = false;\r\n\r\n\r\nlet roleOverlay = \"\";\r\nlet modal = null;\r\nlet OverlayClick = ()=>{}\r\nif(closeOnClickOverlay === true){\r\n roleOverlay = \"data-micromodal-close\";\r\n OverlayClick = ()=>{\r\n active = false;\r\n }\r\n}\r\n\r\n\r\n\r\nfunction activeModal(){\r\n active = true;\r\n}\r\nfunction deactivateModal(){\r\n active = false;\r\n}\r\nclasses += \" is-open\"; \r\n\r\n$: if(modal !== null){\r\n let container = modal.querySelector(\".modal__container\");\r\n container.classList.add(\"animate__animated\", \"animate__fadeInUp\", \"faster\", \"animated\");\r\n document.body.appendChild(modal);\r\n}\r\n\r\n</script>\r\n<style>\r\n.modal__container{\r\n overflow-y:auto;padding-bottom:60px;\r\n}\r\n/**************************\\\r\n Basic Modal Styles\r\n\\**************************/\r\n\r\n.modal__overlay {\r\n position: fixed;\r\n top: 0;\r\n left: 0;\r\n right: 0;\r\n bottom: 0;\r\n background: rgb(80 78 96 / 45%);\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n z-index: 50;\r\n}\r\n\r\n.modal__container {\r\n background-color: #fff;\r\n padding: 30px;\r\n max-width: 500px;\r\n max-height: 100vh;\r\n border-radius: 4px;\r\n overflow-y: auto;\r\n box-sizing: border-box;\r\n}\r\n\r\n.modal__container.padding-0 {\r\n padding: 0;\r\n}\r\n\r\n.modal__header {\r\n display: flex;\r\n justify-content: end;\r\n align-items: center;\r\n}\r\n\r\n.modal__header.is-absolute-right {\r\n position: absolute !important;\r\n right: 1rem;\r\n top: 1rem;\r\n}\r\n\r\n.modal__title {\r\n margin-top: 0;\r\n margin-bottom: 0;\r\n font-weight: 600;\r\n font-size: 1.25rem;\r\n line-height: 1.25;\r\n color: #00449e;\r\n box-sizing: border-box;\r\n}\r\n\r\n.modal__close {\r\n background: transparent;\r\n border: 0;\r\n}\r\n\r\n.modal__header .modal__close:before { content: \"\\2715\"; }\r\n\r\n.modal__content {\r\n margin-top: 2rem;\r\n margin-bottom: 2rem;\r\n line-height: 1.5;\r\n color: rgba(0,0,0,.8);\r\n}\r\n.modal__content.margin-0{\r\n margin-top: 0;\r\n margin-bottom: 0;\r\n}\r\n\r\n.modal__btn {\r\n font-size: .875rem;\r\n padding-left: 1rem;\r\n padding-right: 1rem;\r\n padding-top: .5rem;\r\n padding-bottom: .5rem;\r\n background-color: #e6e6e6;\r\n color: rgba(0,0,0,.8);\r\n border-radius: .25rem;\r\n border-style: none;\r\n border-width: 0;\r\n cursor: pointer;\r\n -webkit-appearance: button;\r\n text-transform: none;\r\n overflow: visible;\r\n line-height: 1.15;\r\n margin: 0;\r\n will-change: transform;\r\n -moz-osx-font-smoothing: grayscale;\r\n -webkit-backface-visibility: hidden;\r\n backface-visibility: hidden;\r\n -webkit-transform: translateZ(0);\r\n transform: translateZ(0);\r\n transition: -webkit-transform .25s ease-out;\r\n transition: transform .25s ease-out;\r\n transition: transform .25s ease-out,-webkit-transform .25s ease-out;\r\n}\r\n\r\n.modal__btn:focus, .modal__btn:hover {\r\n -webkit-transform: scale(1.05);\r\n transform: scale(1.05);\r\n}\r\n\r\n.modal__btn-primary {\r\n background-color: #00449e;\r\n color: #fff;\r\n}\r\n\r\n\r\n\r\n/**************************\\\r\n Demo Animation Style\r\n\\**************************/\r\n.micromodal-slide {\r\n display: none;\r\n}\r\n\r\n.micromodal-slide.is-open {\r\n display: block;\r\n}\r\n\r\n.micromodal-slide .modal__container,\r\n.micromodal-slide .modal__overlay {\r\n will-change: transform;\r\n}\r\n.modal__container{\r\n max-width: 900px;\r\n min-width: 320px;\r\n width: 100%;\r\n min-height: 50px;\r\n max-height: calc(100vh - 3.25rem);\r\n border-radius: 20px;\r\n position: relative;\r\n z-index: 10;\r\n animation: fadeInUp; /* referring directly to the animation's @keyframe declaration */\r\n animation-duration: 0.5s; /* don't forget to set a duration! */\r\n}\r\n.custom-modal [data-micromodal-close]{\r\n cursor: pointer;\r\n}\r\na{\r\n width: 100%;\r\n height: 100%;\r\n}\r\n.overlay_trigger{\r\n position: absolute;\r\n width: 100%;\r\n height: 100%;\r\n z-index: 5;\r\n}\r\n</style>\r\n{#if active === true}\r\n <div class=\"custom-modal {classes} micromodal-slide\" id=\"{id}\" aria-hidden=\"true\" bind:this={modal}>\r\n <section class=\"modal__overlay\" tabindex=\"-1\" data-trigger={roleOverlay} >\r\n <div class=\"overlay_trigger\" on:click={OverlayClick}></div>\r\n <div style=\"{styles}\" class=\"modal__container animate__animated animate__fadeInUp faster animated custom-scrollbar {classesContent}\" role=\"dialog\" aria-modal=\"true\" aria-labelledby=\"{id}-title\">\r\n <header class=\"modal__header {classesHeader}\" style=\"position:relative;\">\r\n <slot name=\"title\" {active}></slot>\r\n <button class=\"modal__close\" aria-label=\"Close modal\" on:click=\"{deactivateModal}\" data-micromodal-close on:click=\"{onClose}\"></button>\r\n </header>\r\n <main class=\"modal__content {classesContent}\" id=\"{id}-content\">\r\n <slot hide={deactivateModal} open={activeModal}></slot>\r\n <slot name=\"content\" {active}></slot>\r\n </main>\r\n <footer class=\"modal__footer\" id=\"{id}-footer\">\r\n <slot name=\"footer\" {active}></slot>\r\n </footer>\r\n </div>\r\n </section>\r\n </div>\r\n{/if}\r\n<a class=\"{triggerClass}\" style=\"text-decoration: none;\" href=\"# \" on:click|preventDefault={activeModal} on:click|preventDefault={onOpen}>\r\n <slot name=\"trigger\"></slot>\r\n</a>\r\n\r\n\r\n<!-- LAYOUT EXAMPLE\r\n\r\n\r\n<SimpleModal id=\"modal_1\" closeOnClickOverlay={true}>\r\n <div slot=\"title\" let:active>\r\n Title\r\n </div>\r\n <div slot=\"content\" let:active>\r\n Hello Content\r\n </div>\r\n <div slot=\"footer\" let:active>\r\n Footer\r\n </div>\r\n <div slot=\"trigger\" let:active>\r\n <button>\r\n Open\r\n </button>\r\n </div>\r\n</SimpleModal>\r\n\r\n\r\n-->","<script>\r\nimport SimpleModal from './SimpleModal.svelte';\r\nexport let content = \"\";\r\nexport let onConfirm = function(){};\r\nexport let onCancel = function(){};\r\nexport let cancel_button = \"Cancelar\";\r\nexport let confirm_button = \"Sí\";\r\nexport let classesCancel = \"is-danger is-outlined\";\r\nexport let classesConfirm = \"is-success has-text-white\";\r\n</script>\r\n<style>\r\n.footer{\r\n padding: 0;\r\n background-color: transparent;\r\n}\r\n.content{\r\n margin: 0;\r\n}\r\n</style>\r\n<SimpleModal let:hide={hide} active={true} styles=\"min-width:320px;max-width:485px;width:100%;\">\r\n <div class=\"content has-text-centered\" slot=\"content\">\r\n {@html content}\r\n </div>\r\n <div class=\"footer\" slot=\"footer\">\r\n <div class=\"buttons is-grouped is-centered\">\r\n <button on:click={()=>{ hide(); onCancel();}} class=\"button {classesCancel}\">\r\n {cancel_button}\r\n </button>\r\n <button on:click={()=>{ hide(); onConfirm();}} class=\"button {classesConfirm}\">\r\n {confirm_button}\r\n </button>\r\n </div>\r\n </div>\r\n</SimpleModal>","<script>\r\nexport let color = \"is-default\";\r\n</script>\r\n<style>\r\n.loader-svelte{\r\n background: transparent !important;\r\n border: 0 !important;\r\n}\r\n</style>\r\n<div class=\"field\">\r\n <div class=\"control\">\r\n <div class=\"buttons is-grouped is-centered\">\r\n <button type=\"button\" class=\"is-loading button loader-svelte {color} is-large\"></button>\r\n </div>\r\n </div>\r\n</div>","const selectData = ( arr, item, value, return_type )=> {\r\n return_type = return_type ?? null;\r\n let process;\r\n if(return_type === \"filter\"){\r\n process = return_type\r\n }else{\r\n process = \"find\";\r\n }\r\n if(Array.isArray(arr)){\r\n return arr.find(( element, key )=>{\r\n if(element[item] === value){\r\n if(return_type === \"key\"){\r\n return key;\r\n }\r\n return element;\r\n }\r\n })\r\n }\r\n return [];\r\n}\r\n\r\n\r\nexport {selectData}","const parseDate = {\r\n convert: function(unixtime){\r\n return new Date(unixtime * 1000);\r\n },\r\n months: [\"01\", \"02\", \"03\", \"04\", \"05\", \"06\", \"07\", \"08\", \"09\", \"10\", \"11\", \"12\"],\r\n day: function(date){\r\n date = `0${date}`;\r\n date = date.split(\"\");\r\n if(date.length > 2){\r\n delete date[0];\r\n }\r\n return date.join(\"\");\r\n },\r\n full: function( unixtime ){\r\n\r\n var time = this.convert( unixtime );\r\n return `${this.months[time.getMonth()]}-${this.day(time.getDate())}-${time.getFullYear()} | ${time.getHours()}:${time.getMinutes()}:${time.getSeconds()}`\r\n },\r\n onlytime: function(unixtime){\r\n var time = this.convert( unixtime );\r\n return `${time.getHours()}:${time.getMinutes()}:${time.getSeconds()}`;\r\n },\r\n onlydate: function(unixtime, format){\r\n var time = this.convert( unixtime );\r\n\r\n format = format || \"d-m-Y\";\r\n var date = {\r\n Y: time.getFullYear(),\r\n m: this.months[time.getMonth()],\r\n d: this.day(time.getDate()),\r\n };\r\n format = format.split(\"-\");\r\n var getDate = [];\r\n format.map(function( data ){\r\n if(typeof date[data] === \"undefined\"){\r\n console.warn(\"undefined \"+data+\" date value.\")\r\n return;\r\n }\r\n getDate.push(date[data])\r\n })\r\n return getDate.join(\"-\");\r\n }\r\n}\r\n\r\nexport {parseDate};","<script>\r\n\timport ModalAlert from './../components/Modals/ModalAlert.svelte';\r\nimport Spinner from './../components/Elements/Spinner.svelte';\r\nimport { selectData } from \"../libraries/selectData\";\r\nimport { parseDate } from \"../libraries/parseDate\";\r\nimport { random_string } from '../libraries/random_string';\r\nimport { SubscriptionsStore } from './SubscriptionsStore';\r\nexport let subscriptions = [];\r\nexport let lang;\r\nexport let all_plans;\r\nexport let all_addons;\r\nexport let tripod_plans;\r\nexport let currency = tripod_plans.currency;\r\nlet rendered_data = $SubscriptionsStore.rendered_data;\r\nlet atLeastOneSubscription = $SubscriptionsStore.atLeastOneSubscription ;\r\nlet translations = tripod_plans.lang;\r\nlet links = tripod_plans.links.currentMemberships;\r\nlet registered_subscriptions = [];\r\nlet registered_plans = [];\r\n\r\n\r\nfunction getStripeSubs(){\r\n return registered_plans;\r\n}\r\n\r\n$: {\r\n if($SubscriptionsStore.registered_plans){\r\n registered_plans = $SubscriptionsStore.registered_plans\r\n }\r\n}\r\n\r\n\r\n\r\n\r\ntripod_plans.cancelProduct = tripod_plans.cancelProduct || function(){}\r\n\r\n\r\nfunction onCancelProduct(subscription){\r\n let id = \"cancel-\"+random_string(6);\r\n new ModalAlert({\r\n target: document.body,\r\n props: {\r\n content: `\r\n <h2>\r\n ¿Deseas cancelar esta membresía?\r\n </h2>\r\n <p class=\"has-text-center\">\r\n <strong class=\"has-text-danger\">Esta acción no se puede deshacer.</strong>\r\n <br> \r\n Antes de proceder debe saber que:\r\n </p>\r\n <ol class=\"has-text-left\" style=\"margin-left: 14px;\">\r\n <li>La cancelación del servicio va a tomar efecto al finalizar el período actual.</li>\r\n <li>No se aplicarán más cargos recurrentes en tu tarjeta.</li>\r\n <li>Puede seguir usando 3pod hasta que el tiempo restante del período actual termine.</li>\r\n <li>Se puede suscribir de nuevo luego de finalizar el período de cancelación.</li>\r\n </ol>\r\n `,\r\n cancel_button: \"Volver\",\r\n confirm_button: \"Cancelar Membresía\",\r\n classesConfirm: \"is-outlined is-light is-fullwidth has-text-danger has-background-white\",\r\n classesCancel: \"is-primary has-text-white is-fullwidth\",\r\n onConfirm: ()=>{\r\n let input = document.getElementById(id);\r\n tripod_plans.cancelProduct(subscription, input);\r\n },\r\n onCancel: ()=>{\r\n \r\n }\r\n }\r\n }) \r\n}\r\n\r\n\r\n</script>\r\n<style>\r\n.box-memberships{\r\n color: #fff;\r\n background: transparent linear-gradient(118deg, #344fff 0%, #09E2FF 100%) 0% 0% no-repeat padding-box;;\r\n}\r\n.table-currentMemberships-container .field{\r\n display: flex;\r\n align-items: center;\r\n min-height: 38px;\r\n color: #fff;\r\n}\r\ntable{\r\n margin-top: 1.25rem;\r\n background: transparent !important;\r\n}\r\n.tag-interval{\r\n background-color: rgba(255,255,255,0.17);\r\n padding-left: 1.75rem;\r\n padding-right: 1.75rem;\r\n}\r\n.container-box{\r\n max-width: 768px;\r\n justify-content: center;\r\n align-items: center;\r\n margin: auto;\r\n}\r\n.container-box .field{\r\n min-width: 70%;\r\n}\r\n.box-memberships{\r\n width: 100%;\r\n max-width: 640px;\r\n min-width: 320px;\r\n}\r\n.container-current-memberships{\r\n display: flex;\r\n justify-content: center;\r\n}\r\n</style>\r\n{#if typeof subscriptions === \"object\"}\r\n {#if $SubscriptionsStore.registered_plans.length > 0}\r\n <section class=\"columns is-multiline is-centered\">\r\n <div class=\"column is-12 container-current-memberships\">\r\n <div class=\"box box-memberships\">\r\n <div class=\"container-box is-flex\">\r\n <div class=\"field\">\r\n {#if $SubscriptionsStore.rendered_data === true}\r\n <header>\r\n <h2 class=\"fw800 is-size-4 has-text-left\">\r\n {lang.currentMemberships.title} \r\n <span class=\"is-size-7 fw200\">\r\n <a href=\"{links.invoiceData}\" class=\"has-text-white is-underlined\">\r\n {lang.currentMemberships.invoiceInfo}\r\n </a>\r\n </span>\r\n </h2>\r\n </header>\r\n <main>\r\n <table class=\"is-fullwidth table-currentMemberships-container is-hoverable table\">\r\n {#if all_plans !== false && $SubscriptionsStore.atLeastOneSubscription === true}\r\n\r\n {#each $SubscriptionsStore.registered_plans.filter(( subscription )=>{\r\n \r\n let list = all_plans;\r\n if(subscription.is_addon === true){\r\n list = all_addons;\r\n }\r\n \r\n let plan = selectData(list, \"__id__\", subscription.id_plan);\r\n\r\n subscription.internal_plan = plan;\r\n \r\n let stripe_sub = selectData(getStripeSubs(), \"id_plan\", subscription.id_plan) ?? false;\r\n \r\n subscription.canceled = false;\r\n if(subscription?.is_sub_canceled?.canceled_at){ \r\n /**\r\n * On subscription canceled\r\n */\r\n subscription.canceled = true;\r\n let cancelData = subscription?.is_sub_canceled;\r\n let created = cancelData.created,\r\n canceled_at = cancelData.canceled_at,\r\n current_period_end = cancelData.current_period_end;\r\n\r\n /**\r\n * Si es mayor a un mes\r\n * entonces es year\r\n * sino month\r\n */\r\n let interval = ((current_period_end - created)/3600)/30 > 27 ? \"year\" : \"month\";\r\n\r\n \r\n subscription.interval = interval; \r\n subscription.endAt = parseDate.onlydate(current_period_end, \"Y-m-d\");\r\n subscription.startAt = parseDate.onlydate(created, \"Y-m-d\"); \r\n } \r\n\r\n \r\n subscription.has_been_terminated = false;\r\n if(subscription.status === \"canceled\"){\r\n subscription.canceled = true;\r\n subscription.has_been_terminated = true;\r\n return subscription;\r\n }\r\n \r\n \r\n if(stripe_sub === false){\r\n return subscription;\r\n }\r\n \r\n subscription.stripePlan = stripe_sub.plan;\r\n subscription.priceInNextPeriod = stripe_sub.price.unit_amount / 100;\r\n let percent_off = stripe_sub?.discount?.coupon?.percent_off ?? null;\r\n if(typeof percent_off === \"number\"){\r\n subscription.priceInNextPeriod = subscription.priceInNextPeriod-((percent_off/100)*subscription.priceInNextPeriod);\r\n }\r\n\r\n subscription.nextInvoice = +(subscription.nextInvoice.toFixed(2));\r\n subscription.priceInNextPeriod = +(subscription.priceInNextPeriod.toFixed(2));\r\n \r\n \r\n subscription.coupon = stripe_sub?.coupon ?? false;\r\n subscription.interval = subscription.stripePlan?.interval ?? \"month\";\r\n\r\n subscription.endAt = parseDate.onlydate(stripe_sub.current_period_end, \"Y-m-d\");\r\n subscription.startAt = parseDate.onlydate(stripe_sub.current_period_start, \"Y-m-d\");\r\n \r\n \r\n return subscription;\r\n }) as subscription}\r\n {#if subscription.registered_at_stripe === true && subscription.has_been_terminated === false}\r\n <tr>\r\n <td>\r\n <div class=\"field\">\r\n <img src=\"\" alt=\"\">\r\n <h3 class=\"fw600\">\r\n {subscription.internal_plan.name_plan}\r\n </h3>\r\n </div>\r\n </td>\r\n <td>\r\n <div class=\"field\">\r\n <div style=\"width:100%;\">\r\n {#if subscription.canceled === false && subscription.cancel_at_period_end !== true}\r\n <p class=\" has-text-centered\">\r\n <span class=\"tag is-primary is-rounded tag-interval\">\r\n {translations[subscription.interval] ?? \"M\"}\r\n </span>\r\n </p>\r\n <p class=\"is-size-7 has-text-centered\">\r\n <!-- svelte-ignore a11y-missing-attribute -->\r\n <a on:click=\"{()=>{ onCancelProduct(subscription) }}\" class=\"is-underlined has-text-white pointer\">\r\n {translations.currentMemberships.cancel}\r\n </a>\r\n </p>\r\n {:else}\r\n <p class=\"is-size-7 has-text-centered\">\r\n {translations.currentMemberships.canceled}\r\n </p>\r\n {/if}\r\n </div>\r\n </div>\r\n </td>\r\n <td>\r\n <div class=\"field\">\r\n <div>\r\n {#if subscription.canceled === false}\r\n <p class=\"fw600\">\r\n <span>\r\n {currency[0]}\r\n </span>\r\n {subscription.priceInNextPeriod}\r\n <span>\r\n {currency[1]}\r\n </span>/ \r\n <span class=\"is-lowercase\">\r\n {translations[subscription.interval] ?? \"M\"} \r\n </span>\r\n </p>\r\n {/if}\r\n <p>\r\n <span class=\"fw200 is-size-7\">\r\n {#if subscription.canceled === false && subscription.cancel_at_period_end !== true}\r\n {translations.currentMemberships.renewal}: \r\n {:else}\r\n {translations.currentMemberships.endAt}: \r\n {/if}\r\n <span>\r\n {subscription.endAt}\r\n </span>\r\n </span>\r\n </p>\r\n </div>\r\n </div>\r\n </td>\r\n </tr>\r\n {/if}\r\n {/each}\r\n {/if}\r\n </table>\r\n {#if $SubscriptionsStore.atLeastOneSubscription === false}\r\n <div>\r\n <p class=\"has-text-centered has-text-white\">\r\n {translations.currentMemberships.withOutMemberships}\r\n <br>\r\n <br>\r\n </p>\r\n </div>\r\n {/if}\r\n {#if translations?.currentMemberships?.buttonView ?? false !== false}\r\n <!--<div class=\"buttons is-grouped is-centered\">\r\n <a href=\"{links.viewPlans}\" class=\"is-rounded attr-buttonView has-text-white fw200 is-underlined\">\r\n {translations.currentMemberships.buttonView}\r\n </a>\r\n </div>-->\r\n {/if}\r\n </main>\r\n {:else}\r\n <Spinner />\r\n <!--<div class=\"buttons is-grouped is-centered\">\r\n <a href=\"{links.viewPlans}\" class=\"is-rounded attr-buttonView has-text-white fw200 is-underlined\">\r\n {translations.currentMemberships.buttonView}\r\n </a>\r\n </div>-->\r\n {/if}\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </section> \r\n {/if}\r\n{/if}","<script>\r\nimport { random_string } from \"../../libraries/random_string\";\r\n\r\n\r\n\r\nexport let id = \"switch-\"+random_string(6);\r\nexport let name = \"\";\r\nexport let checked = `checked='checked'`;\r\nexport let on_change = function(){};\r\n</script>\r\n<style>\r\n.field-switch-component :global(.switch[type=\"checkbox\"]+label::before), .field-switch-component :global(.switch[type=\"checkbox\"]+label:before){\r\n top: calc( 50% - 0.75rem * 0.5);\r\n height: 0.75rem;\r\n width: 2rem;\r\n background: #E1E8ED;\r\n}\r\n.field-switch-component :global(.switch[type=\"checkbox\"]:checked+label::before), .field-switch-component :global(.switch[type=\"checkbox\"]:checked+label:before){\r\n background: #E1E8ED;\r\n}\r\n\r\n.field-switch-component :global(.switch[type=\"checkbox\"]+label){\r\n padding-left: 2.55rem;\r\n}\r\n.field-switch-component :global(.switch[type=\"checkbox\"]:not(:checked)+label::after), .field-switch-component :global(.switch[type=\"checkbox\"]:not(:checked)+label:after){\r\n left: 0;\r\n background: #AAB8C2\r\n}\r\n.field-switch-component :global(.switch[type=\"checkbox\"]:checked+label::after), .field-switch-component :global(.switch[type=\"checkbox\"]:checked+label:after){\r\n background: linear-gradient(45deg, #344fff, #09e2ff);\r\n left: 1.125rem;\r\n}\r\n</style>\r\n<div class=\"field field-switch-component\">\r\n <slot name=\"label1\" id={id}></slot>\r\n <input on:change=\"{(e)=>{ on_change(e); }}\" id=\"{id}\" type=\"checkbox\" name=\"{name}\" class=\"switch is-rounded\" {checked}>\r\n <slot name=\"label2\" id={id}></slot>\r\n</div>\r\n","/*\r\n _______ _ _ _____ _____ _____ _ _ _____ \r\n |__ __| | | | __ \\| __ \\_ _| /\\ | | | |/ ____|\r\n | | | | | | |__) | |__) || | / \\ | | | | (___ \r\n | | | | | | _ /| ___/ | | / /\\ \\ | | _ | |\\___ \\ \r\n | | | |__| | | \\ \\| | _| |_ / ____ \\| |____ | |__| |____) |\r\n |_| \\____/|_| \\_\\_| |_____/_/ \\_\\______| \\____/|_____/ \r\n * Turpial JS Library V. 1.0.0\r\n * License: MIT.\r\n * Copyright Yorman Maricuto, May 2019.\r\n * @twitter: @MaricutoYorman, @Instagram: maricuto\r\n * Micro-Library to create web components, multi-fetch elements, append styles, scripts, templating engine JSX\r\n*/\r\nclass Turpial\r\n{\r\n\tconstructor( tpObj = {} )\r\n\t{\r\n\t\t// this is for generate\r\n\t\t// a family tree of birds \r\n\t\t// (parents-childrens -> map)\r\n\t\t// this is is to control realDOM (update-delete-insert-read)\r\n\t\tthis.birds = [];\r\n\t\tthis.un = (v, r = \"\")=> {\r\n\t\t\tif(typeof v === \"undefined\"){return r;}\r\n\t\t\telse{return v;}\r\n\t\t};\r\n\t\tthis.searchStr = (where, what, position = false)=>{\r\n\t\t\tlet search = where.search( what );\r\n\t\t\tif(search === -1){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tif(position === true){return search;}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tthis.replacement = (target, search, replacement)=>{\r\n\t\t\treturn target.split( search ).join( replacement )\r\n\t\t}\r\n\t\tthis.find = (selector)=>{\r\n\t\t\tif(typeof selector === \"string\"){\r\n\t\t\t\treturn document.getElementById(selector);\r\n\t\t\t}else{return selector;}\r\n\t\t}\r\n\t\t// helpers\r\n\t\tthis.ext = \".turpial.js\";\t\t\r\n\t\tthis.allowStateEvents = this.un(tpObj.allowStateEvents, false);\r\n\t\tthis.loadModulesOnRoute = this.un(tpObj.loadModulesOnRoute, true);\r\n\t\tthis.autoloader = this.un( tpObj.autoloader, false );\r\n\t\tthis.autoloader_folder = this.un( tpObj.autoloader_folder, \"\" );\r\n\t\tthis.cache = this.un( tpObj.cache, \"public\" );\r\n\t\tthis.public_path = this.un( tpObj.public_path, \"\" );\r\n\t\tthis.core_path = this.un( tpObj.core_path, \"\" );\r\n\t\tthis.folder = this.un( tpObj.core_path, \"/turpial/\" );\r\n\t\tthis.loader = {};\r\n\t\tthis.httpRequests = [];\r\n\t\tthis.loader.show = this.un( tpObj.loaderShow, null );\r\n\t\tthis.loader.hide = this.un( tpObj.loaderHide, null );\r\n\t\tthis.views = {};\r\n\t\tthis.statusResources = \"loaded\";\r\n\t\tthis.resources = {};\r\n\t\tthis.myComponents = [];\r\n\t\tthis.random_string = (length) => {\r\n\t\t\t\"undefined\"==typeof length&&(length=6);for(var result=\"\",characters=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\",charactersLength=characters.length,i=0;i<length;i++)result+=characters.charAt(Math.floor(Math.random()*charactersLength));\r\n\t\t\treturn result;\r\n\t\t}\r\n\t\tthis.selectData = ( arr, item, value, return_key )=> {\r\n\t\t\treturn_key = turpial.un(return_key, false);\r\n\t\t\tvar get = \"\";\r\n\t\t\tarr.forEach(function( dta, key ){\t\r\n\t\t\t\tif(dta[item] == value){\r\n\r\n\t\t\t\t\tif(return_key === true){\r\n\t\t\t\t\t\tget = key;\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tget = dta;\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\treturn get;\r\n\t\t}\r\n\t\tthis.component = {\r\n\t\t\tapplyProps: ( tag, props )=>{\r\n\t\t\t\tconst applying = ()=>{\r\n\t\t\t\t\tconst elements = document.querySelectorAll( tag );\r\n\t\t\t\t\t// like a spread operator\r\n\t\t\t\t\tArray.prototype.slice.call(elements). \r\n \t\tforEach(function(el){\r\n \t\tprops(el);\r\n \t\t})\r\n\t\t\t\t}\r\n\t\t\t\tconst implement = ()=>{\r\n\t\t\t\t\tif(this.statusResources\t=== \"loading\"){\r\n\t\t\t\t\t\tvar limit = 0;\r\n\t\t\t\t\t\tvar interval = setInterval(()=>{\r\n\t\t\t\t\t\t\tif(limit > 6000){\r\n\t\t\t\t\t\t\t\tconsole.warn(\"error loading resources and applying components\");\r\n\t\t\t\t\t\t\t\tclearInterval(interval);\r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tlimit = limit + 20;\r\n\t\t\t\t\t\t\tif(this.statusResources\t=== \"loaded\"){\r\n\t\t\t\t\t\t\t\tclearInterval(interval);\r\n\t\t\t\t\t\t\t\tapplying( tag, props );\r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}, 20)\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tapplying( tag, props );\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\twindow.addEventListener(\"load\", ()=>{\r\n\t\t\t\t\timplement();return;\r\n\t\t\t\t})\r\n\t\t\t\tif(document.readyState === \"complete\"){\r\n\t\t\t\timplement();return;}\t\t\t\r\n\t\t\t},\r\n\t\t\tset: (obj)=>{\r\n\t\t\t\tconst app = this;\r\n\t\t\t\tconst component = app.component;\r\n\t\t\t\tvar props = obj.props;\r\n\t\t\t\tvar tag = obj.tag;\r\n\t\t\t\tapp.myComponents.push( {tag: tag, props: props} );\r\n\t\t\t\tvar extendTo = app.un( obj.extends, null );\t\t\t\t\r\n\t\t\t\tif(extendTo !== null){extendTo = {extends: extendTo} }\r\n\t\t\t\tif(typeof window.customElements === \"undefined\"){\r\n\t\t\t\t\tapp.component.olderVerBrow = ()=>{\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcomponent.applyProps( tag, props );\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tvar get = window.customElements.get(tag);\r\n\t\t\t\tif(typeof get !== \"undefined\"){return;}\r\n\t\t\t\twindow.customElements.define(tag, class extends HTMLElement {\r\n\t\t\t\t\tconstructor( props = obj.props ){\r\n\t\t\t\t\t\tsuper(((props)=>{\r\n\t\t\t\t\t\t\t// on load window or document loaded...\r\n\t\t\t\t\t\t\tcomponent.applyProps( tag, props );\r\n\t\t\t\t\t\t})(props));\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}, extendTo);\r\n\t\t\t}\r\n\t\t};\r\n\t\tthis.view = {};\r\n\t\tthis.models = {};\r\n\t\tthis.models.sources = {};\r\n\t\tthis.controller = {};\t\r\n\t\tthis.urls = {};\r\n\t\tthis.filesLoaded = {};\r\n\t\tthis.inject = (files)=>{\r\n\t\t\tfor(const file of files){\r\n\t\t\t\tif(this.filesLoaded[ file ].tagName === \"STYLE\"){\r\n\t\t\t\t\tthis.filesLoaded[ file ].innerHTML = this.filesLoaded[ file ].text;\r\n\t\t\t\t}\r\n\t\t\t\tdocument.head.appendChild( this.filesLoaded[ file ] );\r\n\t\t\t}\r\n\t\t}\r\n\t\t// end helpers\r\n\t\tthis.models.fetch = (obj)=>{\r\n\t\t\tlet app = this;\r\n\t\t\tlet type = obj.type || \"script\";\r\n\t\t\tconst cancelOnResend =\tapp.un(obj.cancelOnResend, null );\r\n\t\t\tconst headers = app.un(obj.options, null );\r\n\t\t\tconst method = app.un(obj.method, \"GET\" );\r\n\t\t\tconst attributes = app.un(obj.attributes, [] );\r\n\r\n\t\t\tobj.url = obj.url || [];\r\n\t\t\tobj.file = obj.file || obj.url;\r\n\t\t\tobj.files = obj.files || obj.file;\r\n\r\n\t\t\tvar files = obj.files;\r\n\r\n\t\t\tif(typeof obj.ready === \"undefined\"){obj.ready = ()=>{}}\r\n\t\t\tif(typeof files === \"string\"){files = [ files ];}\t\r\n\t\t\tconst Head = document.head;\r\n\t\t\tconst loaded = [];\r\n\t\t\tconst unloaded = [];\r\n\t\t\tlet text = [];\r\n\t\t\tobj.getString = ( r )=>{return r.clone().text();}\r\n\t\t\tobj.fetching = ( file )=>{\r\n\r\n\t\t\t\t// remove if the element exist \r\n\t\t\t\t// to not create scripts elements with the same things...\r\n\t\t\t\t// just ignoring or stopping the re-injecting will fail...\r\n\t\t\t\tif(typeof app.filesLoaded[file] !== \"undefined\" && type === \"script\")\r\n\t\t\t\t{app.filesLoaded[file].remove()}\r\n\t\t\t\tvar request = new XMLHttpRequest();\t\t\t\t\r\n\t\t\t\trequest.open(method, file, true);\r\n\t\t\t\tconst options = [];\r\n\t\t\t\tconst headersValues = [];\r\n\r\n\t\t\t\tif(headers !== null){\r\n\t\t\t\t\tfor(var header in headers){\r\n\t\t\t\t\t\theadersValues.push( headers[header] );\r\n\t\t\t\t\t}\r\n\t\t\t\t\tObject.keys(headers).forEach(function(name, k){\r\n\t\t\t\t\t\toptions.push( [ name, headersValues[k]] )\r\n\t\t\t\t\t});\t\t\t\r\n\t\t\t\t\toptions.forEach(function(option){\r\n\t\t\t\t\t\trequest.setRequestHeader( option[0], option[1] );\t\t\t\t\t\r\n\t\t\t\t\t})\t\r\n\t\t\t\t}\r\n\t\t\t\trequest.onload = function() {\r\n\t\t\t\t if (request.status >= 200 && request.status < 400) {\r\n\t\t\t\t \tvar resource = request.responseText;\r\n\t\t\t\t \ttext.push( resource );\r\n\t\t\t\t \tvar elementTag;\r\n\t\t\t\t \tif(type === \"script\" || type === \"style\" || type === \"link\"){\r\n\t\t\t\t \t\telementTag = type;\r\n\t\t\t\t \t}else{\r\n\t\t\t\t \t\t// if tag name is another than both above.\r\n\t\t\t\t \t\telementTag = \"script\"; \r\n\t\t\t\t \t}\t\t\t\t \t\r\n\t\t\t\t\tvar el = document.createElement(elementTag);\r\n\r\n\t\t\t\t\tattributes.map(( attribute )=>{\r\n\t\t\t\t\t\t// Example: <script [name]=[content] src=\"...\"></script>\r\n\t\t\t\t\t\tel.setAttribute(attribute.name, attribute.content);\r\n\t\t\t\t\t})\r\n\r\n\t\t\t\t\tif(type === \"style\"){\r\n\t\t\t\t\t\tel.type = \"text/css\";\r\n\t\t\t\t\t}else if(type === \"link\"){\r\n\t\t\t\t\t\tel.rel = \"stylesheet\";\r\n\t\t\t\t\t\tel.media = \"all\";\r\n\t\t\t\t\t\tel.href = file;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tel.text = resource;\r\n\t\t\t\t\tapp.filesLoaded[ file ] = el;\r\n\t\t\t\t\tloaded.push( file );\t\t\t\t \t\r\n\t\t\t\t }else{\r\n\t\t\t\t \tif(typeof obj.onerror === \"function\" && request.status >= 400){\r\n\t\t\t\t\t\treturn obj.onerror( request.status );\r\n\t\t\t\t\t}\r\n\t\t\t\t }\r\n\t\t\t\t};\r\n\t\t\t\trequest.onerror = function(){\r\n\t\t\t\t\tapp.filesLoaded[ file ] = \"\";\r\n\t\t\t\t\tloaded.push( \"unloaded:\"+file );\r\n\t\t\t\t\tunloaded.push( file );\r\n\t\t\t\t}\r\n\t\t\t\tif(cancelOnResend === true){\r\n\t\t\t\t\tlet idRequest = \"rq_\"+app.un(obj.id, app.random_string(4));\r\n\t\t\t\t\tlet rq = app.httpRequests[idRequest];\r\n\t\t\t\t\tif(typeof rq !== \"undefined\"){\r\n\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\tapp.httpRequests[idRequest].abort();\r\n\t\t\t\t\t\t} catch(e){\r\n\t\t\t\t\t\t\tconsole.warn(\"unable to cancel request.\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tapp.httpRequests[idRequest] = request;\r\n\t\t\t\t}\t\t\t\r\n\t\t\t\tif(method === \"POST\"){ \r\n\t\t\t\t\trequest.send( obj.data );\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\trequest.send();\r\n\t\t\t}\r\n\t\t\tapp.statusResources\t= \"loading\";\t\r\n\t\t\t( (files)=>{\r\n\t\t\t\tfor(const file of files){\r\n\t\t\t\t\t obj.fetching( file );\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tvar counter = 0;\r\n\t\t\t\tlet check = setInterval(()=>{\r\n\t\t\t\t\tcounter = counter + 70;\r\n\t\t\t\t\tlet forceLoad = false;\r\n\t\t\t\t\tif(counter === 10000){\r\n\t\t\t\t\t\tforceLoad = true;\r\n\t\t\t\t\t\tconsole.warn(\"¡Impossible to load all files.\")\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(loaded.length === files.length || forceLoad === true){\r\n\t\t\t\t\t\tclearInterval(check);\r\n\t\t\t\t\t\tif(type === \"script\" || type === \"style\" || type === \"link\"){\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tapp.inject(files);\r\n\t\t\t\t\t\t\tobj.ready();\r\n\t\t\t\t\t\t}else if(type === \"text\"){\r\n\t\t\t\t\t\t\tvar texts = [];\r\n\t\t\t\t\t\t\tfor(var file of files){\r\n\t\t\t\t\t\t\t\ttexts.push( app.filesLoaded[file].innerHTML );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tobj.ready( texts );\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tapp.statusResources\t= \"loaded\";\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t}, 70)\r\n\t\t\t})(files);\r\n\t\t};\r\n\t\tthis.fetch = (props)=>{return this.models.fetch(props)}\r\n\t\tthis.include = (props)=>{return this.models.fetch(props)}\r\n\t\tthis.linkCSS = (props)=>{\r\n\t\t\tprops.type = \"link\";\r\n\t\t\tvar app = this;\t\r\n\t\t\tprops.type = \"style\";\r\n\t\t\tprops.url = props.url||[];\r\n\t\t\tprops.file = props.file || props.url;\r\n\t\t\tprops.files = props.files || props.file;\r\n\t\t\tvar nodes = [];\r\n\t\t\tprops.files.map((file)=>{\r\n\t\t\t\tvar link = document.createElement(\"link\");\r\n\t\t\t\tlink.setAttribute(\"media\", \"all\");\r\n\t\t\t\tlink.setAttribute(\"rel\", \"stylesheet\");\r\n\t\t\t\tlink.href = file;\r\n\t\t\t\tvar el = app.mount(document.head, link);\r\n\t\t\t\tnodes.push(el);\r\n\t\t\t})\r\n\t\t\tprops.ready(nodes);\r\n\t\t\treturn nodes;\r\n\t\t\t// return this.models.fetch(props)\r\n\t\t}\r\n\t\tthis.includeCSS = (props)=>{\t\t\r\n\t\t\tprops.type = \"style\";\r\n\t\t\treturn this.models.fetch(props)\r\n\t\t}\r\n\t\tthis.controller.views = {\r\n\t\t\tpath: (obj)=>{\r\n\t\t\t\tconst ext = this.ext; \r\n\t\t\t\tvar folder = `${this.folder}views/`;\r\n\t\t\t\tvar file_name = obj.views;\t\t\t\r\n\t\t\t\tvar resources = this.resources;\t\r\n\t\t\t\t// in case of route.\r\n\t\t\t\tvar routing = file_name.split(\"/\");\r\n\t\t\t\tvar Path = folder;\t\t\r\n\t\t\t\tif(routing.length === 1){\r\n\t\t\t\t\tvar file = routing[0];\r\n\t\t\t\t\tPath += `${file}${ext}`;\r\n\t\t\t\t\tresources[file] = {}; // create view instance.\r\n\t\t\t\t\treturn Path;\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\t// file\r\n\t\t\t\t\tvar last = routing.pop();\r\n\t\t\t\t\t// last folder\r\n\t\t\t\t\tvar penultimate = routing.pop();\t\r\n\t\t\t\t\tvar LastFolder = penultimate;\r\n\t\t\t\t\tvar file = last;\r\n\t\t\t\t\tresources[LastFolder] = {}; // create view instance.\r\n\t\t\t\t\tresources[LastFolder][file] = {}; // create view instance.\r\n\t\t\t\t}\r\n\t\t\t\tif(routing.length === 0){\r\n\t\t\t\t\tPath += `${LastFolder}/${file}${ext}`;\r\n\t\t\t\t}else{\r\n\t\t\t\t\trouting.forEach(function(subfolder){\r\n\t\t\t\t\t\tPath += `${subfolder}/`\r\n\t\t\t\t\t});\r\n\t\t\t\t\tPath += `${LastFolder}/${file}${ext}`;\r\n\t\t\t\t}\r\n\t\t\t\treturn Path;\r\n\t\t\t}\r\n\t\t};\r\n\t\tthis.view.load = ( props )=>{\r\n\t\t\tprops = props||{};\r\n\t\t\tprops.ready = props.ready||function(){}; \r\n\t\t\tprops.folder = this.autoloader_folder||\"\";\r\n\t\t\tconst ext = this.ext;\t\t\t\r\n\t\t\tconst parameters = this.app.parameters;\t\t\r\n\t\t\tconst controller = this.app.controller_name;\r\n\t\t\tconst action = this.app.action_name;\r\n\t\t\tconst base = `${this.folder}${props.folder}${controller}`;\r\n\t\t\tprops.module = turpial.un(props.module, null);\r\n\t\t\tif(controller === \"index\"){\r\n\t\t\t\tvar urlPath = `${base}${ext}`;\r\n\t\t\t}else if(parameters.length === 0 && controller !== \"index\" && typeof action === \"undefined\"){\r\n\t\t\t\tvar urlPath = `${base}/index${ext}`;\r\n\t\t\t}else if(parameters.length === 0 && action !== \"undefined\"){\r\n\t\t\t\tvar urlPath = `${base}/${action}/index${ext}`;\r\n\t\t\t}else {\t\t\t\t\r\n\t\t\t\tvar urlPath = `${base}/${action}`;\r\n\t\t\t\tparameters.forEach(function( parameter ){\r\n\t\t\t\t\turlPath += `/${parameter}`;\r\n\t\t\t\t})\r\n\t\t\t\turlPath += ext;\r\n\t\t\t}\t\r\n\t\t\tif(typeof props.module === \"string\"){\r\n\t\t\t\tprops.ext = props.ext || ext\r\n\t\t\t\turlPath = this.core_path+props.module+props.ext;\r\n\t\t\t}\r\n\r\n\t\t\tvar data = {\r\n\t\t\t\tfile: urlPath,\r\n\t\t\t\toptions: props.options || {},\r\n\t\t\t\tready: ()=>{ props.ready() },\r\n\t\t\t};\r\n\t\t\tif(typeof props.error === \"function\"){\r\n\t\t\t\tdata[\"error\"] = (data)=>{ props.error(data) };\r\n\t\t\t}\r\n\t\t\tthis.DataView = data;\r\n\t\t\tif(props.module === \"\"){ return; }\r\n\t\t\tif(props.module === false){ return; }\r\n\t\t\tthis.fetch( data );\t\t\t\r\n\t\t};\r\n\t\tthis.controller.routes = {\r\n\t\t\tgetHost: (props)=>{\r\n\t\t\t\tconst app = this;\r\n\t\t\t\tprops = props||{};\r\n\t\t\t\tif(props.loadModule === false || app.loadModulesOnRoute === false){\r\n\t\t\t\t\tprops.relativeModules = true;\r\n\t\t\t\t}\r\n\t\t\t\tvar href = window.location.href;\r\n\t\t\t\thref = href.split(\"#\");\r\n\t\t\t\thref = href[0];\r\n\t\t\t\thref = href.split(\"?\");\r\n\t\t\t\thref = href[0];\r\n\r\n\t\t\t\t/*if( app.searchStr(obj.path, \"http\") === true ){\r\n\t\t\t\t\thref = \"\";\r\n\t\t\t\t}*/\r\n\t\t\t\tlet relativeModules = app.un(props.relativeModules, false);\r\n\r\n\t\t\t\t// search for dynamic host.\r\n\t\t\t\tlet position = href.search(app.public_path);\r\n\t\t\t\tlet Host = href.slice(position, position+app.public_path.length);\r\n\t\t\t\tHost = href.split(Host)[0]+Host;\r\n\r\n\t\t\t\tvar slash = Host.slice(-1)\r\n\t\t\t\tif(slash !== \"/\"){slash = \"/\"}\r\n\t\t\t\telse{slash = \"\";}\r\n\t\t\t\tif(relativeModules == true){\r\n\t\t\t\t\treturn `${Host}${slash}`;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tslash = href.slice(-1)\r\n\t\t\t\t\tif(slash !== \"/\"){slash = \"/\"}\r\n\t\t\t\t\telse{slash = \"\";}\r\n\t\t\t\t\treturn `${href}${slash}`;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// old output: `${href}${d}${obj.path}`\r\n\t\t\t\t\r\n\t\t\t},\r\n\t\t\tset: (props)=>{\r\n\t\t\t\tconst app = this;\r\n\t\t\t\tapp.app = {};\r\n\t\t\t\tprops = props||{};\r\n\t\t\t\tvar Path = window.location.href.split(\"?\");\r\n\t\t\t\tPath = Path[0];\r\n\t\t\t\tPath = Path.split(\"#\");\r\n\t\t\t\tlet SearchPublichPath = Path[0].search(app.public_path);\r\n\t\t\t\tif(SearchPublichPath > 0){\r\n\t\t\t\t\tPath = Path[0].substr( SearchPublichPath + app.public_path.length )\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"bad_public_path_name\");\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tvar routes = Path.split(\"/\");\r\n\t\t\t\tvar n = 0;\r\n\t\t\t\tvar param = 0;\r\n\t\t\t\tapp.app.parameters = [];\t\t\t\r\n\t\t\t\troutes.forEach(function(route){\r\n\t\t\t\t\tif(route == \"\"){return;}\t\t\t\t\t\r\n\t\t\t\t\tif(n === 0){\r\n\t\t\t\t\t\tapp.app.controller_name = route;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(n === 1){\r\n\t\t\t\t\t\tapp.app.action_name = route;\r\n\t\t\t\t\t}else if(n > 1){\r\n\t\t\t\t\t\tapp.app.parameters[ param++ ] = route;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tn++;\r\n\t\t\t\t})\t\t\t\t\r\n\t\t\t\tapp.app.controller_name = app.app.controller_name||\"index\";\r\n\t\t\t\tapp.app.action_name = app.app.action_name||\"\";\r\n\r\n\t\t\t\tlet path = `${app.app.controller_name}/${app.app.action_name}/${app.app.parameters.join(\"/\")}`;\r\n\t\t\t\tpath = path.split(\"//\").join(\"/\");\r\n\t\t\t\tpath = path.split(\"///\").join(\"/\");\r\n\r\n\t\t\t\tapp.app.props = props;\r\n\r\n\t\t\t\tapp.app.path = path;\r\n\t\t\t\tapp.host = app.controller.routes.getHost();\r\n\r\n\t\t\t\tapp.app.host = app.host;\r\n\t\t\t},\r\n\t\t\tchange: ( obj )=>{\r\n\t\t\t\tconst app = this;\r\n\t\t\t\tconst type = obj.type||\"pushState\";\r\n\t\t\t\t\r\n\t\t\t\tobj.loadModule = app.un(obj.loadModule, true);\r\n\r\n\t\t\t\tlet output = `${app.controller.routes.getHost( obj )}${obj.path}`;\r\n\r\n\t\t\t\tif(output === window.location.href){ return; }\r\n\t\t\t\t\r\n\t\t\t\twindow.history[type]( app.un( obj.object ),\r\n\t\t\t\t\t\t\t\t\t\t \"\",\r\n\t\t\t\t\t\t\t\t\t\t app.un( output ) );\t\r\n\t\t\t\tif(obj.loadModule === true && app.loadModulesOnRoute === true){\r\n\t\t\t\t\tapp.urls.load(obj);\r\n\t\t\t\t}\r\n\t\t\t\tlet title = app.un( obj.title, false );\r\n\t\t\t\tif(typeof title === \"string\"){\r\n\t\t\t\t\tdocument.title = title;\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tgo: (value)=>{\r\n\t\t\t\tif(typeof value === \"number\"){\r\n\t\t\t\t\twindow.history.go(value)\r\n\t\t\t\t}else if(value === \"back\"){\r\n\t\t\t\t\twindow.history.back();\r\n\t\t\t\t}else if(value === \"forward\"){\r\n\t\t\t\t\twindow.history.forward();\r\n\t\t\t\t}else{return;}\r\n\t\t\t\tthis.controller.routes.set();\r\n\t\t\t\tthis.urls.load();\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis.router = (obj, ready)=>{\r\n\t\t\tready = ready||function(){};\r\n\t\t\tif(typeof obj === \"number\" || typeof obj === \"string\"){\r\n\t\t\t\tthis.controller.routes.go( obj );\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tthis.controller.routes.change( obj );\r\n\t\t\tthis.stateEvent();\r\n\t\t\tready();\r\n\t\t};\r\n\t\tthis.routes = this.controller.routes.set;\r\n\t\tthis.routes(); // execute routes\t\r\n\t\tthis.controller.components = {};\r\n\t\tthis.views.get = (obj)=>{\r\n\t\t\tif(typeof obj !== \"object\"){return;}\r\n\t\t\tif(typeof obj.views === \"string\"){\r\n\t\t\t\tobj.views = [ obj.views ];\r\n\t\t\t}\r\n\t\t\tvar Paths = [];\r\n\t\t\tvar controller = this.controller.views;\r\n\t\t\tobj.views.forEach(function(view, key){\r\n\t\t\t\tobj.views = view;\r\n\t\t\t\tPaths[key] = controller.path(obj);\r\n\t\t\t});\r\n\t\t\tObject.assign(obj, {file: Paths, ready: obj.ready});\r\n\t\t\tthis.fetch(obj);\r\n\t\t}\r\n\t\tthis.urls = {};\r\n\t\tthis.urls.load = (obj)=>{\r\n\t\t\tobj = obj || {};\r\n\t\t\tconst app = this;\r\n\t\t\tconst controller = app.app.controller_name;\r\n\t\t\tconst action = app.app.action_name;\r\n\t\t\tconst parameters = app.app.parameters;\r\n\t\t\t// if this is undefined set as empty...\r\n\t\t\tlet moduleController = app.urls[controller] || false;\r\n\t\t\tobj.module = turpial.un(obj.module, null);\r\n\r\n\r\n\t\t\t// when @turpial.router method is used and \r\n\t\t\t// load a custom JS module/component file.\r\n\t\t\tif(typeof obj.module === \"string\"){app.view.load(obj); return;} \r\n\r\n\t\t\t// when url is root or there isn't modules\r\n\t\t\tif(moduleController === false){app.view.load(obj); return;} \r\n\r\n\t\t\tlet loadController = app.un(moduleController.loadController, true);\r\n\t\t\tlet loadAction = app.un(moduleController.loadAction, true);\r\n\t\t\tlet loadParameters = app.un(moduleController.loadParameters, 1000);\r\n\t\t\tlet moduleAction = app.un(app.urls[controller][action], false);\r\n\r\n\t\t\tif(typeof moduleController.self === \"function\"){\r\n\t\t\t\tif(typeof moduleAction === \"function\" && loadAction === true){\r\n\t\t\t\t\tif(parameters.length > loadParameters){\r\n\t\t\t\t\t\tmoduleController.self( ()=>{ moduleAction( ()=>{} ); } )\r\n\t\t\t\t\t\treturn; \r\n\t\t\t\t\t}\r\n\t\t\t\t\tmoduleController.self( ()=>{ moduleAction( ()=>{app.view.load(obj);} ); } )\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}else if(loadAction === false && typeof action === \"string\"){\r\n\t\t\t\t\tmoduleController.self( ()=>{ moduleAction( ()=>{} ); } );\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tmoduleController.self(()=>{app.view.load(obj);})\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis.historyEvents = {};\r\n\t\tthis.URLNoHASH = function(url){\r\n\t\t\treturn url.split(\"#\")[0];\r\n\t\t}\r\n\t\tthis.createHistoryEvent = function(position, callback){\r\n\t\t\tvar main = this.URLNoHASH(window.location.href);\r\n\t\t\tposition = position || \"\";\r\n\t\t\tposition = main+position;\r\n\t\t\tthis.historyEvents[position] = callback;\r\n\t\t\t/* @HOW TO USE HISTORY VIEWS.\r\n\t\t\t * you need to create new history events for actual position history\r\n\t\t\t * you can rename index position to trigger a function when back history\r\n\t\t\t * action was executed.\r\n\t\t\t * \r\n\t\t\t * ex: you can create history events like: \r\n\t\t\t * @index-> localhost/myweb\r\n\t\t\t * when you create an application that generate a different view\r\n\t\t\t * and generating new html elements and change history wirh router.\r\n\t\t\t * you can add it to history event views to generate \r\n\t\t\t * a callback function when history has that location path.\r\n\t\t\t *\r\n\t\t\t * You need to set @allowStateEvents to true to trigger this turpial function.\r\n\t\t\t * \r\n\t\t\t * note: turpial will trigger index or main view in the position you have\r\n\t\t\t * for example if the page load at: myweb.com/portfolio/\r\n\t\t\t * that point will be considered like a main position view.\r\n\t\t\t * @you can rename index if you left empty url position\r\n\t\t\t * value on createHistoryEvent method.\r\n\t\t\t * @you can create another view like myweb.com/portfolio/client-1 naming\r\n\t\t\t * position url like \"/client-1\"\r\n\t\t\t * note the \"/\" sign at the beginning\r\n\t\t\t * @set the function to be executed on callback in second value property.\r\n\t\t\t*/\r\n\t\t}\r\n\t\tthis.createHistoryEvent(\"\", function(){});\r\n\t\tthis.stateEvent = () =>{\r\n\t\t\tvar event = this.historyEvents;\r\n\t\t\tif(typeof event[this.URLNoHASH(window.location.href)] === \"function\"){\r\n\t\t\t\tevent[this.URLNoHASH(window.location.href)]();\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(this.allowStateEvents === true){\r\n\t\t\twindow.addEventListener(\"popstate\", this.stateEvent);\r\n\t\t}\t\t\r\n\t\tif(tpObj.autoloader === true){\r\n\r\n\t\t\twindow.addEventListener(\"load\", ()=>{\t\t\t\t\r\n\t\t\t\tthis.urls.load();\r\n\t\t\t})\r\n\t\t\twindow.onpopstate = (event)=>{\r\n\t\t\t\t// on window history change\r\n\t\t\t\t// update routes and reload modules. \r\n\t\t\t this.controller.routes.set(); // execute routes\r\n\t\t\t this.urls.load();\r\n\t\t\t (function(){\r\n\t\t\t \t// just for older browsers\r\n\t\t\t \tif(typeof window.customElements === \"undefined\"){\r\n\t\t\t \t\tArray.prototype.slice.call( this.myComponents )\r\n\t\t\t \t\t\t.forEach(function(com){\r\n\t\t\t \t\t\t\tthis.component.set({\r\n\t\t\t \t\t\t\t\ttag: com.tag,\r\n\t\t\t \t\t\t\t\tprops: com.props,\r\n\t\t\t \t\t\t\t})\r\n\t\t\t \t\t\t})\r\n\t\t\t \t}\r\n\t\t\t })();\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t\tthis.template = (html, replacemets)=>{\r\n\t\t\tconst engine = {\r\n\t\t\t\trun: function( html, replacemets ){\r\n\t\t\t\t\treplacemets = replacemets||[];\r\n\t\t\t\t\tif(typeof replacemets === \"object\" && !Array.isArray(replacemets)){\r\n\t\t\t\t\t\tvar reArrange = [];\r\n\t\t\t\t\t\tObject.values(replacemets).map(( element, number )=>{\r\n\t\t\t\t\t\t reArrange.push({[Object.keys(replacemets)[number]]: element})\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t\treplacemets = reArrange;\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(typeof html === \"object\"){ html = html.innerHTML }\r\n\t\t\t\t\tvar template = function(template, searchall, replaceby){\r\n\t\t\t\t\t\treturn template.split(searchall).join(replaceby);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tvar structure = html;\t\t\r\n\t\t\t\t\treplacemets.forEach(function( replacement ){\r\n\t\t\t\t\t\tvar items = Object.keys(replacement);\r\n\t\t\t\t\t\tvar values = Object.values(replacement);\r\n\t\t\t\t\t\titems.forEach(function( item, key ){\t\t\t\t\t\t\r\n\t\t\t\t\t\t\titem = `{{ ${item} }}`;\r\n\t\t\t\t\t\t\tif(html.search(item) >= 0){\r\n\t\t\t\t\t\t\t\tstructure = template(structure, item, values[key]);\r\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t})\r\n\t\t\t\t\treturn structure;\r\n\t\t\t\t},\r\n\t\t\t\treplace: function( item, replacement, HTML ){\r\n\t\t\t\t\titem = `{{ ${item} }}`;\r\n\t\t\t\t\tHTML = HTML.split(item).join(replacement);\r\n\t\t\t\t\treturn HTML;\r\n\t\t\t\t},\r\n\t\t\t\tjoinMoreElements: function(target, elements){\r\n\t\t\t\t\tObject.values(elements).forEach(function(element, key){\t\t\t\t\t\r\n\t\t\t\t\t\ttarget[Object.keys(elements)[key]] = element;\r\n\t\t\t\t\t})\r\n\t\t\t\t\treturn target;\r\n\t\t\t\t},\r\n\t\t\t\ttoHTML: function( target, strings ){\r\n\t\t\t\t\tif(target !== false){\r\n\t\t\t\t\t\ttarget.innerHTML = strings;\r\n\t\t\t\t\t\ttarget = target.content.firstElementChild;\t\t\r\n\t\t\t\t\t\treturn target;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tturpial.render()\r\n\t\t\t\t\t}\t\r\n\t\t\t\t\t\r\n\t\t\t\t},\r\n\t\t\t\ttoString: function( target, html ){\r\n\t\t\t\t\thtml = html.cloneNode(true);\r\n\t\t\t\t\tvar dom_elem = target;\r\n\t\t\t\t\tdom_elem.innerHTML = \"<div></div>\";\r\n\t\t\t\t\tdom_elem = dom_elem.content.firstElementChild;\r\n\t\t\t\t\tdom_elem.appendChild(html);\r\n\t\t\t\t\treturn dom_elem.innerHTML;\r\n\t\t\t\t},\r\n\t\t\t\tcreate: function( element, replacements ){\r\n\t\t\t\t\tvar app = this;\r\n\t\t\t\t\t// start with \"div\" after template tag.\t\t\r\n\t\t\t\t\tvar content = turpial.find(element).content.firstElementChild;\r\n\t\t\t\t\t// this is to fill it, after finish the process.\r\n\t\t\t\t\tvar container = content.cloneNode( true );\r\n\t\t\t\t\tvar getHTMLText = content.innerHTML;\r\n\t\t\t\t\tvar eraseEls = [];\t\t\r\n\t\t\t\t\tObject.keys(replacements).forEach(function( item, key ){\r\n\t\t\t\t\t\tgetHTMLText = app.replace(item, Object.values(replacements)[key], getHTMLText);\t\t\r\n\t\t\t\t\t})\r\n\t\t\t\t\t// PUSH INTO THE CLONDED\r\n\t\t\t\t\tcontainer.innerHTML = getHTMLText;\r\n\t\t\t\t\treturn container;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn engine.run(html, replacemets);\r\n\t\t}\r\n\t}\r\n\tmap(appName, nodes = [])\r\n\t{\r\n\t\tvar app = this;\t\r\n\t\tvar map = app.birds[appName];\r\n\t\tif(typeof appName === \"object\"){\r\n\t\t\tmap = appName;\r\n\t\t}else if(typeof map === \"undefined\"){\r\n\t\t\tmap = this.find( appName )\r\n\t\t}\r\n\r\n\t\tif(typeof nodes === \"object\")\r\n\t\t{\r\n\t\t\tif(typeof nodes[0] === \"undefined\"){return map;}\r\n\t\t\tmap = map.children;\r\n\t\t\tnodes.forEach(function( node, key ){\r\n\t\t\t\tif( typeof nodes[key+1] === \"undefined\" ){\r\n\t\t\t\t\tmap = map[node];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tmap = map[node].children;\r\n\t\t\t\t}\t\t\t\t\t\t\t\t\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn map;\t\t\r\n\t}\r\n\tcreateMap(app)\r\n\t{\r\n\t\tapp = this.find( app );\r\n\t\tvar turpial_app_id = app.getAttribute(\"id\");\r\n\t\tif(typeof turpial_app_id !== \"undefined\"){\r\n\t\t\tvar realDOMElement = document.getElementById(turpial_app_id);\r\n\t\t\tthis.birds[turpial_app_id] = realDOMElement;\r\n\t\t}\r\n\t}\r\n\tread(appName, nodes = [])\r\n\t{\r\n\t\treturn this.map(appName, nodes);\r\n\t}\r\n\tselectorApp(appName, selector = [])\r\n\t{\r\n\t\tif(typeof selector === \"object\"){\r\n\t\t\t// searching via map.\r\n\t\t\tif(Number.isInteger(selector[0]) === true){\r\n\t\t\t\treturn this.map(appName, selector);\r\n\t\t\t}else{\r\n\t\t\t\treturn selector;\r\n\t\t\t}\t\t\t\r\n\t\t}else{return selector;}\r\n\t}\r\n\tdelete( selector )\r\n\t{\r\n\t\tselector = this.find( selector );\r\n\t\tselector.remove();\r\n\t}\r\n\tupdate(selector, insert = null, where = 'replace-selector', justUpdate = true)\r\n\t{\r\n\t\tif(typeof insert === \"string\"){\r\n\t\t\tvar content = this.render( insert );\r\n\t\t\tvar string = insert;\r\n\t\t}\r\n\t\telse{\r\n\t\t\tvar content = insert;\r\n\t\t}\r\n\t\tif(content === null){\r\n\r\n\t\t\tvar isHTML = false;\t\t\r\n\t\t\tvar content = insert;\r\n\t\t}else{\r\n\t\t\tvar isHTML = true;\r\n\t\t}\r\n\t\t// get the child to insert a new element before or after\r\n\t\tvar child = selector;\r\n\t\tif(justUpdate === true){ // if the the call is for update\r\n\t\t\twhere = 'replace-selector';\r\n\t\t}\r\n\t\t// get his parent\r\n\t\tvar output = false;\r\n\t\tvar parent = child.parentNode;\r\n\t\tif(where === \"before\"){\r\n\t\t\tparent.insertBefore(content, child);\r\n\t\t\toutput = content;\r\n\t\t}else if(where === \"after\"){\r\n\t\t\t// emulating with next sibling.\r\n\t\t\tparent.insertBefore(content, child.nextSibling);\r\n\t\t\toutput = content;\r\n\t\t}else if(where === \"replace-selector\"){\r\n\t\t\t// insertar nuevo elemento y eliminar viejo...\r\n\t\t\tparent.replaceChild(content, child);\r\n\t\t\toutput = content;\r\n\t\t}else if(where === \"inner\"){\r\n\t\t\tif(isHTML === true){\r\n\t\t\t\t// editar el child\r\n\t\t\t\tchild.innerHTML = string;\r\n\t\t\t}else{\r\n\t\t\t\tchild.innerText = content;\r\n\t\t\t}\r\n\t\t\toutput = child;\r\n\t\t}\r\n\t\telse{console.warn(\"error-on-placement\");return false;}\t\r\n\t\tlet mapping = child;\r\n\t\tthis.createMap( mapping );\r\n\t\treturn output;\r\n\t}\r\n\tinsert(selector, content, where = \"inner\")\r\n\t{\r\n\t\tselector = this.find( selector );\r\n\t\treturn this.update(selector, content, where, false);\r\n\t}\r\n\trender(LiteralsString)\r\n\t{\r\n\t\tvar dom_elem = document.createElement(\"template\");\r\n\t\tdom_elem.innerHTML = LiteralsString;\r\n\t\tdom_elem = dom_elem.content.firstElementChild;\t\t\r\n\t\treturn dom_elem;\r\n\t}\r\n\tmount(place, things)\r\n\t{\r\n\t\tif(typeof things === \"string\"){\r\n\t\t\tvar things = this.render( things );\r\n\t\t}if(things === null){console.warn(\"need to be HTML string or object\");return;}\r\n\t\tplace = this.find( place );\r\n\t\tlet target = place.appendChild(things);\r\n\t\tlet app = place;\r\n\t\tthis.createMap( app );\r\n\t\treturn target;\r\n\t}\r\n\tsettings(attrs)\r\n\t{\r\n\t\tif(typeof attrs[0] !== \"undefined\"){return;}\r\n\t\tvar setAttrsValues = [];\r\n\t\tvar i = 0;\r\n\r\n\t\tvar Values = [];\r\n\t\tfor(var value in attrs){\r\n\t\t\tValues.push( attrs[value] );\r\n\t\t}\r\n\t\tValues.forEach(function(value){\r\n\t\t\tsetAttrsValues[i++] = value;\r\n\t\t});\r\n\r\n\t\tvar setAttrsNames = [];\r\n\t\tvar i = 0;\r\n\t\tObject.keys(attrs).forEach(function(name){\r\n\t\t\tsetAttrsNames[i++] = name;\r\n\t\t});\r\n\r\n\t\tvar pushAttrs = \"\";\r\n\t\t\tvar i = 0;\r\n\t\t\tsetAttrsNames.forEach(function(item, key){\r\n\t\t\t\tpushAttrs += ` ${item}=\"${setAttrsValues[key]}\"`;\r\n\t\t\t});\r\n\t\treturn pushAttrs;\r\n\t}\r\n\tcreateTag(el, attrs = \"\", content = \"\")\r\n\t{\r\n\t\tif(typeof attrs === \"object\"){\r\n\t\t\tattrs = this.settings(attrs);\r\n\t\t}\r\n\t\tlet tag = `<${el}${attrs}>`;\r\n\t\ttag += content;\r\n\t\tif(el !== \"br\"){\r\n\t\t\ttag += `</${el}>`;\r\n\t\t}\t\t\r\n\t\treturn tag;\r\n\t}\r\n\thtml(el, attrs, content)\r\n\t{\r\n\t\tconst replacement = this.replacement;\r\n\t\tconst app = this;\t\r\n\t\tif(el === \"code\"){\r\n\t\t\tcontent = replacement(content, \"<\", \"<\");\r\n\t\t\tcontent = replacement(content, \">\", \">\");\r\n\t\t\tcontent = replacement(content, \" \", \" \");\r\n\t\t}\t\t\t\r\n\t\tif (typeof content === \"undefined\"){\r\n\t\t\t// si no existen atributos\r\n\t\t\t// y existe contenido el esquema puede ser así\r\n\t\t\t// el($tag, $contenido)\r\n\t\t\t// por lo que el contenido ahora es igual al campo atributos.\r\n\t\t\tvar content = attrs;\r\n\t\t\tvar attrs = \"\";\r\n\t\t}\r\n\t\tif(typeof content === \"object\" && typeof content[0] !== \"undefined\"){\r\n\r\n\t\t\tvar elements = \"\";\r\n\t\t\tvar i = 0;\r\n\t\t\tcontent.forEach(function(item, key){\r\n\t\t\t\telements += `${item}`;\r\n\t\t\t});\r\n\t\t\tvar html = app.createTag(el, attrs, elements);\r\n\t\t}else if(typeof content === \"object\"){\r\n\t\t\t// si llega a este punto y sigue siendo\r\n\t\t\t// un objeto quiere decir que el segundo \r\n\t\t\t// argumento es un objeto con class id etc.\r\n\t\t\t// se puede estar intentando crear un elemento vacío.\r\n\t\t\t// por lo tanto content será igual a nada\r\n\t\t\tvar attrs = content;\r\n\t\t\tvar html = app.createTag(el, attrs, content = \"\");\t\t\t\r\n\t\t}else{\r\n\t\t\tvar html = app.createTag(el, attrs, content);\r\n\t\t}\r\n\t\treturn html;\r\n\t}\r\n\tel(el, attrs, content)\r\n\t{\r\n\t\treturn this.html(el, attrs, content);\r\n\t}\r\n}\r\n\r\nconst turpial = new Turpial({\r\n\tpublic_path: location.host,\r\n\tloadModulesOnRoute: false,\r\n});\r\nexport {turpial, Turpial}","import { turpial } from \"./turpial\";\r\n\r\nfunction Connect3Pod(urls, {ready, data, method, options}){\r\n method = method||\"POST\";\r\n ready = ready||function(){};\r\n options = options||{};\r\n data = data||{};\r\n if(typeof urls === \"string\"){\r\n urls = [urls];\r\n }\r\n \r\n turpial.fetch({\r\n url: urls,\r\n method: method,\r\n options: options,\r\n type: \"text\",\r\n data: JSON.stringify(data),\r\n ready: (data)=>{\r\n ready(data.filter((result)=>{ \r\n try {\r\n result = JSON.parse(result);\r\n return result; \r\n } catch (error) {\r\n console.error(error)\r\n }\r\n }));\r\n }\r\n })\r\n}\r\n\r\nexport {Connect3Pod}\r\n\r\n/**\r\n * Example: \r\n * Connect3Pod([HOST+\"private/api/v1/admin/connect\"], {\r\n data: data,\r\n ready: (results)=>{\r\n console.log(results);\r\n },\r\n })\r\n */","<!-- svelte-ignore missing-declaration -->\r\n<script>\r\nimport { PlansStore } from './Plans.store.js';\r\nimport { UpdateSubscriptions } from './SubscriptionsStore';\r\nimport CardPlans from './CardPlans.svelte';\r\nimport Subscriptions from './Subscriptions.svelte';\r\nimport Switch from './../components/Elements/Switch.svelte';\r\nimport { sortItems } from '../libraries/sortItems';\r\nimport { turpial } from '../libraries/turpial.js';\r\nimport { Connect3Pod } from '../libraries/Connect3Pod.js';\r\n\r\nexport let user = {};\r\nexport let affiliate = {};\r\nexport let Data = {};\r\nexport let onSelectPlan = function(){}; // for internal modules\r\nlet userFromCampaign = Data.userFromCampaign ?? null;\r\nif(typeof user.userFromCampaign !== \"undefined\"){\r\n userFromCampaign = user.userFromCampaign;\r\n}\r\nlet memberships = [];\r\nlet membership_names = [];\r\nlet membership_types = [];\r\nlet membership_selected = tripod_plans.selected ?? \"designs\";\r\nlet showOnly = tripod_plans.showOnly ?? false;\r\nlet title = tripod_plans.title ?? false;\r\nlet subtitle = tripod_plans.subtitle ?? false;\r\nlet subscriptions = tripod_plans.subscriptions ?? [];\r\nlet lang = tripod_plans.lang ?? {};\r\nlet plans = tripod_plans.plans ?? false;\r\nlet all_plans = false;\r\nlet all_addons = false;\r\nlet stripe_subs = tripod_plans.stripe_subs ?? false;\r\nlet showPlans = tripod_plans.showPlans ?? true;\r\nlet showProducts = tripod_plans.showProducts ?? true;\r\nlet links = tripod_plans.links ?? true;\r\nlet plansSelector = tripod_plans?.links?.plansSelector ?? false;\r\nlet host = tripod_plans.host;\r\nlet section = null;\r\nlet fetched = false;\r\nlet interval = \"month\";\r\nlet has_chooser_plan_module = false;\r\nif(typeof tripod_register !== \"undefined\"){\r\n has_chooser_plan_module = tripod_register?.has_chooser_plan_module ?? false;\r\n}\r\n\r\n\r\n\r\ntripod_plans.updateSubscriptions = (r)=> UpdateSubscriptions(r);\r\n\r\nUpdateSubscriptions();\r\n\r\nif(plansSelector !== false){\r\n\r\n if(typeof plansSelector !== \"object\"){\r\n plansSelector = false;\r\n }\r\n}\r\nlet membership_icons_fetched = {\r\n funnels: \"\",\r\n campaigns: \"\",\r\n designs: \"\",\r\n};\r\nfunction getIconMembership(){\r\n if(typeof membership_icons !== \"undefined\"){\r\n return;\r\n }\r\n turpial.fetch({\r\n url: [`https://cdn.jsdelivr.net/gh/Yerikmiller/yerikmiller.github.io@master/projects/3Pod/Plans/Icons.js`],\r\n ready: function(data){\r\n membership_icons_fetched = membership_icons;\r\n membership_icons_fetched = membership_icons_fetched;\r\n \r\n }\r\n });\r\n turpial.includeCSS({\r\n url: [\"https://cdn.jsdelivr.net/gh/Yerikmiller/3pod-us.github.io@5.4.4/widgets/Plans/fonts.css\"],\r\n ready: ()=>{}\r\n })\r\n}\r\n\r\n\r\nlet showCurrentMemberships = tripod_plans.showCurrentMemberships ?? false;\r\n\r\nif(showOnly !== false){\r\n tripod_plans.selected = membership_selected = showOnly;\r\n}\r\n\r\nlet referralsDiscounts = [];\r\n\r\nfunction getReferredBy(public_key)\r\n{\r\n Connect3Pod(`${host}public/api/v1/affiliates/referredByData`, {\r\n data: {\r\n public_key_user: user.public_key,\r\n public_key_affiliate: user.referred_by,\r\n },\r\n ready: (data)=>{\r\n data = JSON.parse(data);\r\n referralsDiscounts = data.referralsDiscounts;\r\n }\r\n })\r\n}\r\n\r\nfunction onReadygetPlans(data, addons){\r\n /**\r\n * Si quieres cambiar el orden de los botones y sus títulos\r\n * debes cambiar el orden de $memberships, $membership_names & $membership_types\r\n */\r\n\r\n getReferredBy(user.referred_by);\r\n \r\n let showOnly = tripod_plans.showOnly ?? false;\r\n let order = tripod_plans.order ?? false;\r\n let fields = tripod_plans.lang.fields ?? false;\r\n if(order === false){\r\n console.error(\"You need to supply a order field. ex: [...memberships]\")\r\n return;\r\n }\r\n if(showOnly !== false){\r\n data = {\r\n [showOnly]: data[showOnly],\r\n }\r\n \r\n }\r\n \r\n memberships = data;\r\n tripod_plans.plans = memberships;\r\n all_addons = addons;\r\n tripod_plans.addons = addons;\r\n Object.values(memberships).map(( plans, key )=>{\r\n let name = Object.keys(memberships)[key]; \r\n plans.map(( plan, position )=>{\r\n if((plan.discountsPlan ?? null) !== null){\r\n plan.discountPercent = plan.discountsPlan.discountPercent ?? null;\r\n if(plan.discountPercent !== null){\r\n plan.discountPercent = +(plan.discountPercent)\r\n }\r\n }\r\n\r\n memberships[name][position].price_plan = +(plan.price_plan);\r\n memberships[name][position].position_plan = +(plan.position_plan);\r\n memberships[name][position].price_on_year_monthly = +(plan.price_plan)*12;\r\n \r\n if(plan.interval_year_price ?? \"\" !== \"\"){\r\n memberships[name][position].price_on_year_yearly = +(plan.interval_year_price)*12;\r\n }\r\n \r\n if(plan.type === \"PRODUCT\"){\r\n memberships[name][position].price_on_year_monthly = +(plan.price_plan);\r\n memberships[name][position].price_on_year_yearly = +(plan.price_plan);\r\n }\r\n\r\n memberships[name][position].is_recommended = memberships[name][position]?.is_recommended ?? \"Default\";\r\n \r\n memberships[name] = sortItems(memberships[name], \"price_on_year_monthly\", \"desc\");\r\n })\r\n })\r\n \r\n let membershipsOrdered = {};\r\n \r\n /**\r\n * Para ordenar los datos con el campo order.\r\n * para mostrar solo uno de los elementos\r\n */\r\n order.map(( item )=>{\r\n if(showOnly !== false){\r\n if(item === showOnly){ \r\n membershipsOrdered[item] = memberships[item]\r\n return;\r\n }\r\n }else{\r\n membershipsOrdered[item] = memberships[item]\r\n }\r\n }) \r\n memberships = membershipsOrdered;\r\n /**\r\n * ordered by importance\r\n */\r\n membership_names = fields;\r\n /**\r\n * ordered by importance\r\n */\r\n membership_types = order;\r\n\r\n\r\n plans = tripod_plans.plans;\r\n all_plans = Object.values(plans).filter(( subs )=>{\r\n let get = [];\r\n subs.map((plan)=>{\r\n get.push(plan)\r\n })\r\n return get;\r\n }).flat();\r\n\r\n \r\n PlansStore.update(\"plans_views\", memberships[membership_selected]);\r\n getIconMembership()\r\n return plans;\r\n}\r\n\r\n\r\n\r\nfunction changeInterval(input){\r\n interval = input.checked === true ? \"year\" : \"month\";\r\n}\r\n\r\n$: {\r\n if(section !== null && fetched === false){\r\n let urlGetPlans = host+\"api/getPlans\";\r\n let urlGetAddons = host+\"api/getAddons/\";\r\n \r\n if(userFromCampaign !== null){\r\n urlGetPlans = host+\"api/getPlans?tag=\"+btoa(userFromCampaign);\r\n }\r\n\r\n turpial.fetch({\r\n url: [urlGetPlans, urlGetAddons],\r\n method: \"POST\",\r\n type: \"text\",\r\n ready: function(data){\r\n let plans = JSON.parse(data[0] ?? \"{}\");\r\n let addons = JSON.parse(data[1] ?? \"{}\");\r\n\r\n window.getPlans3Pod = function(){\r\n return plans?.response||[];\r\n }\r\n window.getAddons3Pod = function(){\r\n return addons?.response||[];\r\n }\r\n\r\n if(plans.status === \"error\"){\r\n console.error(\"An error has been occurred loading API getPlans from 3pod.\");\r\n }\r\n if(plans.status === \"success\"){\r\n onReadygetPlans(plans.response, (addons?.response||{}));\r\n fetched = true;\r\n }\r\n },\r\n onerror: function(data){\r\n console.warn(data);\r\n memberships = [];\r\n }\r\n })\r\n }\r\n}\r\n\r\n\r\nlet boxes_container;\r\nfunction changeMembership(type){\r\n let node = boxes_container.querySelector(`.column-title-membership.${type}`);\r\n let elements = [...boxes_container.querySelectorAll(\".column-title-membership\")];\r\n elements.map(( element )=>{\r\n element.classList.remove(\"selected\")\r\n });\r\n node.classList.add(\"selected\");\r\n membership_selected = node.dataset.type;\r\n PlansStore.update(\"plans_views\", memberships[membership_selected]);\r\n} \r\n\r\n</script>\r\n<section bind:this={section} class=\"box main-section-plans\">\r\n\t{#if section !== null}\r\n <header>\r\n {#if title !== false}\r\n <h2 class=\"has-text-primary has-text-weight-bold has-text-centered\">\r\n {title}\r\n </h2>\r\n {/if}\r\n {#if subtitle !== false}\r\n <p class=\"has-text-light has-text-centered\">\r\n {subtitle}\r\n </p>\r\n {/if}\r\n {#if has_chooser_plan_module}\r\n <div class=\"progress-bar second-step-progress-bar\" style=\"max-width: 320px;margin-bottom: 3rem;\">\r\n <p class=\"steps-texts has-text-white progress-bar-text\">\r\n Paso 2/3\r\n </p>\r\n <progress class=\"progress is-primary is-large\" value=\"66\" max=\"100\">100%</progress>\r\n </div>\r\n {/if} \r\n </header>\r\n <main>\r\n {#if showCurrentMemberships === true}\r\n <Subscriptions subscriptions={subscriptions} tripod_plans={tripod_plans} lang={lang} all_addons={all_addons} all_plans={all_plans} stripe_subs={stripe_subs} />\r\n {/if}\r\n {#if showPlans}\r\n {#if showOnly === false}\r\n <!-- buttons navigation between memberships -->\r\n <div class=\"columns is-multiline boxes_container is-centered\" bind:this=\"{boxes_container}\">\r\n {#each Object.values(memberships) as plans, mem_key}\r\n <div class=\"column is-4 is-mobile column-title-membership {plans[0].membership_type} {tripod_plans.selected === plans[0].membership_type ? \"selected\": \"\" }\" data-type=\"{plans[0].membership_type}\"> \r\n {#if plansSelector === false}\r\n <div class=\"box box-title\" on:click=\"{()=>{ changeMembership(plans[0].membership_type) }}\">\r\n <p class=\"title-plans field\">\r\n <span>\r\n {@html membership_icons_fetched[plans[0].membership_type] ?? \"\"}\r\n </span>\r\n <span>\r\n {membership_names[plans[0].membership_type]}\r\n </span>\r\n </p>\r\n </div>\r\n {:else}\r\n <a href=\"{plansSelector[plans[0].membership_type]}\" style=\"width: 100%;\">\r\n <div class=\"box box-title\">\r\n <p class=\"title-plans field\">\r\n <span>\r\n {@html membership_icons_fetched[plans[0].membership_type] ?? \"\"}\r\n </span>\r\n <span>\r\n {membership_names[plans[0].membership_type]}\r\n </span>\r\n </p>\r\n </div>\r\n </a>\r\n {/if}\r\n </div>\r\n {/each} \r\n </div>\r\n {/if}\r\n <div class=\"columns is-multiline\">\r\n <div class=\"column\">\r\n <div class=\"box-plans\">\r\n <div class=\"has-text-centered\">\r\n <Switch checked=\"\" name=\"interval\" on_change={(e)=>{ changeInterval(e.target) }}>\r\n <svelte:fragment let:id={id} slot=\"label1\">\r\n <label class=\"has-text-weight-semibold has-text-light\" for=\"{id}\" style=\"font-size: 14px;\">\r\n <span class=\"is-capitalized\">\r\n {lang.month}\r\n </span>\r\n </label>\r\n </svelte:fragment>\r\n <svelte:fragment let:id={id} slot=\"label2\">\r\n <label class=\"has-text-weight-semibold has-text-light\" for=\"{id}\">\r\n <span class=\"is-capitalized\">\r\n {lang.year}\r\n </span>\r\n </label>\r\n </svelte:fragment>\r\n </Switch>\r\n <br>\r\n </div>\r\n <div class=\"columns is-multiline is-centered\">\r\n <CardPlans membership_selected={membership_selected} onSelectPlan={onSelectPlan} affiliate={affiliate} user={user} interval={interval} tripod_plans={tripod_plans} />\r\n </div>\r\n <p class=\"has-text-centered has-text-dark\" style=\"padding-top: 2rem;\">\r\n {lang.help.needhelp}\r\n </p>\r\n <p class=\"has-text-centered\">\r\n <a href=\"https://3pod.io/contactanos\" target=\"_blank\" class=\"has-text-primary fw600\">\r\n {lang.help.contactus}\r\n </a>\r\n </p>\r\n </div>\r\n </div>\r\n </div>\r\n {/if}\r\n </main>\r\n {/if}\r\n</section>\r\n<style>\r\n.main-section-plans{\r\n padding: 2.75rem;\r\n}\r\n.box-plans{\r\n padding-bottom: 3.25rem;\r\n}\r\nsection{\r\n padding-bottom: 2rem;\r\n}\r\nmain{\r\n margin-top: 1rem;\r\n}\r\nh2{\r\n font-size: 2.25rem;\r\n}\r\n.box-title{\r\n cursor: pointer;\r\n min-height: 90px;\r\n display: flex;\r\n align-items: center;\r\n transition: all 0.3s ease;\r\n color: #415B76;\r\n}\r\n.column-title-membership:global(.selected .box-title){\r\n background-color: #344fff;\r\n color: #fff;\r\n}\r\n.box-title:hover{\r\n transform: scale(1.03);\r\n transition: all 0.3s ease;\r\n}\r\n.title-plans{\r\n font-size: 1rem;\r\n display: flex;\r\n align-items: center;\r\n}\r\n.title-plans :global(svg){\r\n width: 2.75rem;\r\n height: 2.75rem;\r\n margin-right: 12px;\r\n}\r\n.title-plans :global(svg path){\r\n fill:var(--color-primary)\r\n}\r\n.selected .title-plans :global(svg path){\r\n fill: #fff;\r\n}\r\n</style>","const sortItems = (object, item, by)=>{\r\n let reordered = Object.values(object);\r\n by = by||\"desc\";\r\n reordered.sort(function (a, b) {\r\n if(by === \"desc\"){\r\n if (a[item] > b[item]) {\r\n return 1;\r\n }\r\n if (a[item] < b[item]) {\r\n return -1;\r\n }\r\n // a must be equal to b\r\n return 0;\r\n }\r\n\r\n if(by === \"asc\"){\r\n if (a[item] < b[item]) {\r\n return 1;\r\n }\r\n if (a[item] > b[item]) {\r\n return -1;\r\n }\r\n // a must be equal to b\r\n return 0;\r\n } \r\n });\r\n\r\n return reordered;\r\n}\r\n\r\nexport { sortItems }","<!-- svelte-ignore missing-declaration -->\n<style type=\"text/scss\" global >\n/*@import \"./styles.bulma.scss\";*/\n\n</style>\n<script>\nimport Styles from './Styles.svelte';\nimport CorePlans from './plans/CorePlans.svelte';\nimport { Connect3Pod } from './libraries/Connect3Pod';\nlet user = tripod_plans?.user ?? {};\nlet affiliate;\nlet host = tripod_plans.host;\n\nlet fetched_user = false;\nuser.referred_by = user.referred_by ?? \"\";\nif(user.referred_by === \"\" || typeof user.email === \"undefined\"){\n fetched_user = true;\n}\n\nif(fetched_user === false){\n const user_public_key_reversed = user.public_key.split(\"\").reverse().join(\"\");\n const affiliate_public_key_reversed = user.referred_by.split(\"\").reverse().join(\"\");\n Connect3Pod(`${host}public/api/v1/affiliates/referredByData`, {\n data: {\n public_key_user: user_public_key_reversed,\n public_key_affiliate: affiliate_public_key_reversed,\n },\n ready: (data)=>{\n affiliate = JSON.parse(data[0]);\n fetched_user = true;\n }\n })\n}\n\n\n</script>\n<div class=\"svelte-module\">\n {#if fetched_user === true}\n <Styles />\n <CorePlans affiliate={affiliate} user={user} />\n {/if}\n</div>","// bulma docs https://dev.to/1n0t/creacion-de-un-proyecto-svelte-bulma-sass-1o8i\r\nimport \"../styles.bulma.scss\";\r\nimport App from '../Plans.svelte';\r\nlet app = document.querySelector(\".plans-gadget-3pod\");\r\n\r\napp = new App({\r\n\ttarget: app,\r\n});\r\n\r\n//export default app;"],"names":["e","t","src_url_equal_anchor","current_component","noop","assign","tar","src","k","run","fn","blank_object","Object","create","run_all","fns","forEach","is_function","thing","safe_not_equal","a","b","_typeof","component_subscribe","component","store","callback","$$","on_destroy","push","_len","arguments","length","callbacks","Array","_key","unsub","subscribe","unsubscribe","create_slot","definition","ctx","$$scope","slot_ctx","get_slot_context","slice","get_slot_changes","dirty","lets","undefined","merged","len","Math","max","i","update_slot_base","slot","slot_definition","slot_changes","get_slot_context_fn","slot_context","p","get_all_dirty_from_scope","exclude_internal_props","props","result","null_to_empty","value","append","target","node","appendChild","append_styles","style_sheet_id","styles","append_styles_to","document","root","getRootNode","ownerDocument","host","get_root_for_style","getElementById","style","element","id","textContent","head","append_stylesheet","insert","anchor","insertBefore","detach","parentNode","removeChild","destroy_each","iterations","detaching","d","name","createElement","text","data","createTextNode","space","empty","listen","event","handler","options","addEventListener","removeEventListener","prevent_default","preventDefault","call","this","attr","attribute","removeAttribute","getAttribute","setAttribute","children","from","childNodes","set_data","wholeText","set_input_value","input","set_style","key","important","setProperty","set_current_component","n","r","s","prepend","singleTag","container","querySelector","getElementsByTagName","u","indexOf","c","charCodeAt","substring","styleSheet","cssText","attributes","keys","insertAdjacentElement","dirty_components","binding_callbacks","render_callbacks","flush_callbacks","resolved_promise","Promise","resolve","update_scheduled","add_render_callback","seen_callbacks","Set","flushidx","flush","saved_component","update","pop","has","add","clear","fragment","before_update","after_update","outros","outroing","group_outros","check_outros","transition_in","block","local","delete","transition_out","o","create_component","mount_component","customElement","on_mount","m","new_on_destroy","map","filter","_toConsumableArray","destroy_component","make_dirty","then","fill","init","instance","create_fragment","not_equal","parent_component","bound","on_disconnect","context","Map","skip_bound","ready","ret","hydrate","nodes","l","intro","SvelteComponent","$destroy","type","index","splice","$$props","obj","$$set","random_string","characters","charactersLength","charAt","floor","random","url","link","rel","href","media","subscriber_queue","writable","start","stop","subscribers","set","new_value","_step","run_queue","_iterator","_createForOfIteratorHelper","done","subscriber","err","f","invalidate","size","PlansStore","_writable","plans_views","field","content","Controller","UpdateSubscriptions","_user","user","public_key","turpial","fetch","HOST","method","results","render","subs","registered_plans","sub","items","plan","_metadata$addons","_sub$cancel_at","_sub$canceled_at","_sub$cancel_at_period","metadata","addons","JSON","parse","current_period_start","nextInvoice","current_period_end","discount","status","id_sub","id_plan","split","join","is_addon","cancel_at","canceled_at","cancel_at_period_end","registered_at_stripe","values","addon","addonPlan","registered_subscriptions","tripod_plans","subscriptions","subscription","SubscriptionsStore","setSubscriptions","console","log","atLeastOneSubscription","rendered_data","stripe_subs","warn","FormatNumber","number","isCurrency","Intl","NumberFormat","currency","format","raw_value","benefits","each_value","response","div5","section0","div2","div0","div1","span","section1","div4","input0","input1","div3","innerHTML","t1_value","limit","p_data_limit_value","span0","span1","t1","if_block","create_if_block","section","_$$props$current","current","inputValue","price","email_marketing","info_plan","inputRangeElement","main_container","info_text_container","selected_element","selected_addon","list","_$$props2$id","_$$props3$version","version","lang","_$$props4$lang","_ref","ComponentSliderEmailMarketing","_$$props5$interval","interval","onUpdate","changeInputValue","ball","dataset","pricePosition","emailPosition","inputResults","$$invalidate","__id__","btoa","stringify","getBall","position","item","querySelectorAll","classList","remove","priceElement","suscribersMarketingElement","totalPrice","prices","innerText","concat","toLowerCase","json","month","year","current_key","find","setTimeout","error","pointerEvents","selected","setBallById","$$value","StoreForm","dataForm","plansFetched","merge_with","_merge_with","storeForm","digits","_$$props$digits","parseCents","_$$props$parseCents","stringNumber","splitter","maximumFractionDigits","parseHtmlString","string","CartParserAddons","_this","_classCallCheck","t3_value","name_plan","_ctx$","hasReferralDiscounts","create_if_block_16","is_recommended","create_if_block_15","create_if_block_14","interval_price","if_block3","yearly","create_if_block_11","membership_type","create_if_block_9","active","create_if_block_7","create_if_block_8","eachMonth","span2","span2_class_value","img_plan","h2","h2_class_value","p_class_value","section_class_value","div2_class_value","header","span3","span4","span6","span5","span7","span8","main","ul","footer","t3","t6","t6_value","currencyformatter_changes","t9","t9_value","span_class_value","show_if","Number","isInteger","percentOff","create_if_block_18","defaultItem","h4","h4_class_value","has_discount","interval_current_price","t0","t0_value","_ctx$20$","create_if_block_12","_ctx$20$2","create_if_block_13","t2","t2_value","li","_ctx$2","_ctx$2$slider","slider","_ctx$20$active_addons","_ctx$4","active_addons","_ctx$4$active_addons","_ctx$4$active_addons$","div0_class_value","emailmarketingslider_changes","_ctx$20$active_addons2","_ctx$5","_ctx$5$active_addons","_ctx$5$active_addons$","create_if_block_10","_ctx$3","_ctx$6$updatePlan","updatePlan","setPlan","button","button_data_plan_id_value","button_data_type_value","button_data_membership_type_value","div","currentPlan","button_data_price_on_year_monthly_value","price_on_year_monthly","button_data_position_plan_value","position_plan","create_if_block_6","_ctx$6","create_if_block_3","create_if_block_2","setProduct","span9","t5","t5_value","t8","t8_value","create_if_block_5","create_if_block_1","if_block0","create_if_block_19","if_block1","each_blocks","_$StoreForm2","_$StoreForm2$dataForm","affiliate","membership_selected","onSelectPlan","showProducts","_tripod_plans","_tripod_plans2","$StoreForm","_$StoreForm","_$StoreForm$dataForm","email_marketing_purchased","parsedPlans","$PlansStore","$SubscriptionsStore","_affiliate$referralDi","_affiliate","_affiliate$referralDi2","_plan$currency","_plan$is_recommended","_plan$interval","_user$userFromCampaig","discountPlans","referralDiscounts","plans","onDicountsPlan","discountPlan","discountPercent","interval_discount","is_selected","upgrades","downgrades","subscription_plan","price_plan","isNaN","parseInt","interval_selected","dp","_plan$discountsPlan","discountsPlan","parseFloat","toFixed","interval_year_price","is_available","same_interval","tag","userFromCampaign","_ref3","plan_id","planId","atob","onSelect","selectPlan","apply","_$$props$id","classes","_$$props$classes","classesContent","_$$props$classesConte","classesHeader","_$$props$classesHeade","triggerClass","_$$props$triggerClass","_$$props$styles","closeOnClickOverlay","_$$props$closeOnClick","onClose","onOpen","_$$props$active","roleOverlay","modal","OverlayClick","body","button0","button1","hide","_$$props$content","onConfirm","onCancel","cancel_button","_$$props$cancel_butto","confirm_button","_$$props$confirm_butt","classesCancel","_$$props$classesCance","classesConfirm","_$$props$classesConfi","color","_$$props$color","selectData","arr","return_type","_return_type","isArray","parseDate","convert","unixtime","Date","months","day","date","full","time","getMonth","getDate","getFullYear","getHours","getMinutes","getSeconds","onlytime","onlydate","Y","currentMemberships","title","invoiceInfo","create_if_block_4","if_block2","_ctx$6$currentMembers","_ctx$$currentMembersh","buttonView","invoiceData","table","internal_plan","endAt","canceled","element_src","tr","td0","img","h3","td1","td2","_ctx$6$ctx$17$interva","cancel","p0","p1","_ctx$6$ctx$17$interva2","priceInNextPeriod","t4_value","t7_value","_ctx$6$ctx$17$interva3","t4","_ctx$6$ctx$17$interva4","t7","renewal","has_been_terminated","withOutMemberships","br0","br1","all_plans","all_addons","translations","links","getStripeSubs","onCancelProduct","ModalAlert","cancelProduct","_selectData","_subscription$is_sub_","_stripe_sub$discount$","_stripe_sub$discount","_stripe_sub$discount$2","_stripe_sub$coupon","_subscription$stripeP","_subscription$stripeP2","stripe_sub","is_sub_canceled","cancelData","created","startAt","stripePlan","unit_amount","percent_off","coupon","_$$props$name","checked","on_change","Turpial","tpObj","birds","un","v","searchStr","where","what","search","replacement","selector","ext","allowStateEvents","loadModulesOnRoute","autoloader","autoloader_folder","cache","public_path","core_path","folder","loader","httpRequests","show","loaderShow","loaderHide","views","statusResources","resources","myComponents","return_key","get","dta","applyProps","applying","elements","prototype","el","implement","setInterval","clearInterval","window","readyState","app","extendTo","extends","customElements","olderVerBrow","define","_HTMLElement","_inherits","_class","_super","_createSuper","_createClass","HTMLElement","view","models","sources","controller","urls","filesLoaded","inject","files","file","tagName","cancelOnResend","headers","loaded","getString","clone","fetching","request","XMLHttpRequest","open","headersValues","option","setRequestHeader","onload","elementTag","resource","responseText","onerror","idRequest","abort","send","_step2","_iterator2","counter","check","forceLoad","texts","_step3","_iterator3","include","linkCSS","mount","includeCSS","path","file_name","routing","Path","last","LastFolder","subfolder","load","parameters","controller_name","action","action_name","base","module","urlPath","parameter","DataView","routes","getHost","loadModule","relativeModules","location","Host","slash","SearchPublichPath","substr","param","route","change","output","history","object","go","back","forward","router","stateEvent","components","Paths","moduleController","loadController","loadAction","loadParameters","moduleAction","self","historyEvents","URLNoHASH","createHistoryEvent","onpopstate","com","template","html","replacemets","engine","reArrange","_defineProperty","structure","searchall","replaceby","appName","turpial_app_id","realDOMElement","justUpdate","isHTML","child","parent","nextSibling","replaceChild","mapping","createMap","LiteralsString","dom_elem","firstElementChild","place","things","attrs","setAttrsValues","Values","setAttrsNames","pushAttrs","settings","createTag","Connect3Pod","help","needhelp","contactus","br","if_block4","_ctx$13$ctx$4$0$membe","a_href_value","_ctx$13$ctx$4$0$membe3","div_class_value","label","section_1","Data","memberships","membership_names","showOnly","subtitle","showPlans","plansSelector","_tripod_register$has_","_tripod_register","_tripod_plans$links2","_tripod_plans$links$p","fetched","has_chooser_plan_module","tripod_register","updateSubscriptions","membership_icons_fetched","funnels","campaigns","designs","boxes_container","showCurrentMemberships","onReadygetPlans","_tripod_plans$showOnl2","_tripod_plans$order","_tripod_plans$lang$fi","referred_by","public_key_user","public_key_affiliate","order","fields","_plan$interval_year_p","_memberships$name$pos","_memberships$name$pos2","_plan$discountsPlan$d","by","reordered","price_on_year_yearly","sort","membershipsOrdered","flat","membership_icons","changeInterval","changeMembership","urlGetPlans","urlGetAddons","_data$","_data$2","getPlans3Pod","getAddons3Pod","fetched_user","_user$referred_by","email","user_public_key_reversed","reverse","affiliate_public_key_reversed","App"],"mappings":"yBAAA,IAAIA,EAAE,GAAGC,EAAE,OC+BPC,EAo4BAC,2/IAn6BJ,SAASC,KAET,SAASC,EAAOC,EAAKC,GAEZ,IAAA,IAAMC,KAAKD,EACZD,EAAIE,GAAKD,EAAIC,GACjB,OAAOF,EAUX,SAASG,EAAIC,GACT,OAAOA,IAEX,SAASC,IACL,OAAOC,OAAOC,OAAO,MAEzB,SAASC,EAAQC,GACbA,EAAIC,QAAQP,GAEhB,SAASQ,EAAYC,GACV,MAAiB,mBAAVA,EAElB,SAASC,EAAeC,EAAGC,GAChBD,OAAAA,GAAKA,EAAIC,GAAKA,EAAID,IAAMC,GAAOD,GAAkB,WAAbE,EAAOF,IAAgC,mBAANA,EAiChF,SAASG,EAAoBC,EAAWC,EAAOC,GAC3CF,EAAUG,GAAGC,WAAWC,KAb5B,SAAmBJ,GACXA,GAAS,MAATA,EACA,OAAOrB,EAFyB,IAAA,IAAA0B,EAAAC,UAAAC,OAAXC,EAAW,IAAAC,MAAAJ,EAAA,EAAAA,EAAA,EAAA,GAAAK,EAAA,EAAAA,EAAAL,EAAAK,IAAXF,EAAWE,EAAA,GAAAJ,UAAAI,GAI9BC,IAAAA,EAAQX,EAAMY,UAANZ,MAAAA,EAAmBQ,GAC1BG,OAAAA,EAAME,YAAc,WAAMF,OAAAA,EAAME,eAAgBF,EAQ1BC,CAAUZ,EAAOC,IAElD,SAASa,EAAYC,EAAYC,EAAKC,EAAShC,GAC3C,GAAI8B,EAAY,CACNG,IAAAA,EAAWC,EAAiBJ,EAAYC,EAAKC,EAAShC,GAC5D,OAAO8B,EAAW,GAAGG,IAG7B,SAASC,EAAiBJ,EAAYC,EAAKC,EAAShC,GAChD,OAAO8B,EAAW,IAAM9B,EAClBL,EAAOqC,EAAQD,IAAII,QAASL,EAAW,GAAG9B,EAAG+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