forked from 3pod-us/3pod-us.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Calendar3Pod.js.map
1 lines (1 loc) · 160 KB
/
Calendar3Pod.js.map
1
{"version":3,"file":"Calendar3Pod.js","sources":["../../../node_modules/style-inject/dist/style-inject.es.js","../../../node_modules/svelte/internal/index.mjs","../../../src/libraries/turpial.js","../../../src/libraries/calendari18n.js","../../../src/Calendar3Pod.svelte","../../../src/libraries/random_string.js","../../../src/libraries/materialize.js","../../../src/libraries/clickOutside.js","../../../src/controllers/Calendar3Pod.js"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\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","/*\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}","const calendari18n = {\r\n months: [\r\n 'Enero',\r\n 'Febrero',\r\n 'Marzo',\r\n 'Abril',\r\n 'Mayo',\r\n 'Junio',\r\n 'Julio',\r\n 'Augosto',\r\n 'Septiembre',\r\n 'Octubre',\r\n 'Noviembre',\r\n 'Diciembre'\r\n ],\r\n monthsShort: [\r\n 'Ene',\r\n 'Feb',\r\n 'Mar',\r\n 'Abr',\r\n 'May',\r\n 'Jun',\r\n 'Jul',\r\n 'Aug',\r\n 'Sep',\r\n 'Oct',\r\n 'Nov',\r\n 'Dic'\r\n ],\r\n weekdays: [\r\n 'Domingo',\r\n 'Lunes',\r\n 'Martes',\r\n 'Miércoles',\r\n 'Jueves',\r\n 'Viernes',\r\n 'Sábado'\r\n ],\r\n weekdaysShort: [\r\n 'Dom',\r\n 'Lun',\r\n 'Mar',\r\n 'Mié',\r\n 'Jue',\r\n 'Vie',\r\n 'Sáb'\r\n ],\r\n weekdaysAbbrev: [\r\n 'D',\r\n 'L',\r\n 'M',\r\n 'M',\r\n 'J',\r\n 'V',\r\n 'S'\r\n ]\r\n}\r\nexport { calendari18n }","<script>\r\nimport Materialize from './components/Materialize.svelte';\r\nimport { materialize } from \"./libraries/materialize\";\r\nimport { calendari18n } from \"./libraries/calendari18n\";\r\nimport { onMount } from 'svelte';\r\nimport { clickOutside } from './libraries/clickOutside';\r\nimport { random_string } from './libraries/random_string';\r\nexport let props = null;\r\n/**\r\n * options:\r\n * - data-type: date, datetime or time\r\n * - data-format: date format (e.g yyyy-mm-dd)\r\n * - data-placeholder: string\r\n * - data-isRange: true/false\r\n * - data-twelveHour: true/false\r\n * - data-mindate: type new Date()\r\n * - data-maxdate: type new Date()\r\n * - data-inputClasses: classes for all inputs\r\n * - data-class: classes for input-results\r\n * Place any of this options in container div.calendar-3pod\r\n */\r\n\r\nlet materialize_loaded = false;\r\nlet pickadateElement;\r\nlet container;\r\n\r\nlet calendar = props ?? $$props.calendar;\r\nlet all_props = $$props;\r\nlet number_calendar = all_props.number_calendar;\r\nlet placeholder = calendar.dataset?.placeholder ?? \"yyyy-mm-dd\";\r\nlet format = calendar.dataset?.format ?? \"yyyy-mm-dd\";\r\nlet type = calendar.dataset?.type ?? \"date\"; // date, datetime, time\r\nlet isRange = calendar.dataset?.isRange ?? \"false\";\r\nlet twelveHour = calendar.dataset?.twelveHour ?? \"false\";\r\nlet inputClasses = calendar.dataset?.inputClasses ?? \"\";\r\nlet classes = calendar.dataset?.class ?? \"\";\r\nlet mindate = calendar.dataset?.mindate ?? null;\r\nlet maxdate = calendar.dataset?.maxdate ?? null;\r\nlet nameInputResult = calendar.dataset?.name ?? \"date\";\r\nlet required = calendar.dataset?.required ?? \"false\";\r\nlet id_component = calendar.dataset?.idComponent ?? \"component-\"+random_string(8);\r\nlet inputResult;\r\n\r\nrequired = required == \"true\" ? true : false;\r\ntwelveHour = twelveHour == \"true\" ? true : false;\r\nisRange = isRange == \"true\" ? true : false;\r\n\r\n\r\n/**\r\n * Init materialize\r\n*/\r\n\r\n\r\n\r\nonMount(()=>{ \r\n let container = document.getElementById(id_component);\r\n let inputs = [...container.querySelectorAll(\".results-calendar-input\")];\r\n inputs.map(( input )=>{\r\n if(required === true){\r\n input.setAttribute(\"required\", '');\r\n }else{\r\n input.setAttribute('readonly', '');\r\n }\r\n })\r\n\r\n \r\n materialize(()=>{\r\n materialize_loaded = true;\r\n new Calendar(container);\r\n })\r\n})\r\n\r\nclass inputsCalendar \r\n{\r\n constructor()\r\n {\r\n this.container = document.getElementById(id_component);\r\n }\r\n hiddenInputs()\r\n {\r\n let inputs = [...this.container.querySelectorAll(\".hidden-calendar-input\")];\r\n let status = \"filled\";\r\n inputs.map(( input )=>{\r\n if(input.value === \"\"){\r\n status = \"empty\";\r\n }\r\n })\r\n\r\n return {\r\n restore: function(){\r\n inputs.map(( input )=>{\r\n input.value = \"\";\r\n })\r\n },\r\n status: status,\r\n }\r\n }\r\n /**\r\n * calendarInputs:\r\n * - muestra si los inputs visibles estan llenos o no.\r\n */\r\n calendarInputs()\r\n {\r\n let inputs = [...this.container.querySelectorAll(\".results-calendar-input\")];\r\n let status = \"filled\";\r\n inputs.map(( input )=>{\r\n if(input.value === \"\"){\r\n status = \"empty\";\r\n }\r\n })\r\n\r\n return {\r\n restore: function(){\r\n inputs.map(( input )=>{\r\n input.value = \"\";\r\n })\r\n },\r\n status: status,\r\n }\r\n }\r\n}\r\n\r\nfunction restoreAll()\r\n{\r\n let inputs = new inputsCalendar();\r\n inputs.calendarInputs().restore();\r\n inputs.hiddenInputs().restore();\r\n}\r\n\r\nclass Calendar\r\n{\r\n \r\n constructor(container){\r\n if(materialize_loaded === false){\r\n return;\r\n }\r\n if(container === null){ return; }\r\n this.container = container;\r\n this.superContainer = container.parentNode;\r\n this.controls = container.querySelector(\".container-controls\");\r\n this.fromInput = container.querySelector(\".from-calendar\"); \r\n this.toInput = container.querySelector(\".to-calendar\");\r\n this.toInputTime = container.querySelector(\".to-calendar-time\");\r\n this.fromInputTime = container.querySelector(\".from-calendar-time\");\r\n this.resultsInputFrom = container.querySelector(\".results-calendar-from\");\r\n this.resultsInputTo = container.querySelector(\".results-calendar-to\");\r\n this.is_open = false;\r\n this.currentInstance = null;\r\n this.window_open = \"date\";\r\n this.type_close = \"default\";\r\n this.results = [];\r\n this.step = 1;\r\n this.is_opening = false;\r\n\r\n this.events();\r\n }\r\n destroyInstance()\r\n {\r\n if(this.currentInstance !== null){\r\n this.currentInstance.destroy();\r\n }\r\n }\r\n events(){\r\n let app = this;\r\n if(!this.controls.classList.contains(\"control-container-events-added\")){\r\n this.controls.classList.add(\"control-container-events-added\")\r\n let elements = [...this.controls.querySelectorAll(\"input, .button\")];\r\n elements.map((node)=>{\r\n node.addEventListener(\"click\", (event)=>{\r\n if(app.is_open === true){ return; }\r\n app.step = 1; // restart steps\r\n if(this.window_open === \"time\"){\r\n app.open(app.toInputTime);\r\n return;\r\n }\r\n\r\n if(app.step === 1){\r\n let inputs = new inputsCalendar();\r\n inputs.hiddenInputs().restore();\r\n }\r\n \r\n app.open(app.fromInput);\r\n })\r\n })\r\n \r\n }\r\n \r\n \r\n\r\n this.fromInput.addEventListener(\"change\", ()=>{\r\n this.resultsInputFrom.value = this.fromInput.value;\r\n app.destroyInstance();\r\n })\r\n if(this.fromInputTime !== null){\r\n this.fromInputTime.addEventListener(\"change\", ()=>{\r\n this.resultsInputFrom.value = `${this.resultsInputFrom.value} : ${this.fromInputTime.value}`;\r\n inputResult.value = `${this.resultsInputFrom.value}`;\r\n app.onClose();\r\n })\r\n }\r\n \r\n if(this.toInput !== null){\r\n this.toInput.addEventListener(\"change\", ()=>{\r\n this.resultsInputTo.value = this.toInput.value;\r\n inputResult.value = `${this.resultsInputFrom.value} - ${this.resultsInputTo.value}`;\r\n })\r\n }\r\n if(this.toInputTime !== null){\r\n this.toInputTime.addEventListener(\"change\", ()=>{\r\n this.resultsInputTo.value = `${this.resultsInputTo.value} : ${this.toInputTime.value}`;\r\n inputResult.value = `${this.resultsInputFrom.value} - ${this.resultsInputTo.value}`;\r\n app.onClose();\r\n })\r\n }\r\n\r\n /**\r\n * Añadir resultados a unúnico input.\r\n */\r\n \r\n\r\n\r\n }\r\n cancelOnClickOutside()\r\n {\r\n let app = this;\r\n if(!this.container.classList.contains(\"event-click-outside\")){\r\n this.container.classList.add(\"event-click-outside\")\r\n let yearList = \"ul[id*='select-options-'].select-dropdown\";\r\n\r\n clickOutside([this.container, yearList], (destory)=>{\r\n this.container.classList.remove(\"event-click-outside\")\r\n app.is_open = false;\r\n setTimeout(() => {\r\n app.type_close = \"complete\";\r\n app.currentInstance.close();\r\n setTimeout(() => {\r\n try {\r\n app.currentInstance.destroy();\r\n \r\n } catch (error) {\r\n console.warn(error)\r\n }\r\n app.type_close = \"default\";\r\n }, 350);\r\n /**\r\n * in case of range\r\n */\r\n let inputs = new inputsCalendar();\r\n if(inputs.hiddenInputs().status === \"empty\"){\r\n inputs.calendarInputs().restore();\r\n inputs.hiddenInputs().restore();\r\n } \r\n destory(); \r\n }, 100);\r\n }, true)\r\n }\r\n \r\n \r\n }\r\n open(input, method){ \r\n let app = this; \r\n method = method || \"Datepicker\"\r\n this.results = [];\r\n if(app.is_open === true){ return; }\r\n if(app.is_opening === true){ return; }\r\n app.is_opening = true;\r\n app.is_open = true; \r\n let options = {\r\n container: `#${id_component} .pickadate-${method}`,\r\n format: format,\r\n i18n: {\r\n months: calendari18n.months,\r\n monthsShort: calendari18n.monthsShort,\r\n weekdays: calendari18n.weekdays,\r\n weekdaysShort: calendari18n.weekdaysShort,\r\n weekdaysAbbrev: calendari18n.weekdaysAbbrev\r\n },\r\n onClose: ()=>{\r\n app.onClose();\r\n },\r\n }\r\n \r\n if(mindate !== null){\r\n options.minDate = new Date(new Date(mindate).getTime()+1000);\r\n }\r\n if(maxdate !== null){\r\n options.maxDate = new Date(new Date(maxdate).getTime()+1000);\r\n }\r\n \r\n\r\n \r\n\r\n if(method === \"Timepicker\"){\r\n options.twelveHour = twelveHour;\r\n options.i18n = {\r\n cancel: \"Cancelar\",\r\n done: \"Ok\"\r\n }\r\n }else{\r\n function applyMinDate(){\r\n let day = (3600 * 24) * 1000;\r\n return new Date(new Date(app.resultsInputFrom.value).getTime()+day);\r\n }\r\n if(app.step === 2 && type === \"datetime\" && isRange === true){\r\n options.minDate = applyMinDate();\r\n }\r\n if(app.step === 2 && type === \"date\" && isRange === true){\r\n options.minDate = applyMinDate();\r\n }\r\n }\r\n \r\n \r\n let instance = M[method].init(input, options);\r\n app.currentInstance = instance;\r\n\r\n\r\n setTimeout(() => {\r\n instance.open()\r\n if(method === \"Datepicker\"){\r\n if(input.value !== \"\"){\r\n instance.setDate(new Date(input.value));\r\n }else{\r\n instance.setDate(new Date());\r\n }\r\n }\r\n\r\n if(method === \"TimePicker\"){\r\n if(input.value !== \"\"){\r\n instance.defaultTime(input.value);\r\n }else{\r\n instance.defaultTime('now');\r\n }\r\n }\r\n\r\n setTimeout(() => { \r\n app.cancelOnClickOutside();\r\n app.is_opening = false;\r\n }, 100);\r\n }, 100);\r\n }\r\n onClose(){\r\n let app = this;\r\n if(app.type_close === \"complete\"){\r\n return;\r\n }\r\n setTimeout(()=>{\r\n app.is_open = false;\r\n if(type === \"datetime\" && app.step === 1){ \r\n app.open(app.fromInputTime, \"Timepicker\");\r\n app.step++;\r\n }else if(type === \"datetime\" && isRange === true && app.step === 2){\r\n app.open(app.toInput);\r\n app.step++;\r\n }else if(type === \"datetime\" && isRange === true && app.step === 3){\r\n app.open(app.toInputTime, \"Timepicker\");\r\n app.step++;\r\n return;\r\n }else if(type === \"date\" && isRange === true && app.step === 1){\r\n app.step++;\r\n app.open(app.toInput);\r\n return;\r\n }\r\n \r\n }, 50)\r\n }\r\n}\r\n\r\n\r\n\r\n\r\n</script>\r\n<Materialize />\r\n<style>\r\n.datepicker-materialize{\r\n font-family: 'Montserrat',\"Roboto\",\"Calibri\", sans-serif;;\r\n}\r\n.datepicker-materialize :global(.modal-content){\r\n width: auto;\r\n}\r\n.input-calendar:focus{\r\n box-shadow: none !important;\r\n}\r\n.datepicker-materialize :global(.is-range-true .results-calendar-from){\r\n border-right: 0;\r\n border-left: 0;\r\n}\r\n.datepicker-materialize :global(.results-calendar-from){\r\n border-left: 0;\r\n}\r\n.datepicker-materialize :global(.is-range-true .results-calendar-to){\r\n border-left: 0;\r\n}\r\n.datepicker-materialize :global(.datepicker-calendar-container){\r\n background: #fff;\r\n border-radius: 0 0 20px 20px;\r\n}\r\n.datepicker-materialize :global(.confirmation-btns button:first-child){\r\n display: none;\r\n}\r\n.datepicker-materialize .button-icon{\r\n border-right: none;\r\n}\r\n.datepicker-materialize .button-icon:hover{\r\n background-color: #fff !important;\r\n}\r\n.datepicker-materialize :global(.modal){\r\n top: calc(50vh - 200px) !important;\r\n}\r\n.datepicker-materialize :global(.modal){\r\n top: calc(50vh - 200px) !important;\r\n max-width: 100% !important;\r\n}\r\n\r\n.datepicker-materialize .icon-calendar-3pod::before{\r\n content: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAABmJLR0QA/wD/AP+gvaeTAAAE/ElEQVRoge1XQYtcRRD++r3dzC4LkuSkcWIMQdegeBbUP+BZFCEEEbLiOaAIHrzoL1B0RRTRsN49+B8SQTayqCjqZneNXnaQbJyZ3XmvPLzX3VXdXT3zsogepg87nep+1V9VffV1B5iP+ZiPmcez3xy8+8yNg4Onb9x55//iu+iymQhXAawYmKud0P2LvhfUlTdvPoeK1g3VfUzGwPAvvtorrnxFpncfUC4AVMMQAUTNHH4OonatBsDm1j4ZA+M7wvfy8x+SWVwByhIg2gVo7e9rl75OwdQrUGMdoL77N5FYNn6BWY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2+JC+/nV+Vr8/z7v0lqBpIZVkwbmQrILMavTUkdvn56qfD1aIGEr02ZWKViLLjOAbhMKAwUTa04yMqwEwGd97wanQMQMkmBjDpJ9OoRvjZD3ovX5rCKeS/rIfshE4Aqo/1Pd8lz1HNdlUGeuWSzB69UsDm3p/wDOHr7YtfXqKSGKpkUfBFmLsjiVKVyW9nfDIem3gPHeiKzNDQ4Sfrh/sF4L+il/48tGwAIu8d+ImsVY5eY9xlXzAZqgJ3OAVTAGoAdl8WI94gzB6ViIjif5aRkiuAIBtihgtY0nPMxH/MxH//t+AfYKl9MhC5yvAAAAABJRU5ErkJggg==');\r\n \r\n}\r\n.datepicker-materialize .icon-calendar-3pod{\r\n transform: scale(0.5);\r\n position: relative;\r\n top: 3px;\r\n}\r\n.datepicker-materialize .button, .input{\r\n border-width: 1px;\r\n}\r\n.datepicker-materialize :global(.modal-overlay){\r\n display: none !important;\r\n}\r\n.datepicker-materialize :global(.datepicker-container), .datepicker-materialize :global(.timepicker-container){\r\n flex-direction: column !important;\r\n width: fit-content;\r\n margin: auto;\r\n}\r\n.datepicker-materialize :global(.timepicker-display-am-pm){\r\n position: absolute;\r\n right: 1rem;\r\n bottom: 1rem;\r\n}\r\n.datepicker-materialize :global(.datepicker-date-display), .datepicker-materialize :global(.timepicker-digital-display){\r\n padding: 20px 22px;\r\n flex: 1 auto !important;\r\n border-radius: 20px 20px 0 0;\r\n width: 325px;\r\n}\r\n.datepicker-materialize :global(.timepicker-analog-display){\r\n background: #fff;\r\n border-radius: 0 0 20px 20px;\r\n}\r\n\r\n.container-pickadate{\r\n width: fit-content;\r\n max-height: fit-content;\r\n margin: auto;\r\n border-radius: 0 0 20px 20px !important;\r\n position: absolute;\r\n z-index: 20;\r\n margin: auto;\r\n left: 0;\r\n right: 0;\r\n top: 0;\r\n bottom: 0;\r\n}\r\n.container-controls input{\r\n cursor: pointer;\r\n}\r\n.container-controls{\r\n position: relative;\r\n}\r\n.container-visible-inputs{\r\n position: relative;\r\n justify-content: center;\r\n}\r\n.icon-delete{\r\n position: absolute;\r\n z-index: 5;\r\n right: 0.25rem;\r\n top: 0.45rem;\r\n padding: 0.8rem 1rem;\r\n}\r\n.datepicker-materialize-container{\r\n position: relative;\r\n}\r\n.datepicker-materialize :global(.datepicker-modal), .datepicker-materialize :global(.modal){\r\n position: relative !important;\r\n bottom: 0;\r\n top: 0 !important;\r\n left: 0 !important;\r\n margin: auto;\r\n box-shadow: 2px 2px 32px rgb(133 133 133 / 32%);\r\n border-radius: 20px;\r\n}\r\n.datepicker-materialize input.input, \r\n.datepicker-materialize button.button,\r\n.datepicker-materialize input.input:hover, \r\n.datepicker-materialize button.button:hover\r\n{\r\n border-color: #AAB8C2;\r\n}\r\n\r\n:global(.is-range-true) .results-calendar-from{\r\n background: transparent url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI4IiBoZWlnaHQ9IjE4IiB2aWV3Qm94PSIwIDAgOCAxOCI+CiAgICA8cGF0aCBmaWxsPSIjOTU5OUFBIiBmaWxsLXJ1bGU9Im5vbnplcm8iIGQ9Ik0uMTE5LjcxOGw3LjE1OCA3LjQwNy0uMDMzLS41NTEtNi43MzcgOC44ODlhLjQyNS40MjUgMCAwIDAgLjA4LjU5My40Mi40MiAwIDAgMCAuNTktLjA4bDYuNzM3LTguODg5YS40MjUuNDI1IDAgMCAwLS4wMzMtLjU1MUwuNzIzLjEyOEEuNDIuNDIgMCAwIDAgLjEyOC4xMmEuNDI1LjQyNSAwIDAgMC0uMDA5LjU5OHoiLz4KPC9zdmc+Cg==') no-repeat 96%/10px;\r\n}\r\n</style>\r\n<div id={id_component} bind:this=\"{container}\" class=\"datepicker-materialize\" tabindex=\"-1\">\r\n <div class=\"datepicker-materialize-container\" tabindex=\"-1\">\r\n {#if isRange === true}\r\n <span class=\"icon icon-delete\" on:click=\"{restoreAll}\" >\r\n <div class=\"delete has-background-danger\"></div>\r\n </span>\r\n {/if}\r\n <div class=\"container-controls\">\r\n <div class=\"flex-center\" style=\"margin: 0;\">\r\n <div class=\"field has-addons\"> \r\n <div class=\"control\">\r\n <input tabindex=\"-1\" type=\"hidden\" name=\"from-calendar\" class=\"from-calendar hidden-calendar-input is-hovered {inputClasses} input-calendar input\" placeholder=\"{placeholder}\" readonly> \r\n {#if type === \"datetime\"}\r\n <input tabindex=\"-1\" type=\"hidden\" name=\"from-calendar-time\" class=\"from-calendar-time hidden-calendar-input is-hovered {inputClasses} input-calendar input\" placeholder=\"{placeholder}\" readonly> \r\n {/if} \r\n </div>\r\n {#if isRange === true}\r\n <div class=\"control\">\r\n <input tabindex=\"-1\" type=\"hidden\" name=\"to-calendar\" class=\"to-calendar hidden-calendar-input is-hovered {inputClasses} input-calendar input\" placeholder=\"{placeholder}\" readonly>\r\n {#if type === \"datetime\"}\r\n <input tabindex=\"-1\" type=\"hidden\" name=\"to-calendar-time\" class=\"to-calendar-time hidden-calendar-input is-hovered {inputClasses} input-calendar input\" placeholder=\"{placeholder}\" readonly>\r\n {/if} \r\n </div>\r\n {/if}\r\n </div> \r\n </div> \r\n <div class=\"field has-addons container-visible-inputs is-range-{isRange}\">\r\n <div class=\"control\"> \r\n <button type=\"button\" tabindex=\"-1\" class=\"button is-primary is-rounded is-outlined button-icon has-background-white\">\r\n <span class=\"icon is-left\">\r\n <i class=\"icon-calendar-3pod\"></i>\r\n </span>\r\n </button>\r\n </div>\r\n <input tabindex=\"-1\" type=\"hidden\" class=\"input-total-result {classes}\" name=\"{nameInputResult}\" bind:this=\"{inputResult}\">\r\n <div class=\"control\">\r\n {#if isRange === false}\r\n <span class=\"icon icon-delete\" on:click=\"{restoreAll}\" >\r\n <div class=\"delete has-background-danger\"></div>\r\n </span>\r\n {/if}\r\n <input tabindex=\"-1\" type=\"text\" on:keydown|preventDefault=\"{(e)=>{}}\" class=\"results-calendar-from results-calendar-input is-hovered is-rounded {inputClasses} input-calendar input\" placeholder=\"{placeholder}\">\r\n </div>\r\n {#if isRange === true}\r\n <div class=\"control\">\r\n <input tabindex=\"-1\" type=\"text\" on:keydown|preventDefault=\"{(e)=>{}}\" class=\"results-calendar-to results-calendar-input is-hovered is-rounded {inputClasses} input-calendar input\" placeholder=\"{placeholder}\">\r\n </div>\r\n {/if}\r\n </div>\r\n </div> \r\n </div>\r\n <div class=\"container-pickadate pickadate-Datepicker\" tabindex=\"-1\"></div>\r\n <div class=\"container-pickadate pickadate-Timepicker\" tabindex=\"-1\"></div>\r\n</div>","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};","import {turpial} from \"./turpial\"\r\nconst materialize = function(callback){\r\n if(typeof M !== \"undefined\"){\r\n callback();\r\n return;\r\n }\r\n turpial.fetch({\r\n url: [\"https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0-beta/js/materialize.min.js\"],\r\n ready: ()=>{\r\n callback();\r\n },\r\n })\r\n}\r\n\r\nexport { materialize }","/** Dispatch event on click outside of nodes */\r\nexport function clickOutside(nodes, onClicked){\r\n onClicked = onClicked||function(){};\r\n if(Array.isArray(nodes) === false){\r\n nodes = [nodes];\r\n }\r\n \r\n let destroy = function() {\r\n document.removeEventListener('click', catchClick, true);\r\n }\r\n \r\n const catchClick = function(event){\r\n let hasBeenCliked = true;\r\n let hasBeenClickedOnce = false;\r\n nodes.map(( node )=>{\r\n if(typeof node === \"string\"){\r\n node = document.querySelector(node);\r\n }\r\n\r\n if(node === null){ return; }\r\n \r\n if(node.contains(event.target) === true){\r\n hasBeenClickedOnce = true; \r\n } \r\n if(node.contains(event.target) === false){\r\n hasBeenCliked = false;\r\n }\r\n })\r\n if(hasBeenClickedOnce === true){\r\n hasBeenCliked = true;\r\n }\r\n if(hasBeenCliked === false){\r\n setTimeout(() => {\r\n if(document.contains(event.target)){\r\n onClicked(destroy);\r\n }\r\n }, 25);\r\n }\r\n }\r\n document.addEventListener(\"click\", catchClick, true);\r\n }","// bulma docs https://dev.to/1n0t/creacion-de-un-proyecto-svelte-bulma-sass-1o8i\r\nimport \"../styles.bulma.scss\";\r\nimport App from '../Calendar3Pod.svelte';\r\n\r\nlet calendars = [...document.querySelectorAll(\".calendar-3pod\")];\r\nwindow.calendar3PodInit = function(){\r\n let calendars = [...document.querySelectorAll(\".calendar-3pod\")];\r\n init(calendars);\r\n}\r\nwindow.calendars3PodElements = [];\r\nfunction init(calendars){\r\n calendars.map(( calendar )=>{\r\n if(!calendar.classList.contains(\"initialized-calendar\")){\r\n let id = window.calendars3PodElements.length+1;\r\n new App({\r\n target: calendar,\r\n props: {\r\n data: calendar.dataset,\r\n calendar: calendar,\r\n number_calendar: id,\r\n }\r\n });\r\n window.calendars3PodElements.push({\r\n calendar: calendar,\r\n id: id\r\n });\r\n calendar.classList.add(\"initialized-calendar\");\r\n }\r\n })\r\n}\r\n\r\ninit(calendars);\r\n\r\n\r\n//export default app;"],"names":["styleInject","css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","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","exclude_internal_props","props","result","append","target","node","insert","anchor","detach","parentNode","removeChild","element","name","space","data","listen","event","handler","options","addEventListener","removeEventListener","prevent_default","preventDefault","call","this","attr","attribute","value","removeAttribute","getAttribute","setAttribute","children","Array","from","childNodes","set_current_component","component","onMount","Error","get_current_component","$$","on_mount","push","dirty_components","binding_callbacks","render_callbacks","flush_callbacks","resolved_promise","Promise","resolve","update_scheduled","add_render_callback","seen_callbacks","Set","flushidx","flush","saved_component","length","update","pop","i","callback","has","add","clear","fragment","before_update","dirty","p","ctx","after_update","outroing","transition_in","block","local","delete","mount_component","customElement","on_destroy","m","new_on_destroy","map","filter","destroy_component","detaching","d","make_dirty","then","fill","init","instance","create_fragment","not_equal","append_styles","parent_component","bound","on_disconnect","context","Map","callbacks","skip_bound","root","ready","ret","hydrate","nodes","l","c","intro","SvelteComponent","$destroy","index","indexOf","splice","$$props","obj","$$set","keys","Turpial","tpObj","birds","un","v","r","searchStr","where","what","position","search","replacement","split","join","find","selector","getElementById","ext","allowStateEvents","loadModulesOnRoute","autoloader","autoloader_folder","cache","public_path","core_path","folder","loader","httpRequests","show","loaderShow","hide","loaderHide","views","statusResources","resources","myComponents","random_string","characters","charactersLength","charAt","Math","floor","random","selectData","arr","item","return_key","turpial","get","dta","key","applyProps","tag","applying","elements","querySelectorAll","prototype","slice","el","implement","_this","limit","interval","setInterval","console","warn","clearInterval","window","readyState","set","app","extendTo","extends","customElements","olderVerBrow","define","HTMLElement","view","models","sources","controller","urls","filesLoaded","inject","files","file","tagName","innerHTML","text","fetch","cancelOnResend","headers","method","attributes","url","loaded","getString","clone","fetching","remove","request","XMLHttpRequest","open","headersValues","header","option","setRequestHeader","onload","status","elementTag","resource","responseText","content","rel","media","href","onerror","idRequest","id","abort","e","send","counter","check","forceLoad","texts","include","linkCSS","link","mount","includeCSS","path","file_name","routing","Path","last","LastFolder","subfolder","load","parameters","controller_name","action","action_name","base","module","urlPath","parameter","error","DataView","routes","getHost","loadModule","relativeModules","location","Host","slash","SearchPublichPath","substr","n","param","route","host","change","output","history","object","title","go","back","forward","router","stateEvent","components","Paths","moduleController","loadController","loadAction","loadParameters","moduleAction","self","historyEvents","URLNoHASH","createHistoryEvent","onpopstate","com","template","html","replacemets","engine","isArray","reArrange","values","number","structure","items","searchall","replaceby","appName","turpial_app_id","realDOMElement","Number","isInteger","justUpdate","render","string","isHTML","child","parent","nextSibling","replaceChild","innerText","mapping","createMap","LiteralsString","dom_elem","firstElementChild","place","things","attrs","setAttrsValues","Values","setAttrsNames","pushAttrs","settings","createTag","calendari18n","months","monthsShort","weekdays","weekdaysShort","weekdaysAbbrev","important","setProperty","o","outros","container","materialize_loaded","calendar","number_calendar","inputResult","placeholder","dataset","_calendar$dataset","format","_calendar$dataset2","_calendar$dataset3","isRange","_calendar$dataset4","twelveHour","_calendar$dataset5","inputClasses","_calendar$dataset6","classes","_calendar$dataset7","class","mindate","_calendar$dataset8","maxdate","_calendar$dataset9","nameInputResult","_calendar$dataset10","required","_calendar$dataset11","id_component","_calendar$dataset12","idComponent","input","Calendar","M","inputsCalendar","inputs","restore","superContainer","controls","querySelector","fromInput","toInput","toInputTime","fromInputTime","resultsInputFrom","resultsInputTo","is_open","currentInstance","window_open","type_close","results","step","is_opening","events","destroy","classList","contains","hiddenInputs","destroyInstance","onClose","onClicked","catchClick","hasBeenCliked","hasBeenClickedOnce","setTimeout","clickOutside","destory","_this2","close","calendarInputs","i18n","minDate","Date","getTime","maxDate","cancel","done","applyMinDate","setDate","defaultTime","cancelOnClickOutside","calendars","calendars3PodElements","App","calendar3PodInit"],"mappings":"khJAAA,SAASA,EAAYC,EAAKC,QACX,IAARA,IAAiBA,EAAM,QACxBC,EAAWD,EAAIC,YAEdF,GAA2B,oBAAbG,cAEfC,EAAOD,SAASC,MAAQD,SAASE,qBAAqB,QAAQ,GAC9DC,EAAQH,SAASI,cAAc,SACnCD,EAAME,KAAO,WAEI,QAAbN,GACEE,EAAKK,WACPL,EAAKM,aAAaJ,EAAOF,EAAKK,YAKhCL,EAAKO,YAAYL,GAGfA,EAAMM,WACRN,EAAMM,WAAWC,QAAUb,EAE3BM,EAAMK,YAAYR,SAASW,eAAed,SC44B1Ce,EAn6BJ,SAASC,KAET,SAASC,EAAOC,EAAKC,OAEZ,IAAMC,KAAKD,EACZD,EAAIE,GAAKD,EAAIC,UACVF,EAUX,SAASG,EAAIC,UACFA,IAEX,SAASC,WACEC,OAAOC,OAAO,MAEzB,SAASC,EAAQC,GACbA,EAAIC,QAAQP,GAEhB,SAASQ,EAAYC,SACO,mBAAVA,EAElB,SAASC,EAAeC,EA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