Files
doneit-web/.angular/cache/14.2.12/babel-webpack/39fc1a1130f90134d0a2cafad604facd.json
T

1 line
80 KiB
JSON
Raw Normal View History

2023-06-30 09:54:21 +01:00
{"ast":null,"code":"import _asyncToGenerator from \"C:/Users/eudes.inacio/GabineteDigital/gabinete-digital-fo/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\";\nimport { r as registerInstance, e as createEvent, i as getElement, h, H as Host } from './index-7a8b7a1c.js';\nimport { c as componentOnReady, o as debounce } from './helpers-1457892a.js';\nimport { b as getIonMode } from './ionic-global-63a97a32.js';\nimport { o as openURL, c as createColorClasses } from './theme-ff3fc52f.js';\nconst Route = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.ionRouteDataChanged = createEvent(this, \"ionRouteDataChanged\", 7);\n /**\n * Relative path that needs to match in order for this route to apply.\n *\n * Accepts paths similar to expressjs so that you can define parameters\n * in the url /foo/:bar where bar would be available in incoming props.\n */\n this.url = '';\n }\n onUpdate(newValue) {\n this.ionRouteDataChanged.emit(newValue);\n }\n onComponentProps(newValue, oldValue) {\n if (newValue === oldValue) {\n return;\n }\n const keys1 = newValue ? Object.keys(newValue) : [];\n const keys2 = oldValue ? Object.keys(oldValue) : [];\n if (keys1.length !== keys2.length) {\n this.onUpdate(newValue);\n return;\n }\n for (const key of keys1) {\n if (newValue[key] !== oldValue[key]) {\n this.onUpdate(newValue);\n return;\n }\n }\n }\n connectedCallback() {\n this.ionRouteDataChanged.emit();\n }\n static get watchers() {\n return {\n \"url\": [\"onUpdate\"],\n \"component\": [\"onUpdate\"],\n \"componentProps\": [\"onComponentProps\"]\n };\n }\n};\nconst RouteRedirect = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.ionRouteRedirectChanged = createEvent(this, \"ionRouteRedirectChanged\", 7);\n }\n propDidChange() {\n this.ionRouteRedirectChanged.emit();\n }\n connectedCallback() {\n this.ionRouteRedirectChanged.emit();\n }\n static get watchers() {\n return {\n \"from\": [\"propDidChange\"],\n \"to\": [\"propDidChange\"]\n };\n }\n};\nconst ROUTER_INTENT_NONE = 'root';\nconst ROUTER_INTENT_FORWARD = 'forward';\nconst ROUTER_INTENT_BACK = 'back';\n\n// Join the non empty segments with \"/\".\nconst generatePath = segments => {\n const path = segments.filter(s => s.length > 0).join('/');\n return '/' + path;\n};\nconst generateUrl = (segments, useHash, queryString) => {\n let url = generatePath(segments);\n if (useHash) {\n url = '#' + url;\n }\n if (queryString !== undefined) {\n url += '?' + queryString;\n }\n return url;\n};\nconst writePath = (history, root, useHash, path, direction, state, queryString) => {\n const url = generateUrl([...parsePath(root).segments, ...path], useHash, queryString);\n if (direction === ROUTER_INTENT_FORWARD) {\n history.pushState(state, '', url);\n } else {\n history.replaceState(state, '', url);\n }\n};\nconst chainToPath = chain => {\n const path = [];\n for (const route of chain) {\n for (const segment of route.path) {\n if (segment[0] === ':') {\n const param = route.params && route.params[segment.slice(1)];\n if (!param) {\n return null;\n }\n path.push(param);\n } else if (segment !== '') {\n path.push(segment);\n }\n }\n }\n return path;\n};\n// Remove the prefix segments from the path segments.\n//\n// Return:\n// - null when the path segments do not start with the passed prefix,\n// - the path segments after the prefix otherwise.\nconst removePrefix = (prefix, path) => {\n if (prefix.length > path.length) {\n return null;\n }\n if (prefix.length <= 1 && prefix[0] === '') {\n return path;\n }\n for (let i = 0; i < prefix.length; i++) {\n if (prefix[i] !== path[i]) {\n return null;\n }\n }\n if (path.length === prefix.length) {\n return [''];\n }\n return path.slice(prefix.length);\n};\nconst readPath = (loc, root, useHash) => {\n const prefix