From 0d5a95a5952ff04b2a232809693a812d75597376 Mon Sep 17 00:00:00 2001 From: Jean Machuca Date: Wed, 25 Dec 2024 18:50:24 -0300 Subject: [PATCH] fix paths --- build-esbuild.js | 3 +- eslint.config.mjs | 2 +- package-lock.json | 51 ++++++++++++++++++++++------ package.json | 3 +- public/browser/qcobjects.js.map | 2 +- public/cjs/index.cjs.map | 2 +- public/esm/index.mjs.map | 2 +- public/types/index.d.ts | 60 ++++++++++++++++----------------- public/types/index.d.ts.map | 2 +- spec/testsClassFactorySpec.ts | 2 +- spec/testsConfigSpec.ts | 2 +- spec/testsGlobalFeaturesSpec.ts | 2 +- spec/testsSpec.ts | 2 +- spec/testsTypeSpec.ts | 2 +- src/ArrayCollection.ts | 2 +- src/BackendMicroservice.ts | 2 +- src/CONFIG.ts | 2 +- src/Class.ts | 2 +- src/ClassFactory.ts | 2 +- src/Component.ts | 2 +- src/ComponentFactory.ts | 2 +- src/Controller.ts | 2 +- src/Crypt.ts | 2 +- src/DDO.ts | 2 +- src/DOMCreateElement.ts | 2 +- src/DefaultTemplateHandler.ts | 2 +- src/Effect.ts | 2 +- src/InheritClass.ts | 2 +- src/MainProcess.ts | 2 +- src/PrimaryCollections.ts | 2 +- src/Processor.ts | 2 +- src/QCObjects.ts | 2 +- src/Service.ts | 2 +- src/SourceCSS.ts | 2 +- src/SourceJS.ts | 2 +- src/Tag.ts | 2 +- src/Timer.ts | 2 +- src/TransitionEffect.ts | 4 +-- src/View.ts | 2 +- src/WidgetsFactory.ts | 2 +- src/asyncLoad.ts | 2 +- src/componentLoader.ts | 2 +- src/defaultProcessors.ts | 2 +- src/globalSettings.ts | 2 +- src/routings.ts | 2 +- src/serviceLoader.ts | 2 +- src/top.ts | 2 +- tsconfig.d.json | 4 ++- tsconfig.jasmine.json | 8 ++--- tsconfig.json | 4 +-- 50 files changed, 126 insertions(+), 95 deletions(-) diff --git a/build-esbuild.js b/build-esbuild.js index 56fd1bcf..40f72715 100644 --- a/build-esbuild.js +++ b/build-esbuild.js @@ -18,8 +18,7 @@ const baseSettings = { chunkNames: "chunks/[name]-[hash]", plugins: [ alias({ - "types": path.join(__dirname, "src/types/global/index.d.ts"), - "./types/global": path.join(__dirname, "src/types/global/index.d.ts") + "@types": path.join(__dirname, "src/types/global/index.d.ts") }) ], external: ["os", "path", "http", "url", diff --git a/eslint.config.mjs b/eslint.config.mjs index 981086ba..a840f6cc 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -32,7 +32,7 @@ export default [ parserOptions: { projectService: true, tsconfigRootDir: import.meta.dirname, - programs: [parser.createProgram('tsconfig.json')], + programs: [parser.createProgram('tsconfig.json')] } , diff --git a/package-lock.json b/package-lock.json index ac30cf05..b19ce7c8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -29,6 +29,7 @@ "install": "^0.13.0", "jasmine": "^3.99.0", "ts-node": "^10.9.2", + "tsconfig-paths": "^4.2.0", "typescript": "^5.7.2", "typescript-eslint": "^8.18.1" }, @@ -2054,6 +2055,19 @@ "node": ">=0.10.0" } }, + "node_modules/eslint-plugin-import/node_modules/json5": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", + "dev": true, + "license": "MIT", + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "json5": "lib/cli.js" + } + }, "node_modules/eslint-plugin-import/node_modules/semver": { "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", @@ -2064,6 +2078,19 @@ "semver": "bin/semver.js" } }, + "node_modules/eslint-plugin-import/node_modules/tsconfig-paths": { + "version": "3.15.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", + "integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/json5": "^0.0.29", + "json5": "^1.0.2", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + } + }, "node_modules/eslint-plugin-n": { "version": "15.7.0", "resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-15.7.0.tgz", @@ -3378,16 +3405,16 @@ "license": "MIT" }, "node_modules/json5": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", - "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true, "license": "MIT", - "dependencies": { - "minimist": "^1.2.0" - }, "bin": { "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" } }, "node_modules/keyv": { @@ -4589,16 +4616,18 @@ } }, "node_modules/tsconfig-paths": { - "version": "3.15.0", - "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", - "integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-4.2.0.tgz", + "integrity": "sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg==", "dev": true, "license": "MIT", "dependencies": { - "@types/json5": "^0.0.29", - "json5": "^1.0.2", + "json5": "^2.2.2", "minimist": "^1.2.6", "strip-bom": "^3.0.0" + }, + "engines": { + "node": ">=6" } }, "node_modules/tslib": { diff --git a/package.json b/package.json index 8043b9fa..063a2509 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "build:esbuild": "node ./build-esbuild.js", "start": "qcobjects-shell", "test:ts-types": "npx tsc --project ./tsconfig.jasmine.json ", - "test:jasmine": "npm run test:ts-types && npx ts-node --project ./tsconfig.jasmine.json ./node_modules/jasmine/bin/jasmine.js", + "test:jasmine": "npm run test:ts-types && npx ts-node -r tsconfig-paths/register --project ./tsconfig.jasmine.json ./node_modules/jasmine/bin/jasmine.js", "test": "(npm run lint && npm run test:jasmine)", "lint": "(npx -y eslint@latest src/**/*.ts --fix )", "preversion": "npm cache verify && npm test", @@ -135,6 +135,7 @@ "install": "^0.13.0", "jasmine": "^3.99.0", "ts-node": "^10.9.2", + "tsconfig-paths": "^4.2.0", "typescript": "^5.7.2", "typescript-eslint": "^8.18.1" }, diff --git a/public/browser/qcobjects.js.map b/public/browser/qcobjects.js.map index c1921023..af42c236 100644 --- a/public/browser/qcobjects.js.map +++ b/public/browser/qcobjects.js.map @@ -1,7 +1,7 @@ { "version": 3, "sources": ["../../src/is_raw_class.ts", "../../src/ObjectName.ts", "../../src/getType.ts", "../../src/make_global.ts", "../../src/PrimaryCollections.ts", "../../src/Export.ts", "../../src/_import_.ts", "../../src/platform.ts", "../../src/Logger.ts", "../../src/Cast.ts", "../../src/DOMCreateElement.ts", "../../src/IncrementInstanceID.ts", "../../src/introspection.ts", "../../src/Package.ts", "../../src/InheritClass.ts", "../../src/isQCObjects.ts", "../../src/is_a.ts", "../../src/is_forbidden_name.ts", "../../src/LegacyCopy.ts", "../../src/Class.ts", "../../src/ClassFactory.ts", "../../src/Base64.ts", "../../src/basePath.ts", "../../src/DataStringify.ts", "../../src/domain.ts", "../../src/New.ts", "../../src/secretKey.ts", "../../src/Crypt.ts", "../../src/ConfigSettings.ts", "../../src/CONFIG.ts", "../../src/Processor.ts", "../../src/routings.ts", "../../src/asyncLoad.ts", "../../src/ComplexStorageCache.ts", "../../src/serviceLoader.ts", "../../src/tag_filter.ts", "../../src/componentLoader.ts", "../../src/Component.ts", "../../src/ComponentFactory.ts", "../../src/Service.ts", "../../src/globalSettings.ts", "../../src/top.ts", "../../src/captureFalseTouch.ts", "../../src/range.ts", "../../src/defaultProcessors.ts", "../../src/findPackageNodePath.ts", "../../src/Import.ts", "../../src/mathFunctions.ts", "../../src/NamespaceRef.ts", "../../src/Ready.ts", "../../src/ArrayCollection.ts", "../../src/Tag.ts", "../../src/shortCode.ts", "../../src/super.ts", "../../src/waitUntil.ts", "../../src/subelements.ts", "../../src/loadSDK.ts", "../../src/MainProcess.ts", "../../src/qcobjects.ts", "../../src/assign.ts", "../../src/BackendMicroservice.ts", "../../src/DefaultTemplateHandler.ts", "../../src/RegisterClass.ts", "../../src/SourceJS.ts", "../../src/SourceCSS.ts", "../../src/WidgetsFactory.ts", "../../src/Controller.ts", "../../src/View.ts", "../../src/VO.ts", "../../src/Effect.ts", "../../src/TransitionEffect.ts", "../../src/Timer.ts", "../../src/DDO.ts", "../../src/Toggle.ts", "../../src/DocumentLayout.ts"], - "sourcesContent": ["export const __is_raw_class__ = (o_c: any): boolean => {\n return !!((typeof o_c === \"function\" && o_c.toString().startsWith(\"class\")));\n};\n", "/**\n * Returns the object or function name\n *\n * @param Object or function\n */\nexport const ObjectName = (o: any):string => {\n let ret = \"\";\n if (typeof o === \"function\" && Object.hasOwn(o, \"name\") && o.name !== \"\") {\n ret = o.name;\n } else if (typeof o !== \"undefined\" && typeof o.constructor === \"function\" && o.constructor.name !== \"\") {\n ret = o.constructor.name;\n } else if (typeof o !== \"undefined\" && typeof o.constructor === \"object\") {\n ret = o.constructor.toString().replace(/\\[(.*?)\\]/g, \"$1\").split(\" \").slice(1).join(\"\");\n }\n return ret;\n};", "import { __is_raw_class__ } from \"./is_raw_class\";\nimport { ObjectName } from \"./ObjectName\";\n\n/**\n * Determine the type of the Object for any QCObjects Object\n *\n * @param {Object} object\n */\nexport const __getType__ = function __getType__(o_c: any): any {\n let _ret_ = \"\";\n switch (true) {\n case typeof o_c === \"object\" &&\n (!!o_c.constructor &&\n !!o_c.constructor.name)\n && o_c.constructor.name !== \"\":\n _ret_ = o_c.constructor.name;\n break;\n case typeof o_c === \"function\" && !!o_c.name:\n _ret_ = o_c.name;\n break;\n case __is_raw_class__(o_c) && !!o_c.name:\n _ret_ = o_c.name;\n break;\n case (!!o_c && !!o_c.__classType) && o_c.__classType !== \"\":\n _ret_ = o_c.__classType;\n break;\n case (!!o_c && !!o_c.__definition) && (!!o_c.__definition.__classType) && o_c.__definition.__classType !== \"\":\n _ret_ = o_c.__definition.__classType;\n break;\n default:\n _ret_ = ObjectName(o_c);\n break;\n }\n return _ret_;\n};\n", "import { _top, set } from \"./top\";\ndeclare const global:any;\ndeclare const globalThis:any;\n\nexport const __make_global__ = (f:any):void => {\n if (!!f && !!f.name) {\n if (typeof _top !== \"undefined\" && typeof f !== \"undefined\" && _top !== null && !Object.hasOwn(_top,f.name)) {\n set(f.name, f);\n } else if (typeof global !== \"undefined\"){\n global[f.name] = f;\n } else if (typeof globalThis !== \"undefined\"){\n globalThis[f.name] = f;\n }\n \n }\n\n};", "import { T_QC_CLASSES, T_QC_PACKAGES } from \"./types/global\";\nimport { __getType__ } from \"./getType\";\nimport { __make_global__ } from \"./make_global\";\n\nexport var _QC_CLASSES: T_QC_CLASSES = {};\nexport var _QC_PACKAGES: T_QC_PACKAGES = {};\nexport var _QC_PACKAGES_IMPORTED: any[] = [];\nexport var _QC_READY_LISTENERS: any[] = [];\n\nexport const __register_class__ = function (_class_: any, __namespace?: string): any {\n const __classType = __getType__(_class_);\n let name = _class_.name || __classType;\n if (name.toLowerCase() === \"function\") {\n name = __classType;\n }\n if (typeof _class_.__definition === \"undefined\") {\n _class_.__definition = {};\n }\n _class_.__definition.__classType = __classType;\n if (typeof __namespace !== \"undefined\") {\n _class_.__definition.__namespace = __namespace;\n }\n _QC_CLASSES[name] = _class_;\n __make_global__(_class_);\n return _QC_CLASSES[name];\n};\n\nexport const get_QC_CLASS = (name:string):any => {\n return _QC_CLASSES[name];\n};\n\nconst _get_packages_names = function (_packages: any): T[] {\n let _keys: any[] = [];\n for (const _k of Object.keys(_packages)) {\n if (\n typeof _packages[_k] !== \"undefined\" &&\n typeof _packages[_k] !== \"function\" &&\n Object.hasOwn(_packages[_k], \"length\") &&\n _packages[_k].length > 0\n ) {\n _keys.push(_k);\n _keys = _keys.concat(_get_packages_names(_packages[_k]));\n }\n }\n return _keys as T[];\n};\n\n\nexport const getPackagesNamesList = (): any[] => {\n return _get_packages_names(_QC_PACKAGES);\n};\n\nexport const getPackagesList = (): any[] => {\n return [...getPackagesNamesList()].map((packagename: string): T => {\n const _classesList: any[] = _QC_PACKAGES[packagename] as any[];\n let _ret_: any = undefined;\n if (_classesList) {\n _ret_ = {\n packageName: packagename,\n classesList: _classesList.filter(function (): boolean {\n return true;\n })\n };\n }\n return _ret_ as T;\n }).filter(function (_p: any): boolean {\n return typeof _p !== \"undefined\";\n });\n};\n\nexport const getClassesList = (): any[] => {\n let _classesList: any[] = [];\n [...getPackagesList()].forEach(function (_package_element: any): T {\n _classesList = _classesList.concat(_package_element.classesList.map(\n (_class_element: any) => {\n return {\n packageName: _package_element.packageName,\n className: `${_package_element.packageName}.${__getType__(_class_element)}`,\n classFactory: _class_element\n };\n }\n ));\n return _package_element as T;\n });\n\n return _classesList;\n};\n\nexport const getClassesNamesList = (): any[] => {\n return [...getClassesList()].map((_class_element: any): T => {\n return _class_element.className as T;\n });\n};\n\nexport const set_QC_PACKAGE = (packageName: string, _qc_packages: any[]):void => {\n _QC_PACKAGES[packageName] = _qc_packages;\n};\n\n", "import { __make_global__ } from \"./make_global\";\n\nexport const Export = function (f: any):void {\n return __make_global__(f);\n};\nExport.prototype.toString = function () {\n return \"Export(function or symbol) { [QCObjects native code] }\";\n};\n", "import { logger } from \"./Logger\";\n\nasync function _import_(name:string):Promise {\n logger.debug(`Importing ${name}...`);\n function isPackage(name:string) {\n logger.debug(`Validating if ${name} is a package name...`);\n // Simple check to determine if the name is a package\n // This can be enhanced based on your specific needs\n return !name.startsWith(\".\") && !name.startsWith(\"/\") && !name.includes(\"/\");\n }\n \n try {\n // Ensure the name has a .js extension if it's not a package\n const hasExtension = /\\.[^/\\\\]+$/.test(name);\n if (!hasExtension && !isPackage(name)) {\n logger.debug(`${name} does not have an extension and is not a package. Adding js extension.`);\n name += \".js\";\n }\n \n const m:any = await import(name);\n return m;\n } catch (error:any) {\n logger.warn(`Failed to load module: ${error}`);\n }\n }\n \nexport {_import_};", "import { _import_ } from \"./_import_\";\nimport { logger } from \"./Logger\";\n\nexport const isDeno:boolean = (typeof window !== \"undefined\" && \"Deno\" in window);\nexport const isBrowser:boolean = (typeof window !== \"undefined\" && typeof window.self !== \"undefined\" && window === window.self) && !isDeno;\nexport const isNodeCommonJS:boolean = (typeof module !== \"undefined\");\n// eslint-disable-next-line no-unused-vars\nexport const deno_require = (name:string):void => { /* not yet implemented */};\nexport const _require_ = (name:string):any => {\n \n return (isDeno)?(deno_require(name)):(\n ( (name):any => {\n let r:any;\n try {\n (async () => {\n r = await _import_(name);\n })().then((m:any) => {\n r = (m && m.default) || m;\n })\n .catch ((e:any) => {\n logger.warn(`An error ocurred: ${e}`);\n });\n\n } catch (e:any) {\n logger.debug(`An error ocurred importing module. ${e}`);\n r = {export:{}};\n }\n return r;\n } ) (name)\n );\n};\ndeclare const cordova: any;\n\nexport const is_phonegap:boolean = (\n function () {\n return (typeof cordova !== \"undefined\");\n }\n)();", "import { Export } from \"./Export\";\nimport { isBrowser } from \"./platform\";\n\nexport class Logger {\n debugEnabled = true;\n infoEnabled = true;\n warnEnabled = true;\n debug(message: string): void {\n if (this.debugEnabled) {\n console.log(\"\\x1b[35m%s\\x1b[0m\", `[DEBUG][${performance.now().toLocaleString()}] ${message}`);\n }\n }\n\n info(message: string): void {\n let color;\n if (this.infoEnabled) {\n if (isBrowser) {\n color = \"\\x1b[103m%s\\x1b[0m\";\n } else {\n color = \"\\x1b[33m%s\\x1b[0m\";\n }\n console.info(color, `[INFO][${performance.now().toLocaleString()}] ${message}`);\n }\n }\n\n warn(message: string): void {\n if (this.warnEnabled) {\n console.warn(\"\\x1b[31m%s\\x1b[0m\", `[WARN][${performance.now().toLocaleString()}] ${message}`);\n }\n }\n}\n\nexport const logger: Logger = new Logger();\nExport(logger);", "import { logger } from \"./Logger\";\n\n/**\n * Casts an object to another object class type\n *\n * @param {Object} obj_source\n * @param {Object} obj_dest\n */\nexport const _Cast = function (obj_source: any, obj_dest: any):any {\n for (const v in obj_source) {\n if (typeof obj_source[v] !== \"undefined\") {\n try {\n obj_dest[v] = obj_source[v];\n } catch (e:any) {\n logger.debug(`An error ocurred: ${e}.`);\n logger.warn(`Unable to cast ${(typeof obj_source).toString()}.${typeof v.toString()} to ${(typeof obj_dest).toString()}.${typeof v.toString()}`);\n }\n }\n }\n return obj_dest;\n};\n\n/**\n * Casts an object to another object class type. Only properties\n *\n * @param {Object} obj_source\n * @param {Object} obj_dest\n */\nexport const _CastProps = function (obj_source: any, obj_dest: any, _ignoreError:boolean = true):any {\n for (const v in obj_source) {\n if (typeof obj_source[v] !== \"undefined\" && typeof obj_source[v] !== \"function\") {\n try {\n obj_dest[v] = obj_source[v];\n } catch (e:any) {\n if (!_ignoreError){\n logger.debug(`An error ocurred: ${e}.`);\n }\n }\n } else if (typeof obj_source[v] === \"function\") {\n try {\n obj_dest[v] = obj_source[v].bind(obj_dest);\n } catch (e:any) {\n logger.warn(e);\n }\n }\n }\n return obj_dest;\n};\n", "import { IQCObjectsElement } from \"./types/global\";\nimport { isBrowser } from \"./platform\";\n\nexport const _DOMCreateElement = function (elementName: string, props?: any[], children?: any): IQCObjectsElement {\n let _ret_;\n if (isBrowser) {\n _ret_ = _DOMCreateComplexElement(elementName, props, children) as unknown as IQCObjectsElement;\n } else {\n _ret_ = {} as IQCObjectsElement;\n }\n return _ret_;\n};\n\n\nconst ComplexTypeCall = (_type: Function, { props, children }: { props?: any[], children?: any }): IQCObjectsElement => {\n return _type({ props, children }) as IQCObjectsElement;\n};\nexport const _DOMCreateComplexElement = (_type: string | Function, props?: any[], children?: any): HTMLElement | IQCObjectsElement => {\n\n if (typeof _type !== \"string\") {\n return ComplexTypeCall(_type, { props, children });\n }\n const element = document.createElement(_type);\n\n if (props) {\n Object.entries(props).forEach(([key, value]) => {\n if (typeof value === \"string\" || typeof value === \"number\") {\n element.setAttribute(key, value.toString());\n } else if (typeof value === \"function\" && key.toLowerCase().startsWith(\"on\")) {\n element.addEventListener(key.slice(2).toLowerCase(), value.bind(element));\n }\n });\n }\n\n if (Array.isArray(children)) {\n children.filter((child => child instanceof Node)).forEach(child => {\n element.appendChild(child);\n });\n } else if (children instanceof Node) {\n element.appendChild(children);\n } else if (typeof children === \"string\") {\n element.innerHTML = children;\n }\n\n return element;\n};\n", "/**\n * Primary instance ID of all objects\n */\nexport var __instanceID = 0;\n\nexport const IncrementInstanceID = (): void => {\n __instanceID = (typeof __instanceID === \"undefined\" || __instanceID === null) ? (0) : (__instanceID + 1);\n};\n", "export const _protected_code_ = (_: any): void => {\n const __oldtoString = (typeof _.prototype !== \"undefined\") ? (_.prototype.toString) : (function () {\n return \"\";\n });\n if (typeof _.prototype !== \"undefined\") {\n _.prototype.toString = function (): string {\n const _protected_symbols = [\n \"__qcobjects__\",\n \"__qcobjects_sdk__\",\n \"__loaded__\",\n \"ComplexStorageCache\",\n \"css\",\n \"append\",\n \"attachIn\",\n \"debug\",\n \"info\",\n \"warn\",\n \"QC_Append\",\n \"set\",\n \"get\",\n \"done\",\n \"componentDone\",\n \"_new_\",\n \"__new__\",\n \"Class\",\n \"ClassFactory\",\n \"New\",\n \"Export\",\n \"Package\",\n \"Import\",\n \"subelements\",\n \"componentLoader\",\n \"buildComponents\",\n \"Controller\",\n \"View\",\n \"VO\",\n \"Service\",\n \"serviceLoader\",\n \"JSONService\",\n \"ConfigService\",\n \"SourceJS\",\n \"SourceCSS\",\n \"ArrayList\",\n \"ArrayCollection\",\n \"Effect\",\n \"Timer\",\n \"sum\",\n \"avg\",\n \"table\",\n \"max\",\n \"min\",\n \"range\",\n \"matrix\",\n \"matrix2d\",\n \"matrix3d\",\n \"unique\",\n \"uniqueId\",\n \"shortCode\",\n \"NamespaceRef\"\n ];\n let _ret_;\n if (_protected_symbols.includes(this.name)) {\n _ret_ = this.name + \"{ [QCObjects native code] }\";\n } else {\n _ret_ = __oldtoString.call(this);\n }\n return _ret_ as string;\n };\n }\n};\n(_protected_code_)(Function);\nexport const _methods_ = function (_: any): T[] {\n const _m = [];\n for (const i in _) {\n if ((typeof _[i]).toLowerCase() === \"function\") {\n _m.push(_[i]);\n }\n }\n return _m as T[];\n};\n", "import { __is_raw_class__ } from \"./is_raw_class\";\nimport {_QC_PACKAGES, set_QC_PACKAGE, __register_class__ } from \"./PrimaryCollections\";\n\n/**\n * Defines a package for Class classification\n *\n * @param {Object} namespace\n * @param {Object} classes\n */\nexport const Package = (namespace: string, classes: any[] = []): any[] => {\n\n if (Object.hasOwn(_QC_PACKAGES, namespace) &&\n typeof _QC_PACKAGES[namespace] !== \"undefined\" &&\n typeof _QC_PACKAGES[namespace] !== \"string\" &&\n Object.hasOwn(_QC_PACKAGES[namespace], \"length\") &&\n _QC_PACKAGES[namespace].length > 0 &&\n typeof classes !== \"undefined\" &&\n Object.hasOwn(classes, \"length\") &&\n classes.length > 0\n ) {\n classes.forEach((_class_: any) => {\n __register_class__(_class_, namespace);\n });\n set_QC_PACKAGE(namespace, _QC_PACKAGES[namespace].concat(classes));\n } else if (typeof classes !== \"undefined\"\n && typeof classes !== \"undefined\"\n && Object.hasOwn(classes, \"length\")\n && classes.length > 0) {\n classes.forEach((_class_: any) => {\n __register_class__(_class_, namespace);\n });\n set_QC_PACKAGE(namespace, classes);\n } else if (__is_raw_class__(classes)) {\n if (typeof (classes as any).__definition === \"undefined\") {\n (classes as any).__definition = {};\n }\n (classes as any).__definition.__namespace = namespace;\n (classes as any).__namespace = namespace;\n __register_class__(classes, namespace);\n set_QC_PACKAGE(namespace, [classes]);\n } else {\n throw new Error (`An error ocurred. It was not possible to add classes to ${namespace}.`);\n }\n return ((Object.hasOwn(_QC_PACKAGES, namespace)) ? (_QC_PACKAGES[namespace]) : []) as any[] | [];\n};\n", "import { type IInheritClass, type IQCObjectsElement, type TBody } from \"./types/global\";\nimport { logger } from \"./Logger\";\nimport { __instanceID, IncrementInstanceID } from \"./IncrementInstanceID\";\nimport { _CastProps, _Cast } from \"./Cast\";\nimport { _DOMCreateElement } from \"./DOMCreateElement\";\nimport { __getType__ } from \"./getType\";\nimport { _methods_ } from \"./introspection\";\nimport { is_a } from \"./is_a\";\nimport { isBrowser } from \"./platform\";\nimport { _QC_CLASSES } from \"./PrimaryCollections\";\nimport { Package } from \"./Package\";\n\nexport class InheritClass implements IInheritClass {\n [key: string]: any;\n __definition: any;\n private _body: TBody;\n public get body(): TBody {\n return this._body;\n }\n public set body(value: TBody) {\n this._body = value;\n }\n childs: any;\n __instanceID!: number;\n\n constructor(_o_?: any) {\n\n if (typeof _o_ !== \"undefined\" && typeof _o_.__definition !== \"undefined\") {\n this.__definition = {\n ...(_o_.__definition)\n };\n }\n\n const self: this = this;\n if (typeof _o_ !== \"undefined\" && _o_ !== null) {\n Object.keys(_o_)\n .filter(function (k) {\n return isNaN(k as any) && ![\"__instanceID\", \"__classType\", \"__definition\"].includes(k);\n })\n .forEach(function (key) {\n if (typeof self[key] === \"function\") {\n self[key] = _o_[key].bind(self);\n } else {\n self[key] = _o_[key];\n }\n });\n }\n\n IncrementInstanceID();\n if (!self.__instanceID) {\n Object.defineProperty(self, \"__instanceID\", {\n value: __instanceID,\n writable: false\n });\n }\n\n if (typeof self.__definition !== \"undefined\") {\n Object.keys(self.__definition).filter(function (k) {\n return isNaN(k as any) && ![\"name\", \"__instanceID\", \"__classType\", \"__definition\"].includes(k);\n }).forEach(function (key) {\n if (typeof self.__definition[key] === \"function\") {\n self[key] = self.__definition[key].bind(self);\n } else {\n self[key] = self.__definition[key];\n }\n });\n }\n _methods_((_QC_CLASSES as any)[self.__classType]).map(function (m): any {\n self[(m as Function).name] = (m as Function).bind(self);\n return m;\n });\n _methods_(self.__definition).map(function (m): any {\n self[(m as Function).name] = (m as Function).bind(self);\n return m;\n });\n\n if (self.body) {\n if (typeof self.__definition === \"undefined\" || (!Object.hasOwn(self.__definition, \"body\")) || typeof self.__definition.body === \"undefined\") {\n try {\n if (isBrowser) {\n self.body = _DOMCreateElement(self.__definition.__classType);\n } else {\n self.body = {};\n }\n } catch (e: any) {\n logger.debug(`An error ocurred: ${e}.`);\n self.body = {};\n }\n } else if (Object.hasOwn(self.__definition, \"body\")) {\n self.body = self.__definition.body;\n }\n }\n\n\n try {\n self.__new__.call(self, _o_);\n if (typeof self === \"object\" && Object.hasOwn(self, \"_new_\") && typeof (self._new_ as any).isCalled === \"undefined\") {\n try {\n self._new_(_o_);\n (self._new_ as any).isCalled = true;\n } catch (e: any) {\n logger.warn(`${self.__classType}._new_() failed with error: ${e}`);\n }\n }\n } catch (e: any) {\n logger.warn(e);\n }\n }\n\n static get __classType(): any {\n return (Object.getPrototypeOf(this.constructor) as Function).name;\n }\n\n get __classType(): string {\n return this.constructor.name;\n }\n\n\n static hierarchy(__class__: any): any[] {\n const __classType = function (o_c: any): any {\n return (Object.hasOwn(o_c, \"__classType\")) ? (o_c.__classType) : (__getType__.call(__class__, o_c));\n };\n const __hierarchy__proto__ = (c: any): any[] => {\n return (typeof c !== \"undefined\" && typeof c.__proto__ !== \"undefined\" && c.__proto__ !== null) ? (((__classType(c) !== \"\") ? ([__classType(c)]) : ([])).concat(__hierarchy__proto__(c.__proto__))) : ([]);\n };\n\n if (typeof __class__ === \"undefined\" || __class__ === null) {\n __class__ = this;\n }\n let __hierarchy = [];\n __hierarchy.push(__classType(__class__));\n __hierarchy = __hierarchy.concat(__hierarchy__proto__(__class__.__proto__));\n return __hierarchy;\n }\n\n\n __namespace?: string | undefined;\n\n __new__(_o_: any): void {\n _CastProps(_o_, this);\n }\n\n // eslint-disable-next-line no-unused-vars\n _new_(_o_?: any): void { }\n\n static getParentClass(): any {\n return Object.getPrototypeOf(this.prototype.constructor);\n }\n getParentClass(): any {\n return (this.constructor as typeof InheritClass).getParentClass();\n }\n\n\n static getClass(): any {\n return Object.getPrototypeOf(this.constructor);\n }\n\n getClass(): any {\n return (this.constructor as typeof InheritClass).getClass();\n }\n\n css(_css: any): any {\n if (typeof this.body !== \"undefined\" && typeof this?.body !== \"string\" && typeof (this?.body as HTMLElement)?.style !== \"undefined\") {\n logger.debug(\"body style\");\n if (this.body) {\n (this.body as any).style = _Cast(_css, (this?.body as HTMLElement)?.style);\n }\n }\n return (typeof this.body !== \"string\") ? (this?.body as HTMLElement)?.style : {};\n }\n\n hierarchy(): any {\n const __instance__ = this;\n return (this.constructor as typeof InheritClass).hierarchy(__instance__);\n }\n\n\n append(_child?: any): void {\n const child: any = _child || this.body;\n logger.debug(\"append: start\");\n if (is_a(child, \"Component\")) {\n logger.debug(\"append: child is a Component\");\n logger.debug(`appending the body of ${child.name}`);\n }\n if (typeof this.body !== \"undefined\") {\n logger.debug(\"append element\");\n if (arguments.length > 0) {\n logger.debug(\"append to element\");\n if (typeof this.body !== \"string\") {\n if (typeof (this.body as IQCObjectsElement)?.append !== \"undefined\") {\n (this?.body as IQCObjectsElement)?.append(child);\n } else {\n throw Error(\"body.append is undefined. That means the body is not well formed.\");\n }\n } else {\n this.append(child);\n }\n if (typeof this.childs === \"undefined\") {\n this.childs = [];\n }\n this.childs.push(child);\n } else {\n if (isBrowser) {\n logger.debug(\"append to body\");\n document.body.append(child);\n }\n }\n }\n }\n\n attachIn(tag: any): void {\n if (isBrowser) {\n const tags = (document as any).subelements(tag);\n for (let i = 0, j = tags.length; i < j; i++) {\n tags[i].append(this as any);\n }\n } else {\n throw new Error(\"attachIn not yet implemented for non browser platforms\");\n }\n }\n\n}\n\nPackage(\"com.qcobjects\", [InheritClass]);", "import { InheritClass } from \"./InheritClass\";\n\nexport const isQCObjects_Object = function (_:any):boolean {\n return (!!((typeof _ === \"object\" &&\n Object.hasOwn(_, \"__classType\") &&\n (!!_.__instanceID) &&\n Object.hasOwn(_, \"__definition\") &&\n typeof _.__definition !== \"undefined\"\n ))) || _ instanceof InheritClass;\n };\n\n export const isQCObjects_Class = function (_:any):boolean {\n return (!!((typeof _ === \"function\" &&\n (!_.__instanceID) &&\n (!!_.__definition) &&\n typeof _.__definition !== \"undefined\" &&\n !!_.__definition.__classType\n ))) || _.prototype instanceof InheritClass;\n };\n", "import { __getType__ } from \"./getType\";\nimport { isQCObjects_Class, isQCObjects_Object } from \"./isQCObjects\";\nimport { ObjectName } from \"./ObjectName\";\n\n/**\n * Returns if a class or object is from a determinated type\n * @param {Object} object\n * @param {String} typeName\n */\nexport const is_a = (obj: any, typeName: string):boolean => {\n return !!((typeof obj !== \"undefined\" && obj !== null &&\n (((isQCObjects_Class(obj) || isQCObjects_Object(obj)) && (obj.hierarchy().includes(typeName))) ||\n __getType__(obj) === typeName ||\n ObjectName(obj) === typeName ||\n typeof obj === typeName)));\n};", "/**\n * Internal use to determine the forbidden names for classes\n * Reserved words\n *\n * @param {String} name\n * @param {Object} type\n * @param {Object} definition\n */\nexport const __is__forbidden_name__ = (name: string):boolean => {\n return ([\"__proto__\", \"prototype\", \"Object\", \"Map\", \"defineProperty\", \"indexOf\", \"toString\", \"__instanceID\", \"function\", \"Function\"].indexOf(name) !== -1);\n};\n", "import { __is_raw_class__ } from \"./is_raw_class\";\n\nexport const _LegacyCopy = function (obj:any, _ignore?:string[]):any {\n let _value_;\n switch (true) {\n case typeof obj === \"string\":\n _value_ = obj;\n break;\n case typeof obj === \"number\":\n _value_ = obj;\n break;\n case typeof obj === \"object\":\n _value_ = [{...Object.keys(obj).filter(k => !_ignore?.includes(k))}]\n .map(k => {return {[k as never]:obj[k as never]}; })\n .reduce ((p, c) => Object.assign(p, c)) as any;\n break;\n case typeof obj === \"function\":\n _value_ = obj.bind({});\n break;\n case __is_raw_class__(obj):\n _value_ = class extends obj { };\n break;\n default:\n break;\n }\n return _value_;\n };\n", "import { _QC_CLASSES } from \"./PrimaryCollections\";\nimport { _Cast, _CastProps } from \"./Cast\";\nimport { _DOMCreateElement } from \"./DOMCreateElement\";\nimport { __getType__ } from \"./getType\";\nimport { __instanceID, IncrementInstanceID } from \"./IncrementInstanceID\";\nimport { _methods_ } from \"./introspection\";\nimport { is_a } from \"./is_a\";\nimport { __is__forbidden_name__ } from \"./is_forbidden_name\";\nimport { _LegacyCopy } from \"./LegacyCopy\";\nimport { logger } from \"./Logger\";\nimport { isBrowser } from \"./platform\";\nimport { IQCObjectsElement, TBody, TClass } from \"./types/global\";\nimport { InheritClass } from \"./InheritClass\";\nimport { _top } from \"./top\";\n\n/**\n * Creates new object class of another object\n *\n * @param {String} name\n * @param {Object} type\n * @param {Object} definition\n * \n * @example \n * Class (name, type, definition)\n * Class (name, type)\n * Class (name, definition)\n * Class ()\n * \n * \n * const MyClass = Class (\"MyComponent\", Component, {\n * name: \"one_component\",\n * method1 : () => {console.log (\"done\") }\n * })\n * const myClassInstance = new MyClass ({name: \"one_component\"})\n * \n * const MyClass = Class (\"MyService\",{\n * name: \"myservice\",\n * })\n * \n * const myClassInstance = new MyClass ({name: \"myservice\"})\n */\n\n\n\nexport const Class: TClass = (name?: string, _type?: unknown, _definition?: unknown): InheritClass => {\n const _types_ = {};\n let type: unknown, definition: unknown;\n\n switch (true) {\n case !name && !_type && !_definition:\n return class { } as unknown as InheritClass;\n case !!name && !_type && !_definition:\n type = class { };\n definition = {};\n break;\n case !!name && !_type && !!_definition:\n type = class { };\n definition = _definition;\n break;\n case !!name && !!_type && !!_definition:\n type = _type;\n definition = _definition;\n break;\n default:\n return class { } as unknown as InheritClass;\n }\n if (typeof name !== \"string\") {\n throw new Error(\"Class name must be a string\");\n }\n\n if (typeof type !== \"function\") {\n throw new Error(\"Class type must be a function or class\");\n }\n\n if (__is__forbidden_name__(name)) {\n throw new Error(`${name} is not an allowed word in the name of a class`);\n }\n\n if (typeof (type as any).__definition === \"object\"\n && (type as any).__definition\n && Object.keys((type as any).__definition).length !== 0) {\n (definition as any).__definition = Object.assign(_LegacyCopy((type as any).__definition,[\"name\"]), type);\n }\n\n (_types_ as any)[type.name] = type;\n\n if (typeof definition === \"undefined\" || definition === null) {\n definition = {};\n } else {\n definition = { ...definition };\n }\n\n /* hack to prevent duplicate __instanceID */\n if (typeof (definition as any).__instanceID !== \"undefined\") {\n delete (definition as any).__instanceID;\n }\n\n _QC_CLASSES[name] = class extends (_types_ as any)[type.name] {\n __instanceID!: number;\n __namespace?: string | undefined;\n __definition: any = {\n ...(definition as any)\n };\n childs: any;\n private _body: TBody;\n public get body(): TBody {\n return this._body;\n }\n public set body(value: TBody) {\n this._body = value;\n }\n\n static get __classType(): any {\n return (Object.getPrototypeOf(this.constructor) as Function).name;\n }\n\n get __classType(): string {\n return this.constructor.name;\n }\n\n static hierarchy(__class__: any): any[] {\n const __classType = function (o_c: any): any {\n return (Object.hasOwn(o_c, \"__classType\")) ? (o_c.__classType) : (__getType__.call(__class__, o_c));\n };\n const __hierarchy__proto__ = (c: any): any[] => {\n return (typeof c !== \"undefined\" && typeof c.__proto__ !== \"undefined\" && c.__proto__ !== null) ? (((__classType(c) !== \"\") ? ([__classType(c)]) : ([])).concat(__hierarchy__proto__(c.__proto__))) : ([]);\n };\n\n if (typeof __class__ === \"undefined\" || __class__ === null) {\n __class__ = this;\n }\n let __hierarchy = [];\n __hierarchy.push(__classType(__class__));\n __hierarchy = __hierarchy.concat(__hierarchy__proto__(__class__.__proto__));\n return __hierarchy;\n }\n\n static getParentClass(): any {\n return Object.getPrototypeOf(this.prototype.constructor);\n }\n\n constructor(_o_?: any) {\n super(_o_ || {});\n\n const self = this;\n IncrementInstanceID();\n if (!(self as any).__instanceID) {\n Object.defineProperty(self, \"__instanceID\", {\n value: __instanceID,\n writable: false\n });\n }\n\n if (typeof self.__definition !== \"undefined\") {\n Object.keys(self.__definition).filter(function (k) {\n return isNaN(k as any) && ![\"name\", \"__instanceID\", \"__classType\", \"__definition\"].includes(k);\n }).forEach(function (key) {\n if (typeof self.__definition[key] === \"function\") {\n self[key] = self.__definition[key].bind(self);\n } else {\n self[key] = self.__definition[key];\n }\n });\n }\n _methods_(_QC_CLASSES[self.__classType]).map(function (m: unknown): T {\n self[(m as Function).name] = (m as Function).bind(self);\n return m as T;\n });\n _methods_(self.__definition).map(function (m): any {\n self[(m as Function).name] = (m as Function).bind(self);\n return m;\n });\n\n if (self.body) {\n if (typeof self.__definition === \"undefined\" || (!Object.hasOwn(self.__definition, \"body\")) || typeof self.__definition.body === \"undefined\") {\n try {\n if (isBrowser) {\n self.body = _DOMCreateElement(self.__definition.__classType);\n } else {\n self.body = {};\n }\n } catch (e: any) {\n logger.debug(`An error ocurred: ${e}.`);\n self.body = {};\n }\n } else if (Object.hasOwn(self.__definition, \"body\")) {\n self.body = self.__definition.body;\n }\n }\n\n\n try {\n if (typeof self.__new__ === \"function\") {\n self.__new__.call(self, _o_);\n } else if (typeof super.__new__ === \"function\") {\n self.__new__ = super.__new__.bind(self);\n self.__new__.call(self, _o_);\n }\n if (typeof self === \"object\" && Object.hasOwn(self, \"_new_\") && typeof (self._new_ as any).isCalled === \"undefined\") {\n try {\n self._new_(_o_);\n (self._new_ as any).isCalled = true;\n } catch (e: any) {\n logger.warn(`${self.__classType}._new_() failed with error: ${e}`);\n }\n }\n } catch (e: any) {\n logger.warn(e);\n }\n }\n\n __new__(_o_: any) {\n _CastProps(_o_, this);\n }\n\n // eslint-disable-next-line no-unused-vars\n _new_(_o_?: any) { }\n\n getClass(): any {\n return Object.getPrototypeOf(this.constructor);\n }\n\n css(_css: any): any {\n if (typeof this.body !== \"undefined\" && typeof this?.body !== \"string\" && typeof (this?.body as HTMLElement)?.style !== \"undefined\") {\n logger.debug(\"body style\");\n if (this.body) {\n (this.body as any).style = _Cast(_css, (this?.body as HTMLElement)?.style);\n }\n }\n return (typeof this.body !== \"string\") ? (this?.body as HTMLElement)?.style : {};\n }\n\n hierarchy(): any {\n const __instance__ = this;\n return this.getClass()?.hierarchy(__instance__);\n }\n\n\n append(_child?: any) {\n const child: any = _child || this.body;\n logger.debug(\"append: start\");\n if (is_a(child, \"Component\")) {\n logger.debug(\"append: child is a Component\");\n logger.debug(`appending the body of ${child.name}`);\n }\n if (typeof this.body !== \"undefined\") {\n logger.debug(\"append element\");\n if (arguments.length > 0) {\n logger.debug(\"append to element\");\n if (typeof this.body !== \"string\") {\n if (typeof (this.body as IQCObjectsElement)?.append !== \"undefined\") {\n (this?.body as IQCObjectsElement)?.append(child);\n } else {\n throw Error(\"body.append is undefined. That means the body is not well formed.\");\n }\n } else {\n this.append(child);\n }\n if (typeof this.childs === \"undefined\") {\n this.childs = [];\n }\n this.childs.push(child);\n } else {\n if (isBrowser) {\n logger.debug(\"append to body\");\n document.body.append(child);\n }\n }\n }\n }\n\n attachIn(tag: any) {\n if (isBrowser) {\n const tags = (document as any).subelements(tag);\n for (let i = 0, j = tags.length; i < j; i++) {\n tags[i].append(this as any);\n }\n } else {\n throw new Error(\"attachIn not yet implemented for non browser platforms\");\n }\n }\n\n };\n\n // remove the keys from definition that exist in the prototype\n\n _QC_CLASSES[name] = _CastProps(definition, _QC_CLASSES[name]);\n _QC_CLASSES[name].__definition = definition;\n _QC_CLASSES[name].__definition.__classType = name;\n\n (_top as any)[name] = _QC_CLASSES[name];\n\n return _QC_CLASSES[name] as InheritClass;\n};\nif (typeof Class.prototype !== \"undefined\") {\n Class.prototype.toString = function () {\n return \"Class(name, type, definition) { [QCObjects native code] }\";\n };\n}\n\n", "/**\n * Returns the QCObjects Class Factory of a given ClassName\n *\n * @param {String} name\n */\n\nimport { __is_raw_class__ } from \"./is_raw_class\";\nimport { _QC_CLASSES, _QC_PACKAGES, get_QC_CLASS } from \"./PrimaryCollections\";\nimport { TClassFactory } from \"./types/global\";\n\nexport const ClassFactory:TClassFactory = (className:string):any => {\n let _classFactory;\n if (typeof className === \"undefined\" || className === null) {\n throw Error (\"You need to pass a parameter {className}\");\n }\n if (className !== null && className.indexOf(\".\") !== -1) {\n const packageName = className.split(\".\").slice(0, className.split(\".\").length - 1).join(\".\");\n const _className = className.split(\".\").slice(-1).join(\"\");\n const _package = _QC_PACKAGES[packageName] || [];\n const packageClasses = _package.filter((classFactory:any) => {\n return (__is_raw_class__(classFactory));\n }).reverse();\n if (packageClasses.length > 0) {\n _classFactory = packageClasses[0];\n } else {\n throw Error(`Class ${_className} not found. Found classes: ${JSON.stringify(packageClasses)} in package ${packageName}`);\n }\n } else if (className !== null) {\n _classFactory = get_QC_CLASS(className);\n if (typeof _classFactory === \"undefined\"){\n throw new Error (`${className} is undefined.`); \n }\n } else {\n throw Error(`className is null. Unable to retrieve the class factory.\\n Not found in: \\n ${Object.keys(_QC_CLASSES).join(\"\\n\")}`);\n }\n return _classFactory;\n};\n", "export class Base64 {\n static _keyStr: string = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\n static encode(e: string): string {\n let t = \"\";\n let n: number, r: number, i: number, s: number, o: number, u: number, a: number;\n let f = 0;\n e = Base64._utf8_encode(e);\n while (f < e.length) {\n n = e.charCodeAt(f++);\n r = e.charCodeAt(f++);\n i = e.charCodeAt(f++);\n s = n >> 2;\n o = (n & 3) << 4 | r >> 4;\n u = (r & 15) << 2 | i >> 6;\n a = i & 63;\n if (isNaN(r)) {\n u = a = 64;\n } else if (isNaN(i)) {\n a = 64;\n }\n t = t + this._keyStr.charAt(s) + this._keyStr.charAt(o) + this._keyStr.charAt(u) + this._keyStr.charAt(a);\n }\n return t;\n }\n static decode(e: string): string {\n let t = \"\";\n let n: number, r: number, i: number;\n let s: number, o: number, u: number, a: number;\n let f = 0;\n e = e.replace(/[^A-Za-z0-9+/=]/g, \"\");\n while (f < e.length) {\n s = this._keyStr.indexOf(e.charAt(f++));\n o = this._keyStr.indexOf(e.charAt(f++));\n u = this._keyStr.indexOf(e.charAt(f++));\n a = this._keyStr.indexOf(e.charAt(f++));\n n = s << 2 | o >> 4;\n r = (o & 15) << 4 | u >> 2;\n i = (u & 3) << 6 | a;\n t = t + String.fromCharCode(n);\n if (u !== 64) {\n t = t + String.fromCharCode(r);\n }\n if (a !== 64) {\n t = t + String.fromCharCode(i);\n }\n }\n t = Base64._utf8_decode(t);\n return t;\n }\n static _utf8_encode(e: string): string {\n e = e.replace(/rn/g, \"n\");\n let t = \"\";\n for (let n = 0; n < e.length; n++) {\n const r = e.charCodeAt(n);\n if (r < 128) {\n t += String.fromCharCode(r);\n } else if (r > 127 && r < 2048) {\n t += String.fromCharCode(r >> 6 | 192);\n t += String.fromCharCode(r & 63 | 128);\n } else {\n t += String.fromCharCode(r >> 12 | 224);\n t += String.fromCharCode(r >> 6 & 63 | 128);\n t += String.fromCharCode(r & 63 | 128);\n }\n }\n return t;\n }\n static _utf8_decode(e: string): string {\n let t = \"\";\n let n = 0;\n let r = 0;\n let c2 = 0;\n let c3: number;\n while (n < e.length) {\n r = e.charCodeAt(n);\n if (r < 128) {\n t += String.fromCharCode(r);\n n++;\n } else if (r > 191 && r < 224) {\n c2 = e.charCodeAt(n + 1);\n t += String.fromCharCode((r & 31) << 6 | c2 & 63);\n n += 2;\n } else {\n c2 = e.charCodeAt(n + 1);\n c3 = e.charCodeAt(n + 2);\n t += String.fromCharCode((r & 15) << 12 | (c2 & 63) << 6 | c3 & 63);\n n += 3;\n }\n }\n return t;\n }\n};", "import { isBrowser } from \"./platform\";\nimport process from \"node:process\";\n\nexport var _basePath_:string = (\n function ():string {\n let _basePath:string = \"\";\n if (isBrowser) {\n const baseURI:string[] = document.baseURI.split(\"?\")[0].split(\"/\");\n baseURI.pop();\n _basePath = baseURI.join(\"/\") + \"/\";\n } else {\n if (typeof process !== \"undefined\") {\n _basePath = `${(process).cwd()}/`;\n } else {\n _basePath = \"\";\n }\n }\n return _basePath;\n }\n )();\n\nexport const setBasePath = (value:string):void => { _basePath_ = value;};", "import { _LegacyCopy } from \"./LegacyCopy\";\n\nexport const _DataStringify = (data: any): string => {\n const getCircularReplacer = function () {\n const seen = new WeakSet();\n let _level = 0;\n return function (key: string, value: any): any {\n if (typeof value === \"object\" && value !== null) {\n if (seen.has(value)) {\n _level += 1;\n return (_level <= 3) ? (_LegacyCopy(value)) : (null);\n }\n seen.add(value);\n }\n return value;\n };\n };\n return JSON.stringify(data, getCircularReplacer());\n};\n", "export const _domain_:string = (typeof location !== \"undefined\" && location.hostname !== \"\") ? (location.hostname) : (\"localhost\");\n", " /**\n * Creates an object from a Class definition\n *\n * @param {QC_Object} o\n * @param {Object} args\n */\n\n export const New = function (__class__:any, args = {}):any {\n args = (arguments.length > 1) ? (args) : ({});\n return (typeof __class__ === \"undefined\") ? (new Object()) : (new __class__(args));\n };\n \n New.prototype.toString = function () {\n return \"New(QCObjectsClassName, args) { [QCObjects native code] }\";\n };", "import { isBrowser } from \"./platform\";\n\nexport const _secretKey:string = (isBrowser)?(location.host):(\"secret\");", "import { _ICrypt } from \"./types/global\";\nimport { Base64 } from \"./Base64\";\nimport { _DataStringify } from \"./DataStringify\";\nimport { InheritClass } from \"./InheritClass\";\nimport { Package } from \"./Package\";\nimport { _secretKey } from \"./secretKey\";\n\n\nexport class _Crypt extends InheritClass implements _ICrypt {\n string: string = \"\";\n key: string = \"\";\n // eslint-disable-next-line no-unused-vars\n encrypt(_string_: string, key: string): string {\n throw new Error(\"Method not implemented.\");\n }\n // eslint-disable-next-line no-unused-vars\n decrypt(_string_: string, key: string): string {\n throw new Error(\"Method not implemented.\");\n }\n last_string = \"\";\n last_key = \"\";\n construct = false;\n _new_(o: { string?: string; key: string; }):void {\n const string = o.string;\n let key: string = (Object.hasOwn(o, \"key\")) ? (o.key) : (\"\");\n this.__new__(o);\n key = (key === \"\") ? (this.__instanceID.toString()) : (key);\n this.last_key = key;\n this.last_string = string as string;\n this.construct = true;\n }\n _encrypt(): string {\n const string = this.string;\n const key = this.key;\n let result = \"\";\n let char;\n let keychar;\n for (let i = 0; i < string.length; i++) {\n char = string.substr(i, 1);\n keychar = key.substr((i % key.length) - 1, 1);\n char = String.fromCharCode(char.charCodeAt(0) + keychar.charCodeAt(0));\n result += char;\n }\n this.last_string = Base64.encode(result);\n return this.last_string;\n }\n _decrypt(): string {\n let string = this.string;\n const key = this.key;\n let result = \"\";\n let char;\n let keychar;\n string = Base64.decode(string);\n for (let i = 0; i < string.length; i++) {\n char = string.substr(i, 1);\n keychar = key.substr((i % key.length) - 1, 1);\n char = String.fromCharCode(char.charCodeAt(0) - keychar.charCodeAt(0));\n result += char;\n }\n\n this.last_string = result;\n return this.last_string;\n }\n static encrypt(string: string, key: string): string {\n const crypt = new _Crypt({\n string,\n key: (key !== \"\") ? (key) : (\"12345678ABC\")\n });\n return crypt._encrypt();\n }\n static decrypt(string: string, key: string):string {\n const crypt = new _Crypt({\n string,\n key: (key !== \"\") ? (key) : (\"12345678ABC\")\n });\n return crypt._decrypt();\n }\n}\n\nexport const _CryptObject = function (o: any): string {\n return _Crypt.encrypt(_DataStringify(o), _secretKey);\n};\nexport const _DecryptObject = function (s: string): any {\n return (s === \"\") ? ({}) : (JSON.parse(_Crypt.decrypt(s, _secretKey)));\n};\n\nPackage(\"com.qcobjects\", [_Crypt]);", "import { _basePath_ } from \"./basePath\";\nimport { InheritClass } from \"./InheritClass\";\nimport { Package } from \"./Package\";\n\ntype TConfigSettings = {\n [key: string]: any,\n relativeImportPath:string,\n remoteImportsPath:string,\n remoteSDKPath:string,\n asynchronousImportsLoad:boolean,\n removePackageScriptAfterLoading:boolean,\n componentsBasePath:string,\n delayForReady:number,\n preserveComponentBodyTag:false,\n useConfigService:false,\n routingWay:string,\n useSDK:boolean,\n useLocalSDK:boolean,\n basePath:string\n};\n\n\nexport class ConfigSettings extends InheritClass {\n public _CONFIG: TConfigSettings = {\n \"relativeImportPath\": \"\",\n \"remoteImportsPath\": \"\",\n \"remoteSDKPath\": \"https://sdk.qcobjects.dev/\",\n \"asynchronousImportsLoad\": false,\n \"removePackageScriptAfterLoading\": true,\n \"componentsBasePath\": \"\",\n \"delayForReady\": 0,\n \"preserveComponentBodyTag\": false,\n \"useConfigService\": false,\n \"routingWay\": \"hash\",\n \"useSDK\": true,\n \"useLocalSDK\": false,\n \"basePath\": _basePath_\n };\n protected static _instance: ConfigSettings;\n public _CONFIG_ENC = \"\";\n\n set(name:string, value:any):void {\n this._CONFIG[name] = value;\n }\n\n get(name:string, _defaultValue?:any):any {\n return this._CONFIG[name] || _defaultValue;\n }\n\n static get instance():ConfigSettings {\n\n if (typeof ConfigSettings._instance === \"undefined\") {\n ConfigSettings._instance = new ConfigSettings();\n }\n\n return ConfigSettings._instance;\n }\n\n\n}\n\nPackage(\"com.qcobjects\", [ConfigSettings]);\n", "import { setBasePath } from \"./basePath\";\nimport { _CastProps } from \"./Cast\";\nimport { _Crypt, _CryptObject, _DecryptObject } from \"./Crypt\";\nimport { _DataStringify } from \"./DataStringify\";\nimport { logger } from \"./Logger\";\nimport { GlobalProcessor as Processor } from \"./Processor\";\nimport { _secretKey } from \"./secretKey\";\nimport { Package } from \"./Package\";\nimport { InheritClass } from \"./InheritClass\";\nimport { ICONFIG } from \"./types/global\";\nimport { ConfigSettings } from \"./ConfigSettings\";\n\n\nexport class CONFIG extends InheritClass implements ICONFIG {\n\n get _CONFIG_ENC(): string {\n return ConfigSettings.instance._CONFIG_ENC;\n }\n\n get _CONFIG(): unknown {\n return ConfigSettings.instance._CONFIG as unknown;\n }\n\n set(name: string, value: unknown):void {\n logger.debug(`CONFIG.set ${name}: ${value as string}`);\n // hack to force update basePath from CONFIG\n if (name === \"basePath\") {\n setBasePath(value as string);\n }\n let _conf;\n try {\n _conf = (\n function (config): any {\n if (config._CONFIG_ENC === null) {\n config._CONFIG_ENC = _Crypt.encrypt(_DataStringify({}), _secretKey);\n }\n const _protectedEnc = config._CONFIG_ENC.valueOf();\n const _protectedConf = config._CONFIG?.valueOf();\n return _CastProps(_protectedConf, _DecryptObject(_protectedEnc));\n }\n )(ConfigSettings.instance);\n } catch (e) {\n _conf = {};\n console.error(e);\n logger.debug(\"failed to encrypt config\");\n }\n\n _conf[name] = value;\n ConfigSettings.instance._CONFIG_ENC = _CryptObject(_conf);\n ConfigSettings.instance.set(name, value);\n }\n\n get(name: string, _default?: unknown): any {\n let _value;\n try {\n const _conf = (\n function (config): any {\n if (config._CONFIG_ENC === null) {\n config._CONFIG_ENC = _Crypt.encrypt(_DataStringify({}), _secretKey);\n }\n const _protectedEnc = config._CONFIG_ENC.valueOf();\n const _protectedConf = config._CONFIG.valueOf();\n return _CastProps(_protectedConf, _DecryptObject(_protectedEnc));\n }\n )(ConfigSettings.instance);\n if (typeof _conf[name] !== \"undefined\") {\n _value = _conf[name];\n }\n } catch (e) {\n console.error(e);\n logger.debug(\"Something wrong when trying to get CONFIG values\");\n logger.debug(\"No config value for: \" + name);\n _value = _default;\n }\n return Processor.processObject(_value) || _default;\n }\n\n private static _instance:CONFIG;\n static get instance ():CONFIG {\n if (typeof CONFIG._instance === \"undefined\") {\n CONFIG._instance = new CONFIG();\n }\n return CONFIG._instance;\n }\n\n static set(name: string, value: unknown):void {\n (CONFIG.instance.set(name, value));\n }\n static get(name: string, value?: unknown): any {\n return (CONFIG.instance.get(name, value));\n }\n\n}\n\n\nPackage(\"com.qcobjects\", [CONFIG]);", "import { type IComponent, type IProcessor } from \"./types/global\";\nimport { CONFIG } from \"./CONFIG\";\nimport { InheritClass } from \"./InheritClass\";\nimport { New } from \"./New\";\nimport { _top } from \"./top\";\nimport { Component } from \"./Component\";\nimport { Package } from \"./Package\";\n\nexport class Processor extends InheritClass implements IProcessor {\n protected static _instance: IProcessor | undefined;\n constructor({ component, processors }: { component: IComponent | null, processors?: any }) {\n super({ component });\n if (typeof processors !== \"undefined\") {\n this.processors = Object.assign(processors, Processor.instance.processors);\n }\n }\n\n processors: any = {\n \"config\"(component: Component, arg: string): string {\n return CONFIG.get(arg, \"\") as string;\n },\n \"ENV\"(component: Component, arg: string): string {\n return (typeof process !== \"undefined\") ? (process.env[arg] as string) : (\"\");\n },\n \"global\"(component: Component, arg: string): string {\n return (typeof _top !== \"undefined\") ? ((_top as any)[arg] as string) : (\"\");\n }\n };\n\n static get instance(): IProcessor {\n if (typeof Processor._instance === \"undefined\") {\n Processor._instance = new Processor({ component: null });\n }\n return Processor._instance;\n }\n\n setProcessor(_proc_: Function):void {\n if (typeof _proc_ === \"function\" && _proc_.name !== \"\") {\n this.processors[_proc_.name] = _proc_;\n }\n }\n\n component!: IComponent | null;\n\n\n execute(component: IComponent, processorName: string, args: string): string {\n const processorHandler = (typeof component !== \"undefined\" && component !== null) ? (component.processorHandler) : (this);\n return processorHandler?.processors[processorName].bind(processorHandler).apply(processorHandler, [component, args?.split(\",\")]) as string;\n }\n\n process(template: string, component: IComponent | null = null):string {\n const processorHandler = (component !== null) ? (component.processorHandler) : (New(Processor, { component: null }));\n if (typeof template === \"string\") {\n Object.keys(processorHandler.processors).map((funcName) => {\n return [...template.matchAll(new RegExp(\"\\\\$\" + funcName + \"\\\\((.*)\\\\).*\", \"g\"))].map(\n function (procesorMatch) {\n const match0 = `$${funcName}(${procesorMatch[1]})`;\n template = template.replace(match0, processorHandler.execute.bind(processorHandler).call(processorHandler, component, funcName, procesorMatch[1]));\n return procesorMatch;\n }\n );\n });\n }\n return template;\n }\n\n processObject(obj: any, component: IComponent | null = null): any {\n let __instance__: IProcessor | undefined = (component === null) ? (this) : (component.processorHandler);\n if (typeof __instance__ === \"undefined\") {\n __instance__ = new Processor({ component });\n }\n if (typeof obj === \"object\") {\n Object.keys(obj).map(\n (_k) => {\n if (typeof obj[_k] === \"object\" && !Object.hasOwn(obj[_k], \"call\")) {\n obj[_k] = __instance__?.processObject.bind(__instance__)(obj[_k], component as IComponent);\n } else if (typeof obj[_k] === \"string\") {\n obj[_k] = __instance__?.process.bind(__instance__)(obj[_k], component as IComponent);\n }\n return _k;\n }\n );\n } else if (typeof obj === \"string\") {\n obj = __instance__.process.bind(__instance__)(obj, component as IComponent);\n }\n return obj;\n }\n\n}\n\nexport const GlobalProcessor: IProcessor = Processor.instance;\n\nPackage(\"com.qcobjects\", [Processor]);", "import { TComponentRouting } from \"./types/global\";\n\nexport const __routing_params__ = (routing:TComponentRouting, routingPath:string):object => {\n const standardRoutingPath = routing.path.replace(/{(.*?)}/g, \"(?<$1>.*)\"); // allowing {param}\n return {\n ...[...routingPath.matchAll((new RegExp(standardRoutingPath, \"g\")))][0].groups\n };\n};\n\nexport const __valid_routings__ = function (routings:TComponentRouting[], routingPath:string):TComponentRouting[] {\n return routings.filter(function (routing) {\n const standardRoutingPath = routing.path.replace(/{(.*?)}/g, \"(?<$1>.*)\");\n return (new RegExp(standardRoutingPath, \"g\")).test(routingPath);\n }).reverse();\n};\nexport const __valid_routing_way__ = (validRoutingWays:string[], routingWay:string):boolean => {\n return validRoutingWays.includes(routingWay);\n};\n", "import { TAsyncLoadCallback } from \"./types/global\";\nimport { Export } from \"./Export\";\nimport { isBrowser } from \"./platform\";\nimport { _top } from \"./top\";\n\nexport const _asyncLoad:any[] = [];\nexport function asyncLoad(callback: TAsyncLoadCallback, args?: any[]): any {\n\n class AsyncCallback {\n func:TAsyncLoadCallback;\n args?:any[];\n constructor(callback: TAsyncLoadCallback, args: any[] = []) {\n this.func = callback;\n this.args = args;\n } \n dispatch() {\n ((this as AsyncCallback).func as Function).apply(this, ...args as [], this);\n }\n }\n _asyncLoad.push((new AsyncCallback(callback, args)) as unknown as never);\n return AsyncCallback;\n}\n\nexport const _fireAsyncLoad = ():void => {\n if (isBrowser){\n document.addEventListener(\"readystatechange\", () => {\n if (document.readyState === \"complete\") {\n // eslint-disable-next-line array-callback-return\n _asyncLoad.map(function (fc) {\n (fc).dispatch.call(fc);\n });\n }\n });\n } else if (typeof _top.global !== \"undefined\") {\n // eslint-disable-next-line array-callback-return\n _asyncLoad.map(function (fc) {\n (fc).dispatch.call(fc);\n });\n }\n };\n\nExport(asyncLoad);", "import { Base64 } from \"./Base64\";\nimport { _DataStringify } from \"./DataStringify\";\nimport { logger } from \"./Logger\";\n\nexport class ComplexStorageCache {\n\n constructor(params: { index: any; load: any; alternate: any; }) {\n let load, alternate;\n const object = params.index;\n if (typeof object !== \"undefined\") {\n load = params.load;\n alternate = params.alternate;\n const cachedObjectID = this.getID(object);\n const cachedResponse = localStorage.getItem(cachedObjectID as string);\n if (this.isEmpty(cachedResponse)) {\n const cachedNewResponse = load.call(null, {\n cachedObjectID,\n cachedResponse,\n \"cache\": this\n });\n this.save(object, cachedNewResponse);\n logger.debug(\"RESPONSE OF {{cachedObjectID}} CACHED\".replace(\"{{cachedObjectID}}\", cachedObjectID as string));\n } else {\n alternate.call(null, {\n cachedObjectID,\n cachedResponse,\n \"cache\": this\n });\n logger.debug(\"RESPONSE OF {{cachedObjectID}} IS ALREADY CACHED \".replace(\"{{cachedObjectID}}\", cachedObjectID as string));\n }\n\n } else {\n throw new Error(\"ComplexStorageCache: index is undefined\");\n }\n return this;\n }\n\n getItem(cachedObjectID: string):any {\n const retrievedObject = localStorage.getItem(cachedObjectID);\n if (!this.isEmpty(retrievedObject)) {\n return JSON.parse(retrievedObject as string);\n } else {\n return null;\n }\n }\n\n\n setItem(cachedObjectID: string, value: any):void {\n localStorage.setItem(cachedObjectID, _DataStringify(value));\n }\n\n isEmpty(object: string | number | null):boolean {\n let r = false;\n switch (true) {\n case (typeof object === \"undefined\"):\n case (typeof object === \"string\" && object === \"\"):\n case (typeof object === \"string\" && object === \"undefined\"):\n case (typeof object === \"number\" && object === 0):\n case (object === null):\n r = true;\n break;\n default:\n r = false;\n }\n return r;\n }\n\n\n getID(object: any):string|undefined {\n let cachedObjectID;\n if (typeof object !== \"undefined\") {\n cachedObjectID = \"cachedObject_\" + Base64.encode(_DataStringify(object).replace(/\\{|\\}|,/g, \"_\"));\n }\n return cachedObjectID;\n }\n\n save(object: any, cachedNewResponse: any):void {\n const cachedObjectID = this.getID(object);\n logger.debug(\"CACHING THE RESPONSE OF {{cachedObjectID}} \".replace(\"{{cachedObjectID}}\", cachedObjectID as string));\n this.setItem(cachedObjectID as string, cachedNewResponse);\n }\n\n getCached(object: any):any {\n const cachedObjectID = this.getID(object);\n return this.getItem(cachedObjectID as string);\n }\n\n clear():void {\n Object.keys(localStorage).filter(function (k) {\n return k.startsWith(\"cachedObject_\");\n }).map(function (c):any {\n localStorage.removeItem(c);\n return c;\n });\n }\n\n}\n", "import { IService, TCacheController } from \"./types/global\";\nimport { asyncLoad } from \"./asyncLoad\";\nimport { ComplexStorageCache } from \"./ComplexStorageCache\";\nimport { _DataStringify } from \"./DataStringify\";\nimport { logger } from \"./Logger\";\nimport { _require_, isBrowser } from \"./platform\";\nimport { _top } from \"./top\";\n\n/**\n * Loads a simple component from a template\n *\n * @author: Jean Machuca \n * @param service a Service object\n */\nexport const serviceLoader = function (service:IService, _async = false):Promise|undefined {\n const _serviceLoaderInBrowser = function (service:IService):Promise {\n var _promise = new Promise(\n function (resolve, reject) {\n\n logger.debug(\"LOADING SERVICE DATA {{DATA}} FROM {{URL}}\".replace(\"{{DATA}}\", _DataStringify(service.data)).replace(\"{{URL}}\", service.url));\n const xhr = new XMLHttpRequest();\n xhr.withCredentials = service.withCredentials;\n const xhrasync = true; // always async because xhr sync is deprecated\n xhr.open(service.method, service.url, xhrasync);\n for (const header in service.headers) {\n try {\n if (typeof service.headers[header] !== \"function\") {\n xhr.setRequestHeader(header, service.headers[header]);\n }\n } catch (e:any) {\n logger.debug(\"Something went wrong when assign the header \" + header);\n logger.debug(`An error ocurred: ${e}`);\n }\n }\n xhr.onload = function () {\n if (xhr.status === 200) {\n const response = xhr.responseText;\n logger.debug(\"Data received {{DATA}}\".replace(\"{{DATA}}\", _DataStringify(response)));\n logger.debug(\"CREATING SERVICE {{NAME}}\".replace(\"{{NAME}}\", service.name));\n service.template = response;\n if (service.cached && (typeof cache !== \"undefined\")) {\n cache.save(service.name, service.template);\n }\n if (typeof service.done === \"function\") {\n var standardResponse = {\n \"request\": xhr,\n service\n };\n service.done.call(service, standardResponse);\n resolve.call(_promise, standardResponse);\n }\n } else {\n if (typeof service.fail === \"function\") {\n var standardResponse = {\n \"request\": xhr,\n service\n };\n service.fail.call(service, standardResponse);\n reject.call(_promise, standardResponse);\n }\n }\n };\n\n const _directLoad = function () {\n logger.debug(\"SENDING THE NORMAL REQUEST \");\n try {\n xhr.send(_DataStringify(service.data));\n } catch (e:any) {\n logger.debug(\"SOMETHING WRONG WITH REQUEST \");\n logger.debug(`An error ocurred: ${e}`);\n reject.call(_promise, {\n request: xhr,\n service\n });\n }\n };\n\n if (service.cached) {\n var cache = new ComplexStorageCache({\n index: service.data,\n load() {\n _directLoad.call(this);\n },\n alternate(cacheController:TCacheController) {\n if (service.method === \"GET\") {\n service.template = cacheController.cache.getCached(service.name);\n if (typeof service.done === \"function\") {\n const standardResponse = {\n \"request\": xhr,\n service\n };\n service.done.call(service, standardResponse);\n resolve.call(_promise, standardResponse);\n }\n } else {\n _directLoad();\n }\n \n }\n });\n (_top as any).lastCache = cache;\n } else {\n _directLoad();\n }\n\n return xhr;\n }\n );\n return _promise;\n };\n\n const _serviceLoaderInNode = function (service:IService) {\n var _promise = new Promise(\n function (resolve, reject) {\n if (typeof URL === \"undefined\") {\n global.URL = (_require_(\"url\")).URL;\n // eslint-disable-next-line no-unused-vars\n const URL = global.URL;\n }\n const serviceURL = new URL(service.url);\n var req;\n service.useHTTP2 = Object.hasOwn(service, \"useHTTP2\") && service.useHTTP2;\n\n\n const captureEvents = function (req:any) {\n logger.debug(\"LOADING SERVICE DATA (non-browser) {{DATA}} FROM {{URL}}\".replace(\"{{DATA}}\", _DataStringify(service.data)).replace(\"{{URL}}\", service.url));\n let dataXML:any;\n const standardResponse = {\n \"http2Client\": client,\n \"request\": req,\n service,\n \"responseHeaders\": null\n };\n\n if (typeof service.data === \"object\" && service.data !== null) {\n if (service.useHTTP2) {\n try {\n logger.debug(\"Sending data...\");\n const buffer = new Buffer(_DataStringify(service.data));\n req.write(buffer);\n } catch (e:any) {\n logger.debug(\"It was not possible to send any data\");\n logger.debug(`An error ocurred: ${e}`);\n }\n }\n }\n\n dataXML = \"\";\n req.on(\"response\", (responseHeaders:any) => {\n logger.debug(\"receiving response...\");\n standardResponse.responseHeaders = responseHeaders;\n /*\n for (const name in responseHeaders) {\n logger.debug(`${name}: ${responseHeaders[name]}`);\n }\n */\n dataXML = \"\";\n });\n req.on(\"data\", (chunk:any) => {\n logger.debug(\"receiving data...\");\n // do something with the data\n dataXML += \"\" + chunk.toString();\n service.template = dataXML;\n });\n if (service.useHTTP2) {\n req.resume();\n }\n req.on(\"end\", () => {\n logger.debug(\"ending call...\");\n service.template = dataXML;\n if (Object.hasOwn(service, \"useHTTP2\") && service.useHTTP2) {\n client.destroy();\n } else {\n req.destroy();\n }\n service.done.call(service, standardResponse);\n resolve.call(_promise, standardResponse);\n });\n if (service.useHTTP2) {\n req.end();\n }\n\n };\n\n try {\n let requestOptions;\n if (service.useHTTP2) {\n logger.debug(\"using http2\");\n const http2 = _require_(\"http2\");\n var client = (http2).connect(serviceURL.origin);\n requestOptions = Object.assign({\n \":method\": service.method,\n \":path\": serviceURL.pathname\n }, service.options);\n requestOptions = Object.assign(requestOptions, service.headers);\n req = client.request(requestOptions);\n req.setEncoding(\"utf8\");\n captureEvents(req);\n } else {\n if (serviceURL.protocol === \"http:\") {\n const http = _require_(\"http\");\n const request = (http).request;\n requestOptions = Object.assign({\n \"url\": service.url,\n headers: service.headers\n }, service.options);\n req = request(service.url);\n captureEvents(req);\n } else if (serviceURL.protocol === \"https:\") {\n const https = _require_(\"https\");\n requestOptions = Object.assign({\n hostname: serviceURL.hostname,\n port: serviceURL.port,\n path: serviceURL.pathname,\n method: service.method,\n headers: service.headers\n }, service.options);\n const _req_ = (https).request(requestOptions, function (req:any) {\n captureEvents(req);\n });\n _req_.end();\n } else {\n const e = \"Protocol not supported: \" + serviceURL.protocol;\n logger.debug(e);\n throw new Error(e);\n }\n }\n\n\n } catch (e:any) {\n logger.debug(e);\n service.fail.call(service, e);\n reject.call(_promise, e);\n\n }\n }).catch( (e:any) => {\n logger.debug(`Something happened when trying to call the service: ${service.name}. Error: ${e}`);\n service.fail.call(service, e);\n });\n return _promise;\n\n };\n\n const _serviceLoaderMockup = function (service:IService) {\n var _promise = new Promise(\n function (resolve) {\n logger.debug(`Calling mockup service ${service.name} ...`);\n const standardResponse = {\n \"request\": null,\n service,\n \"responseHeaders\": service.responseHeaders\n };\n if (typeof service.mockup === \"function\") {\n service.mockup.call(service, standardResponse);\n } else {\n service.done.call(service, standardResponse);\n }\n resolve.call(_promise, standardResponse);\n });\n return _promise;\n };\n const _serviceLoaderLocal = function (service:IService) {\n var _promise = new Promise(\n function (resolve) {\n logger.debug(`Calling local service ${service.name} ...`);\n const standardResponse = {\n \"request\": null,\n service,\n \"responseHeaders\": service.responseHeaders\n };\n if (typeof service.local === \"function\") {\n service.local.call(service, standardResponse);\n } else {\n service.done.call(service, standardResponse);\n }\n resolve.call(_promise, standardResponse);\n });\n return _promise;\n };\n\n let _ret_: Promise;\n switch (service.kind) {\n case \"rest\":\n if (isBrowser) {\n if (typeof _async !== \"undefined\" && _async) {\n _ret_ = asyncLoad(_serviceLoaderInBrowser, [service, _async]);\n } else {\n _ret_ = _serviceLoaderInBrowser(service);\n }\n } else {\n _ret_ = _serviceLoaderInNode(service);\n }\n break;\n case \"mockup\":\n _ret_ = _serviceLoaderMockup(service);\n break;\n case \"local\":\n _ret_ = _serviceLoaderLocal(service);\n break;\n default:\n logger.debug(`The value of the kind property of the service ${service.name} is not valid`);\n _ret_ = Promise.resolve();\n break;\n }\n return _ret_;\n};\n", "export const _tag_filter_ = \"quick-component:not([loaded]),component:not([loaded])\";\n", "import { IComponent, TCacheController } from \"./types/global\";\nimport { asyncLoad } from \"./asyncLoad\";\nimport { ComplexStorageCache } from \"./ComplexStorageCache\";\nimport { _DataStringify } from \"./DataStringify\";\nimport { logger } from \"./Logger\";\nimport { is_phonegap, isBrowser } from \"./platform\";\nimport { _top } from \"./top\";\n\n/**\n * Loads a simple component from a template\n *\n * @author: Jean Machuca \n * @param component a Component object\n */\nexport const componentLoader = function (component: IComponent, _async: boolean):Promise {\n let __promise__: Promise;\n const _componentLoaderInBrowser = function (component: IComponent) {\n __promise__ = new Promise(function (resolve, reject) {\n const _promise = component.__promise__;\n const container = (Object.hasOwn(component, \"container\") && typeof component.container !== \"undefined\" && component.container !== null) ? (component.container) : (component.body);\n if (container !== null) {\n const _feedComponent_ = function (component: { feedComponent: () => void; }) {\n component.feedComponent();\n const standardResponse = {\n \"request\": xhr,\n component\n };\n resolve.call(_promise, standardResponse);\n };\n logger.debug(\"LOADING COMPONENT DATA {{DATA}} FROM {{URL}}\".replace(\"{{DATA}}\", _DataStringify(component.data)).replace(\"{{URL}}\", component.url));\n\n const _componentLoaded = function () {\n const successStatus = (is_file) ? (0) : (200);\n if (xhr.status === successStatus) {\n const response = xhr.responseText;\n logger.debug(\"Data received {{DATA}}\".replace(\"{{DATA}}\", _DataStringify(response)));\n logger.debug(\"CREATING COMPONENT {{NAME}}\".replace(\"{{NAME}}\", component.name));\n component.template = response;\n if (component.cached && (typeof cache !== \"undefined\")) {\n cache.save(component.name, component.template);\n }\n _feedComponent_(component);\n } else {\n const standardResponse = {\n \"request\": xhr,\n component\n };\n reject.call(_promise, standardResponse);\n\n }\n };\n if (typeof component.template === \"string\" && component.template !== \"\") {\n // component already has a template it does not need to be reloaded\n _feedComponent_(component);\n } else {\n var is_file = !!(component.url.startsWith(\"file:\"));\n var xhr = new XMLHttpRequest();\n if (!is_file) {\n try {\n logger.debug(\"Calling the url of component in async mode.\");\n xhr.open(component.method, component.url, true);\n } catch (e:any) {\n logger.debug(`An error ocurred: ${e}.`);\n logger.debug(\"Last try has failed... The component cannot be loaded.\");\n }\n } else {\n if (\"fetch\" in _top) {\n logger.debug(\"I can use fetch...\");\n logger.debug(\"It is a file to be loaded, so I will try to use fetch\");\n fetch(component.url).then(response => {\n logger.debug(\"I got a response from fetch, so I'll feed the component\");\n response.text().then(text => {\n component.template = text;\n _feedComponent_(component);\n })\n .catch((e:any) => {throw new Error (`An error ocurred: ${e}`);});\n }).catch ((e:any) => {throw new Error (`An error ocurred: ${e}`);});\n }\n }\n if (!is_phonegap && !is_file) {\n xhr.setRequestHeader(\"Content-Type\", \"text/html\");\n }\n if (!is_file) {\n xhr.onload = _componentLoaded;\n }\n const _directLoad = function (is_file: boolean) {\n is_file = !((typeof is_file === \"undefined\" || !is_file));\n logger.debug(\"SENDING THE NORMAL REQUEST \");\n if (is_file) {\n if (!(\"fetch\" in _top)) {\n logger.debug(\"I have to try to load the file using xhr... \");\n xhr.send(null);\n if (xhr.status === XMLHttpRequest.DONE) {\n _componentLoaded();\n }\n }\n } else {\n logger.debug(\"Trying to send the data to the component... \");\n xhr.send(_DataStringify(component.data));\n }\n };\n\n if (component.cached && (!is_file)) {\n logger.debug(\"USING CACHE FOR COMPONENT: \" + component.name);\n var cache = new ComplexStorageCache({\n index: component.cacheIndex,\n load() {\n _directLoad.call(this, is_file);\n },\n alternate(cacheController: TCacheController) {\n if (component.method === \"GET\") {\n component.template = cacheController.cache.getCached(component.cacheIndex);\n _feedComponent_.call(this, component);\n } else {\n _directLoad.call(this, is_file);\n }\n \n }\n });\n (_top as any).lastCache = cache;\n } else {\n logger.debug(\"NOT USING CACHE FOR COMPONENT: \" + component.name);\n _directLoad(is_file);\n }\n\n }\n } else {\n logger.debug(\"CONTAINER DOESNT EXIST\");\n }\n });\n __promise__.then(function (standardResponse) {\n return component.__done__().then(function () {\n let _ret_;\n if (typeof component.done === \"function\") {\n _ret_ = component.done.call(component, standardResponse);\n }\n return Promise.resolve(_ret_);\n });\n }, function (standardResponse) {\n if (typeof component.fail === \"function\") {\n component.fail.call(component, standardResponse)\n .catch ((e:any)=> {throw new Error (`${e}`);});\n }\n return Promise.reject(new Error (\"An error ocurred\"));\n }).catch(function (e:any) {\n logger.debug(\"Something wrong loading the component\");\n throw new Error (`An error ocurred: ${e}`);\n });\n return __promise__;\n };\n const _componentLoaderInNode = function (component: IComponent) {\n __promise__ = new Promise(function (resolve, reject) {\n const _promise = __promise__;\n const _feedComponent_ = function (component: IComponent) {\n component.feedComponent()\n .catch ((e:any) => {\n throw new Error (`An error ocurred trying to feed the component: ${component.name}. Error: ${e}`);\n });\n const standardResponse = {\n \"request\": null,\n component\n };\n resolve.call(_promise, standardResponse);\n };\n logger.debug(\"LOADING COMPONENT DATA {{DATA}} FROM {{URL}}\".replace(\"{{DATA}}\", _DataStringify(component.data)).replace(\"{{URL}}\", component.url));\n\n const _componentLoaded = function (err: any, responseText: { toString: () => any; }) {\n if (!err) {\n const response = responseText.toString();\n logger.debug(\"Data received {{DATA}}\".replace(\"{{DATA}}\", _DataStringify(response)));\n logger.debug(\"CREATING COMPONENT {{NAME}}\".replace(\"{{NAME}}\", component.name));\n component.template = response;\n if (component.cached && (typeof cache !== \"undefined\")) {\n cache.save(component.name, component.template);\n }\n _feedComponent_(component);\n } else {\n const standardResponse = {\n \"request\": null,\n component\n };\n reject.call(_promise, standardResponse);\n }\n };\n if (typeof component.template === \"string\" && component.template !== \"\") {\n // component already has a template it does not need to be reloaded\n _feedComponent_(component);\n } else {\n logger.debug(\"Loading the component as a local file in server...\");\n const _directLoad = function () {\n // eslint-disable-next-line @typescript-eslint/no-require-imports\n const {readFile} = require(\"node:fs\");\n logger.debug(\"SENDING THE NORMAL REQUEST \");\n readFile(component.url, _componentLoaded);\n };\n\n if (component.cached) {\n logger.debug(\"USING CACHE FOR COMPONENT: \" + component.name);\n var cache = new ComplexStorageCache({\n index: component.cacheIndex,\n load() {\n _directLoad();\n },\n alternate(cacheController: TCacheController) {\n if (component.method === \"GET\") {\n component.template = cacheController.cache.getCached(component.cacheIndex);\n _feedComponent_.call(this, component);\n } else {\n _directLoad.call(this);\n }\n \n }\n });\n (_top as any).lastCache = cache;\n } else {\n logger.debug(\"NOT USING CACHE FOR COMPONENT: \" + component.name);\n _directLoad();\n }\n\n }\n });\n __promise__.then(function (standardResponse) {\n return component.__done__().then(function () {\n let _ret_;\n if (typeof component.done === \"function\") {\n _ret_ = component.done.call(component, standardResponse);\n }\n return Promise.resolve(_ret_);\n });\n }, function (standardResponse) {\n if (typeof component.fail === \"function\") {\n component.fail.call(component, standardResponse)\n .catch((e:any) => {throw new Error (`An error ocurred: ${e}`);});\n }\n return Promise.reject(new Error (\"An error ocurred.\"));\n }).catch(function (e) {\n logger.debug(`Something wrong loading the component: ${e}`);\n });\n return __promise__;\n };\n\n let _ret_;\n if (isBrowser) {\n if (typeof _async !== \"undefined\" && _async) {\n _ret_ = asyncLoad(_componentLoaderInBrowser, [component, _async]);\n } else {\n _ret_ = _componentLoaderInBrowser(component);\n }\n } else {\n _ret_ = _componentLoaderInNode(component);\n }\n return _ret_ as Promise;\n};", "import { Base64 } from \"./Base64\";\nimport { _basePath_ } from \"./basePath\";\nimport { _Cast } from \"./Cast\";\nimport { ClassFactory } from \"./ClassFactory\";\nimport { _buildComponentsFromElements_, ComponentURI } from \"./ComponentFactory\";\nimport { _DataStringify } from \"./DataStringify\";\nimport { _domain_ } from \"./domain\";\nimport { _DOMCreateElement } from \"./DOMCreateElement\";\nimport { __getType__ } from \"./getType\";\nimport { InheritClass } from \"./InheritClass\";\nimport { _methods_, _protected_code_ } from \"./introspection\";\nimport { is_a } from \"./is_a\";\nimport { isQCObjects_Object } from \"./isQCObjects\";\nimport { logger } from \"./Logger\";\nimport { New } from \"./New\";\nimport { Package } from \"./Package\";\nimport { isBrowser } from \"./platform\";\nimport { Processor } from \"./Processor\";\nimport { __routing_params__, __valid_routing_way__, __valid_routings__ } from \"./routings\";\nimport { _top, componentsStack } from \"./top\";\nimport { CONFIG } from \"./CONFIG\";\nimport { serviceLoader } from \"./serviceLoader\";\nimport { _tag_filter_ } from \"./tag_filter\";\nimport { componentLoader } from \"./componentLoader\";\nimport { IComponent, IController, IEffect, IProcessor, IQCObjectsElement, IQCObjectsShadowedElement, IView, TBody, TComponentDoneResponse, TComponentParams, TComponentRouting, TComponentRoutings } from \"./types/global\";\n\nexport class Component extends InheritClass implements IComponent {\n static shadowed: boolean | undefined = false;\n static cached: any = true;\n [key: string]: any;\n name!: string;\n templateURI!: string;\n url!: string;\n tplsource!: string;\n tplextension!: string;\n template!: string;\n validRoutingWays: string[] = [\"pathname\", \"hash\", \"search\"];\n basePath:string = _basePath_;\n domain:string = _domain_;\n templateHandler = \"DefaultTemplateHandler\";\n processorHandler?: IProcessor;\n routingWay: string | null = null;\n routingNodes: (IQCObjectsElement | HTMLElement)[] = [];\n routings: TComponentRoutings = [];\n routingPath = \"\";\n routingPaths: string[] = [];\n _componentHelpers: any[] = [];\n subcomponents: any[] = [];\n splashScreenComponent?: IComponent = undefined;\n controller?: IController = undefined;\n routingController?: IController = undefined;\n\n view?: IView = undefined;\n effect?: IEffect = undefined;\n effectClass!: string;\n method = \"GET\";\n cached?: boolean = true;\n __promise__?: Promise | null = null;\n data!: any;\n __namespace?: string = undefined;\n protected _parsedAssignmentText!: string;\n protected __shadowRoot: any;\n protected _serviceClassName: string | null = null;\n enableServiceClass?: boolean | undefined = true;\n serviceInstance: any;\n serviceData: any;\n shadowed?: boolean = false;\n container: any;\n innerHTML: any;\n reload: any;\n static subcomponents: any;\n assignRoutingParams?: boolean = true;\n responseTo?: string | undefined;\n static responseTo?: string | undefined;\n\n constructor({\n __parent__,\n templateURI = \"\",\n template,\n tplsource = \"default\",\n tplextension,\n url = \"\",\n name = \"\",\n method = \"GET\",\n data = {},\n reload = false,\n shadowed = false,\n cached = true,\n enableServiceClass,\n assignRoutingParams = true,\n _body = _DOMCreateElement(\"div\"),\n __promise__ = null,\n __shadowRoot,\n body,\n shadowRoot,\n splashScreenComponent,\n controller,\n view\n }: TComponentParams) {\n if (arguments.length < 1) {\n throw Error(\"No arguments in component. You must at least give one argument.\");\n }\n super({\n __parent__,\n templateURI,\n template,\n tplsource,\n tplextension,\n url,\n name,\n method,\n data,\n reload,\n shadowed,\n cached,\n enableServiceClass,\n assignRoutingParams,\n _body,\n __promise__,\n __shadowRoot,\n body,\n shadowRoot,\n splashScreenComponent,\n controller,\n view\n });\n const self = this;\n\n if (typeof name !== \"undefined\") {\n self.name = name;\n }\n\n if (typeof self.name === \"undefined\" && typeof name === \"undefined\") {\n logger.warn(\"A name is not defined for \" + __getType__(self));\n }\n\n self.routingWay = CONFIG.get(\"routingWay\");\n\n self.processorHandler = new Processor({\n component: self\n });\n\n /* assign body data attributes to data */\n self.data = (typeof self.data === \"undefined\" || self.data === null) ? ({}) : (self.data);\n self.data = Object.assign(self.data, self.dataAttributes);\n\n self.createServiceInstance()\n .then(() => {\n if (typeof self.__new__ === \"function\") {\n self.__new__(self);\n }\n\n self._generateRoutingPaths(self.body)\n .then(function () {\n self._reroute_()\n .then(function () {\n return self.rebuild()\n .then(function () {\n logger.info(`Component._new_ The component ${self.name} was built successfully!`);\n }).catch(function (standardResponse) {\n logger.warn(`Component._new_ Something went wrong building the component ${self.name}`);\n console.error(`Component._new_ Something went wrong building the component ${self.name}`, standardResponse);\n });\n }).catch((e: any) => {\n throw Error(`Unexpected error ${e}`);\n });\n }).catch((e: any) => {\n throw Error(`Unexpected error ${e}`);\n });\n\n }).catch((e: any) => {\n throw Error(`Unexpected error. ${e}`);\n });\n\n }\n\n set cacheIndex(value) {\n // readonly\n logger.debug(\"[cacheIndex] This property is readonly\");\n }\n\n get cacheIndex():string {\n const self = this;\n const __routing_path__ = _DataStringify(self.routingPath);\n return Base64.encode(self.name + __routing_path__);\n }\n\n set parsedAssignmentText(value: string) {\n // readonly\n logger.debug(\"[parsedAssignmentText] This property is readonly\");\n }\n\n get parsedAssignmentText(): string {\n const self = this;\n self._parsedAssignmentText = self.parseTemplate(self.template);\n if (typeof self._parsedAssignmentText === \"undefined\") {\n throw Error(`[Component][${this.name}][parsedAssignmentText] Could not generate content!`);\n }\n return self._parsedAssignmentText;\n }\n\n\n set shadowRoot(value: IQCObjectsShadowedElement) {\n const self = this;\n if (typeof self.__shadowRoot === \"undefined\") {\n self.__shadowRoot = value;\n } else {\n logger.debug(\"[shadowRoot] This property can only be assigned once!\");\n }\n }\n\n get shadowRoot(): IQCObjectsShadowedElement {\n const self = this;\n return self.__shadowRoot as IQCObjectsShadowedElement;\n }\n\n\n set routingSelected(value: TComponentRouting[]) {\n logger.debug(\"[routingSelected] This is a read-only property of the component\");\n }\n\n get routingSelected(): TComponentRouting[] {\n const self = this;\n return __valid_routings__(self.routings, self.routingPath);\n }\n\n set routingParams(value) {\n logger.debug(\"[routingParams] This is a read-only property of the component\");\n }\n\n get routingParams(): object {\n const component = this;\n return [{}].concat(component.routingSelected.map(function (routing: any) {\n return __routing_params__(routing, component.routingPath);\n })).reduce(function (accumulator, colData) {\n return Object.assign(accumulator, colData);\n });\n }\n\n\n set serviceClassName(_serviceClassName: string) {\n this._serviceClassName = _serviceClassName;\n }\n\n get serviceClassName(): string | null {\n let _serviceClassName: string | null = \"\";\n if (isBrowser) {\n _serviceClassName = ((this.body as HTMLElement).getAttribute(\"serviceClass\") !== null) ? ((this.body as HTMLElement).getAttribute(\"serviceClass\")) : (\n this._serviceClassName\n );\n } else {\n _serviceClassName = this._serviceClassName;\n }\n return _serviceClassName;\n }\n\n protected get responseToData(): boolean {\n let _response_to_data_: boolean = false;\n if (isBrowser) {\n const responseToAttr = (this.body as HTMLElement).getAttribute(\"response-to\");\n _response_to_data_ = responseToAttr === \"data\" || this.responseTo === \"data\";\n } else {\n _response_to_data_ = this.responseTo === \"data\";\n }\n return _response_to_data_;\n }\n\n protected get responseToTemplate(): boolean {\n let _response_to_template_: boolean = false;\n if (isBrowser) {\n const responseToAttr = (this.body as HTMLElement).getAttribute(\"response-to\");\n _response_to_template_ = responseToAttr === \"template\" || this.responseTo === \"template\";\n } else {\n _response_to_template_ = this.responseTo === \"template\";\n }\n return _response_to_template_;\n }\n\n createServiceInstance(): Promise {\n const component = this;\n let data = this.data;\n let __serviceClass: any;\n const __classDefinition = component.getClass().__definition;\n const _serviceClassName = component.serviceClassName;\n\n return new Promise(function (resolve, reject) {\n /* __enable_service_class__ = true by default */\n const __enable_service_class__ = component.enableServiceClass;\n let _response_to_data_ = component.responseToData;\n let _response_to_template_ = component.responseToTemplate;\n\n if (__enable_service_class__ && _serviceClassName !== null) {\n __serviceClass = ClassFactory(_serviceClassName);\n }\n if (!_response_to_data_ && __classDefinition && Object.hasOwn(__classDefinition, \"responseTo\")) {\n _response_to_data_ = (__classDefinition.responseTo === \"data\");\n } else if (!_response_to_data_ && Object.hasOwn(ClassFactory(\"Component\"), \"responseTo\")) {\n _response_to_data_ = ((ClassFactory(\"Component\") as Component).responseTo === \"data\");\n }\n if (!_response_to_template_ && __classDefinition && Object.hasOwn(__classDefinition, \"responseTo\")) {\n _response_to_template_ = (__classDefinition.responseTo === \"template\");\n } else if (!_response_to_template_ && Object.hasOwn(ClassFactory(\"Component\"), \"responseTo\")) {\n _response_to_template_ = ((ClassFactory(\"Component\") as Component).responseTo === \"template\");\n }\n\n if (typeof __serviceClass !== \"undefined\" &&\n (typeof __enable_service_class__ !== \"undefined\" &&\n __enable_service_class__ === true) &&\n (_response_to_data_ || _response_to_template_)\n ) {\n logger.info(\"Loading service \" + _serviceClassName);\n const serviceInstance = New(__serviceClass, {\n data\n });\n (serviceLoader(serviceInstance) as Promise)?.then(function ({\n service\n }: { request: any, service: any }) {\n let serviceResponse;\n if (typeof service.JSONresponse !== \"undefined\" && service.JSONresponse !== null) {\n serviceResponse = service.JSONresponse;\n } else {\n serviceResponse = service.template;\n }\n if (_response_to_data_) {\n if (typeof data === \"object\" && typeof serviceResponse === \"object\") {\n data = Object.assign(data, serviceResponse);\n } else {\n data = serviceResponse;\n }\n component.data = data;\n }\n component.serviceInstance = serviceInstance;\n component.serviceData = data;\n\n if (_response_to_template_) {\n component.template = serviceResponse;\n }\n resolve(serviceResponse);\n }, function (rejectedResponse: Error) {\n logger.debug(`Service loading rejected for ${_serviceClassName} in ${component.name}`);\n reject(rejectedResponse);\n }).catch(function (e: any) {\n logger.debug(\"Something went wroing while trying to load the service \" + _serviceClassName);\n throw Error(`Error loading ${_serviceClassName} for ${component.name}. Detail: ${e}`);\n });\n } else {\n resolve(null);\n }\n });\n }\n\n _bindroute_():void {\n const _component_ = this;\n if (!(_component_ as any)._bindroute_.loaded) {\n if (isBrowser) {\n\n (_component_.hostElements(\"a\") as unknown as HTMLAnchorElement[]).map(function (a: HTMLAnchorElement) {\n (a as any).oldclick = a.onclick;\n a.onclick = function (e) {\n let _ret_ = true;\n if (!_top.global.get(\"routingPaths\")) {\n _top.global.set(\"routingPaths\", []);\n }\n const routingWay = CONFIG.get(\"routingWay\");\n const routingPath = (e.target as any)[routingWay];\n if (_top.global.get(\"routingPaths\").includes(routingPath) &&\n (e.target as any)[routingWay] !== (location as any)[routingWay] &&\n (e.target as HTMLAnchorElement).href !== document.location.href\n ) {\n logger.debug(\"A ROUTING WAS FOUND: \" + routingPath);\n window.history.pushState({\n href: (e.target as HTMLAnchorElement).href\n }, (e?.target as HTMLAnchorElement)?.href, (e.target as HTMLAnchorElement).href);\n Component.route().catch((e) => { throw Error(`Unexpected error: ${e}`); });\n _ret_ = false;\n } else {\n logger.debug(\"NO ROUTING FOUND FOR: \" + routingPath);\n }\n if (typeof (e.target as any).oldclick !== \"undefined\" && typeof (e.target as any).oldclick === \"function\") {\n (e.target as any).oldclick.call(e.target, e);\n }\n return _ret_;\n };\n return null;\n });\n\n } else {\n // not yet implemented.\n }\n (_component_ as any)._bindroute_.loaded = true;\n } else {\n logger.debug(`Routes already bound to popstate events for ${_component_.name}`);\n }\n\n }\n\n done(standardResponse?: TComponentDoneResponse): Promise {\n const _ret_ = new Promise((resolve) => {\n if (typeof standardResponse !== \"undefined\") {\n const { request, component } = standardResponse;\n resolve({ request, component });\n } else {\n resolve({ request: undefined, component: undefined });\n }\n });\n return _ret_;\n }\n\n createControllerInstance(): Promise<{ component: IComponent, controller: IController }> {\n let _Controller: any;\n if (isBrowser) {\n if (typeof this.body === \"undefined\") {\n throw new Error(\"The component has no body\");\n }\n var controllerName = (this.body as HTMLElement).getAttribute(\"controllerClass\");\n if (!controllerName) {\n controllerName = \"Controller\";\n }\n _Controller = ClassFactory(controllerName);\n if (typeof _Controller !== \"undefined\") {\n this.controller = New(_Controller, {\n component: this\n });\n }\n\n }\n\n return new Promise((resolve, reject) => {\n if (isBrowser) {\n if (typeof _Controller !== \"undefined\" && typeof this.controller !== \"undefined\") {\n if (typeof (this.controller).done === \"function\") {\n try {\n this.controller.done.call(this.controller);\n } catch (e: any) {\n throw Error(e);\n }\n } else {\n logger.debug(`${controllerName} does not have a done() method.`);\n reject(new Error(`${controllerName} does not have a done() method.`));\n }\n if (typeof this.controller.createRoutingController === \"function\") {\n this.controller.createRoutingController.call(this.controller);\n } else {\n logger.debug(`${controllerName} does not have a createRoutingController() method.`);\n }\n }\n }\n resolve({ component: this, controller: this.controller as IController });\n });\n }\n\n createEffectInstance(): Promise<{ component: Component, effect: IEffect }> {\n const _component_ = this;\n return new Promise(function (resolve) {\n if (isBrowser) {\n const effectClassName = (_component_.body as HTMLElement)?.getAttribute(\"effectClass\");\n let applyEffectTo = (_component_.body as HTMLElement)?.getAttribute(\"apply-effect-to\");\n applyEffectTo = (applyEffectTo !== null) ? (applyEffectTo) : (\"load\");\n if (effectClassName !== null && applyEffectTo === \"observe\") {\n _component_.applyObserveTransitionEffect(effectClassName);\n } else if (effectClassName !== null && applyEffectTo === \"load\") {\n _component_.applyTransitionEffect(effectClassName);\n }\n }\n resolve({ component: _component_, effect: _component_.effect as IEffect });\n });\n }\n\n createViewInstance(): Promise<{ component: Component, view: IView }> {\n const _component_ = this;\n return new Promise(function (resolve) {\n const viewName = (isBrowser) ? ((_component_.body as HTMLElement).getAttribute(\"viewClass\")) : (null);\n if (viewName !== null) {\n const _View = ClassFactory(viewName);\n if (typeof _View !== \"undefined\") {\n _component_.view = New(_View, {\n component: _component_\n }); // Initializes the main view for the component\n if (Object.hasOwn(_component_.view as object, \"done\") && typeof _component_.view?.done === \"function\") {\n _component_.view?.done.call(_component_.view);\n }\n }\n\n }\n resolve({ component: _component_, view: _component_.view as IView });\n\n });\n }\n\n __done__(): Promise {\n const _component_ = this;\n const componentDone = function () {\n if (typeof _component_ === \"undefined\") {\n throw new Error(\"componentDone() has lost its context\");\n }\n if (typeof _component_.body === \"undefined\") {\n throw new Error(\"The component has no body\");\n }\n\n (async () => {\n await _component_.createViewInstance();\n await _component_.createControllerInstance();\n await _component_.createEffectInstance();\n })()\n .catch((e: any) => {\n throw new Error(`Unknown error ${e}.`);\n });\n\n logger.debug(`Trying to run component helpers for ${_component_.name}...`);\n try {\n _component_.runComponentHelpers();\n logger.debug(`Component helpers for ${_component_.name} executed.`);\n } catch (e: any) {\n logger.debug(`Component helpers for ${_component_.name} could not be executed.`);\n throw Error(e);\n }\n\n _component_.subcomponents = _component_.__buildSubComponents__();\n\n _component_._bindroute_();\n if (isBrowser) {\n (_component_.body as HTMLElement).setAttribute(\"loaded\", \"true\");\n }\n };\n\n return new Promise(function (resolve, reject) {\n try {\n resolve(componentDone.call(_component_));\n } catch (e: any) {\n reject(new Error(e));\n }\n });\n\n }\n\n hostElements(tagFilter: string): (IQCObjectsElement | HTMLElement | IQCObjectsShadowedElement)[] {\n const _component_ = this;\n let elementList: (IQCObjectsElement | HTMLElement | IQCObjectsShadowedElement)[] = [];\n if (isBrowser) {\n elementList = (_component_.shadowed && (typeof _component_.shadowRoot !== \"undefined\")) ? (\n _component_.shadowRoot.subelements(tagFilter) as IQCObjectsShadowedElement[]\n ) : (\n (_component_.body as IQCObjectsElement).subelements(tagFilter)\n );\n\n }\n return elementList;\n }\n\n get subtags(): (HTMLElement | IQCObjectsElement | IQCObjectsShadowedElement)[] {\n const _component_ = this;\n const tagFilter = _tag_filter_;\n return _component_.hostElements(tagFilter);\n }\n\n get bodyAttributes():any {\n const _component_ = this;\n const c = _component_.body;\n return (isBrowser) ? ([...(c as HTMLElement).getAttributeNames()].map(a => { return { [a]: (c as HTMLElement).getAttribute(a) }; }).reduce((accumulator, colData) => { return Object.assign(accumulator, colData); })) : ({});\n }\n\n get dataAttributes():any {\n const _component_ = this;\n const c = _component_.body;\n return (isBrowser) ? ([{}].concat([...(c as HTMLElement).getAttributeNames()].filter(n => n.startsWith(\"data-\")).map(a => { return { [a.split(\"-\")[1]]: (c as HTMLElement).getAttribute(a) }; })).reduce((accumulator, colData) => { return Object.assign(accumulator, colData); })) : ({});\n }\n\n __buildSubComponents__(rebuildObjects = false): any {\n const _component_: Component = this as Component;\n let elementList = _component_.subtags;\n if (!rebuildObjects) {\n elementList = (elementList as HTMLElement[]).filter((t: HTMLElement) => t.getAttribute(\"loaded\") !== \"true\") as unknown[] as IQCObjectsElement[];\n }\n if ((typeof _component_ !== \"undefined\") || (_component_ as Component).subcomponents.length < 1) {\n _component_.subcomponents = _buildComponentsFromElements_(elementList as HTMLElement[], _component_);\n }\n return _component_.subcomponents;\n }\n\n fail(standardResponse: { error: any; component: Component; }): Promise<{ error: any; component: Component; }> {\n const _ret_ = new Promise<{ error: any; component: Component; }>((resolve, reject) => {\n if (typeof standardResponse !== \"undefined\") {\n const { error, component } = standardResponse;\n resolve({ error, component });\n } else {\n reject(new Error(\" Unknown error.\"));\n }\n });\n return _ret_;\n }\n\n set(key: string, value: any):void {\n this[key] = value;\n }\n\n get(key: string, _defaultValue?: string): any {\n return this[key] || _defaultValue;\n }\n\n feedComponent(): Promise {\n const _component_ = this;\n logger.debug(`[Component][${this.name}][feedComponent] start feeding component...`);\n const _feedComponent_InBrowser = function (_component_: Component): any {\n if (typeof _component_.container === \"undefined\" && typeof _component_.body === \"undefined\") {\n logger.warn(\"COMPONENT {{NAME}} has an undefined container and body\".replace(\"{{NAME}}\", _component_.name));\n return;\n }\n const container = (typeof _component_.container === \"undefined\" || _component_.container === null) ? (_component_.body) : (_component_.container);\n const parsedAssignmentText = _component_.parsedAssignmentText;\n _component_.innerHTML = parsedAssignmentText;\n if (_component_.shadowed) {\n logger.debug(\"COMPONENT {{NAME}} is shadowed\".replace(\"{{NAME}}\", _component_.name));\n logger.debug(\"Preparing slots for Shadowed COMPONENT {{NAME}}\".replace(\"{{NAME}}\", _component_.name));\n const tmp_shadowContainer = _DOMCreateElement(\"div\");\n container.subelements(\"[slot]\").map(\n (c: { parentElement: any; }): any => {\n if (c.parentElement === container) {\n tmp_shadowContainer.appendChild(c as any);\n }\n return c;\n });\n logger.debug(\"Creating shadowedContainer for COMPONENT {{NAME}}\".replace(\"{{NAME}}\", _component_.name));\n const shadowContainer = _DOMCreateElement(\"div\");\n shadowContainer.classList.add(\"shadowHost\");\n try {\n _component_.shadowRoot = shadowContainer.attachShadow({\n mode: \"open\"\n }) as IQCObjectsShadowedElement;\n } catch (e: any) {\n logger.debug(`An error ocurred: ${e}.`);\n try {\n logger.debug(\"Shadowed COMPONENT {{NAME}} is repeated\".replace(\"{{NAME}}\", _component_.name));\n _component_.shadowRoot = shadowContainer.shadowRoot as IQCObjectsShadowedElement;\n } catch (e: any) {\n logger.debug(`An error ocurred: ${e}.`);\n logger.warn(\"Shadowed COMPONENT {{NAME}} is not allowed on this browser\".replace(\"{{NAME}}\", _component_.name));\n }\n }\n if (typeof _component_.shadowRoot !== \"undefined\" && _component_.shadowRoot !== null) {\n if (_component_.reload) {\n logger.debug(\"FORCED RELOADING OF CONTAINER FOR Shadowed COMPONENT {{NAME}}\".replace(\"{{NAME}}\", _component_.name));\n if (shadowContainer !== null && shadowContainer.shadowRoot !== null) {\n shadowContainer.shadowRoot.innerHTML = _component_.innerHTML;\n }\n } else {\n tmp_shadowContainer.innerHTML = _component_.parseTemplate(tmp_shadowContainer.innerHTML);\n logger.debug(\"ADDING Shadowed COMPONENT {{NAME}} \".replace(\"{{NAME}}\", _component_.name));\n if (shadowContainer !== null && shadowContainer.shadowRoot !== null) {\n shadowContainer.shadowRoot.innerHTML += _component_.innerHTML;\n }\n }\n logger.debug(\"ADDING Slots to Shadowed COMPONENT {{NAME}} \".replace(\"{{NAME}}\", _component_.name));\n shadowContainer.innerHTML += tmp_shadowContainer.innerHTML;\n logger.debug(\"APPENDING Shadowed COMPONENT {{NAME}} to Container \".replace(\"{{NAME}}\", _component_.name));\n const qs = container.querySelector(\".shadowHost\");\n if (!(typeof qs !== \"undefined\" && qs !== null)) {\n container.appendChild(shadowContainer);\n } else {\n logger.debug(\"Shadowed Container for COMPONENT {{NAME}} is already present in the tree \".replace(\"{{NAME}}\", _component_.name));\n if (_component_.shadowRoot !== null && shadowContainer.shadowRoot !== null) {\n _component_.shadowRoot.innerHTML = shadowContainer.shadowRoot.innerHTML;\n }\n }\n } else {\n logger.warn(\"Shadowed COMPONENT {{NAME}} is bad configured\".replace(\"{{NAME}}\", _component_.name));\n }\n } else {\n if (_component_.reload) {\n logger.debug(\"FORCED RELOADING OF CONTAINER FOR COMPONENT {{NAME}}\".replace(\"{{NAME}}\", _component_.name));\n container.innerHTML = _component_.innerHTML;\n } else if (container && _component_) {\n logger.debug(\"ADDING COMPONENT {{NAME}} \".replace(\"{{NAME}}\", _component_.name));\n container.innerHTML += _component_.innerHTML;\n } else {\n logger.warn(\"COMPONENT {{NAME}} is not added to the DOM\".replace(\"{{NAME}}\", _component_.name));\n }\n }\n\n };\n\n const _feedComponent_InNode = function (_component_: Component): any {\n const parsedAssignmentText = _component_.parsedAssignmentText;\n _component_.innerHTML = parsedAssignmentText;\n };\n\n let _ret_;\n if (!is_a(_component_, \"Component\")) {\n logger.warn(\"Trying to feed a non component object\");\n return Promise.reject(new Error(`Trying to feed a non component object ${typeof _component_}`));\n }\n return new Promise((resolve, reject) => {\n if (isBrowser) {\n try {\n _ret_ = _feedComponent_InBrowser(_component_);\n resolve(_ret_);\n } catch (e: any) {\n reject(new Error(e));\n }\n } else {\n try {\n _ret_ = _feedComponent_InNode(_component_);\n resolve(_ret_);\n } catch (e: any) {\n reject(new Error(e));\n }\n\n }\n\n });\n }\n\n rebuild(): Promise<{ request?: XMLHttpRequest, component: Component }> {\n const _component = this as Component;\n var _promise = new Promise<{ request?: XMLHttpRequest, component: Component }>(function (resolve, reject) {\n if (typeof _component === \"undefined\" || _component === null) {\n reject(new Error(\"Component is undefined\"));\n }\n if (isQCObjects_Object(_component) && is_a(_component, \"Component\")) {\n switch (true) {\n case (_component.get(\"tplsource\") === \"none\"):\n logger.debug(\"Component \" + _component.name + \" has specified template-source=none, so no template load was done\");\n var standardResponse = {\n request: undefined,\n component: _component\n };\n _component.__done__().then(function () {\n if (typeof _component.done === \"function\") {\n _component.done.call(_component, standardResponse)\n .catch((e: any) => {\n logger.debug(`It was an error while calling done() in ${_component.name}: ${e}`);\n });\n }\n resolve.call(_promise, standardResponse);\n }, function () {\n reject.call(_promise, standardResponse);\n });\n break;\n case (_component.get(\"tplsource\") === \"inline\"):\n logger.debug(\"Component \" + _component.name + \" has specified template-source=inline, so it is assumed that template is already declared\");\n (async (_component) => {\n await _component.feedComponent.bind(_component)();\n })(_component)\n .catch((e: any) => {\n logger.debug(`It was not possible to feed the component ${_component.name}: ${e}`);\n });\n var standardResponse = {\n request: undefined,\n component: _component\n };\n _component.__done__().then(async () => {\n if (typeof _component.done === \"function\") {\n await _component.done(standardResponse);\n }\n resolve.call(_promise, standardResponse);\n }, function () {\n reject.call(_promise, standardResponse);\n });\n break;\n case (_component.get(\"tplsource\") === \"default\" &&\n _component.get(\"templateURI\") !== \"\"):\n _component.set(\"url\", _component.get(\"basePath\") + _component.get(\"templateURI\"));\n (componentLoader(_component, false))?.then(\n function (standardResponse: any) {\n resolve.call(_promise, standardResponse);\n },\n function (standardResponse: any) {\n reject.call(_promise, standardResponse);\n });\n break;\n case (_component.get(\"tplsource\") === \"external\" &&\n _component.get(\"templateURI\") !== \"\"):\n _component.set(\"url\", _component.get(\"templateURI\"));\n (componentLoader(_component, false)).then(\n function (standardResponse: any) {\n resolve.call(_promise, standardResponse);\n },\n function (standardResponse: any) {\n reject.call(_promise, standardResponse);\n });\n break;\n case _component.get(\"tplsource\") === \"default\" && _component.get(\"templateURI\", \"\") === \"\":\n logger.debug(`Component ${_component.name} template-source is ${_component.get(\"tplsource\")} and no templateURI is present`);\n reject.call(_promise, `Component ${_component.name} template-source is ${_component.get(\"tplsource\")} and no templateURI is present`);\n break;\n default:\n logger.debug(\"Component \" + _component.name + \" will not be rebuilt because no templateURI is present\");\n reject.call(_promise, {\n request: null,\n component: _component\n });\n break;\n }\n\n }\n });\n return _promise;\n }\n\n Cast(oClass: any): any {\n /* Cast method for components has been deprecated. Don't use this method, it is available only for compatibility purposes */\n const o = _methods_(oClass).map((m): any => (m as Function).name.replace(/bound /g, \"\")).map(m => {\n return {\n [m]: oClass[m].bind(this)\n };\n }).reduce((c, p) => Object.assign(c, p), {});\n return _Cast(this, o);\n }\n\n route():Promise {\n return (this.constructor as typeof Component).route();\n }\n\n static route():Promise {\n const componentClass = this; /* is can be class or object */\n let _route_promise_;\n const isValidInstance = !!((isQCObjects_Object(componentClass) && is_a(componentClass, \"Component\")));\n const __route__ = function (componentList: any[]) {\n const _componentNames_: any[] = [];\n const _promises_ = componentList.filter(function (rc: any) {\n return typeof rc !== \"undefined\";\n }).map(function (rc: Component): Promise {\n if (typeof rc.name !== \"undefined\") {\n _componentNames_.push(rc.name);\n } else {\n throw new Error(__getType__(rc) + \" does not have a name\");\n }\n return new Promise(function (resolve, reject) {\n if (typeof rc !== \"undefined\" && !!rc._reroute_) {\n rc._reroute_()\n .then(function () {\n rc.reload = true;\n rc.rebuild()\n .then(() => {\n resolve();\n })\n .catch((e: any) => {\n logger.debug(`Error ${e}`);\n });\n return;\n })\n .then(function () {\n if (Object.hasOwn(rc, \"subcomponents\") &&\n typeof rc.subcomponents !== \"undefined\" &&\n rc.subcomponents.length > 0\n ) {\n logger.debug(\"LOOKING FOR ROUTINGS IN SUBCOMPONENTS FOR: \" + rc.name);\n return __route__.call(rc, rc.subcomponents);\n } else {\n logger.debug(\"No subcomponents to look for routings in: \" + rc.name);\n if (rc.subtags.length > 0) {\n rc.subcomponents = rc.__buildSubComponents__(true);\n }\n resolve();\n }\n }).catch((e: any) => {\n logger.debug(`Error: ${e}`);\n });\n } else if (typeof rc !== \"undefined\") {\n reject(new Error(\"Component \" + rc.name + \" is not an instance of Component\"));\n }\n return;\n });\n });\n return Promise.all(_promises_)\n .then(function () {\n logger.debug(\"ROUTING COMPLETED FOR \" + _componentNames_.join(\", \"));\n }).catch(function (err) {\n logger.warn(\"ROUTING FAILED FOR \" + _componentNames_.join(\", \") + \": \" + err);\n });\n };\n if (isValidInstance || !!componentsStack) {\n if (isValidInstance) {\n logger.debug(\"loading routings for instance \" + componentClass.name);\n }\n _route_promise_ = __route__.call(componentClass, (isValidInstance) ? (componentClass.subcomponents) : (componentsStack));\n } else {\n logger.debug(\"An undetermined result expected if load routings. So will not be loaded this time.\");\n throw Error(\"There is no valid instance and no components stack available to apply rountings\");\n }\n return _route_promise_;\n }\n\n fullscreen():void {\n if (isBrowser) {\n const elem: HTMLElement = this.body as HTMLElement;\n if (elem.requestFullscreen) {\n elem.requestFullscreen()\n .catch((e: any) => {\n throw new Error(`An error ocurred when requesting fullscreen: ${e}`);\n });\n } else if ((elem as any).mozRequestFullScreen) {\n /* Firefox */\n (elem as any).mozRequestFullScreen();\n } else if ((elem as any).webkitRequestFullscreen) {\n /* Chrome, Safari & Opera */\n (elem as any).webkitRequestFullscreen();\n } else if ((elem as any).msRequestFullscreen) {\n /* IE/Edge */\n (elem as any).msRequestFullscreen();\n }\n } else {\n // not yet implemented.\n }\n }\n\n closefullscreen():void {\n if (isBrowser) {\n if (document.exitFullscreen) {\n document.exitFullscreen()\n .catch((e: any) => { throw new Error(`An error ocurred when trying to exit fullscrenn ${e}.`); });\n } else if ((document as any).mozCancelFullScreen) {\n (document as any).mozCancelFullScreen();\n } else if ((document as any).webkitExitFullscreen) {\n (document as any).webkitExitFullscreen();\n } else if ((document as any).msExitFullscreen) {\n (document as any).msExitFullscreen();\n }\n } else {\n // noy yet implemented.\n }\n }\n\n _generateRoutingPaths(componentBody: TBody):Promise {\n const component = this;\n return new Promise(function (resolve) {\n if (isBrowser) {\n if (__valid_routing_way__(component.validRoutingWays, component.routingWay || \"\")) {\n if (typeof componentBody !== \"undefined\") {\n component.innerHTML = (componentBody as HTMLElement)?.innerHTML;\n component.routingNodes = (componentBody as IQCObjectsElement)?.subelements(\"routing\");\n component.routings = [];\n component.routingNodes.map((routingNode): any => {\n const attributeNames = (routingNode as HTMLElement).getAttributeNames();\n const routing = {} as TComponentRouting;\n attributeNames.map((attributeName: any, a: string | number): any => {\n (routing as any)[attributeNames[a as any]] = (routingNode as HTMLElement).getAttribute(attributeNames[a as any]);\n return attributeName;\n });\n component.routings.push(routing as never);\n if (!component.routingPaths) {\n component.routingPaths = [];\n }\n if (!component.routingPaths.includes(routing.path as never)) {\n component.routingPaths.push(routing.path as never);\n }\n if (!_top.global.get(\"routingPaths\")) {\n _top.global.set(\"routingPaths\", []);\n }\n if (!_top.global.get(\"routingPaths\").includes(routing.path)) {\n _top.global.get(\"routingPaths\").push(routing.path);\n }\n return routingNode;\n });\n }\n }\n } else {\n // not yet implemented.\n }\n resolve();\n\n });\n }\n\n parseTemplate(template: any): string {\n const _self = this;\n let _parsedAssignmentText: string;\n const value = template;\n if (Object.hasOwn(_self, \"templateHandler\")) {\n const templateHandlerName = _self.templateHandler;\n logger.debug(`[Component][${this.name}][parseTemplate] Attempting to use ${templateHandlerName} ...`);\n const templateHandlerClass = ClassFactory(templateHandlerName);\n const templateInstance = New(templateHandlerClass, {\n component: _self,\n template: value\n });\n templateInstance.component = _self;\n let selfData = _self.data;\n if (Object.hasOwn(_self, \"assignRoutingParams\") && _self.assignRoutingParams) {\n try {\n selfData = Object.assign(selfData, _self.routingParams);\n } catch (e: any) {\n logger.debug(`An error ocurred: ${e}.`);\n logger.debug(\"[parseTemplate] it was not possible to assign the routing params to the template\");\n }\n }\n _parsedAssignmentText = templateInstance.assign(selfData);\n } else {\n logger.debug(`[Component][${this.name}][parseTemplate] No value for templateHandler. Using raw content...`);\n _parsedAssignmentText = value;\n }\n return _parsedAssignmentText;\n }\n\n _reroute_(): Promise {\n /* This method set the selected routing and makes the switch to the templateURI */\n const rc = this;\n return new Promise(function (resolve) {\n if (isBrowser) {\n if (__valid_routing_way__(rc.validRoutingWays, rc.routingWay || \"\")) {\n rc.routingPath = (location as any)[rc.routingWay as string];\n rc.routingSelected.map((routing: TComponentRouting,): TComponentRouting => {\n const componentURI = ComponentURI({\n \"COMPONENTS_BASE_PATH\": CONFIG.get(\"componentsBasePath\"),\n \"COMPONENT_NAME\": routing.name.toString(),\n \"TPLEXTENSION\": (Object.hasOwn(routing, \"tplextension\")) ? (routing.tplextension || \"\") : (rc.tplextension),\n \"TPL_SOURCE\": \"default\" /* here is always default in order to get the right uri */\n });\n rc.templateURI = componentURI;\n return routing;\n });\n if (rc.routingSelected.length > 0) {\n rc.template = \"\";\n if (typeof rc.body !== \"undefined\" && rc.body !== null) {\n (rc.body as HTMLElement).innerHTML = \"\";\n }\n }\n }\n }\n resolve(rc);\n\n });\n }\n\n lazyLoadImages() {\n if (isBrowser) {\n const component = this;\n const _componentRoot = component.componentRoot as IQCObjectsShadowedElement;\n if (typeof _componentRoot !== \"undefined\" && _componentRoot !== null) {\n const _imgLazyLoaded = [..._componentRoot.subelements(\"img[lazy-src]\")];\n const _lazyLoadImages = function (image: Element | HTMLElement) {\n image.setAttribute(\"src\", image.getAttribute(\"lazy-src\")?.toString() as string);\n (image as HTMLImageElement).onload = () => {\n image.removeAttribute(\"lazy-src\");\n };\n };\n if (\"IntersectionObserver\" in window) {\n const observer = new IntersectionObserver((items, observer) => {\n items.forEach((item) => {\n if (item.isIntersecting) {\n _lazyLoadImages(item.target);\n observer.unobserve(item.target);\n }\n });\n });\n _imgLazyLoaded.map(function (img) {\n return observer.observe(img as unknown as HTMLImageElement);\n });\n } else {\n (_imgLazyLoaded as (HTMLElement | Element)[]).map(_lazyLoadImages);\n }\n }\n } else {\n // not yet implemented\n }\n return null;\n }\n\n applyTransitionEffect(effectClassName: string):void {\n const _Effect = ClassFactory(effectClassName);\n if (typeof _Effect === \"undefined\") {\n throw Error(`${effectClassName} not found.`);\n }\n if (typeof _Effect !== \"undefined\" && is_a(_Effect, \"TransitionEffect\")) {\n this.effect = New(_Effect, {\n component: this\n });\n (this.effect as any)?.apply((this.effect as any)?.defaultParams);\n } else {\n logger.debug(`${effectClassName} is ${__getType__(_Effect)} but is not a TransitionEffect`);\n }\n }\n\n applyObserveTransitionEffect(effectClassName: any):void {\n if (isBrowser) {\n const component = this;\n const _componentRoot = component.componentRoot;\n const _applyEffect_ = function () {\n component.applyTransitionEffect(effectClassName);\n };\n if (\"IntersectionObserver\" in window) {\n const observer = new IntersectionObserver((items, observer) => {\n items.forEach((item) => {\n if (item.isIntersecting) {\n _applyEffect_();\n observer.unobserve(item.target);\n }\n });\n });\n observer.observe(_componentRoot as Element);\n } else {\n _applyEffect_();\n }\n } else {\n // not yet implemented\n }\n\n }\n\n get componentRoot(): TBody {\n return (this.shadowed) ? (this.shadowRoot) : (this.body);\n }\n\n scrollIntoHash():void {\n if (isBrowser) {\n const component = this;\n if (document.location.hash !== \"\") {\n const _componentRoot = component.componentRoot;\n ((_componentRoot as IQCObjectsShadowedElement)?.subelements(document.location.hash) as unknown as Element[]).map(\n (element: Element): any => {\n if (typeof element.scrollIntoView === \"function\") {\n element.scrollIntoView(\n CONFIG.get(\"scrollIntoHash\", {\n behavior: \"auto\",\n block: \"top\",\n inline: \"top\"\n })\n );\n }\n return element;\n }\n );\n }\n } else {\n // not yet implemented\n }\n }\n\n i18n_translate():void {\n if (isBrowser) {\n if (CONFIG.get(\"use_i18n\")) {\n const component = this;\n const _componentRoot = component.componentRoot as IQCObjectsShadowedElement;\n const lang1 = CONFIG.get(\"lang\", \"en\");\n const lang2 = navigator.language.slice(0, 2);\n const i18n = _top.global.get(\"i18n\");\n if ((lang1 !== lang2) && (typeof i18n === \"object\" && Object.hasOwn(i18n, \"messages\"))) {\n const callback_i18n = () => {\n return new Promise(function (resolve) {\n const messages = i18n.messages.filter(function (message: any) {\n return Object.hasOwn(message, lang1) && Object.hasOwn(message, lang2);\n });\n (_componentRoot?.subelements(\"ul,li,h1,h2,h3,a,b,p,input,textarea,summary,details,option,component\") as HTMLElement[])\n .map((element: HTMLElement): HTMLElement => {\n messages.map(function (message: { [x: string]: any; }) {\n let _innerHTML = element.innerHTML;\n _innerHTML = _innerHTML?.replace(new RegExp(`${message[lang1]}`, \"g\"), message[lang2]);\n element.innerHTML = _innerHTML;\n return null;\n });\n return element;\n });\n resolve();\n });\n };\n callback_i18n.call(component).then(function () {\n logger.debug(\"i18n loaded for component: \" + component.name);\n }).catch((e: any) => { throw new Error(`An error ocurred when parsing i18n: ${e}.`); });\n\n }\n }\n } else {\n // not yet implemented\n }\n }\n\n addComponentHelper(componentHelper: any):void {\n const component = this;\n component._componentHelpers.push(componentHelper as never);\n }\n\n runComponentHelpers():void {\n if (isBrowser) {\n const component = this;\n let __component_helpers__ = [];\n /*\n * BEGIN use i18n translation\n */\n __component_helpers__.push(component.i18n_translate.bind(component));\n /*\n * END use i18n translation\n */\n\n /*\n * BEGIN component scrollIntoHash\n */\n __component_helpers__.push(component.scrollIntoHash.bind(component));\n /*\n * END component scrollIntoHash\n */\n\n /*\n * BEGIN component images lazy-load\n */\n\n __component_helpers__.push(component.lazyLoadImages.bind(component));\n\n /*\n * END component images lazy-load\n */\n\n __component_helpers__ = __component_helpers__.concat(component._componentHelpers);\n\n __component_helpers__.map(\n (_component_helper_): any => {\n logger.debug(`Executing ${_component_helper_.name} as component helper for ${component.name}...`);\n _component_helper_();\n return _component_helper_;\n }\n );\n\n } else {\n // not yet implemented\n }\n\n }\n\n}\n\nPackage(\"com.qcobjects\", [\n Component\n]);\n\n(_methods_)(ClassFactory(\"Component\")).map((__c__): any => {\n (_protected_code_)(__c__);\n return __c__;\n});\n", "import { IQCObjectsElement, TComponentURIParams } from \"./types/global\";\nimport { Class } from \"./Class\";\nimport { ClassFactory } from \"./ClassFactory\";\nimport { Component } from \"./Component\";\nimport { CONFIG } from \"./CONFIG\";\nimport { _DOMCreateElement } from \"./DOMCreateElement\";\nimport { __getType__ } from \"./getType\";\nimport { logger } from \"./Logger\";\nimport { New } from \"./New\";\nimport { Package } from \"./Package\";\nimport { isBrowser } from \"./platform\";\nimport { _tag_filter_ } from \"./tag_filter\";\n\n/**\n * Returns a standarized uri for a component\n * @example\n * templateURI = ComponentURI({'COMPONENTS_BASE_PATH':'','COMPONENT_NAME':'','TPLEXTENSION':'','TPL_SOURCE':''})\n * @author: Jean Machuca \n * @param params an object with the params to build the uri path\n */\nexport const ComponentURI = ({ TPL_SOURCE, COMPONENTS_BASE_PATH, COMPONENT_NAME, TPLEXTENSION }:TComponentURIParams):string => {\n const templateURI = (TPL_SOURCE === \"default\") ? (`${COMPONENTS_BASE_PATH}${COMPONENT_NAME}.${TPLEXTENSION}`) : (\"\");\n return templateURI;\n};\n\nexport const _buildComponentFromElement_ = (element: Element, __parent__: any):Component => {\n const __shadowed_not_set = (element.getAttribute(\"shadowed\") === null);\n const __tplsource_attr_not_set = (element.getAttribute(\"template-source\") === null);\n const shadowed = (element.getAttribute(\"shadowed\") === \"true\");\n const __cached_not_set = (element.getAttribute(\"cached\") === null);\n const cached = (element.getAttribute(\"cached\") === \"true\");\n let tplextension = (typeof CONFIG.get(\"tplextension\") !== \"undefined\") ? (CONFIG.get(\"tplextension\")) : (\"html\");\n tplextension = (element.getAttribute(\"tplextension\") !== null) ? (element.getAttribute(\"tplextension\")) : (tplextension);\n let _componentName = element.getAttribute(\"name\");\n const _componentClassName = (element.getAttribute(\"componentClass\") !== null) ? (element.getAttribute(\"componentClass\")) : (\"Component\");\n const __componentClassName = (CONFIG.get(\"preserveComponentBodyTag\")) ? (\n (_componentName !== null) ? (\"com.qcobjects.components.\" + _componentName + \".ComponentBody\") : (\"com.qcobjects.components.ComponentBody\")\n ) : (_componentClassName);\n _componentName = (_componentName !== null) ? (_componentName) : (\n (ClassFactory(__componentClassName as string) &&\n typeof (ClassFactory(__componentClassName as string) as unknown as typeof Component).name !== \"undefined\"\n ) ? (\n (ClassFactory(__componentClassName as string) as unknown as Component).name\n ) : (\"\")\n );\n const __classDefinition = ClassFactory(__componentClassName as string) as Component;\n const __tplsource_prop_set = !!((__componentClassName !== \"Component\" && ((typeof __classDefinition !== \"undefined\" && typeof __classDefinition.tplsource === \"string\") && __classDefinition.tplsource !== \"\")));\n const tplsource = (__tplsource_attr_not_set && __tplsource_prop_set) ? (__classDefinition.tplsource) : ((__tplsource_attr_not_set) ? (\"default\") : (element.getAttribute(\"template-source\")));\n logger.debug(`template source for ${_componentName} is ${tplsource} `);\n logger.debug(`type for ${_componentName} is ${__getType__(__classDefinition)} `);\n\n const componentURI: string = ComponentURI({\n \"COMPONENTS_BASE_PATH\": CONFIG.get(\"componentsBasePath\"),\n \"COMPONENT_NAME\": _componentName ,\n \"TPLEXTENSION\": tplextension,\n \"TPL_SOURCE\": tplsource as string\n });\n if (CONFIG.get(\"preserveComponentBodyTag\")) {\n Package((_componentName !== \"\") ? (\"com.qcobjects.components.\" + _componentName + \"\") : (\"com.qcobjects.components\"), [\n Class(\"ComponentBody\", Component, {\n name: _componentName,\n tplsource,\n tplextension,\n reload: true\n })\n ]);\n }\n\n const __create_component_instance_ = function ():Component {\n const __shadowed = (__shadowed_not_set) ? ((__classDefinition && __classDefinition.shadowed) || Component.shadowed) : (shadowed);\n const __definition = {\n __parent__,\n name: _componentName,\n cached: (__cached_not_set) ? (Component.cached) : (cached),\n shadowed: __shadowed,\n tplextension,\n body: (CONFIG.get(\"preserveComponentBodyTag\")) ? (_DOMCreateElement(\"componentBody\")) : (element),\n templateURI: componentURI,\n tplsource\n };\n if (typeof _componentName === \"undefined\" || _componentName === \"\" || _componentName === null) {\n /* this allows to use the original property defined\n in the component definition if it is not present in the tag */\n delete (__definition as any).name;\n }\n if (componentURI === \"\") {\n /* this allows to use the original property defined\n in the component definition if it is not present in the tag */\n delete (__definition as any).templateURI;\n }\n const newComponent = New(__classDefinition, __definition) as Component;\n\n if (CONFIG.get(\"preserveComponentBodyTag\")) {\n if (typeof newComponent !== \"undefined\") {\n element.append(newComponent.body as string | Node);\n }\n }\n return newComponent;\n };\n const newComponent = __create_component_instance_();\n return newComponent;\n};\n\nexport const _buildComponentsFromElements_ = (elements: HTMLElement[], __parent__: Component | null):Component[] => {\n let componentsBuiltWith:Component[] = [];\n if (isBrowser) {\n componentsBuiltWith = elements.map(\n function (element: any) {\n return _buildComponentFromElement_(element, __parent__);\n }\n );\n } else {\n logger.debug(\"[_buildComponentsFromElements_] not implemented for Non-Browser environments\");\n }\n return componentsBuiltWith;\n};\n\nexport const buildComponents = (element:HTMLElement):Component[] => {\n const tagFilter = _tag_filter_;\n const elements = (element as unknown as IQCObjectsElement).subelements(tagFilter) as HTMLElement[];\n return _buildComponentsFromElements_(elements, null);\n};", "import { _basePath_ } from \"./basePath\";\nimport { _Crypt } from \"./Crypt\";\nimport { _domain_ } from \"./domain\";\nimport { InheritClass } from \"./InheritClass\";\nimport { logger } from \"./Logger\";\nimport { Package } from \"./Package\";\nimport { _secretKey } from \"./secretKey\";\nimport { CONFIG } from \"./CONFIG\";\nimport { IJSONService, IService, TServiceDoneResponse, TServiceStandardResponse } from \"./types/global\";\n\nexport class Service extends InheritClass implements IService{\n options!: object;\n withCredentials!: boolean;\n useHTTP2: any;\n // eslint-disable-next-line no-unused-vars\n mockup({ request, service }: TServiceStandardResponse): void {\n throw new Error(\"Method not implemented.\");\n }\n name!: string;\n responseHeaders: any;\n // eslint-disable-next-line no-unused-vars\n local({ request, service }: TServiceStandardResponse): void {\n throw new Error(\"Method not implemented.\");\n }\n kind = \"rest\";\n /* it can be rest, mockup, local */\n domain:string = _domain_;\n basePath:string = _basePath_;\n url = \"\";\n method = \"GET\";\n data = {};\n reload = false;\n cached = false;\n\n headers: any;\n template: unknown;\n \n // eslint-disable-next-line no-unused-vars\n done({ request, service }: TServiceDoneResponse): void {\n throw new Error(\"Method not implemented.\");\n }\n // eslint-disable-next-line no-unused-vars\n fail(...args: any[]): void {\n throw new Error(\"Method not implemented.\");\n }\n\n set(name:string, value:never):void {\n this[name] = value;\n }\n\n get(name:string, _default?:never):any {\n return this[name] as never || _default;\n }\n\n}\n\nexport class JSONService extends Service implements IJSONService{\n method = \"GET\";\n cached = false;\n headers = {\n \"Content-Type\": \"application/json\",\n \"charset\": \"utf-8\"\n };\n\n JSONresponse?:JSON = undefined;\n done(result:TServiceDoneResponse):void {\n logger.debug(\"***** RECEIVED RESPONSE:\");\n logger.debug(result.service.template as string);\n this.JSONresponse = JSON.parse(result.service.template as string);\n }\n\n\n\n}\n\nexport class ConfigService extends JSONService {\n method = \"GET\";\n cached = false;\n configFileName = \"config.json\";\n headers = {\n \"Content-Type\": \"application/json\",\n \"charset\": \"utf-8\"\n };\n\n configLoaded():Promise{\n throw Error (\"Method not implemented.\");\n }\n\n JSONresponse?:JSON = undefined;\n done(result:TServiceDoneResponse):void {\n logger.debug(\"***** CONFIG LOADED:\");\n logger.debug(result.service.template as string);\n this.JSONresponse = JSON.parse(result.service.template as string);\n if (Object.hasOwn(this.JSONresponse as object, \"__encoded__\")) {\n const decodedValue:string = _Crypt.decrypt((this.JSONresponse as any)?.__encoded__, _secretKey);\n this.JSONresponse = JSON.parse(decodedValue);\n }\n const jsonResponse:any = this.JSONresponse;\n Object.keys(jsonResponse as object).map((k:string) => {\n CONFIG.set(k, (jsonResponse as never)[k]);\n return k;\n });\n this.configLoaded().catch((e:any)=>{throw new Error (`An error ocurred: ${e}`);});\n }\n\n fail():void {\n this.configLoaded().catch((e:any)=>{throw new Error (`An error ocurred: ${e}`);});\n }\n\n constructor() {\n super();\n this.set(\"url\", `${this.get(\"basePath\") as string}${this.get(\"configFileName\") as string}` as never);\n }\n}\n\n\nPackage(\"com.qcobjects.api\", [\n Service\n]);\n\nPackage(\"com.qcobjects.api.services\", [\n JSONService\n]);\n\nPackage(\"com.qcobjects.api.config\", [\n ConfigService\n]);\n", "import { IGlobalSettings } from \"./types/global\";\nimport { CONFIG } from \"./CONFIG\";\nimport { InheritClass } from \"./InheritClass\";\nimport { Logger, logger } from \"./Logger\";\nimport { Package } from \"./Package\";\nimport { isBrowser } from \"./platform\";\nimport { serviceLoader } from \"./serviceLoader\";\nimport { _top, buildComponentsStack, configService, setConfigService } from \"./top\";\nimport { ConfigService } from \"./Service\";\n\nexport class GlobalSettings extends InheritClass implements IGlobalSettings {\n static __start__(): Promise {\n return GlobalSettings.instance.__start__();\n }\n [key: string]: any;\n\n _GLOBAL: any = {};\n private static _instance: GlobalSettings;\n static get instance(): GlobalSettings {\n if (typeof GlobalSettings._instance === \"undefined\") {\n GlobalSettings._instance = new GlobalSettings();\n }\n return GlobalSettings._instance;\n }\n\n protected _logger: Logger = new Logger();\n get logger(): Logger {\n return this._logger;\n }\n\n set logger(value: Logger) {\n this._logger = value;\n }\n\n set(name: string, value: any): void {\n this._GLOBAL[name] = value;\n }\n\n get(name: string, _default?: any): any {\n let _value: any;\n if (typeof this._GLOBAL[name] !== \"undefined\") {\n _value = this._GLOBAL[name];\n } else if (typeof _default !== \"undefined\") {\n _value = _default;\n }\n return _value;\n }\n\n __start__(): Promise {\n const __load__serviceWorker = function () {\n let _promise: Promise | Promise;\n if (isBrowser) {\n _promise = new Promise(function (resolve, reject) {\n if ((\"serviceWorker\" in navigator) &&\n (typeof CONFIG.get(\"serviceWorkerURI\") !== \"undefined\")) {\n CONFIG.set(\"serviceWorkerScope\", CONFIG.get(\"serviceWorkerScope\") ? (CONFIG.get(\"serviceWorkerScope\")) : (\"/\"));\n navigator.serviceWorker.register(CONFIG.get(\"serviceWorkerURI\"), {\n scope: CONFIG.get(\"serviceWorkerScope\")\n })\n .then(function (registration) {\n logger.debug(\"Service Worker Registered\");\n resolve.call(_promise, registration);\n }, function (registration) {\n logger.debug(\"Error registering Service Worker\");\n reject.call(_promise, registration);\n });\n navigator.serviceWorker.ready.then(function (registration) {\n logger.debug(\"Service Worker Ready\");\n resolve.call(_promise, registration);\n }, function (registration) {\n logger.debug(\"Error loading Service Worker\");\n reject.call(_promise, registration);\n });\n }\n });\n } else {\n _promise = Promise.resolve();\n }\n return _promise;\n };\n const _buildComponents = function () {\n return new Promise((resolve) => {\n if (isBrowser) {\n logger.debug(\"Starting to building components\");\n try {\n buildComponentsStack();\n } catch (e: any) {\n throw Error(`Something went wrong trying to start components tree: ${e.message}`);\n }\n logger.debug(\"Initializing the service worker\");\n __load__serviceWorker.call(_top)\n .catch(function (e) {\n logger.debug(`error loading the service worker ${e}`);\n });\n }\n resolve();\n });\n };\n\n return new Promise((resolve) => {\n logger.debug(\"Starting to load the config settings...\");\n if (CONFIG.get(\"useConfigService\", false)) {\n logger.debug(\"Loading settings using local configuration file...\");\n setConfigService(new ConfigService());\n configService.configLoaded = _buildComponents;\n serviceLoader(configService)\n ?.then((standardResponse: any) => {\n resolve(standardResponse);\n })\n ?.catch((e: any) => { throw new Error(`An error ocurred while trying to load ${configService.url}: ${e}`); });\n } else {\n logger.debug(\"Starting to load the components...\");\n _buildComponents.call(this)\n .then(() => {\n resolve({});\n })\n .catch((e: any) => { throw new Error(`An error ocurred while trying to build the components stack. ${e}`); });\n }\n\n });\n }\n\n}\n\nPackage(\"com.qcobjects\", [\n GlobalSettings\n]);\n", "import { IComplexStorageCache, IComponent, IConfigService, IQCObjectsElement } from \"./types/global\";\nimport { buildComponents } from \"./ComponentFactory\";\nimport { _CastProps } from \"./Cast\";\nimport { GlobalSettings } from \"./globalSettings\";\nimport { Class } from \"./Class\";\nimport { ClassFactory } from \"./ClassFactory\";\nimport { Export } from \"./Export\";\nimport { isBrowser } from \"./platform\";\nimport { _QC_CLASSES, getPackagesNamesList, getPackagesList, getClassesList, getClassesNamesList } from \"./PrimaryCollections\";\nimport { logger } from \"./Logger\";\n\ntype QCObjects = {\n lastCache?:IComplexStorageCache,\n componentsStack:IComponent[],\n Microservice:any,\n Route:any,\n BackendMicroservice:any,\n QCObjectsElement:any,\n QCObjectsShadowedElement:any,\n Logger:any,\n Class:any, \n _Crypt:any, \n TagElements:any, \n DefaultTemplateHandler:any, \n SourceJS:any, \n SourceCSS:any, \n ArrayList:any, \n ArrayCollection:any, \n GlobalSettings:any, \n GLOBAL:any, \n DDO:any, \n CacheController:any, \n ComplexCacheParams:any, \n ComplexStorageCache:any, \n ComponentWidget:any, \n asyncLoad:any, \n RegisterClass:any, \n ComponentURI:any, \n waitUntil:any, \n super:any, \n _DOMCreateElement:any, \n shortCode:any, \n getType:any, \n is_a:any, \n _DataStringify:any, \n serviceLoader:any, \n componentLoader:any, \n ObjectName:any, \n isQCObjects_Class:any, \n isQCObjects_Object:any, \n NamespaceRef:any, \n RegisterWidget:any, \n RegisterWidgets:any, \n range:any, \n getDocumentLayout:any, \n Export:any, \n New:any, \n Tag:any, \n Ready:any, \n methods:any, \n // eslint-disable-next-line no-unused-vars\n set:(name:string, value:any) => void, \n // eslint-disable-next-line no-unused-vars\n get:(name:string, _default?:any) => any, \n start:any, \n InheritClass:any, \n Processor:any, \n ComponentParams:any, \n ComponentDoneResponse:any, \n Component:any, \n CONFIG:any, \n ControllerParams:any, \n Controller:any, \n ViewParams:any, \n View:any, \n Service:any, \n JSONService:any, \n ConfigService:any, \n VO:any, \n EffectParams:any, \n Effect:any, \n TransitionEffect:any, \n TimerParams:any, \n Timer:any, \n Toggle:any, \n logger:any, \n sdk:any, \n global:any, \n ClassFactory:any, \n Package:any, \n Import:any,\n _sdk_:any,\n ClassesList:any[], \n PackagesList:any[],\n PackagesNameList:any[],\n ClassesNameList:any[]\n} & typeof self & typeof global ;\n\nexport var _top: QCObjects = (\n (typeof module !== \"undefined\" && typeof module.exports !== \"undefined\" && module.exports) ||\n (typeof global !== \"undefined\" && global) ||\n (typeof globalThis !== \"undefined\" && globalThis) ||\n (typeof window !== \"undefined\" && window) ||\n (typeof self !== \"undefined\" && self !== null && self) ||\n this\n) as QCObjects;\n(_top as any).lastCache = undefined;\nexport let componentsStack:IComponent[] = [];\n\nexport const resetTop = ():void => {\n const globalSettings = GlobalSettings.instance;\n _top = _CastProps(globalSettings, _top, true);\n};\n\nexport const buildComponentsStack = ():void => {\n componentsStack = buildComponents(document as unknown as IQCObjectsElement);\n};\nexport let configService:IConfigService;\nexport const setConfigService = (_configService:IConfigService):void => {\n _top.global.configService = _configService;\n configService = _configService;\n};\n\nexport const set = (name:string, value:any):void => {\n _top[name as never] = value;\n};\n\nexport const get = (name:string, _defaultValue?:any):any => {\n return _top[name as never] || _defaultValue;\n};\n\nresetTop();\n\nconst _define_props = function (_top: any) {\n if (!Object.hasOwn(_top, \"PackagesList\")) {\n Object.defineProperty(_top, \"PackagesList\", {\n // eslint-disable-next-line no-unused-vars\n set:(value) => {\n logger.debug(\"PackagesList is readonly\");\n \n },\n get:():any => {\n return getPackagesList();\n }\n });\n \n }\n \n \n if (!Object.hasOwn(_top, \"PackagesNameList\")) {\n Object.defineProperty(_top, \"PackagesNameList\", {\n // eslint-disable-next-line no-unused-vars\n set:(val) => {\n logger.debug(\"PackagesNameList is readonly\");\n\n },\n get:():any =>{\n return getPackagesNamesList();\n }\n });\n\n }\n\n if (!Object.hasOwn(_top, \"ClassesList\")) {\n Object.defineProperty(_top, \"ClassesList\", {\n // eslint-disable-next-line no-unused-vars\n set:(value) => {\n logger.debug(\"ClassesList is readonly\");\n\n },\n get:(): any => {\n return getClassesList();\n }\n });\n }\n\n if (!Object.hasOwn(_top, \"ClassesNameList\")) {\n Object.defineProperty(_top, \"ClassesNameList\", {\n // eslint-disable-next-line no-unused-vars\n set(value):any {\n logger.debug(\"ClassesNameList is readonly\");\n\n },\n get:(): any => {\n return getClassesNamesList();\n }\n });\n\n }\n\n\n };\n\n\n if (isBrowser) {\n // use of GLOBAL word is deprecated in node.js\n // this is only for compatibility purpose with old versions of QCObjects in browsers\n Class(\"GLOBAL\", (_QC_CLASSES as any).global); // case insensitive for compatibility con old versions;\n Export(ClassFactory(\"GLOBAL\"));\n }\n\n if (isBrowser && typeof window !== \"undefined\") {\n set(\"global\", window);\n } else if (isBrowser && typeof globalThis !== \"undefined\") {\n set(\"global\", globalThis);\n }\n\n _define_props(_top);\n", "import { logger } from \"./Logger\";\nimport { isBrowser } from \"./platform\";\n\nexport let supportsPassive = false;\nexport const captureFalseTouch = ():boolean | { passive: boolean; } => {\n return (supportsPassive) ? ({\n passive: true\n }) : (false);\n};\n\n// Test via a getter in the options object to see if the passive property is accessed\nif (isBrowser) {\n try {\n const opts = Object.defineProperty({}, \"passive\", {\n get() {\n supportsPassive = true;\n return supportsPassive;\n }\n });\n (window as any).addEventListener(\"testPassive\", null, opts);\n (window as any).removeEventListener(\"testPassive\", null, opts);\n } catch (e:any) {\n logger.debug(`An error ocurred: ${e}.`);\n supportsPassive = false;\n }\n\n} else {\n supportsPassive = false;\n}", "import { _protected_code_ } from \"./introspection\";\n\nexport const range = (start: number, stop = 0, step = 1): number[] => {\n if (stop === 0 || typeof stop === \"undefined\") {\n stop = start;\n start = 0;\n }\n return Array.from({\n length: (stop - start) / step + 1\n }, function (_, i) {\n return start + (i * step);\n });\n};\n(_protected_code_)(range);\n\n", "import { logger } from \"./Logger\";\nimport { GlobalProcessor as Processor } from \"./Processor\";\nimport { _top } from \"./top\";\nimport { range } from \"./range\";\nimport { IComponent } from \"./types/global\";\n\n// Set Processors\nexport const setDefaultProcessors = ():void => {\n (function (_top):void {\n\n const mapper = (componentInstance:IComponent, componentName:string, valueName:string):string => {\n /*\n * Mapper processor\n * @usage\n * $mapper(,)\n *\n * Where componentName is the name of the component (same value as in attribute tag name) without quotes\n * and valueName is the name of the variable that contains the value to map, it can be either a property of\n * the component instance, the data object or a global value\n */\n \n if (typeof componentInstance === \"undefined\" || componentInstance === null) {\n throw Error(`mapper.${componentName}.${valueName} does not have a component instance or it is null.`);\n }\n const globalValue = _top.global.get(valueName);\n const componentValue = componentInstance.get(valueName);\n const dataValue = componentInstance.data[valueName];\n const list = (typeof dataValue !== \"undefined\") ? (dataValue) : ((typeof componentValue !== \"undefined\") ? (componentValue) : (globalValue));\n let listItems = \"\";\n if (typeof list !== \"undefined\" && typeof list.map !== \"undefined\") {\n listItems = list.map(function (element:HTMLElement) {\n const dataItems = [...Object.keys(element)].map(k => ` data-${k}=\"${(typeof (element as any)[k] !== \"undefined\" && (element as any)[k] !== null) ? ((element as any)[k].toString()) : (\"\")}\"`).join(\"\");\n return ``;\n }).join(\"\");\n } else {\n logger.debug(`${componentName}.${valueName} does not have a map property`);\n }\n return listItems;\n };\n Processor.setProcessor(mapper);\n \n const layout = function (componentInstance:IComponent, layoutname:string, cssfile:string):string {\n /*\n * Layout processor\n * @usage\n * $layout(, )\n * Where layoutname can be \"portrait\" or \"landscape\" without quotes\n * cssfile is the uri for the css file to import\n */\n \n const layout_portrait = `\n /* CSS Document for Mobile Imports */\n @import url(\"${cssfile}\") (orientation:portrait);\n @import url(\"${cssfile}\") (max-width:460px);\n @import url(\"${cssfile}\") (aspect-ratio: 9/16);\n @import url(\"${cssfile}\") (aspect-ratio: 10/16);\n @import url(\"${cssfile}\") (aspect-ratio: 5/8);\n @import url(\"${cssfile}\") (aspect-ratio: 3/4);\n @import url(\"${cssfile}\") (aspect-ratio: 2/3);\n `;\n const layout_landscape = `\n @import url(\"${cssfile}\") (orientation:landscape) and (min-width:460px);\n @import url(\"${cssfile}\") (aspect-ratio: 16/9) and (min-width:460px);\n @import url(\"${cssfile}\") (aspect-ratio: 16/10) and (min-width:460px);\n @import url(\"${cssfile}\") (aspect-ratio: 8/5) and (min-width:460px);\n @import url(\"${cssfile}\") (aspect-ratio: 4/3) and (min-width:460px);\n @import url(\"${cssfile}\") (aspect-ratio: 3/2) and (min-width:460px);\n `;\n const layout_code = {\n \"landscape\": layout_landscape,\n \"portrait\": layout_portrait\n };\n \n return (Object.hasOwn(layout_code, layoutname)) ? ((layout_code as any)[layoutname] as string) : (\"\");\n };\n \n Processor.setProcessor(layout);\n \n const component = (componentInstance:IComponent ,name:string, componentClass:string, ...args:string[]):string => {\n /*\n * component processor\n * @usage\n * $component(name=, componentClass=, ...)\n * Returns a component tag declaration like:\n * ...>\n */\n const arg = [...args].map(function (a) {\n return {\n [a.split(\"=\")[0]]: a.split(\"=\")[1]\n };\n }).reduce(function (k1, k2) {\n return Object.assign(k1, k2);\n });\n const attrs = [...Object.keys(arg)].map(function (a) {\n return `${a}=${arg[a as any]}`;\n }).join(\" \");\n return ``;\n };\n \n Processor.setProcessor(component);\n \n const quick_component = (componentInstance: IComponent,name:string, componentClass:string, ...args:string[]):string => {\n /*\n * component processor\n * @usage\n * $quick_component(name=, componentClass=, ...)\n * Returns a component tag declaration like:\n * ...>\n */\n const arg = [...args].map(function (a) {\n return {\n [a.split(\"=\")[0]]: a.split(\"=\")[1]\n };\n }).reduce(function (k1, k2) {\n return Object.assign(k1, k2);\n });\n const attrs = [...Object.keys(arg)].map(function (a) {\n return `${a}=${arg[a as any]}`;\n }).join(\" \");\n return ``;\n };\n \n Processor.setProcessor(quick_component);\n \n \n const repeat = (componentInstance:IComponent, length:number, text:string):string => {\n /*\n * Repeat processor\n * @usage\n * $repeat(, )\n * Where length is the number of occurrences of text\n */\n return range(length).map(\n function (index) {\n return text.replace(\"{{index}}\", index.toString());\n }\n ).join(\"\");\n };\n \n Processor.setProcessor(repeat);\n \n })(_top);\n \n};\n\n", "import { CONFIG } from \"./CONFIG\";\nimport { Export } from \"./Export\";\nimport { logger } from \"./Logger\";\nimport { isBrowser } from \"./platform\";\n\nexport const findPackageNodePath = function (packagename:string):string|null {\n let sdkPath = null;\n if (!isBrowser) {\n // eslint-disable-next-line @typescript-eslint/no-require-imports\n const fs = require(\"fs\");\n try {\n let sdkPaths = [\n `${CONFIG.get(\"projectPath\")}${CONFIG.get(\"relativeImportPath\")}`,\n `${CONFIG.get(\"basePath\")}${CONFIG.get(\"relativeImportPath\")}`,\n `${CONFIG.get(\"projectPath\")}`,\n `${CONFIG.get(\"basePath\")}`,\n `${CONFIG.get(\"relativeImportPath\")}`,\n `${process.cwd()}${CONFIG.get(\"relativeImportPath\")}`,\n `${process.cwd()}/node_modules/` + packagename,\n `${process.cwd()}/node_modules`,\n `${process.cwd()}`,\n \"node_modules\",\n \"./\",\n \"\"\n ].concat(module.paths);\n sdkPaths = sdkPaths.filter(p => {\n return (fs).existsSync(p + \"/\" + packagename);\n });\n if (sdkPaths.length > 0) {\n sdkPath = sdkPaths[0];\n logger.info(packagename + \" is Installed.\");\n } else {\n sdkPath = \"\";\n logger.info(`${packagename} is not in a standard path.`);\n }\n } catch (e) {\n // do nothing\n console.log(e);\n }\n\n }\n return sdkPath;\n};\nExport(findPackageNodePath);\n", "import { _basePath_ } from \"./basePath\";\nimport { CONFIG } from \"./CONFIG\";\nimport { _DataStringify } from \"./DataStringify\";\nimport { _DOMCreateElement } from \"./DOMCreateElement\";\nimport { findPackageNodePath } from \"./findPackageNodePath\";\nimport { logger } from \"./Logger\";\nimport { _require_, isBrowser } from \"./platform\";\nimport { _QC_PACKAGES, _QC_PACKAGES_IMPORTED, _QC_READY_LISTENERS } from \"./PrimaryCollections\";\n\n/**\n * Imports a script with the package nomenclature\n *\n * @param {Object} packagename\n * @param {Object} ready\n * @param {Boolean} external\n */\nexport const Import = function (packagename:string, ready?:Function, external?:boolean):Promise<{_imported_?:any, _package_name_?:string}> | undefined {\n\n if (external !== undefined){\n logger.debug(`[Import] Setting external=${external.toString()} resource to import: ${packagename}`);\n } \n if (external) {\n logger.debug(`[Import] Registering external resource to import: ${packagename}`);\n } else {\n logger.debug(`[Import] Registering local resource to import: ${packagename}`);\n }\n let _promise_import_: Promise;\n if (isBrowser) {\n _promise_import_ = new Promise(function (resolve, reject) {\n\n const allPackagesImported = function () {\n let ret = false;\n let cp = 0;\n // eslint-disable-next-line no-unused-vars\n for (const p in _QC_PACKAGES) {\n cp++;\n }\n if (cp < _QC_PACKAGES_IMPORTED.length) {\n ret = false;\n } else {\n ret = true;\n }\n return ret;\n };\n\n const readyImported = function (e: { target: { remove: () => void; }; }) {\n _QC_PACKAGES_IMPORTED.push(ready as never);\n if (allPackagesImported()) {\n _QC_PACKAGES_IMPORTED.map( (_imported_) => {\n return _QC_READY_LISTENERS.push(_imported_);\n });\n }\n if (isBrowser && CONFIG.get(\"removePackageScriptAfterLoading\")) {\n e.target.remove();\n }\n resolve.call(_promise_import_, {\n \"_imported_\": e.target,\n \"_package_name_\": packagename\n });\n };\n\n if (!Object.hasOwn(_QC_PACKAGES, packagename)) {\n const s1:HTMLScriptElement = _DOMCreateElement(\"script\") as unknown as HTMLScriptElement;\n s1.type = CONFIG.get(\"sourceType\", \"text/javascript\");\n s1.async = !!(CONFIG.get(\"asynchronousImportsLoad\"));\n (s1 as any).onreadystatechange = function () {\n if ((s1 as any).readyState === \"complete\") {\n readyImported(s1 as any);\n }\n };\n (s1 as any).onload = readyImported;\n s1.onerror = function (e: any) {\n logger.debug(`An error ocurred: ${e}.`);\n reject.call(_promise_import_, {\n \"_imported_\": s1,\n \"_package_name_\": packagename\n });\n };\n s1.src = (external) ? (CONFIG.get(\"remoteImportsPath\") + packagename + \".js\") : (_basePath_ + CONFIG.get(\"relativeImportPath\") + packagename + \".js\");\n document.getElementsByTagName(\"head\")[0].appendChild(s1);\n }\n });\n _promise_import_.catch(function () {\n logger.debug(\"Import: Error loading a package \");\n });\n\n } else {\n // support to be used in a nodejs environment\n _promise_import_ = new Promise(function (resolve, reject) {\n try {\n const standardNodePath = findPackageNodePath(packagename);\n let packageAbsoluteName = \"\";\n if (standardNodePath !== null) {\n packageAbsoluteName = standardNodePath + \"/\" + packagename;\n } else {\n const jsNodePath = findPackageNodePath(packagename + \".js\");\n if (jsNodePath !== null) {\n packageAbsoluteName = jsNodePath + \"/\" + packagename + \".js\";\n } else {\n packageAbsoluteName = _basePath_ + CONFIG.get(\"relativeImportPath\") + packagename;\n }\n }\n try {\n resolve.call(_promise_import_, {\n \"_imported_\": _require_(`${packageAbsoluteName}`),\n \"_package_name_\": packagename\n });\n } catch (e) {\n reject.call(_promise_import_, {\n \"_imported_\": null,\n \"_package_name_\": packagename,\n \"error\": e\n });\n }\n } catch (e) {\n reject.call(_promise_import_, {\n \"_imported_\": null,\n \"_package_name_\": packagename,\n \"error\": e\n });\n }\n }).catch(function (e) {\n // something wrong importing a package\n logger.debug(\"Something happened when importing \" + packagename);\n console.warn(e);\n });\n }\n _promise_import_.catch(function (e) {\n logger.warn(_DataStringify(e));\n });\n return _promise_import_;\n};\nImport.prototype.toString = function () {\n return \"Import(packagename,ready,external) { [QCObjects native code] }\";\n};\n", "export const __to_number = function (value:any): number {\n return ((isNaN(value)) ? (new Number(0) as number) : (new Number(value) as number));\n};", "import { isQCObjects_Class } from \"./isQCObjects\";\nimport { Package } from \"./Package\";\n\n/**\n * Declare Namespace\n *\n * @param {String} packageName\n * @param {Object} package\n */\nexport const NamespaceRef = function (namespace:string):any {\n const packageInstance = Package(namespace) || [];\n const classes = packageInstance.filter((c:any) => isQCObjects_Class(c)).map((c:any) => {\n return {\n [c.__definition.__classType]: c\n };\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n }).reduce((a:any, b:any):any => {return Object.assign(a, b);});\n return namespace.split(\".\").map(c => {\n return {\n [c]: classes\n };\n }).reverse().reduce((a, b) => {\n b[Object.keys(b).join(\".\")] = a;\n return b;\n });\n};\n", "import { CONFIG } from \"./CONFIG\";\nimport { isBrowser } from \"./platform\";\nimport { _QC_READY_LISTENERS } from \"./PrimaryCollections\";\nimport { _top } from \"./top\";\n\n/**\n * Defines a Custom Ready listener\n */\nexport const Ready = (e:any):void => {\n if (isBrowser) {\n _QC_READY_LISTENERS.push(e.bind(window) as never);\n } else if (typeof global !== \"undefined\") {\n _QC_READY_LISTENERS.push(e.bind(global) as never);\n }\n};\n\nexport const ready:Function = Ready; // case insensitive ready option\n\n/**\n * Default Ready event function for window. Executes all micro ready events of Import calls\n *\n * @param {Object} e\n */\n// eslint-disable-next-line no-unused-vars\nexport const _Ready = (e:any):void => {\n const _execReady = ():void => {\n // eslint-disable-next-line array-callback-return\n _QC_READY_LISTENERS.map(function (_ready_listener_, _r):any {\n if (typeof _ready_listener_ === \"function\") {\n (_ready_listener_ as Function)();\n _QC_READY_LISTENERS.splice(_r, 1);\n }\n });\n };\n if (CONFIG.get(\"delayForReady\") > 0) {\n if (isBrowser) {\n setTimeout(_execReady.bind(window), CONFIG.get(\"delayForReady\"));\n } else if (typeof global !== \"undefined\") {\n setTimeout(_execReady.bind(global), CONFIG.get(\"delayForReady\"));\n }\n } else {\n _execReady.call(_top);\n }\n};\n", "import { IArrayCollection, IArrayList } from \"./types/global\";\nimport { ClassFactory } from \"./ClassFactory\";\nimport { logger } from \"./Logger\";\nimport { New } from \"./New\";\nimport { __to_number } from \"./mathFunctions\";\n\n\nexport class ArrayList extends Array implements IArrayList {\n prototype: any;\n\n unique ():any[] {\n return this.filter(function (value:any, index:any, self:any) {\n return self.indexOf(value) === index;\n });\n };\n\n table(): void {\n console.table(this);\n };\n sum(): number {\n return this.reduce( (prev:any, current:any):number => {\n return (__to_number(prev)) + (__to_number(current));\n }, 0) as number;\n }\n avg(): number {\n return (this.length < 1) ? (0) : (this.reduce( (prev:any, current:any):number => {\n return (((__to_number(prev)) + (__to_number(current))) / 2);\n })) as number;\n }\n min(): number {\n return this.reduce( (prev:any, current:any):number => {\n return (__to_number(prev) <= __to_number(current)) ? (prev) : (current);\n }, Infinity) as number;\n }\n max(): number {\n return this.reduce( (prev:any, current:any):number => {\n return (__to_number(prev) >= __to_number(current)) ? (prev) : (current);\n }, 0) as number;\n }\n sortBy(propName: string, sortAsc?: boolean): any[] {\n const sort_function = (sortAsc) ? (\n function (prev:any, current:any) {\n return current[propName] < prev[propName] ? 1 : -1;\n }\n ) : (\n function (prev:any, current:any) {\n return current[propName] > prev[propName] ? 1 : -1;\n }\n );\n return this.sort(sort_function);\n }\n matrix(length: number, fillValue?: number): any[] {\n const x_func = () => {\n return fillValue;\n };\n return Array.from({\n length: length\n }, x_func);\n }\n matrix2d(length: number, fillValue?: number): any[][] {\n const y_func = function () {\n return fillValue;\n };\n const x_func = function () {\n return Array.from({\n length\n }, y_func);\n };\n return Array.from({\n length\n }, x_func);\n }\n matrix3d(length: number, fillValue?: number): any[][][] {\n const y_func = function () {\n return Array.from({\n length\n }, function () {\n return fillValue;\n });\n };\n const x_func = function () {\n return Array.from({\n length\n }, y_func);\n };\n return Array.from({\n length\n }, x_func);\n }\n\n\n}\n\nexport class ArrayCollection implements IArrayCollection {\n source :ArrayList = New(ArrayList, []);\n changed(prop: string, value: any):void {\n logger.debug(\"VALUE CHANGED\");\n logger.debug(prop);\n logger.debug(value);\n }\n push(value: any):number {\n const self = this;\n logger.debug(\"VALUE ADDED\");\n logger.debug(value);\n return self.source.push(value);\n }\n pop():any {\n const self = this;\n logger.debug(\"VALUE POPPED\");\n return self.source.pop();\n }\n _new_(source: ArrayList):void {\n const self = this;\n let _index = 0;\n self.source = New(ClassFactory(\"ArrayList\"), source);\n for (const _k in self.source) {\n if (!isNaN(_k as any)) {\n logger.debug(\"binding \" + _k.toString());\n (function (_pname:any) {\n Object.defineProperty(self, _pname, {\n set(value) {\n logger.debug(\"setting \" + _pname + \"=\" + value);\n self.source[_pname] = value;\n self.changed(_pname, value);\n },\n get():unknown {\n return self.source[_pname];\n }\n });\n })(_k);\n _index++;\n }\n\n }\n self.source.length = _index;\n Object.defineProperty(self, \"length\", {\n get() {\n return self.source.length;\n }\n });\n }\n}\n\n", "import { IQCObjectsElement, ITagElements } from \"./types/global\";\nimport { ClassFactory } from \"./ClassFactory\";\nimport { New } from \"./New\";\nimport { Package } from \"./Package\";\nimport { isBrowser } from \"./platform\";\nimport { Effect } from \"./Effect\";\nimport { ArrayList } from \"./ArrayCollection\";\n\nexport class TagElements extends ArrayList implements ITagElements {\n show():void {\n this.map(function (element:any) {\n return element.style.opacity = 1;\n });\n }\n hide():void {\n this.map(function (element:any) {\n return element.style.opacity = 0;\n });\n }\n effect(...args:T[]):void {\n const effectArguments = [...args].slice(1);\n const effectClassName = args[0] as string;\n let effectClass = undefined;\n if ((typeof effectClassName).toLowerCase() === \"string\") {\n effectClass = ClassFactory(effectClassName);\n }\n this.map(function (element:any):T {\n return ((effectClass as Effect).apply as Function).apply(effectClass, [element].concat(effectArguments)) as T;\n });\n }\n findElements(elementName:any):any {\n const _o = New(ClassFactory(\"TagElements\"));\n if (isBrowser) {\n for (const _k in this) {\n if (typeof _k === \"number\" && typeof this[_k] !== \"function\" && Object.hasOwn(this[_k], \"subelements\")) {\n _o.push(this[_k].subelements(elementName));\n }\n }\n } else {\n // not yet implemented.\n }\n return _o;\n }\n }\n\n /**\n * Gets the element of DOM found by tag name\n *\n * @param {Object} tagname\n * @param {Object} innerHTML\n */\n export const Tag = function (tagname:string, innerHTML?:string): T[] {\n const _o = New(TagElements);\n if (isBrowser) {\n const o = (document as unknown as IQCObjectsElement).subelements(tagname);\n const addedKeys = [];\n for (let _i = 0; _i < o.length; _i++) {\n if (typeof innerHTML !== \"undefined\" && Object.hasOwn(o[_i], \"innerHTML\")) {\n o[_i].innerHTML = innerHTML;\n }\n if (addedKeys.indexOf(_i) < 0) {\n _o.push(o[_i]);\n addedKeys.push(_i);\n }\n }\n } else {\n // not yet implemented.\n }\n return _o as T[];\n };\n\n\n Package(\"com.qcobjects\",[\n TagElements,\n Tag\n ]);", "import { _Crypt } from \"./Crypt\";\n\nexport const shortCode = (): string => {\n const length = 1000;\n const code1 = _Crypt.encrypt((Math.random() * length).toString().replace(\".\", \"\"), (new Date()).getTime().toString());\n const code2 = _Crypt.encrypt((Math.random() * length).toString().replace(\".\", \"\"), (new Date((new Date()).getTime() - 1000 * 1000)).getTime().toString());\n const shortCode = [...code2].map((o1: any, index: any): any => {\n return [...code1][index] === o1 ? null : o1;\n }).filter((c: any) => c !== null).join(\"\");\n return shortCode;\n};\n", "import { ClassFactory } from \"./ClassFactory\";\n\n/**\n * Returns a method from a superior QCObjects Class\n * It is useful for Class Inheritance in the _new_ and __new__ method constructors\n * @example _super_('MySuperClass','MySuperMethod').call(this,params) #where this is the current instance and params are method parameters\n *\n * @param {String} className\n * @param {String} classMethodName\n * @param {Object} params\n */\nexport const _super_ = function (className: string, classMethodName: string):T {\n return (ClassFactory(className))[classMethodName] as T;\n};\n_super_.prototype.toString = function () {\n return \"_super_(className,classMethodName,params) { [QCObjects native code] }\";\n};\n", "import { logger } from \"./Logger\";\n\nexport const waitUntil = (func:()=>void, exp:()=>any):void => {\n const _waitUntil = (func:()=>void, exp:()=>any):void => {\n const maxWaitCycles = 2000;\n let _w = 0;\n var _t = setInterval(function () {\n if (exp()) {\n clearInterval(_t);\n func();\n logger.debug(\"Ejecuting \" + func.name + \" after wait\");\n } else {\n if (_w < maxWaitCycles) {\n _w += 1;\n logger.debug(\"WAIT UNTIL \" + func.name + \" is true, \" + _w.toString() + \" cycles\");\n } else {\n logger.debug(\"Max execution time for \" + func.name + \" expression until true\");\n clearInterval(_t);\n }\n }\n }, 1);\n };\n setTimeout(function () {\n _waitUntil(func, exp);\n }, 1);\n };\n", "export const subelements = function subelements(this: any, query: string): T[] {\n const _self = this;\n return [..._self.querySelectorAll(query)] as T[];\n};", "import { CONFIG } from \"./CONFIG\";\nimport { findPackageNodePath } from \"./findPackageNodePath\";\nimport { Import } from \"./Import\";\nimport { logger } from \"./Logger\";\nimport { _require_, isBrowser, isNodeCommonJS } from \"./platform\";\n\nconst loadSDK = ():void => {\n if (CONFIG.get(\"useSDK\")) {\n (function () {\n const remoteImportsPath = CONFIG.get(\"remoteImportsPath\");\n const external = (!CONFIG.get(\"useLocalSDK\"));\n CONFIG.set(\"remoteImportsPath\", CONFIG.get(\"remoteSDKPath\"));\n\n let tryImportingSDK = false;\n let sdkName = \"QCObjects-SDK\";\n if (isBrowser) {\n tryImportingSDK = true;\n } else {\n const sdkPath = findPackageNodePath(\"qcobjects-sdk\");\n if (sdkPath !== null) {\n sdkName = \"qcobjects-sdk\";\n tryImportingSDK = true;\n } else if (sdkPath !== \"\"){\n sdkName = \"node_modules/qcobjects-sdk/QCObjects-SDK\";\n tryImportingSDK = true;\n } else {\n tryImportingSDK = false;\n }\n }\n\n if (tryImportingSDK) {\n logger.info(\"Importing SDK... \" + sdkName);\n if (isNodeCommonJS && typeof require !== \"undefined\") {\n const sdk = _require_(\"qcobjects-sdk\");\n if (sdk) {\n logger.debug(\"QCObjects SDK was loaded OK.\");\n } else {\n logger.debug(\"QCObjects SDK could not be imported.\");\n }\n } else {\n Import(sdkName, function () {\n if (external) {\n logger.debug(\"QCObjects-SDK.js loaded from remote location\");\n } else {\n logger.debug(\"QCObjects-SDK.js loaded from local\");\n }\n CONFIG.set(\"remoteImportsPath\", remoteImportsPath);\n }, external)\n ?.catch((e: any) => { throw new Error(`An error ocurred when trying to import: ${e}`); });\n }\n } else {\n logger.debug(\"SDK has not been imported as it is not available at the moment\");\n }\n })();\n }\n\n};\n\nexport default loadSDK;\n", "import { IQCObjectsElement, IQCObjectsShadowedElement } from \"./types/global\";\nimport { _top } from \"./top\";\nimport { _fireAsyncLoad, asyncLoad } from \"./asyncLoad\";\nimport { captureFalseTouch } from \"./captureFalseTouch\";\nimport { _Cast } from \"./Cast\";\nimport { Class } from \"./Class\";\nimport { ClassFactory } from \"./ClassFactory\";\nimport { Component } from \"./Component\";\nimport { ComponentURI } from \"./ComponentFactory\";\nimport { componentLoader } from \"./componentLoader\";\nimport { CONFIG } from \"./CONFIG\";\nimport { _DataStringify } from \"./DataStringify\";\nimport { setDefaultProcessors } from \"./defaultProcessors\";\nimport { Export } from \"./Export\";\nimport { Import } from \"./Import\";\nimport { _methods_, _protected_code_ } from \"./introspection\";\nimport { isQCObjects_Class, isQCObjects_Object } from \"./isQCObjects\";\nimport { logger } from \"./Logger\";\nimport { __to_number } from \"./mathFunctions\";\nimport { NamespaceRef } from \"./NamespaceRef\";\nimport { New } from \"./New\";\nimport { ObjectName } from \"./ObjectName\";\nimport { Package } from \"./Package\";\nimport { is_phonegap, isBrowser } from \"./platform\";\nimport { _Ready, ready, Ready } from \"./Ready\";\nimport { serviceLoader } from \"./serviceLoader\";\nimport { Tag } from \"./Tag\";\nimport { Processor } from \"./Processor\";\nimport { is_a } from \"./is_a\";\nimport { __getType__ } from \"./getType\";\nimport { shortCode } from \"./shortCode\";\nimport { _DOMCreateElement } from \"./DOMCreateElement\";\nimport { ComplexStorageCache } from \"./ComplexStorageCache\";\nimport { _super_ } from \"./super\";\nimport { waitUntil } from \"./waitUntil\";\nimport { subelements } from \"./subelements\";\nimport { GlobalSettings } from \"./globalSettings\";\nimport loadSDK from \"./loadSDK\";\nimport { range } from \"./range\";\n\n(function __qcobjects__(_top: any) {\n if (typeof Object.defineProperty !== \"undefined\" && typeof _top !== \"undefined\") {\n try {\n Object.defineProperty(_top, \"__qcobjects__\", {\n enumerable: true,\n configurable: false,\n writable: false,\n value: __qcobjects__,\n });\n } catch (e: any) {\n logger.debug(`An error ocurred: ${e}`);\n if (typeof _top.__qcobjects__ !== \"undefined\") {\n _top.__qcobjects__.loaded = true;\n }\n }\n }\n if (typeof _top.__qcobjects__.loaded === \"undefined\") {\n _top.__qcobjects__.loaded = true;\n\n if (isBrowser) {\n (Element as unknown as IQCObjectsElement).prototype.subelements = subelements;\n (Document as unknown as IQCObjectsElement).prototype.subelements = subelements;\n (HTMLElement as unknown as IQCObjectsElement).prototype.subelements = subelements;\n if (typeof ShadowRoot !== \"undefined\") {\n (ShadowRoot as unknown as IQCObjectsShadowedElement).prototype.subelements = subelements;\n }\n }\n\n\n logger.debugEnabled = false;\n logger.infoEnabled = true;\n\n /**\n * Basic Type of all elements\n */\n if (isBrowser) {\n (Element as unknown as IQCObjectsElement).prototype.find = function (tag: string): IQCObjectsElement[] {\n const _self = this;\n const _oo: IQCObjectsElement[] = [];\n const _tags = (document as unknown as IQCObjectsElement).subelements(tag);\n _tags.map((_tt, _t) => {\n if ((typeof _tags[_t] !== \"undefined\") && (_tags[_t].parentNode as Element).tagName === _self.parentNode.tagName) {\n _oo.push(_Cast(_tt, (new Object())));\n }\n return _tt;\n });\n return _oo;\n };\n }\n\n if (isBrowser) {\n Element.prototype.append = function QC_Append(child) {\n if (isQCObjects_Object(child) || typeof (child as any).body !== \"undefined\") {\n this.appendChild((child as any).body);\n } else {\n this.appendChild(child as any);\n }\n };\n\n /**\n * A replacement for direct using of innerHTML\n * use: [element].render('content') where 'content' is the string corresponding\n * to the DOM to insert in the element\n **/\n (Element as unknown as IQCObjectsElement).prototype.render = function QC_Render(content: string) {\n const _self = this;\n const _appendVDOM = (_self: any, content: string): any => {\n if (typeof document.implementation.createHTMLDocument !== \"undefined\") {\n const doc = document.implementation.createHTMLDocument(\"\");\n doc.body.innerHTML = content;\n (doc.body as unknown as IQCObjectsElement).subelements(\"*\").map((element): any => {\n return _self.append(element);\n });\n }\n };\n if (typeof this.innerHTML !== \"undefined\") {\n try {\n this.innerHTML += content;\n } catch (e: any) {\n logger.debug(`An error ocurred: ${e}`);\n _appendVDOM(_self, content);\n }\n } else {\n _appendVDOM(_self, content);\n }\n };\n }\n\n\n\n Export(waitUntil);\n Export(_super_);\n Export(ComplexStorageCache);\n Export(ClassFactory);\n Export(_DOMCreateElement);\n Export(shortCode);\n Export(__getType__);\n Export(is_a);\n Package(\"com.qcobjects\", [Processor]);\n\n\n\n\n if (isBrowser) {\n /**\n * Adds a Cast functionality to every Element of DOM\n */\n (Element as unknown as IQCObjectsElement).prototype.Cast = function QC_Cast(_o: T): T {\n const _self: any = this;\n return _Cast(_self, _o) as T;\n };\n }\n\n\n\n if (isBrowser) {\n window.onload = _Ready;\n if (is_phonegap) {\n document.addEventListener(\"deviceready\", _Ready, captureFalseTouch as any);\n }\n } else {\n global.onload = _Ready;\n }\n\n if (isBrowser) {\n window.addEventListener(\"popstate\", function (popStateEvent) {\n popStateEvent.stopImmediatePropagation();\n popStateEvent.stopPropagation();\n Component.route()\n .catch((e: any) => { throw new Error(`An error ocurred when trying to load initial routes. ${e}`); });\n });\n }\n\n\n\n Export(serviceLoader);\n Export(componentLoader);\n Export(ComponentURI);\n Export(ObjectName);\n Export(_DataStringify);\n Export(isQCObjects_Class);\n Export(isQCObjects_Object);\n Export(NamespaceRef);\n\n /**\n * Array math functions\n */\n // eslint-disable-next-line no-unused-vars\n (Array as any).prototype.unique = function (this: T[]): T[] {\n return this.filter(function (value: any, index: any, self: any) {\n return self.indexOf(value) === index;\n });\n };\n (Array as any).unique = function (a: Array): T[] {\n return (a as any).unique() as T[];\n };\n (_protected_code_)((Array as any).unique);\n (_protected_code_)((Array as any).prototype.unique);\n (Array as any).prototype.table = function (): void {\n console.table(this);\n };\n (Array as any).table = function (a: any): void {\n a.table();\n return;\n };\n (_protected_code_)((Array as any).table);\n (_protected_code_)((Array as any).prototype.table);\n (Array as any).prototype.sum = function (): number {\n return this.reduce(function (prev: any, current: any) {\n return (__to_number(prev)) + (__to_number(current));\n }, 0) as number;\n };\n (Array as any).sum = function (a: any): number {\n return a.sum() as number;\n };\n (_protected_code_)((Array as any).sum);\n (_protected_code_)((Array as any).prototype.sum);\n (Array as any).prototype.avg = function (): number {\n return (this.length < 1) ? (0) : (this.reduce(function (prev: any, current: any) {\n return (((__to_number(prev)) + (__to_number(current))) / 2);\n })) as number;\n };\n (Array as any).avg = function (a: any): number {\n return a.avg() as number;\n };\n (_protected_code_)((Array as any).avg);\n (_protected_code_)((Array as any).prototype.avg);\n (Array as any).prototype.min = function (): number {\n return this.reduce(function (prev: number, current: number) {\n return (__to_number(prev) <= __to_number(current)) ? (prev) : (current);\n }, Infinity) as number;\n };\n (Array as any).min = function (a: any): number {\n return a.min() as number;\n };\n (_protected_code_)((Array as any).min);\n (_protected_code_)((Array as any).prototype.min);\n (Array as any).prototype.max = function (): number {\n return this.reduce(function (prev: number, current: number) {\n return (__to_number(prev) >= __to_number(current)) ? (prev) : (current);\n }, 0) as number;\n };\n (Array as any).max = function (a: any): number {\n return a.max() as number;\n };\n (_protected_code_)((Array as any).max);\n (_protected_code_)((Array as any).prototype.max);\n (Array as any).prototype.sortBy = function (propName: string, sortAsc = true): Array[] {\n const sort_function = (sortAsc) ? (\n function (prev: any, current: any) {\n return current[propName] < prev[propName] ? 1 : -1;\n }\n ) : (\n function (prev: any, current: any) {\n return current[propName] > prev[propName] ? 1 : -1;\n }\n );\n return this.sort(sort_function) as Array[];\n };\n (Array as any).sortBy = function (a: any, propName: string, sortAsc = true): Array[] {\n return a.sortBy(propName, sortAsc) as Array[];\n };\n (_protected_code_)((Array as any).sortBy);\n (_protected_code_)((Array as any).prototype.sortBy);\n\n /**\n * Extends the Array prototype to include a method that creates a matrix (2D array)\n * with specified dimensions and fill value.\n *\n * @param {number} _length - The number of rows in the matrix.\n * @param {any} [_fillValue=0] - The value to fill the matrix with (default is 0).\n * @returns {Array>} A 2D array (matrix) filled with the specified value.\n *\n * @example\n * // Create a 3x3 matrix filled with zeros\n * const matrix = [].matrix(3);\n * console.log(matrix);\n * // Output: [0, 0, 0]\n *\n * @example\n * // Create a 2x4 matrix filled with a specific value\n * const matrix = [].matrix(2, 5);\n * console.log(matrix);\n * // Output: [5, 5]\n *\n * @example\n * // Create a 4x2 matrix filled with null values\n * const matrix = [].matrix(4, null);\n * console.log(matrix);\n * // Output: [null, null, null, null]\n */\n (Array as any).prototype.matrix = function (_length: number, _fillValue = 0) {\n // eslint-disable-next-line no-unused-vars\n const x_func = function (x = undefined) {\n return _fillValue;\n };\n return Array.from({\n length: _length\n }, x_func);\n };\n\n /**\n * Creates a matrix (2D array) from a given array.\n * \n * This function extends the Array constructor by adding a static method\n * that generates a matrix with specified dimensions and fill value.\n * \n * @function\n * @param {Array} a - The input array used to generate the matrix.\n * @param {number} _length - The length of the matrix (number of rows).\n * @param {number} [_fillValue=0] - The value to fill the matrix with (default is 0).\n * @returns {Array} A 2D array (matrix) created from the input parameters.\n * \n * @example\n * const myMatrix = Array.matrix(2, 5);\n * // myMatrix will be [5, 5, 5]\n */\n (Array as any).matrix = function (a: any, _length: number, _fillValue = 0): T[] {\n return a.matrix(_length, _fillValue) as T[];\n };\n\n (_protected_code_)((Array as any).matrix);\n (_protected_code_)((Array as any).prototype.matrix);\n\n\n (Array as any).prototype.matrix2d = function (_length: number, _fillValue = 0) {\n // eslint-disable-next-line no-unused-vars\n const y_func = function (y: any) {\n return _fillValue;\n };\n // eslint-disable-next-line no-unused-vars\n const x_func = function (x: any) {\n return Array.from({\n length: _length\n }, y_func);\n };\n return Array.from({\n length: _length\n }, x_func);\n };\n (Array as any).matrix2d = function (a: any, _length: number, _fillValue = 0): T[][] {\n return a.matrix2d(_length, _fillValue) as T[][];\n };\n\n (_protected_code_)((Array as any).matrix2d);\n (_protected_code_)((Array as any).prototype.matrix2d);\n\n (Array as any).prototype.matrix3d = function (_length: number, _fillValue = 0) {\n // eslint-disable-next-line no-unused-vars\n const y_func = function (y: any) {\n return Array.from({\n length: _length\n }, function () {\n return _fillValue;\n });\n };\n // eslint-disable-next-line no-unused-vars\n const x_func = function (x: any) {\n return Array.from({\n length: _length\n }, y_func);\n };\n return Array.from({\n length: _length\n }, x_func);\n };\n\n (Array as any).matrix3d = function (a: any, _length: number, _fillValue = 0): T[][][] {\n return a.matrix3d(_length, _fillValue) as T[][][];\n };\n\n\n (_protected_code_)((Array as any).matrix3d);\n (_protected_code_)((Array as any).prototype.matrix3d);\n\n\n\n (String as unknown as any).prototype.list = function (): string[] {\n const __instance = this;\n return range(0, __instance.length - 1).map(function (i: any): T {\n return __instance[i] as T;\n }) as string[];\n };\n (_protected_code_)((String as unknown as any).prototype.list);\n\n\n\n /**\n * End of array math functions\n */\n\n\n\n setDefaultProcessors();\n\n\n /**\n * Load every component tag declared in the body\n **/\n Ready(function () {\n if (!CONFIG.get(\"useSDK\")) {\n GlobalSettings.__start__()\n .catch((e: any) => {\n throw Error(e);\n });\n }\n });\n\n /*\n Public variables and functions\n */\n Export(Export); /* exports the same Export function once */\n Export(Import);\n Export(Package);\n Export(Class);\n Export(New);\n Export(Tag);\n Export(Ready);\n Export(ready);\n Export(isBrowser);\n Export(_methods_);\n Export(GlobalSettings);\n\n\n (loadSDK)();\n\n if (isBrowser) {\n asyncLoad(function (): any {\n Ready(function () {\n\n /*\n * scroll management custom events\n * usage: document.addEventListener('percentY90',function(e){console.log(e.detail.percentY)});\n * possible events: scrollpercent, defaultscroll, percentY0, percentY25, percentY50, percentY75, percentY90\n */\n\n (function (_top) {\n let ticking = false;\n const scrollHeight = Math.max(\n document.body.scrollHeight, document.documentElement.scrollHeight,\n document.body.offsetHeight, document.documentElement.offsetHeight,\n document.body.clientHeight, document.documentElement.clientHeight\n );\n\n const scrollWidth = Math.max(\n document.body.scrollWidth, document.documentElement.scrollWidth,\n document.body.offsetWidth, document.documentElement.offsetWidth,\n document.body.clientWidth, document.documentElement.clientWidth\n );\n\n function scrollDispatcher(event: any) {\n const percentY = Math.round(_top.scrollY * 100 / scrollHeight);\n const percentX = Math.round(_top.scrollX * 100 / scrollWidth);\n const scrollPercentEventEvent = new CustomEvent(\"scrollpercent\", {\n detail: {\n percentX,\n percentY\n }\n });\n event.target.dispatchEvent(scrollPercentEventEvent);\n let secondaryEventName = \"defaultscroll\";\n const __valid_scrolls__ = [0, 5, 10, 25, 50, 75, 90, 95, 100];\n __valid_scrolls__.filter(function (p) {\n return p === percentY;\n }).map(function (pY: T): T {\n secondaryEventName = \"percentY\" + percentY.toString();\n const secondaryCustomEvent = new CustomEvent(secondaryEventName, {\n detail: {\n percentX,\n percentY\n }\n });\n event.target.dispatchEvent(secondaryCustomEvent);\n return pY;\n });\n\n }\n\n document.addEventListener(\"scroll\", function (event) {\n\n if (!ticking) {\n requestAnimationFrame(function () {\n scrollDispatcher(event);\n ticking = false;\n });\n\n ticking = true;\n }\n });\n\n })(_top);\n\n });\n }, []);\n }\n\n if (!isBrowser) {\n if (typeof _top.global !== \"undefined\" && Object.hasOwn(_top.global, \"_fireAsyncLoad\")) {\n _fireAsyncLoad.call(_top);\n }\n if (typeof _top.global !== \"undefined\" && Object.hasOwn(_top.global, \"onload\")) {\n _top.global.onload.call(_top);\n }\n }\n\n\n /* Freezing Object && Object.prototype to prevent prototype pollution risks */\n (function (isBrowser) {\n const __freeze__ = function () {\n Object.freeze(Object.prototype);\n Object.freeze(Object);\n };\n if (isBrowser && CONFIG.get(\"secureObjects\", false)) {\n Ready(function () {\n __freeze__();\n });\n } else if (CONFIG.get(\"secureObjects\", false)) {\n __freeze__();\n }\n })(isBrowser);\n }\n\n})(_top);\n", "/**\n * QCObjects 2.4\n * ________________\n *\n * Author: Jean Machuca \n *\n * Cross Browser Javascript Framework for MVC Patterns\n * QuickCorp/QCObjects is licensed under the\n * GNU Lesser General Public License v3.0\n * [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)\n *\n * Permissions of this copyleft license are conditioned on making available\n * complete source code of licensed works and modifications under the same\n * license or the GNU GPLv3. Copyright and license notices must be preserved.\n * Contributors provide an express grant of patent rights. However, a larger\n * work using the licensed work through interfaces provided by the licensed\n * work may be distributed under different terms and without source code for\n * the larger work.\n *\n * Copyright (C) 2015 Jean Machuca,\n *\n * Everyone is permitted to copy and distribute verbatim copies of this\n * license document, but changing it is not allowed.\n */\n/* eslint no-unused-vars: \"off\" */\n/* eslint no-redeclare: \"off\" */\n/* eslint no-empty: \"off\" */\n/* eslint strict: \"off\" */\n\n/* eslint no-mixed-operators: \"off\" */\n\n\"use strict\";\n\nexport * as AssignPolyfill from \"./assign\";\nexport * as __top__ from \"./top\";\nexport * as qcobjects from \"./MainProcess\";\nexport {_top, resetTop} from \"./top\";\nexport { _QC_CLASSES, _QC_PACKAGES, _QC_PACKAGES_IMPORTED, _QC_READY_LISTENERS } from \"./PrimaryCollections\";\nexport { _DataStringify } from \"./DataStringify\";\nexport { _DOMCreateElement } from \"./DOMCreateElement\";\nexport { _methods_, _protected_code_ } from \"./introspection\";\nexport { logger, Logger } from \"./Logger\";\nexport { _require_, is_phonegap, isBrowser, isNodeCommonJS } from \"./platform\";\nexport { subelements } from \"./subelements\";\nexport { __is_raw_class__ } from \"./is_raw_class\";\nexport { _LegacyCopy } from \"./LegacyCopy\";\nexport { _fireAsyncLoad, asyncLoad } from \"./asyncLoad\";\nexport { __instanceID } from \"./IncrementInstanceID\";\nexport { ObjectName } from \"./ObjectName\";\nexport { __getType__ } from \"./getType\";\nexport { is_a } from \"./is_a\";\nexport { ComplexStorageCache } from \"./ComplexStorageCache\";\nexport { waitUntil } from \"./waitUntil\";\nexport { _Cast, _CastProps } from \"./Cast\";\nexport { isQCObjects_Class, isQCObjects_Object } from \"./isQCObjects\";\nexport { Package } from \"./Package\";\nexport { ClassFactory } from \"./ClassFactory\";\nexport { Export } from \"./Export\";\nexport { Class } from \"./Class\";\nexport { InheritClass } from \"./InheritClass\";\nexport { _super_ } from \"./super\";\nexport { shortCode } from \"./shortCode\";\nexport { Processor } from \"./Processor\";\nexport { New } from \"./New\";\nexport { _Ready, ready, Ready } from \"./Ready\";\nexport { captureFalseTouch } from \"./captureFalseTouch\";\nexport { serviceLoader } from \"./serviceLoader\";\nexport { componentLoader } from \"./componentLoader\";\nexport { _buildComponentsFromElements_, ComponentURI } from \"./ComponentFactory\";\nexport { NamespaceRef } from \"./NamespaceRef\";\nexport { setDefaultProcessors } from \"./defaultProcessors\";\nexport { Tag, TagElements } from \"./Tag\";\nexport { Import } from \"./Import\";\nexport { BackendMicroservice } from \"./BackendMicroservice\";\nexport { Component } from \"./Component\";\nexport { _Crypt } from \"./Crypt\";\nexport { DefaultTemplateHandler } from \"./DefaultTemplateHandler\";\nexport { SourceJS } from \"./SourceJS\";\nexport { SourceCSS } from \"./SourceCSS\";\nexport { GlobalSettings } from \"./globalSettings\";\nexport { RegisterClass } from \"./RegisterClass\";\nexport { _ComponentWidget_, RegisterWidget, RegisterWidgets } from \"./WidgetsFactory\";\nexport { CONFIG } from \"./CONFIG\";\nexport { Controller } from \"./Controller\";\nexport { View } from \"./View\";\nexport { ConfigService, JSONService, Service } from \"./Service\";\nexport { VO } from \"./VO\";\nexport { Effect } from \"./Effect\";\nexport { TransitionEffect } from \"./TransitionEffect\";\nexport { Timer } from \"./Timer\";\nexport { _tag_filter_ } from \"./tag_filter\";\nexport { range } from \"./range\";\nexport { ArrayCollection, ArrayList } from \"./ArrayCollection\";\nexport { DDO } from \"./DDO\";\nexport { Toggle } from \"./Toggle\";\nexport { findPackageNodePath } from \"./findPackageNodePath\";\nexport { getDocumentLayout } from \"./DocumentLayout\";\nexport { IQCObjectsElement, IQCObjectsShadowedElement } from \"./types/global\";\nexport { __to_number } from \"./mathFunctions\";\nexport {_top as global} from \"./top\";\nexport {__make_global__} from \"./make_global\";\nexport {get, set} from \"./top\";\n", " // Object.assign Polyfilling\n // Reference: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign#Polyfill\n if (typeof Object.assign !== \"function\") {\n // Must be writable: true, enumerable: false, configurable: true\n Object.defineProperty(Object, \"assign\", {\n // eslint-disable-next-line no-unused-vars\n value: function assign(target: null, varArgs: any):any { // .length of function is 2\n \"use strict\";\n if (target === null) { // TypeError if undefined or null\n throw new TypeError(\"Cannot convert undefined or null to object\");\n }\n \n const to = Object(target);\n \n for (let index = 1; index < arguments.length; index++) {\n // eslint-disable-next-line prefer-rest-params\n const nextSource = arguments[index];\n \n if (nextSource !== null) { // Skip over if undefined or null\n for (const nextKey in nextSource) {\n // Avoid bugs when hasOwnProperty is shadowed\n if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {\n to[nextKey] = nextSource[nextKey];\n }\n }\n }\n }\n return to;\n },\n writable: true,\n configurable: true\n });\n }\nexport {};", "import { Http2Stream } from \"http2\";\nimport { Stream } from \"stream\";\nimport { _basePath_ } from \"./basePath\";\nimport { _DataStringify } from \"./DataStringify\";\nimport { _domain_ } from \"./domain\";\nimport { InheritClass } from \"./InheritClass\";\nimport { logger } from \"./Logger\";\nimport { Package } from \"./Package\";\nimport { IMicroservice } from \"./types/global\";\n\nexport class BackendMicroservice extends InheritClass {\n stream: any;\n route: any;\n headers: any;\n request: any;\n\n constructor({\n domain = _domain_,\n basePath = _basePath_,\n body = null,\n stream = null,\n request = null\n }:IMicroservice) {\n super({\n domain,\n basePath,\n body,\n stream,\n request\n });\n logger.debug(\"Initializing BackendMicroservice...\");\n const microservice = this;\n if (typeof this.body === \"undefined\") {\n this.body = null;\n }\n if (typeof body !== \"undefined\") {\n this.body = body;\n }\n this.cors();\n microservice.stream = stream;\n (stream as any)?.on(\"data\", (data: any) => {\n // data from POST, GET\n const requestMethod = (request as any)?.method.toLowerCase();\n const supportedMethods = {\n \"post\": microservice.post.bind(microservice),\n };\n if (Object.hasOwn(supportedMethods, requestMethod)) {\n (supportedMethods as any)[requestMethod].call(microservice, data);\n }\n });\n\n // data from POST, GET\n const requestMethod = (request as any)?.method.toLowerCase();\n const supportedMethods = {\n \"get\": microservice.get.bind(microservice),\n \"head\": microservice.head.bind(microservice),\n \"put\": microservice.put.bind(microservice),\n \"delete\": microservice.delete.bind(microservice),\n \"connect\": microservice.connect.bind(microservice),\n \"options\": microservice.options.bind(microservice),\n \"trace\": microservice.trace.bind(microservice),\n \"patch\": microservice.patch.bind(microservice)\n };\n if (Object.hasOwn(supportedMethods, requestMethod)) {\n (supportedMethods as any)[requestMethod].call(microservice);\n }\n\n\n }\n\n cors():void {\n if (this.route.cors) {\n logger.debug(\"Validating CORS...\");\n const {\n allow_origins,\n allow_credentials,\n allow_methods,\n allow_headers\n } = this.route.cors;\n const microservice = this;\n if (typeof microservice.headers !== \"object\") {\n microservice.headers = {};\n }\n if (typeof microservice.route.responseHeaders !== \"object\") {\n microservice.route.responseHeaders = {};\n }\n if (typeof allow_origins !== \"undefined\") {\n logger.debug(\"CORS: allow_origins available. Validating origins...\");\n // an example of allow_origins is ['https://example.com','http://www.example.com']\n if (allow_origins === \"*\" || (typeof microservice.request.headers.origin === \"undefined\") || [...allow_origins].indexOf(microservice.request.headers.origin) !== -1) {\n // for compatibility with all browsers allways return a wildcard when the origin is allowed\n logger.debug(\"CORS: Adding header Access-Control-Allow-Origin=*\");\n microservice.route.responseHeaders[\"Access-Control-Allow-Origin\"] = \"*\";\n } else {\n logger.debug(\"CORS: Origin is not allowed: \" + microservice.request.headers.origin);\n logger.debug(\"CORS: Forcing to finish the response...\");\n this.body = {};\n try {\n this.done();\n } catch (e:any) {\n logger.debug(`It was not possible to finish the call to the microservice: ${e}`);\n }\n }\n } else {\n logger.debug(\"CORS: no allow_origins available. Allowing all origins...\");\n logger.debug(\"CORS: Adding header Access-Control-Allow-Origin=*\");\n microservice.route.responseHeaders[\"Access-Control-Allow-Origin\"] = \"*\";\n }\n if (typeof allow_credentials !== \"undefined\") {\n logger.debug(`CORS: allow_credentials present. Allowing ${allow_credentials}...`);\n microservice.route.responseHeaders[\"Access-Control-Allow-Credentials\"] = allow_credentials.toString();\n } else {\n logger.debug(\"CORS: No allow_credentials present. Allowing all credentials.\");\n microservice.route.responseHeaders[\"Access-Control-Allow-Credentials\"] = \"true\";\n }\n if (typeof allow_methods !== \"undefined\") {\n logger.debug(`CORS: allow_methods present. Allowing ${allow_methods}...`);\n microservice.route.responseHeaders[\"Access-Control-Allow-Methods\"] = [...allow_methods].join(\",\");\n } else {\n logger.debug(\"CORS: No allow_methods present. Allowing only GET, OPTIONS and POST\");\n microservice.route.responseHeaders[\"Access-Control-Allow-Methods\"] = \"GET, OPTIONS, POST\";\n }\n if (typeof allow_headers !== \"undefined\") {\n logger.debug(`CORS: allow_headers present. Allowing ${allow_headers}...`);\n microservice.route.responseHeaders[\"Access-Control-Allow-Headers\"] = [...allow_headers].join(\",\");\n } else {\n logger.debug(\"CORS: No allow_headers present. Allowing all headers...\");\n microservice.route.responseHeaders[\"Access-Control-Allow-Headers\"] = \"*\";\n }\n } else {\n logger.debug(\"No CORS validation available. You can specify cors in CONFIG.backend.routes[].cors\");\n }\n }\n\n\n head(formData: any):void {\n logger.debug(`[BackendMicroservice.head] Data received: ${_DataStringify(formData)}`);\n this.done();\n }\n\n get(formData: any):void {\n logger.debug(`[BackendMicroservice.get] Data received: ${_DataStringify(formData)}`);\n this.done();\n }\n\n post(formData: any):void {\n logger.debug(`[BackendMicroservice.post] Data received: ${_DataStringify(formData)}`);\n this.done();\n }\n\n put(formData: any):void {\n logger.debug(`[BackendMicroservice.put] Data received: ${_DataStringify(formData)}`);\n this.done();\n }\n\n delete(formData: any):void {\n logger.debug(`[BackendMicroservice.delete] Data received: ${_DataStringify(formData)}`);\n this.done();\n }\n\n connect(formData: any):void {\n logger.debug(`[BackendMicroservice.connect] Data received: ${_DataStringify(formData)}`);\n this.done();\n }\n\n options(formData: any):void {\n logger.debug(`[BackendMicroservice.options] Data received: ${_DataStringify(formData)}`);\n this.done();\n }\n\n trace(formData: any):void {\n logger.debug(`[BackendMicroservice.trace] Data received: ${_DataStringify(formData)}`);\n this.done();\n }\n\n patch(formData: any):void {\n logger.debug(`[BackendMicroservice.patch] Data received: ${_DataStringify(formData)}`);\n this.done();\n }\n\n finishWithBody(stream?: Http2Stream | Stream):void {\n try {\n logger.debug(\"[BackendMicroservice.finishWithBody] Ending the stream...\");\n logger.debug(`[BackendMicroservice.finishWithBody] type of body is: ${typeof this.body}`);\n if (typeof this.body !== \"string\") {\n this.body = _DataStringify(this.body);\n }\n logger.debug(`[BackendMicroservice.finishWithBody] \\n body: ${this.body} `);\n (stream as any)?.write(this.body);\n (stream as any)?.end();\n logger.debug(\"[BackendMicroservice.finishWithBody] Stream ended.\");\n } catch (e:any) {\n logger.debug(`[BackendMicroservice.finishWithBody] Something went wrong ending the stream: ${e}`);\n }\n }\n\n done():void {\n logger.debug(\"[BackendMicroservice.done] Finalizing the response...\");\n const microservice = this;\n const stream = microservice.stream;\n try {\n logger.debug(\"[BackendMicroservice.done] Sending response headers...\");\n if (microservice.route.responseHeaders) {\n logger.debug(`[BackendMicroservice.done] Response headers present: ${Object.keys(microservice.route.responseHeaders).join(\",\")}`);\n stream.respond(microservice.route.responseHeaders);\n } else {\n throw Error(\"[BackendMicroservice.done] No headers present.\");\n }\n } catch (e:any) {\n logger.debug(`[BackendMicroservice.done] Something went wrong sending response headers: ${e}`);\n }\n if (microservice.body !== null) {\n try {\n logger.debug(\"[BackendMicroservice.done] A body of message is present. Finalizing the response...\");\n microservice.finishWithBody.call(microservice, stream);\n } catch (e:any) {\n logger.debug(`[BackendMicroservice.done] Something went wrong finalizing the response: ${e}`);\n }\n } else {\n logger.debug(\"[BackendMicroservice.done] No body present. Ending stream...\");\n stream.end();\n }\n }\n\n\n}\n\nPackage(\"com.qcobjects.api\", [\n BackendMicroservice\n]);\n", "import { DefaultTemplateHandlerParams, IComponent } from \"./types/global\";\nimport { logger } from \"./Logger\";\nimport { GlobalProcessor as Processor } from \"./Processor\";\nimport { RegisterClass } from \"./RegisterClass\";\n\nexport class DefaultTemplateHandler {\n template = \"\";\n __definition = {};\n static __definition = {};\n component?: IComponent;\n\n constructor({ component, template }: DefaultTemplateHandlerParams) {\n this.component = component;\n this.template = template;\n }\n\n assign(data: any): string {\n const templateInstance = this;\n if (typeof templateInstance.component === \"undefined\") {\n throw new Error(\"DefaultTemplateHandler.assign: component is undefined\");\n }\n if (typeof templateInstance.component.processorHandler === \"undefined\") {\n throw new Error(\"DefaultTemplateHandler.assign: component.processorHandler is undefined\");\n }\n const processorHandler = templateInstance.component.processorHandler;\n processorHandler.component = templateInstance.component;\n let parsedAssignmentText = (typeof templateInstance.template !== \"undefined\") ? (templateInstance.template) : (\"\");\n if (typeof data === \"object\") {\n [...Object.keys(data)].map((k): any => {\n let _value = data[k];\n if (typeof _value === \"string\" || typeof _value === \"number\" || (!isNaN(_value))) {\n try {\n _value = Processor.processObject.bind(processorHandler).call(processorHandler, _value, templateInstance.component);\n parsedAssignmentText = parsedAssignmentText.replace((new RegExp(`{{${k}}}`, \"g\")), _value);\n } catch (e: any) {\n logger.warn(`${templateInstance.component?.name} could not parse processors.`);\n throw Error(`${templateInstance.component?.name} could not parse processors. Reason: ${e.message}`);\n }\n }\n return k;\n });\n } else {\n logger.debug(`${templateInstance.component?.name}.data is not an object`);\n }\n try {\n parsedAssignmentText = Processor.processObject.call(processorHandler, parsedAssignmentText, templateInstance.component);\n } catch (e: any) {\n logger.warn(`${templateInstance.component?.name} could not parse processors.`);\n throw Error(`${templateInstance.component?.name} could not parse processors. Reason: ${e.message}`);\n }\n return parsedAssignmentText;\n }\n\n}\nRegisterClass(DefaultTemplateHandler, \"com.qcobjects\");\n", "import { __make_global__ } from \"./make_global\";\nimport { __register_class__ } from \"./PrimaryCollections\";\n\n\n\nexport const RegisterClass = function (_class_:any, __namespace?:string):any {\n return __register_class__(_class_, __namespace);\n};\n__make_global__(RegisterClass);", "import { ISourceJS } from \"./types/global\";\nimport { _basePath_ } from \"./basePath\";\nimport { _Cast } from \"./Cast\";\nimport { _domain_ } from \"./domain\";\nimport { _DOMCreateElement } from \"./DOMCreateElement\";\nimport { InheritClass } from \"./InheritClass\";\nimport { Package } from \"./Package\";\nimport { logger } from \"./Logger\";\n\nexport class SourceJS extends InheritClass implements ISourceJS {\n domain:string= _domain_;\n basePath:string= _basePath_;\n type= \"text/javascript\";\n containerTag= \"body\";\n url= \"\";\n data= {};\n async= false;\n external= false;\n\n constructor(o:any){\n super(o);\n this.body= _DOMCreateElement(\"script\");\n\n }\n set(name:string, value:any):void {\n this[name] = value;\n }\n get(name:string, _default?:any):any {\n return this[name] || _default;\n }\n status= false;\n done():void { }\n fail():void { }\n rebuild():void {\n const context = this;\n try {\n document.getElementsByTagName(context.containerTag)[0].appendChild(\n (function (s:any, url:string, context:any):any {\n s.type = context.type;\n s.src = url;\n s.crossOrigin = (Object.hasOwn(context, \"crossOrigin\")) ? (context.crossOrigin) : (\"anonymous\");\n s.async = context.async;\n s.onreadystatechange = function () {\n if (this.readyState === \"complete\") {\n context.done.call(context);\n }\n };\n s.onload = function (e:any) {\n context.status = true;\n context.done.call(context, e);\n };\n s.onerror = function (e:any) {\n context.status = false;\n context.fail.call(context, e);\n };\n context.body = s;\n return s;\n }).call(this,\n _DOMCreateElement(\"script\"),\n (this.external) ? (this.url) : (this.basePath + this.url), context));\n } catch (e:any) {\n context.status = false;\n logger.debug(`An error ocurred: ${e}`);\n context.fail();\n }\n }\n Cast(o:any):any {\n return _Cast(this, o);\n }\n _new_(properties:any):void {\n this.__new__(properties);\n this.rebuild();\n }\n }\n\n Package(\"com.qcobjects\", [SourceJS]);\n", "import { ISourceCSS, TBody } from \"./types/global\";\nimport { _basePath_ } from \"./basePath\";\nimport { _Cast } from \"./Cast\";\nimport { _domain_ } from \"./domain\";\nimport { _DOMCreateElement } from \"./DOMCreateElement\";\nimport { InheritClass } from \"./InheritClass\";\nimport { isBrowser } from \"./platform\";\nimport { Package } from \"./Package\";\n\nexport class SourceCSS extends InheritClass implements ISourceCSS {\n domain: string = _domain_;\n basePath: string = _basePath_;\n url = \"\";\n data = {};\n async = false;\n external = false;\n\n constructor(o: any) {\n super(o);\n this.body = _DOMCreateElement(\"link\") as TBody;\n }\n fail(): void {\n throw new Error(\"Method not implemented.\");\n }\n Cast(o: any): any {\n return _Cast(this, o);\n }\n set(name: string, value: any): void {\n this[name] = value;\n }\n get(name: string, _default?: any): any {\n return this[name] || _default;\n }\n done(): void { }\n rebuild(): void {\n const context = this;\n if (isBrowser) {\n window.document.getElementsByTagName(\"head\")[0].appendChild(\n (function (s: any, url: string, context: any): any {\n s.type = \"text/css\";\n s.rel = \"stylesheet\";\n s.href = url;\n s.crossOrigin = \"anonymous\";\n s.onreadystatechange = function () {\n if (this.readyState === \"complete\") {\n context.done.call(context);\n }\n };\n s.onload = context.done;\n context.body = s;\n return s;\n }).call(this,\n _DOMCreateElement(\"link\"),\n (this.external) ? (this.url) : (this.basePath + this.url), context));\n }\n }\n}\n\nPackage(\"com.qcobjects\", [SourceCSS]);", " \n/* eslint-disable no-unused-vars */\nimport { _DOMCreateElement } from \"./DOMCreateElement\";\nimport { Export } from \"./Export\";\nimport { _protected_code_ } from \"./introspection\";\nimport { isBrowser } from \"./platform\";\nimport { I_ComponentWidget_ } from \"./types/global\";\n\nclass QCObjectsWidgetNode implements I_ComponentWidget_ {\n writingSuggestions!: string;\n currentCSSZoom!: number;\n ariaColIndexText!: string | null;\n ariaRowIndexText!: string | null;\n accessKey!: string;\n accessKeyLabel!: string;\n autocapitalize!: string;\n dir!: string;\n draggable!: boolean;\n hidden!: boolean;\n inert!: boolean;\n innerText!: string;\n lang!: string;\n offsetHeight!: number;\n offsetLeft!: number;\n offsetParent!: Element | null;\n offsetTop!: number;\n offsetWidth!: number;\n outerText!: string;\n popover!: string | null;\n spellcheck!: boolean;\n title!: string;\n translate!: boolean;\n attachInternals(): ElementInternals {\n throw new Error(\"Method not implemented.\");\n }\n click(): void {\n throw new Error(\"Method not implemented.\");\n }\n hidePopover(): void {\n throw new Error(\"Method not implemented.\");\n }\n showPopover(): void {\n throw new Error(\"Method not implemented.\");\n }\n togglePopover(force?: boolean): boolean {\n throw new Error(\"Method not implemented.\");\n }\n addEventListener(type: unknown, listener: unknown, options?: unknown): void {\n throw new Error(\"Method not implemented.\");\n }\n removeEventListener(type: unknown, listener: unknown, options?: unknown): void {\n throw new Error(\"Method not implemented.\");\n }\n attributes!: NamedNodeMap;\n classList!: DOMTokenList;\n className!: string;\n clientHeight!: number;\n clientLeft!: number;\n clientTop!: number;\n clientWidth!: number;\n id!: string;\n innerHTML!: string;\n localName!: string;\n namespaceURI!: string | null;\n onfullscreenchange!: ((this: Element, ev: Event) => any) | null;\n onfullscreenerror!: ((this: Element, ev: Event) => any) | null;\n outerHTML!: string;\n ownerDocument!: Document;\n part!: DOMTokenList;\n prefix!: string | null;\n scrollHeight!: number;\n scrollLeft!: number;\n scrollTop!: number;\n scrollWidth!: number;\n shadowRoot!: ShadowRoot | null;\n slot!: string;\n tagName!: string;\n attachShadow(init: ShadowRootInit): ShadowRoot {\n throw new Error(\"Method not implemented.\");\n }\n checkVisibility(options?: CheckVisibilityOptions): boolean {\n throw new Error(\"Method not implemented.\");\n }\n closest(selectors: unknown): any {\n throw new Error(\"Method not implemented.\");\n }\n computedStyleMap(): StylePropertyMapReadOnly {\n throw new Error(\"Method not implemented.\");\n }\n getAttribute(qualifiedName: string): string | null {\n throw new Error(\"Method not implemented.\");\n }\n getAttributeNS(namespace: string | null, localName: string): string | null {\n throw new Error(\"Method not implemented.\");\n }\n getAttributeNames(): string[] {\n throw new Error(\"Method not implemented.\");\n }\n getAttributeNode(qualifiedName: string): Attr | null {\n throw new Error(\"Method not implemented.\");\n }\n getAttributeNodeNS(namespace: string | null, localName: string): Attr | null {\n throw new Error(\"Method not implemented.\");\n }\n getBoundingClientRect(): DOMRect {\n throw new Error(\"Method not implemented.\");\n }\n getClientRects(): DOMRectList {\n throw new Error(\"Method not implemented.\");\n }\n getElementsByClassName(classNames: string): HTMLCollectionOf {\n throw new Error(\"Method not implemented.\");\n }\n getElementsByTagName(qualifiedName: unknown): HTMLCollectionOf | HTMLCollectionOf {\n throw new Error(\"Method not implemented.\");\n }\n getElementsByTagNameNS(namespace: unknown, localName: unknown): HTMLCollectionOf {\n throw new Error(\"Method not implemented.\");\n }\n getHTML(options?: GetHTMLOptions): string {\n throw new Error(\"Method not implemented.\");\n }\n hasAttribute(qualifiedName: string): boolean {\n throw new Error(\"Method not implemented.\");\n }\n hasAttributeNS(namespace: string | null, localName: string): boolean {\n throw new Error(\"Method not implemented.\");\n }\n hasAttributes(): boolean {\n throw new Error(\"Method not implemented.\");\n }\n hasPointerCapture(pointerId: number): boolean {\n throw new Error(\"Method not implemented.\");\n }\n insertAdjacentElement(where: InsertPosition, element: Element): Element | null {\n throw new Error(\"Method not implemented.\");\n }\n insertAdjacentHTML(position: InsertPosition, string: string): void {\n throw new Error(\"Method not implemented.\");\n }\n insertAdjacentText(where: InsertPosition, data: string): void {\n throw new Error(\"Method not implemented.\");\n }\n matches(selectors: string): boolean {\n throw new Error(\"Method not implemented.\");\n }\n releasePointerCapture(pointerId: number): void {\n throw new Error(\"Method not implemented.\");\n }\n removeAttribute(qualifiedName: string): void {\n throw new Error(\"Method not implemented.\");\n }\n removeAttributeNS(namespace: string | null, localName: string): void {\n throw new Error(\"Method not implemented.\");\n }\n removeAttributeNode(attr: Attr): Attr {\n throw new Error(\"Method not implemented.\");\n }\n requestFullscreen(options?: FullscreenOptions): Promise {\n throw new Error(\"Method not implemented.\");\n }\n requestPointerLock(options?: PointerLockOptions): Promise {\n throw new Error(\"Method not implemented.\");\n }\n scroll(x?: unknown, y?: unknown): void {\n throw new Error(\"Method not implemented.\");\n }\n scrollBy(x?: unknown, y?: unknown): void {\n throw new Error(\"Method not implemented.\");\n }\n scrollIntoView(arg?: boolean | ScrollIntoViewOptions): void {\n throw new Error(\"Method not implemented.\");\n }\n scrollTo(x?: unknown, y?: unknown): void {\n throw new Error(\"Method not implemented.\");\n }\n setAttribute(qualifiedName: string, value: string): void {\n throw new Error(\"Method not implemented.\");\n }\n setAttributeNS(namespace: string | null, qualifiedName: string, value: string): void {\n throw new Error(\"Method not implemented.\");\n }\n setAttributeNode(attr: Attr): Attr | null {\n throw new Error(\"Method not implemented.\");\n }\n setAttributeNodeNS(attr: Attr): Attr | null {\n throw new Error(\"Method not implemented.\");\n }\n setHTMLUnsafe(html: string): void {\n throw new Error(\"Method not implemented.\");\n }\n setPointerCapture(pointerId: number): void {\n throw new Error(\"Method not implemented.\");\n }\n toggleAttribute(qualifiedName: string, force?: boolean): boolean {\n throw new Error(\"Method not implemented.\");\n }\n webkitMatchesSelector(selectors: string): boolean {\n throw new Error(\"Method not implemented.\");\n }\n baseURI!: string;\n childNodes!: NodeListOf;\n firstChild!: ChildNode | null;\n isConnected!: boolean;\n lastChild!: ChildNode | null;\n nextSibling!: ChildNode | null;\n nodeName!: string;\n nodeType!: number;\n nodeValue!: string | null;\n parentElement!: HTMLElement | null;\n parentNode!: ParentNode | null;\n previousSibling!: ChildNode | null;\n textContent!: string | null;\n appendChild(node: T): T {\n throw new Error(\"Method not implemented.\");\n }\n cloneNode(deep?: boolean): Node {\n throw new Error(\"Method not implemented.\");\n }\n compareDocumentPosition(other: Node): number {\n throw new Error(\"Method not implemented.\");\n }\n contains(other: Node | null): boolean {\n throw new Error(\"Method not implemented.\");\n }\n getRootNode(options?: GetRootNodeOptions): Node {\n throw new Error(\"Method not implemented.\");\n }\n hasChildNodes(): boolean {\n throw new Error(\"Method not implemented.\");\n }\n insertBefore(node: T, child: Node | null): T {\n throw new Error(\"Method not implemented.\");\n }\n isDefaultNamespace(namespace: string | null): boolean {\n throw new Error(\"Method not implemented.\");\n }\n isEqualNode(otherNode: Node | null): boolean {\n throw new Error(\"Method not implemented.\");\n }\n isSameNode(otherNode: Node | null): boolean {\n throw new Error(\"Method not implemented.\");\n }\n lookupNamespaceURI(prefix: string | null): string | null {\n throw new Error(\"Method not implemented.\");\n }\n lookupPrefix(namespace: string | null): string | null {\n throw new Error(\"Method not implemented.\");\n }\n normalize(): void {\n throw new Error(\"Method not implemented.\");\n }\n removeChild(child: T): T {\n throw new Error(\"Method not implemented.\");\n }\n replaceChild(node: Node, child: T): T {\n throw new Error(\"Method not implemented.\");\n }\n ELEMENT_NODE!: 1;\n ATTRIBUTE_NODE!: 2;\n TEXT_NODE!: 3;\n CDATA_SECTION_NODE!: 4;\n ENTITY_REFERENCE_NODE!: 5;\n ENTITY_NODE!: 6;\n PROCESSING_INSTRUCTION_NODE!: 7;\n COMMENT_NODE!: 8;\n DOCUMENT_NODE!: 9;\n DOCUMENT_TYPE_NODE!: 10;\n DOCUMENT_FRAGMENT_NODE!: 11;\n NOTATION_NODE!: 12;\n DOCUMENT_POSITION_DISCONNECTED!: 1;\n DOCUMENT_POSITION_PRECEDING!: 2;\n DOCUMENT_POSITION_FOLLOWING!: 4;\n DOCUMENT_POSITION_CONTAINS!: 8;\n DOCUMENT_POSITION_CONTAINED_BY!: 16;\n DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC!: 32;\n dispatchEvent(event: Event): boolean {\n throw new Error(\"Method not implemented.\");\n }\n ariaAtomic!: string | null;\n ariaAutoComplete!: string | null;\n ariaBrailleLabel!: string | null;\n ariaBrailleRoleDescription!: string | null;\n ariaBusy!: string | null;\n ariaChecked!: string | null;\n ariaColCount!: string | null;\n ariaColIndex!: string | null;\n ariaColSpan!: string | null;\n ariaCurrent!: string | null;\n ariaDescription!: string | null;\n ariaDisabled!: string | null;\n ariaExpanded!: string | null;\n ariaHasPopup!: string | null;\n ariaHidden!: string | null;\n ariaInvalid!: string | null;\n ariaKeyShortcuts!: string | null;\n ariaLabel!: string | null;\n ariaLevel!: string | null;\n ariaLive!: string | null;\n ariaModal!: string | null;\n ariaMultiLine!: string | null;\n ariaMultiSelectable!: string | null;\n ariaOrientation!: string | null;\n ariaPlaceholder!: string | null;\n ariaPosInSet!: string | null;\n ariaPressed!: string | null;\n ariaReadOnly!: string | null;\n ariaRequired!: string | null;\n ariaRoleDescription!: string | null;\n ariaRowCount!: string | null;\n ariaRowIndex!: string | null;\n ariaRowSpan!: string | null;\n ariaSelected!: string | null;\n ariaSetSize!: string | null;\n ariaSort!: string | null;\n ariaValueMax!: string | null;\n ariaValueMin!: string | null;\n ariaValueNow!: string | null;\n ariaValueText!: string | null;\n role!: string | null;\n animate(keyframes: Keyframe[] | PropertyIndexedKeyframes | null, options?: number | KeyframeAnimationOptions): Animation {\n throw new Error(\"Method not implemented.\");\n }\n getAnimations(options?: GetAnimationsOptions): Animation[] {\n throw new Error(\"Method not implemented.\");\n }\n after(...nodes: (Node | string)[]): void {\n throw new Error(\"Method not implemented.\");\n }\n before(...nodes: (Node | string)[]): void {\n throw new Error(\"Method not implemented.\");\n }\n remove(): void {\n throw new Error(\"Method not implemented.\");\n }\n replaceWith(...nodes: (Node | string)[]): void {\n throw new Error(\"Method not implemented.\");\n }\n nextElementSibling!: Element | null;\n previousElementSibling!: Element | null;\n childElementCount!: number;\n children!: HTMLCollection;\n firstElementChild!: Element | null;\n lastElementChild!: Element | null;\n \n append(...nodes: (Node | string)[]): void {\n throw new Error(\"Method not implemented.\");\n }\n \n prepend(...nodes: (Node | string)[]): void {\n throw new Error(\"Method not implemented.\");\n }\n \n querySelector(selectors: unknown): any {\n throw new Error(\"Method not implemented.\");\n }\n \n querySelectorAll(selectors: unknown): NodeListOf {\n throw new Error(\"Method not implemented.\");\n }\n replaceChildren(...nodes: (Node | string)[]): void {\n throw new Error(\"Method not implemented.\");\n }\n assignedSlot!: HTMLSlotElement | null;\n attributeStyleMap!: StylePropertyMap;\n style!: CSSStyleDeclaration;\n contentEditable!: string;\n enterKeyHint!: string;\n inputMode!: string;\n isContentEditable!: boolean;\n onabort!: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;\n onanimationcancel!: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;\n onanimationend!: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;\n onanimationiteration!: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;\n onanimationstart!: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;\n onauxclick!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n onbeforeinput!: ((this: GlobalEventHandlers, ev: InputEvent) => any) | null;\n onbeforetoggle!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onblur!: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;\n oncancel!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n oncanplay!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n oncanplaythrough!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onchange!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onclick!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n onclose!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n oncontextlost!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n oncontextmenu!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n oncontextrestored!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n oncopy!: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;\n oncuechange!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n oncut!: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;\n ondblclick!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n ondrag!: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;\n ondragend!: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;\n ondragenter!: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;\n ondragleave!: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;\n ondragover!: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;\n ondragstart!: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;\n ondrop!: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;\n ondurationchange!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onemptied!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onended!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onerror!: OnErrorEventHandler;\n onfocus!: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;\n onformdata!: ((this: GlobalEventHandlers, ev: FormDataEvent) => any) | null;\n ongotpointercapture!: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;\n oninput!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n oninvalid!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onkeydown!: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;\n onkeypress!: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;\n onkeyup!: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;\n onload!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onloadeddata!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onloadedmetadata!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onloadstart!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onlostpointercapture!: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;\n onmousedown!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n onmouseenter!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n onmouseleave!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n onmousemove!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n onmouseout!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n onmouseover!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n onmouseup!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n onpaste!: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;\n onpause!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onplay!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onplaying!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onpointercancel!: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;\n onpointerdown!: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;\n onpointerenter!: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;\n onpointerleave!: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;\n onpointermove!: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;\n onpointerout!: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;\n onpointerover!: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;\n onpointerup!: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;\n onprogress!: ((this: GlobalEventHandlers, ev: ProgressEvent) => any) | null;\n onratechange!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onreset!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onresize!: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;\n onscroll!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onscrollend!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onsecuritypolicyviolation!: ((this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any) | null;\n onseeked!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onseeking!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onselect!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onselectionchange!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onselectstart!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onslotchange!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onstalled!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onsubmit!: ((this: GlobalEventHandlers, ev: SubmitEvent) => any) | null;\n onsuspend!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n ontimeupdate!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n ontoggle!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n ontouchcancel?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;\n ontouchend?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;\n ontouchmove?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;\n ontouchstart?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;\n ontransitioncancel!: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;\n ontransitionend!: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;\n ontransitionrun!: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;\n ontransitionstart!: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;\n onvolumechange!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onwaiting!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onwebkitanimationend!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onwebkitanimationiteration!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onwebkitanimationstart!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onwebkittransitionend!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onwheel!: ((this: GlobalEventHandlers, ev: WheelEvent) => any) | null;\n autofocus!: boolean;\n dataset!: DOMStringMap;\n nonce?: string | undefined;\n tabIndex!: number;\n blur(): void {\n throw new Error(\"Method not implemented.\");\n }\n focus(options?: FocusOptions): void {\n throw new Error(\"Method not implemented.\");\n }\n\n}\n\nexport let _ComponentWidget_:CustomElementConstructor;\nif (isBrowser) {\n _ComponentWidget_ = class _ComponentWidget_ extends HTMLElement implements I_ComponentWidget_ {\n constructor() {\n super();\n const componentWidget = this;\n const componentName = componentWidget.nodeName.toLowerCase();\n const componentBody = _DOMCreateElement(\"quick-component\");\n const __enabled__atributes__ = componentWidget.getAttributeNames();\n componentBody.setAttribute(\"name\", componentName);\n \n if (!componentWidget.hasAttribute(\"shadowed\")) {\n componentBody.setAttribute(\"shadowed\", \"true\");\n }\n __enabled__atributes__.forEach( (attributeName) => {\n if (componentWidget.hasAttribute(attributeName)) {\n componentBody.setAttribute(attributeName, componentWidget?.getAttribute(attributeName) as any);\n componentWidget.removeAttribute(attributeName);\n }\n });\n const data_attributenames = componentWidget.getAttributeNames().filter(function (a) {\n return a.startsWith(\"data-\");\n }).map(function (a) {\n return a.split(\"-\")[1];\n });\n data_attributenames.forEach(function (_attribute_name_) {\n componentBody.setAttribute(\"data-\" + _attribute_name_, componentWidget?.getAttribute(\"data-\" + _attribute_name_) as any);\n componentWidget.removeAttribute(\"data-\" + _attribute_name_);\n });\n [...(componentWidget as any).children].forEach( (element) => {\n componentBody.appendChild(element.cloneNode(true));\n element.remove();\n });\n \n componentWidget.append(componentBody);\n }\n };\n \n} else {\n _ComponentWidget_ = class _ComponentWidget_ extends QCObjectsWidgetNode {\n constructor (){\n super();\n throw new Error (\"Class not implemented.\");\n }\n };\n}\nExport(_ComponentWidget_);\nexport const RegisterWidget = (widgetName: string):void => {\n if (isBrowser){\n customElements.define(widgetName, class extends _ComponentWidget_ { });\n } else {\n throw new Error (\"RegisterWidget is not implemented for non browser ecosystems yet.\");\n }\n};\nexport const RegisterWidgets = (...args: string[]):void =>{\n const widgetList = [...args];\n widgetList.filter(function (widgetName) {\n return typeof widgetName === \"string\";\n }).map(function (widgetName) {\n return RegisterWidget(widgetName);\n });\n};\n(_protected_code_)(RegisterWidget);\n(_protected_code_)(RegisterWidgets);\nExport(RegisterWidget);\nExport(RegisterWidgets);\n", "import { IController, IComponent, TControllerParams, IQCObjectsElement, IQCObjectsShadowedElement } from \"./types/global\";\nimport { ClassFactory } from \"./ClassFactory\";\nimport { __getType__ } from \"./getType\";\nimport { InheritClass } from \"./InheritClass\";\nimport { logger } from \"./Logger\";\nimport { New } from \"./New\";\nimport { Package } from \"./Package\";\nimport { isBrowser } from \"./platform\";\n\nexport class Controller extends InheritClass implements IController{\n\n component!: IComponent ;\n dependencies?: any[] = [];\n constructor({\n component,\n dependencies\n }: TControllerParams) {\n super({ component, dependencies });\n this.component = component;\n this.dependencies = dependencies;\n if (typeof this.component === \"undefined\" || this.component === null) {\n throw Error(`${__getType__(this)} must be called with a component`);\n }\n }\n\n // eslint-disable-next-line no-unused-vars\n fail?(...args: [...args: any[]] ): void {\n throw new Error(\"Method not implemented.\");\n }\n\n\n routingSelectedAttr(attrName: string):any {\n return this.component?.routingSelected.map( (r: any):any => {\n return r[attrName];\n }).filter(function (v: any) {\n return v;\n }).pop();\n }\n\n isTouchable():boolean {\n return (\"ontouchstart\" in window) ||\n ((navigator as any).MaxTouchPoints > 0) ||\n ((navigator as any).msMaxTouchPoints > 0);\n }\n\n onpress(subelementSelector: string, handler: Function):void {\n if (isBrowser){\n try {\n if (this.isTouchable()) {\n ((this.component?.componentRoot as IQCObjectsElement| IQCObjectsShadowedElement)?.subelements(subelementSelector) as any[])[0].addEventListener(\"touchstart\", handler, {\n passive: true\n });\n } else {\n ((this.component?.componentRoot as IQCObjectsElement | IQCObjectsShadowedElement)?.subelements(subelementSelector) as any[])[0].addEventListener(\"click\", handler, {\n passive: true\n });\n }\n } catch (e:any) {\n logger.debug(`An error ocurred: ${e}.`);\n logger.debug(\"No button to assign press event\");\n }\n \n }\n }\n\n createRoutingController():void {\n const controller = this;\n const component = controller.component;\n const controllerName = controller.routingSelectedAttr(\"controllerclass\");\n if (typeof controllerName !== \"undefined\") {\n const _Controller = ClassFactory(controllerName) as unknown as IController;\n if (typeof _Controller !== \"undefined\" && component !== null) {\n component.routingController = New(_Controller, {\n component\n }) as IController; // Initializes the main controller for the component\n if (typeof component.routingController !== \"undefined\" \n && Object.hasOwn(component.routingController, \"done\") \n && typeof component.routingController.done === \"function\") {\n component.routingController.done.call(component.routingController);\n }\n }\n }\n }\n\n done():void { }\n}\n\nPackage(\"com.qcobjects.controllers\", [\n Controller\n]);\n", "import { __getType__ } from \"./getType\";\nimport { InheritClass } from \"./InheritClass\";\nimport { Package } from \"./Package\";\nimport { TViewParams } from \"./types/global\";\n\nexport class View extends InheritClass {\n constructor({ component = undefined, dependencies = [] }:TViewParams) {\n super({component, dependencies});\n if (typeof this.component === \"undefined\" || this.component === \"null\") {\n throw Error(`${__getType__(this)} must be called with a component`);\n }\n\n }\n }\n\nPackage(\"com.qcobjects.views\", [\n View\n]);", "import { InheritClass } from \"./InheritClass\";\nimport { Package } from \"./Package\";\n\nexport class VO extends InheritClass {}\n\nPackage(\"com.qcobjects.valueObjects\", [\n VO\n ]);", "import { IEffect, TEffectParams } from \"./types/global\";\nimport { InheritClass } from \"./InheritClass\";\nimport { Package } from \"./Package\";\nimport { _methods_, _protected_code_ } from \"./introspection\";\nimport { ClassFactory } from \"./ClassFactory\";\n\nclass Effect extends InheritClass implements IEffect {\n // eslint-disable-next-line no-unused-vars\n done(...args: any[]): any {\n throw new Error(\"Method not implemented.\");\n };\n // eslint-disable-next-line no-unused-vars\n apply(...args: any[]): void {\n throw new Error(\"Method not implemented.\");\n }\n duration = 1000;\n\n\n animate({\n timing,\n draw,\n duration\n }: TEffectParams): void {\n const _self: this = this;\n\n const start = performance.now();\n\n requestAnimationFrame(function animate(time) {\n // timeFraction goes from 0 to 1\n let timeFraction = (time - start) / duration;\n if (timeFraction > 1) timeFraction = 1;\n\n // calculate the current animation state\n const progress = timing(timeFraction);\n\n draw(Math.round(progress * 100)); // draw it\n\n if (timeFraction < 1) {\n requestAnimationFrame(animate);\n } else {\n // if this is an object with a done method\n if (typeof _self !== \"undefined\" &&\n _self !== null &&\n Object.hasOwn(_self, \"done\") &&\n (typeof _self.done).toLowerCase() === \"function\") {\n _self.done.call(_self);\n }\n }\n\n });\n }\n\n}\n\n\nPackage(\"com.qcobjects.effects.base\", [\n Effect\n]);\n\n(_methods_)(ClassFactory(\"Effect\")).map((__c__): any => {\n (_protected_code_)(__c__);\n return __c__;\n});\n\nexport { Effect };", "import { Effect } from \"./Effect\";\nimport { logger } from \"./Logger\";\nimport { Package } from \"./Package\";\nimport { ClassFactory } from \"./ClassFactory\";\nimport { IQCObjectsElement, IQCObjectsShadowedElement } from \"./types/global\";\nimport { ITransitionEffect, IComponent, TTransitionEffectParams } from \"./types/global\";\n\nexport class TransitionEffect extends Effect implements ITransitionEffect{\n duration = 385;\n defaultParams = {\n alphaFrom: 0,\n alphaTo: 1,\n angleFrom: 180,\n angleTo: 0,\n radiusFrom: 0,\n radiusTo: 30,\n scaleFrom: 0,\n scaleTo: 1\n };\n\n fitToHeight = false;\n fitToWidth = false;\n\n component!: IComponent;\n effects!: string[];\n\n apply({\n alphaFrom,\n alphaTo,\n angleFrom,\n angleTo,\n radiusFrom,\n radiusTo,\n scaleFrom,\n scaleTo\n }: TTransitionEffectParams):void {\n const _transition_ = this;\n logger.info(\"EXECUTING TransitionEffect \");\n const componentRoot =_transition_.component.componentRoot as IQCObjectsElement | IQCObjectsShadowedElement | HTMLElement | ShadowRoot;\n\n if (typeof componentRoot !== \"undefined\" && componentRoot !== null){\n if (_transition_.fitToHeight) {\n (componentRoot as any).height = (typeof (componentRoot as HTMLElement).offsetParent === \"object\" && (componentRoot as HTMLElement).offsetParent !== null) ? ((componentRoot as HTMLElement).offsetParent?.scrollHeight) : ((componentRoot as HTMLElement).getBoundingClientRect().height);\n }\n if (_transition_.fitToWidth) {\n (componentRoot as any).width = (typeof (componentRoot as HTMLElement).offsetParent === \"object\" && (componentRoot as HTMLElement).offsetParent !== null) ? ((componentRoot as HTMLElement).offsetParent?.scrollWidth) : ((componentRoot as HTMLElement).getBoundingClientRect().width);\n }\n if (_transition_.component.shadowed){\n ((componentRoot as ShadowRoot).host as HTMLElement).style.display = \"block\";\n } else {\n (componentRoot as HTMLElement).style.display = \"block\";\n }\n _transition_.effects.map( (effectClassName:string):string => {\n\n const __effectClass__ = ClassFactory(effectClassName) as unknown as typeof Effect;\n const effectObj = new __effectClass__({});\n const effectClassMethod = effectObj.apply.bind(_transition_);\n const componentHost = (_transition_.component.shadowed)? ((componentRoot as ShadowRoot).host) : (componentRoot);\n const effectParams = {\n alphaFrom,\n alphaTo,\n angleFrom,\n angleTo,\n radiusFrom,\n radiusTo,\n scaleFrom,\n scaleTo\n }; \n effectClassMethod(componentHost,...Object.values(effectParams));\n return effectClassName;\n });\n \n }\n\n }\n\n}\n\nPackage(\"com.qcobjects.effects.transitions.base\", [\n TransitionEffect\n]);\n", "import { ITimer, TTimerParams } from \"./types/global\";\nimport { InheritClass } from \"./InheritClass\";\nimport { Package } from \"./Package\";\n\nexport class Timer extends InheritClass implements ITimer {\n\n\n duration = 1000;\n alive = true;\n thread({\n timing,\n intervalInterceptor,\n duration\n }:TTimerParams):void {\n const timer = this;\n\n const start = performance.now();\n\n requestAnimationFrame(function thread(time) {\n // timeFraction goes from 0 to 1\n const elapsed = (time - start);\n let timeFraction = elapsed / duration;\n if (timeFraction > 1) timeFraction = 1;\n\n // calculate the current progress state\n const progress = timing(timeFraction, elapsed);\n\n intervalInterceptor(Math.round(progress * 100)); // draw it\n\n if ((timeFraction < 1 || duration === -1) && timer.alive) {\n requestAnimationFrame(thread);\n }\n\n });\n }\n\n\n }\n\nPackage(\"com.qcobjects.timing\", [\n Timer\n ]);\n", "import { TDDOParams } from \"./types/global\";\nimport { Export } from \"./Export\";\nimport { InheritClass } from \"./InheritClass\";\nimport { logger } from \"./Logger\";\nimport { ObjectName } from \"./ObjectName\";\n\n/**\n * Dynamic Data Objects Class\n * Usage:\n * Class('TestDDO',{\n * data: {},\n * _new_ (){\n * this.ddo = New(DDO,{\n * instance:this,\n * name:'data',\n * value:{},\n * fget (value){\n * logger.debug('returned value '+ value );\n * }\n * })\n * }\n * });\n *\n */\nexport class DDO extends InheritClass {\n constructor({\n instance,\n name,\n fget,\n fset,\n value\n }:TDDOParams) {\n super({\n instance,\n name,\n fget,\n fset,\n value\n });\n this._new_({\n instance,\n name,\n fget,\n fset,\n value\n });\n\n }\n\n _new_({\n instance,\n name,\n fget,\n fset\n }:TDDOParams):void {\n const ddoInstance = this;\n var name = (typeof name === \"undefined\") ? (ObjectName(ddoInstance)) : (name);\n\n Object.defineProperty(instance, name, {\n set(val) {\n const _value = val;\n logger.debug(\"value changed \" + name);\n let ret;\n if (typeof fset !== \"undefined\" && typeof fset === \"function\") {\n ret = fset(_value);\n } else {\n ret = _value;\n }\n instance[\"_\" + name] = ret;\n \n },\n get():any {\n const _value = instance[\"_\" + name];\n logger.debug(\"returning value \" + name);\n const is_ddo = (v:any):any => {\n if (typeof v === \"object\" && Object.hasOwn(v, \"value\")) {\n return v.value;\n }\n return v;\n };\n let ret;\n if (typeof fget !== \"undefined\" && typeof fget === \"function\") {\n ret = fget(is_ddo(_value));\n } else {\n ret = is_ddo(_value);\n }\n return ret;\n }\n });\n }\n\n}\nExport(DDO);\n", "import { InheritClass } from \"./InheritClass\";\nimport { logger } from \"./Logger\";\nimport { Package } from \"./Package\";\nexport class Toggle extends InheritClass {\n _toggle = false;\n _inverse = true;\n _positive:Function|null = null;\n _negative:Function|null = null;\n _dispatched:Function|null = null;\n _args = {};\n\n constructor(positive: Function, negative: Function, args: Array) {\n super({positive, negative, args});\n this._new_({positive, negative, args});\n }\n\n changeToggle():void {\n this._toggle = !(this._toggle);\n }\n\n _new_({\n positive,\n negative,\n args\n }:{positive: Function, negative: Function, args: Array}):void {\n this._positive = positive;\n this._negative = negative;\n this._args = args;\n }\n\n fire():Promise {\n const toggle = this;\n var _promise = new Promise(function (resolve, reject) {\n\n if (typeof toggle._positive === \"function\" && typeof toggle._negative === \"function\") {\n if (toggle._inverse) {\n toggle._dispatched = (toggle._toggle) ? (toggle._negative.bind(toggle)) : (toggle._positive.bind(toggle));\n } else {\n toggle._dispatched = (toggle._toggle) ? (toggle._positive.bind(toggle)) : (toggle._negative.bind(toggle));\n }\n toggle._dispatched?.call(toggle, toggle._args);\n resolve.call(_promise, toggle);\n } else {\n logger.debug(\"Toggle functions are not declared\");\n reject.call(_promise, toggle as Toggle);\n }\n return toggle;\n }).then(function (toggle:Toggle) {\n toggle.changeToggle();\n return toggle;\n }).catch(function (e) {\n logger.debug(e.toString());\n return toggle;\n }).finally(()=> {\n return toggle;\n });\n return _promise;\n }\n\n\n}\n\nPackage(\"com.qcobjects.tools.essentials\", [\n Toggle\n]);\n", "export const getDocumentLayout = function ():string|undefined {\n const h = (w:number, h:number) => {\n return w > h ? \"landscape\" : null;\n };\n const v = (w:number, h:number) => {\n return h > w ? \"portrait\" : null;\n };\n const square = (w:number, h:number) => {\n return w === h ? \"square\" : null;\n };\n return [\n h(document.documentElement.clientWidth, document.documentElement.clientHeight),\n v(document.documentElement.clientWidth, document.documentElement.clientHeight),\n square(document.documentElement.clientWidth, document.documentElement.clientHeight)\n ].filter(e => e !== null).pop();\n };\n"], + "sourcesContent": ["export const __is_raw_class__ = (o_c: any): boolean => {\n return !!((typeof o_c === \"function\" && o_c.toString().startsWith(\"class\")));\n};\n", "/**\n * Returns the object or function name\n *\n * @param Object or function\n */\nexport const ObjectName = (o: any):string => {\n let ret = \"\";\n if (typeof o === \"function\" && Object.hasOwn(o, \"name\") && o.name !== \"\") {\n ret = o.name;\n } else if (typeof o !== \"undefined\" && typeof o.constructor === \"function\" && o.constructor.name !== \"\") {\n ret = o.constructor.name;\n } else if (typeof o !== \"undefined\" && typeof o.constructor === \"object\") {\n ret = o.constructor.toString().replace(/\\[(.*?)\\]/g, \"$1\").split(\" \").slice(1).join(\"\");\n }\n return ret;\n};", "import { __is_raw_class__ } from \"./is_raw_class\";\nimport { ObjectName } from \"./ObjectName\";\n\n/**\n * Determine the type of the Object for any QCObjects Object\n *\n * @param {Object} object\n */\nexport const __getType__ = function __getType__(o_c: any): any {\n let _ret_ = \"\";\n switch (true) {\n case typeof o_c === \"object\" &&\n (!!o_c.constructor &&\n !!o_c.constructor.name)\n && o_c.constructor.name !== \"\":\n _ret_ = o_c.constructor.name;\n break;\n case typeof o_c === \"function\" && !!o_c.name:\n _ret_ = o_c.name;\n break;\n case __is_raw_class__(o_c) && !!o_c.name:\n _ret_ = o_c.name;\n break;\n case (!!o_c && !!o_c.__classType) && o_c.__classType !== \"\":\n _ret_ = o_c.__classType;\n break;\n case (!!o_c && !!o_c.__definition) && (!!o_c.__definition.__classType) && o_c.__definition.__classType !== \"\":\n _ret_ = o_c.__definition.__classType;\n break;\n default:\n _ret_ = ObjectName(o_c);\n break;\n }\n return _ret_;\n};\n", "import { _top, set } from \"./top\";\ndeclare const global:any;\ndeclare const globalThis:any;\n\nexport const __make_global__ = (f:any):void => {\n if (!!f && !!f.name) {\n if (typeof _top !== \"undefined\" && typeof f !== \"undefined\" && _top !== null && !Object.hasOwn(_top,f.name)) {\n set(f.name, f);\n } else if (typeof global !== \"undefined\"){\n global[f.name] = f;\n } else if (typeof globalThis !== \"undefined\"){\n globalThis[f.name] = f;\n }\n \n }\n\n};", "import { T_QC_CLASSES, T_QC_PACKAGES } from \"@types\";\nimport { __getType__ } from \"./getType\";\nimport { __make_global__ } from \"./make_global\";\n\nexport var _QC_CLASSES: T_QC_CLASSES = {};\nexport var _QC_PACKAGES: T_QC_PACKAGES = {};\nexport var _QC_PACKAGES_IMPORTED: any[] = [];\nexport var _QC_READY_LISTENERS: any[] = [];\n\nexport const __register_class__ = function (_class_: any, __namespace?: string): any {\n const __classType = __getType__(_class_);\n let name = _class_.name || __classType;\n if (name.toLowerCase() === \"function\") {\n name = __classType;\n }\n if (typeof _class_.__definition === \"undefined\") {\n _class_.__definition = {};\n }\n _class_.__definition.__classType = __classType;\n if (typeof __namespace !== \"undefined\") {\n _class_.__definition.__namespace = __namespace;\n }\n _QC_CLASSES[name] = _class_;\n __make_global__(_class_);\n return _QC_CLASSES[name];\n};\n\nexport const get_QC_CLASS = (name:string):any => {\n return _QC_CLASSES[name];\n};\n\nconst _get_packages_names = function (_packages: any): T[] {\n let _keys: any[] = [];\n for (const _k of Object.keys(_packages)) {\n if (\n typeof _packages[_k] !== \"undefined\" &&\n typeof _packages[_k] !== \"function\" &&\n Object.hasOwn(_packages[_k], \"length\") &&\n _packages[_k].length > 0\n ) {\n _keys.push(_k);\n _keys = _keys.concat(_get_packages_names(_packages[_k]));\n }\n }\n return _keys as T[];\n};\n\n\nexport const getPackagesNamesList = (): any[] => {\n return _get_packages_names(_QC_PACKAGES);\n};\n\nexport const getPackagesList = (): any[] => {\n return [...getPackagesNamesList()].map((packagename: string): T => {\n const _classesList: any[] = _QC_PACKAGES[packagename] as any[];\n let _ret_: any = undefined;\n if (_classesList) {\n _ret_ = {\n packageName: packagename,\n classesList: _classesList.filter(function (): boolean {\n return true;\n })\n };\n }\n return _ret_ as T;\n }).filter(function (_p: any): boolean {\n return typeof _p !== \"undefined\";\n });\n};\n\nexport const getClassesList = (): any[] => {\n let _classesList: any[] = [];\n [...getPackagesList()].forEach(function (_package_element: any): T {\n _classesList = _classesList.concat(_package_element.classesList.map(\n (_class_element: any) => {\n return {\n packageName: _package_element.packageName,\n className: `${_package_element.packageName}.${__getType__(_class_element)}`,\n classFactory: _class_element\n };\n }\n ));\n return _package_element as T;\n });\n\n return _classesList;\n};\n\nexport const getClassesNamesList = (): any[] => {\n return [...getClassesList()].map((_class_element: any): T => {\n return _class_element.className as T;\n });\n};\n\nexport const set_QC_PACKAGE = (packageName: string, _qc_packages: any[]):void => {\n _QC_PACKAGES[packageName] = _qc_packages;\n};\n\n", "import { __make_global__ } from \"./make_global\";\n\nexport const Export = function (f: any):void {\n return __make_global__(f);\n};\nExport.prototype.toString = function () {\n return \"Export(function or symbol) { [QCObjects native code] }\";\n};\n", "import { logger } from \"./Logger\";\n\nasync function _import_(name:string):Promise {\n logger.debug(`Importing ${name}...`);\n function isPackage(name:string) {\n logger.debug(`Validating if ${name} is a package name...`);\n // Simple check to determine if the name is a package\n // This can be enhanced based on your specific needs\n return !name.startsWith(\".\") && !name.startsWith(\"/\") && !name.includes(\"/\");\n }\n \n try {\n // Ensure the name has a .js extension if it's not a package\n const hasExtension = /\\.[^/\\\\]+$/.test(name);\n if (!hasExtension && !isPackage(name)) {\n logger.debug(`${name} does not have an extension and is not a package. Adding js extension.`);\n name += \".js\";\n }\n \n const m:any = await import(name);\n return m;\n } catch (error:any) {\n logger.warn(`Failed to load module: ${error}`);\n }\n }\n \nexport {_import_};", "import { _import_ } from \"./_import_\";\nimport { logger } from \"./Logger\";\n\nexport const isDeno:boolean = (typeof window !== \"undefined\" && \"Deno\" in window);\nexport const isBrowser:boolean = (typeof window !== \"undefined\" && typeof window.self !== \"undefined\" && window === window.self) && !isDeno;\nexport const isNodeCommonJS:boolean = (typeof module !== \"undefined\");\n// eslint-disable-next-line no-unused-vars\nexport const deno_require = (name:string):void => { /* not yet implemented */};\nexport const _require_ = (name:string):any => {\n \n return (isDeno)?(deno_require(name)):(\n ( (name):any => {\n let r:any;\n try {\n (async () => {\n r = await _import_(name);\n })().then((m:any) => {\n r = (m && m.default) || m;\n })\n .catch ((e:any) => {\n logger.warn(`An error ocurred: ${e}`);\n });\n\n } catch (e:any) {\n logger.debug(`An error ocurred importing module. ${e}`);\n r = {export:{}};\n }\n return r;\n } ) (name)\n );\n};\ndeclare const cordova: any;\n\nexport const is_phonegap:boolean = (\n function () {\n return (typeof cordova !== \"undefined\");\n }\n)();", "import { Export } from \"./Export\";\nimport { isBrowser } from \"./platform\";\n\nexport class Logger {\n debugEnabled = true;\n infoEnabled = true;\n warnEnabled = true;\n debug(message: string): void {\n if (this.debugEnabled) {\n console.log(\"\\x1b[35m%s\\x1b[0m\", `[DEBUG][${performance.now().toLocaleString()}] ${message}`);\n }\n }\n\n info(message: string): void {\n let color;\n if (this.infoEnabled) {\n if (isBrowser) {\n color = \"\\x1b[103m%s\\x1b[0m\";\n } else {\n color = \"\\x1b[33m%s\\x1b[0m\";\n }\n console.info(color, `[INFO][${performance.now().toLocaleString()}] ${message}`);\n }\n }\n\n warn(message: string): void {\n if (this.warnEnabled) {\n console.warn(\"\\x1b[31m%s\\x1b[0m\", `[WARN][${performance.now().toLocaleString()}] ${message}`);\n }\n }\n}\n\nexport const logger: Logger = new Logger();\nExport(logger);", "import { logger } from \"./Logger\";\n\n/**\n * Casts an object to another object class type\n *\n * @param {Object} obj_source\n * @param {Object} obj_dest\n */\nexport const _Cast = function (obj_source: any, obj_dest: any):any {\n for (const v in obj_source) {\n if (typeof obj_source[v] !== \"undefined\") {\n try {\n obj_dest[v] = obj_source[v];\n } catch (e:any) {\n logger.debug(`An error ocurred: ${e}.`);\n logger.warn(`Unable to cast ${(typeof obj_source).toString()}.${typeof v.toString()} to ${(typeof obj_dest).toString()}.${typeof v.toString()}`);\n }\n }\n }\n return obj_dest;\n};\n\n/**\n * Casts an object to another object class type. Only properties\n *\n * @param {Object} obj_source\n * @param {Object} obj_dest\n */\nexport const _CastProps = function (obj_source: any, obj_dest: any, _ignoreError:boolean = true):any {\n for (const v in obj_source) {\n if (typeof obj_source[v] !== \"undefined\" && typeof obj_source[v] !== \"function\") {\n try {\n obj_dest[v] = obj_source[v];\n } catch (e:any) {\n if (!_ignoreError){\n logger.debug(`An error ocurred: ${e}.`);\n }\n }\n } else if (typeof obj_source[v] === \"function\") {\n try {\n obj_dest[v] = obj_source[v].bind(obj_dest);\n } catch (e:any) {\n logger.warn(e);\n }\n }\n }\n return obj_dest;\n};\n", "import { IQCObjectsElement } from \"@types\";\nimport { isBrowser } from \"./platform\";\n\nexport const _DOMCreateElement = function (elementName: string, props?: any[], children?: any): IQCObjectsElement {\n let _ret_;\n if (isBrowser) {\n _ret_ = _DOMCreateComplexElement(elementName, props, children) as unknown as IQCObjectsElement;\n } else {\n _ret_ = {} as IQCObjectsElement;\n }\n return _ret_;\n};\n\n\nconst ComplexTypeCall = (_type: Function, { props, children }: { props?: any[], children?: any }): IQCObjectsElement => {\n return _type({ props, children }) as IQCObjectsElement;\n};\nexport const _DOMCreateComplexElement = (_type: string | Function, props?: any[], children?: any): HTMLElement | IQCObjectsElement => {\n\n if (typeof _type !== \"string\") {\n return ComplexTypeCall(_type, { props, children });\n }\n const element = document.createElement(_type);\n\n if (props) {\n Object.entries(props).forEach(([key, value]) => {\n if (typeof value === \"string\" || typeof value === \"number\") {\n element.setAttribute(key, value.toString());\n } else if (typeof value === \"function\" && key.toLowerCase().startsWith(\"on\")) {\n element.addEventListener(key.slice(2).toLowerCase(), value.bind(element));\n }\n });\n }\n\n if (Array.isArray(children)) {\n children.filter((child => child instanceof Node)).forEach(child => {\n element.appendChild(child);\n });\n } else if (children instanceof Node) {\n element.appendChild(children);\n } else if (typeof children === \"string\") {\n element.innerHTML = children;\n }\n\n return element;\n};\n", "/**\n * Primary instance ID of all objects\n */\nexport var __instanceID = 0;\n\nexport const IncrementInstanceID = (): void => {\n __instanceID = (typeof __instanceID === \"undefined\" || __instanceID === null) ? (0) : (__instanceID + 1);\n};\n", "export const _protected_code_ = (_: any): void => {\n const __oldtoString = (typeof _.prototype !== \"undefined\") ? (_.prototype.toString) : (function () {\n return \"\";\n });\n if (typeof _.prototype !== \"undefined\") {\n _.prototype.toString = function (): string {\n const _protected_symbols = [\n \"__qcobjects__\",\n \"__qcobjects_sdk__\",\n \"__loaded__\",\n \"ComplexStorageCache\",\n \"css\",\n \"append\",\n \"attachIn\",\n \"debug\",\n \"info\",\n \"warn\",\n \"QC_Append\",\n \"set\",\n \"get\",\n \"done\",\n \"componentDone\",\n \"_new_\",\n \"__new__\",\n \"Class\",\n \"ClassFactory\",\n \"New\",\n \"Export\",\n \"Package\",\n \"Import\",\n \"subelements\",\n \"componentLoader\",\n \"buildComponents\",\n \"Controller\",\n \"View\",\n \"VO\",\n \"Service\",\n \"serviceLoader\",\n \"JSONService\",\n \"ConfigService\",\n \"SourceJS\",\n \"SourceCSS\",\n \"ArrayList\",\n \"ArrayCollection\",\n \"Effect\",\n \"Timer\",\n \"sum\",\n \"avg\",\n \"table\",\n \"max\",\n \"min\",\n \"range\",\n \"matrix\",\n \"matrix2d\",\n \"matrix3d\",\n \"unique\",\n \"uniqueId\",\n \"shortCode\",\n \"NamespaceRef\"\n ];\n let _ret_;\n if (_protected_symbols.includes(this.name)) {\n _ret_ = this.name + \"{ [QCObjects native code] }\";\n } else {\n _ret_ = __oldtoString.call(this);\n }\n return _ret_ as string;\n };\n }\n};\n(_protected_code_)(Function);\nexport const _methods_ = function (_: any): T[] {\n const _m = [];\n for (const i in _) {\n if ((typeof _[i]).toLowerCase() === \"function\") {\n _m.push(_[i]);\n }\n }\n return _m as T[];\n};\n", "import { __is_raw_class__ } from \"./is_raw_class\";\nimport {_QC_PACKAGES, set_QC_PACKAGE, __register_class__ } from \"./PrimaryCollections\";\n\n/**\n * Defines a package for Class classification\n *\n * @param {Object} namespace\n * @param {Object} classes\n */\nexport const Package = (namespace: string, classes: any[] = []): any[] => {\n\n if (Object.hasOwn(_QC_PACKAGES, namespace) &&\n typeof _QC_PACKAGES[namespace] !== \"undefined\" &&\n typeof _QC_PACKAGES[namespace] !== \"string\" &&\n Object.hasOwn(_QC_PACKAGES[namespace], \"length\") &&\n _QC_PACKAGES[namespace].length > 0 &&\n typeof classes !== \"undefined\" &&\n Object.hasOwn(classes, \"length\") &&\n classes.length > 0\n ) {\n classes.forEach((_class_: any) => {\n __register_class__(_class_, namespace);\n });\n set_QC_PACKAGE(namespace, _QC_PACKAGES[namespace].concat(classes));\n } else if (typeof classes !== \"undefined\"\n && typeof classes !== \"undefined\"\n && Object.hasOwn(classes, \"length\")\n && classes.length > 0) {\n classes.forEach((_class_: any) => {\n __register_class__(_class_, namespace);\n });\n set_QC_PACKAGE(namespace, classes);\n } else if (__is_raw_class__(classes)) {\n if (typeof (classes as any).__definition === \"undefined\") {\n (classes as any).__definition = {};\n }\n (classes as any).__definition.__namespace = namespace;\n (classes as any).__namespace = namespace;\n __register_class__(classes, namespace);\n set_QC_PACKAGE(namespace, [classes]);\n } else {\n throw new Error (`An error ocurred. It was not possible to add classes to ${namespace}.`);\n }\n return ((Object.hasOwn(_QC_PACKAGES, namespace)) ? (_QC_PACKAGES[namespace]) : []) as any[] | [];\n};\n", "import { type IInheritClass, type IQCObjectsElement, type TBody } from \"@types\";\nimport { logger } from \"./Logger\";\nimport { __instanceID, IncrementInstanceID } from \"./IncrementInstanceID\";\nimport { _CastProps, _Cast } from \"./Cast\";\nimport { _DOMCreateElement } from \"./DOMCreateElement\";\nimport { __getType__ } from \"./getType\";\nimport { _methods_ } from \"./introspection\";\nimport { is_a } from \"./is_a\";\nimport { isBrowser } from \"./platform\";\nimport { _QC_CLASSES } from \"./PrimaryCollections\";\nimport { Package } from \"./Package\";\n\nexport class InheritClass implements IInheritClass {\n [key: string]: any;\n __definition: any;\n private _body: TBody;\n public get body(): TBody {\n return this._body;\n }\n public set body(value: TBody) {\n this._body = value;\n }\n childs: any;\n __instanceID!: number;\n\n constructor(_o_?: any) {\n\n if (typeof _o_ !== \"undefined\" && typeof _o_.__definition !== \"undefined\") {\n this.__definition = {\n ...(_o_.__definition)\n };\n }\n\n const self: this = this;\n if (typeof _o_ !== \"undefined\" && _o_ !== null) {\n Object.keys(_o_)\n .filter(function (k) {\n return isNaN(k as any) && ![\"__instanceID\", \"__classType\", \"__definition\"].includes(k);\n })\n .forEach(function (key) {\n if (typeof self[key] === \"function\") {\n self[key] = _o_[key].bind(self);\n } else {\n self[key] = _o_[key];\n }\n });\n }\n\n IncrementInstanceID();\n if (!self.__instanceID) {\n Object.defineProperty(self, \"__instanceID\", {\n value: __instanceID,\n writable: false\n });\n }\n\n if (typeof self.__definition !== \"undefined\") {\n Object.keys(self.__definition).filter(function (k) {\n return isNaN(k as any) && ![\"name\", \"__instanceID\", \"__classType\", \"__definition\"].includes(k);\n }).forEach(function (key) {\n if (typeof self.__definition[key] === \"function\") {\n self[key] = self.__definition[key].bind(self);\n } else {\n self[key] = self.__definition[key];\n }\n });\n }\n _methods_((_QC_CLASSES as any)[self.__classType]).map(function (m): any {\n self[(m as Function).name] = (m as Function).bind(self);\n return m;\n });\n _methods_(self.__definition).map(function (m): any {\n self[(m as Function).name] = (m as Function).bind(self);\n return m;\n });\n\n if (self.body) {\n if (typeof self.__definition === \"undefined\" || (!Object.hasOwn(self.__definition, \"body\")) || typeof self.__definition.body === \"undefined\") {\n try {\n if (isBrowser) {\n self.body = _DOMCreateElement(self.__definition.__classType);\n } else {\n self.body = {};\n }\n } catch (e: any) {\n logger.debug(`An error ocurred: ${e}.`);\n self.body = {};\n }\n } else if (Object.hasOwn(self.__definition, \"body\")) {\n self.body = self.__definition.body;\n }\n }\n\n\n try {\n self.__new__.call(self, _o_);\n if (typeof self === \"object\" && Object.hasOwn(self, \"_new_\") && typeof (self._new_ as any).isCalled === \"undefined\") {\n try {\n self._new_(_o_);\n (self._new_ as any).isCalled = true;\n } catch (e: any) {\n logger.warn(`${self.__classType}._new_() failed with error: ${e}`);\n }\n }\n } catch (e: any) {\n logger.warn(e);\n }\n }\n\n static get __classType(): any {\n return (Object.getPrototypeOf(this.constructor) as Function).name;\n }\n\n get __classType(): string {\n return this.constructor.name;\n }\n\n\n static hierarchy(__class__: any): any[] {\n const __classType = function (o_c: any): any {\n return (Object.hasOwn(o_c, \"__classType\")) ? (o_c.__classType) : (__getType__.call(__class__, o_c));\n };\n const __hierarchy__proto__ = (c: any): any[] => {\n return (typeof c !== \"undefined\" && typeof c.__proto__ !== \"undefined\" && c.__proto__ !== null) ? (((__classType(c) !== \"\") ? ([__classType(c)]) : ([])).concat(__hierarchy__proto__(c.__proto__))) : ([]);\n };\n\n if (typeof __class__ === \"undefined\" || __class__ === null) {\n __class__ = this;\n }\n let __hierarchy = [];\n __hierarchy.push(__classType(__class__));\n __hierarchy = __hierarchy.concat(__hierarchy__proto__(__class__.__proto__));\n return __hierarchy;\n }\n\n\n __namespace?: string | undefined;\n\n __new__(_o_: any): void {\n _CastProps(_o_, this);\n }\n\n // eslint-disable-next-line no-unused-vars\n _new_(_o_?: any): void { }\n\n static getParentClass(): any {\n return Object.getPrototypeOf(this.prototype.constructor);\n }\n getParentClass(): any {\n return (this.constructor as typeof InheritClass).getParentClass();\n }\n\n\n static getClass(): any {\n return Object.getPrototypeOf(this.constructor);\n }\n\n getClass(): any {\n return (this.constructor as typeof InheritClass).getClass();\n }\n\n css(_css: any): any {\n if (typeof this.body !== \"undefined\" && typeof this?.body !== \"string\" && typeof (this?.body as HTMLElement)?.style !== \"undefined\") {\n logger.debug(\"body style\");\n if (this.body) {\n (this.body as any).style = _Cast(_css, (this?.body as HTMLElement)?.style);\n }\n }\n return (typeof this.body !== \"string\") ? (this?.body as HTMLElement)?.style : {};\n }\n\n hierarchy(): any {\n const __instance__ = this;\n return (this.constructor as typeof InheritClass).hierarchy(__instance__);\n }\n\n\n append(_child?: any): void {\n const child: any = _child || this.body;\n logger.debug(\"append: start\");\n if (is_a(child, \"Component\")) {\n logger.debug(\"append: child is a Component\");\n logger.debug(`appending the body of ${child.name}`);\n }\n if (typeof this.body !== \"undefined\") {\n logger.debug(\"append element\");\n if (arguments.length > 0) {\n logger.debug(\"append to element\");\n if (typeof this.body !== \"string\") {\n if (typeof (this.body as IQCObjectsElement)?.append !== \"undefined\") {\n (this?.body as IQCObjectsElement)?.append(child);\n } else {\n throw Error(\"body.append is undefined. That means the body is not well formed.\");\n }\n } else {\n this.append(child);\n }\n if (typeof this.childs === \"undefined\") {\n this.childs = [];\n }\n this.childs.push(child);\n } else {\n if (isBrowser) {\n logger.debug(\"append to body\");\n document.body.append(child);\n }\n }\n }\n }\n\n attachIn(tag: any): void {\n if (isBrowser) {\n const tags = (document as any).subelements(tag);\n for (let i = 0, j = tags.length; i < j; i++) {\n tags[i].append(this as any);\n }\n } else {\n throw new Error(\"attachIn not yet implemented for non browser platforms\");\n }\n }\n\n}\n\nPackage(\"com.qcobjects\", [InheritClass]);", "import { InheritClass } from \"./InheritClass\";\n\nexport const isQCObjects_Object = function (_:any):boolean {\n return (!!((typeof _ === \"object\" &&\n Object.hasOwn(_, \"__classType\") &&\n (!!_.__instanceID) &&\n Object.hasOwn(_, \"__definition\") &&\n typeof _.__definition !== \"undefined\"\n ))) || _ instanceof InheritClass;\n };\n\n export const isQCObjects_Class = function (_:any):boolean {\n return (!!((typeof _ === \"function\" &&\n (!_.__instanceID) &&\n (!!_.__definition) &&\n typeof _.__definition !== \"undefined\" &&\n !!_.__definition.__classType\n ))) || _.prototype instanceof InheritClass;\n };\n", "import { __getType__ } from \"./getType\";\nimport { isQCObjects_Class, isQCObjects_Object } from \"./isQCObjects\";\nimport { ObjectName } from \"./ObjectName\";\n\n/**\n * Returns if a class or object is from a determinated type\n * @param {Object} object\n * @param {String} typeName\n */\nexport const is_a = (obj: any, typeName: string):boolean => {\n return !!((typeof obj !== \"undefined\" && obj !== null &&\n (((isQCObjects_Class(obj) || isQCObjects_Object(obj)) && (obj.hierarchy().includes(typeName))) ||\n __getType__(obj) === typeName ||\n ObjectName(obj) === typeName ||\n typeof obj === typeName)));\n};", "/**\n * Internal use to determine the forbidden names for classes\n * Reserved words\n *\n * @param {String} name\n * @param {Object} type\n * @param {Object} definition\n */\nexport const __is__forbidden_name__ = (name: string):boolean => {\n return ([\"__proto__\", \"prototype\", \"Object\", \"Map\", \"defineProperty\", \"indexOf\", \"toString\", \"__instanceID\", \"function\", \"Function\"].indexOf(name) !== -1);\n};\n", "import { __is_raw_class__ } from \"./is_raw_class\";\n\nexport const _LegacyCopy = function (obj:any, _ignore?:string[]):any {\n let _value_;\n switch (true) {\n case typeof obj === \"string\":\n _value_ = obj;\n break;\n case typeof obj === \"number\":\n _value_ = obj;\n break;\n case typeof obj === \"object\":\n _value_ = [{...Object.keys(obj).filter(k => !_ignore?.includes(k))}]\n .map(k => {return {[k as never]:obj[k as never]}; })\n .reduce ((p, c) => Object.assign(p, c)) as any;\n break;\n case typeof obj === \"function\":\n _value_ = obj.bind({});\n break;\n case __is_raw_class__(obj):\n _value_ = class extends obj { };\n break;\n default:\n break;\n }\n return _value_;\n };\n", "import { _QC_CLASSES } from \"./PrimaryCollections\";\nimport { _Cast, _CastProps } from \"./Cast\";\nimport { _DOMCreateElement } from \"./DOMCreateElement\";\nimport { __getType__ } from \"./getType\";\nimport { __instanceID, IncrementInstanceID } from \"./IncrementInstanceID\";\nimport { _methods_ } from \"./introspection\";\nimport { is_a } from \"./is_a\";\nimport { __is__forbidden_name__ } from \"./is_forbidden_name\";\nimport { _LegacyCopy } from \"./LegacyCopy\";\nimport { logger } from \"./Logger\";\nimport { isBrowser } from \"./platform\";\nimport { IQCObjectsElement, TBody, TClass } from \"@types\";\nimport { InheritClass } from \"./InheritClass\";\nimport { _top } from \"./top\";\n\n/**\n * Creates new object class of another object\n *\n * @param {String} name\n * @param {Object} type\n * @param {Object} definition\n * \n * @example \n * Class (name, type, definition)\n * Class (name, type)\n * Class (name, definition)\n * Class ()\n * \n * \n * const MyClass = Class (\"MyComponent\", Component, {\n * name: \"one_component\",\n * method1 : () => {console.log (\"done\") }\n * })\n * const myClassInstance = new MyClass ({name: \"one_component\"})\n * \n * const MyClass = Class (\"MyService\",{\n * name: \"myservice\",\n * })\n * \n * const myClassInstance = new MyClass ({name: \"myservice\"})\n */\n\n\n\nexport const Class: TClass = (name?: string, _type?: unknown, _definition?: unknown): InheritClass => {\n const _types_ = {};\n let type: unknown, definition: unknown;\n\n switch (true) {\n case !name && !_type && !_definition:\n return class { } as unknown as InheritClass;\n case !!name && !_type && !_definition:\n type = class { };\n definition = {};\n break;\n case !!name && !_type && !!_definition:\n type = class { };\n definition = _definition;\n break;\n case !!name && !!_type && !!_definition:\n type = _type;\n definition = _definition;\n break;\n default:\n return class { } as unknown as InheritClass;\n }\n if (typeof name !== \"string\") {\n throw new Error(\"Class name must be a string\");\n }\n\n if (typeof type !== \"function\") {\n throw new Error(\"Class type must be a function or class\");\n }\n\n if (__is__forbidden_name__(name)) {\n throw new Error(`${name} is not an allowed word in the name of a class`);\n }\n\n if (typeof (type as any).__definition === \"object\"\n && (type as any).__definition\n && Object.keys((type as any).__definition).length !== 0) {\n (definition as any).__definition = Object.assign(_LegacyCopy((type as any).__definition,[\"name\"]), type);\n }\n\n (_types_ as any)[type.name] = type;\n\n if (typeof definition === \"undefined\" || definition === null) {\n definition = {};\n } else {\n definition = { ...definition };\n }\n\n /* hack to prevent duplicate __instanceID */\n if (typeof (definition as any).__instanceID !== \"undefined\") {\n delete (definition as any).__instanceID;\n }\n\n _QC_CLASSES[name] = class extends (_types_ as any)[type.name] {\n __instanceID!: number;\n __namespace?: string | undefined;\n __definition: any = {\n ...(definition as any)\n };\n childs: any;\n private _body: TBody;\n public get body(): TBody {\n return this._body;\n }\n public set body(value: TBody) {\n this._body = value;\n }\n\n static get __classType(): any {\n return (Object.getPrototypeOf(this.constructor) as Function).name;\n }\n\n get __classType(): string {\n return this.constructor.name;\n }\n\n static hierarchy(__class__: any): any[] {\n const __classType = function (o_c: any): any {\n return (Object.hasOwn(o_c, \"__classType\")) ? (o_c.__classType) : (__getType__.call(__class__, o_c));\n };\n const __hierarchy__proto__ = (c: any): any[] => {\n return (typeof c !== \"undefined\" && typeof c.__proto__ !== \"undefined\" && c.__proto__ !== null) ? (((__classType(c) !== \"\") ? ([__classType(c)]) : ([])).concat(__hierarchy__proto__(c.__proto__))) : ([]);\n };\n\n if (typeof __class__ === \"undefined\" || __class__ === null) {\n __class__ = this;\n }\n let __hierarchy = [];\n __hierarchy.push(__classType(__class__));\n __hierarchy = __hierarchy.concat(__hierarchy__proto__(__class__.__proto__));\n return __hierarchy;\n }\n\n static getParentClass(): any {\n return Object.getPrototypeOf(this.prototype.constructor);\n }\n\n constructor(_o_?: any) {\n super(_o_ || {});\n\n const self = this;\n IncrementInstanceID();\n if (!(self as any).__instanceID) {\n Object.defineProperty(self, \"__instanceID\", {\n value: __instanceID,\n writable: false\n });\n }\n\n if (typeof self.__definition !== \"undefined\") {\n Object.keys(self.__definition).filter(function (k) {\n return isNaN(k as any) && ![\"name\", \"__instanceID\", \"__classType\", \"__definition\"].includes(k);\n }).forEach(function (key) {\n if (typeof self.__definition[key] === \"function\") {\n self[key] = self.__definition[key].bind(self);\n } else {\n self[key] = self.__definition[key];\n }\n });\n }\n _methods_(_QC_CLASSES[self.__classType]).map(function (m: unknown): T {\n self[(m as Function).name] = (m as Function).bind(self);\n return m as T;\n });\n _methods_(self.__definition).map(function (m): any {\n self[(m as Function).name] = (m as Function).bind(self);\n return m;\n });\n\n if (self.body) {\n if (typeof self.__definition === \"undefined\" || (!Object.hasOwn(self.__definition, \"body\")) || typeof self.__definition.body === \"undefined\") {\n try {\n if (isBrowser) {\n self.body = _DOMCreateElement(self.__definition.__classType);\n } else {\n self.body = {};\n }\n } catch (e: any) {\n logger.debug(`An error ocurred: ${e}.`);\n self.body = {};\n }\n } else if (Object.hasOwn(self.__definition, \"body\")) {\n self.body = self.__definition.body;\n }\n }\n\n\n try {\n if (typeof self.__new__ === \"function\") {\n self.__new__.call(self, _o_);\n } else if (typeof super.__new__ === \"function\") {\n self.__new__ = super.__new__.bind(self);\n self.__new__.call(self, _o_);\n }\n if (typeof self === \"object\" && Object.hasOwn(self, \"_new_\") && typeof (self._new_ as any).isCalled === \"undefined\") {\n try {\n self._new_(_o_);\n (self._new_ as any).isCalled = true;\n } catch (e: any) {\n logger.warn(`${self.__classType}._new_() failed with error: ${e}`);\n }\n }\n } catch (e: any) {\n logger.warn(e);\n }\n }\n\n __new__(_o_: any) {\n _CastProps(_o_, this);\n }\n\n // eslint-disable-next-line no-unused-vars\n _new_(_o_?: any) { }\n\n getClass(): any {\n return Object.getPrototypeOf(this.constructor);\n }\n\n css(_css: any): any {\n if (typeof this.body !== \"undefined\" && typeof this?.body !== \"string\" && typeof (this?.body as HTMLElement)?.style !== \"undefined\") {\n logger.debug(\"body style\");\n if (this.body) {\n (this.body as any).style = _Cast(_css, (this?.body as HTMLElement)?.style);\n }\n }\n return (typeof this.body !== \"string\") ? (this?.body as HTMLElement)?.style : {};\n }\n\n hierarchy(): any {\n const __instance__ = this;\n return this.getClass()?.hierarchy(__instance__);\n }\n\n\n append(_child?: any) {\n const child: any = _child || this.body;\n logger.debug(\"append: start\");\n if (is_a(child, \"Component\")) {\n logger.debug(\"append: child is a Component\");\n logger.debug(`appending the body of ${child.name}`);\n }\n if (typeof this.body !== \"undefined\") {\n logger.debug(\"append element\");\n if (arguments.length > 0) {\n logger.debug(\"append to element\");\n if (typeof this.body !== \"string\") {\n if (typeof (this.body as IQCObjectsElement)?.append !== \"undefined\") {\n (this?.body as IQCObjectsElement)?.append(child);\n } else {\n throw Error(\"body.append is undefined. That means the body is not well formed.\");\n }\n } else {\n this.append(child);\n }\n if (typeof this.childs === \"undefined\") {\n this.childs = [];\n }\n this.childs.push(child);\n } else {\n if (isBrowser) {\n logger.debug(\"append to body\");\n document.body.append(child);\n }\n }\n }\n }\n\n attachIn(tag: any) {\n if (isBrowser) {\n const tags = (document as any).subelements(tag);\n for (let i = 0, j = tags.length; i < j; i++) {\n tags[i].append(this as any);\n }\n } else {\n throw new Error(\"attachIn not yet implemented for non browser platforms\");\n }\n }\n\n };\n\n // remove the keys from definition that exist in the prototype\n\n _QC_CLASSES[name] = _CastProps(definition, _QC_CLASSES[name]);\n _QC_CLASSES[name].__definition = definition;\n _QC_CLASSES[name].__definition.__classType = name;\n\n (_top as any)[name] = _QC_CLASSES[name];\n\n return _QC_CLASSES[name] as InheritClass;\n};\nif (typeof Class.prototype !== \"undefined\") {\n Class.prototype.toString = function () {\n return \"Class(name, type, definition) { [QCObjects native code] }\";\n };\n}\n\n", "/**\n * Returns the QCObjects Class Factory of a given ClassName\n *\n * @param {String} name\n */\n\nimport { __is_raw_class__ } from \"./is_raw_class\";\nimport { _QC_CLASSES, _QC_PACKAGES, get_QC_CLASS } from \"./PrimaryCollections\";\nimport { TClassFactory } from \"@types\";\n\nexport const ClassFactory:TClassFactory = (className:string):any => {\n let _classFactory;\n if (typeof className === \"undefined\" || className === null) {\n throw Error (\"You need to pass a parameter {className}\");\n }\n if (className !== null && className.indexOf(\".\") !== -1) {\n const packageName = className.split(\".\").slice(0, className.split(\".\").length - 1).join(\".\");\n const _className = className.split(\".\").slice(-1).join(\"\");\n const _package = _QC_PACKAGES[packageName] || [];\n const packageClasses = _package.filter((classFactory:any) => {\n return (__is_raw_class__(classFactory));\n }).reverse();\n if (packageClasses.length > 0) {\n _classFactory = packageClasses[0];\n } else {\n throw Error(`Class ${_className} not found. Found classes: ${JSON.stringify(packageClasses)} in package ${packageName}`);\n }\n } else if (className !== null) {\n _classFactory = get_QC_CLASS(className);\n if (typeof _classFactory === \"undefined\"){\n throw new Error (`${className} is undefined.`); \n }\n } else {\n throw Error(`className is null. Unable to retrieve the class factory.\\n Not found in: \\n ${Object.keys(_QC_CLASSES).join(\"\\n\")}`);\n }\n return _classFactory;\n};\n", "export class Base64 {\n static _keyStr: string = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\n static encode(e: string): string {\n let t = \"\";\n let n: number, r: number, i: number, s: number, o: number, u: number, a: number;\n let f = 0;\n e = Base64._utf8_encode(e);\n while (f < e.length) {\n n = e.charCodeAt(f++);\n r = e.charCodeAt(f++);\n i = e.charCodeAt(f++);\n s = n >> 2;\n o = (n & 3) << 4 | r >> 4;\n u = (r & 15) << 2 | i >> 6;\n a = i & 63;\n if (isNaN(r)) {\n u = a = 64;\n } else if (isNaN(i)) {\n a = 64;\n }\n t = t + this._keyStr.charAt(s) + this._keyStr.charAt(o) + this._keyStr.charAt(u) + this._keyStr.charAt(a);\n }\n return t;\n }\n static decode(e: string): string {\n let t = \"\";\n let n: number, r: number, i: number;\n let s: number, o: number, u: number, a: number;\n let f = 0;\n e = e.replace(/[^A-Za-z0-9+/=]/g, \"\");\n while (f < e.length) {\n s = this._keyStr.indexOf(e.charAt(f++));\n o = this._keyStr.indexOf(e.charAt(f++));\n u = this._keyStr.indexOf(e.charAt(f++));\n a = this._keyStr.indexOf(e.charAt(f++));\n n = s << 2 | o >> 4;\n r = (o & 15) << 4 | u >> 2;\n i = (u & 3) << 6 | a;\n t = t + String.fromCharCode(n);\n if (u !== 64) {\n t = t + String.fromCharCode(r);\n }\n if (a !== 64) {\n t = t + String.fromCharCode(i);\n }\n }\n t = Base64._utf8_decode(t);\n return t;\n }\n static _utf8_encode(e: string): string {\n e = e.replace(/rn/g, \"n\");\n let t = \"\";\n for (let n = 0; n < e.length; n++) {\n const r = e.charCodeAt(n);\n if (r < 128) {\n t += String.fromCharCode(r);\n } else if (r > 127 && r < 2048) {\n t += String.fromCharCode(r >> 6 | 192);\n t += String.fromCharCode(r & 63 | 128);\n } else {\n t += String.fromCharCode(r >> 12 | 224);\n t += String.fromCharCode(r >> 6 & 63 | 128);\n t += String.fromCharCode(r & 63 | 128);\n }\n }\n return t;\n }\n static _utf8_decode(e: string): string {\n let t = \"\";\n let n = 0;\n let r = 0;\n let c2 = 0;\n let c3: number;\n while (n < e.length) {\n r = e.charCodeAt(n);\n if (r < 128) {\n t += String.fromCharCode(r);\n n++;\n } else if (r > 191 && r < 224) {\n c2 = e.charCodeAt(n + 1);\n t += String.fromCharCode((r & 31) << 6 | c2 & 63);\n n += 2;\n } else {\n c2 = e.charCodeAt(n + 1);\n c3 = e.charCodeAt(n + 2);\n t += String.fromCharCode((r & 15) << 12 | (c2 & 63) << 6 | c3 & 63);\n n += 3;\n }\n }\n return t;\n }\n};", "import { isBrowser } from \"./platform\";\nimport process from \"node:process\";\n\nexport var _basePath_:string = (\n function ():string {\n let _basePath:string = \"\";\n if (isBrowser) {\n const baseURI:string[] = document.baseURI.split(\"?\")[0].split(\"/\");\n baseURI.pop();\n _basePath = baseURI.join(\"/\") + \"/\";\n } else {\n if (typeof process !== \"undefined\") {\n _basePath = `${(process).cwd()}/`;\n } else {\n _basePath = \"\";\n }\n }\n return _basePath;\n }\n )();\n\nexport const setBasePath = (value:string):void => { _basePath_ = value;};", "import { _LegacyCopy } from \"./LegacyCopy\";\n\nexport const _DataStringify = (data: any): string => {\n const getCircularReplacer = function () {\n const seen = new WeakSet();\n let _level = 0;\n return function (key: string, value: any): any {\n if (typeof value === \"object\" && value !== null) {\n if (seen.has(value)) {\n _level += 1;\n return (_level <= 3) ? (_LegacyCopy(value)) : (null);\n }\n seen.add(value);\n }\n return value;\n };\n };\n return JSON.stringify(data, getCircularReplacer());\n};\n", "export const _domain_:string = (typeof location !== \"undefined\" && location.hostname !== \"\") ? (location.hostname) : (\"localhost\");\n", " /**\n * Creates an object from a Class definition\n *\n * @param {QC_Object} o\n * @param {Object} args\n */\n\n export const New = function (__class__:any, args = {}):any {\n args = (arguments.length > 1) ? (args) : ({});\n return (typeof __class__ === \"undefined\") ? (new Object()) : (new __class__(args));\n };\n \n New.prototype.toString = function () {\n return \"New(QCObjectsClassName, args) { [QCObjects native code] }\";\n };", "import { isBrowser } from \"./platform\";\n\nexport const _secretKey:string = (isBrowser)?(location.host):(\"secret\");", "import { _ICrypt } from \"@types\";\nimport { Base64 } from \"./Base64\";\nimport { _DataStringify } from \"./DataStringify\";\nimport { InheritClass } from \"./InheritClass\";\nimport { Package } from \"./Package\";\nimport { _secretKey } from \"./secretKey\";\n\n\nexport class _Crypt extends InheritClass implements _ICrypt {\n string: string = \"\";\n key: string = \"\";\n // eslint-disable-next-line no-unused-vars\n encrypt(_string_: string, key: string): string {\n throw new Error(\"Method not implemented.\");\n }\n // eslint-disable-next-line no-unused-vars\n decrypt(_string_: string, key: string): string {\n throw new Error(\"Method not implemented.\");\n }\n last_string = \"\";\n last_key = \"\";\n construct = false;\n _new_(o: { string?: string; key: string; }):void {\n const string = o.string;\n let key: string = (Object.hasOwn(o, \"key\")) ? (o.key) : (\"\");\n this.__new__(o);\n key = (key === \"\") ? (this.__instanceID.toString()) : (key);\n this.last_key = key;\n this.last_string = string as string;\n this.construct = true;\n }\n _encrypt(): string {\n const string = this.string;\n const key = this.key;\n let result = \"\";\n let char;\n let keychar;\n for (let i = 0; i < string.length; i++) {\n char = string.substr(i, 1);\n keychar = key.substr((i % key.length) - 1, 1);\n char = String.fromCharCode(char.charCodeAt(0) + keychar.charCodeAt(0));\n result += char;\n }\n this.last_string = Base64.encode(result);\n return this.last_string;\n }\n _decrypt(): string {\n let string = this.string;\n const key = this.key;\n let result = \"\";\n let char;\n let keychar;\n string = Base64.decode(string);\n for (let i = 0; i < string.length; i++) {\n char = string.substr(i, 1);\n keychar = key.substr((i % key.length) - 1, 1);\n char = String.fromCharCode(char.charCodeAt(0) - keychar.charCodeAt(0));\n result += char;\n }\n\n this.last_string = result;\n return this.last_string;\n }\n static encrypt(string: string, key: string): string {\n const crypt = new _Crypt({\n string,\n key: (key !== \"\") ? (key) : (\"12345678ABC\")\n });\n return crypt._encrypt();\n }\n static decrypt(string: string, key: string):string {\n const crypt = new _Crypt({\n string,\n key: (key !== \"\") ? (key) : (\"12345678ABC\")\n });\n return crypt._decrypt();\n }\n}\n\nexport const _CryptObject = function (o: any): string {\n return _Crypt.encrypt(_DataStringify(o), _secretKey);\n};\nexport const _DecryptObject = function (s: string): any {\n return (s === \"\") ? ({}) : (JSON.parse(_Crypt.decrypt(s, _secretKey)));\n};\n\nPackage(\"com.qcobjects\", [_Crypt]);", "import { _basePath_ } from \"./basePath\";\nimport { InheritClass } from \"./InheritClass\";\nimport { Package } from \"./Package\";\n\ntype TConfigSettings = {\n [key: string]: any,\n relativeImportPath:string,\n remoteImportsPath:string,\n remoteSDKPath:string,\n asynchronousImportsLoad:boolean,\n removePackageScriptAfterLoading:boolean,\n componentsBasePath:string,\n delayForReady:number,\n preserveComponentBodyTag:false,\n useConfigService:false,\n routingWay:string,\n useSDK:boolean,\n useLocalSDK:boolean,\n basePath:string\n};\n\n\nexport class ConfigSettings extends InheritClass {\n public _CONFIG: TConfigSettings = {\n \"relativeImportPath\": \"\",\n \"remoteImportsPath\": \"\",\n \"remoteSDKPath\": \"https://sdk.qcobjects.dev/\",\n \"asynchronousImportsLoad\": false,\n \"removePackageScriptAfterLoading\": true,\n \"componentsBasePath\": \"\",\n \"delayForReady\": 0,\n \"preserveComponentBodyTag\": false,\n \"useConfigService\": false,\n \"routingWay\": \"hash\",\n \"useSDK\": true,\n \"useLocalSDK\": false,\n \"basePath\": _basePath_\n };\n protected static _instance: ConfigSettings;\n public _CONFIG_ENC = \"\";\n\n set(name:string, value:any):void {\n this._CONFIG[name] = value;\n }\n\n get(name:string, _defaultValue?:any):any {\n return this._CONFIG[name] || _defaultValue;\n }\n\n static get instance():ConfigSettings {\n\n if (typeof ConfigSettings._instance === \"undefined\") {\n ConfigSettings._instance = new ConfigSettings();\n }\n\n return ConfigSettings._instance;\n }\n\n\n}\n\nPackage(\"com.qcobjects\", [ConfigSettings]);\n", "import { setBasePath } from \"./basePath\";\nimport { _CastProps } from \"./Cast\";\nimport { _Crypt, _CryptObject, _DecryptObject } from \"./Crypt\";\nimport { _DataStringify } from \"./DataStringify\";\nimport { logger } from \"./Logger\";\nimport { GlobalProcessor as Processor } from \"./Processor\";\nimport { _secretKey } from \"./secretKey\";\nimport { Package } from \"./Package\";\nimport { InheritClass } from \"./InheritClass\";\nimport { ICONFIG } from \"@types\";\nimport { ConfigSettings } from \"./ConfigSettings\";\n\n\nexport class CONFIG extends InheritClass implements ICONFIG {\n\n get _CONFIG_ENC(): string {\n return ConfigSettings.instance._CONFIG_ENC;\n }\n\n get _CONFIG(): unknown {\n return ConfigSettings.instance._CONFIG as unknown;\n }\n\n set(name: string, value: unknown):void {\n logger.debug(`CONFIG.set ${name}: ${value as string}`);\n // hack to force update basePath from CONFIG\n if (name === \"basePath\") {\n setBasePath(value as string);\n }\n let _conf;\n try {\n _conf = (\n function (config): any {\n if (config._CONFIG_ENC === null) {\n config._CONFIG_ENC = _Crypt.encrypt(_DataStringify({}), _secretKey);\n }\n const _protectedEnc = config._CONFIG_ENC.valueOf();\n const _protectedConf = config._CONFIG?.valueOf();\n return _CastProps(_protectedConf, _DecryptObject(_protectedEnc));\n }\n )(ConfigSettings.instance);\n } catch (e) {\n _conf = {};\n console.error(e);\n logger.debug(\"failed to encrypt config\");\n }\n\n _conf[name] = value;\n ConfigSettings.instance._CONFIG_ENC = _CryptObject(_conf);\n ConfigSettings.instance.set(name, value);\n }\n\n get(name: string, _default?: unknown): any {\n let _value;\n try {\n const _conf = (\n function (config): any {\n if (config._CONFIG_ENC === null) {\n config._CONFIG_ENC = _Crypt.encrypt(_DataStringify({}), _secretKey);\n }\n const _protectedEnc = config._CONFIG_ENC.valueOf();\n const _protectedConf = config._CONFIG.valueOf();\n return _CastProps(_protectedConf, _DecryptObject(_protectedEnc));\n }\n )(ConfigSettings.instance);\n if (typeof _conf[name] !== \"undefined\") {\n _value = _conf[name];\n }\n } catch (e) {\n console.error(e);\n logger.debug(\"Something wrong when trying to get CONFIG values\");\n logger.debug(\"No config value for: \" + name);\n _value = _default;\n }\n return Processor.processObject(_value) || _default;\n }\n\n private static _instance:CONFIG;\n static get instance ():CONFIG {\n if (typeof CONFIG._instance === \"undefined\") {\n CONFIG._instance = new CONFIG();\n }\n return CONFIG._instance;\n }\n\n static set(name: string, value: unknown):void {\n (CONFIG.instance.set(name, value));\n }\n static get(name: string, value?: unknown): any {\n return (CONFIG.instance.get(name, value));\n }\n\n}\n\n\nPackage(\"com.qcobjects\", [CONFIG]);", "import { type IComponent, type IProcessor } from \"@types\";\nimport { CONFIG } from \"./CONFIG\";\nimport { InheritClass } from \"./InheritClass\";\nimport { New } from \"./New\";\nimport { _top } from \"./top\";\nimport { Component } from \"./Component\";\nimport { Package } from \"./Package\";\n\nexport class Processor extends InheritClass implements IProcessor {\n protected static _instance: IProcessor | undefined;\n constructor({ component, processors }: { component: IComponent | null, processors?: any }) {\n super({ component });\n if (typeof processors !== \"undefined\") {\n this.processors = Object.assign(processors, Processor.instance.processors);\n }\n }\n\n processors: any = {\n \"config\"(component: Component, arg: string): string {\n return CONFIG.get(arg, \"\") as string;\n },\n \"ENV\"(component: Component, arg: string): string {\n return (typeof process !== \"undefined\") ? (process.env[arg] as string) : (\"\");\n },\n \"global\"(component: Component, arg: string): string {\n return (typeof _top !== \"undefined\") ? ((_top as any)[arg] as string) : (\"\");\n }\n };\n\n static get instance(): IProcessor {\n if (typeof Processor._instance === \"undefined\") {\n Processor._instance = new Processor({ component: null });\n }\n return Processor._instance;\n }\n\n setProcessor(_proc_: Function):void {\n if (typeof _proc_ === \"function\" && _proc_.name !== \"\") {\n this.processors[_proc_.name] = _proc_;\n }\n }\n\n component!: IComponent | null;\n\n\n execute(component: IComponent, processorName: string, args: string): string {\n const processorHandler = (typeof component !== \"undefined\" && component !== null) ? (component.processorHandler) : (this);\n return processorHandler?.processors[processorName].bind(processorHandler).apply(processorHandler, [component, args?.split(\",\")]) as string;\n }\n\n process(template: string, component: IComponent | null = null):string {\n const processorHandler = (component !== null) ? (component.processorHandler) : (New(Processor, { component: null }));\n if (typeof template === \"string\") {\n Object.keys(processorHandler.processors).map((funcName) => {\n return [...template.matchAll(new RegExp(\"\\\\$\" + funcName + \"\\\\((.*)\\\\).*\", \"g\"))].map(\n function (procesorMatch) {\n const match0 = `$${funcName}(${procesorMatch[1]})`;\n template = template.replace(match0, processorHandler.execute.bind(processorHandler).call(processorHandler, component, funcName, procesorMatch[1]));\n return procesorMatch;\n }\n );\n });\n }\n return template;\n }\n\n processObject(obj: any, component: IComponent | null = null): any {\n let __instance__: IProcessor | undefined = (component === null) ? (this) : (component.processorHandler);\n if (typeof __instance__ === \"undefined\") {\n __instance__ = new Processor({ component });\n }\n if (typeof obj === \"object\") {\n Object.keys(obj).map(\n (_k) => {\n if (typeof obj[_k] === \"object\" && !Object.hasOwn(obj[_k], \"call\")) {\n obj[_k] = __instance__?.processObject.bind(__instance__)(obj[_k], component as IComponent);\n } else if (typeof obj[_k] === \"string\") {\n obj[_k] = __instance__?.process.bind(__instance__)(obj[_k], component as IComponent);\n }\n return _k;\n }\n );\n } else if (typeof obj === \"string\") {\n obj = __instance__.process.bind(__instance__)(obj, component as IComponent);\n }\n return obj;\n }\n\n}\n\nexport const GlobalProcessor: IProcessor = Processor.instance;\n\nPackage(\"com.qcobjects\", [Processor]);", "import { TComponentRouting } from \"@types\";\n\nexport const __routing_params__ = (routing:TComponentRouting, routingPath:string):object => {\n const standardRoutingPath = routing.path.replace(/{(.*?)}/g, \"(?<$1>.*)\"); // allowing {param}\n return {\n ...[...routingPath.matchAll((new RegExp(standardRoutingPath, \"g\")))][0].groups\n };\n};\n\nexport const __valid_routings__ = function (routings:TComponentRouting[], routingPath:string):TComponentRouting[] {\n return routings.filter(function (routing) {\n const standardRoutingPath = routing.path.replace(/{(.*?)}/g, \"(?<$1>.*)\");\n return (new RegExp(standardRoutingPath, \"g\")).test(routingPath);\n }).reverse();\n};\nexport const __valid_routing_way__ = (validRoutingWays:string[], routingWay:string):boolean => {\n return validRoutingWays.includes(routingWay);\n};\n", "import { TAsyncLoadCallback } from \"@types\";\nimport { Export } from \"./Export\";\nimport { isBrowser } from \"./platform\";\nimport { _top } from \"./top\";\n\nexport const _asyncLoad:any[] = [];\nexport function asyncLoad(callback: TAsyncLoadCallback, args?: any[]): any {\n\n class AsyncCallback {\n func:TAsyncLoadCallback;\n args?:any[];\n constructor(callback: TAsyncLoadCallback, args: any[] = []) {\n this.func = callback;\n this.args = args;\n } \n dispatch() {\n ((this as AsyncCallback).func as Function).apply(this, ...args as [], this);\n }\n }\n _asyncLoad.push((new AsyncCallback(callback, args)) as unknown as never);\n return AsyncCallback;\n}\n\nexport const _fireAsyncLoad = ():void => {\n if (isBrowser){\n document.addEventListener(\"readystatechange\", () => {\n if (document.readyState === \"complete\") {\n // eslint-disable-next-line array-callback-return\n _asyncLoad.map(function (fc) {\n (fc).dispatch.call(fc);\n });\n }\n });\n } else if (typeof _top.global !== \"undefined\") {\n // eslint-disable-next-line array-callback-return\n _asyncLoad.map(function (fc) {\n (fc).dispatch.call(fc);\n });\n }\n };\n\nExport(asyncLoad);", "import { Base64 } from \"./Base64\";\nimport { _DataStringify } from \"./DataStringify\";\nimport { logger } from \"./Logger\";\n\nexport class ComplexStorageCache {\n\n constructor(params: { index: any; load: any; alternate: any; }) {\n let load, alternate;\n const object = params.index;\n if (typeof object !== \"undefined\") {\n load = params.load;\n alternate = params.alternate;\n const cachedObjectID = this.getID(object);\n const cachedResponse = localStorage.getItem(cachedObjectID as string);\n if (this.isEmpty(cachedResponse)) {\n const cachedNewResponse = load.call(null, {\n cachedObjectID,\n cachedResponse,\n \"cache\": this\n });\n this.save(object, cachedNewResponse);\n logger.debug(\"RESPONSE OF {{cachedObjectID}} CACHED\".replace(\"{{cachedObjectID}}\", cachedObjectID as string));\n } else {\n alternate.call(null, {\n cachedObjectID,\n cachedResponse,\n \"cache\": this\n });\n logger.debug(\"RESPONSE OF {{cachedObjectID}} IS ALREADY CACHED \".replace(\"{{cachedObjectID}}\", cachedObjectID as string));\n }\n\n } else {\n throw new Error(\"ComplexStorageCache: index is undefined\");\n }\n return this;\n }\n\n getItem(cachedObjectID: string):any {\n const retrievedObject = localStorage.getItem(cachedObjectID);\n if (!this.isEmpty(retrievedObject)) {\n return JSON.parse(retrievedObject as string);\n } else {\n return null;\n }\n }\n\n\n setItem(cachedObjectID: string, value: any):void {\n localStorage.setItem(cachedObjectID, _DataStringify(value));\n }\n\n isEmpty(object: string | number | null):boolean {\n let r = false;\n switch (true) {\n case (typeof object === \"undefined\"):\n case (typeof object === \"string\" && object === \"\"):\n case (typeof object === \"string\" && object === \"undefined\"):\n case (typeof object === \"number\" && object === 0):\n case (object === null):\n r = true;\n break;\n default:\n r = false;\n }\n return r;\n }\n\n\n getID(object: any):string|undefined {\n let cachedObjectID;\n if (typeof object !== \"undefined\") {\n cachedObjectID = \"cachedObject_\" + Base64.encode(_DataStringify(object).replace(/\\{|\\}|,/g, \"_\"));\n }\n return cachedObjectID;\n }\n\n save(object: any, cachedNewResponse: any):void {\n const cachedObjectID = this.getID(object);\n logger.debug(\"CACHING THE RESPONSE OF {{cachedObjectID}} \".replace(\"{{cachedObjectID}}\", cachedObjectID as string));\n this.setItem(cachedObjectID as string, cachedNewResponse);\n }\n\n getCached(object: any):any {\n const cachedObjectID = this.getID(object);\n return this.getItem(cachedObjectID as string);\n }\n\n clear():void {\n Object.keys(localStorage).filter(function (k) {\n return k.startsWith(\"cachedObject_\");\n }).map(function (c):any {\n localStorage.removeItem(c);\n return c;\n });\n }\n\n}\n", "import { IService, TCacheController } from \"@types\";\nimport { asyncLoad } from \"./asyncLoad\";\nimport { ComplexStorageCache } from \"./ComplexStorageCache\";\nimport { _DataStringify } from \"./DataStringify\";\nimport { logger } from \"./Logger\";\nimport { _require_, isBrowser } from \"./platform\";\nimport { _top } from \"./top\";\n\n/**\n * Loads a simple component from a template\n *\n * @author: Jean Machuca \n * @param service a Service object\n */\nexport const serviceLoader = function (service:IService, _async = false):Promise|undefined {\n const _serviceLoaderInBrowser = function (service:IService):Promise {\n var _promise = new Promise(\n function (resolve, reject) {\n\n logger.debug(\"LOADING SERVICE DATA {{DATA}} FROM {{URL}}\".replace(\"{{DATA}}\", _DataStringify(service.data)).replace(\"{{URL}}\", service.url));\n const xhr = new XMLHttpRequest();\n xhr.withCredentials = service.withCredentials;\n const xhrasync = true; // always async because xhr sync is deprecated\n xhr.open(service.method, service.url, xhrasync);\n for (const header in service.headers) {\n try {\n if (typeof service.headers[header] !== \"function\") {\n xhr.setRequestHeader(header, service.headers[header]);\n }\n } catch (e:any) {\n logger.debug(\"Something went wrong when assign the header \" + header);\n logger.debug(`An error ocurred: ${e}`);\n }\n }\n xhr.onload = function () {\n if (xhr.status === 200) {\n const response = xhr.responseText;\n logger.debug(\"Data received {{DATA}}\".replace(\"{{DATA}}\", _DataStringify(response)));\n logger.debug(\"CREATING SERVICE {{NAME}}\".replace(\"{{NAME}}\", service.name));\n service.template = response;\n if (service.cached && (typeof cache !== \"undefined\")) {\n cache.save(service.name, service.template);\n }\n if (typeof service.done === \"function\") {\n var standardResponse = {\n \"request\": xhr,\n service\n };\n service.done.call(service, standardResponse);\n resolve.call(_promise, standardResponse);\n }\n } else {\n if (typeof service.fail === \"function\") {\n var standardResponse = {\n \"request\": xhr,\n service\n };\n service.fail.call(service, standardResponse);\n reject.call(_promise, standardResponse);\n }\n }\n };\n\n const _directLoad = function () {\n logger.debug(\"SENDING THE NORMAL REQUEST \");\n try {\n xhr.send(_DataStringify(service.data));\n } catch (e:any) {\n logger.debug(\"SOMETHING WRONG WITH REQUEST \");\n logger.debug(`An error ocurred: ${e}`);\n reject.call(_promise, {\n request: xhr,\n service\n });\n }\n };\n\n if (service.cached) {\n var cache = new ComplexStorageCache({\n index: service.data,\n load() {\n _directLoad.call(this);\n },\n alternate(cacheController:TCacheController) {\n if (service.method === \"GET\") {\n service.template = cacheController.cache.getCached(service.name);\n if (typeof service.done === \"function\") {\n const standardResponse = {\n \"request\": xhr,\n service\n };\n service.done.call(service, standardResponse);\n resolve.call(_promise, standardResponse);\n }\n } else {\n _directLoad();\n }\n \n }\n });\n (_top as any).lastCache = cache;\n } else {\n _directLoad();\n }\n\n return xhr;\n }\n );\n return _promise;\n };\n\n const _serviceLoaderInNode = function (service:IService) {\n var _promise = new Promise(\n function (resolve, reject) {\n if (typeof URL === \"undefined\") {\n global.URL = (_require_(\"url\")).URL;\n // eslint-disable-next-line no-unused-vars\n const URL = global.URL;\n }\n const serviceURL = new URL(service.url);\n var req;\n service.useHTTP2 = Object.hasOwn(service, \"useHTTP2\") && service.useHTTP2;\n\n\n const captureEvents = function (req:any) {\n logger.debug(\"LOADING SERVICE DATA (non-browser) {{DATA}} FROM {{URL}}\".replace(\"{{DATA}}\", _DataStringify(service.data)).replace(\"{{URL}}\", service.url));\n let dataXML:any;\n const standardResponse = {\n \"http2Client\": client,\n \"request\": req,\n service,\n \"responseHeaders\": null\n };\n\n if (typeof service.data === \"object\" && service.data !== null) {\n if (service.useHTTP2) {\n try {\n logger.debug(\"Sending data...\");\n const buffer = new Buffer(_DataStringify(service.data));\n req.write(buffer);\n } catch (e:any) {\n logger.debug(\"It was not possible to send any data\");\n logger.debug(`An error ocurred: ${e}`);\n }\n }\n }\n\n dataXML = \"\";\n req.on(\"response\", (responseHeaders:any) => {\n logger.debug(\"receiving response...\");\n standardResponse.responseHeaders = responseHeaders;\n /*\n for (const name in responseHeaders) {\n logger.debug(`${name}: ${responseHeaders[name]}`);\n }\n */\n dataXML = \"\";\n });\n req.on(\"data\", (chunk:any) => {\n logger.debug(\"receiving data...\");\n // do something with the data\n dataXML += \"\" + chunk.toString();\n service.template = dataXML;\n });\n if (service.useHTTP2) {\n req.resume();\n }\n req.on(\"end\", () => {\n logger.debug(\"ending call...\");\n service.template = dataXML;\n if (Object.hasOwn(service, \"useHTTP2\") && service.useHTTP2) {\n client.destroy();\n } else {\n req.destroy();\n }\n service.done.call(service, standardResponse);\n resolve.call(_promise, standardResponse);\n });\n if (service.useHTTP2) {\n req.end();\n }\n\n };\n\n try {\n let requestOptions;\n if (service.useHTTP2) {\n logger.debug(\"using http2\");\n const http2 = _require_(\"http2\");\n var client = (http2).connect(serviceURL.origin);\n requestOptions = Object.assign({\n \":method\": service.method,\n \":path\": serviceURL.pathname\n }, service.options);\n requestOptions = Object.assign(requestOptions, service.headers);\n req = client.request(requestOptions);\n req.setEncoding(\"utf8\");\n captureEvents(req);\n } else {\n if (serviceURL.protocol === \"http:\") {\n const http = _require_(\"http\");\n const request = (http).request;\n requestOptions = Object.assign({\n \"url\": service.url,\n headers: service.headers\n }, service.options);\n req = request(service.url);\n captureEvents(req);\n } else if (serviceURL.protocol === \"https:\") {\n const https = _require_(\"https\");\n requestOptions = Object.assign({\n hostname: serviceURL.hostname,\n port: serviceURL.port,\n path: serviceURL.pathname,\n method: service.method,\n headers: service.headers\n }, service.options);\n const _req_ = (https).request(requestOptions, function (req:any) {\n captureEvents(req);\n });\n _req_.end();\n } else {\n const e = \"Protocol not supported: \" + serviceURL.protocol;\n logger.debug(e);\n throw new Error(e);\n }\n }\n\n\n } catch (e:any) {\n logger.debug(e);\n service.fail.call(service, e);\n reject.call(_promise, e);\n\n }\n }).catch( (e:any) => {\n logger.debug(`Something happened when trying to call the service: ${service.name}. Error: ${e}`);\n service.fail.call(service, e);\n });\n return _promise;\n\n };\n\n const _serviceLoaderMockup = function (service:IService) {\n var _promise = new Promise(\n function (resolve) {\n logger.debug(`Calling mockup service ${service.name} ...`);\n const standardResponse = {\n \"request\": null,\n service,\n \"responseHeaders\": service.responseHeaders\n };\n if (typeof service.mockup === \"function\") {\n service.mockup.call(service, standardResponse);\n } else {\n service.done.call(service, standardResponse);\n }\n resolve.call(_promise, standardResponse);\n });\n return _promise;\n };\n const _serviceLoaderLocal = function (service:IService) {\n var _promise = new Promise(\n function (resolve) {\n logger.debug(`Calling local service ${service.name} ...`);\n const standardResponse = {\n \"request\": null,\n service,\n \"responseHeaders\": service.responseHeaders\n };\n if (typeof service.local === \"function\") {\n service.local.call(service, standardResponse);\n } else {\n service.done.call(service, standardResponse);\n }\n resolve.call(_promise, standardResponse);\n });\n return _promise;\n };\n\n let _ret_: Promise;\n switch (service.kind) {\n case \"rest\":\n if (isBrowser) {\n if (typeof _async !== \"undefined\" && _async) {\n _ret_ = asyncLoad(_serviceLoaderInBrowser, [service, _async]);\n } else {\n _ret_ = _serviceLoaderInBrowser(service);\n }\n } else {\n _ret_ = _serviceLoaderInNode(service);\n }\n break;\n case \"mockup\":\n _ret_ = _serviceLoaderMockup(service);\n break;\n case \"local\":\n _ret_ = _serviceLoaderLocal(service);\n break;\n default:\n logger.debug(`The value of the kind property of the service ${service.name} is not valid`);\n _ret_ = Promise.resolve();\n break;\n }\n return _ret_;\n};\n", "export const _tag_filter_ = \"quick-component:not([loaded]),component:not([loaded])\";\n", "import { IComponent, TCacheController } from \"@types\";\nimport { asyncLoad } from \"./asyncLoad\";\nimport { ComplexStorageCache } from \"./ComplexStorageCache\";\nimport { _DataStringify } from \"./DataStringify\";\nimport { logger } from \"./Logger\";\nimport { is_phonegap, isBrowser } from \"./platform\";\nimport { _top } from \"./top\";\n\n/**\n * Loads a simple component from a template\n *\n * @author: Jean Machuca \n * @param component a Component object\n */\nexport const componentLoader = function (component: IComponent, _async: boolean):Promise {\n let __promise__: Promise;\n const _componentLoaderInBrowser = function (component: IComponent) {\n __promise__ = new Promise(function (resolve, reject) {\n const _promise = component.__promise__;\n const container = (Object.hasOwn(component, \"container\") && typeof component.container !== \"undefined\" && component.container !== null) ? (component.container) : (component.body);\n if (container !== null) {\n const _feedComponent_ = function (component: { feedComponent: () => void; }) {\n component.feedComponent();\n const standardResponse = {\n \"request\": xhr,\n component\n };\n resolve.call(_promise, standardResponse);\n };\n logger.debug(\"LOADING COMPONENT DATA {{DATA}} FROM {{URL}}\".replace(\"{{DATA}}\", _DataStringify(component.data)).replace(\"{{URL}}\", component.url));\n\n const _componentLoaded = function () {\n const successStatus = (is_file) ? (0) : (200);\n if (xhr.status === successStatus) {\n const response = xhr.responseText;\n logger.debug(\"Data received {{DATA}}\".replace(\"{{DATA}}\", _DataStringify(response)));\n logger.debug(\"CREATING COMPONENT {{NAME}}\".replace(\"{{NAME}}\", component.name));\n component.template = response;\n if (component.cached && (typeof cache !== \"undefined\")) {\n cache.save(component.name, component.template);\n }\n _feedComponent_(component);\n } else {\n const standardResponse = {\n \"request\": xhr,\n component\n };\n reject.call(_promise, standardResponse);\n\n }\n };\n if (typeof component.template === \"string\" && component.template !== \"\") {\n // component already has a template it does not need to be reloaded\n _feedComponent_(component);\n } else {\n var is_file = !!(component.url.startsWith(\"file:\"));\n var xhr = new XMLHttpRequest();\n if (!is_file) {\n try {\n logger.debug(\"Calling the url of component in async mode.\");\n xhr.open(component.method, component.url, true);\n } catch (e:any) {\n logger.debug(`An error ocurred: ${e}.`);\n logger.debug(\"Last try has failed... The component cannot be loaded.\");\n }\n } else {\n if (\"fetch\" in _top) {\n logger.debug(\"I can use fetch...\");\n logger.debug(\"It is a file to be loaded, so I will try to use fetch\");\n fetch(component.url).then(response => {\n logger.debug(\"I got a response from fetch, so I'll feed the component\");\n response.text().then(text => {\n component.template = text;\n _feedComponent_(component);\n })\n .catch((e:any) => {throw new Error (`An error ocurred: ${e}`);});\n }).catch ((e:any) => {throw new Error (`An error ocurred: ${e}`);});\n }\n }\n if (!is_phonegap && !is_file) {\n xhr.setRequestHeader(\"Content-Type\", \"text/html\");\n }\n if (!is_file) {\n xhr.onload = _componentLoaded;\n }\n const _directLoad = function (is_file: boolean) {\n is_file = !((typeof is_file === \"undefined\" || !is_file));\n logger.debug(\"SENDING THE NORMAL REQUEST \");\n if (is_file) {\n if (!(\"fetch\" in _top)) {\n logger.debug(\"I have to try to load the file using xhr... \");\n xhr.send(null);\n if (xhr.status === XMLHttpRequest.DONE) {\n _componentLoaded();\n }\n }\n } else {\n logger.debug(\"Trying to send the data to the component... \");\n xhr.send(_DataStringify(component.data));\n }\n };\n\n if (component.cached && (!is_file)) {\n logger.debug(\"USING CACHE FOR COMPONENT: \" + component.name);\n var cache = new ComplexStorageCache({\n index: component.cacheIndex,\n load() {\n _directLoad.call(this, is_file);\n },\n alternate(cacheController: TCacheController) {\n if (component.method === \"GET\") {\n component.template = cacheController.cache.getCached(component.cacheIndex);\n _feedComponent_.call(this, component);\n } else {\n _directLoad.call(this, is_file);\n }\n \n }\n });\n (_top as any).lastCache = cache;\n } else {\n logger.debug(\"NOT USING CACHE FOR COMPONENT: \" + component.name);\n _directLoad(is_file);\n }\n\n }\n } else {\n logger.debug(\"CONTAINER DOESNT EXIST\");\n }\n });\n __promise__.then(function (standardResponse) {\n return component.__done__().then(function () {\n let _ret_;\n if (typeof component.done === \"function\") {\n _ret_ = component.done.call(component, standardResponse);\n }\n return Promise.resolve(_ret_);\n });\n }, function (standardResponse) {\n if (typeof component.fail === \"function\") {\n component.fail.call(component, standardResponse)\n .catch ((e:any)=> {throw new Error (`${e}`);});\n }\n return Promise.reject(new Error (\"An error ocurred\"));\n }).catch(function (e:any) {\n logger.debug(\"Something wrong loading the component\");\n throw new Error (`An error ocurred: ${e}`);\n });\n return __promise__;\n };\n const _componentLoaderInNode = function (component: IComponent) {\n __promise__ = new Promise(function (resolve, reject) {\n const _promise = __promise__;\n const _feedComponent_ = function (component: IComponent) {\n component.feedComponent()\n .catch ((e:any) => {\n throw new Error (`An error ocurred trying to feed the component: ${component.name}. Error: ${e}`);\n });\n const standardResponse = {\n \"request\": null,\n component\n };\n resolve.call(_promise, standardResponse);\n };\n logger.debug(\"LOADING COMPONENT DATA {{DATA}} FROM {{URL}}\".replace(\"{{DATA}}\", _DataStringify(component.data)).replace(\"{{URL}}\", component.url));\n\n const _componentLoaded = function (err: any, responseText: { toString: () => any; }) {\n if (!err) {\n const response = responseText.toString();\n logger.debug(\"Data received {{DATA}}\".replace(\"{{DATA}}\", _DataStringify(response)));\n logger.debug(\"CREATING COMPONENT {{NAME}}\".replace(\"{{NAME}}\", component.name));\n component.template = response;\n if (component.cached && (typeof cache !== \"undefined\")) {\n cache.save(component.name, component.template);\n }\n _feedComponent_(component);\n } else {\n const standardResponse = {\n \"request\": null,\n component\n };\n reject.call(_promise, standardResponse);\n }\n };\n if (typeof component.template === \"string\" && component.template !== \"\") {\n // component already has a template it does not need to be reloaded\n _feedComponent_(component);\n } else {\n logger.debug(\"Loading the component as a local file in server...\");\n const _directLoad = function () {\n // eslint-disable-next-line @typescript-eslint/no-require-imports\n const {readFile} = require(\"node:fs\");\n logger.debug(\"SENDING THE NORMAL REQUEST \");\n readFile(component.url, _componentLoaded);\n };\n\n if (component.cached) {\n logger.debug(\"USING CACHE FOR COMPONENT: \" + component.name);\n var cache = new ComplexStorageCache({\n index: component.cacheIndex,\n load() {\n _directLoad();\n },\n alternate(cacheController: TCacheController) {\n if (component.method === \"GET\") {\n component.template = cacheController.cache.getCached(component.cacheIndex);\n _feedComponent_.call(this, component);\n } else {\n _directLoad.call(this);\n }\n \n }\n });\n (_top as any).lastCache = cache;\n } else {\n logger.debug(\"NOT USING CACHE FOR COMPONENT: \" + component.name);\n _directLoad();\n }\n\n }\n });\n __promise__.then(function (standardResponse) {\n return component.__done__().then(function () {\n let _ret_;\n if (typeof component.done === \"function\") {\n _ret_ = component.done.call(component, standardResponse);\n }\n return Promise.resolve(_ret_);\n });\n }, function (standardResponse) {\n if (typeof component.fail === \"function\") {\n component.fail.call(component, standardResponse)\n .catch((e:any) => {throw new Error (`An error ocurred: ${e}`);});\n }\n return Promise.reject(new Error (\"An error ocurred.\"));\n }).catch(function (e) {\n logger.debug(`Something wrong loading the component: ${e}`);\n });\n return __promise__;\n };\n\n let _ret_;\n if (isBrowser) {\n if (typeof _async !== \"undefined\" && _async) {\n _ret_ = asyncLoad(_componentLoaderInBrowser, [component, _async]);\n } else {\n _ret_ = _componentLoaderInBrowser(component);\n }\n } else {\n _ret_ = _componentLoaderInNode(component);\n }\n return _ret_ as Promise;\n};", "import { Base64 } from \"./Base64\";\nimport { _basePath_ } from \"./basePath\";\nimport { _Cast } from \"./Cast\";\nimport { ClassFactory } from \"./ClassFactory\";\nimport { _buildComponentsFromElements_, ComponentURI } from \"./ComponentFactory\";\nimport { _DataStringify } from \"./DataStringify\";\nimport { _domain_ } from \"./domain\";\nimport { _DOMCreateElement } from \"./DOMCreateElement\";\nimport { __getType__ } from \"./getType\";\nimport { InheritClass } from \"./InheritClass\";\nimport { _methods_, _protected_code_ } from \"./introspection\";\nimport { is_a } from \"./is_a\";\nimport { isQCObjects_Object } from \"./isQCObjects\";\nimport { logger } from \"./Logger\";\nimport { New } from \"./New\";\nimport { Package } from \"./Package\";\nimport { isBrowser } from \"./platform\";\nimport { Processor } from \"./Processor\";\nimport { __routing_params__, __valid_routing_way__, __valid_routings__ } from \"./routings\";\nimport { _top, componentsStack } from \"./top\";\nimport { CONFIG } from \"./CONFIG\";\nimport { serviceLoader } from \"./serviceLoader\";\nimport { _tag_filter_ } from \"./tag_filter\";\nimport { componentLoader } from \"./componentLoader\";\nimport { IComponent, IController, IEffect, IProcessor, IQCObjectsElement, IQCObjectsShadowedElement, IView, TBody, TComponentDoneResponse, TComponentParams, TComponentRouting, TComponentRoutings } from \"@types\";\n\nexport class Component extends InheritClass implements IComponent {\n static shadowed: boolean | undefined = false;\n static cached: any = true;\n [key: string]: any;\n name!: string;\n templateURI!: string;\n url!: string;\n tplsource!: string;\n tplextension!: string;\n template!: string;\n validRoutingWays: string[] = [\"pathname\", \"hash\", \"search\"];\n basePath:string = _basePath_;\n domain:string = _domain_;\n templateHandler = \"DefaultTemplateHandler\";\n processorHandler?: IProcessor;\n routingWay: string | null = null;\n routingNodes: (IQCObjectsElement | HTMLElement)[] = [];\n routings: TComponentRoutings = [];\n routingPath = \"\";\n routingPaths: string[] = [];\n _componentHelpers: any[] = [];\n subcomponents: any[] = [];\n splashScreenComponent?: IComponent = undefined;\n controller?: IController = undefined;\n routingController?: IController = undefined;\n\n view?: IView = undefined;\n effect?: IEffect = undefined;\n effectClass!: string;\n method = \"GET\";\n cached?: boolean = true;\n __promise__?: Promise | null = null;\n data!: any;\n __namespace?: string = undefined;\n protected _parsedAssignmentText!: string;\n protected __shadowRoot: any;\n protected _serviceClassName: string | null = null;\n enableServiceClass?: boolean | undefined = true;\n serviceInstance: any;\n serviceData: any;\n shadowed?: boolean = false;\n container: any;\n innerHTML: any;\n reload: any;\n static subcomponents: any;\n assignRoutingParams?: boolean = true;\n responseTo?: string | undefined;\n static responseTo?: string | undefined;\n\n constructor({\n __parent__,\n templateURI = \"\",\n template,\n tplsource = \"default\",\n tplextension,\n url = \"\",\n name = \"\",\n method = \"GET\",\n data = {},\n reload = false,\n shadowed = false,\n cached = true,\n enableServiceClass,\n assignRoutingParams = true,\n _body = _DOMCreateElement(\"div\"),\n __promise__ = null,\n __shadowRoot,\n body,\n shadowRoot,\n splashScreenComponent,\n controller,\n view\n }: TComponentParams) {\n if (arguments.length < 1) {\n throw Error(\"No arguments in component. You must at least give one argument.\");\n }\n super({\n __parent__,\n templateURI,\n template,\n tplsource,\n tplextension,\n url,\n name,\n method,\n data,\n reload,\n shadowed,\n cached,\n enableServiceClass,\n assignRoutingParams,\n _body,\n __promise__,\n __shadowRoot,\n body,\n shadowRoot,\n splashScreenComponent,\n controller,\n view\n });\n const self = this;\n\n if (typeof name !== \"undefined\") {\n self.name = name;\n }\n\n if (typeof self.name === \"undefined\" && typeof name === \"undefined\") {\n logger.warn(\"A name is not defined for \" + __getType__(self));\n }\n\n self.routingWay = CONFIG.get(\"routingWay\");\n\n self.processorHandler = new Processor({\n component: self\n });\n\n /* assign body data attributes to data */\n self.data = (typeof self.data === \"undefined\" || self.data === null) ? ({}) : (self.data);\n self.data = Object.assign(self.data, self.dataAttributes);\n\n self.createServiceInstance()\n .then(() => {\n if (typeof self.__new__ === \"function\") {\n self.__new__(self);\n }\n\n self._generateRoutingPaths(self.body)\n .then(function () {\n self._reroute_()\n .then(function () {\n return self.rebuild()\n .then(function () {\n logger.info(`Component._new_ The component ${self.name} was built successfully!`);\n }).catch(function (standardResponse) {\n logger.warn(`Component._new_ Something went wrong building the component ${self.name}`);\n console.error(`Component._new_ Something went wrong building the component ${self.name}`, standardResponse);\n });\n }).catch((e: any) => {\n throw Error(`Unexpected error ${e}`);\n });\n }).catch((e: any) => {\n throw Error(`Unexpected error ${e}`);\n });\n\n }).catch((e: any) => {\n throw Error(`Unexpected error. ${e}`);\n });\n\n }\n\n set cacheIndex(value) {\n // readonly\n logger.debug(\"[cacheIndex] This property is readonly\");\n }\n\n get cacheIndex():string {\n const self = this;\n const __routing_path__ = _DataStringify(self.routingPath);\n return Base64.encode(self.name + __routing_path__);\n }\n\n set parsedAssignmentText(value: string) {\n // readonly\n logger.debug(\"[parsedAssignmentText] This property is readonly\");\n }\n\n get parsedAssignmentText(): string {\n const self = this;\n self._parsedAssignmentText = self.parseTemplate(self.template);\n if (typeof self._parsedAssignmentText === \"undefined\") {\n throw Error(`[Component][${this.name}][parsedAssignmentText] Could not generate content!`);\n }\n return self._parsedAssignmentText;\n }\n\n\n set shadowRoot(value: IQCObjectsShadowedElement) {\n const self = this;\n if (typeof self.__shadowRoot === \"undefined\") {\n self.__shadowRoot = value;\n } else {\n logger.debug(\"[shadowRoot] This property can only be assigned once!\");\n }\n }\n\n get shadowRoot(): IQCObjectsShadowedElement {\n const self = this;\n return self.__shadowRoot as IQCObjectsShadowedElement;\n }\n\n\n set routingSelected(value: TComponentRouting[]) {\n logger.debug(\"[routingSelected] This is a read-only property of the component\");\n }\n\n get routingSelected(): TComponentRouting[] {\n const self = this;\n return __valid_routings__(self.routings, self.routingPath);\n }\n\n set routingParams(value) {\n logger.debug(\"[routingParams] This is a read-only property of the component\");\n }\n\n get routingParams(): object {\n const component = this;\n return [{}].concat(component.routingSelected.map(function (routing: any) {\n return __routing_params__(routing, component.routingPath);\n })).reduce(function (accumulator, colData) {\n return Object.assign(accumulator, colData);\n });\n }\n\n\n set serviceClassName(_serviceClassName: string) {\n this._serviceClassName = _serviceClassName;\n }\n\n get serviceClassName(): string | null {\n let _serviceClassName: string | null = \"\";\n if (isBrowser) {\n _serviceClassName = ((this.body as HTMLElement).getAttribute(\"serviceClass\") !== null) ? ((this.body as HTMLElement).getAttribute(\"serviceClass\")) : (\n this._serviceClassName\n );\n } else {\n _serviceClassName = this._serviceClassName;\n }\n return _serviceClassName;\n }\n\n protected get responseToData(): boolean {\n let _response_to_data_: boolean = false;\n if (isBrowser) {\n const responseToAttr = (this.body as HTMLElement).getAttribute(\"response-to\");\n _response_to_data_ = responseToAttr === \"data\" || this.responseTo === \"data\";\n } else {\n _response_to_data_ = this.responseTo === \"data\";\n }\n return _response_to_data_;\n }\n\n protected get responseToTemplate(): boolean {\n let _response_to_template_: boolean = false;\n if (isBrowser) {\n const responseToAttr = (this.body as HTMLElement).getAttribute(\"response-to\");\n _response_to_template_ = responseToAttr === \"template\" || this.responseTo === \"template\";\n } else {\n _response_to_template_ = this.responseTo === \"template\";\n }\n return _response_to_template_;\n }\n\n createServiceInstance(): Promise {\n const component = this;\n let data = this.data;\n let __serviceClass: any;\n const __classDefinition = component.getClass().__definition;\n const _serviceClassName = component.serviceClassName;\n\n return new Promise(function (resolve, reject) {\n /* __enable_service_class__ = true by default */\n const __enable_service_class__ = component.enableServiceClass;\n let _response_to_data_ = component.responseToData;\n let _response_to_template_ = component.responseToTemplate;\n\n if (__enable_service_class__ && _serviceClassName !== null) {\n __serviceClass = ClassFactory(_serviceClassName);\n }\n if (!_response_to_data_ && __classDefinition && Object.hasOwn(__classDefinition, \"responseTo\")) {\n _response_to_data_ = (__classDefinition.responseTo === \"data\");\n } else if (!_response_to_data_ && Object.hasOwn(ClassFactory(\"Component\"), \"responseTo\")) {\n _response_to_data_ = ((ClassFactory(\"Component\") as Component).responseTo === \"data\");\n }\n if (!_response_to_template_ && __classDefinition && Object.hasOwn(__classDefinition, \"responseTo\")) {\n _response_to_template_ = (__classDefinition.responseTo === \"template\");\n } else if (!_response_to_template_ && Object.hasOwn(ClassFactory(\"Component\"), \"responseTo\")) {\n _response_to_template_ = ((ClassFactory(\"Component\") as Component).responseTo === \"template\");\n }\n\n if (typeof __serviceClass !== \"undefined\" &&\n (typeof __enable_service_class__ !== \"undefined\" &&\n __enable_service_class__ === true) &&\n (_response_to_data_ || _response_to_template_)\n ) {\n logger.info(\"Loading service \" + _serviceClassName);\n const serviceInstance = New(__serviceClass, {\n data\n });\n (serviceLoader(serviceInstance) as Promise)?.then(function ({\n service\n }: { request: any, service: any }) {\n let serviceResponse;\n if (typeof service.JSONresponse !== \"undefined\" && service.JSONresponse !== null) {\n serviceResponse = service.JSONresponse;\n } else {\n serviceResponse = service.template;\n }\n if (_response_to_data_) {\n if (typeof data === \"object\" && typeof serviceResponse === \"object\") {\n data = Object.assign(data, serviceResponse);\n } else {\n data = serviceResponse;\n }\n component.data = data;\n }\n component.serviceInstance = serviceInstance;\n component.serviceData = data;\n\n if (_response_to_template_) {\n component.template = serviceResponse;\n }\n resolve(serviceResponse);\n }, function (rejectedResponse: Error) {\n logger.debug(`Service loading rejected for ${_serviceClassName} in ${component.name}`);\n reject(rejectedResponse);\n }).catch(function (e: any) {\n logger.debug(\"Something went wroing while trying to load the service \" + _serviceClassName);\n throw Error(`Error loading ${_serviceClassName} for ${component.name}. Detail: ${e}`);\n });\n } else {\n resolve(null);\n }\n });\n }\n\n _bindroute_():void {\n const _component_ = this;\n if (!(_component_ as any)._bindroute_.loaded) {\n if (isBrowser) {\n\n (_component_.hostElements(\"a\") as unknown as HTMLAnchorElement[]).map(function (a: HTMLAnchorElement) {\n (a as any).oldclick = a.onclick;\n a.onclick = function (e) {\n let _ret_ = true;\n if (!_top.global.get(\"routingPaths\")) {\n _top.global.set(\"routingPaths\", []);\n }\n const routingWay = CONFIG.get(\"routingWay\");\n const routingPath = (e.target as any)[routingWay];\n if (_top.global.get(\"routingPaths\").includes(routingPath) &&\n (e.target as any)[routingWay] !== (location as any)[routingWay] &&\n (e.target as HTMLAnchorElement).href !== document.location.href\n ) {\n logger.debug(\"A ROUTING WAS FOUND: \" + routingPath);\n window.history.pushState({\n href: (e.target as HTMLAnchorElement).href\n }, (e?.target as HTMLAnchorElement)?.href, (e.target as HTMLAnchorElement).href);\n Component.route().catch((e) => { throw Error(`Unexpected error: ${e}`); });\n _ret_ = false;\n } else {\n logger.debug(\"NO ROUTING FOUND FOR: \" + routingPath);\n }\n if (typeof (e.target as any).oldclick !== \"undefined\" && typeof (e.target as any).oldclick === \"function\") {\n (e.target as any).oldclick.call(e.target, e);\n }\n return _ret_;\n };\n return null;\n });\n\n } else {\n // not yet implemented.\n }\n (_component_ as any)._bindroute_.loaded = true;\n } else {\n logger.debug(`Routes already bound to popstate events for ${_component_.name}`);\n }\n\n }\n\n done(standardResponse?: TComponentDoneResponse): Promise {\n const _ret_ = new Promise((resolve) => {\n if (typeof standardResponse !== \"undefined\") {\n const { request, component } = standardResponse;\n resolve({ request, component });\n } else {\n resolve({ request: undefined, component: undefined });\n }\n });\n return _ret_;\n }\n\n createControllerInstance(): Promise<{ component: IComponent, controller: IController }> {\n let _Controller: any;\n if (isBrowser) {\n if (typeof this.body === \"undefined\") {\n throw new Error(\"The component has no body\");\n }\n var controllerName = (this.body as HTMLElement).getAttribute(\"controllerClass\");\n if (!controllerName) {\n controllerName = \"Controller\";\n }\n _Controller = ClassFactory(controllerName);\n if (typeof _Controller !== \"undefined\") {\n this.controller = New(_Controller, {\n component: this\n });\n }\n\n }\n\n return new Promise((resolve, reject) => {\n if (isBrowser) {\n if (typeof _Controller !== \"undefined\" && typeof this.controller !== \"undefined\") {\n if (typeof (this.controller).done === \"function\") {\n try {\n this.controller.done.call(this.controller);\n } catch (e: any) {\n throw Error(e);\n }\n } else {\n logger.debug(`${controllerName} does not have a done() method.`);\n reject(new Error(`${controllerName} does not have a done() method.`));\n }\n if (typeof this.controller.createRoutingController === \"function\") {\n this.controller.createRoutingController.call(this.controller);\n } else {\n logger.debug(`${controllerName} does not have a createRoutingController() method.`);\n }\n }\n }\n resolve({ component: this, controller: this.controller as IController });\n });\n }\n\n createEffectInstance(): Promise<{ component: Component, effect: IEffect }> {\n const _component_ = this;\n return new Promise(function (resolve) {\n if (isBrowser) {\n const effectClassName = (_component_.body as HTMLElement)?.getAttribute(\"effectClass\");\n let applyEffectTo = (_component_.body as HTMLElement)?.getAttribute(\"apply-effect-to\");\n applyEffectTo = (applyEffectTo !== null) ? (applyEffectTo) : (\"load\");\n if (effectClassName !== null && applyEffectTo === \"observe\") {\n _component_.applyObserveTransitionEffect(effectClassName);\n } else if (effectClassName !== null && applyEffectTo === \"load\") {\n _component_.applyTransitionEffect(effectClassName);\n }\n }\n resolve({ component: _component_, effect: _component_.effect as IEffect });\n });\n }\n\n createViewInstance(): Promise<{ component: Component, view: IView }> {\n const _component_ = this;\n return new Promise(function (resolve) {\n const viewName = (isBrowser) ? ((_component_.body as HTMLElement).getAttribute(\"viewClass\")) : (null);\n if (viewName !== null) {\n const _View = ClassFactory(viewName);\n if (typeof _View !== \"undefined\") {\n _component_.view = New(_View, {\n component: _component_\n }); // Initializes the main view for the component\n if (Object.hasOwn(_component_.view as object, \"done\") && typeof _component_.view?.done === \"function\") {\n _component_.view?.done.call(_component_.view);\n }\n }\n\n }\n resolve({ component: _component_, view: _component_.view as IView });\n\n });\n }\n\n __done__(): Promise {\n const _component_ = this;\n const componentDone = function () {\n if (typeof _component_ === \"undefined\") {\n throw new Error(\"componentDone() has lost its context\");\n }\n if (typeof _component_.body === \"undefined\") {\n throw new Error(\"The component has no body\");\n }\n\n (async () => {\n await _component_.createViewInstance();\n await _component_.createControllerInstance();\n await _component_.createEffectInstance();\n })()\n .catch((e: any) => {\n throw new Error(`Unknown error ${e}.`);\n });\n\n logger.debug(`Trying to run component helpers for ${_component_.name}...`);\n try {\n _component_.runComponentHelpers();\n logger.debug(`Component helpers for ${_component_.name} executed.`);\n } catch (e: any) {\n logger.debug(`Component helpers for ${_component_.name} could not be executed.`);\n throw Error(e);\n }\n\n _component_.subcomponents = _component_.__buildSubComponents__();\n\n _component_._bindroute_();\n if (isBrowser) {\n (_component_.body as HTMLElement).setAttribute(\"loaded\", \"true\");\n }\n };\n\n return new Promise(function (resolve, reject) {\n try {\n resolve(componentDone.call(_component_));\n } catch (e: any) {\n reject(new Error(e));\n }\n });\n\n }\n\n hostElements(tagFilter: string): (IQCObjectsElement | HTMLElement | IQCObjectsShadowedElement)[] {\n const _component_ = this;\n let elementList: (IQCObjectsElement | HTMLElement | IQCObjectsShadowedElement)[] = [];\n if (isBrowser) {\n elementList = (_component_.shadowed && (typeof _component_.shadowRoot !== \"undefined\")) ? (\n _component_.shadowRoot.subelements(tagFilter) as IQCObjectsShadowedElement[]\n ) : (\n (_component_.body as IQCObjectsElement).subelements(tagFilter)\n );\n\n }\n return elementList;\n }\n\n get subtags(): (HTMLElement | IQCObjectsElement | IQCObjectsShadowedElement)[] {\n const _component_ = this;\n const tagFilter = _tag_filter_;\n return _component_.hostElements(tagFilter);\n }\n\n get bodyAttributes():any {\n const _component_ = this;\n const c = _component_.body;\n return (isBrowser) ? ([...(c as HTMLElement).getAttributeNames()].map(a => { return { [a]: (c as HTMLElement).getAttribute(a) }; }).reduce((accumulator, colData) => { return Object.assign(accumulator, colData); })) : ({});\n }\n\n get dataAttributes():any {\n const _component_ = this;\n const c = _component_.body;\n return (isBrowser) ? ([{}].concat([...(c as HTMLElement).getAttributeNames()].filter(n => n.startsWith(\"data-\")).map(a => { return { [a.split(\"-\")[1]]: (c as HTMLElement).getAttribute(a) }; })).reduce((accumulator, colData) => { return Object.assign(accumulator, colData); })) : ({});\n }\n\n __buildSubComponents__(rebuildObjects = false): any {\n const _component_: Component = this as Component;\n let elementList = _component_.subtags;\n if (!rebuildObjects) {\n elementList = (elementList as HTMLElement[]).filter((t: HTMLElement) => t.getAttribute(\"loaded\") !== \"true\") as unknown[] as IQCObjectsElement[];\n }\n if ((typeof _component_ !== \"undefined\") || (_component_ as Component).subcomponents.length < 1) {\n _component_.subcomponents = _buildComponentsFromElements_(elementList as HTMLElement[], _component_);\n }\n return _component_.subcomponents;\n }\n\n fail(standardResponse: { error: any; component: Component; }): Promise<{ error: any; component: Component; }> {\n const _ret_ = new Promise<{ error: any; component: Component; }>((resolve, reject) => {\n if (typeof standardResponse !== \"undefined\") {\n const { error, component } = standardResponse;\n resolve({ error, component });\n } else {\n reject(new Error(\" Unknown error.\"));\n }\n });\n return _ret_;\n }\n\n set(key: string, value: any):void {\n this[key] = value;\n }\n\n get(key: string, _defaultValue?: string): any {\n return this[key] || _defaultValue;\n }\n\n feedComponent(): Promise {\n const _component_ = this;\n logger.debug(`[Component][${this.name}][feedComponent] start feeding component...`);\n const _feedComponent_InBrowser = function (_component_: Component): any {\n if (typeof _component_.container === \"undefined\" && typeof _component_.body === \"undefined\") {\n logger.warn(\"COMPONENT {{NAME}} has an undefined container and body\".replace(\"{{NAME}}\", _component_.name));\n return;\n }\n const container = (typeof _component_.container === \"undefined\" || _component_.container === null) ? (_component_.body) : (_component_.container);\n const parsedAssignmentText = _component_.parsedAssignmentText;\n _component_.innerHTML = parsedAssignmentText;\n if (_component_.shadowed) {\n logger.debug(\"COMPONENT {{NAME}} is shadowed\".replace(\"{{NAME}}\", _component_.name));\n logger.debug(\"Preparing slots for Shadowed COMPONENT {{NAME}}\".replace(\"{{NAME}}\", _component_.name));\n const tmp_shadowContainer = _DOMCreateElement(\"div\");\n container.subelements(\"[slot]\").map(\n (c: { parentElement: any; }): any => {\n if (c.parentElement === container) {\n tmp_shadowContainer.appendChild(c as any);\n }\n return c;\n });\n logger.debug(\"Creating shadowedContainer for COMPONENT {{NAME}}\".replace(\"{{NAME}}\", _component_.name));\n const shadowContainer = _DOMCreateElement(\"div\");\n shadowContainer.classList.add(\"shadowHost\");\n try {\n _component_.shadowRoot = shadowContainer.attachShadow({\n mode: \"open\"\n }) as IQCObjectsShadowedElement;\n } catch (e: any) {\n logger.debug(`An error ocurred: ${e}.`);\n try {\n logger.debug(\"Shadowed COMPONENT {{NAME}} is repeated\".replace(\"{{NAME}}\", _component_.name));\n _component_.shadowRoot = shadowContainer.shadowRoot as IQCObjectsShadowedElement;\n } catch (e: any) {\n logger.debug(`An error ocurred: ${e}.`);\n logger.warn(\"Shadowed COMPONENT {{NAME}} is not allowed on this browser\".replace(\"{{NAME}}\", _component_.name));\n }\n }\n if (typeof _component_.shadowRoot !== \"undefined\" && _component_.shadowRoot !== null) {\n if (_component_.reload) {\n logger.debug(\"FORCED RELOADING OF CONTAINER FOR Shadowed COMPONENT {{NAME}}\".replace(\"{{NAME}}\", _component_.name));\n if (shadowContainer !== null && shadowContainer.shadowRoot !== null) {\n shadowContainer.shadowRoot.innerHTML = _component_.innerHTML;\n }\n } else {\n tmp_shadowContainer.innerHTML = _component_.parseTemplate(tmp_shadowContainer.innerHTML);\n logger.debug(\"ADDING Shadowed COMPONENT {{NAME}} \".replace(\"{{NAME}}\", _component_.name));\n if (shadowContainer !== null && shadowContainer.shadowRoot !== null) {\n shadowContainer.shadowRoot.innerHTML += _component_.innerHTML;\n }\n }\n logger.debug(\"ADDING Slots to Shadowed COMPONENT {{NAME}} \".replace(\"{{NAME}}\", _component_.name));\n shadowContainer.innerHTML += tmp_shadowContainer.innerHTML;\n logger.debug(\"APPENDING Shadowed COMPONENT {{NAME}} to Container \".replace(\"{{NAME}}\", _component_.name));\n const qs = container.querySelector(\".shadowHost\");\n if (!(typeof qs !== \"undefined\" && qs !== null)) {\n container.appendChild(shadowContainer);\n } else {\n logger.debug(\"Shadowed Container for COMPONENT {{NAME}} is already present in the tree \".replace(\"{{NAME}}\", _component_.name));\n if (_component_.shadowRoot !== null && shadowContainer.shadowRoot !== null) {\n _component_.shadowRoot.innerHTML = shadowContainer.shadowRoot.innerHTML;\n }\n }\n } else {\n logger.warn(\"Shadowed COMPONENT {{NAME}} is bad configured\".replace(\"{{NAME}}\", _component_.name));\n }\n } else {\n if (_component_.reload) {\n logger.debug(\"FORCED RELOADING OF CONTAINER FOR COMPONENT {{NAME}}\".replace(\"{{NAME}}\", _component_.name));\n container.innerHTML = _component_.innerHTML;\n } else if (container && _component_) {\n logger.debug(\"ADDING COMPONENT {{NAME}} \".replace(\"{{NAME}}\", _component_.name));\n container.innerHTML += _component_.innerHTML;\n } else {\n logger.warn(\"COMPONENT {{NAME}} is not added to the DOM\".replace(\"{{NAME}}\", _component_.name));\n }\n }\n\n };\n\n const _feedComponent_InNode = function (_component_: Component): any {\n const parsedAssignmentText = _component_.parsedAssignmentText;\n _component_.innerHTML = parsedAssignmentText;\n };\n\n let _ret_;\n if (!is_a(_component_, \"Component\")) {\n logger.warn(\"Trying to feed a non component object\");\n return Promise.reject(new Error(`Trying to feed a non component object ${typeof _component_}`));\n }\n return new Promise((resolve, reject) => {\n if (isBrowser) {\n try {\n _ret_ = _feedComponent_InBrowser(_component_);\n resolve(_ret_);\n } catch (e: any) {\n reject(new Error(e));\n }\n } else {\n try {\n _ret_ = _feedComponent_InNode(_component_);\n resolve(_ret_);\n } catch (e: any) {\n reject(new Error(e));\n }\n\n }\n\n });\n }\n\n rebuild(): Promise<{ request?: XMLHttpRequest, component: Component }> {\n const _component = this as Component;\n var _promise = new Promise<{ request?: XMLHttpRequest, component: Component }>(function (resolve, reject) {\n if (typeof _component === \"undefined\" || _component === null) {\n reject(new Error(\"Component is undefined\"));\n }\n if (isQCObjects_Object(_component) && is_a(_component, \"Component\")) {\n switch (true) {\n case (_component.get(\"tplsource\") === \"none\"):\n logger.debug(\"Component \" + _component.name + \" has specified template-source=none, so no template load was done\");\n var standardResponse = {\n request: undefined,\n component: _component\n };\n _component.__done__().then(function () {\n if (typeof _component.done === \"function\") {\n _component.done.call(_component, standardResponse)\n .catch((e: any) => {\n logger.debug(`It was an error while calling done() in ${_component.name}: ${e}`);\n });\n }\n resolve.call(_promise, standardResponse);\n }, function () {\n reject.call(_promise, standardResponse);\n });\n break;\n case (_component.get(\"tplsource\") === \"inline\"):\n logger.debug(\"Component \" + _component.name + \" has specified template-source=inline, so it is assumed that template is already declared\");\n (async (_component) => {\n await _component.feedComponent.bind(_component)();\n })(_component)\n .catch((e: any) => {\n logger.debug(`It was not possible to feed the component ${_component.name}: ${e}`);\n });\n var standardResponse = {\n request: undefined,\n component: _component\n };\n _component.__done__().then(async () => {\n if (typeof _component.done === \"function\") {\n await _component.done(standardResponse);\n }\n resolve.call(_promise, standardResponse);\n }, function () {\n reject.call(_promise, standardResponse);\n });\n break;\n case (_component.get(\"tplsource\") === \"default\" &&\n _component.get(\"templateURI\") !== \"\"):\n _component.set(\"url\", _component.get(\"basePath\") + _component.get(\"templateURI\"));\n (componentLoader(_component, false))?.then(\n function (standardResponse: any) {\n resolve.call(_promise, standardResponse);\n },\n function (standardResponse: any) {\n reject.call(_promise, standardResponse);\n });\n break;\n case (_component.get(\"tplsource\") === \"external\" &&\n _component.get(\"templateURI\") !== \"\"):\n _component.set(\"url\", _component.get(\"templateURI\"));\n (componentLoader(_component, false)).then(\n function (standardResponse: any) {\n resolve.call(_promise, standardResponse);\n },\n function (standardResponse: any) {\n reject.call(_promise, standardResponse);\n });\n break;\n case _component.get(\"tplsource\") === \"default\" && _component.get(\"templateURI\", \"\") === \"\":\n logger.debug(`Component ${_component.name} template-source is ${_component.get(\"tplsource\")} and no templateURI is present`);\n reject.call(_promise, `Component ${_component.name} template-source is ${_component.get(\"tplsource\")} and no templateURI is present`);\n break;\n default:\n logger.debug(\"Component \" + _component.name + \" will not be rebuilt because no templateURI is present\");\n reject.call(_promise, {\n request: null,\n component: _component\n });\n break;\n }\n\n }\n });\n return _promise;\n }\n\n Cast(oClass: any): any {\n /* Cast method for components has been deprecated. Don't use this method, it is available only for compatibility purposes */\n const o = _methods_(oClass).map((m): any => (m as Function).name.replace(/bound /g, \"\")).map(m => {\n return {\n [m]: oClass[m].bind(this)\n };\n }).reduce((c, p) => Object.assign(c, p), {});\n return _Cast(this, o);\n }\n\n route():Promise {\n return (this.constructor as typeof Component).route();\n }\n\n static route():Promise {\n const componentClass = this; /* is can be class or object */\n let _route_promise_;\n const isValidInstance = !!((isQCObjects_Object(componentClass) && is_a(componentClass, \"Component\")));\n const __route__ = function (componentList: any[]) {\n const _componentNames_: any[] = [];\n const _promises_ = componentList.filter(function (rc: any) {\n return typeof rc !== \"undefined\";\n }).map(function (rc: Component): Promise {\n if (typeof rc.name !== \"undefined\") {\n _componentNames_.push(rc.name);\n } else {\n throw new Error(__getType__(rc) + \" does not have a name\");\n }\n return new Promise(function (resolve, reject) {\n if (typeof rc !== \"undefined\" && !!rc._reroute_) {\n rc._reroute_()\n .then(function () {\n rc.reload = true;\n rc.rebuild()\n .then(() => {\n resolve();\n })\n .catch((e: any) => {\n logger.debug(`Error ${e}`);\n });\n return;\n })\n .then(function () {\n if (Object.hasOwn(rc, \"subcomponents\") &&\n typeof rc.subcomponents !== \"undefined\" &&\n rc.subcomponents.length > 0\n ) {\n logger.debug(\"LOOKING FOR ROUTINGS IN SUBCOMPONENTS FOR: \" + rc.name);\n return __route__.call(rc, rc.subcomponents);\n } else {\n logger.debug(\"No subcomponents to look for routings in: \" + rc.name);\n if (rc.subtags.length > 0) {\n rc.subcomponents = rc.__buildSubComponents__(true);\n }\n resolve();\n }\n }).catch((e: any) => {\n logger.debug(`Error: ${e}`);\n });\n } else if (typeof rc !== \"undefined\") {\n reject(new Error(\"Component \" + rc.name + \" is not an instance of Component\"));\n }\n return;\n });\n });\n return Promise.all(_promises_)\n .then(function () {\n logger.debug(\"ROUTING COMPLETED FOR \" + _componentNames_.join(\", \"));\n }).catch(function (err) {\n logger.warn(\"ROUTING FAILED FOR \" + _componentNames_.join(\", \") + \": \" + err);\n });\n };\n if (isValidInstance || !!componentsStack) {\n if (isValidInstance) {\n logger.debug(\"loading routings for instance \" + componentClass.name);\n }\n _route_promise_ = __route__.call(componentClass, (isValidInstance) ? (componentClass.subcomponents) : (componentsStack));\n } else {\n logger.debug(\"An undetermined result expected if load routings. So will not be loaded this time.\");\n throw Error(\"There is no valid instance and no components stack available to apply rountings\");\n }\n return _route_promise_;\n }\n\n fullscreen():void {\n if (isBrowser) {\n const elem: HTMLElement = this.body as HTMLElement;\n if (elem.requestFullscreen) {\n elem.requestFullscreen()\n .catch((e: any) => {\n throw new Error(`An error ocurred when requesting fullscreen: ${e}`);\n });\n } else if ((elem as any).mozRequestFullScreen) {\n /* Firefox */\n (elem as any).mozRequestFullScreen();\n } else if ((elem as any).webkitRequestFullscreen) {\n /* Chrome, Safari & Opera */\n (elem as any).webkitRequestFullscreen();\n } else if ((elem as any).msRequestFullscreen) {\n /* IE/Edge */\n (elem as any).msRequestFullscreen();\n }\n } else {\n // not yet implemented.\n }\n }\n\n closefullscreen():void {\n if (isBrowser) {\n if (document.exitFullscreen) {\n document.exitFullscreen()\n .catch((e: any) => { throw new Error(`An error ocurred when trying to exit fullscrenn ${e}.`); });\n } else if ((document as any).mozCancelFullScreen) {\n (document as any).mozCancelFullScreen();\n } else if ((document as any).webkitExitFullscreen) {\n (document as any).webkitExitFullscreen();\n } else if ((document as any).msExitFullscreen) {\n (document as any).msExitFullscreen();\n }\n } else {\n // noy yet implemented.\n }\n }\n\n _generateRoutingPaths(componentBody: TBody):Promise {\n const component = this;\n return new Promise(function (resolve) {\n if (isBrowser) {\n if (__valid_routing_way__(component.validRoutingWays, component.routingWay || \"\")) {\n if (typeof componentBody !== \"undefined\") {\n component.innerHTML = (componentBody as HTMLElement)?.innerHTML;\n component.routingNodes = (componentBody as IQCObjectsElement)?.subelements(\"routing\");\n component.routings = [];\n component.routingNodes.map((routingNode): any => {\n const attributeNames = (routingNode as HTMLElement).getAttributeNames();\n const routing = {} as TComponentRouting;\n attributeNames.map((attributeName: any, a: string | number): any => {\n (routing as any)[attributeNames[a as any]] = (routingNode as HTMLElement).getAttribute(attributeNames[a as any]);\n return attributeName;\n });\n component.routings.push(routing as never);\n if (!component.routingPaths) {\n component.routingPaths = [];\n }\n if (!component.routingPaths.includes(routing.path as never)) {\n component.routingPaths.push(routing.path as never);\n }\n if (!_top.global.get(\"routingPaths\")) {\n _top.global.set(\"routingPaths\", []);\n }\n if (!_top.global.get(\"routingPaths\").includes(routing.path)) {\n _top.global.get(\"routingPaths\").push(routing.path);\n }\n return routingNode;\n });\n }\n }\n } else {\n // not yet implemented.\n }\n resolve();\n\n });\n }\n\n parseTemplate(template: any): string {\n const _self = this;\n let _parsedAssignmentText: string;\n const value = template;\n if (Object.hasOwn(_self, \"templateHandler\")) {\n const templateHandlerName = _self.templateHandler;\n logger.debug(`[Component][${this.name}][parseTemplate] Attempting to use ${templateHandlerName} ...`);\n const templateHandlerClass = ClassFactory(templateHandlerName);\n const templateInstance = New(templateHandlerClass, {\n component: _self,\n template: value\n });\n templateInstance.component = _self;\n let selfData = _self.data;\n if (Object.hasOwn(_self, \"assignRoutingParams\") && _self.assignRoutingParams) {\n try {\n selfData = Object.assign(selfData, _self.routingParams);\n } catch (e: any) {\n logger.debug(`An error ocurred: ${e}.`);\n logger.debug(\"[parseTemplate] it was not possible to assign the routing params to the template\");\n }\n }\n _parsedAssignmentText = templateInstance.assign(selfData);\n } else {\n logger.debug(`[Component][${this.name}][parseTemplate] No value for templateHandler. Using raw content...`);\n _parsedAssignmentText = value;\n }\n return _parsedAssignmentText;\n }\n\n _reroute_(): Promise {\n /* This method set the selected routing and makes the switch to the templateURI */\n const rc = this;\n return new Promise(function (resolve) {\n if (isBrowser) {\n if (__valid_routing_way__(rc.validRoutingWays, rc.routingWay || \"\")) {\n rc.routingPath = (location as any)[rc.routingWay as string];\n rc.routingSelected.map((routing: TComponentRouting,): TComponentRouting => {\n const componentURI = ComponentURI({\n \"COMPONENTS_BASE_PATH\": CONFIG.get(\"componentsBasePath\"),\n \"COMPONENT_NAME\": routing.name.toString(),\n \"TPLEXTENSION\": (Object.hasOwn(routing, \"tplextension\")) ? (routing.tplextension || \"\") : (rc.tplextension),\n \"TPL_SOURCE\": \"default\" /* here is always default in order to get the right uri */\n });\n rc.templateURI = componentURI;\n return routing;\n });\n if (rc.routingSelected.length > 0) {\n rc.template = \"\";\n if (typeof rc.body !== \"undefined\" && rc.body !== null) {\n (rc.body as HTMLElement).innerHTML = \"\";\n }\n }\n }\n }\n resolve(rc);\n\n });\n }\n\n lazyLoadImages() {\n if (isBrowser) {\n const component = this;\n const _componentRoot = component.componentRoot as IQCObjectsShadowedElement;\n if (typeof _componentRoot !== \"undefined\" && _componentRoot !== null) {\n const _imgLazyLoaded = [..._componentRoot.subelements(\"img[lazy-src]\")];\n const _lazyLoadImages = function (image: Element | HTMLElement) {\n image.setAttribute(\"src\", image.getAttribute(\"lazy-src\")?.toString() as string);\n (image as HTMLImageElement).onload = () => {\n image.removeAttribute(\"lazy-src\");\n };\n };\n if (\"IntersectionObserver\" in window) {\n const observer = new IntersectionObserver((items, observer) => {\n items.forEach((item) => {\n if (item.isIntersecting) {\n _lazyLoadImages(item.target);\n observer.unobserve(item.target);\n }\n });\n });\n _imgLazyLoaded.map(function (img) {\n return observer.observe(img as unknown as HTMLImageElement);\n });\n } else {\n (_imgLazyLoaded as (HTMLElement | Element)[]).map(_lazyLoadImages);\n }\n }\n } else {\n // not yet implemented\n }\n return null;\n }\n\n applyTransitionEffect(effectClassName: string):void {\n const _Effect = ClassFactory(effectClassName);\n if (typeof _Effect === \"undefined\") {\n throw Error(`${effectClassName} not found.`);\n }\n if (typeof _Effect !== \"undefined\" && is_a(_Effect, \"TransitionEffect\")) {\n this.effect = New(_Effect, {\n component: this\n });\n (this.effect as any)?.apply((this.effect as any)?.defaultParams);\n } else {\n logger.debug(`${effectClassName} is ${__getType__(_Effect)} but is not a TransitionEffect`);\n }\n }\n\n applyObserveTransitionEffect(effectClassName: any):void {\n if (isBrowser) {\n const component = this;\n const _componentRoot = component.componentRoot;\n const _applyEffect_ = function () {\n component.applyTransitionEffect(effectClassName);\n };\n if (\"IntersectionObserver\" in window) {\n const observer = new IntersectionObserver((items, observer) => {\n items.forEach((item) => {\n if (item.isIntersecting) {\n _applyEffect_();\n observer.unobserve(item.target);\n }\n });\n });\n observer.observe(_componentRoot as Element);\n } else {\n _applyEffect_();\n }\n } else {\n // not yet implemented\n }\n\n }\n\n get componentRoot(): TBody {\n return (this.shadowed) ? (this.shadowRoot) : (this.body);\n }\n\n scrollIntoHash():void {\n if (isBrowser) {\n const component = this;\n if (document.location.hash !== \"\") {\n const _componentRoot = component.componentRoot;\n ((_componentRoot as IQCObjectsShadowedElement)?.subelements(document.location.hash) as unknown as Element[]).map(\n (element: Element): any => {\n if (typeof element.scrollIntoView === \"function\") {\n element.scrollIntoView(\n CONFIG.get(\"scrollIntoHash\", {\n behavior: \"auto\",\n block: \"top\",\n inline: \"top\"\n })\n );\n }\n return element;\n }\n );\n }\n } else {\n // not yet implemented\n }\n }\n\n i18n_translate():void {\n if (isBrowser) {\n if (CONFIG.get(\"use_i18n\")) {\n const component = this;\n const _componentRoot = component.componentRoot as IQCObjectsShadowedElement;\n const lang1 = CONFIG.get(\"lang\", \"en\");\n const lang2 = navigator.language.slice(0, 2);\n const i18n = _top.global.get(\"i18n\");\n if ((lang1 !== lang2) && (typeof i18n === \"object\" && Object.hasOwn(i18n, \"messages\"))) {\n const callback_i18n = () => {\n return new Promise(function (resolve) {\n const messages = i18n.messages.filter(function (message: any) {\n return Object.hasOwn(message, lang1) && Object.hasOwn(message, lang2);\n });\n (_componentRoot?.subelements(\"ul,li,h1,h2,h3,a,b,p,input,textarea,summary,details,option,component\") as HTMLElement[])\n .map((element: HTMLElement): HTMLElement => {\n messages.map(function (message: { [x: string]: any; }) {\n let _innerHTML = element.innerHTML;\n _innerHTML = _innerHTML?.replace(new RegExp(`${message[lang1]}`, \"g\"), message[lang2]);\n element.innerHTML = _innerHTML;\n return null;\n });\n return element;\n });\n resolve();\n });\n };\n callback_i18n.call(component).then(function () {\n logger.debug(\"i18n loaded for component: \" + component.name);\n }).catch((e: any) => { throw new Error(`An error ocurred when parsing i18n: ${e}.`); });\n\n }\n }\n } else {\n // not yet implemented\n }\n }\n\n addComponentHelper(componentHelper: any):void {\n const component = this;\n component._componentHelpers.push(componentHelper as never);\n }\n\n runComponentHelpers():void {\n if (isBrowser) {\n const component = this;\n let __component_helpers__ = [];\n /*\n * BEGIN use i18n translation\n */\n __component_helpers__.push(component.i18n_translate.bind(component));\n /*\n * END use i18n translation\n */\n\n /*\n * BEGIN component scrollIntoHash\n */\n __component_helpers__.push(component.scrollIntoHash.bind(component));\n /*\n * END component scrollIntoHash\n */\n\n /*\n * BEGIN component images lazy-load\n */\n\n __component_helpers__.push(component.lazyLoadImages.bind(component));\n\n /*\n * END component images lazy-load\n */\n\n __component_helpers__ = __component_helpers__.concat(component._componentHelpers);\n\n __component_helpers__.map(\n (_component_helper_): any => {\n logger.debug(`Executing ${_component_helper_.name} as component helper for ${component.name}...`);\n _component_helper_();\n return _component_helper_;\n }\n );\n\n } else {\n // not yet implemented\n }\n\n }\n\n}\n\nPackage(\"com.qcobjects\", [\n Component\n]);\n\n(_methods_)(ClassFactory(\"Component\")).map((__c__): any => {\n (_protected_code_)(__c__);\n return __c__;\n});\n", "import { IQCObjectsElement, TComponentURIParams } from \"@types\";\nimport { Class } from \"./Class\";\nimport { ClassFactory } from \"./ClassFactory\";\nimport { Component } from \"./Component\";\nimport { CONFIG } from \"./CONFIG\";\nimport { _DOMCreateElement } from \"./DOMCreateElement\";\nimport { __getType__ } from \"./getType\";\nimport { logger } from \"./Logger\";\nimport { New } from \"./New\";\nimport { Package } from \"./Package\";\nimport { isBrowser } from \"./platform\";\nimport { _tag_filter_ } from \"./tag_filter\";\n\n/**\n * Returns a standarized uri for a component\n * @example\n * templateURI = ComponentURI({'COMPONENTS_BASE_PATH':'','COMPONENT_NAME':'','TPLEXTENSION':'','TPL_SOURCE':''})\n * @author: Jean Machuca \n * @param params an object with the params to build the uri path\n */\nexport const ComponentURI = ({ TPL_SOURCE, COMPONENTS_BASE_PATH, COMPONENT_NAME, TPLEXTENSION }:TComponentURIParams):string => {\n const templateURI = (TPL_SOURCE === \"default\") ? (`${COMPONENTS_BASE_PATH}${COMPONENT_NAME}.${TPLEXTENSION}`) : (\"\");\n return templateURI;\n};\n\nexport const _buildComponentFromElement_ = (element: Element, __parent__: any):Component => {\n const __shadowed_not_set = (element.getAttribute(\"shadowed\") === null);\n const __tplsource_attr_not_set = (element.getAttribute(\"template-source\") === null);\n const shadowed = (element.getAttribute(\"shadowed\") === \"true\");\n const __cached_not_set = (element.getAttribute(\"cached\") === null);\n const cached = (element.getAttribute(\"cached\") === \"true\");\n let tplextension = (typeof CONFIG.get(\"tplextension\") !== \"undefined\") ? (CONFIG.get(\"tplextension\")) : (\"html\");\n tplextension = (element.getAttribute(\"tplextension\") !== null) ? (element.getAttribute(\"tplextension\")) : (tplextension);\n let _componentName = element.getAttribute(\"name\");\n const _componentClassName = (element.getAttribute(\"componentClass\") !== null) ? (element.getAttribute(\"componentClass\")) : (\"Component\");\n const __componentClassName = (CONFIG.get(\"preserveComponentBodyTag\")) ? (\n (_componentName !== null) ? (\"com.qcobjects.components.\" + _componentName + \".ComponentBody\") : (\"com.qcobjects.components.ComponentBody\")\n ) : (_componentClassName);\n _componentName = (_componentName !== null) ? (_componentName) : (\n (ClassFactory(__componentClassName as string) &&\n typeof (ClassFactory(__componentClassName as string) as unknown as typeof Component).name !== \"undefined\"\n ) ? (\n (ClassFactory(__componentClassName as string) as unknown as Component).name\n ) : (\"\")\n );\n const __classDefinition = ClassFactory(__componentClassName as string) as Component;\n const __tplsource_prop_set = !!((__componentClassName !== \"Component\" && ((typeof __classDefinition !== \"undefined\" && typeof __classDefinition.tplsource === \"string\") && __classDefinition.tplsource !== \"\")));\n const tplsource = (__tplsource_attr_not_set && __tplsource_prop_set) ? (__classDefinition.tplsource) : ((__tplsource_attr_not_set) ? (\"default\") : (element.getAttribute(\"template-source\")));\n logger.debug(`template source for ${_componentName} is ${tplsource} `);\n logger.debug(`type for ${_componentName} is ${__getType__(__classDefinition)} `);\n\n const componentURI: string = ComponentURI({\n \"COMPONENTS_BASE_PATH\": CONFIG.get(\"componentsBasePath\"),\n \"COMPONENT_NAME\": _componentName ,\n \"TPLEXTENSION\": tplextension,\n \"TPL_SOURCE\": tplsource as string\n });\n if (CONFIG.get(\"preserveComponentBodyTag\")) {\n Package((_componentName !== \"\") ? (\"com.qcobjects.components.\" + _componentName + \"\") : (\"com.qcobjects.components\"), [\n Class(\"ComponentBody\", Component, {\n name: _componentName,\n tplsource,\n tplextension,\n reload: true\n })\n ]);\n }\n\n const __create_component_instance_ = function ():Component {\n const __shadowed = (__shadowed_not_set) ? ((__classDefinition && __classDefinition.shadowed) || Component.shadowed) : (shadowed);\n const __definition = {\n __parent__,\n name: _componentName,\n cached: (__cached_not_set) ? (Component.cached) : (cached),\n shadowed: __shadowed,\n tplextension,\n body: (CONFIG.get(\"preserveComponentBodyTag\")) ? (_DOMCreateElement(\"componentBody\")) : (element),\n templateURI: componentURI,\n tplsource\n };\n if (typeof _componentName === \"undefined\" || _componentName === \"\" || _componentName === null) {\n /* this allows to use the original property defined\n in the component definition if it is not present in the tag */\n delete (__definition as any).name;\n }\n if (componentURI === \"\") {\n /* this allows to use the original property defined\n in the component definition if it is not present in the tag */\n delete (__definition as any).templateURI;\n }\n const newComponent = New(__classDefinition, __definition) as Component;\n\n if (CONFIG.get(\"preserveComponentBodyTag\")) {\n if (typeof newComponent !== \"undefined\") {\n element.append(newComponent.body as string | Node);\n }\n }\n return newComponent;\n };\n const newComponent = __create_component_instance_();\n return newComponent;\n};\n\nexport const _buildComponentsFromElements_ = (elements: HTMLElement[], __parent__: Component | null):Component[] => {\n let componentsBuiltWith:Component[] = [];\n if (isBrowser) {\n componentsBuiltWith = elements.map(\n function (element: any) {\n return _buildComponentFromElement_(element, __parent__);\n }\n );\n } else {\n logger.debug(\"[_buildComponentsFromElements_] not implemented for Non-Browser environments\");\n }\n return componentsBuiltWith;\n};\n\nexport const buildComponents = (element:HTMLElement):Component[] => {\n const tagFilter = _tag_filter_;\n const elements = (element as unknown as IQCObjectsElement).subelements(tagFilter) as HTMLElement[];\n return _buildComponentsFromElements_(elements, null);\n};", "import { _basePath_ } from \"./basePath\";\nimport { _Crypt } from \"./Crypt\";\nimport { _domain_ } from \"./domain\";\nimport { InheritClass } from \"./InheritClass\";\nimport { logger } from \"./Logger\";\nimport { Package } from \"./Package\";\nimport { _secretKey } from \"./secretKey\";\nimport { CONFIG } from \"./CONFIG\";\nimport { IJSONService, IService, TServiceDoneResponse, TServiceStandardResponse } from \"@types\";\n\nexport class Service extends InheritClass implements IService{\n options!: object;\n withCredentials!: boolean;\n useHTTP2: any;\n // eslint-disable-next-line no-unused-vars\n mockup({ request, service }: TServiceStandardResponse): void {\n throw new Error(\"Method not implemented.\");\n }\n name!: string;\n responseHeaders: any;\n // eslint-disable-next-line no-unused-vars\n local({ request, service }: TServiceStandardResponse): void {\n throw new Error(\"Method not implemented.\");\n }\n kind = \"rest\";\n /* it can be rest, mockup, local */\n domain:string = _domain_;\n basePath:string = _basePath_;\n url = \"\";\n method = \"GET\";\n data = {};\n reload = false;\n cached = false;\n\n headers: any;\n template: unknown;\n \n // eslint-disable-next-line no-unused-vars\n done({ request, service }: TServiceDoneResponse): void {\n throw new Error(\"Method not implemented.\");\n }\n // eslint-disable-next-line no-unused-vars\n fail(...args: any[]): void {\n throw new Error(\"Method not implemented.\");\n }\n\n set(name:string, value:never):void {\n this[name] = value;\n }\n\n get(name:string, _default?:never):any {\n return this[name] as never || _default;\n }\n\n}\n\nexport class JSONService extends Service implements IJSONService{\n method = \"GET\";\n cached = false;\n headers = {\n \"Content-Type\": \"application/json\",\n \"charset\": \"utf-8\"\n };\n\n JSONresponse?:JSON = undefined;\n done(result:TServiceDoneResponse):void {\n logger.debug(\"***** RECEIVED RESPONSE:\");\n logger.debug(result.service.template as string);\n this.JSONresponse = JSON.parse(result.service.template as string);\n }\n\n\n\n}\n\nexport class ConfigService extends JSONService {\n method = \"GET\";\n cached = false;\n configFileName = \"config.json\";\n headers = {\n \"Content-Type\": \"application/json\",\n \"charset\": \"utf-8\"\n };\n\n configLoaded():Promise{\n throw Error (\"Method not implemented.\");\n }\n\n JSONresponse?:JSON = undefined;\n done(result:TServiceDoneResponse):void {\n logger.debug(\"***** CONFIG LOADED:\");\n logger.debug(result.service.template as string);\n this.JSONresponse = JSON.parse(result.service.template as string);\n if (Object.hasOwn(this.JSONresponse as object, \"__encoded__\")) {\n const decodedValue:string = _Crypt.decrypt((this.JSONresponse as any)?.__encoded__, _secretKey);\n this.JSONresponse = JSON.parse(decodedValue);\n }\n const jsonResponse:any = this.JSONresponse;\n Object.keys(jsonResponse as object).map((k:string) => {\n CONFIG.set(k, (jsonResponse as never)[k]);\n return k;\n });\n this.configLoaded().catch((e:any)=>{throw new Error (`An error ocurred: ${e}`);});\n }\n\n fail():void {\n this.configLoaded().catch((e:any)=>{throw new Error (`An error ocurred: ${e}`);});\n }\n\n constructor() {\n super();\n this.set(\"url\", `${this.get(\"basePath\") as string}${this.get(\"configFileName\") as string}` as never);\n }\n}\n\n\nPackage(\"com.qcobjects.api\", [\n Service\n]);\n\nPackage(\"com.qcobjects.api.services\", [\n JSONService\n]);\n\nPackage(\"com.qcobjects.api.config\", [\n ConfigService\n]);\n", "import { IGlobalSettings } from \"@types\";\nimport { CONFIG } from \"./CONFIG\";\nimport { InheritClass } from \"./InheritClass\";\nimport { Logger, logger } from \"./Logger\";\nimport { Package } from \"./Package\";\nimport { isBrowser } from \"./platform\";\nimport { serviceLoader } from \"./serviceLoader\";\nimport { _top, buildComponentsStack, configService, setConfigService } from \"./top\";\nimport { ConfigService } from \"./Service\";\n\nexport class GlobalSettings extends InheritClass implements IGlobalSettings {\n static __start__(): Promise {\n return GlobalSettings.instance.__start__();\n }\n [key: string]: any;\n\n _GLOBAL: any = {};\n private static _instance: GlobalSettings;\n static get instance(): GlobalSettings {\n if (typeof GlobalSettings._instance === \"undefined\") {\n GlobalSettings._instance = new GlobalSettings();\n }\n return GlobalSettings._instance;\n }\n\n protected _logger: Logger = new Logger();\n get logger(): Logger {\n return this._logger;\n }\n\n set logger(value: Logger) {\n this._logger = value;\n }\n\n set(name: string, value: any): void {\n this._GLOBAL[name] = value;\n }\n\n get(name: string, _default?: any): any {\n let _value: any;\n if (typeof this._GLOBAL[name] !== \"undefined\") {\n _value = this._GLOBAL[name];\n } else if (typeof _default !== \"undefined\") {\n _value = _default;\n }\n return _value;\n }\n\n __start__(): Promise {\n const __load__serviceWorker = function () {\n let _promise: Promise | Promise;\n if (isBrowser) {\n _promise = new Promise(function (resolve, reject) {\n if ((\"serviceWorker\" in navigator) &&\n (typeof CONFIG.get(\"serviceWorkerURI\") !== \"undefined\")) {\n CONFIG.set(\"serviceWorkerScope\", CONFIG.get(\"serviceWorkerScope\") ? (CONFIG.get(\"serviceWorkerScope\")) : (\"/\"));\n navigator.serviceWorker.register(CONFIG.get(\"serviceWorkerURI\"), {\n scope: CONFIG.get(\"serviceWorkerScope\")\n })\n .then(function (registration) {\n logger.debug(\"Service Worker Registered\");\n resolve.call(_promise, registration);\n }, function (registration) {\n logger.debug(\"Error registering Service Worker\");\n reject.call(_promise, registration);\n });\n navigator.serviceWorker.ready.then(function (registration) {\n logger.debug(\"Service Worker Ready\");\n resolve.call(_promise, registration);\n }, function (registration) {\n logger.debug(\"Error loading Service Worker\");\n reject.call(_promise, registration);\n });\n }\n });\n } else {\n _promise = Promise.resolve();\n }\n return _promise;\n };\n const _buildComponents = function () {\n return new Promise((resolve) => {\n if (isBrowser) {\n logger.debug(\"Starting to building components\");\n try {\n buildComponentsStack();\n } catch (e: any) {\n throw Error(`Something went wrong trying to start components tree: ${e.message}`);\n }\n logger.debug(\"Initializing the service worker\");\n __load__serviceWorker.call(_top)\n .catch(function (e) {\n logger.debug(`error loading the service worker ${e}`);\n });\n }\n resolve();\n });\n };\n\n return new Promise((resolve) => {\n logger.debug(\"Starting to load the config settings...\");\n if (CONFIG.get(\"useConfigService\", false)) {\n logger.debug(\"Loading settings using local configuration file...\");\n setConfigService(new ConfigService());\n configService.configLoaded = _buildComponents;\n serviceLoader(configService)\n ?.then((standardResponse: any) => {\n resolve(standardResponse);\n })\n ?.catch((e: any) => { throw new Error(`An error ocurred while trying to load ${configService.url}: ${e}`); });\n } else {\n logger.debug(\"Starting to load the components...\");\n _buildComponents.call(this)\n .then(() => {\n resolve({});\n })\n .catch((e: any) => { throw new Error(`An error ocurred while trying to build the components stack. ${e}`); });\n }\n\n });\n }\n\n}\n\nPackage(\"com.qcobjects\", [\n GlobalSettings\n]);\n", "import { IComplexStorageCache, IComponent, IConfigService, IQCObjectsElement } from \"@types\";\nimport { buildComponents } from \"./ComponentFactory\";\nimport { _CastProps } from \"./Cast\";\nimport { GlobalSettings } from \"./globalSettings\";\nimport { Class } from \"./Class\";\nimport { ClassFactory } from \"./ClassFactory\";\nimport { Export } from \"./Export\";\nimport { isBrowser } from \"./platform\";\nimport { _QC_CLASSES, getPackagesNamesList, getPackagesList, getClassesList, getClassesNamesList } from \"./PrimaryCollections\";\nimport { logger } from \"./Logger\";\n\ntype QCObjects = {\n lastCache?:IComplexStorageCache,\n componentsStack:IComponent[],\n Microservice:any,\n Route:any,\n BackendMicroservice:any,\n QCObjectsElement:any,\n QCObjectsShadowedElement:any,\n Logger:any,\n Class:any, \n _Crypt:any, \n TagElements:any, \n DefaultTemplateHandler:any, \n SourceJS:any, \n SourceCSS:any, \n ArrayList:any, \n ArrayCollection:any, \n GlobalSettings:any, \n GLOBAL:any, \n DDO:any, \n CacheController:any, \n ComplexCacheParams:any, \n ComplexStorageCache:any, \n ComponentWidget:any, \n asyncLoad:any, \n RegisterClass:any, \n ComponentURI:any, \n waitUntil:any, \n super:any, \n _DOMCreateElement:any, \n shortCode:any, \n getType:any, \n is_a:any, \n _DataStringify:any, \n serviceLoader:any, \n componentLoader:any, \n ObjectName:any, \n isQCObjects_Class:any, \n isQCObjects_Object:any, \n NamespaceRef:any, \n RegisterWidget:any, \n RegisterWidgets:any, \n range:any, \n getDocumentLayout:any, \n Export:any, \n New:any, \n Tag:any, \n Ready:any, \n methods:any, \n // eslint-disable-next-line no-unused-vars\n set:(name:string, value:any) => void, \n // eslint-disable-next-line no-unused-vars\n get:(name:string, _default?:any) => any, \n start:any, \n InheritClass:any, \n Processor:any, \n ComponentParams:any, \n ComponentDoneResponse:any, \n Component:any, \n CONFIG:any, \n ControllerParams:any, \n Controller:any, \n ViewParams:any, \n View:any, \n Service:any, \n JSONService:any, \n ConfigService:any, \n VO:any, \n EffectParams:any, \n Effect:any, \n TransitionEffect:any, \n TimerParams:any, \n Timer:any, \n Toggle:any, \n logger:any, \n sdk:any, \n global:any, \n ClassFactory:any, \n Package:any, \n Import:any,\n _sdk_:any,\n ClassesList:any[], \n PackagesList:any[],\n PackagesNameList:any[],\n ClassesNameList:any[]\n} & typeof self & typeof global ;\n\nexport var _top: QCObjects = (\n (typeof module !== \"undefined\" && typeof module.exports !== \"undefined\" && module.exports) ||\n (typeof global !== \"undefined\" && global) ||\n (typeof globalThis !== \"undefined\" && globalThis) ||\n (typeof window !== \"undefined\" && window) ||\n (typeof self !== \"undefined\" && self !== null && self) ||\n this\n) as QCObjects;\n(_top as any).lastCache = undefined;\nexport let componentsStack:IComponent[] = [];\n\nexport const resetTop = ():void => {\n const globalSettings = GlobalSettings.instance;\n _top = _CastProps(globalSettings, _top, true);\n};\n\nexport const buildComponentsStack = ():void => {\n componentsStack = buildComponents(document as unknown as IQCObjectsElement);\n};\nexport let configService:IConfigService;\nexport const setConfigService = (_configService:IConfigService):void => {\n _top.global.configService = _configService;\n configService = _configService;\n};\n\nexport const set = (name:string, value:any):void => {\n _top[name as never] = value;\n};\n\nexport const get = (name:string, _defaultValue?:any):any => {\n return _top[name as never] || _defaultValue;\n};\n\nresetTop();\n\nconst _define_props = function (_top: any) {\n if (!Object.hasOwn(_top, \"PackagesList\")) {\n Object.defineProperty(_top, \"PackagesList\", {\n // eslint-disable-next-line no-unused-vars\n set:(value) => {\n logger.debug(\"PackagesList is readonly\");\n \n },\n get:():any => {\n return getPackagesList();\n }\n });\n \n }\n \n \n if (!Object.hasOwn(_top, \"PackagesNameList\")) {\n Object.defineProperty(_top, \"PackagesNameList\", {\n // eslint-disable-next-line no-unused-vars\n set:(val) => {\n logger.debug(\"PackagesNameList is readonly\");\n\n },\n get:():any =>{\n return getPackagesNamesList();\n }\n });\n\n }\n\n if (!Object.hasOwn(_top, \"ClassesList\")) {\n Object.defineProperty(_top, \"ClassesList\", {\n // eslint-disable-next-line no-unused-vars\n set:(value) => {\n logger.debug(\"ClassesList is readonly\");\n\n },\n get:(): any => {\n return getClassesList();\n }\n });\n }\n\n if (!Object.hasOwn(_top, \"ClassesNameList\")) {\n Object.defineProperty(_top, \"ClassesNameList\", {\n // eslint-disable-next-line no-unused-vars\n set(value):any {\n logger.debug(\"ClassesNameList is readonly\");\n\n },\n get:(): any => {\n return getClassesNamesList();\n }\n });\n\n }\n\n\n };\n\n\n if (isBrowser) {\n // use of GLOBAL word is deprecated in node.js\n // this is only for compatibility purpose with old versions of QCObjects in browsers\n Class(\"GLOBAL\", (_QC_CLASSES as any).global); // case insensitive for compatibility con old versions;\n Export(ClassFactory(\"GLOBAL\"));\n }\n\n if (isBrowser && typeof window !== \"undefined\") {\n set(\"global\", window);\n } else if (isBrowser && typeof globalThis !== \"undefined\") {\n set(\"global\", globalThis);\n }\n\n _define_props(_top);\n", "import { logger } from \"./Logger\";\nimport { isBrowser } from \"./platform\";\n\nexport let supportsPassive = false;\nexport const captureFalseTouch = ():boolean | { passive: boolean; } => {\n return (supportsPassive) ? ({\n passive: true\n }) : (false);\n};\n\n// Test via a getter in the options object to see if the passive property is accessed\nif (isBrowser) {\n try {\n const opts = Object.defineProperty({}, \"passive\", {\n get() {\n supportsPassive = true;\n return supportsPassive;\n }\n });\n (window as any).addEventListener(\"testPassive\", null, opts);\n (window as any).removeEventListener(\"testPassive\", null, opts);\n } catch (e:any) {\n logger.debug(`An error ocurred: ${e}.`);\n supportsPassive = false;\n }\n\n} else {\n supportsPassive = false;\n}", "import { _protected_code_ } from \"./introspection\";\n\nexport const range = (start: number, stop = 0, step = 1): number[] => {\n if (stop === 0 || typeof stop === \"undefined\") {\n stop = start;\n start = 0;\n }\n return Array.from({\n length: (stop - start) / step + 1\n }, function (_, i) {\n return start + (i * step);\n });\n};\n(_protected_code_)(range);\n\n", "import { logger } from \"./Logger\";\nimport { GlobalProcessor as Processor } from \"./Processor\";\nimport { _top } from \"./top\";\nimport { range } from \"./range\";\nimport { IComponent } from \"@types\";\n\n// Set Processors\nexport const setDefaultProcessors = ():void => {\n (function (_top):void {\n\n const mapper = (componentInstance:IComponent, componentName:string, valueName:string):string => {\n /*\n * Mapper processor\n * @usage\n * $mapper(,)\n *\n * Where componentName is the name of the component (same value as in attribute tag name) without quotes\n * and valueName is the name of the variable that contains the value to map, it can be either a property of\n * the component instance, the data object or a global value\n */\n \n if (typeof componentInstance === \"undefined\" || componentInstance === null) {\n throw Error(`mapper.${componentName}.${valueName} does not have a component instance or it is null.`);\n }\n const globalValue = _top.global.get(valueName);\n const componentValue = componentInstance.get(valueName);\n const dataValue = componentInstance.data[valueName];\n const list = (typeof dataValue !== \"undefined\") ? (dataValue) : ((typeof componentValue !== \"undefined\") ? (componentValue) : (globalValue));\n let listItems = \"\";\n if (typeof list !== \"undefined\" && typeof list.map !== \"undefined\") {\n listItems = list.map(function (element:HTMLElement) {\n const dataItems = [...Object.keys(element)].map(k => ` data-${k}=\"${(typeof (element as any)[k] !== \"undefined\" && (element as any)[k] !== null) ? ((element as any)[k].toString()) : (\"\")}\"`).join(\"\");\n return ``;\n }).join(\"\");\n } else {\n logger.debug(`${componentName}.${valueName} does not have a map property`);\n }\n return listItems;\n };\n Processor.setProcessor(mapper);\n \n const layout = function (componentInstance:IComponent, layoutname:string, cssfile:string):string {\n /*\n * Layout processor\n * @usage\n * $layout(, )\n * Where layoutname can be \"portrait\" or \"landscape\" without quotes\n * cssfile is the uri for the css file to import\n */\n \n const layout_portrait = `\n /* CSS Document for Mobile Imports */\n @import url(\"${cssfile}\") (orientation:portrait);\n @import url(\"${cssfile}\") (max-width:460px);\n @import url(\"${cssfile}\") (aspect-ratio: 9/16);\n @import url(\"${cssfile}\") (aspect-ratio: 10/16);\n @import url(\"${cssfile}\") (aspect-ratio: 5/8);\n @import url(\"${cssfile}\") (aspect-ratio: 3/4);\n @import url(\"${cssfile}\") (aspect-ratio: 2/3);\n `;\n const layout_landscape = `\n @import url(\"${cssfile}\") (orientation:landscape) and (min-width:460px);\n @import url(\"${cssfile}\") (aspect-ratio: 16/9) and (min-width:460px);\n @import url(\"${cssfile}\") (aspect-ratio: 16/10) and (min-width:460px);\n @import url(\"${cssfile}\") (aspect-ratio: 8/5) and (min-width:460px);\n @import url(\"${cssfile}\") (aspect-ratio: 4/3) and (min-width:460px);\n @import url(\"${cssfile}\") (aspect-ratio: 3/2) and (min-width:460px);\n `;\n const layout_code = {\n \"landscape\": layout_landscape,\n \"portrait\": layout_portrait\n };\n \n return (Object.hasOwn(layout_code, layoutname)) ? ((layout_code as any)[layoutname] as string) : (\"\");\n };\n \n Processor.setProcessor(layout);\n \n const component = (componentInstance:IComponent ,name:string, componentClass:string, ...args:string[]):string => {\n /*\n * component processor\n * @usage\n * $component(name=, componentClass=, ...)\n * Returns a component tag declaration like:\n * ...>\n */\n const arg = [...args].map(function (a) {\n return {\n [a.split(\"=\")[0]]: a.split(\"=\")[1]\n };\n }).reduce(function (k1, k2) {\n return Object.assign(k1, k2);\n });\n const attrs = [...Object.keys(arg)].map(function (a) {\n return `${a}=${arg[a as any]}`;\n }).join(\" \");\n return ``;\n };\n \n Processor.setProcessor(component);\n \n const quick_component = (componentInstance: IComponent,name:string, componentClass:string, ...args:string[]):string => {\n /*\n * component processor\n * @usage\n * $quick_component(name=, componentClass=, ...)\n * Returns a component tag declaration like:\n * ...>\n */\n const arg = [...args].map(function (a) {\n return {\n [a.split(\"=\")[0]]: a.split(\"=\")[1]\n };\n }).reduce(function (k1, k2) {\n return Object.assign(k1, k2);\n });\n const attrs = [...Object.keys(arg)].map(function (a) {\n return `${a}=${arg[a as any]}`;\n }).join(\" \");\n return ``;\n };\n \n Processor.setProcessor(quick_component);\n \n \n const repeat = (componentInstance:IComponent, length:number, text:string):string => {\n /*\n * Repeat processor\n * @usage\n * $repeat(, )\n * Where length is the number of occurrences of text\n */\n return range(length).map(\n function (index) {\n return text.replace(\"{{index}}\", index.toString());\n }\n ).join(\"\");\n };\n \n Processor.setProcessor(repeat);\n \n })(_top);\n \n};\n\n", "import { CONFIG } from \"./CONFIG\";\nimport { Export } from \"./Export\";\nimport { logger } from \"./Logger\";\nimport { isBrowser } from \"./platform\";\n\nexport const findPackageNodePath = function (packagename:string):string|null {\n let sdkPath = null;\n if (!isBrowser) {\n // eslint-disable-next-line @typescript-eslint/no-require-imports\n const fs = require(\"fs\");\n try {\n let sdkPaths = [\n `${CONFIG.get(\"projectPath\")}${CONFIG.get(\"relativeImportPath\")}`,\n `${CONFIG.get(\"basePath\")}${CONFIG.get(\"relativeImportPath\")}`,\n `${CONFIG.get(\"projectPath\")}`,\n `${CONFIG.get(\"basePath\")}`,\n `${CONFIG.get(\"relativeImportPath\")}`,\n `${process.cwd()}${CONFIG.get(\"relativeImportPath\")}`,\n `${process.cwd()}/node_modules/` + packagename,\n `${process.cwd()}/node_modules`,\n `${process.cwd()}`,\n \"node_modules\",\n \"./\",\n \"\"\n ].concat(module.paths);\n sdkPaths = sdkPaths.filter(p => {\n return (fs).existsSync(p + \"/\" + packagename);\n });\n if (sdkPaths.length > 0) {\n sdkPath = sdkPaths[0];\n logger.info(packagename + \" is Installed.\");\n } else {\n sdkPath = \"\";\n logger.info(`${packagename} is not in a standard path.`);\n }\n } catch (e) {\n // do nothing\n console.log(e);\n }\n\n }\n return sdkPath;\n};\nExport(findPackageNodePath);\n", "import { _basePath_ } from \"./basePath\";\nimport { CONFIG } from \"./CONFIG\";\nimport { _DataStringify } from \"./DataStringify\";\nimport { _DOMCreateElement } from \"./DOMCreateElement\";\nimport { findPackageNodePath } from \"./findPackageNodePath\";\nimport { logger } from \"./Logger\";\nimport { _require_, isBrowser } from \"./platform\";\nimport { _QC_PACKAGES, _QC_PACKAGES_IMPORTED, _QC_READY_LISTENERS } from \"./PrimaryCollections\";\n\n/**\n * Imports a script with the package nomenclature\n *\n * @param {Object} packagename\n * @param {Object} ready\n * @param {Boolean} external\n */\nexport const Import = function (packagename:string, ready?:Function, external?:boolean):Promise<{_imported_?:any, _package_name_?:string}> | undefined {\n\n if (external !== undefined){\n logger.debug(`[Import] Setting external=${external.toString()} resource to import: ${packagename}`);\n } \n if (external) {\n logger.debug(`[Import] Registering external resource to import: ${packagename}`);\n } else {\n logger.debug(`[Import] Registering local resource to import: ${packagename}`);\n }\n let _promise_import_: Promise;\n if (isBrowser) {\n _promise_import_ = new Promise(function (resolve, reject) {\n\n const allPackagesImported = function () {\n let ret = false;\n let cp = 0;\n // eslint-disable-next-line no-unused-vars\n for (const p in _QC_PACKAGES) {\n cp++;\n }\n if (cp < _QC_PACKAGES_IMPORTED.length) {\n ret = false;\n } else {\n ret = true;\n }\n return ret;\n };\n\n const readyImported = function (e: { target: { remove: () => void; }; }) {\n _QC_PACKAGES_IMPORTED.push(ready as never);\n if (allPackagesImported()) {\n _QC_PACKAGES_IMPORTED.map( (_imported_) => {\n return _QC_READY_LISTENERS.push(_imported_);\n });\n }\n if (isBrowser && CONFIG.get(\"removePackageScriptAfterLoading\")) {\n e.target.remove();\n }\n resolve.call(_promise_import_, {\n \"_imported_\": e.target,\n \"_package_name_\": packagename\n });\n };\n\n if (!Object.hasOwn(_QC_PACKAGES, packagename)) {\n const s1:HTMLScriptElement = _DOMCreateElement(\"script\") as unknown as HTMLScriptElement;\n s1.type = CONFIG.get(\"sourceType\", \"text/javascript\");\n s1.async = !!(CONFIG.get(\"asynchronousImportsLoad\"));\n (s1 as any).onreadystatechange = function () {\n if ((s1 as any).readyState === \"complete\") {\n readyImported(s1 as any);\n }\n };\n (s1 as any).onload = readyImported;\n s1.onerror = function (e: any) {\n logger.debug(`An error ocurred: ${e}.`);\n reject.call(_promise_import_, {\n \"_imported_\": s1,\n \"_package_name_\": packagename\n });\n };\n s1.src = (external) ? (CONFIG.get(\"remoteImportsPath\") + packagename + \".js\") : (_basePath_ + CONFIG.get(\"relativeImportPath\") + packagename + \".js\");\n document.getElementsByTagName(\"head\")[0].appendChild(s1);\n }\n });\n _promise_import_.catch(function () {\n logger.debug(\"Import: Error loading a package \");\n });\n\n } else {\n // support to be used in a nodejs environment\n _promise_import_ = new Promise(function (resolve, reject) {\n try {\n const standardNodePath = findPackageNodePath(packagename);\n let packageAbsoluteName = \"\";\n if (standardNodePath !== null) {\n packageAbsoluteName = standardNodePath + \"/\" + packagename;\n } else {\n const jsNodePath = findPackageNodePath(packagename + \".js\");\n if (jsNodePath !== null) {\n packageAbsoluteName = jsNodePath + \"/\" + packagename + \".js\";\n } else {\n packageAbsoluteName = _basePath_ + CONFIG.get(\"relativeImportPath\") + packagename;\n }\n }\n try {\n resolve.call(_promise_import_, {\n \"_imported_\": _require_(`${packageAbsoluteName}`),\n \"_package_name_\": packagename\n });\n } catch (e) {\n reject.call(_promise_import_, {\n \"_imported_\": null,\n \"_package_name_\": packagename,\n \"error\": e\n });\n }\n } catch (e) {\n reject.call(_promise_import_, {\n \"_imported_\": null,\n \"_package_name_\": packagename,\n \"error\": e\n });\n }\n }).catch(function (e) {\n // something wrong importing a package\n logger.debug(\"Something happened when importing \" + packagename);\n console.warn(e);\n });\n }\n _promise_import_.catch(function (e) {\n logger.warn(_DataStringify(e));\n });\n return _promise_import_;\n};\nImport.prototype.toString = function () {\n return \"Import(packagename,ready,external) { [QCObjects native code] }\";\n};\n", "export const __to_number = function (value:any): number {\n return ((isNaN(value)) ? (new Number(0) as number) : (new Number(value) as number));\n};", "import { isQCObjects_Class } from \"./isQCObjects\";\nimport { Package } from \"./Package\";\n\n/**\n * Declare Namespace\n *\n * @param {String} packageName\n * @param {Object} package\n */\nexport const NamespaceRef = function (namespace:string):any {\n const packageInstance = Package(namespace) || [];\n const classes = packageInstance.filter((c:any) => isQCObjects_Class(c)).map((c:any) => {\n return {\n [c.__definition.__classType]: c\n };\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n }).reduce((a:any, b:any):any => {return Object.assign(a, b);});\n return namespace.split(\".\").map(c => {\n return {\n [c]: classes\n };\n }).reverse().reduce((a, b) => {\n b[Object.keys(b).join(\".\")] = a;\n return b;\n });\n};\n", "import { CONFIG } from \"./CONFIG\";\nimport { isBrowser } from \"./platform\";\nimport { _QC_READY_LISTENERS } from \"./PrimaryCollections\";\nimport { _top } from \"./top\";\n\n/**\n * Defines a Custom Ready listener\n */\nexport const Ready = (e:any):void => {\n if (isBrowser) {\n _QC_READY_LISTENERS.push(e.bind(window) as never);\n } else if (typeof global !== \"undefined\") {\n _QC_READY_LISTENERS.push(e.bind(global) as never);\n }\n};\n\nexport const ready:Function = Ready; // case insensitive ready option\n\n/**\n * Default Ready event function for window. Executes all micro ready events of Import calls\n *\n * @param {Object} e\n */\n// eslint-disable-next-line no-unused-vars\nexport const _Ready = (e:any):void => {\n const _execReady = ():void => {\n // eslint-disable-next-line array-callback-return\n _QC_READY_LISTENERS.map(function (_ready_listener_, _r):any {\n if (typeof _ready_listener_ === \"function\") {\n (_ready_listener_ as Function)();\n _QC_READY_LISTENERS.splice(_r, 1);\n }\n });\n };\n if (CONFIG.get(\"delayForReady\") > 0) {\n if (isBrowser) {\n setTimeout(_execReady.bind(window), CONFIG.get(\"delayForReady\"));\n } else if (typeof global !== \"undefined\") {\n setTimeout(_execReady.bind(global), CONFIG.get(\"delayForReady\"));\n }\n } else {\n _execReady.call(_top);\n }\n};\n", "import { IArrayCollection, IArrayList } from \"@types\";\nimport { ClassFactory } from \"./ClassFactory\";\nimport { logger } from \"./Logger\";\nimport { New } from \"./New\";\nimport { __to_number } from \"./mathFunctions\";\n\n\nexport class ArrayList extends Array implements IArrayList {\n prototype: any;\n\n unique ():any[] {\n return this.filter(function (value:any, index:any, self:any) {\n return self.indexOf(value) === index;\n });\n };\n\n table(): void {\n console.table(this);\n };\n sum(): number {\n return this.reduce( (prev:any, current:any):number => {\n return (__to_number(prev)) + (__to_number(current));\n }, 0) as number;\n }\n avg(): number {\n return (this.length < 1) ? (0) : (this.reduce( (prev:any, current:any):number => {\n return (((__to_number(prev)) + (__to_number(current))) / 2);\n })) as number;\n }\n min(): number {\n return this.reduce( (prev:any, current:any):number => {\n return (__to_number(prev) <= __to_number(current)) ? (prev) : (current);\n }, Infinity) as number;\n }\n max(): number {\n return this.reduce( (prev:any, current:any):number => {\n return (__to_number(prev) >= __to_number(current)) ? (prev) : (current);\n }, 0) as number;\n }\n sortBy(propName: string, sortAsc?: boolean): any[] {\n const sort_function = (sortAsc) ? (\n function (prev:any, current:any) {\n return current[propName] < prev[propName] ? 1 : -1;\n }\n ) : (\n function (prev:any, current:any) {\n return current[propName] > prev[propName] ? 1 : -1;\n }\n );\n return this.sort(sort_function);\n }\n matrix(length: number, fillValue?: number): any[] {\n const x_func = () => {\n return fillValue;\n };\n return Array.from({\n length: length\n }, x_func);\n }\n matrix2d(length: number, fillValue?: number): any[][] {\n const y_func = function () {\n return fillValue;\n };\n const x_func = function () {\n return Array.from({\n length\n }, y_func);\n };\n return Array.from({\n length\n }, x_func);\n }\n matrix3d(length: number, fillValue?: number): any[][][] {\n const y_func = function () {\n return Array.from({\n length\n }, function () {\n return fillValue;\n });\n };\n const x_func = function () {\n return Array.from({\n length\n }, y_func);\n };\n return Array.from({\n length\n }, x_func);\n }\n\n\n}\n\nexport class ArrayCollection implements IArrayCollection {\n source :ArrayList = New(ArrayList, []);\n changed(prop: string, value: any):void {\n logger.debug(\"VALUE CHANGED\");\n logger.debug(prop);\n logger.debug(value);\n }\n push(value: any):number {\n const self = this;\n logger.debug(\"VALUE ADDED\");\n logger.debug(value);\n return self.source.push(value);\n }\n pop():any {\n const self = this;\n logger.debug(\"VALUE POPPED\");\n return self.source.pop();\n }\n _new_(source: ArrayList):void {\n const self = this;\n let _index = 0;\n self.source = New(ClassFactory(\"ArrayList\"), source);\n for (const _k in self.source) {\n if (!isNaN(_k as any)) {\n logger.debug(\"binding \" + _k.toString());\n (function (_pname:any) {\n Object.defineProperty(self, _pname, {\n set(value) {\n logger.debug(\"setting \" + _pname + \"=\" + value);\n self.source[_pname] = value;\n self.changed(_pname, value);\n },\n get():unknown {\n return self.source[_pname];\n }\n });\n })(_k);\n _index++;\n }\n\n }\n self.source.length = _index;\n Object.defineProperty(self, \"length\", {\n get() {\n return self.source.length;\n }\n });\n }\n}\n\n", "import { IQCObjectsElement, ITagElements } from \"@types\";\nimport { ClassFactory } from \"./ClassFactory\";\nimport { New } from \"./New\";\nimport { Package } from \"./Package\";\nimport { isBrowser } from \"./platform\";\nimport { Effect } from \"./Effect\";\nimport { ArrayList } from \"./ArrayCollection\";\n\nexport class TagElements extends ArrayList implements ITagElements {\n show():void {\n this.map(function (element:any) {\n return element.style.opacity = 1;\n });\n }\n hide():void {\n this.map(function (element:any) {\n return element.style.opacity = 0;\n });\n }\n effect(...args:T[]):void {\n const effectArguments = [...args].slice(1);\n const effectClassName = args[0] as string;\n let effectClass = undefined;\n if ((typeof effectClassName).toLowerCase() === \"string\") {\n effectClass = ClassFactory(effectClassName);\n }\n this.map(function (element:any):T {\n return ((effectClass as Effect).apply as Function).apply(effectClass, [element].concat(effectArguments)) as T;\n });\n }\n findElements(elementName:any):any {\n const _o = New(ClassFactory(\"TagElements\"));\n if (isBrowser) {\n for (const _k in this) {\n if (typeof _k === \"number\" && typeof this[_k] !== \"function\" && Object.hasOwn(this[_k], \"subelements\")) {\n _o.push(this[_k].subelements(elementName));\n }\n }\n } else {\n // not yet implemented.\n }\n return _o;\n }\n }\n\n /**\n * Gets the element of DOM found by tag name\n *\n * @param {Object} tagname\n * @param {Object} innerHTML\n */\n export const Tag = function (tagname:string, innerHTML?:string): T[] {\n const _o = New(TagElements);\n if (isBrowser) {\n const o = (document as unknown as IQCObjectsElement).subelements(tagname);\n const addedKeys = [];\n for (let _i = 0; _i < o.length; _i++) {\n if (typeof innerHTML !== \"undefined\" && Object.hasOwn(o[_i], \"innerHTML\")) {\n o[_i].innerHTML = innerHTML;\n }\n if (addedKeys.indexOf(_i) < 0) {\n _o.push(o[_i]);\n addedKeys.push(_i);\n }\n }\n } else {\n // not yet implemented.\n }\n return _o as T[];\n };\n\n\n Package(\"com.qcobjects\",[\n TagElements,\n Tag\n ]);", "import { _Crypt } from \"./Crypt\";\n\nexport const shortCode = (): string => {\n const length = 1000;\n const code1 = _Crypt.encrypt((Math.random() * length).toString().replace(\".\", \"\"), (new Date()).getTime().toString());\n const code2 = _Crypt.encrypt((Math.random() * length).toString().replace(\".\", \"\"), (new Date((new Date()).getTime() - 1000 * 1000)).getTime().toString());\n const shortCode = [...code2].map((o1: any, index: any): any => {\n return [...code1][index] === o1 ? null : o1;\n }).filter((c: any) => c !== null).join(\"\");\n return shortCode;\n};\n", "import { ClassFactory } from \"./ClassFactory\";\n\n/**\n * Returns a method from a superior QCObjects Class\n * It is useful for Class Inheritance in the _new_ and __new__ method constructors\n * @example _super_('MySuperClass','MySuperMethod').call(this,params) #where this is the current instance and params are method parameters\n *\n * @param {String} className\n * @param {String} classMethodName\n * @param {Object} params\n */\nexport const _super_ = function (className: string, classMethodName: string):T {\n return (ClassFactory(className))[classMethodName] as T;\n};\n_super_.prototype.toString = function () {\n return \"_super_(className,classMethodName,params) { [QCObjects native code] }\";\n};\n", "import { logger } from \"./Logger\";\n\nexport const waitUntil = (func:()=>void, exp:()=>any):void => {\n const _waitUntil = (func:()=>void, exp:()=>any):void => {\n const maxWaitCycles = 2000;\n let _w = 0;\n var _t = setInterval(function () {\n if (exp()) {\n clearInterval(_t);\n func();\n logger.debug(\"Ejecuting \" + func.name + \" after wait\");\n } else {\n if (_w < maxWaitCycles) {\n _w += 1;\n logger.debug(\"WAIT UNTIL \" + func.name + \" is true, \" + _w.toString() + \" cycles\");\n } else {\n logger.debug(\"Max execution time for \" + func.name + \" expression until true\");\n clearInterval(_t);\n }\n }\n }, 1);\n };\n setTimeout(function () {\n _waitUntil(func, exp);\n }, 1);\n };\n", "export const subelements = function subelements(this: any, query: string): T[] {\n const _self = this;\n return [..._self.querySelectorAll(query)] as T[];\n};", "import { CONFIG } from \"./CONFIG\";\nimport { findPackageNodePath } from \"./findPackageNodePath\";\nimport { Import } from \"./Import\";\nimport { logger } from \"./Logger\";\nimport { _require_, isBrowser, isNodeCommonJS } from \"./platform\";\n\nconst loadSDK = ():void => {\n if (CONFIG.get(\"useSDK\")) {\n (function () {\n const remoteImportsPath = CONFIG.get(\"remoteImportsPath\");\n const external = (!CONFIG.get(\"useLocalSDK\"));\n CONFIG.set(\"remoteImportsPath\", CONFIG.get(\"remoteSDKPath\"));\n\n let tryImportingSDK = false;\n let sdkName = \"QCObjects-SDK\";\n if (isBrowser) {\n tryImportingSDK = true;\n } else {\n const sdkPath = findPackageNodePath(\"qcobjects-sdk\");\n if (sdkPath !== null) {\n sdkName = \"qcobjects-sdk\";\n tryImportingSDK = true;\n } else if (sdkPath !== \"\"){\n sdkName = \"node_modules/qcobjects-sdk/QCObjects-SDK\";\n tryImportingSDK = true;\n } else {\n tryImportingSDK = false;\n }\n }\n\n if (tryImportingSDK) {\n logger.info(\"Importing SDK... \" + sdkName);\n if (isNodeCommonJS && typeof require !== \"undefined\") {\n const sdk = _require_(\"qcobjects-sdk\");\n if (sdk) {\n logger.debug(\"QCObjects SDK was loaded OK.\");\n } else {\n logger.debug(\"QCObjects SDK could not be imported.\");\n }\n } else {\n Import(sdkName, function () {\n if (external) {\n logger.debug(\"QCObjects-SDK.js loaded from remote location\");\n } else {\n logger.debug(\"QCObjects-SDK.js loaded from local\");\n }\n CONFIG.set(\"remoteImportsPath\", remoteImportsPath);\n }, external)\n ?.catch((e: any) => { throw new Error(`An error ocurred when trying to import: ${e}`); });\n }\n } else {\n logger.debug(\"SDK has not been imported as it is not available at the moment\");\n }\n })();\n }\n\n};\n\nexport default loadSDK;\n", "import { IQCObjectsElement, IQCObjectsShadowedElement } from \"@types\";\nimport { _top } from \"./top\";\nimport { _fireAsyncLoad, asyncLoad } from \"./asyncLoad\";\nimport { captureFalseTouch } from \"./captureFalseTouch\";\nimport { _Cast } from \"./Cast\";\nimport { Class } from \"./Class\";\nimport { ClassFactory } from \"./ClassFactory\";\nimport { Component } from \"./Component\";\nimport { ComponentURI } from \"./ComponentFactory\";\nimport { componentLoader } from \"./componentLoader\";\nimport { CONFIG } from \"./CONFIG\";\nimport { _DataStringify } from \"./DataStringify\";\nimport { setDefaultProcessors } from \"./defaultProcessors\";\nimport { Export } from \"./Export\";\nimport { Import } from \"./Import\";\nimport { _methods_, _protected_code_ } from \"./introspection\";\nimport { isQCObjects_Class, isQCObjects_Object } from \"./isQCObjects\";\nimport { logger } from \"./Logger\";\nimport { __to_number } from \"./mathFunctions\";\nimport { NamespaceRef } from \"./NamespaceRef\";\nimport { New } from \"./New\";\nimport { ObjectName } from \"./ObjectName\";\nimport { Package } from \"./Package\";\nimport { is_phonegap, isBrowser } from \"./platform\";\nimport { _Ready, ready, Ready } from \"./Ready\";\nimport { serviceLoader } from \"./serviceLoader\";\nimport { Tag } from \"./Tag\";\nimport { Processor } from \"./Processor\";\nimport { is_a } from \"./is_a\";\nimport { __getType__ } from \"./getType\";\nimport { shortCode } from \"./shortCode\";\nimport { _DOMCreateElement } from \"./DOMCreateElement\";\nimport { ComplexStorageCache } from \"./ComplexStorageCache\";\nimport { _super_ } from \"./super\";\nimport { waitUntil } from \"./waitUntil\";\nimport { subelements } from \"./subelements\";\nimport { GlobalSettings } from \"./globalSettings\";\nimport loadSDK from \"./loadSDK\";\nimport { range } from \"./range\";\n\n(function __qcobjects__(_top: any) {\n if (typeof Object.defineProperty !== \"undefined\" && typeof _top !== \"undefined\") {\n try {\n Object.defineProperty(_top, \"__qcobjects__\", {\n enumerable: true,\n configurable: false,\n writable: false,\n value: __qcobjects__,\n });\n } catch (e: any) {\n logger.debug(`An error ocurred: ${e}`);\n if (typeof _top.__qcobjects__ !== \"undefined\") {\n _top.__qcobjects__.loaded = true;\n }\n }\n }\n if (typeof _top.__qcobjects__.loaded === \"undefined\") {\n _top.__qcobjects__.loaded = true;\n\n if (isBrowser) {\n (Element as unknown as IQCObjectsElement).prototype.subelements = subelements;\n (Document as unknown as IQCObjectsElement).prototype.subelements = subelements;\n (HTMLElement as unknown as IQCObjectsElement).prototype.subelements = subelements;\n if (typeof ShadowRoot !== \"undefined\") {\n (ShadowRoot as unknown as IQCObjectsShadowedElement).prototype.subelements = subelements;\n }\n }\n\n\n logger.debugEnabled = false;\n logger.infoEnabled = true;\n\n /**\n * Basic Type of all elements\n */\n if (isBrowser) {\n (Element as unknown as IQCObjectsElement).prototype.find = function (tag: string): IQCObjectsElement[] {\n const _self = this;\n const _oo: IQCObjectsElement[] = [];\n const _tags = (document as unknown as IQCObjectsElement).subelements(tag);\n _tags.map((_tt, _t) => {\n if ((typeof _tags[_t] !== \"undefined\") && (_tags[_t].parentNode as Element).tagName === _self.parentNode.tagName) {\n _oo.push(_Cast(_tt, (new Object())));\n }\n return _tt;\n });\n return _oo;\n };\n }\n\n if (isBrowser) {\n Element.prototype.append = function QC_Append(child) {\n if (isQCObjects_Object(child) || typeof (child as any).body !== \"undefined\") {\n this.appendChild((child as any).body);\n } else {\n this.appendChild(child as any);\n }\n };\n\n /**\n * A replacement for direct using of innerHTML\n * use: [element].render('content') where 'content' is the string corresponding\n * to the DOM to insert in the element\n **/\n (Element as unknown as IQCObjectsElement).prototype.render = function QC_Render(content: string) {\n const _self = this;\n const _appendVDOM = (_self: any, content: string): any => {\n if (typeof document.implementation.createHTMLDocument !== \"undefined\") {\n const doc = document.implementation.createHTMLDocument(\"\");\n doc.body.innerHTML = content;\n (doc.body as unknown as IQCObjectsElement).subelements(\"*\").map((element): any => {\n return _self.append(element);\n });\n }\n };\n if (typeof this.innerHTML !== \"undefined\") {\n try {\n this.innerHTML += content;\n } catch (e: any) {\n logger.debug(`An error ocurred: ${e}`);\n _appendVDOM(_self, content);\n }\n } else {\n _appendVDOM(_self, content);\n }\n };\n }\n\n\n\n Export(waitUntil);\n Export(_super_);\n Export(ComplexStorageCache);\n Export(ClassFactory);\n Export(_DOMCreateElement);\n Export(shortCode);\n Export(__getType__);\n Export(is_a);\n Package(\"com.qcobjects\", [Processor]);\n\n\n\n\n if (isBrowser) {\n /**\n * Adds a Cast functionality to every Element of DOM\n */\n (Element as unknown as IQCObjectsElement).prototype.Cast = function QC_Cast(_o: T): T {\n const _self: any = this;\n return _Cast(_self, _o) as T;\n };\n }\n\n\n\n if (isBrowser) {\n window.onload = _Ready;\n if (is_phonegap) {\n document.addEventListener(\"deviceready\", _Ready, captureFalseTouch as any);\n }\n } else {\n global.onload = _Ready;\n }\n\n if (isBrowser) {\n window.addEventListener(\"popstate\", function (popStateEvent) {\n popStateEvent.stopImmediatePropagation();\n popStateEvent.stopPropagation();\n Component.route()\n .catch((e: any) => { throw new Error(`An error ocurred when trying to load initial routes. ${e}`); });\n });\n }\n\n\n\n Export(serviceLoader);\n Export(componentLoader);\n Export(ComponentURI);\n Export(ObjectName);\n Export(_DataStringify);\n Export(isQCObjects_Class);\n Export(isQCObjects_Object);\n Export(NamespaceRef);\n\n /**\n * Array math functions\n */\n // eslint-disable-next-line no-unused-vars\n (Array as any).prototype.unique = function (this: T[]): T[] {\n return this.filter(function (value: any, index: any, self: any) {\n return self.indexOf(value) === index;\n });\n };\n (Array as any).unique = function (a: Array): T[] {\n return (a as any).unique() as T[];\n };\n (_protected_code_)((Array as any).unique);\n (_protected_code_)((Array as any).prototype.unique);\n (Array as any).prototype.table = function (): void {\n console.table(this);\n };\n (Array as any).table = function (a: any): void {\n a.table();\n return;\n };\n (_protected_code_)((Array as any).table);\n (_protected_code_)((Array as any).prototype.table);\n (Array as any).prototype.sum = function (): number {\n return this.reduce(function (prev: any, current: any) {\n return (__to_number(prev)) + (__to_number(current));\n }, 0) as number;\n };\n (Array as any).sum = function (a: any): number {\n return a.sum() as number;\n };\n (_protected_code_)((Array as any).sum);\n (_protected_code_)((Array as any).prototype.sum);\n (Array as any).prototype.avg = function (): number {\n return (this.length < 1) ? (0) : (this.reduce(function (prev: any, current: any) {\n return (((__to_number(prev)) + (__to_number(current))) / 2);\n })) as number;\n };\n (Array as any).avg = function (a: any): number {\n return a.avg() as number;\n };\n (_protected_code_)((Array as any).avg);\n (_protected_code_)((Array as any).prototype.avg);\n (Array as any).prototype.min = function (): number {\n return this.reduce(function (prev: number, current: number) {\n return (__to_number(prev) <= __to_number(current)) ? (prev) : (current);\n }, Infinity) as number;\n };\n (Array as any).min = function (a: any): number {\n return a.min() as number;\n };\n (_protected_code_)((Array as any).min);\n (_protected_code_)((Array as any).prototype.min);\n (Array as any).prototype.max = function (): number {\n return this.reduce(function (prev: number, current: number) {\n return (__to_number(prev) >= __to_number(current)) ? (prev) : (current);\n }, 0) as number;\n };\n (Array as any).max = function (a: any): number {\n return a.max() as number;\n };\n (_protected_code_)((Array as any).max);\n (_protected_code_)((Array as any).prototype.max);\n (Array as any).prototype.sortBy = function (propName: string, sortAsc = true): Array[] {\n const sort_function = (sortAsc) ? (\n function (prev: any, current: any) {\n return current[propName] < prev[propName] ? 1 : -1;\n }\n ) : (\n function (prev: any, current: any) {\n return current[propName] > prev[propName] ? 1 : -1;\n }\n );\n return this.sort(sort_function) as Array[];\n };\n (Array as any).sortBy = function (a: any, propName: string, sortAsc = true): Array[] {\n return a.sortBy(propName, sortAsc) as Array[];\n };\n (_protected_code_)((Array as any).sortBy);\n (_protected_code_)((Array as any).prototype.sortBy);\n\n /**\n * Extends the Array prototype to include a method that creates a matrix (2D array)\n * with specified dimensions and fill value.\n *\n * @param {number} _length - The number of rows in the matrix.\n * @param {any} [_fillValue=0] - The value to fill the matrix with (default is 0).\n * @returns {Array>} A 2D array (matrix) filled with the specified value.\n *\n * @example\n * // Create a 3x3 matrix filled with zeros\n * const matrix = [].matrix(3);\n * console.log(matrix);\n * // Output: [0, 0, 0]\n *\n * @example\n * // Create a 2x4 matrix filled with a specific value\n * const matrix = [].matrix(2, 5);\n * console.log(matrix);\n * // Output: [5, 5]\n *\n * @example\n * // Create a 4x2 matrix filled with null values\n * const matrix = [].matrix(4, null);\n * console.log(matrix);\n * // Output: [null, null, null, null]\n */\n (Array as any).prototype.matrix = function (_length: number, _fillValue = 0) {\n // eslint-disable-next-line no-unused-vars\n const x_func = function (x = undefined) {\n return _fillValue;\n };\n return Array.from({\n length: _length\n }, x_func);\n };\n\n /**\n * Creates a matrix (2D array) from a given array.\n * \n * This function extends the Array constructor by adding a static method\n * that generates a matrix with specified dimensions and fill value.\n * \n * @function\n * @param {Array} a - The input array used to generate the matrix.\n * @param {number} _length - The length of the matrix (number of rows).\n * @param {number} [_fillValue=0] - The value to fill the matrix with (default is 0).\n * @returns {Array} A 2D array (matrix) created from the input parameters.\n * \n * @example\n * const myMatrix = Array.matrix(2, 5);\n * // myMatrix will be [5, 5, 5]\n */\n (Array as any).matrix = function (a: any, _length: number, _fillValue = 0): T[] {\n return a.matrix(_length, _fillValue) as T[];\n };\n\n (_protected_code_)((Array as any).matrix);\n (_protected_code_)((Array as any).prototype.matrix);\n\n\n (Array as any).prototype.matrix2d = function (_length: number, _fillValue = 0) {\n // eslint-disable-next-line no-unused-vars\n const y_func = function (y: any) {\n return _fillValue;\n };\n // eslint-disable-next-line no-unused-vars\n const x_func = function (x: any) {\n return Array.from({\n length: _length\n }, y_func);\n };\n return Array.from({\n length: _length\n }, x_func);\n };\n (Array as any).matrix2d = function (a: any, _length: number, _fillValue = 0): T[][] {\n return a.matrix2d(_length, _fillValue) as T[][];\n };\n\n (_protected_code_)((Array as any).matrix2d);\n (_protected_code_)((Array as any).prototype.matrix2d);\n\n (Array as any).prototype.matrix3d = function (_length: number, _fillValue = 0) {\n // eslint-disable-next-line no-unused-vars\n const y_func = function (y: any) {\n return Array.from({\n length: _length\n }, function () {\n return _fillValue;\n });\n };\n // eslint-disable-next-line no-unused-vars\n const x_func = function (x: any) {\n return Array.from({\n length: _length\n }, y_func);\n };\n return Array.from({\n length: _length\n }, x_func);\n };\n\n (Array as any).matrix3d = function (a: any, _length: number, _fillValue = 0): T[][][] {\n return a.matrix3d(_length, _fillValue) as T[][][];\n };\n\n\n (_protected_code_)((Array as any).matrix3d);\n (_protected_code_)((Array as any).prototype.matrix3d);\n\n\n\n (String as unknown as any).prototype.list = function (): string[] {\n const __instance = this;\n return range(0, __instance.length - 1).map(function (i: any): T {\n return __instance[i] as T;\n }) as string[];\n };\n (_protected_code_)((String as unknown as any).prototype.list);\n\n\n\n /**\n * End of array math functions\n */\n\n\n\n setDefaultProcessors();\n\n\n /**\n * Load every component tag declared in the body\n **/\n Ready(function () {\n if (!CONFIG.get(\"useSDK\")) {\n GlobalSettings.__start__()\n .catch((e: any) => {\n throw Error(e);\n });\n }\n });\n\n /*\n Public variables and functions\n */\n Export(Export); /* exports the same Export function once */\n Export(Import);\n Export(Package);\n Export(Class);\n Export(New);\n Export(Tag);\n Export(Ready);\n Export(ready);\n Export(isBrowser);\n Export(_methods_);\n Export(GlobalSettings);\n\n\n (loadSDK)();\n\n if (isBrowser) {\n asyncLoad(function (): any {\n Ready(function () {\n\n /*\n * scroll management custom events\n * usage: document.addEventListener('percentY90',function(e){console.log(e.detail.percentY)});\n * possible events: scrollpercent, defaultscroll, percentY0, percentY25, percentY50, percentY75, percentY90\n */\n\n (function (_top) {\n let ticking = false;\n const scrollHeight = Math.max(\n document.body.scrollHeight, document.documentElement.scrollHeight,\n document.body.offsetHeight, document.documentElement.offsetHeight,\n document.body.clientHeight, document.documentElement.clientHeight\n );\n\n const scrollWidth = Math.max(\n document.body.scrollWidth, document.documentElement.scrollWidth,\n document.body.offsetWidth, document.documentElement.offsetWidth,\n document.body.clientWidth, document.documentElement.clientWidth\n );\n\n function scrollDispatcher(event: any) {\n const percentY = Math.round(_top.scrollY * 100 / scrollHeight);\n const percentX = Math.round(_top.scrollX * 100 / scrollWidth);\n const scrollPercentEventEvent = new CustomEvent(\"scrollpercent\", {\n detail: {\n percentX,\n percentY\n }\n });\n event.target.dispatchEvent(scrollPercentEventEvent);\n let secondaryEventName = \"defaultscroll\";\n const __valid_scrolls__ = [0, 5, 10, 25, 50, 75, 90, 95, 100];\n __valid_scrolls__.filter(function (p) {\n return p === percentY;\n }).map(function (pY: T): T {\n secondaryEventName = \"percentY\" + percentY.toString();\n const secondaryCustomEvent = new CustomEvent(secondaryEventName, {\n detail: {\n percentX,\n percentY\n }\n });\n event.target.dispatchEvent(secondaryCustomEvent);\n return pY;\n });\n\n }\n\n document.addEventListener(\"scroll\", function (event) {\n\n if (!ticking) {\n requestAnimationFrame(function () {\n scrollDispatcher(event);\n ticking = false;\n });\n\n ticking = true;\n }\n });\n\n })(_top);\n\n });\n }, []);\n }\n\n if (!isBrowser) {\n if (typeof _top.global !== \"undefined\" && Object.hasOwn(_top.global, \"_fireAsyncLoad\")) {\n _fireAsyncLoad.call(_top);\n }\n if (typeof _top.global !== \"undefined\" && Object.hasOwn(_top.global, \"onload\")) {\n _top.global.onload.call(_top);\n }\n }\n\n\n /* Freezing Object && Object.prototype to prevent prototype pollution risks */\n (function (isBrowser) {\n const __freeze__ = function () {\n Object.freeze(Object.prototype);\n Object.freeze(Object);\n };\n if (isBrowser && CONFIG.get(\"secureObjects\", false)) {\n Ready(function () {\n __freeze__();\n });\n } else if (CONFIG.get(\"secureObjects\", false)) {\n __freeze__();\n }\n })(isBrowser);\n }\n\n})(_top);\n", "/**\n * QCObjects 2.4\n * ________________\n *\n * Author: Jean Machuca \n *\n * Cross Browser Javascript Framework for MVC Patterns\n * QuickCorp/QCObjects is licensed under the\n * GNU Lesser General Public License v3.0\n * [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)\n *\n * Permissions of this copyleft license are conditioned on making available\n * complete source code of licensed works and modifications under the same\n * license or the GNU GPLv3. Copyright and license notices must be preserved.\n * Contributors provide an express grant of patent rights. However, a larger\n * work using the licensed work through interfaces provided by the licensed\n * work may be distributed under different terms and without source code for\n * the larger work.\n *\n * Copyright (C) 2015 Jean Machuca,\n *\n * Everyone is permitted to copy and distribute verbatim copies of this\n * license document, but changing it is not allowed.\n */\n/* eslint no-unused-vars: \"off\" */\n/* eslint no-redeclare: \"off\" */\n/* eslint no-empty: \"off\" */\n/* eslint strict: \"off\" */\n\n/* eslint no-mixed-operators: \"off\" */\n\n\"use strict\";\n\nexport * as AssignPolyfill from \"./assign\";\nexport * as __top__ from \"./top\";\nexport * as qcobjects from \"./MainProcess\";\nexport {_top, resetTop} from \"./top\";\nexport { _QC_CLASSES, _QC_PACKAGES, _QC_PACKAGES_IMPORTED, _QC_READY_LISTENERS } from \"./PrimaryCollections\";\nexport { _DataStringify } from \"./DataStringify\";\nexport { _DOMCreateElement } from \"./DOMCreateElement\";\nexport { _methods_, _protected_code_ } from \"./introspection\";\nexport { logger, Logger } from \"./Logger\";\nexport { _require_, is_phonegap, isBrowser, isNodeCommonJS } from \"./platform\";\nexport { subelements } from \"./subelements\";\nexport { __is_raw_class__ } from \"./is_raw_class\";\nexport { _LegacyCopy } from \"./LegacyCopy\";\nexport { _fireAsyncLoad, asyncLoad } from \"./asyncLoad\";\nexport { __instanceID } from \"./IncrementInstanceID\";\nexport { ObjectName } from \"./ObjectName\";\nexport { __getType__ } from \"./getType\";\nexport { is_a } from \"./is_a\";\nexport { ComplexStorageCache } from \"./ComplexStorageCache\";\nexport { waitUntil } from \"./waitUntil\";\nexport { _Cast, _CastProps } from \"./Cast\";\nexport { isQCObjects_Class, isQCObjects_Object } from \"./isQCObjects\";\nexport { Package } from \"./Package\";\nexport { ClassFactory } from \"./ClassFactory\";\nexport { Export } from \"./Export\";\nexport { Class } from \"./Class\";\nexport { InheritClass } from \"./InheritClass\";\nexport { _super_ } from \"./super\";\nexport { shortCode } from \"./shortCode\";\nexport { Processor } from \"./Processor\";\nexport { New } from \"./New\";\nexport { _Ready, ready, Ready } from \"./Ready\";\nexport { captureFalseTouch } from \"./captureFalseTouch\";\nexport { serviceLoader } from \"./serviceLoader\";\nexport { componentLoader } from \"./componentLoader\";\nexport { _buildComponentsFromElements_, ComponentURI } from \"./ComponentFactory\";\nexport { NamespaceRef } from \"./NamespaceRef\";\nexport { setDefaultProcessors } from \"./defaultProcessors\";\nexport { Tag, TagElements } from \"./Tag\";\nexport { Import } from \"./Import\";\nexport { BackendMicroservice } from \"./BackendMicroservice\";\nexport { Component } from \"./Component\";\nexport { _Crypt } from \"./Crypt\";\nexport { DefaultTemplateHandler } from \"./DefaultTemplateHandler\";\nexport { SourceJS } from \"./SourceJS\";\nexport { SourceCSS } from \"./SourceCSS\";\nexport { GlobalSettings } from \"./globalSettings\";\nexport { RegisterClass } from \"./RegisterClass\";\nexport { _ComponentWidget_, RegisterWidget, RegisterWidgets } from \"./WidgetsFactory\";\nexport { CONFIG } from \"./CONFIG\";\nexport { Controller } from \"./Controller\";\nexport { View } from \"./View\";\nexport { ConfigService, JSONService, Service } from \"./Service\";\nexport { VO } from \"./VO\";\nexport { Effect } from \"./Effect\";\nexport { TransitionEffect } from \"./TransitionEffect\";\nexport { Timer } from \"./Timer\";\nexport { _tag_filter_ } from \"./tag_filter\";\nexport { range } from \"./range\";\nexport { ArrayCollection, ArrayList } from \"./ArrayCollection\";\nexport { DDO } from \"./DDO\";\nexport { Toggle } from \"./Toggle\";\nexport { findPackageNodePath } from \"./findPackageNodePath\";\nexport { getDocumentLayout } from \"./DocumentLayout\";\nexport { IQCObjectsElement, IQCObjectsShadowedElement } from \"@types\";\nexport { __to_number } from \"./mathFunctions\";\nexport {_top as global} from \"./top\";\nexport {__make_global__} from \"./make_global\";\nexport {get, set} from \"./top\";\n", " // Object.assign Polyfilling\n // Reference: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign#Polyfill\n if (typeof Object.assign !== \"function\") {\n // Must be writable: true, enumerable: false, configurable: true\n Object.defineProperty(Object, \"assign\", {\n // eslint-disable-next-line no-unused-vars\n value: function assign(target: null, varArgs: any):any { // .length of function is 2\n \"use strict\";\n if (target === null) { // TypeError if undefined or null\n throw new TypeError(\"Cannot convert undefined or null to object\");\n }\n \n const to = Object(target);\n \n for (let index = 1; index < arguments.length; index++) {\n // eslint-disable-next-line prefer-rest-params\n const nextSource = arguments[index];\n \n if (nextSource !== null) { // Skip over if undefined or null\n for (const nextKey in nextSource) {\n // Avoid bugs when hasOwnProperty is shadowed\n if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {\n to[nextKey] = nextSource[nextKey];\n }\n }\n }\n }\n return to;\n },\n writable: true,\n configurable: true\n });\n }\nexport {};", "import { Http2Stream } from \"http2\";\nimport { Stream } from \"stream\";\nimport { _basePath_ } from \"./basePath\";\nimport { _DataStringify } from \"./DataStringify\";\nimport { _domain_ } from \"./domain\";\nimport { InheritClass } from \"./InheritClass\";\nimport { logger } from \"./Logger\";\nimport { Package } from \"./Package\";\nimport { IMicroservice } from \"@types\";\n\nexport class BackendMicroservice extends InheritClass {\n stream: any;\n route: any;\n headers: any;\n request: any;\n\n constructor({\n domain = _domain_,\n basePath = _basePath_,\n body = null,\n stream = null,\n request = null\n }:IMicroservice) {\n super({\n domain,\n basePath,\n body,\n stream,\n request\n });\n logger.debug(\"Initializing BackendMicroservice...\");\n const microservice = this;\n if (typeof this.body === \"undefined\") {\n this.body = null;\n }\n if (typeof body !== \"undefined\") {\n this.body = body;\n }\n this.cors();\n microservice.stream = stream;\n (stream as any)?.on(\"data\", (data: any) => {\n // data from POST, GET\n const requestMethod = (request as any)?.method.toLowerCase();\n const supportedMethods = {\n \"post\": microservice.post.bind(microservice),\n };\n if (Object.hasOwn(supportedMethods, requestMethod)) {\n (supportedMethods as any)[requestMethod].call(microservice, data);\n }\n });\n\n // data from POST, GET\n const requestMethod = (request as any)?.method.toLowerCase();\n const supportedMethods = {\n \"get\": microservice.get.bind(microservice),\n \"head\": microservice.head.bind(microservice),\n \"put\": microservice.put.bind(microservice),\n \"delete\": microservice.delete.bind(microservice),\n \"connect\": microservice.connect.bind(microservice),\n \"options\": microservice.options.bind(microservice),\n \"trace\": microservice.trace.bind(microservice),\n \"patch\": microservice.patch.bind(microservice)\n };\n if (Object.hasOwn(supportedMethods, requestMethod)) {\n (supportedMethods as any)[requestMethod].call(microservice);\n }\n\n\n }\n\n cors():void {\n if (this.route.cors) {\n logger.debug(\"Validating CORS...\");\n const {\n allow_origins,\n allow_credentials,\n allow_methods,\n allow_headers\n } = this.route.cors;\n const microservice = this;\n if (typeof microservice.headers !== \"object\") {\n microservice.headers = {};\n }\n if (typeof microservice.route.responseHeaders !== \"object\") {\n microservice.route.responseHeaders = {};\n }\n if (typeof allow_origins !== \"undefined\") {\n logger.debug(\"CORS: allow_origins available. Validating origins...\");\n // an example of allow_origins is ['https://example.com','http://www.example.com']\n if (allow_origins === \"*\" || (typeof microservice.request.headers.origin === \"undefined\") || [...allow_origins].indexOf(microservice.request.headers.origin) !== -1) {\n // for compatibility with all browsers allways return a wildcard when the origin is allowed\n logger.debug(\"CORS: Adding header Access-Control-Allow-Origin=*\");\n microservice.route.responseHeaders[\"Access-Control-Allow-Origin\"] = \"*\";\n } else {\n logger.debug(\"CORS: Origin is not allowed: \" + microservice.request.headers.origin);\n logger.debug(\"CORS: Forcing to finish the response...\");\n this.body = {};\n try {\n this.done();\n } catch (e:any) {\n logger.debug(`It was not possible to finish the call to the microservice: ${e}`);\n }\n }\n } else {\n logger.debug(\"CORS: no allow_origins available. Allowing all origins...\");\n logger.debug(\"CORS: Adding header Access-Control-Allow-Origin=*\");\n microservice.route.responseHeaders[\"Access-Control-Allow-Origin\"] = \"*\";\n }\n if (typeof allow_credentials !== \"undefined\") {\n logger.debug(`CORS: allow_credentials present. Allowing ${allow_credentials}...`);\n microservice.route.responseHeaders[\"Access-Control-Allow-Credentials\"] = allow_credentials.toString();\n } else {\n logger.debug(\"CORS: No allow_credentials present. Allowing all credentials.\");\n microservice.route.responseHeaders[\"Access-Control-Allow-Credentials\"] = \"true\";\n }\n if (typeof allow_methods !== \"undefined\") {\n logger.debug(`CORS: allow_methods present. Allowing ${allow_methods}...`);\n microservice.route.responseHeaders[\"Access-Control-Allow-Methods\"] = [...allow_methods].join(\",\");\n } else {\n logger.debug(\"CORS: No allow_methods present. Allowing only GET, OPTIONS and POST\");\n microservice.route.responseHeaders[\"Access-Control-Allow-Methods\"] = \"GET, OPTIONS, POST\";\n }\n if (typeof allow_headers !== \"undefined\") {\n logger.debug(`CORS: allow_headers present. Allowing ${allow_headers}...`);\n microservice.route.responseHeaders[\"Access-Control-Allow-Headers\"] = [...allow_headers].join(\",\");\n } else {\n logger.debug(\"CORS: No allow_headers present. Allowing all headers...\");\n microservice.route.responseHeaders[\"Access-Control-Allow-Headers\"] = \"*\";\n }\n } else {\n logger.debug(\"No CORS validation available. You can specify cors in CONFIG.backend.routes[].cors\");\n }\n }\n\n\n head(formData: any):void {\n logger.debug(`[BackendMicroservice.head] Data received: ${_DataStringify(formData)}`);\n this.done();\n }\n\n get(formData: any):void {\n logger.debug(`[BackendMicroservice.get] Data received: ${_DataStringify(formData)}`);\n this.done();\n }\n\n post(formData: any):void {\n logger.debug(`[BackendMicroservice.post] Data received: ${_DataStringify(formData)}`);\n this.done();\n }\n\n put(formData: any):void {\n logger.debug(`[BackendMicroservice.put] Data received: ${_DataStringify(formData)}`);\n this.done();\n }\n\n delete(formData: any):void {\n logger.debug(`[BackendMicroservice.delete] Data received: ${_DataStringify(formData)}`);\n this.done();\n }\n\n connect(formData: any):void {\n logger.debug(`[BackendMicroservice.connect] Data received: ${_DataStringify(formData)}`);\n this.done();\n }\n\n options(formData: any):void {\n logger.debug(`[BackendMicroservice.options] Data received: ${_DataStringify(formData)}`);\n this.done();\n }\n\n trace(formData: any):void {\n logger.debug(`[BackendMicroservice.trace] Data received: ${_DataStringify(formData)}`);\n this.done();\n }\n\n patch(formData: any):void {\n logger.debug(`[BackendMicroservice.patch] Data received: ${_DataStringify(formData)}`);\n this.done();\n }\n\n finishWithBody(stream?: Http2Stream | Stream):void {\n try {\n logger.debug(\"[BackendMicroservice.finishWithBody] Ending the stream...\");\n logger.debug(`[BackendMicroservice.finishWithBody] type of body is: ${typeof this.body}`);\n if (typeof this.body !== \"string\") {\n this.body = _DataStringify(this.body);\n }\n logger.debug(`[BackendMicroservice.finishWithBody] \\n body: ${this.body} `);\n (stream as any)?.write(this.body);\n (stream as any)?.end();\n logger.debug(\"[BackendMicroservice.finishWithBody] Stream ended.\");\n } catch (e:any) {\n logger.debug(`[BackendMicroservice.finishWithBody] Something went wrong ending the stream: ${e}`);\n }\n }\n\n done():void {\n logger.debug(\"[BackendMicroservice.done] Finalizing the response...\");\n const microservice = this;\n const stream = microservice.stream;\n try {\n logger.debug(\"[BackendMicroservice.done] Sending response headers...\");\n if (microservice.route.responseHeaders) {\n logger.debug(`[BackendMicroservice.done] Response headers present: ${Object.keys(microservice.route.responseHeaders).join(\",\")}`);\n stream.respond(microservice.route.responseHeaders);\n } else {\n throw Error(\"[BackendMicroservice.done] No headers present.\");\n }\n } catch (e:any) {\n logger.debug(`[BackendMicroservice.done] Something went wrong sending response headers: ${e}`);\n }\n if (microservice.body !== null) {\n try {\n logger.debug(\"[BackendMicroservice.done] A body of message is present. Finalizing the response...\");\n microservice.finishWithBody.call(microservice, stream);\n } catch (e:any) {\n logger.debug(`[BackendMicroservice.done] Something went wrong finalizing the response: ${e}`);\n }\n } else {\n logger.debug(\"[BackendMicroservice.done] No body present. Ending stream...\");\n stream.end();\n }\n }\n\n\n}\n\nPackage(\"com.qcobjects.api\", [\n BackendMicroservice\n]);\n", "import { DefaultTemplateHandlerParams, IComponent } from \"@types\";\nimport { logger } from \"./Logger\";\nimport { GlobalProcessor as Processor } from \"./Processor\";\nimport { RegisterClass } from \"./RegisterClass\";\n\nexport class DefaultTemplateHandler {\n template = \"\";\n __definition = {};\n static __definition = {};\n component?: IComponent;\n\n constructor({ component, template }: DefaultTemplateHandlerParams) {\n this.component = component;\n this.template = template;\n }\n\n assign(data: any): string {\n const templateInstance = this;\n if (typeof templateInstance.component === \"undefined\") {\n throw new Error(\"DefaultTemplateHandler.assign: component is undefined\");\n }\n if (typeof templateInstance.component.processorHandler === \"undefined\") {\n throw new Error(\"DefaultTemplateHandler.assign: component.processorHandler is undefined\");\n }\n const processorHandler = templateInstance.component.processorHandler;\n processorHandler.component = templateInstance.component;\n let parsedAssignmentText = (typeof templateInstance.template !== \"undefined\") ? (templateInstance.template) : (\"\");\n if (typeof data === \"object\") {\n [...Object.keys(data)].map((k): any => {\n let _value = data[k];\n if (typeof _value === \"string\" || typeof _value === \"number\" || (!isNaN(_value))) {\n try {\n _value = Processor.processObject.bind(processorHandler).call(processorHandler, _value, templateInstance.component);\n parsedAssignmentText = parsedAssignmentText.replace((new RegExp(`{{${k}}}`, \"g\")), _value);\n } catch (e: any) {\n logger.warn(`${templateInstance.component?.name} could not parse processors.`);\n throw Error(`${templateInstance.component?.name} could not parse processors. Reason: ${e.message}`);\n }\n }\n return k;\n });\n } else {\n logger.debug(`${templateInstance.component?.name}.data is not an object`);\n }\n try {\n parsedAssignmentText = Processor.processObject.call(processorHandler, parsedAssignmentText, templateInstance.component);\n } catch (e: any) {\n logger.warn(`${templateInstance.component?.name} could not parse processors.`);\n throw Error(`${templateInstance.component?.name} could not parse processors. Reason: ${e.message}`);\n }\n return parsedAssignmentText;\n }\n\n}\nRegisterClass(DefaultTemplateHandler, \"com.qcobjects\");\n", "import { __make_global__ } from \"./make_global\";\nimport { __register_class__ } from \"./PrimaryCollections\";\n\n\n\nexport const RegisterClass = function (_class_:any, __namespace?:string):any {\n return __register_class__(_class_, __namespace);\n};\n__make_global__(RegisterClass);", "import { ISourceJS } from \"@types\";\nimport { _basePath_ } from \"./basePath\";\nimport { _Cast } from \"./Cast\";\nimport { _domain_ } from \"./domain\";\nimport { _DOMCreateElement } from \"./DOMCreateElement\";\nimport { InheritClass } from \"./InheritClass\";\nimport { Package } from \"./Package\";\nimport { logger } from \"./Logger\";\n\nexport class SourceJS extends InheritClass implements ISourceJS {\n domain:string= _domain_;\n basePath:string= _basePath_;\n type= \"text/javascript\";\n containerTag= \"body\";\n url= \"\";\n data= {};\n async= false;\n external= false;\n\n constructor(o:any){\n super(o);\n this.body= _DOMCreateElement(\"script\");\n\n }\n set(name:string, value:any):void {\n this[name] = value;\n }\n get(name:string, _default?:any):any {\n return this[name] || _default;\n }\n status= false;\n done():void { }\n fail():void { }\n rebuild():void {\n const context = this;\n try {\n document.getElementsByTagName(context.containerTag)[0].appendChild(\n (function (s:any, url:string, context:any):any {\n s.type = context.type;\n s.src = url;\n s.crossOrigin = (Object.hasOwn(context, \"crossOrigin\")) ? (context.crossOrigin) : (\"anonymous\");\n s.async = context.async;\n s.onreadystatechange = function () {\n if (this.readyState === \"complete\") {\n context.done.call(context);\n }\n };\n s.onload = function (e:any) {\n context.status = true;\n context.done.call(context, e);\n };\n s.onerror = function (e:any) {\n context.status = false;\n context.fail.call(context, e);\n };\n context.body = s;\n return s;\n }).call(this,\n _DOMCreateElement(\"script\"),\n (this.external) ? (this.url) : (this.basePath + this.url), context));\n } catch (e:any) {\n context.status = false;\n logger.debug(`An error ocurred: ${e}`);\n context.fail();\n }\n }\n Cast(o:any):any {\n return _Cast(this, o);\n }\n _new_(properties:any):void {\n this.__new__(properties);\n this.rebuild();\n }\n }\n\n Package(\"com.qcobjects\", [SourceJS]);\n", "import { ISourceCSS, TBody } from \"@types\";\nimport { _basePath_ } from \"./basePath\";\nimport { _Cast } from \"./Cast\";\nimport { _domain_ } from \"./domain\";\nimport { _DOMCreateElement } from \"./DOMCreateElement\";\nimport { InheritClass } from \"./InheritClass\";\nimport { isBrowser } from \"./platform\";\nimport { Package } from \"./Package\";\n\nexport class SourceCSS extends InheritClass implements ISourceCSS {\n domain: string = _domain_;\n basePath: string = _basePath_;\n url = \"\";\n data = {};\n async = false;\n external = false;\n\n constructor(o: any) {\n super(o);\n this.body = _DOMCreateElement(\"link\") as TBody;\n }\n fail(): void {\n throw new Error(\"Method not implemented.\");\n }\n Cast(o: any): any {\n return _Cast(this, o);\n }\n set(name: string, value: any): void {\n this[name] = value;\n }\n get(name: string, _default?: any): any {\n return this[name] || _default;\n }\n done(): void { }\n rebuild(): void {\n const context = this;\n if (isBrowser) {\n window.document.getElementsByTagName(\"head\")[0].appendChild(\n (function (s: any, url: string, context: any): any {\n s.type = \"text/css\";\n s.rel = \"stylesheet\";\n s.href = url;\n s.crossOrigin = \"anonymous\";\n s.onreadystatechange = function () {\n if (this.readyState === \"complete\") {\n context.done.call(context);\n }\n };\n s.onload = context.done;\n context.body = s;\n return s;\n }).call(this,\n _DOMCreateElement(\"link\"),\n (this.external) ? (this.url) : (this.basePath + this.url), context));\n }\n }\n}\n\nPackage(\"com.qcobjects\", [SourceCSS]);", " \n/* eslint-disable no-unused-vars */\nimport { _DOMCreateElement } from \"./DOMCreateElement\";\nimport { Export } from \"./Export\";\nimport { _protected_code_ } from \"./introspection\";\nimport { isBrowser } from \"./platform\";\nimport { I_ComponentWidget_ } from \"@types\";\n\nclass QCObjectsWidgetNode implements I_ComponentWidget_ {\n writingSuggestions!: string;\n currentCSSZoom!: number;\n ariaColIndexText!: string | null;\n ariaRowIndexText!: string | null;\n accessKey!: string;\n accessKeyLabel!: string;\n autocapitalize!: string;\n dir!: string;\n draggable!: boolean;\n hidden!: boolean;\n inert!: boolean;\n innerText!: string;\n lang!: string;\n offsetHeight!: number;\n offsetLeft!: number;\n offsetParent!: Element | null;\n offsetTop!: number;\n offsetWidth!: number;\n outerText!: string;\n popover!: string | null;\n spellcheck!: boolean;\n title!: string;\n translate!: boolean;\n attachInternals(): ElementInternals {\n throw new Error(\"Method not implemented.\");\n }\n click(): void {\n throw new Error(\"Method not implemented.\");\n }\n hidePopover(): void {\n throw new Error(\"Method not implemented.\");\n }\n showPopover(): void {\n throw new Error(\"Method not implemented.\");\n }\n togglePopover(force?: boolean): boolean {\n throw new Error(\"Method not implemented.\");\n }\n addEventListener(type: unknown, listener: unknown, options?: unknown): void {\n throw new Error(\"Method not implemented.\");\n }\n removeEventListener(type: unknown, listener: unknown, options?: unknown): void {\n throw new Error(\"Method not implemented.\");\n }\n attributes!: NamedNodeMap;\n classList!: DOMTokenList;\n className!: string;\n clientHeight!: number;\n clientLeft!: number;\n clientTop!: number;\n clientWidth!: number;\n id!: string;\n innerHTML!: string;\n localName!: string;\n namespaceURI!: string | null;\n onfullscreenchange!: ((this: Element, ev: Event) => any) | null;\n onfullscreenerror!: ((this: Element, ev: Event) => any) | null;\n outerHTML!: string;\n ownerDocument!: Document;\n part!: DOMTokenList;\n prefix!: string | null;\n scrollHeight!: number;\n scrollLeft!: number;\n scrollTop!: number;\n scrollWidth!: number;\n shadowRoot!: ShadowRoot | null;\n slot!: string;\n tagName!: string;\n attachShadow(init: ShadowRootInit): ShadowRoot {\n throw new Error(\"Method not implemented.\");\n }\n checkVisibility(options?: CheckVisibilityOptions): boolean {\n throw new Error(\"Method not implemented.\");\n }\n closest(selectors: unknown): any {\n throw new Error(\"Method not implemented.\");\n }\n computedStyleMap(): StylePropertyMapReadOnly {\n throw new Error(\"Method not implemented.\");\n }\n getAttribute(qualifiedName: string): string | null {\n throw new Error(\"Method not implemented.\");\n }\n getAttributeNS(namespace: string | null, localName: string): string | null {\n throw new Error(\"Method not implemented.\");\n }\n getAttributeNames(): string[] {\n throw new Error(\"Method not implemented.\");\n }\n getAttributeNode(qualifiedName: string): Attr | null {\n throw new Error(\"Method not implemented.\");\n }\n getAttributeNodeNS(namespace: string | null, localName: string): Attr | null {\n throw new Error(\"Method not implemented.\");\n }\n getBoundingClientRect(): DOMRect {\n throw new Error(\"Method not implemented.\");\n }\n getClientRects(): DOMRectList {\n throw new Error(\"Method not implemented.\");\n }\n getElementsByClassName(classNames: string): HTMLCollectionOf {\n throw new Error(\"Method not implemented.\");\n }\n getElementsByTagName(qualifiedName: unknown): HTMLCollectionOf | HTMLCollectionOf {\n throw new Error(\"Method not implemented.\");\n }\n getElementsByTagNameNS(namespace: unknown, localName: unknown): HTMLCollectionOf {\n throw new Error(\"Method not implemented.\");\n }\n getHTML(options?: GetHTMLOptions): string {\n throw new Error(\"Method not implemented.\");\n }\n hasAttribute(qualifiedName: string): boolean {\n throw new Error(\"Method not implemented.\");\n }\n hasAttributeNS(namespace: string | null, localName: string): boolean {\n throw new Error(\"Method not implemented.\");\n }\n hasAttributes(): boolean {\n throw new Error(\"Method not implemented.\");\n }\n hasPointerCapture(pointerId: number): boolean {\n throw new Error(\"Method not implemented.\");\n }\n insertAdjacentElement(where: InsertPosition, element: Element): Element | null {\n throw new Error(\"Method not implemented.\");\n }\n insertAdjacentHTML(position: InsertPosition, string: string): void {\n throw new Error(\"Method not implemented.\");\n }\n insertAdjacentText(where: InsertPosition, data: string): void {\n throw new Error(\"Method not implemented.\");\n }\n matches(selectors: string): boolean {\n throw new Error(\"Method not implemented.\");\n }\n releasePointerCapture(pointerId: number): void {\n throw new Error(\"Method not implemented.\");\n }\n removeAttribute(qualifiedName: string): void {\n throw new Error(\"Method not implemented.\");\n }\n removeAttributeNS(namespace: string | null, localName: string): void {\n throw new Error(\"Method not implemented.\");\n }\n removeAttributeNode(attr: Attr): Attr {\n throw new Error(\"Method not implemented.\");\n }\n requestFullscreen(options?: FullscreenOptions): Promise {\n throw new Error(\"Method not implemented.\");\n }\n requestPointerLock(options?: PointerLockOptions): Promise {\n throw new Error(\"Method not implemented.\");\n }\n scroll(x?: unknown, y?: unknown): void {\n throw new Error(\"Method not implemented.\");\n }\n scrollBy(x?: unknown, y?: unknown): void {\n throw new Error(\"Method not implemented.\");\n }\n scrollIntoView(arg?: boolean | ScrollIntoViewOptions): void {\n throw new Error(\"Method not implemented.\");\n }\n scrollTo(x?: unknown, y?: unknown): void {\n throw new Error(\"Method not implemented.\");\n }\n setAttribute(qualifiedName: string, value: string): void {\n throw new Error(\"Method not implemented.\");\n }\n setAttributeNS(namespace: string | null, qualifiedName: string, value: string): void {\n throw new Error(\"Method not implemented.\");\n }\n setAttributeNode(attr: Attr): Attr | null {\n throw new Error(\"Method not implemented.\");\n }\n setAttributeNodeNS(attr: Attr): Attr | null {\n throw new Error(\"Method not implemented.\");\n }\n setHTMLUnsafe(html: string): void {\n throw new Error(\"Method not implemented.\");\n }\n setPointerCapture(pointerId: number): void {\n throw new Error(\"Method not implemented.\");\n }\n toggleAttribute(qualifiedName: string, force?: boolean): boolean {\n throw new Error(\"Method not implemented.\");\n }\n webkitMatchesSelector(selectors: string): boolean {\n throw new Error(\"Method not implemented.\");\n }\n baseURI!: string;\n childNodes!: NodeListOf;\n firstChild!: ChildNode | null;\n isConnected!: boolean;\n lastChild!: ChildNode | null;\n nextSibling!: ChildNode | null;\n nodeName!: string;\n nodeType!: number;\n nodeValue!: string | null;\n parentElement!: HTMLElement | null;\n parentNode!: ParentNode | null;\n previousSibling!: ChildNode | null;\n textContent!: string | null;\n appendChild(node: T): T {\n throw new Error(\"Method not implemented.\");\n }\n cloneNode(deep?: boolean): Node {\n throw new Error(\"Method not implemented.\");\n }\n compareDocumentPosition(other: Node): number {\n throw new Error(\"Method not implemented.\");\n }\n contains(other: Node | null): boolean {\n throw new Error(\"Method not implemented.\");\n }\n getRootNode(options?: GetRootNodeOptions): Node {\n throw new Error(\"Method not implemented.\");\n }\n hasChildNodes(): boolean {\n throw new Error(\"Method not implemented.\");\n }\n insertBefore(node: T, child: Node | null): T {\n throw new Error(\"Method not implemented.\");\n }\n isDefaultNamespace(namespace: string | null): boolean {\n throw new Error(\"Method not implemented.\");\n }\n isEqualNode(otherNode: Node | null): boolean {\n throw new Error(\"Method not implemented.\");\n }\n isSameNode(otherNode: Node | null): boolean {\n throw new Error(\"Method not implemented.\");\n }\n lookupNamespaceURI(prefix: string | null): string | null {\n throw new Error(\"Method not implemented.\");\n }\n lookupPrefix(namespace: string | null): string | null {\n throw new Error(\"Method not implemented.\");\n }\n normalize(): void {\n throw new Error(\"Method not implemented.\");\n }\n removeChild(child: T): T {\n throw new Error(\"Method not implemented.\");\n }\n replaceChild(node: Node, child: T): T {\n throw new Error(\"Method not implemented.\");\n }\n ELEMENT_NODE!: 1;\n ATTRIBUTE_NODE!: 2;\n TEXT_NODE!: 3;\n CDATA_SECTION_NODE!: 4;\n ENTITY_REFERENCE_NODE!: 5;\n ENTITY_NODE!: 6;\n PROCESSING_INSTRUCTION_NODE!: 7;\n COMMENT_NODE!: 8;\n DOCUMENT_NODE!: 9;\n DOCUMENT_TYPE_NODE!: 10;\n DOCUMENT_FRAGMENT_NODE!: 11;\n NOTATION_NODE!: 12;\n DOCUMENT_POSITION_DISCONNECTED!: 1;\n DOCUMENT_POSITION_PRECEDING!: 2;\n DOCUMENT_POSITION_FOLLOWING!: 4;\n DOCUMENT_POSITION_CONTAINS!: 8;\n DOCUMENT_POSITION_CONTAINED_BY!: 16;\n DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC!: 32;\n dispatchEvent(event: Event): boolean {\n throw new Error(\"Method not implemented.\");\n }\n ariaAtomic!: string | null;\n ariaAutoComplete!: string | null;\n ariaBrailleLabel!: string | null;\n ariaBrailleRoleDescription!: string | null;\n ariaBusy!: string | null;\n ariaChecked!: string | null;\n ariaColCount!: string | null;\n ariaColIndex!: string | null;\n ariaColSpan!: string | null;\n ariaCurrent!: string | null;\n ariaDescription!: string | null;\n ariaDisabled!: string | null;\n ariaExpanded!: string | null;\n ariaHasPopup!: string | null;\n ariaHidden!: string | null;\n ariaInvalid!: string | null;\n ariaKeyShortcuts!: string | null;\n ariaLabel!: string | null;\n ariaLevel!: string | null;\n ariaLive!: string | null;\n ariaModal!: string | null;\n ariaMultiLine!: string | null;\n ariaMultiSelectable!: string | null;\n ariaOrientation!: string | null;\n ariaPlaceholder!: string | null;\n ariaPosInSet!: string | null;\n ariaPressed!: string | null;\n ariaReadOnly!: string | null;\n ariaRequired!: string | null;\n ariaRoleDescription!: string | null;\n ariaRowCount!: string | null;\n ariaRowIndex!: string | null;\n ariaRowSpan!: string | null;\n ariaSelected!: string | null;\n ariaSetSize!: string | null;\n ariaSort!: string | null;\n ariaValueMax!: string | null;\n ariaValueMin!: string | null;\n ariaValueNow!: string | null;\n ariaValueText!: string | null;\n role!: string | null;\n animate(keyframes: Keyframe[] | PropertyIndexedKeyframes | null, options?: number | KeyframeAnimationOptions): Animation {\n throw new Error(\"Method not implemented.\");\n }\n getAnimations(options?: GetAnimationsOptions): Animation[] {\n throw new Error(\"Method not implemented.\");\n }\n after(...nodes: (Node | string)[]): void {\n throw new Error(\"Method not implemented.\");\n }\n before(...nodes: (Node | string)[]): void {\n throw new Error(\"Method not implemented.\");\n }\n remove(): void {\n throw new Error(\"Method not implemented.\");\n }\n replaceWith(...nodes: (Node | string)[]): void {\n throw new Error(\"Method not implemented.\");\n }\n nextElementSibling!: Element | null;\n previousElementSibling!: Element | null;\n childElementCount!: number;\n children!: HTMLCollection;\n firstElementChild!: Element | null;\n lastElementChild!: Element | null;\n \n append(...nodes: (Node | string)[]): void {\n throw new Error(\"Method not implemented.\");\n }\n \n prepend(...nodes: (Node | string)[]): void {\n throw new Error(\"Method not implemented.\");\n }\n \n querySelector(selectors: unknown): any {\n throw new Error(\"Method not implemented.\");\n }\n \n querySelectorAll(selectors: unknown): NodeListOf {\n throw new Error(\"Method not implemented.\");\n }\n replaceChildren(...nodes: (Node | string)[]): void {\n throw new Error(\"Method not implemented.\");\n }\n assignedSlot!: HTMLSlotElement | null;\n attributeStyleMap!: StylePropertyMap;\n style!: CSSStyleDeclaration;\n contentEditable!: string;\n enterKeyHint!: string;\n inputMode!: string;\n isContentEditable!: boolean;\n onabort!: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;\n onanimationcancel!: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;\n onanimationend!: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;\n onanimationiteration!: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;\n onanimationstart!: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;\n onauxclick!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n onbeforeinput!: ((this: GlobalEventHandlers, ev: InputEvent) => any) | null;\n onbeforetoggle!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onblur!: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;\n oncancel!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n oncanplay!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n oncanplaythrough!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onchange!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onclick!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n onclose!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n oncontextlost!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n oncontextmenu!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n oncontextrestored!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n oncopy!: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;\n oncuechange!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n oncut!: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;\n ondblclick!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n ondrag!: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;\n ondragend!: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;\n ondragenter!: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;\n ondragleave!: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;\n ondragover!: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;\n ondragstart!: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;\n ondrop!: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;\n ondurationchange!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onemptied!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onended!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onerror!: OnErrorEventHandler;\n onfocus!: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;\n onformdata!: ((this: GlobalEventHandlers, ev: FormDataEvent) => any) | null;\n ongotpointercapture!: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;\n oninput!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n oninvalid!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onkeydown!: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;\n onkeypress!: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;\n onkeyup!: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;\n onload!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onloadeddata!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onloadedmetadata!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onloadstart!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onlostpointercapture!: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;\n onmousedown!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n onmouseenter!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n onmouseleave!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n onmousemove!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n onmouseout!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n onmouseover!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n onmouseup!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n onpaste!: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;\n onpause!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onplay!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onplaying!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onpointercancel!: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;\n onpointerdown!: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;\n onpointerenter!: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;\n onpointerleave!: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;\n onpointermove!: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;\n onpointerout!: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;\n onpointerover!: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;\n onpointerup!: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;\n onprogress!: ((this: GlobalEventHandlers, ev: ProgressEvent) => any) | null;\n onratechange!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onreset!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onresize!: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;\n onscroll!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onscrollend!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onsecuritypolicyviolation!: ((this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any) | null;\n onseeked!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onseeking!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onselect!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onselectionchange!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onselectstart!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onslotchange!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onstalled!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onsubmit!: ((this: GlobalEventHandlers, ev: SubmitEvent) => any) | null;\n onsuspend!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n ontimeupdate!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n ontoggle!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n ontouchcancel?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;\n ontouchend?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;\n ontouchmove?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;\n ontouchstart?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;\n ontransitioncancel!: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;\n ontransitionend!: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;\n ontransitionrun!: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;\n ontransitionstart!: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;\n onvolumechange!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onwaiting!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onwebkitanimationend!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onwebkitanimationiteration!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onwebkitanimationstart!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onwebkittransitionend!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onwheel!: ((this: GlobalEventHandlers, ev: WheelEvent) => any) | null;\n autofocus!: boolean;\n dataset!: DOMStringMap;\n nonce?: string | undefined;\n tabIndex!: number;\n blur(): void {\n throw new Error(\"Method not implemented.\");\n }\n focus(options?: FocusOptions): void {\n throw new Error(\"Method not implemented.\");\n }\n\n}\n\nexport let _ComponentWidget_:CustomElementConstructor;\nif (isBrowser) {\n _ComponentWidget_ = class _ComponentWidget_ extends HTMLElement implements I_ComponentWidget_ {\n constructor() {\n super();\n const componentWidget = this;\n const componentName = componentWidget.nodeName.toLowerCase();\n const componentBody = _DOMCreateElement(\"quick-component\");\n const __enabled__atributes__ = componentWidget.getAttributeNames();\n componentBody.setAttribute(\"name\", componentName);\n \n if (!componentWidget.hasAttribute(\"shadowed\")) {\n componentBody.setAttribute(\"shadowed\", \"true\");\n }\n __enabled__atributes__.forEach( (attributeName) => {\n if (componentWidget.hasAttribute(attributeName)) {\n componentBody.setAttribute(attributeName, componentWidget?.getAttribute(attributeName) as any);\n componentWidget.removeAttribute(attributeName);\n }\n });\n const data_attributenames = componentWidget.getAttributeNames().filter(function (a) {\n return a.startsWith(\"data-\");\n }).map(function (a) {\n return a.split(\"-\")[1];\n });\n data_attributenames.forEach(function (_attribute_name_) {\n componentBody.setAttribute(\"data-\" + _attribute_name_, componentWidget?.getAttribute(\"data-\" + _attribute_name_) as any);\n componentWidget.removeAttribute(\"data-\" + _attribute_name_);\n });\n [...(componentWidget as any).children].forEach( (element) => {\n componentBody.appendChild(element.cloneNode(true));\n element.remove();\n });\n \n componentWidget.append(componentBody);\n }\n };\n \n} else {\n _ComponentWidget_ = class _ComponentWidget_ extends QCObjectsWidgetNode {\n constructor (){\n super();\n throw new Error (\"Class not implemented.\");\n }\n };\n}\nExport(_ComponentWidget_);\nexport const RegisterWidget = (widgetName: string):void => {\n if (isBrowser){\n customElements.define(widgetName, class extends _ComponentWidget_ { });\n } else {\n throw new Error (\"RegisterWidget is not implemented for non browser ecosystems yet.\");\n }\n};\nexport const RegisterWidgets = (...args: string[]):void =>{\n const widgetList = [...args];\n widgetList.filter(function (widgetName) {\n return typeof widgetName === \"string\";\n }).map(function (widgetName) {\n return RegisterWidget(widgetName);\n });\n};\n(_protected_code_)(RegisterWidget);\n(_protected_code_)(RegisterWidgets);\nExport(RegisterWidget);\nExport(RegisterWidgets);\n", "import { IController, IComponent, TControllerParams, IQCObjectsElement, IQCObjectsShadowedElement } from \"@types\";\nimport { ClassFactory } from \"./ClassFactory\";\nimport { __getType__ } from \"./getType\";\nimport { InheritClass } from \"./InheritClass\";\nimport { logger } from \"./Logger\";\nimport { New } from \"./New\";\nimport { Package } from \"./Package\";\nimport { isBrowser } from \"./platform\";\n\nexport class Controller extends InheritClass implements IController{\n\n component!: IComponent ;\n dependencies?: any[] = [];\n constructor({\n component,\n dependencies\n }: TControllerParams) {\n super({ component, dependencies });\n this.component = component;\n this.dependencies = dependencies;\n if (typeof this.component === \"undefined\" || this.component === null) {\n throw Error(`${__getType__(this)} must be called with a component`);\n }\n }\n\n // eslint-disable-next-line no-unused-vars\n fail?(...args: [...args: any[]] ): void {\n throw new Error(\"Method not implemented.\");\n }\n\n\n routingSelectedAttr(attrName: string):any {\n return this.component?.routingSelected.map( (r: any):any => {\n return r[attrName];\n }).filter(function (v: any) {\n return v;\n }).pop();\n }\n\n isTouchable():boolean {\n return (\"ontouchstart\" in window) ||\n ((navigator as any).MaxTouchPoints > 0) ||\n ((navigator as any).msMaxTouchPoints > 0);\n }\n\n onpress(subelementSelector: string, handler: Function):void {\n if (isBrowser){\n try {\n if (this.isTouchable()) {\n ((this.component?.componentRoot as IQCObjectsElement| IQCObjectsShadowedElement)?.subelements(subelementSelector) as any[])[0].addEventListener(\"touchstart\", handler, {\n passive: true\n });\n } else {\n ((this.component?.componentRoot as IQCObjectsElement | IQCObjectsShadowedElement)?.subelements(subelementSelector) as any[])[0].addEventListener(\"click\", handler, {\n passive: true\n });\n }\n } catch (e:any) {\n logger.debug(`An error ocurred: ${e}.`);\n logger.debug(\"No button to assign press event\");\n }\n \n }\n }\n\n createRoutingController():void {\n const controller = this;\n const component = controller.component;\n const controllerName = controller.routingSelectedAttr(\"controllerclass\");\n if (typeof controllerName !== \"undefined\") {\n const _Controller = ClassFactory(controllerName) as unknown as IController;\n if (typeof _Controller !== \"undefined\" && component !== null) {\n component.routingController = New(_Controller, {\n component\n }) as IController; // Initializes the main controller for the component\n if (typeof component.routingController !== \"undefined\" \n && Object.hasOwn(component.routingController, \"done\") \n && typeof component.routingController.done === \"function\") {\n component.routingController.done.call(component.routingController);\n }\n }\n }\n }\n\n done():void { }\n}\n\nPackage(\"com.qcobjects.controllers\", [\n Controller\n]);\n", "import { __getType__ } from \"./getType\";\nimport { InheritClass } from \"./InheritClass\";\nimport { Package } from \"./Package\";\nimport { TViewParams } from \"@types\";\n\nexport class View extends InheritClass {\n constructor({ component = undefined, dependencies = [] }:TViewParams) {\n super({component, dependencies});\n if (typeof this.component === \"undefined\" || this.component === \"null\") {\n throw Error(`${__getType__(this)} must be called with a component`);\n }\n\n }\n }\n\nPackage(\"com.qcobjects.views\", [\n View\n]);", "import { InheritClass } from \"./InheritClass\";\nimport { Package } from \"./Package\";\n\nexport class VO extends InheritClass {}\n\nPackage(\"com.qcobjects.valueObjects\", [\n VO\n ]);", "import { IEffect, TEffectParams } from \"@types\";\nimport { InheritClass } from \"./InheritClass\";\nimport { Package } from \"./Package\";\nimport { _methods_, _protected_code_ } from \"./introspection\";\nimport { ClassFactory } from \"./ClassFactory\";\n\nclass Effect extends InheritClass implements IEffect {\n // eslint-disable-next-line no-unused-vars\n done(...args: any[]): any {\n throw new Error(\"Method not implemented.\");\n };\n // eslint-disable-next-line no-unused-vars\n apply(...args: any[]): void {\n throw new Error(\"Method not implemented.\");\n }\n duration = 1000;\n\n\n animate({\n timing,\n draw,\n duration\n }: TEffectParams): void {\n const _self: this = this;\n\n const start = performance.now();\n\n requestAnimationFrame(function animate(time) {\n // timeFraction goes from 0 to 1\n let timeFraction = (time - start) / duration;\n if (timeFraction > 1) timeFraction = 1;\n\n // calculate the current animation state\n const progress = timing(timeFraction);\n\n draw(Math.round(progress * 100)); // draw it\n\n if (timeFraction < 1) {\n requestAnimationFrame(animate);\n } else {\n // if this is an object with a done method\n if (typeof _self !== \"undefined\" &&\n _self !== null &&\n Object.hasOwn(_self, \"done\") &&\n (typeof _self.done).toLowerCase() === \"function\") {\n _self.done.call(_self);\n }\n }\n\n });\n }\n\n}\n\n\nPackage(\"com.qcobjects.effects.base\", [\n Effect\n]);\n\n(_methods_)(ClassFactory(\"Effect\")).map((__c__): any => {\n (_protected_code_)(__c__);\n return __c__;\n});\n\nexport { Effect };", "import { Effect } from \"./Effect\";\nimport { logger } from \"./Logger\";\nimport { Package } from \"./Package\";\nimport { ClassFactory } from \"./ClassFactory\";\nimport { IQCObjectsElement, IQCObjectsShadowedElement } from \"@types\";\nimport { ITransitionEffect, IComponent, TTransitionEffectParams } from \"@types\";\n\nexport class TransitionEffect extends Effect implements ITransitionEffect{\n duration = 385;\n defaultParams = {\n alphaFrom: 0,\n alphaTo: 1,\n angleFrom: 180,\n angleTo: 0,\n radiusFrom: 0,\n radiusTo: 30,\n scaleFrom: 0,\n scaleTo: 1\n };\n\n fitToHeight = false;\n fitToWidth = false;\n\n component!: IComponent;\n effects!: string[];\n\n apply({\n alphaFrom,\n alphaTo,\n angleFrom,\n angleTo,\n radiusFrom,\n radiusTo,\n scaleFrom,\n scaleTo\n }: TTransitionEffectParams):void {\n const _transition_ = this;\n logger.info(\"EXECUTING TransitionEffect \");\n const componentRoot =_transition_.component.componentRoot as IQCObjectsElement | IQCObjectsShadowedElement | HTMLElement | ShadowRoot;\n\n if (typeof componentRoot !== \"undefined\" && componentRoot !== null){\n if (_transition_.fitToHeight) {\n (componentRoot as any).height = (typeof (componentRoot as HTMLElement).offsetParent === \"object\" && (componentRoot as HTMLElement).offsetParent !== null) ? ((componentRoot as HTMLElement).offsetParent?.scrollHeight) : ((componentRoot as HTMLElement).getBoundingClientRect().height);\n }\n if (_transition_.fitToWidth) {\n (componentRoot as any).width = (typeof (componentRoot as HTMLElement).offsetParent === \"object\" && (componentRoot as HTMLElement).offsetParent !== null) ? ((componentRoot as HTMLElement).offsetParent?.scrollWidth) : ((componentRoot as HTMLElement).getBoundingClientRect().width);\n }\n if (_transition_.component.shadowed){\n ((componentRoot as ShadowRoot).host as HTMLElement).style.display = \"block\";\n } else {\n (componentRoot as HTMLElement).style.display = \"block\";\n }\n _transition_.effects.map( (effectClassName:string):string => {\n\n const __effectClass__ = ClassFactory(effectClassName) as unknown as typeof Effect;\n const effectObj = new __effectClass__({});\n const effectClassMethod = effectObj.apply.bind(_transition_);\n const componentHost = (_transition_.component.shadowed)? ((componentRoot as ShadowRoot).host) : (componentRoot);\n const effectParams = {\n alphaFrom,\n alphaTo,\n angleFrom,\n angleTo,\n radiusFrom,\n radiusTo,\n scaleFrom,\n scaleTo\n }; \n effectClassMethod(componentHost,...Object.values(effectParams));\n return effectClassName;\n });\n \n }\n\n }\n\n}\n\nPackage(\"com.qcobjects.effects.transitions.base\", [\n TransitionEffect\n]);\n", "import { ITimer, TTimerParams } from \"@types\";\nimport { InheritClass } from \"./InheritClass\";\nimport { Package } from \"./Package\";\n\nexport class Timer extends InheritClass implements ITimer {\n\n\n duration = 1000;\n alive = true;\n thread({\n timing,\n intervalInterceptor,\n duration\n }:TTimerParams):void {\n const timer = this;\n\n const start = performance.now();\n\n requestAnimationFrame(function thread(time) {\n // timeFraction goes from 0 to 1\n const elapsed = (time - start);\n let timeFraction = elapsed / duration;\n if (timeFraction > 1) timeFraction = 1;\n\n // calculate the current progress state\n const progress = timing(timeFraction, elapsed);\n\n intervalInterceptor(Math.round(progress * 100)); // draw it\n\n if ((timeFraction < 1 || duration === -1) && timer.alive) {\n requestAnimationFrame(thread);\n }\n\n });\n }\n\n\n }\n\nPackage(\"com.qcobjects.timing\", [\n Timer\n ]);\n", "import { TDDOParams } from \"@types\";\nimport { Export } from \"./Export\";\nimport { InheritClass } from \"./InheritClass\";\nimport { logger } from \"./Logger\";\nimport { ObjectName } from \"./ObjectName\";\n\n/**\n * Dynamic Data Objects Class\n * Usage:\n * Class('TestDDO',{\n * data: {},\n * _new_ (){\n * this.ddo = New(DDO,{\n * instance:this,\n * name:'data',\n * value:{},\n * fget (value){\n * logger.debug('returned value '+ value );\n * }\n * })\n * }\n * });\n *\n */\nexport class DDO extends InheritClass {\n constructor({\n instance,\n name,\n fget,\n fset,\n value\n }:TDDOParams) {\n super({\n instance,\n name,\n fget,\n fset,\n value\n });\n this._new_({\n instance,\n name,\n fget,\n fset,\n value\n });\n\n }\n\n _new_({\n instance,\n name,\n fget,\n fset\n }:TDDOParams):void {\n const ddoInstance = this;\n var name = (typeof name === \"undefined\") ? (ObjectName(ddoInstance)) : (name);\n\n Object.defineProperty(instance, name, {\n set(val) {\n const _value = val;\n logger.debug(\"value changed \" + name);\n let ret;\n if (typeof fset !== \"undefined\" && typeof fset === \"function\") {\n ret = fset(_value);\n } else {\n ret = _value;\n }\n instance[\"_\" + name] = ret;\n \n },\n get():any {\n const _value = instance[\"_\" + name];\n logger.debug(\"returning value \" + name);\n const is_ddo = (v:any):any => {\n if (typeof v === \"object\" && Object.hasOwn(v, \"value\")) {\n return v.value;\n }\n return v;\n };\n let ret;\n if (typeof fget !== \"undefined\" && typeof fget === \"function\") {\n ret = fget(is_ddo(_value));\n } else {\n ret = is_ddo(_value);\n }\n return ret;\n }\n });\n }\n\n}\nExport(DDO);\n", "import { InheritClass } from \"./InheritClass\";\nimport { logger } from \"./Logger\";\nimport { Package } from \"./Package\";\nexport class Toggle extends InheritClass {\n _toggle = false;\n _inverse = true;\n _positive:Function|null = null;\n _negative:Function|null = null;\n _dispatched:Function|null = null;\n _args = {};\n\n constructor(positive: Function, negative: Function, args: Array) {\n super({positive, negative, args});\n this._new_({positive, negative, args});\n }\n\n changeToggle():void {\n this._toggle = !(this._toggle);\n }\n\n _new_({\n positive,\n negative,\n args\n }:{positive: Function, negative: Function, args: Array}):void {\n this._positive = positive;\n this._negative = negative;\n this._args = args;\n }\n\n fire():Promise {\n const toggle = this;\n var _promise = new Promise(function (resolve, reject) {\n\n if (typeof toggle._positive === \"function\" && typeof toggle._negative === \"function\") {\n if (toggle._inverse) {\n toggle._dispatched = (toggle._toggle) ? (toggle._negative.bind(toggle)) : (toggle._positive.bind(toggle));\n } else {\n toggle._dispatched = (toggle._toggle) ? (toggle._positive.bind(toggle)) : (toggle._negative.bind(toggle));\n }\n toggle._dispatched?.call(toggle, toggle._args);\n resolve.call(_promise, toggle);\n } else {\n logger.debug(\"Toggle functions are not declared\");\n reject.call(_promise, toggle as Toggle);\n }\n return toggle;\n }).then(function (toggle:Toggle) {\n toggle.changeToggle();\n return toggle;\n }).catch(function (e) {\n logger.debug(e.toString());\n return toggle;\n }).finally(()=> {\n return toggle;\n });\n return _promise;\n }\n\n\n}\n\nPackage(\"com.qcobjects.tools.essentials\", [\n Toggle\n]);\n", "export const getDocumentLayout = function ():string|undefined {\n const h = (w:number, h:number) => {\n return w > h ? \"landscape\" : null;\n };\n const v = (w:number, h:number) => {\n return h > w ? \"portrait\" : null;\n };\n const square = (w:number, h:number) => {\n return w === h ? \"square\" : null;\n };\n return [\n h(document.documentElement.clientWidth, document.documentElement.clientHeight),\n v(document.documentElement.clientWidth, document.documentElement.clientHeight),\n square(document.documentElement.clientWidth, document.documentElement.clientHeight)\n ].filter(e => e !== null).pop();\n };\n"], "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAa;AAAb;AAAA;AAAA;AAAO,MAAM,mBAAmB,wBAAC,QAAsB;AACrD,eAAO,CAAC,EAAG,OAAO,QAAQ,cAAc,IAAI,SAAS,EAAE,WAAW,OAAO;AAAA,MAC3E,GAFgC;AAAA;AAAA;;;ACAhC,MAKa;AALb;AAAA;AAAA;AAKO,MAAM,aAAa,wBAAC,MAAkB;AAC3C,YAAI,MAAM;AACV,YAAI,OAAO,MAAM,cAAc,OAAO,OAAO,GAAG,MAAM,KAAK,EAAE,SAAS,IAAI;AACxE,gBAAM,EAAE;AAAA,QACV,WAAW,OAAO,MAAM,eAAe,OAAO,EAAE,gBAAgB,cAAc,EAAE,YAAY,SAAS,IAAI;AACvG,gBAAM,EAAE,YAAY;AAAA,QACtB,WAAW,OAAO,MAAM,eAAe,OAAO,EAAE,gBAAgB,UAAU;AACxE,gBAAM,EAAE,YAAY,SAAS,EAAE,QAAQ,cAAc,IAAI,EAAE,MAAM,GAAG,EAAE,MAAM,CAAC,EAAE,KAAK,EAAE;AAAA,QACxF;AACA,eAAO;AAAA,MACT,GAV0B;AAAA;AAAA;;;ACL1B,MAQa;AARb;AAAA;AAAA;AAAA;AACA;AAOO,M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AA,MACL,EAAE,SAAS,gBAAgB,aAAa,SAAS,gBAAgB,YAAY;AAAA,MAC7E,EAAE,SAAS,gBAAgB,aAAa,SAAS,gBAAgB,YAAY;AAAA,MAC7E,OAAO,SAAS,gBAAgB,aAAa,SAAS,gBAAgB,YAAY;AAAA,IACpF,EAAE,OAAO,OAAK,MAAM,IAAI,EAAE,IAAI;AAAA,EAChC,GAf+B;;;AhBkGjC;AACA;AACA;AACA;", "names": ["__getType__", "name", "name", "self", "self", "process", "callback", "args", "service", "URL", "req", "component", "is_file", "_ret_", "self", "e", "_component_", "_component", "standardResponse", "observer", "newComponent", "_top", "_top", "ready", "self", "shortCode", "func", "exp", "subelements", "_top", "_self", "content", "self", "isBrowser", "requestMethod", "supportedMethods", "context", "context", "_Controller", "toggle", "h"] } diff --git a/public/cjs/index.cjs.map b/public/cjs/index.cjs.map index 55a53926..ea56e49e 100644 --- a/public/cjs/index.cjs.map +++ b/public/cjs/index.cjs.map @@ -1,7 +1,7 @@ { "version": 3, "sources": ["../../src/is_raw_class.ts", "../../src/ObjectName.ts", "../../src/getType.ts", "../../src/make_global.ts", "../../src/PrimaryCollections.ts", "../../src/Export.ts", "../../src/_import_.ts", "../../src/platform.ts", "../../src/Logger.ts", "../../src/Cast.ts", "../../src/DOMCreateElement.ts", "../../src/IncrementInstanceID.ts", "../../src/introspection.ts", "../../src/Package.ts", "../../src/InheritClass.ts", "../../src/isQCObjects.ts", "../../src/is_a.ts", "../../src/is_forbidden_name.ts", "../../src/LegacyCopy.ts", "../../src/Class.ts", "../../src/ClassFactory.ts", "../../src/Base64.ts", "../../src/basePath.ts", "../../src/DataStringify.ts", "../../src/domain.ts", "../../src/New.ts", "../../src/secretKey.ts", "../../src/Crypt.ts", "../../src/ConfigSettings.ts", "../../src/CONFIG.ts", "../../src/Processor.ts", "../../src/routings.ts", "../../src/asyncLoad.ts", "../../src/ComplexStorageCache.ts", "../../src/serviceLoader.ts", "../../src/tag_filter.ts", "../../src/componentLoader.ts", "../../src/Component.ts", "../../src/ComponentFactory.ts", "../../src/Service.ts", "../../src/globalSettings.ts", "../../src/top.ts", "../../src/captureFalseTouch.ts", "../../src/range.ts", "../../src/defaultProcessors.ts", "../../src/findPackageNodePath.ts", "../../src/Import.ts", "../../src/mathFunctions.ts", "../../src/NamespaceRef.ts", "../../src/Ready.ts", "../../src/ArrayCollection.ts", "../../src/Tag.ts", "../../src/shortCode.ts", "../../src/super.ts", "../../src/waitUntil.ts", "../../src/subelements.ts", "../../src/loadSDK.ts", "../../src/MainProcess.ts", "../../src/qcobjects.ts", "../../src/assign.ts", "../../src/BackendMicroservice.ts", "../../src/DefaultTemplateHandler.ts", "../../src/RegisterClass.ts", "../../src/SourceJS.ts", "../../src/SourceCSS.ts", "../../src/WidgetsFactory.ts", "../../src/Controller.ts", "../../src/View.ts", "../../src/VO.ts", "../../src/Effect.ts", "../../src/TransitionEffect.ts", "../../src/Timer.ts", "../../src/DDO.ts", "../../src/Toggle.ts", "../../src/DocumentLayout.ts", "../../src/index.cts"], - "sourcesContent": ["export const __is_raw_class__ = (o_c: any): boolean => {\n return !!((typeof o_c === \"function\" && o_c.toString().startsWith(\"class\")));\n};\n", "/**\n * Returns the object or function name\n *\n * @param Object or function\n */\nexport const ObjectName = (o: any):string => {\n let ret = \"\";\n if (typeof o === \"function\" && Object.hasOwn(o, \"name\") && o.name !== \"\") {\n ret = o.name;\n } else if (typeof o !== \"undefined\" && typeof o.constructor === \"function\" && o.constructor.name !== \"\") {\n ret = o.constructor.name;\n } else if (typeof o !== \"undefined\" && typeof o.constructor === \"object\") {\n ret = o.constructor.toString().replace(/\\[(.*?)\\]/g, \"$1\").split(\" \").slice(1).join(\"\");\n }\n return ret;\n};", "import { __is_raw_class__ } from \"./is_raw_class\";\nimport { ObjectName } from \"./ObjectName\";\n\n/**\n * Determine the type of the Object for any QCObjects Object\n *\n * @param {Object} object\n */\nexport const __getType__ = function __getType__(o_c: any): any {\n let _ret_ = \"\";\n switch (true) {\n case typeof o_c === \"object\" &&\n (!!o_c.constructor &&\n !!o_c.constructor.name)\n && o_c.constructor.name !== \"\":\n _ret_ = o_c.constructor.name;\n break;\n case typeof o_c === \"function\" && !!o_c.name:\n _ret_ = o_c.name;\n break;\n case __is_raw_class__(o_c) && !!o_c.name:\n _ret_ = o_c.name;\n break;\n case (!!o_c && !!o_c.__classType) && o_c.__classType !== \"\":\n _ret_ = o_c.__classType;\n break;\n case (!!o_c && !!o_c.__definition) && (!!o_c.__definition.__classType) && o_c.__definition.__classType !== \"\":\n _ret_ = o_c.__definition.__classType;\n break;\n default:\n _ret_ = ObjectName(o_c);\n break;\n }\n return _ret_;\n};\n", "import { _top, set } from \"./top\";\ndeclare const global:any;\ndeclare const globalThis:any;\n\nexport const __make_global__ = (f:any):void => {\n if (!!f && !!f.name) {\n if (typeof _top !== \"undefined\" && typeof f !== \"undefined\" && _top !== null && !Object.hasOwn(_top,f.name)) {\n set(f.name, f);\n } else if (typeof global !== \"undefined\"){\n global[f.name] = f;\n } else if (typeof globalThis !== \"undefined\"){\n globalThis[f.name] = f;\n }\n \n }\n\n};", "import { T_QC_CLASSES, T_QC_PACKAGES } from \"./types/global\";\nimport { __getType__ } from \"./getType\";\nimport { __make_global__ } from \"./make_global\";\n\nexport var _QC_CLASSES: T_QC_CLASSES = {};\nexport var _QC_PACKAGES: T_QC_PACKAGES = {};\nexport var _QC_PACKAGES_IMPORTED: any[] = [];\nexport var _QC_READY_LISTENERS: any[] = [];\n\nexport const __register_class__ = function (_class_: any, __namespace?: string): any {\n const __classType = __getType__(_class_);\n let name = _class_.name || __classType;\n if (name.toLowerCase() === \"function\") {\n name = __classType;\n }\n if (typeof _class_.__definition === \"undefined\") {\n _class_.__definition = {};\n }\n _class_.__definition.__classType = __classType;\n if (typeof __namespace !== \"undefined\") {\n _class_.__definition.__namespace = __namespace;\n }\n _QC_CLASSES[name] = _class_;\n __make_global__(_class_);\n return _QC_CLASSES[name];\n};\n\nexport const get_QC_CLASS = (name:string):any => {\n return _QC_CLASSES[name];\n};\n\nconst _get_packages_names = function (_packages: any): T[] {\n let _keys: any[] = [];\n for (const _k of Object.keys(_packages)) {\n if (\n typeof _packages[_k] !== \"undefined\" &&\n typeof _packages[_k] !== \"function\" &&\n Object.hasOwn(_packages[_k], \"length\") &&\n _packages[_k].length > 0\n ) {\n _keys.push(_k);\n _keys = _keys.concat(_get_packages_names(_packages[_k]));\n }\n }\n return _keys as T[];\n};\n\n\nexport const getPackagesNamesList = (): any[] => {\n return _get_packages_names(_QC_PACKAGES);\n};\n\nexport const getPackagesList = (): any[] => {\n return [...getPackagesNamesList()].map((packagename: string): T => {\n const _classesList: any[] = _QC_PACKAGES[packagename] as any[];\n let _ret_: any = undefined;\n if (_classesList) {\n _ret_ = {\n packageName: packagename,\n classesList: _classesList.filter(function (): boolean {\n return true;\n })\n };\n }\n return _ret_ as T;\n }).filter(function (_p: any): boolean {\n return typeof _p !== \"undefined\";\n });\n};\n\nexport const getClassesList = (): any[] => {\n let _classesList: any[] = [];\n [...getPackagesList()].forEach(function (_package_element: any): T {\n _classesList = _classesList.concat(_package_element.classesList.map(\n (_class_element: any) => {\n return {\n packageName: _package_element.packageName,\n className: `${_package_element.packageName}.${__getType__(_class_element)}`,\n classFactory: _class_element\n };\n }\n ));\n return _package_element as T;\n });\n\n return _classesList;\n};\n\nexport const getClassesNamesList = (): any[] => {\n return [...getClassesList()].map((_class_element: any): T => {\n return _class_element.className as T;\n });\n};\n\nexport const set_QC_PACKAGE = (packageName: string, _qc_packages: any[]):void => {\n _QC_PACKAGES[packageName] = _qc_packages;\n};\n\n", "import { __make_global__ } from \"./make_global\";\n\nexport const Export = function (f: any):void {\n return __make_global__(f);\n};\nExport.prototype.toString = function () {\n return \"Export(function or symbol) { [QCObjects native code] }\";\n};\n", "import { logger } from \"./Logger\";\n\nasync function _import_(name:string):Promise {\n logger.debug(`Importing ${name}...`);\n function isPackage(name:string) {\n logger.debug(`Validating if ${name} is a package name...`);\n // Simple check to determine if the name is a package\n // This can be enhanced based on your specific needs\n return !name.startsWith(\".\") && !name.startsWith(\"/\") && !name.includes(\"/\");\n }\n \n try {\n // Ensure the name has a .js extension if it's not a package\n const hasExtension = /\\.[^/\\\\]+$/.test(name);\n if (!hasExtension && !isPackage(name)) {\n logger.debug(`${name} does not have an extension and is not a package. Adding js extension.`);\n name += \".js\";\n }\n \n const m:any = await import(name);\n return m;\n } catch (error:any) {\n logger.warn(`Failed to load module: ${error}`);\n }\n }\n \nexport {_import_};", "import { _import_ } from \"./_import_\";\nimport { logger } from \"./Logger\";\n\nexport const isDeno:boolean = (typeof window !== \"undefined\" && \"Deno\" in window);\nexport const isBrowser:boolean = (typeof window !== \"undefined\" && typeof window.self !== \"undefined\" && window === window.self) && !isDeno;\nexport const isNodeCommonJS:boolean = (typeof module !== \"undefined\");\n// eslint-disable-next-line no-unused-vars\nexport const deno_require = (name:string):void => { /* not yet implemented */};\nexport const _require_ = (name:string):any => {\n \n return (isDeno)?(deno_require(name)):(\n ( (name):any => {\n let r:any;\n try {\n (async () => {\n r = await _import_(name);\n })().then((m:any) => {\n r = (m && m.default) || m;\n })\n .catch ((e:any) => {\n logger.warn(`An error ocurred: ${e}`);\n });\n\n } catch (e:any) {\n logger.debug(`An error ocurred importing module. ${e}`);\n r = {export:{}};\n }\n return r;\n } ) (name)\n );\n};\ndeclare const cordova: any;\n\nexport const is_phonegap:boolean = (\n function () {\n return (typeof cordova !== \"undefined\");\n }\n)();", "import { Export } from \"./Export\";\nimport { isBrowser } from \"./platform\";\n\nexport class Logger {\n debugEnabled = true;\n infoEnabled = true;\n warnEnabled = true;\n debug(message: string): void {\n if (this.debugEnabled) {\n console.log(\"\\x1b[35m%s\\x1b[0m\", `[DEBUG][${performance.now().toLocaleString()}] ${message}`);\n }\n }\n\n info(message: string): void {\n let color;\n if (this.infoEnabled) {\n if (isBrowser) {\n color = \"\\x1b[103m%s\\x1b[0m\";\n } else {\n color = \"\\x1b[33m%s\\x1b[0m\";\n }\n console.info(color, `[INFO][${performance.now().toLocaleString()}] ${message}`);\n }\n }\n\n warn(message: string): void {\n if (this.warnEnabled) {\n console.warn(\"\\x1b[31m%s\\x1b[0m\", `[WARN][${performance.now().toLocaleString()}] ${message}`);\n }\n }\n}\n\nexport const logger: Logger = new Logger();\nExport(logger);", "import { logger } from \"./Logger\";\n\n/**\n * Casts an object to another object class type\n *\n * @param {Object} obj_source\n * @param {Object} obj_dest\n */\nexport const _Cast = function (obj_source: any, obj_dest: any):any {\n for (const v in obj_source) {\n if (typeof obj_source[v] !== \"undefined\") {\n try {\n obj_dest[v] = obj_source[v];\n } catch (e:any) {\n logger.debug(`An error ocurred: ${e}.`);\n logger.warn(`Unable to cast ${(typeof obj_source).toString()}.${typeof v.toString()} to ${(typeof obj_dest).toString()}.${typeof v.toString()}`);\n }\n }\n }\n return obj_dest;\n};\n\n/**\n * Casts an object to another object class type. Only properties\n *\n * @param {Object} obj_source\n * @param {Object} obj_dest\n */\nexport const _CastProps = function (obj_source: any, obj_dest: any, _ignoreError:boolean = true):any {\n for (const v in obj_source) {\n if (typeof obj_source[v] !== \"undefined\" && typeof obj_source[v] !== \"function\") {\n try {\n obj_dest[v] = obj_source[v];\n } catch (e:any) {\n if (!_ignoreError){\n logger.debug(`An error ocurred: ${e}.`);\n }\n }\n } else if (typeof obj_source[v] === \"function\") {\n try {\n obj_dest[v] = obj_source[v].bind(obj_dest);\n } catch (e:any) {\n logger.warn(e);\n }\n }\n }\n return obj_dest;\n};\n", "import { IQCObjectsElement } from \"./types/global\";\nimport { isBrowser } from \"./platform\";\n\nexport const _DOMCreateElement = function (elementName: string, props?: any[], children?: any): IQCObjectsElement {\n let _ret_;\n if (isBrowser) {\n _ret_ = _DOMCreateComplexElement(elementName, props, children) as unknown as IQCObjectsElement;\n } else {\n _ret_ = {} as IQCObjectsElement;\n }\n return _ret_;\n};\n\n\nconst ComplexTypeCall = (_type: Function, { props, children }: { props?: any[], children?: any }): IQCObjectsElement => {\n return _type({ props, children }) as IQCObjectsElement;\n};\nexport const _DOMCreateComplexElement = (_type: string | Function, props?: any[], children?: any): HTMLElement | IQCObjectsElement => {\n\n if (typeof _type !== \"string\") {\n return ComplexTypeCall(_type, { props, children });\n }\n const element = document.createElement(_type);\n\n if (props) {\n Object.entries(props).forEach(([key, value]) => {\n if (typeof value === \"string\" || typeof value === \"number\") {\n element.setAttribute(key, value.toString());\n } else if (typeof value === \"function\" && key.toLowerCase().startsWith(\"on\")) {\n element.addEventListener(key.slice(2).toLowerCase(), value.bind(element));\n }\n });\n }\n\n if (Array.isArray(children)) {\n children.filter((child => child instanceof Node)).forEach(child => {\n element.appendChild(child);\n });\n } else if (children instanceof Node) {\n element.appendChild(children);\n } else if (typeof children === \"string\") {\n element.innerHTML = children;\n }\n\n return element;\n};\n", "/**\n * Primary instance ID of all objects\n */\nexport var __instanceID = 0;\n\nexport const IncrementInstanceID = (): void => {\n __instanceID = (typeof __instanceID === \"undefined\" || __instanceID === null) ? (0) : (__instanceID + 1);\n};\n", "export const _protected_code_ = (_: any): void => {\n const __oldtoString = (typeof _.prototype !== \"undefined\") ? (_.prototype.toString) : (function () {\n return \"\";\n });\n if (typeof _.prototype !== \"undefined\") {\n _.prototype.toString = function (): string {\n const _protected_symbols = [\n \"__qcobjects__\",\n \"__qcobjects_sdk__\",\n \"__loaded__\",\n \"ComplexStorageCache\",\n \"css\",\n \"append\",\n \"attachIn\",\n \"debug\",\n \"info\",\n \"warn\",\n \"QC_Append\",\n \"set\",\n \"get\",\n \"done\",\n \"componentDone\",\n \"_new_\",\n \"__new__\",\n \"Class\",\n \"ClassFactory\",\n \"New\",\n \"Export\",\n \"Package\",\n \"Import\",\n \"subelements\",\n \"componentLoader\",\n \"buildComponents\",\n \"Controller\",\n \"View\",\n \"VO\",\n \"Service\",\n \"serviceLoader\",\n \"JSONService\",\n \"ConfigService\",\n \"SourceJS\",\n \"SourceCSS\",\n \"ArrayList\",\n \"ArrayCollection\",\n \"Effect\",\n \"Timer\",\n \"sum\",\n \"avg\",\n \"table\",\n \"max\",\n \"min\",\n \"range\",\n \"matrix\",\n \"matrix2d\",\n \"matrix3d\",\n \"unique\",\n \"uniqueId\",\n \"shortCode\",\n \"NamespaceRef\"\n ];\n let _ret_;\n if (_protected_symbols.includes(this.name)) {\n _ret_ = this.name + \"{ [QCObjects native code] }\";\n } else {\n _ret_ = __oldtoString.call(this);\n }\n return _ret_ as string;\n };\n }\n};\n(_protected_code_)(Function);\nexport const _methods_ = function (_: any): T[] {\n const _m = [];\n for (const i in _) {\n if ((typeof _[i]).toLowerCase() === \"function\") {\n _m.push(_[i]);\n }\n }\n return _m as T[];\n};\n", "import { __is_raw_class__ } from \"./is_raw_class\";\nimport {_QC_PACKAGES, set_QC_PACKAGE, __register_class__ } from \"./PrimaryCollections\";\n\n/**\n * Defines a package for Class classification\n *\n * @param {Object} namespace\n * @param {Object} classes\n */\nexport const Package = (namespace: string, classes: any[] = []): any[] => {\n\n if (Object.hasOwn(_QC_PACKAGES, namespace) &&\n typeof _QC_PACKAGES[namespace] !== \"undefined\" &&\n typeof _QC_PACKAGES[namespace] !== \"string\" &&\n Object.hasOwn(_QC_PACKAGES[namespace], \"length\") &&\n _QC_PACKAGES[namespace].length > 0 &&\n typeof classes !== \"undefined\" &&\n Object.hasOwn(classes, \"length\") &&\n classes.length > 0\n ) {\n classes.forEach((_class_: any) => {\n __register_class__(_class_, namespace);\n });\n set_QC_PACKAGE(namespace, _QC_PACKAGES[namespace].concat(classes));\n } else if (typeof classes !== \"undefined\"\n && typeof classes !== \"undefined\"\n && Object.hasOwn(classes, \"length\")\n && classes.length > 0) {\n classes.forEach((_class_: any) => {\n __register_class__(_class_, namespace);\n });\n set_QC_PACKAGE(namespace, classes);\n } else if (__is_raw_class__(classes)) {\n if (typeof (classes as any).__definition === \"undefined\") {\n (classes as any).__definition = {};\n }\n (classes as any).__definition.__namespace = namespace;\n (classes as any).__namespace = namespace;\n __register_class__(classes, namespace);\n set_QC_PACKAGE(namespace, [classes]);\n } else {\n throw new Error (`An error ocurred. It was not possible to add classes to ${namespace}.`);\n }\n return ((Object.hasOwn(_QC_PACKAGES, namespace)) ? (_QC_PACKAGES[namespace]) : []) as any[] | [];\n};\n", "import { type IInheritClass, type IQCObjectsElement, type TBody } from \"./types/global\";\nimport { logger } from \"./Logger\";\nimport { __instanceID, IncrementInstanceID } from \"./IncrementInstanceID\";\nimport { _CastProps, _Cast } from \"./Cast\";\nimport { _DOMCreateElement } from \"./DOMCreateElement\";\nimport { __getType__ } from \"./getType\";\nimport { _methods_ } from \"./introspection\";\nimport { is_a } from \"./is_a\";\nimport { isBrowser } from \"./platform\";\nimport { _QC_CLASSES } from \"./PrimaryCollections\";\nimport { Package } from \"./Package\";\n\nexport class InheritClass implements IInheritClass {\n [key: string]: any;\n __definition: any;\n private _body: TBody;\n public get body(): TBody {\n return this._body;\n }\n public set body(value: TBody) {\n this._body = value;\n }\n childs: any;\n __instanceID!: number;\n\n constructor(_o_?: any) {\n\n if (typeof _o_ !== \"undefined\" && typeof _o_.__definition !== \"undefined\") {\n this.__definition = {\n ...(_o_.__definition)\n };\n }\n\n const self: this = this;\n if (typeof _o_ !== \"undefined\" && _o_ !== null) {\n Object.keys(_o_)\n .filter(function (k) {\n return isNaN(k as any) && ![\"__instanceID\", \"__classType\", \"__definition\"].includes(k);\n })\n .forEach(function (key) {\n if (typeof self[key] === \"function\") {\n self[key] = _o_[key].bind(self);\n } else {\n self[key] = _o_[key];\n }\n });\n }\n\n IncrementInstanceID();\n if (!self.__instanceID) {\n Object.defineProperty(self, \"__instanceID\", {\n value: __instanceID,\n writable: false\n });\n }\n\n if (typeof self.__definition !== \"undefined\") {\n Object.keys(self.__definition).filter(function (k) {\n return isNaN(k as any) && ![\"name\", \"__instanceID\", \"__classType\", \"__definition\"].includes(k);\n }).forEach(function (key) {\n if (typeof self.__definition[key] === \"function\") {\n self[key] = self.__definition[key].bind(self);\n } else {\n self[key] = self.__definition[key];\n }\n });\n }\n _methods_((_QC_CLASSES as any)[self.__classType]).map(function (m): any {\n self[(m as Function).name] = (m as Function).bind(self);\n return m;\n });\n _methods_(self.__definition).map(function (m): any {\n self[(m as Function).name] = (m as Function).bind(self);\n return m;\n });\n\n if (self.body) {\n if (typeof self.__definition === \"undefined\" || (!Object.hasOwn(self.__definition, \"body\")) || typeof self.__definition.body === \"undefined\") {\n try {\n if (isBrowser) {\n self.body = _DOMCreateElement(self.__definition.__classType);\n } else {\n self.body = {};\n }\n } catch (e: any) {\n logger.debug(`An error ocurred: ${e}.`);\n self.body = {};\n }\n } else if (Object.hasOwn(self.__definition, \"body\")) {\n self.body = self.__definition.body;\n }\n }\n\n\n try {\n self.__new__.call(self, _o_);\n if (typeof self === \"object\" && Object.hasOwn(self, \"_new_\") && typeof (self._new_ as any).isCalled === \"undefined\") {\n try {\n self._new_(_o_);\n (self._new_ as any).isCalled = true;\n } catch (e: any) {\n logger.warn(`${self.__classType}._new_() failed with error: ${e}`);\n }\n }\n } catch (e: any) {\n logger.warn(e);\n }\n }\n\n static get __classType(): any {\n return (Object.getPrototypeOf(this.constructor) as Function).name;\n }\n\n get __classType(): string {\n return this.constructor.name;\n }\n\n\n static hierarchy(__class__: any): any[] {\n const __classType = function (o_c: any): any {\n return (Object.hasOwn(o_c, \"__classType\")) ? (o_c.__classType) : (__getType__.call(__class__, o_c));\n };\n const __hierarchy__proto__ = (c: any): any[] => {\n return (typeof c !== \"undefined\" && typeof c.__proto__ !== \"undefined\" && c.__proto__ !== null) ? (((__classType(c) !== \"\") ? ([__classType(c)]) : ([])).concat(__hierarchy__proto__(c.__proto__))) : ([]);\n };\n\n if (typeof __class__ === \"undefined\" || __class__ === null) {\n __class__ = this;\n }\n let __hierarchy = [];\n __hierarchy.push(__classType(__class__));\n __hierarchy = __hierarchy.concat(__hierarchy__proto__(__class__.__proto__));\n return __hierarchy;\n }\n\n\n __namespace?: string | undefined;\n\n __new__(_o_: any): void {\n _CastProps(_o_, this);\n }\n\n // eslint-disable-next-line no-unused-vars\n _new_(_o_?: any): void { }\n\n static getParentClass(): any {\n return Object.getPrototypeOf(this.prototype.constructor);\n }\n getParentClass(): any {\n return (this.constructor as typeof InheritClass).getParentClass();\n }\n\n\n static getClass(): any {\n return Object.getPrototypeOf(this.constructor);\n }\n\n getClass(): any {\n return (this.constructor as typeof InheritClass).getClass();\n }\n\n css(_css: any): any {\n if (typeof this.body !== \"undefined\" && typeof this?.body !== \"string\" && typeof (this?.body as HTMLElement)?.style !== \"undefined\") {\n logger.debug(\"body style\");\n if (this.body) {\n (this.body as any).style = _Cast(_css, (this?.body as HTMLElement)?.style);\n }\n }\n return (typeof this.body !== \"string\") ? (this?.body as HTMLElement)?.style : {};\n }\n\n hierarchy(): any {\n const __instance__ = this;\n return (this.constructor as typeof InheritClass).hierarchy(__instance__);\n }\n\n\n append(_child?: any): void {\n const child: any = _child || this.body;\n logger.debug(\"append: start\");\n if (is_a(child, \"Component\")) {\n logger.debug(\"append: child is a Component\");\n logger.debug(`appending the body of ${child.name}`);\n }\n if (typeof this.body !== \"undefined\") {\n logger.debug(\"append element\");\n if (arguments.length > 0) {\n logger.debug(\"append to element\");\n if (typeof this.body !== \"string\") {\n if (typeof (this.body as IQCObjectsElement)?.append !== \"undefined\") {\n (this?.body as IQCObjectsElement)?.append(child);\n } else {\n throw Error(\"body.append is undefined. That means the body is not well formed.\");\n }\n } else {\n this.append(child);\n }\n if (typeof this.childs === \"undefined\") {\n this.childs = [];\n }\n this.childs.push(child);\n } else {\n if (isBrowser) {\n logger.debug(\"append to body\");\n document.body.append(child);\n }\n }\n }\n }\n\n attachIn(tag: any): void {\n if (isBrowser) {\n const tags = (document as any).subelements(tag);\n for (let i = 0, j = tags.length; i < j; i++) {\n tags[i].append(this as any);\n }\n } else {\n throw new Error(\"attachIn not yet implemented for non browser platforms\");\n }\n }\n\n}\n\nPackage(\"com.qcobjects\", [InheritClass]);", "import { InheritClass } from \"./InheritClass\";\n\nexport const isQCObjects_Object = function (_:any):boolean {\n return (!!((typeof _ === \"object\" &&\n Object.hasOwn(_, \"__classType\") &&\n (!!_.__instanceID) &&\n Object.hasOwn(_, \"__definition\") &&\n typeof _.__definition !== \"undefined\"\n ))) || _ instanceof InheritClass;\n };\n\n export const isQCObjects_Class = function (_:any):boolean {\n return (!!((typeof _ === \"function\" &&\n (!_.__instanceID) &&\n (!!_.__definition) &&\n typeof _.__definition !== \"undefined\" &&\n !!_.__definition.__classType\n ))) || _.prototype instanceof InheritClass;\n };\n", "import { __getType__ } from \"./getType\";\nimport { isQCObjects_Class, isQCObjects_Object } from \"./isQCObjects\";\nimport { ObjectName } from \"./ObjectName\";\n\n/**\n * Returns if a class or object is from a determinated type\n * @param {Object} object\n * @param {String} typeName\n */\nexport const is_a = (obj: any, typeName: string):boolean => {\n return !!((typeof obj !== \"undefined\" && obj !== null &&\n (((isQCObjects_Class(obj) || isQCObjects_Object(obj)) && (obj.hierarchy().includes(typeName))) ||\n __getType__(obj) === typeName ||\n ObjectName(obj) === typeName ||\n typeof obj === typeName)));\n};", "/**\n * Internal use to determine the forbidden names for classes\n * Reserved words\n *\n * @param {String} name\n * @param {Object} type\n * @param {Object} definition\n */\nexport const __is__forbidden_name__ = (name: string):boolean => {\n return ([\"__proto__\", \"prototype\", \"Object\", \"Map\", \"defineProperty\", \"indexOf\", \"toString\", \"__instanceID\", \"function\", \"Function\"].indexOf(name) !== -1);\n};\n", "import { __is_raw_class__ } from \"./is_raw_class\";\n\nexport const _LegacyCopy = function (obj:any, _ignore?:string[]):any {\n let _value_;\n switch (true) {\n case typeof obj === \"string\":\n _value_ = obj;\n break;\n case typeof obj === \"number\":\n _value_ = obj;\n break;\n case typeof obj === \"object\":\n _value_ = [{...Object.keys(obj).filter(k => !_ignore?.includes(k))}]\n .map(k => {return {[k as never]:obj[k as never]}; })\n .reduce ((p, c) => Object.assign(p, c)) as any;\n break;\n case typeof obj === \"function\":\n _value_ = obj.bind({});\n break;\n case __is_raw_class__(obj):\n _value_ = class extends obj { };\n break;\n default:\n break;\n }\n return _value_;\n };\n", "import { _QC_CLASSES } from \"./PrimaryCollections\";\nimport { _Cast, _CastProps } from \"./Cast\";\nimport { _DOMCreateElement } from \"./DOMCreateElement\";\nimport { __getType__ } from \"./getType\";\nimport { __instanceID, IncrementInstanceID } from \"./IncrementInstanceID\";\nimport { _methods_ } from \"./introspection\";\nimport { is_a } from \"./is_a\";\nimport { __is__forbidden_name__ } from \"./is_forbidden_name\";\nimport { _LegacyCopy } from \"./LegacyCopy\";\nimport { logger } from \"./Logger\";\nimport { isBrowser } from \"./platform\";\nimport { IQCObjectsElement, TBody, TClass } from \"./types/global\";\nimport { InheritClass } from \"./InheritClass\";\nimport { _top } from \"./top\";\n\n/**\n * Creates new object class of another object\n *\n * @param {String} name\n * @param {Object} type\n * @param {Object} definition\n * \n * @example \n * Class (name, type, definition)\n * Class (name, type)\n * Class (name, definition)\n * Class ()\n * \n * \n * const MyClass = Class (\"MyComponent\", Component, {\n * name: \"one_component\",\n * method1 : () => {console.log (\"done\") }\n * })\n * const myClassInstance = new MyClass ({name: \"one_component\"})\n * \n * const MyClass = Class (\"MyService\",{\n * name: \"myservice\",\n * })\n * \n * const myClassInstance = new MyClass ({name: \"myservice\"})\n */\n\n\n\nexport const Class: TClass = (name?: string, _type?: unknown, _definition?: unknown): InheritClass => {\n const _types_ = {};\n let type: unknown, definition: unknown;\n\n switch (true) {\n case !name && !_type && !_definition:\n return class { } as unknown as InheritClass;\n case !!name && !_type && !_definition:\n type = class { };\n definition = {};\n break;\n case !!name && !_type && !!_definition:\n type = class { };\n definition = _definition;\n break;\n case !!name && !!_type && !!_definition:\n type = _type;\n definition = _definition;\n break;\n default:\n return class { } as unknown as InheritClass;\n }\n if (typeof name !== \"string\") {\n throw new Error(\"Class name must be a string\");\n }\n\n if (typeof type !== \"function\") {\n throw new Error(\"Class type must be a function or class\");\n }\n\n if (__is__forbidden_name__(name)) {\n throw new Error(`${name} is not an allowed word in the name of a class`);\n }\n\n if (typeof (type as any).__definition === \"object\"\n && (type as any).__definition\n && Object.keys((type as any).__definition).length !== 0) {\n (definition as any).__definition = Object.assign(_LegacyCopy((type as any).__definition,[\"name\"]), type);\n }\n\n (_types_ as any)[type.name] = type;\n\n if (typeof definition === \"undefined\" || definition === null) {\n definition = {};\n } else {\n definition = { ...definition };\n }\n\n /* hack to prevent duplicate __instanceID */\n if (typeof (definition as any).__instanceID !== \"undefined\") {\n delete (definition as any).__instanceID;\n }\n\n _QC_CLASSES[name] = class extends (_types_ as any)[type.name] {\n __instanceID!: number;\n __namespace?: string | undefined;\n __definition: any = {\n ...(definition as any)\n };\n childs: any;\n private _body: TBody;\n public get body(): TBody {\n return this._body;\n }\n public set body(value: TBody) {\n this._body = value;\n }\n\n static get __classType(): any {\n return (Object.getPrototypeOf(this.constructor) as Function).name;\n }\n\n get __classType(): string {\n return this.constructor.name;\n }\n\n static hierarchy(__class__: any): any[] {\n const __classType = function (o_c: any): any {\n return (Object.hasOwn(o_c, \"__classType\")) ? (o_c.__classType) : (__getType__.call(__class__, o_c));\n };\n const __hierarchy__proto__ = (c: any): any[] => {\n return (typeof c !== \"undefined\" && typeof c.__proto__ !== \"undefined\" && c.__proto__ !== null) ? (((__classType(c) !== \"\") ? ([__classType(c)]) : ([])).concat(__hierarchy__proto__(c.__proto__))) : ([]);\n };\n\n if (typeof __class__ === \"undefined\" || __class__ === null) {\n __class__ = this;\n }\n let __hierarchy = [];\n __hierarchy.push(__classType(__class__));\n __hierarchy = __hierarchy.concat(__hierarchy__proto__(__class__.__proto__));\n return __hierarchy;\n }\n\n static getParentClass(): any {\n return Object.getPrototypeOf(this.prototype.constructor);\n }\n\n constructor(_o_?: any) {\n super(_o_ || {});\n\n const self = this;\n IncrementInstanceID();\n if (!(self as any).__instanceID) {\n Object.defineProperty(self, \"__instanceID\", {\n value: __instanceID,\n writable: false\n });\n }\n\n if (typeof self.__definition !== \"undefined\") {\n Object.keys(self.__definition).filter(function (k) {\n return isNaN(k as any) && ![\"name\", \"__instanceID\", \"__classType\", \"__definition\"].includes(k);\n }).forEach(function (key) {\n if (typeof self.__definition[key] === \"function\") {\n self[key] = self.__definition[key].bind(self);\n } else {\n self[key] = self.__definition[key];\n }\n });\n }\n _methods_(_QC_CLASSES[self.__classType]).map(function (m: unknown): T {\n self[(m as Function).name] = (m as Function).bind(self);\n return m as T;\n });\n _methods_(self.__definition).map(function (m): any {\n self[(m as Function).name] = (m as Function).bind(self);\n return m;\n });\n\n if (self.body) {\n if (typeof self.__definition === \"undefined\" || (!Object.hasOwn(self.__definition, \"body\")) || typeof self.__definition.body === \"undefined\") {\n try {\n if (isBrowser) {\n self.body = _DOMCreateElement(self.__definition.__classType);\n } else {\n self.body = {};\n }\n } catch (e: any) {\n logger.debug(`An error ocurred: ${e}.`);\n self.body = {};\n }\n } else if (Object.hasOwn(self.__definition, \"body\")) {\n self.body = self.__definition.body;\n }\n }\n\n\n try {\n if (typeof self.__new__ === \"function\") {\n self.__new__.call(self, _o_);\n } else if (typeof super.__new__ === \"function\") {\n self.__new__ = super.__new__.bind(self);\n self.__new__.call(self, _o_);\n }\n if (typeof self === \"object\" && Object.hasOwn(self, \"_new_\") && typeof (self._new_ as any).isCalled === \"undefined\") {\n try {\n self._new_(_o_);\n (self._new_ as any).isCalled = true;\n } catch (e: any) {\n logger.warn(`${self.__classType}._new_() failed with error: ${e}`);\n }\n }\n } catch (e: any) {\n logger.warn(e);\n }\n }\n\n __new__(_o_: any) {\n _CastProps(_o_, this);\n }\n\n // eslint-disable-next-line no-unused-vars\n _new_(_o_?: any) { }\n\n getClass(): any {\n return Object.getPrototypeOf(this.constructor);\n }\n\n css(_css: any): any {\n if (typeof this.body !== \"undefined\" && typeof this?.body !== \"string\" && typeof (this?.body as HTMLElement)?.style !== \"undefined\") {\n logger.debug(\"body style\");\n if (this.body) {\n (this.body as any).style = _Cast(_css, (this?.body as HTMLElement)?.style);\n }\n }\n return (typeof this.body !== \"string\") ? (this?.body as HTMLElement)?.style : {};\n }\n\n hierarchy(): any {\n const __instance__ = this;\n return this.getClass()?.hierarchy(__instance__);\n }\n\n\n append(_child?: any) {\n const child: any = _child || this.body;\n logger.debug(\"append: start\");\n if (is_a(child, \"Component\")) {\n logger.debug(\"append: child is a Component\");\n logger.debug(`appending the body of ${child.name}`);\n }\n if (typeof this.body !== \"undefined\") {\n logger.debug(\"append element\");\n if (arguments.length > 0) {\n logger.debug(\"append to element\");\n if (typeof this.body !== \"string\") {\n if (typeof (this.body as IQCObjectsElement)?.append !== \"undefined\") {\n (this?.body as IQCObjectsElement)?.append(child);\n } else {\n throw Error(\"body.append is undefined. That means the body is not well formed.\");\n }\n } else {\n this.append(child);\n }\n if (typeof this.childs === \"undefined\") {\n this.childs = [];\n }\n this.childs.push(child);\n } else {\n if (isBrowser) {\n logger.debug(\"append to body\");\n document.body.append(child);\n }\n }\n }\n }\n\n attachIn(tag: any) {\n if (isBrowser) {\n const tags = (document as any).subelements(tag);\n for (let i = 0, j = tags.length; i < j; i++) {\n tags[i].append(this as any);\n }\n } else {\n throw new Error(\"attachIn not yet implemented for non browser platforms\");\n }\n }\n\n };\n\n // remove the keys from definition that exist in the prototype\n\n _QC_CLASSES[name] = _CastProps(definition, _QC_CLASSES[name]);\n _QC_CLASSES[name].__definition = definition;\n _QC_CLASSES[name].__definition.__classType = name;\n\n (_top as any)[name] = _QC_CLASSES[name];\n\n return _QC_CLASSES[name] as InheritClass;\n};\nif (typeof Class.prototype !== \"undefined\") {\n Class.prototype.toString = function () {\n return \"Class(name, type, definition) { [QCObjects native code] }\";\n };\n}\n\n", "/**\n * Returns the QCObjects Class Factory of a given ClassName\n *\n * @param {String} name\n */\n\nimport { __is_raw_class__ } from \"./is_raw_class\";\nimport { _QC_CLASSES, _QC_PACKAGES, get_QC_CLASS } from \"./PrimaryCollections\";\nimport { TClassFactory } from \"./types/global\";\n\nexport const ClassFactory:TClassFactory = (className:string):any => {\n let _classFactory;\n if (typeof className === \"undefined\" || className === null) {\n throw Error (\"You need to pass a parameter {className}\");\n }\n if (className !== null && className.indexOf(\".\") !== -1) {\n const packageName = className.split(\".\").slice(0, className.split(\".\").length - 1).join(\".\");\n const _className = className.split(\".\").slice(-1).join(\"\");\n const _package = _QC_PACKAGES[packageName] || [];\n const packageClasses = _package.filter((classFactory:any) => {\n return (__is_raw_class__(classFactory));\n }).reverse();\n if (packageClasses.length > 0) {\n _classFactory = packageClasses[0];\n } else {\n throw Error(`Class ${_className} not found. Found classes: ${JSON.stringify(packageClasses)} in package ${packageName}`);\n }\n } else if (className !== null) {\n _classFactory = get_QC_CLASS(className);\n if (typeof _classFactory === \"undefined\"){\n throw new Error (`${className} is undefined.`); \n }\n } else {\n throw Error(`className is null. Unable to retrieve the class factory.\\n Not found in: \\n ${Object.keys(_QC_CLASSES).join(\"\\n\")}`);\n }\n return _classFactory;\n};\n", "export class Base64 {\n static _keyStr: string = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\n static encode(e: string): string {\n let t = \"\";\n let n: number, r: number, i: number, s: number, o: number, u: number, a: number;\n let f = 0;\n e = Base64._utf8_encode(e);\n while (f < e.length) {\n n = e.charCodeAt(f++);\n r = e.charCodeAt(f++);\n i = e.charCodeAt(f++);\n s = n >> 2;\n o = (n & 3) << 4 | r >> 4;\n u = (r & 15) << 2 | i >> 6;\n a = i & 63;\n if (isNaN(r)) {\n u = a = 64;\n } else if (isNaN(i)) {\n a = 64;\n }\n t = t + this._keyStr.charAt(s) + this._keyStr.charAt(o) + this._keyStr.charAt(u) + this._keyStr.charAt(a);\n }\n return t;\n }\n static decode(e: string): string {\n let t = \"\";\n let n: number, r: number, i: number;\n let s: number, o: number, u: number, a: number;\n let f = 0;\n e = e.replace(/[^A-Za-z0-9+/=]/g, \"\");\n while (f < e.length) {\n s = this._keyStr.indexOf(e.charAt(f++));\n o = this._keyStr.indexOf(e.charAt(f++));\n u = this._keyStr.indexOf(e.charAt(f++));\n a = this._keyStr.indexOf(e.charAt(f++));\n n = s << 2 | o >> 4;\n r = (o & 15) << 4 | u >> 2;\n i = (u & 3) << 6 | a;\n t = t + String.fromCharCode(n);\n if (u !== 64) {\n t = t + String.fromCharCode(r);\n }\n if (a !== 64) {\n t = t + String.fromCharCode(i);\n }\n }\n t = Base64._utf8_decode(t);\n return t;\n }\n static _utf8_encode(e: string): string {\n e = e.replace(/rn/g, \"n\");\n let t = \"\";\n for (let n = 0; n < e.length; n++) {\n const r = e.charCodeAt(n);\n if (r < 128) {\n t += String.fromCharCode(r);\n } else if (r > 127 && r < 2048) {\n t += String.fromCharCode(r >> 6 | 192);\n t += String.fromCharCode(r & 63 | 128);\n } else {\n t += String.fromCharCode(r >> 12 | 224);\n t += String.fromCharCode(r >> 6 & 63 | 128);\n t += String.fromCharCode(r & 63 | 128);\n }\n }\n return t;\n }\n static _utf8_decode(e: string): string {\n let t = \"\";\n let n = 0;\n let r = 0;\n let c2 = 0;\n let c3: number;\n while (n < e.length) {\n r = e.charCodeAt(n);\n if (r < 128) {\n t += String.fromCharCode(r);\n n++;\n } else if (r > 191 && r < 224) {\n c2 = e.charCodeAt(n + 1);\n t += String.fromCharCode((r & 31) << 6 | c2 & 63);\n n += 2;\n } else {\n c2 = e.charCodeAt(n + 1);\n c3 = e.charCodeAt(n + 2);\n t += String.fromCharCode((r & 15) << 12 | (c2 & 63) << 6 | c3 & 63);\n n += 3;\n }\n }\n return t;\n }\n};", "import { isBrowser } from \"./platform\";\nimport process from \"node:process\";\n\nexport var _basePath_:string = (\n function ():string {\n let _basePath:string = \"\";\n if (isBrowser) {\n const baseURI:string[] = document.baseURI.split(\"?\")[0].split(\"/\");\n baseURI.pop();\n _basePath = baseURI.join(\"/\") + \"/\";\n } else {\n if (typeof process !== \"undefined\") {\n _basePath = `${(process).cwd()}/`;\n } else {\n _basePath = \"\";\n }\n }\n return _basePath;\n }\n )();\n\nexport const setBasePath = (value:string):void => { _basePath_ = value;};", "import { _LegacyCopy } from \"./LegacyCopy\";\n\nexport const _DataStringify = (data: any): string => {\n const getCircularReplacer = function () {\n const seen = new WeakSet();\n let _level = 0;\n return function (key: string, value: any): any {\n if (typeof value === \"object\" && value !== null) {\n if (seen.has(value)) {\n _level += 1;\n return (_level <= 3) ? (_LegacyCopy(value)) : (null);\n }\n seen.add(value);\n }\n return value;\n };\n };\n return JSON.stringify(data, getCircularReplacer());\n};\n", "export const _domain_:string = (typeof location !== \"undefined\" && location.hostname !== \"\") ? (location.hostname) : (\"localhost\");\n", " /**\n * Creates an object from a Class definition\n *\n * @param {QC_Object} o\n * @param {Object} args\n */\n\n export const New = function (__class__:any, args = {}):any {\n args = (arguments.length > 1) ? (args) : ({});\n return (typeof __class__ === \"undefined\") ? (new Object()) : (new __class__(args));\n };\n \n New.prototype.toString = function () {\n return \"New(QCObjectsClassName, args) { [QCObjects native code] }\";\n };", "import { isBrowser } from \"./platform\";\n\nexport const _secretKey:string = (isBrowser)?(location.host):(\"secret\");", "import { _ICrypt } from \"./types/global\";\nimport { Base64 } from \"./Base64\";\nimport { _DataStringify } from \"./DataStringify\";\nimport { InheritClass } from \"./InheritClass\";\nimport { Package } from \"./Package\";\nimport { _secretKey } from \"./secretKey\";\n\n\nexport class _Crypt extends InheritClass implements _ICrypt {\n string: string = \"\";\n key: string = \"\";\n // eslint-disable-next-line no-unused-vars\n encrypt(_string_: string, key: string): string {\n throw new Error(\"Method not implemented.\");\n }\n // eslint-disable-next-line no-unused-vars\n decrypt(_string_: string, key: string): string {\n throw new Error(\"Method not implemented.\");\n }\n last_string = \"\";\n last_key = \"\";\n construct = false;\n _new_(o: { string?: string; key: string; }):void {\n const string = o.string;\n let key: string = (Object.hasOwn(o, \"key\")) ? (o.key) : (\"\");\n this.__new__(o);\n key = (key === \"\") ? (this.__instanceID.toString()) : (key);\n this.last_key = key;\n this.last_string = string as string;\n this.construct = true;\n }\n _encrypt(): string {\n const string = this.string;\n const key = this.key;\n let result = \"\";\n let char;\n let keychar;\n for (let i = 0; i < string.length; i++) {\n char = string.substr(i, 1);\n keychar = key.substr((i % key.length) - 1, 1);\n char = String.fromCharCode(char.charCodeAt(0) + keychar.charCodeAt(0));\n result += char;\n }\n this.last_string = Base64.encode(result);\n return this.last_string;\n }\n _decrypt(): string {\n let string = this.string;\n const key = this.key;\n let result = \"\";\n let char;\n let keychar;\n string = Base64.decode(string);\n for (let i = 0; i < string.length; i++) {\n char = string.substr(i, 1);\n keychar = key.substr((i % key.length) - 1, 1);\n char = String.fromCharCode(char.charCodeAt(0) - keychar.charCodeAt(0));\n result += char;\n }\n\n this.last_string = result;\n return this.last_string;\n }\n static encrypt(string: string, key: string): string {\n const crypt = new _Crypt({\n string,\n key: (key !== \"\") ? (key) : (\"12345678ABC\")\n });\n return crypt._encrypt();\n }\n static decrypt(string: string, key: string):string {\n const crypt = new _Crypt({\n string,\n key: (key !== \"\") ? (key) : (\"12345678ABC\")\n });\n return crypt._decrypt();\n }\n}\n\nexport const _CryptObject = function (o: any): string {\n return _Crypt.encrypt(_DataStringify(o), _secretKey);\n};\nexport const _DecryptObject = function (s: string): any {\n return (s === \"\") ? ({}) : (JSON.parse(_Crypt.decrypt(s, _secretKey)));\n};\n\nPackage(\"com.qcobjects\", [_Crypt]);", "import { _basePath_ } from \"./basePath\";\nimport { InheritClass } from \"./InheritClass\";\nimport { Package } from \"./Package\";\n\ntype TConfigSettings = {\n [key: string]: any,\n relativeImportPath:string,\n remoteImportsPath:string,\n remoteSDKPath:string,\n asynchronousImportsLoad:boolean,\n removePackageScriptAfterLoading:boolean,\n componentsBasePath:string,\n delayForReady:number,\n preserveComponentBodyTag:false,\n useConfigService:false,\n routingWay:string,\n useSDK:boolean,\n useLocalSDK:boolean,\n basePath:string\n};\n\n\nexport class ConfigSettings extends InheritClass {\n public _CONFIG: TConfigSettings = {\n \"relativeImportPath\": \"\",\n \"remoteImportsPath\": \"\",\n \"remoteSDKPath\": \"https://sdk.qcobjects.dev/\",\n \"asynchronousImportsLoad\": false,\n \"removePackageScriptAfterLoading\": true,\n \"componentsBasePath\": \"\",\n \"delayForReady\": 0,\n \"preserveComponentBodyTag\": false,\n \"useConfigService\": false,\n \"routingWay\": \"hash\",\n \"useSDK\": true,\n \"useLocalSDK\": false,\n \"basePath\": _basePath_\n };\n protected static _instance: ConfigSettings;\n public _CONFIG_ENC = \"\";\n\n set(name:string, value:any):void {\n this._CONFIG[name] = value;\n }\n\n get(name:string, _defaultValue?:any):any {\n return this._CONFIG[name] || _defaultValue;\n }\n\n static get instance():ConfigSettings {\n\n if (typeof ConfigSettings._instance === \"undefined\") {\n ConfigSettings._instance = new ConfigSettings();\n }\n\n return ConfigSettings._instance;\n }\n\n\n}\n\nPackage(\"com.qcobjects\", [ConfigSettings]);\n", "import { setBasePath } from \"./basePath\";\nimport { _CastProps } from \"./Cast\";\nimport { _Crypt, _CryptObject, _DecryptObject } from \"./Crypt\";\nimport { _DataStringify } from \"./DataStringify\";\nimport { logger } from \"./Logger\";\nimport { GlobalProcessor as Processor } from \"./Processor\";\nimport { _secretKey } from \"./secretKey\";\nimport { Package } from \"./Package\";\nimport { InheritClass } from \"./InheritClass\";\nimport { ICONFIG } from \"./types/global\";\nimport { ConfigSettings } from \"./ConfigSettings\";\n\n\nexport class CONFIG extends InheritClass implements ICONFIG {\n\n get _CONFIG_ENC(): string {\n return ConfigSettings.instance._CONFIG_ENC;\n }\n\n get _CONFIG(): unknown {\n return ConfigSettings.instance._CONFIG as unknown;\n }\n\n set(name: string, value: unknown):void {\n logger.debug(`CONFIG.set ${name}: ${value as string}`);\n // hack to force update basePath from CONFIG\n if (name === \"basePath\") {\n setBasePath(value as string);\n }\n let _conf;\n try {\n _conf = (\n function (config): any {\n if (config._CONFIG_ENC === null) {\n config._CONFIG_ENC = _Crypt.encrypt(_DataStringify({}), _secretKey);\n }\n const _protectedEnc = config._CONFIG_ENC.valueOf();\n const _protectedConf = config._CONFIG?.valueOf();\n return _CastProps(_protectedConf, _DecryptObject(_protectedEnc));\n }\n )(ConfigSettings.instance);\n } catch (e) {\n _conf = {};\n console.error(e);\n logger.debug(\"failed to encrypt config\");\n }\n\n _conf[name] = value;\n ConfigSettings.instance._CONFIG_ENC = _CryptObject(_conf);\n ConfigSettings.instance.set(name, value);\n }\n\n get(name: string, _default?: unknown): any {\n let _value;\n try {\n const _conf = (\n function (config): any {\n if (config._CONFIG_ENC === null) {\n config._CONFIG_ENC = _Crypt.encrypt(_DataStringify({}), _secretKey);\n }\n const _protectedEnc = config._CONFIG_ENC.valueOf();\n const _protectedConf = config._CONFIG.valueOf();\n return _CastProps(_protectedConf, _DecryptObject(_protectedEnc));\n }\n )(ConfigSettings.instance);\n if (typeof _conf[name] !== \"undefined\") {\n _value = _conf[name];\n }\n } catch (e) {\n console.error(e);\n logger.debug(\"Something wrong when trying to get CONFIG values\");\n logger.debug(\"No config value for: \" + name);\n _value = _default;\n }\n return Processor.processObject(_value) || _default;\n }\n\n private static _instance:CONFIG;\n static get instance ():CONFIG {\n if (typeof CONFIG._instance === \"undefined\") {\n CONFIG._instance = new CONFIG();\n }\n return CONFIG._instance;\n }\n\n static set(name: string, value: unknown):void {\n (CONFIG.instance.set(name, value));\n }\n static get(name: string, value?: unknown): any {\n return (CONFIG.instance.get(name, value));\n }\n\n}\n\n\nPackage(\"com.qcobjects\", [CONFIG]);", "import { type IComponent, type IProcessor } from \"./types/global\";\nimport { CONFIG } from \"./CONFIG\";\nimport { InheritClass } from \"./InheritClass\";\nimport { New } from \"./New\";\nimport { _top } from \"./top\";\nimport { Component } from \"./Component\";\nimport { Package } from \"./Package\";\n\nexport class Processor extends InheritClass implements IProcessor {\n protected static _instance: IProcessor | undefined;\n constructor({ component, processors }: { component: IComponent | null, processors?: any }) {\n super({ component });\n if (typeof processors !== \"undefined\") {\n this.processors = Object.assign(processors, Processor.instance.processors);\n }\n }\n\n processors: any = {\n \"config\"(component: Component, arg: string): string {\n return CONFIG.get(arg, \"\") as string;\n },\n \"ENV\"(component: Component, arg: string): string {\n return (typeof process !== \"undefined\") ? (process.env[arg] as string) : (\"\");\n },\n \"global\"(component: Component, arg: string): string {\n return (typeof _top !== \"undefined\") ? ((_top as any)[arg] as string) : (\"\");\n }\n };\n\n static get instance(): IProcessor {\n if (typeof Processor._instance === \"undefined\") {\n Processor._instance = new Processor({ component: null });\n }\n return Processor._instance;\n }\n\n setProcessor(_proc_: Function):void {\n if (typeof _proc_ === \"function\" && _proc_.name !== \"\") {\n this.processors[_proc_.name] = _proc_;\n }\n }\n\n component!: IComponent | null;\n\n\n execute(component: IComponent, processorName: string, args: string): string {\n const processorHandler = (typeof component !== \"undefined\" && component !== null) ? (component.processorHandler) : (this);\n return processorHandler?.processors[processorName].bind(processorHandler).apply(processorHandler, [component, args?.split(\",\")]) as string;\n }\n\n process(template: string, component: IComponent | null = null):string {\n const processorHandler = (component !== null) ? (component.processorHandler) : (New(Processor, { component: null }));\n if (typeof template === \"string\") {\n Object.keys(processorHandler.processors).map((funcName) => {\n return [...template.matchAll(new RegExp(\"\\\\$\" + funcName + \"\\\\((.*)\\\\).*\", \"g\"))].map(\n function (procesorMatch) {\n const match0 = `$${funcName}(${procesorMatch[1]})`;\n template = template.replace(match0, processorHandler.execute.bind(processorHandler).call(processorHandler, component, funcName, procesorMatch[1]));\n return procesorMatch;\n }\n );\n });\n }\n return template;\n }\n\n processObject(obj: any, component: IComponent | null = null): any {\n let __instance__: IProcessor | undefined = (component === null) ? (this) : (component.processorHandler);\n if (typeof __instance__ === \"undefined\") {\n __instance__ = new Processor({ component });\n }\n if (typeof obj === \"object\") {\n Object.keys(obj).map(\n (_k) => {\n if (typeof obj[_k] === \"object\" && !Object.hasOwn(obj[_k], \"call\")) {\n obj[_k] = __instance__?.processObject.bind(__instance__)(obj[_k], component as IComponent);\n } else if (typeof obj[_k] === \"string\") {\n obj[_k] = __instance__?.process.bind(__instance__)(obj[_k], component as IComponent);\n }\n return _k;\n }\n );\n } else if (typeof obj === \"string\") {\n obj = __instance__.process.bind(__instance__)(obj, component as IComponent);\n }\n return obj;\n }\n\n}\n\nexport const GlobalProcessor: IProcessor = Processor.instance;\n\nPackage(\"com.qcobjects\", [Processor]);", "import { TComponentRouting } from \"./types/global\";\n\nexport const __routing_params__ = (routing:TComponentRouting, routingPath:string):object => {\n const standardRoutingPath = routing.path.replace(/{(.*?)}/g, \"(?<$1>.*)\"); // allowing {param}\n return {\n ...[...routingPath.matchAll((new RegExp(standardRoutingPath, \"g\")))][0].groups\n };\n};\n\nexport const __valid_routings__ = function (routings:TComponentRouting[], routingPath:string):TComponentRouting[] {\n return routings.filter(function (routing) {\n const standardRoutingPath = routing.path.replace(/{(.*?)}/g, \"(?<$1>.*)\");\n return (new RegExp(standardRoutingPath, \"g\")).test(routingPath);\n }).reverse();\n};\nexport const __valid_routing_way__ = (validRoutingWays:string[], routingWay:string):boolean => {\n return validRoutingWays.includes(routingWay);\n};\n", "import { TAsyncLoadCallback } from \"./types/global\";\nimport { Export } from \"./Export\";\nimport { isBrowser } from \"./platform\";\nimport { _top } from \"./top\";\n\nexport const _asyncLoad:any[] = [];\nexport function asyncLoad(callback: TAsyncLoadCallback, args?: any[]): any {\n\n class AsyncCallback {\n func:TAsyncLoadCallback;\n args?:any[];\n constructor(callback: TAsyncLoadCallback, args: any[] = []) {\n this.func = callback;\n this.args = args;\n } \n dispatch() {\n ((this as AsyncCallback).func as Function).apply(this, ...args as [], this);\n }\n }\n _asyncLoad.push((new AsyncCallback(callback, args)) as unknown as never);\n return AsyncCallback;\n}\n\nexport const _fireAsyncLoad = ():void => {\n if (isBrowser){\n document.addEventListener(\"readystatechange\", () => {\n if (document.readyState === \"complete\") {\n // eslint-disable-next-line array-callback-return\n _asyncLoad.map(function (fc) {\n (fc).dispatch.call(fc);\n });\n }\n });\n } else if (typeof _top.global !== \"undefined\") {\n // eslint-disable-next-line array-callback-return\n _asyncLoad.map(function (fc) {\n (fc).dispatch.call(fc);\n });\n }\n };\n\nExport(asyncLoad);", "import { Base64 } from \"./Base64\";\nimport { _DataStringify } from \"./DataStringify\";\nimport { logger } from \"./Logger\";\n\nexport class ComplexStorageCache {\n\n constructor(params: { index: any; load: any; alternate: any; }) {\n let load, alternate;\n const object = params.index;\n if (typeof object !== \"undefined\") {\n load = params.load;\n alternate = params.alternate;\n const cachedObjectID = this.getID(object);\n const cachedResponse = localStorage.getItem(cachedObjectID as string);\n if (this.isEmpty(cachedResponse)) {\n const cachedNewResponse = load.call(null, {\n cachedObjectID,\n cachedResponse,\n \"cache\": this\n });\n this.save(object, cachedNewResponse);\n logger.debug(\"RESPONSE OF {{cachedObjectID}} CACHED\".replace(\"{{cachedObjectID}}\", cachedObjectID as string));\n } else {\n alternate.call(null, {\n cachedObjectID,\n cachedResponse,\n \"cache\": this\n });\n logger.debug(\"RESPONSE OF {{cachedObjectID}} IS ALREADY CACHED \".replace(\"{{cachedObjectID}}\", cachedObjectID as string));\n }\n\n } else {\n throw new Error(\"ComplexStorageCache: index is undefined\");\n }\n return this;\n }\n\n getItem(cachedObjectID: string):any {\n const retrievedObject = localStorage.getItem(cachedObjectID);\n if (!this.isEmpty(retrievedObject)) {\n return JSON.parse(retrievedObject as string);\n } else {\n return null;\n }\n }\n\n\n setItem(cachedObjectID: string, value: any):void {\n localStorage.setItem(cachedObjectID, _DataStringify(value));\n }\n\n isEmpty(object: string | number | null):boolean {\n let r = false;\n switch (true) {\n case (typeof object === \"undefined\"):\n case (typeof object === \"string\" && object === \"\"):\n case (typeof object === \"string\" && object === \"undefined\"):\n case (typeof object === \"number\" && object === 0):\n case (object === null):\n r = true;\n break;\n default:\n r = false;\n }\n return r;\n }\n\n\n getID(object: any):string|undefined {\n let cachedObjectID;\n if (typeof object !== \"undefined\") {\n cachedObjectID = \"cachedObject_\" + Base64.encode(_DataStringify(object).replace(/\\{|\\}|,/g, \"_\"));\n }\n return cachedObjectID;\n }\n\n save(object: any, cachedNewResponse: any):void {\n const cachedObjectID = this.getID(object);\n logger.debug(\"CACHING THE RESPONSE OF {{cachedObjectID}} \".replace(\"{{cachedObjectID}}\", cachedObjectID as string));\n this.setItem(cachedObjectID as string, cachedNewResponse);\n }\n\n getCached(object: any):any {\n const cachedObjectID = this.getID(object);\n return this.getItem(cachedObjectID as string);\n }\n\n clear():void {\n Object.keys(localStorage).filter(function (k) {\n return k.startsWith(\"cachedObject_\");\n }).map(function (c):any {\n localStorage.removeItem(c);\n return c;\n });\n }\n\n}\n", "import { IService, TCacheController } from \"./types/global\";\nimport { asyncLoad } from \"./asyncLoad\";\nimport { ComplexStorageCache } from \"./ComplexStorageCache\";\nimport { _DataStringify } from \"./DataStringify\";\nimport { logger } from \"./Logger\";\nimport { _require_, isBrowser } from \"./platform\";\nimport { _top } from \"./top\";\n\n/**\n * Loads a simple component from a template\n *\n * @author: Jean Machuca \n * @param service a Service object\n */\nexport const serviceLoader = function (service:IService, _async = false):Promise|undefined {\n const _serviceLoaderInBrowser = function (service:IService):Promise {\n var _promise = new Promise(\n function (resolve, reject) {\n\n logger.debug(\"LOADING SERVICE DATA {{DATA}} FROM {{URL}}\".replace(\"{{DATA}}\", _DataStringify(service.data)).replace(\"{{URL}}\", service.url));\n const xhr = new XMLHttpRequest();\n xhr.withCredentials = service.withCredentials;\n const xhrasync = true; // always async because xhr sync is deprecated\n xhr.open(service.method, service.url, xhrasync);\n for (const header in service.headers) {\n try {\n if (typeof service.headers[header] !== \"function\") {\n xhr.setRequestHeader(header, service.headers[header]);\n }\n } catch (e:any) {\n logger.debug(\"Something went wrong when assign the header \" + header);\n logger.debug(`An error ocurred: ${e}`);\n }\n }\n xhr.onload = function () {\n if (xhr.status === 200) {\n const response = xhr.responseText;\n logger.debug(\"Data received {{DATA}}\".replace(\"{{DATA}}\", _DataStringify(response)));\n logger.debug(\"CREATING SERVICE {{NAME}}\".replace(\"{{NAME}}\", service.name));\n service.template = response;\n if (service.cached && (typeof cache !== \"undefined\")) {\n cache.save(service.name, service.template);\n }\n if (typeof service.done === \"function\") {\n var standardResponse = {\n \"request\": xhr,\n service\n };\n service.done.call(service, standardResponse);\n resolve.call(_promise, standardResponse);\n }\n } else {\n if (typeof service.fail === \"function\") {\n var standardResponse = {\n \"request\": xhr,\n service\n };\n service.fail.call(service, standardResponse);\n reject.call(_promise, standardResponse);\n }\n }\n };\n\n const _directLoad = function () {\n logger.debug(\"SENDING THE NORMAL REQUEST \");\n try {\n xhr.send(_DataStringify(service.data));\n } catch (e:any) {\n logger.debug(\"SOMETHING WRONG WITH REQUEST \");\n logger.debug(`An error ocurred: ${e}`);\n reject.call(_promise, {\n request: xhr,\n service\n });\n }\n };\n\n if (service.cached) {\n var cache = new ComplexStorageCache({\n index: service.data,\n load() {\n _directLoad.call(this);\n },\n alternate(cacheController:TCacheController) {\n if (service.method === \"GET\") {\n service.template = cacheController.cache.getCached(service.name);\n if (typeof service.done === \"function\") {\n const standardResponse = {\n \"request\": xhr,\n service\n };\n service.done.call(service, standardResponse);\n resolve.call(_promise, standardResponse);\n }\n } else {\n _directLoad();\n }\n \n }\n });\n (_top as any).lastCache = cache;\n } else {\n _directLoad();\n }\n\n return xhr;\n }\n );\n return _promise;\n };\n\n const _serviceLoaderInNode = function (service:IService) {\n var _promise = new Promise(\n function (resolve, reject) {\n if (typeof URL === \"undefined\") {\n global.URL = (_require_(\"url\")).URL;\n // eslint-disable-next-line no-unused-vars\n const URL = global.URL;\n }\n const serviceURL = new URL(service.url);\n var req;\n service.useHTTP2 = Object.hasOwn(service, \"useHTTP2\") && service.useHTTP2;\n\n\n const captureEvents = function (req:any) {\n logger.debug(\"LOADING SERVICE DATA (non-browser) {{DATA}} FROM {{URL}}\".replace(\"{{DATA}}\", _DataStringify(service.data)).replace(\"{{URL}}\", service.url));\n let dataXML:any;\n const standardResponse = {\n \"http2Client\": client,\n \"request\": req,\n service,\n \"responseHeaders\": null\n };\n\n if (typeof service.data === \"object\" && service.data !== null) {\n if (service.useHTTP2) {\n try {\n logger.debug(\"Sending data...\");\n const buffer = new Buffer(_DataStringify(service.data));\n req.write(buffer);\n } catch (e:any) {\n logger.debug(\"It was not possible to send any data\");\n logger.debug(`An error ocurred: ${e}`);\n }\n }\n }\n\n dataXML = \"\";\n req.on(\"response\", (responseHeaders:any) => {\n logger.debug(\"receiving response...\");\n standardResponse.responseHeaders = responseHeaders;\n /*\n for (const name in responseHeaders) {\n logger.debug(`${name}: ${responseHeaders[name]}`);\n }\n */\n dataXML = \"\";\n });\n req.on(\"data\", (chunk:any) => {\n logger.debug(\"receiving data...\");\n // do something with the data\n dataXML += \"\" + chunk.toString();\n service.template = dataXML;\n });\n if (service.useHTTP2) {\n req.resume();\n }\n req.on(\"end\", () => {\n logger.debug(\"ending call...\");\n service.template = dataXML;\n if (Object.hasOwn(service, \"useHTTP2\") && service.useHTTP2) {\n client.destroy();\n } else {\n req.destroy();\n }\n service.done.call(service, standardResponse);\n resolve.call(_promise, standardResponse);\n });\n if (service.useHTTP2) {\n req.end();\n }\n\n };\n\n try {\n let requestOptions;\n if (service.useHTTP2) {\n logger.debug(\"using http2\");\n const http2 = _require_(\"http2\");\n var client = (http2).connect(serviceURL.origin);\n requestOptions = Object.assign({\n \":method\": service.method,\n \":path\": serviceURL.pathname\n }, service.options);\n requestOptions = Object.assign(requestOptions, service.headers);\n req = client.request(requestOptions);\n req.setEncoding(\"utf8\");\n captureEvents(req);\n } else {\n if (serviceURL.protocol === \"http:\") {\n const http = _require_(\"http\");\n const request = (http).request;\n requestOptions = Object.assign({\n \"url\": service.url,\n headers: service.headers\n }, service.options);\n req = request(service.url);\n captureEvents(req);\n } else if (serviceURL.protocol === \"https:\") {\n const https = _require_(\"https\");\n requestOptions = Object.assign({\n hostname: serviceURL.hostname,\n port: serviceURL.port,\n path: serviceURL.pathname,\n method: service.method,\n headers: service.headers\n }, service.options);\n const _req_ = (https).request(requestOptions, function (req:any) {\n captureEvents(req);\n });\n _req_.end();\n } else {\n const e = \"Protocol not supported: \" + serviceURL.protocol;\n logger.debug(e);\n throw new Error(e);\n }\n }\n\n\n } catch (e:any) {\n logger.debug(e);\n service.fail.call(service, e);\n reject.call(_promise, e);\n\n }\n }).catch( (e:any) => {\n logger.debug(`Something happened when trying to call the service: ${service.name}. Error: ${e}`);\n service.fail.call(service, e);\n });\n return _promise;\n\n };\n\n const _serviceLoaderMockup = function (service:IService) {\n var _promise = new Promise(\n function (resolve) {\n logger.debug(`Calling mockup service ${service.name} ...`);\n const standardResponse = {\n \"request\": null,\n service,\n \"responseHeaders\": service.responseHeaders\n };\n if (typeof service.mockup === \"function\") {\n service.mockup.call(service, standardResponse);\n } else {\n service.done.call(service, standardResponse);\n }\n resolve.call(_promise, standardResponse);\n });\n return _promise;\n };\n const _serviceLoaderLocal = function (service:IService) {\n var _promise = new Promise(\n function (resolve) {\n logger.debug(`Calling local service ${service.name} ...`);\n const standardResponse = {\n \"request\": null,\n service,\n \"responseHeaders\": service.responseHeaders\n };\n if (typeof service.local === \"function\") {\n service.local.call(service, standardResponse);\n } else {\n service.done.call(service, standardResponse);\n }\n resolve.call(_promise, standardResponse);\n });\n return _promise;\n };\n\n let _ret_: Promise;\n switch (service.kind) {\n case \"rest\":\n if (isBrowser) {\n if (typeof _async !== \"undefined\" && _async) {\n _ret_ = asyncLoad(_serviceLoaderInBrowser, [service, _async]);\n } else {\n _ret_ = _serviceLoaderInBrowser(service);\n }\n } else {\n _ret_ = _serviceLoaderInNode(service);\n }\n break;\n case \"mockup\":\n _ret_ = _serviceLoaderMockup(service);\n break;\n case \"local\":\n _ret_ = _serviceLoaderLocal(service);\n break;\n default:\n logger.debug(`The value of the kind property of the service ${service.name} is not valid`);\n _ret_ = Promise.resolve();\n break;\n }\n return _ret_;\n};\n", "export const _tag_filter_ = \"quick-component:not([loaded]),component:not([loaded])\";\n", "import { IComponent, TCacheController } from \"./types/global\";\nimport { asyncLoad } from \"./asyncLoad\";\nimport { ComplexStorageCache } from \"./ComplexStorageCache\";\nimport { _DataStringify } from \"./DataStringify\";\nimport { logger } from \"./Logger\";\nimport { is_phonegap, isBrowser } from \"./platform\";\nimport { _top } from \"./top\";\n\n/**\n * Loads a simple component from a template\n *\n * @author: Jean Machuca \n * @param component a Component object\n */\nexport const componentLoader = function (component: IComponent, _async: boolean):Promise {\n let __promise__: Promise;\n const _componentLoaderInBrowser = function (component: IComponent) {\n __promise__ = new Promise(function (resolve, reject) {\n const _promise = component.__promise__;\n const container = (Object.hasOwn(component, \"container\") && typeof component.container !== \"undefined\" && component.container !== null) ? (component.container) : (component.body);\n if (container !== null) {\n const _feedComponent_ = function (component: { feedComponent: () => void; }) {\n component.feedComponent();\n const standardResponse = {\n \"request\": xhr,\n component\n };\n resolve.call(_promise, standardResponse);\n };\n logger.debug(\"LOADING COMPONENT DATA {{DATA}} FROM {{URL}}\".replace(\"{{DATA}}\", _DataStringify(component.data)).replace(\"{{URL}}\", component.url));\n\n const _componentLoaded = function () {\n const successStatus = (is_file) ? (0) : (200);\n if (xhr.status === successStatus) {\n const response = xhr.responseText;\n logger.debug(\"Data received {{DATA}}\".replace(\"{{DATA}}\", _DataStringify(response)));\n logger.debug(\"CREATING COMPONENT {{NAME}}\".replace(\"{{NAME}}\", component.name));\n component.template = response;\n if (component.cached && (typeof cache !== \"undefined\")) {\n cache.save(component.name, component.template);\n }\n _feedComponent_(component);\n } else {\n const standardResponse = {\n \"request\": xhr,\n component\n };\n reject.call(_promise, standardResponse);\n\n }\n };\n if (typeof component.template === \"string\" && component.template !== \"\") {\n // component already has a template it does not need to be reloaded\n _feedComponent_(component);\n } else {\n var is_file = !!(component.url.startsWith(\"file:\"));\n var xhr = new XMLHttpRequest();\n if (!is_file) {\n try {\n logger.debug(\"Calling the url of component in async mode.\");\n xhr.open(component.method, component.url, true);\n } catch (e:any) {\n logger.debug(`An error ocurred: ${e}.`);\n logger.debug(\"Last try has failed... The component cannot be loaded.\");\n }\n } else {\n if (\"fetch\" in _top) {\n logger.debug(\"I can use fetch...\");\n logger.debug(\"It is a file to be loaded, so I will try to use fetch\");\n fetch(component.url).then(response => {\n logger.debug(\"I got a response from fetch, so I'll feed the component\");\n response.text().then(text => {\n component.template = text;\n _feedComponent_(component);\n })\n .catch((e:any) => {throw new Error (`An error ocurred: ${e}`);});\n }).catch ((e:any) => {throw new Error (`An error ocurred: ${e}`);});\n }\n }\n if (!is_phonegap && !is_file) {\n xhr.setRequestHeader(\"Content-Type\", \"text/html\");\n }\n if (!is_file) {\n xhr.onload = _componentLoaded;\n }\n const _directLoad = function (is_file: boolean) {\n is_file = !((typeof is_file === \"undefined\" || !is_file));\n logger.debug(\"SENDING THE NORMAL REQUEST \");\n if (is_file) {\n if (!(\"fetch\" in _top)) {\n logger.debug(\"I have to try to load the file using xhr... \");\n xhr.send(null);\n if (xhr.status === XMLHttpRequest.DONE) {\n _componentLoaded();\n }\n }\n } else {\n logger.debug(\"Trying to send the data to the component... \");\n xhr.send(_DataStringify(component.data));\n }\n };\n\n if (component.cached && (!is_file)) {\n logger.debug(\"USING CACHE FOR COMPONENT: \" + component.name);\n var cache = new ComplexStorageCache({\n index: component.cacheIndex,\n load() {\n _directLoad.call(this, is_file);\n },\n alternate(cacheController: TCacheController) {\n if (component.method === \"GET\") {\n component.template = cacheController.cache.getCached(component.cacheIndex);\n _feedComponent_.call(this, component);\n } else {\n _directLoad.call(this, is_file);\n }\n \n }\n });\n (_top as any).lastCache = cache;\n } else {\n logger.debug(\"NOT USING CACHE FOR COMPONENT: \" + component.name);\n _directLoad(is_file);\n }\n\n }\n } else {\n logger.debug(\"CONTAINER DOESNT EXIST\");\n }\n });\n __promise__.then(function (standardResponse) {\n return component.__done__().then(function () {\n let _ret_;\n if (typeof component.done === \"function\") {\n _ret_ = component.done.call(component, standardResponse);\n }\n return Promise.resolve(_ret_);\n });\n }, function (standardResponse) {\n if (typeof component.fail === \"function\") {\n component.fail.call(component, standardResponse)\n .catch ((e:any)=> {throw new Error (`${e}`);});\n }\n return Promise.reject(new Error (\"An error ocurred\"));\n }).catch(function (e:any) {\n logger.debug(\"Something wrong loading the component\");\n throw new Error (`An error ocurred: ${e}`);\n });\n return __promise__;\n };\n const _componentLoaderInNode = function (component: IComponent) {\n __promise__ = new Promise(function (resolve, reject) {\n const _promise = __promise__;\n const _feedComponent_ = function (component: IComponent) {\n component.feedComponent()\n .catch ((e:any) => {\n throw new Error (`An error ocurred trying to feed the component: ${component.name}. Error: ${e}`);\n });\n const standardResponse = {\n \"request\": null,\n component\n };\n resolve.call(_promise, standardResponse);\n };\n logger.debug(\"LOADING COMPONENT DATA {{DATA}} FROM {{URL}}\".replace(\"{{DATA}}\", _DataStringify(component.data)).replace(\"{{URL}}\", component.url));\n\n const _componentLoaded = function (err: any, responseText: { toString: () => any; }) {\n if (!err) {\n const response = responseText.toString();\n logger.debug(\"Data received {{DATA}}\".replace(\"{{DATA}}\", _DataStringify(response)));\n logger.debug(\"CREATING COMPONENT {{NAME}}\".replace(\"{{NAME}}\", component.name));\n component.template = response;\n if (component.cached && (typeof cache !== \"undefined\")) {\n cache.save(component.name, component.template);\n }\n _feedComponent_(component);\n } else {\n const standardResponse = {\n \"request\": null,\n component\n };\n reject.call(_promise, standardResponse);\n }\n };\n if (typeof component.template === \"string\" && component.template !== \"\") {\n // component already has a template it does not need to be reloaded\n _feedComponent_(component);\n } else {\n logger.debug(\"Loading the component as a local file in server...\");\n const _directLoad = function () {\n // eslint-disable-next-line @typescript-eslint/no-require-imports\n const {readFile} = require(\"node:fs\");\n logger.debug(\"SENDING THE NORMAL REQUEST \");\n readFile(component.url, _componentLoaded);\n };\n\n if (component.cached) {\n logger.debug(\"USING CACHE FOR COMPONENT: \" + component.name);\n var cache = new ComplexStorageCache({\n index: component.cacheIndex,\n load() {\n _directLoad();\n },\n alternate(cacheController: TCacheController) {\n if (component.method === \"GET\") {\n component.template = cacheController.cache.getCached(component.cacheIndex);\n _feedComponent_.call(this, component);\n } else {\n _directLoad.call(this);\n }\n \n }\n });\n (_top as any).lastCache = cache;\n } else {\n logger.debug(\"NOT USING CACHE FOR COMPONENT: \" + component.name);\n _directLoad();\n }\n\n }\n });\n __promise__.then(function (standardResponse) {\n return component.__done__().then(function () {\n let _ret_;\n if (typeof component.done === \"function\") {\n _ret_ = component.done.call(component, standardResponse);\n }\n return Promise.resolve(_ret_);\n });\n }, function (standardResponse) {\n if (typeof component.fail === \"function\") {\n component.fail.call(component, standardResponse)\n .catch((e:any) => {throw new Error (`An error ocurred: ${e}`);});\n }\n return Promise.reject(new Error (\"An error ocurred.\"));\n }).catch(function (e) {\n logger.debug(`Something wrong loading the component: ${e}`);\n });\n return __promise__;\n };\n\n let _ret_;\n if (isBrowser) {\n if (typeof _async !== \"undefined\" && _async) {\n _ret_ = asyncLoad(_componentLoaderInBrowser, [component, _async]);\n } else {\n _ret_ = _componentLoaderInBrowser(component);\n }\n } else {\n _ret_ = _componentLoaderInNode(component);\n }\n return _ret_ as Promise;\n};", "import { Base64 } from \"./Base64\";\nimport { _basePath_ } from \"./basePath\";\nimport { _Cast } from \"./Cast\";\nimport { ClassFactory } from \"./ClassFactory\";\nimport { _buildComponentsFromElements_, ComponentURI } from \"./ComponentFactory\";\nimport { _DataStringify } from \"./DataStringify\";\nimport { _domain_ } from \"./domain\";\nimport { _DOMCreateElement } from \"./DOMCreateElement\";\nimport { __getType__ } from \"./getType\";\nimport { InheritClass } from \"./InheritClass\";\nimport { _methods_, _protected_code_ } from \"./introspection\";\nimport { is_a } from \"./is_a\";\nimport { isQCObjects_Object } from \"./isQCObjects\";\nimport { logger } from \"./Logger\";\nimport { New } from \"./New\";\nimport { Package } from \"./Package\";\nimport { isBrowser } from \"./platform\";\nimport { Processor } from \"./Processor\";\nimport { __routing_params__, __valid_routing_way__, __valid_routings__ } from \"./routings\";\nimport { _top, componentsStack } from \"./top\";\nimport { CONFIG } from \"./CONFIG\";\nimport { serviceLoader } from \"./serviceLoader\";\nimport { _tag_filter_ } from \"./tag_filter\";\nimport { componentLoader } from \"./componentLoader\";\nimport { IComponent, IController, IEffect, IProcessor, IQCObjectsElement, IQCObjectsShadowedElement, IView, TBody, TComponentDoneResponse, TComponentParams, TComponentRouting, TComponentRoutings } from \"./types/global\";\n\nexport class Component extends InheritClass implements IComponent {\n static shadowed: boolean | undefined = false;\n static cached: any = true;\n [key: string]: any;\n name!: string;\n templateURI!: string;\n url!: string;\n tplsource!: string;\n tplextension!: string;\n template!: string;\n validRoutingWays: string[] = [\"pathname\", \"hash\", \"search\"];\n basePath:string = _basePath_;\n domain:string = _domain_;\n templateHandler = \"DefaultTemplateHandler\";\n processorHandler?: IProcessor;\n routingWay: string | null = null;\n routingNodes: (IQCObjectsElement | HTMLElement)[] = [];\n routings: TComponentRoutings = [];\n routingPath = \"\";\n routingPaths: string[] = [];\n _componentHelpers: any[] = [];\n subcomponents: any[] = [];\n splashScreenComponent?: IComponent = undefined;\n controller?: IController = undefined;\n routingController?: IController = undefined;\n\n view?: IView = undefined;\n effect?: IEffect = undefined;\n effectClass!: string;\n method = \"GET\";\n cached?: boolean = true;\n __promise__?: Promise | null = null;\n data!: any;\n __namespace?: string = undefined;\n protected _parsedAssignmentText!: string;\n protected __shadowRoot: any;\n protected _serviceClassName: string | null = null;\n enableServiceClass?: boolean | undefined = true;\n serviceInstance: any;\n serviceData: any;\n shadowed?: boolean = false;\n container: any;\n innerHTML: any;\n reload: any;\n static subcomponents: any;\n assignRoutingParams?: boolean = true;\n responseTo?: string | undefined;\n static responseTo?: string | undefined;\n\n constructor({\n __parent__,\n templateURI = \"\",\n template,\n tplsource = \"default\",\n tplextension,\n url = \"\",\n name = \"\",\n method = \"GET\",\n data = {},\n reload = false,\n shadowed = false,\n cached = true,\n enableServiceClass,\n assignRoutingParams = true,\n _body = _DOMCreateElement(\"div\"),\n __promise__ = null,\n __shadowRoot,\n body,\n shadowRoot,\n splashScreenComponent,\n controller,\n view\n }: TComponentParams) {\n if (arguments.length < 1) {\n throw Error(\"No arguments in component. You must at least give one argument.\");\n }\n super({\n __parent__,\n templateURI,\n template,\n tplsource,\n tplextension,\n url,\n name,\n method,\n data,\n reload,\n shadowed,\n cached,\n enableServiceClass,\n assignRoutingParams,\n _body,\n __promise__,\n __shadowRoot,\n body,\n shadowRoot,\n splashScreenComponent,\n controller,\n view\n });\n const self = this;\n\n if (typeof name !== \"undefined\") {\n self.name = name;\n }\n\n if (typeof self.name === \"undefined\" && typeof name === \"undefined\") {\n logger.warn(\"A name is not defined for \" + __getType__(self));\n }\n\n self.routingWay = CONFIG.get(\"routingWay\");\n\n self.processorHandler = new Processor({\n component: self\n });\n\n /* assign body data attributes to data */\n self.data = (typeof self.data === \"undefined\" || self.data === null) ? ({}) : (self.data);\n self.data = Object.assign(self.data, self.dataAttributes);\n\n self.createServiceInstance()\n .then(() => {\n if (typeof self.__new__ === \"function\") {\n self.__new__(self);\n }\n\n self._generateRoutingPaths(self.body)\n .then(function () {\n self._reroute_()\n .then(function () {\n return self.rebuild()\n .then(function () {\n logger.info(`Component._new_ The component ${self.name} was built successfully!`);\n }).catch(function (standardResponse) {\n logger.warn(`Component._new_ Something went wrong building the component ${self.name}`);\n console.error(`Component._new_ Something went wrong building the component ${self.name}`, standardResponse);\n });\n }).catch((e: any) => {\n throw Error(`Unexpected error ${e}`);\n });\n }).catch((e: any) => {\n throw Error(`Unexpected error ${e}`);\n });\n\n }).catch((e: any) => {\n throw Error(`Unexpected error. ${e}`);\n });\n\n }\n\n set cacheIndex(value) {\n // readonly\n logger.debug(\"[cacheIndex] This property is readonly\");\n }\n\n get cacheIndex():string {\n const self = this;\n const __routing_path__ = _DataStringify(self.routingPath);\n return Base64.encode(self.name + __routing_path__);\n }\n\n set parsedAssignmentText(value: string) {\n // readonly\n logger.debug(\"[parsedAssignmentText] This property is readonly\");\n }\n\n get parsedAssignmentText(): string {\n const self = this;\n self._parsedAssignmentText = self.parseTemplate(self.template);\n if (typeof self._parsedAssignmentText === \"undefined\") {\n throw Error(`[Component][${this.name}][parsedAssignmentText] Could not generate content!`);\n }\n return self._parsedAssignmentText;\n }\n\n\n set shadowRoot(value: IQCObjectsShadowedElement) {\n const self = this;\n if (typeof self.__shadowRoot === \"undefined\") {\n self.__shadowRoot = value;\n } else {\n logger.debug(\"[shadowRoot] This property can only be assigned once!\");\n }\n }\n\n get shadowRoot(): IQCObjectsShadowedElement {\n const self = this;\n return self.__shadowRoot as IQCObjectsShadowedElement;\n }\n\n\n set routingSelected(value: TComponentRouting[]) {\n logger.debug(\"[routingSelected] This is a read-only property of the component\");\n }\n\n get routingSelected(): TComponentRouting[] {\n const self = this;\n return __valid_routings__(self.routings, self.routingPath);\n }\n\n set routingParams(value) {\n logger.debug(\"[routingParams] This is a read-only property of the component\");\n }\n\n get routingParams(): object {\n const component = this;\n return [{}].concat(component.routingSelected.map(function (routing: any) {\n return __routing_params__(routing, component.routingPath);\n })).reduce(function (accumulator, colData) {\n return Object.assign(accumulator, colData);\n });\n }\n\n\n set serviceClassName(_serviceClassName: string) {\n this._serviceClassName = _serviceClassName;\n }\n\n get serviceClassName(): string | null {\n let _serviceClassName: string | null = \"\";\n if (isBrowser) {\n _serviceClassName = ((this.body as HTMLElement).getAttribute(\"serviceClass\") !== null) ? ((this.body as HTMLElement).getAttribute(\"serviceClass\")) : (\n this._serviceClassName\n );\n } else {\n _serviceClassName = this._serviceClassName;\n }\n return _serviceClassName;\n }\n\n protected get responseToData(): boolean {\n let _response_to_data_: boolean = false;\n if (isBrowser) {\n const responseToAttr = (this.body as HTMLElement).getAttribute(\"response-to\");\n _response_to_data_ = responseToAttr === \"data\" || this.responseTo === \"data\";\n } else {\n _response_to_data_ = this.responseTo === \"data\";\n }\n return _response_to_data_;\n }\n\n protected get responseToTemplate(): boolean {\n let _response_to_template_: boolean = false;\n if (isBrowser) {\n const responseToAttr = (this.body as HTMLElement).getAttribute(\"response-to\");\n _response_to_template_ = responseToAttr === \"template\" || this.responseTo === \"template\";\n } else {\n _response_to_template_ = this.responseTo === \"template\";\n }\n return _response_to_template_;\n }\n\n createServiceInstance(): Promise {\n const component = this;\n let data = this.data;\n let __serviceClass: any;\n const __classDefinition = component.getClass().__definition;\n const _serviceClassName = component.serviceClassName;\n\n return new Promise(function (resolve, reject) {\n /* __enable_service_class__ = true by default */\n const __enable_service_class__ = component.enableServiceClass;\n let _response_to_data_ = component.responseToData;\n let _response_to_template_ = component.responseToTemplate;\n\n if (__enable_service_class__ && _serviceClassName !== null) {\n __serviceClass = ClassFactory(_serviceClassName);\n }\n if (!_response_to_data_ && __classDefinition && Object.hasOwn(__classDefinition, \"responseTo\")) {\n _response_to_data_ = (__classDefinition.responseTo === \"data\");\n } else if (!_response_to_data_ && Object.hasOwn(ClassFactory(\"Component\"), \"responseTo\")) {\n _response_to_data_ = ((ClassFactory(\"Component\") as Component).responseTo === \"data\");\n }\n if (!_response_to_template_ && __classDefinition && Object.hasOwn(__classDefinition, \"responseTo\")) {\n _response_to_template_ = (__classDefinition.responseTo === \"template\");\n } else if (!_response_to_template_ && Object.hasOwn(ClassFactory(\"Component\"), \"responseTo\")) {\n _response_to_template_ = ((ClassFactory(\"Component\") as Component).responseTo === \"template\");\n }\n\n if (typeof __serviceClass !== \"undefined\" &&\n (typeof __enable_service_class__ !== \"undefined\" &&\n __enable_service_class__ === true) &&\n (_response_to_data_ || _response_to_template_)\n ) {\n logger.info(\"Loading service \" + _serviceClassName);\n const serviceInstance = New(__serviceClass, {\n data\n });\n (serviceLoader(serviceInstance) as Promise)?.then(function ({\n service\n }: { request: any, service: any }) {\n let serviceResponse;\n if (typeof service.JSONresponse !== \"undefined\" && service.JSONresponse !== null) {\n serviceResponse = service.JSONresponse;\n } else {\n serviceResponse = service.template;\n }\n if (_response_to_data_) {\n if (typeof data === \"object\" && typeof serviceResponse === \"object\") {\n data = Object.assign(data, serviceResponse);\n } else {\n data = serviceResponse;\n }\n component.data = data;\n }\n component.serviceInstance = serviceInstance;\n component.serviceData = data;\n\n if (_response_to_template_) {\n component.template = serviceResponse;\n }\n resolve(serviceResponse);\n }, function (rejectedResponse: Error) {\n logger.debug(`Service loading rejected for ${_serviceClassName} in ${component.name}`);\n reject(rejectedResponse);\n }).catch(function (e: any) {\n logger.debug(\"Something went wroing while trying to load the service \" + _serviceClassName);\n throw Error(`Error loading ${_serviceClassName} for ${component.name}. Detail: ${e}`);\n });\n } else {\n resolve(null);\n }\n });\n }\n\n _bindroute_():void {\n const _component_ = this;\n if (!(_component_ as any)._bindroute_.loaded) {\n if (isBrowser) {\n\n (_component_.hostElements(\"a\") as unknown as HTMLAnchorElement[]).map(function (a: HTMLAnchorElement) {\n (a as any).oldclick = a.onclick;\n a.onclick = function (e) {\n let _ret_ = true;\n if (!_top.global.get(\"routingPaths\")) {\n _top.global.set(\"routingPaths\", []);\n }\n const routingWay = CONFIG.get(\"routingWay\");\n const routingPath = (e.target as any)[routingWay];\n if (_top.global.get(\"routingPaths\").includes(routingPath) &&\n (e.target as any)[routingWay] !== (location as any)[routingWay] &&\n (e.target as HTMLAnchorElement).href !== document.location.href\n ) {\n logger.debug(\"A ROUTING WAS FOUND: \" + routingPath);\n window.history.pushState({\n href: (e.target as HTMLAnchorElement).href\n }, (e?.target as HTMLAnchorElement)?.href, (e.target as HTMLAnchorElement).href);\n Component.route().catch((e) => { throw Error(`Unexpected error: ${e}`); });\n _ret_ = false;\n } else {\n logger.debug(\"NO ROUTING FOUND FOR: \" + routingPath);\n }\n if (typeof (e.target as any).oldclick !== \"undefined\" && typeof (e.target as any).oldclick === \"function\") {\n (e.target as any).oldclick.call(e.target, e);\n }\n return _ret_;\n };\n return null;\n });\n\n } else {\n // not yet implemented.\n }\n (_component_ as any)._bindroute_.loaded = true;\n } else {\n logger.debug(`Routes already bound to popstate events for ${_component_.name}`);\n }\n\n }\n\n done(standardResponse?: TComponentDoneResponse): Promise {\n const _ret_ = new Promise((resolve) => {\n if (typeof standardResponse !== \"undefined\") {\n const { request, component } = standardResponse;\n resolve({ request, component });\n } else {\n resolve({ request: undefined, component: undefined });\n }\n });\n return _ret_;\n }\n\n createControllerInstance(): Promise<{ component: IComponent, controller: IController }> {\n let _Controller: any;\n if (isBrowser) {\n if (typeof this.body === \"undefined\") {\n throw new Error(\"The component has no body\");\n }\n var controllerName = (this.body as HTMLElement).getAttribute(\"controllerClass\");\n if (!controllerName) {\n controllerName = \"Controller\";\n }\n _Controller = ClassFactory(controllerName);\n if (typeof _Controller !== \"undefined\") {\n this.controller = New(_Controller, {\n component: this\n });\n }\n\n }\n\n return new Promise((resolve, reject) => {\n if (isBrowser) {\n if (typeof _Controller !== \"undefined\" && typeof this.controller !== \"undefined\") {\n if (typeof (this.controller).done === \"function\") {\n try {\n this.controller.done.call(this.controller);\n } catch (e: any) {\n throw Error(e);\n }\n } else {\n logger.debug(`${controllerName} does not have a done() method.`);\n reject(new Error(`${controllerName} does not have a done() method.`));\n }\n if (typeof this.controller.createRoutingController === \"function\") {\n this.controller.createRoutingController.call(this.controller);\n } else {\n logger.debug(`${controllerName} does not have a createRoutingController() method.`);\n }\n }\n }\n resolve({ component: this, controller: this.controller as IController });\n });\n }\n\n createEffectInstance(): Promise<{ component: Component, effect: IEffect }> {\n const _component_ = this;\n return new Promise(function (resolve) {\n if (isBrowser) {\n const effectClassName = (_component_.body as HTMLElement)?.getAttribute(\"effectClass\");\n let applyEffectTo = (_component_.body as HTMLElement)?.getAttribute(\"apply-effect-to\");\n applyEffectTo = (applyEffectTo !== null) ? (applyEffectTo) : (\"load\");\n if (effectClassName !== null && applyEffectTo === \"observe\") {\n _component_.applyObserveTransitionEffect(effectClassName);\n } else if (effectClassName !== null && applyEffectTo === \"load\") {\n _component_.applyTransitionEffect(effectClassName);\n }\n }\n resolve({ component: _component_, effect: _component_.effect as IEffect });\n });\n }\n\n createViewInstance(): Promise<{ component: Component, view: IView }> {\n const _component_ = this;\n return new Promise(function (resolve) {\n const viewName = (isBrowser) ? ((_component_.body as HTMLElement).getAttribute(\"viewClass\")) : (null);\n if (viewName !== null) {\n const _View = ClassFactory(viewName);\n if (typeof _View !== \"undefined\") {\n _component_.view = New(_View, {\n component: _component_\n }); // Initializes the main view for the component\n if (Object.hasOwn(_component_.view as object, \"done\") && typeof _component_.view?.done === \"function\") {\n _component_.view?.done.call(_component_.view);\n }\n }\n\n }\n resolve({ component: _component_, view: _component_.view as IView });\n\n });\n }\n\n __done__(): Promise {\n const _component_ = this;\n const componentDone = function () {\n if (typeof _component_ === \"undefined\") {\n throw new Error(\"componentDone() has lost its context\");\n }\n if (typeof _component_.body === \"undefined\") {\n throw new Error(\"The component has no body\");\n }\n\n (async () => {\n await _component_.createViewInstance();\n await _component_.createControllerInstance();\n await _component_.createEffectInstance();\n })()\n .catch((e: any) => {\n throw new Error(`Unknown error ${e}.`);\n });\n\n logger.debug(`Trying to run component helpers for ${_component_.name}...`);\n try {\n _component_.runComponentHelpers();\n logger.debug(`Component helpers for ${_component_.name} executed.`);\n } catch (e: any) {\n logger.debug(`Component helpers for ${_component_.name} could not be executed.`);\n throw Error(e);\n }\n\n _component_.subcomponents = _component_.__buildSubComponents__();\n\n _component_._bindroute_();\n if (isBrowser) {\n (_component_.body as HTMLElement).setAttribute(\"loaded\", \"true\");\n }\n };\n\n return new Promise(function (resolve, reject) {\n try {\n resolve(componentDone.call(_component_));\n } catch (e: any) {\n reject(new Error(e));\n }\n });\n\n }\n\n hostElements(tagFilter: string): (IQCObjectsElement | HTMLElement | IQCObjectsShadowedElement)[] {\n const _component_ = this;\n let elementList: (IQCObjectsElement | HTMLElement | IQCObjectsShadowedElement)[] = [];\n if (isBrowser) {\n elementList = (_component_.shadowed && (typeof _component_.shadowRoot !== \"undefined\")) ? (\n _component_.shadowRoot.subelements(tagFilter) as IQCObjectsShadowedElement[]\n ) : (\n (_component_.body as IQCObjectsElement).subelements(tagFilter)\n );\n\n }\n return elementList;\n }\n\n get subtags(): (HTMLElement | IQCObjectsElement | IQCObjectsShadowedElement)[] {\n const _component_ = this;\n const tagFilter = _tag_filter_;\n return _component_.hostElements(tagFilter);\n }\n\n get bodyAttributes():any {\n const _component_ = this;\n const c = _component_.body;\n return (isBrowser) ? ([...(c as HTMLElement).getAttributeNames()].map(a => { return { [a]: (c as HTMLElement).getAttribute(a) }; }).reduce((accumulator, colData) => { return Object.assign(accumulator, colData); })) : ({});\n }\n\n get dataAttributes():any {\n const _component_ = this;\n const c = _component_.body;\n return (isBrowser) ? ([{}].concat([...(c as HTMLElement).getAttributeNames()].filter(n => n.startsWith(\"data-\")).map(a => { return { [a.split(\"-\")[1]]: (c as HTMLElement).getAttribute(a) }; })).reduce((accumulator, colData) => { return Object.assign(accumulator, colData); })) : ({});\n }\n\n __buildSubComponents__(rebuildObjects = false): any {\n const _component_: Component = this as Component;\n let elementList = _component_.subtags;\n if (!rebuildObjects) {\n elementList = (elementList as HTMLElement[]).filter((t: HTMLElement) => t.getAttribute(\"loaded\") !== \"true\") as unknown[] as IQCObjectsElement[];\n }\n if ((typeof _component_ !== \"undefined\") || (_component_ as Component).subcomponents.length < 1) {\n _component_.subcomponents = _buildComponentsFromElements_(elementList as HTMLElement[], _component_);\n }\n return _component_.subcomponents;\n }\n\n fail(standardResponse: { error: any; component: Component; }): Promise<{ error: any; component: Component; }> {\n const _ret_ = new Promise<{ error: any; component: Component; }>((resolve, reject) => {\n if (typeof standardResponse !== \"undefined\") {\n const { error, component } = standardResponse;\n resolve({ error, component });\n } else {\n reject(new Error(\" Unknown error.\"));\n }\n });\n return _ret_;\n }\n\n set(key: string, value: any):void {\n this[key] = value;\n }\n\n get(key: string, _defaultValue?: string): any {\n return this[key] || _defaultValue;\n }\n\n feedComponent(): Promise {\n const _component_ = this;\n logger.debug(`[Component][${this.name}][feedComponent] start feeding component...`);\n const _feedComponent_InBrowser = function (_component_: Component): any {\n if (typeof _component_.container === \"undefined\" && typeof _component_.body === \"undefined\") {\n logger.warn(\"COMPONENT {{NAME}} has an undefined container and body\".replace(\"{{NAME}}\", _component_.name));\n return;\n }\n const container = (typeof _component_.container === \"undefined\" || _component_.container === null) ? (_component_.body) : (_component_.container);\n const parsedAssignmentText = _component_.parsedAssignmentText;\n _component_.innerHTML = parsedAssignmentText;\n if (_component_.shadowed) {\n logger.debug(\"COMPONENT {{NAME}} is shadowed\".replace(\"{{NAME}}\", _component_.name));\n logger.debug(\"Preparing slots for Shadowed COMPONENT {{NAME}}\".replace(\"{{NAME}}\", _component_.name));\n const tmp_shadowContainer = _DOMCreateElement(\"div\");\n container.subelements(\"[slot]\").map(\n (c: { parentElement: any; }): any => {\n if (c.parentElement === container) {\n tmp_shadowContainer.appendChild(c as any);\n }\n return c;\n });\n logger.debug(\"Creating shadowedContainer for COMPONENT {{NAME}}\".replace(\"{{NAME}}\", _component_.name));\n const shadowContainer = _DOMCreateElement(\"div\");\n shadowContainer.classList.add(\"shadowHost\");\n try {\n _component_.shadowRoot = shadowContainer.attachShadow({\n mode: \"open\"\n }) as IQCObjectsShadowedElement;\n } catch (e: any) {\n logger.debug(`An error ocurred: ${e}.`);\n try {\n logger.debug(\"Shadowed COMPONENT {{NAME}} is repeated\".replace(\"{{NAME}}\", _component_.name));\n _component_.shadowRoot = shadowContainer.shadowRoot as IQCObjectsShadowedElement;\n } catch (e: any) {\n logger.debug(`An error ocurred: ${e}.`);\n logger.warn(\"Shadowed COMPONENT {{NAME}} is not allowed on this browser\".replace(\"{{NAME}}\", _component_.name));\n }\n }\n if (typeof _component_.shadowRoot !== \"undefined\" && _component_.shadowRoot !== null) {\n if (_component_.reload) {\n logger.debug(\"FORCED RELOADING OF CONTAINER FOR Shadowed COMPONENT {{NAME}}\".replace(\"{{NAME}}\", _component_.name));\n if (shadowContainer !== null && shadowContainer.shadowRoot !== null) {\n shadowContainer.shadowRoot.innerHTML = _component_.innerHTML;\n }\n } else {\n tmp_shadowContainer.innerHTML = _component_.parseTemplate(tmp_shadowContainer.innerHTML);\n logger.debug(\"ADDING Shadowed COMPONENT {{NAME}} \".replace(\"{{NAME}}\", _component_.name));\n if (shadowContainer !== null && shadowContainer.shadowRoot !== null) {\n shadowContainer.shadowRoot.innerHTML += _component_.innerHTML;\n }\n }\n logger.debug(\"ADDING Slots to Shadowed COMPONENT {{NAME}} \".replace(\"{{NAME}}\", _component_.name));\n shadowContainer.innerHTML += tmp_shadowContainer.innerHTML;\n logger.debug(\"APPENDING Shadowed COMPONENT {{NAME}} to Container \".replace(\"{{NAME}}\", _component_.name));\n const qs = container.querySelector(\".shadowHost\");\n if (!(typeof qs !== \"undefined\" && qs !== null)) {\n container.appendChild(shadowContainer);\n } else {\n logger.debug(\"Shadowed Container for COMPONENT {{NAME}} is already present in the tree \".replace(\"{{NAME}}\", _component_.name));\n if (_component_.shadowRoot !== null && shadowContainer.shadowRoot !== null) {\n _component_.shadowRoot.innerHTML = shadowContainer.shadowRoot.innerHTML;\n }\n }\n } else {\n logger.warn(\"Shadowed COMPONENT {{NAME}} is bad configured\".replace(\"{{NAME}}\", _component_.name));\n }\n } else {\n if (_component_.reload) {\n logger.debug(\"FORCED RELOADING OF CONTAINER FOR COMPONENT {{NAME}}\".replace(\"{{NAME}}\", _component_.name));\n container.innerHTML = _component_.innerHTML;\n } else if (container && _component_) {\n logger.debug(\"ADDING COMPONENT {{NAME}} \".replace(\"{{NAME}}\", _component_.name));\n container.innerHTML += _component_.innerHTML;\n } else {\n logger.warn(\"COMPONENT {{NAME}} is not added to the DOM\".replace(\"{{NAME}}\", _component_.name));\n }\n }\n\n };\n\n const _feedComponent_InNode = function (_component_: Component): any {\n const parsedAssignmentText = _component_.parsedAssignmentText;\n _component_.innerHTML = parsedAssignmentText;\n };\n\n let _ret_;\n if (!is_a(_component_, \"Component\")) {\n logger.warn(\"Trying to feed a non component object\");\n return Promise.reject(new Error(`Trying to feed a non component object ${typeof _component_}`));\n }\n return new Promise((resolve, reject) => {\n if (isBrowser) {\n try {\n _ret_ = _feedComponent_InBrowser(_component_);\n resolve(_ret_);\n } catch (e: any) {\n reject(new Error(e));\n }\n } else {\n try {\n _ret_ = _feedComponent_InNode(_component_);\n resolve(_ret_);\n } catch (e: any) {\n reject(new Error(e));\n }\n\n }\n\n });\n }\n\n rebuild(): Promise<{ request?: XMLHttpRequest, component: Component }> {\n const _component = this as Component;\n var _promise = new Promise<{ request?: XMLHttpRequest, component: Component }>(function (resolve, reject) {\n if (typeof _component === \"undefined\" || _component === null) {\n reject(new Error(\"Component is undefined\"));\n }\n if (isQCObjects_Object(_component) && is_a(_component, \"Component\")) {\n switch (true) {\n case (_component.get(\"tplsource\") === \"none\"):\n logger.debug(\"Component \" + _component.name + \" has specified template-source=none, so no template load was done\");\n var standardResponse = {\n request: undefined,\n component: _component\n };\n _component.__done__().then(function () {\n if (typeof _component.done === \"function\") {\n _component.done.call(_component, standardResponse)\n .catch((e: any) => {\n logger.debug(`It was an error while calling done() in ${_component.name}: ${e}`);\n });\n }\n resolve.call(_promise, standardResponse);\n }, function () {\n reject.call(_promise, standardResponse);\n });\n break;\n case (_component.get(\"tplsource\") === \"inline\"):\n logger.debug(\"Component \" + _component.name + \" has specified template-source=inline, so it is assumed that template is already declared\");\n (async (_component) => {\n await _component.feedComponent.bind(_component)();\n })(_component)\n .catch((e: any) => {\n logger.debug(`It was not possible to feed the component ${_component.name}: ${e}`);\n });\n var standardResponse = {\n request: undefined,\n component: _component\n };\n _component.__done__().then(async () => {\n if (typeof _component.done === \"function\") {\n await _component.done(standardResponse);\n }\n resolve.call(_promise, standardResponse);\n }, function () {\n reject.call(_promise, standardResponse);\n });\n break;\n case (_component.get(\"tplsource\") === \"default\" &&\n _component.get(\"templateURI\") !== \"\"):\n _component.set(\"url\", _component.get(\"basePath\") + _component.get(\"templateURI\"));\n (componentLoader(_component, false))?.then(\n function (standardResponse: any) {\n resolve.call(_promise, standardResponse);\n },\n function (standardResponse: any) {\n reject.call(_promise, standardResponse);\n });\n break;\n case (_component.get(\"tplsource\") === \"external\" &&\n _component.get(\"templateURI\") !== \"\"):\n _component.set(\"url\", _component.get(\"templateURI\"));\n (componentLoader(_component, false)).then(\n function (standardResponse: any) {\n resolve.call(_promise, standardResponse);\n },\n function (standardResponse: any) {\n reject.call(_promise, standardResponse);\n });\n break;\n case _component.get(\"tplsource\") === \"default\" && _component.get(\"templateURI\", \"\") === \"\":\n logger.debug(`Component ${_component.name} template-source is ${_component.get(\"tplsource\")} and no templateURI is present`);\n reject.call(_promise, `Component ${_component.name} template-source is ${_component.get(\"tplsource\")} and no templateURI is present`);\n break;\n default:\n logger.debug(\"Component \" + _component.name + \" will not be rebuilt because no templateURI is present\");\n reject.call(_promise, {\n request: null,\n component: _component\n });\n break;\n }\n\n }\n });\n return _promise;\n }\n\n Cast(oClass: any): any {\n /* Cast method for components has been deprecated. Don't use this method, it is available only for compatibility purposes */\n const o = _methods_(oClass).map((m): any => (m as Function).name.replace(/bound /g, \"\")).map(m => {\n return {\n [m]: oClass[m].bind(this)\n };\n }).reduce((c, p) => Object.assign(c, p), {});\n return _Cast(this, o);\n }\n\n route():Promise {\n return (this.constructor as typeof Component).route();\n }\n\n static route():Promise {\n const componentClass = this; /* is can be class or object */\n let _route_promise_;\n const isValidInstance = !!((isQCObjects_Object(componentClass) && is_a(componentClass, \"Component\")));\n const __route__ = function (componentList: any[]) {\n const _componentNames_: any[] = [];\n const _promises_ = componentList.filter(function (rc: any) {\n return typeof rc !== \"undefined\";\n }).map(function (rc: Component): Promise {\n if (typeof rc.name !== \"undefined\") {\n _componentNames_.push(rc.name);\n } else {\n throw new Error(__getType__(rc) + \" does not have a name\");\n }\n return new Promise(function (resolve, reject) {\n if (typeof rc !== \"undefined\" && !!rc._reroute_) {\n rc._reroute_()\n .then(function () {\n rc.reload = true;\n rc.rebuild()\n .then(() => {\n resolve();\n })\n .catch((e: any) => {\n logger.debug(`Error ${e}`);\n });\n return;\n })\n .then(function () {\n if (Object.hasOwn(rc, \"subcomponents\") &&\n typeof rc.subcomponents !== \"undefined\" &&\n rc.subcomponents.length > 0\n ) {\n logger.debug(\"LOOKING FOR ROUTINGS IN SUBCOMPONENTS FOR: \" + rc.name);\n return __route__.call(rc, rc.subcomponents);\n } else {\n logger.debug(\"No subcomponents to look for routings in: \" + rc.name);\n if (rc.subtags.length > 0) {\n rc.subcomponents = rc.__buildSubComponents__(true);\n }\n resolve();\n }\n }).catch((e: any) => {\n logger.debug(`Error: ${e}`);\n });\n } else if (typeof rc !== \"undefined\") {\n reject(new Error(\"Component \" + rc.name + \" is not an instance of Component\"));\n }\n return;\n });\n });\n return Promise.all(_promises_)\n .then(function () {\n logger.debug(\"ROUTING COMPLETED FOR \" + _componentNames_.join(\", \"));\n }).catch(function (err) {\n logger.warn(\"ROUTING FAILED FOR \" + _componentNames_.join(\", \") + \": \" + err);\n });\n };\n if (isValidInstance || !!componentsStack) {\n if (isValidInstance) {\n logger.debug(\"loading routings for instance \" + componentClass.name);\n }\n _route_promise_ = __route__.call(componentClass, (isValidInstance) ? (componentClass.subcomponents) : (componentsStack));\n } else {\n logger.debug(\"An undetermined result expected if load routings. So will not be loaded this time.\");\n throw Error(\"There is no valid instance and no components stack available to apply rountings\");\n }\n return _route_promise_;\n }\n\n fullscreen():void {\n if (isBrowser) {\n const elem: HTMLElement = this.body as HTMLElement;\n if (elem.requestFullscreen) {\n elem.requestFullscreen()\n .catch((e: any) => {\n throw new Error(`An error ocurred when requesting fullscreen: ${e}`);\n });\n } else if ((elem as any).mozRequestFullScreen) {\n /* Firefox */\n (elem as any).mozRequestFullScreen();\n } else if ((elem as any).webkitRequestFullscreen) {\n /* Chrome, Safari & Opera */\n (elem as any).webkitRequestFullscreen();\n } else if ((elem as any).msRequestFullscreen) {\n /* IE/Edge */\n (elem as any).msRequestFullscreen();\n }\n } else {\n // not yet implemented.\n }\n }\n\n closefullscreen():void {\n if (isBrowser) {\n if (document.exitFullscreen) {\n document.exitFullscreen()\n .catch((e: any) => { throw new Error(`An error ocurred when trying to exit fullscrenn ${e}.`); });\n } else if ((document as any).mozCancelFullScreen) {\n (document as any).mozCancelFullScreen();\n } else if ((document as any).webkitExitFullscreen) {\n (document as any).webkitExitFullscreen();\n } else if ((document as any).msExitFullscreen) {\n (document as any).msExitFullscreen();\n }\n } else {\n // noy yet implemented.\n }\n }\n\n _generateRoutingPaths(componentBody: TBody):Promise {\n const component = this;\n return new Promise(function (resolve) {\n if (isBrowser) {\n if (__valid_routing_way__(component.validRoutingWays, component.routingWay || \"\")) {\n if (typeof componentBody !== \"undefined\") {\n component.innerHTML = (componentBody as HTMLElement)?.innerHTML;\n component.routingNodes = (componentBody as IQCObjectsElement)?.subelements(\"routing\");\n component.routings = [];\n component.routingNodes.map((routingNode): any => {\n const attributeNames = (routingNode as HTMLElement).getAttributeNames();\n const routing = {} as TComponentRouting;\n attributeNames.map((attributeName: any, a: string | number): any => {\n (routing as any)[attributeNames[a as any]] = (routingNode as HTMLElement).getAttribute(attributeNames[a as any]);\n return attributeName;\n });\n component.routings.push(routing as never);\n if (!component.routingPaths) {\n component.routingPaths = [];\n }\n if (!component.routingPaths.includes(routing.path as never)) {\n component.routingPaths.push(routing.path as never);\n }\n if (!_top.global.get(\"routingPaths\")) {\n _top.global.set(\"routingPaths\", []);\n }\n if (!_top.global.get(\"routingPaths\").includes(routing.path)) {\n _top.global.get(\"routingPaths\").push(routing.path);\n }\n return routingNode;\n });\n }\n }\n } else {\n // not yet implemented.\n }\n resolve();\n\n });\n }\n\n parseTemplate(template: any): string {\n const _self = this;\n let _parsedAssignmentText: string;\n const value = template;\n if (Object.hasOwn(_self, \"templateHandler\")) {\n const templateHandlerName = _self.templateHandler;\n logger.debug(`[Component][${this.name}][parseTemplate] Attempting to use ${templateHandlerName} ...`);\n const templateHandlerClass = ClassFactory(templateHandlerName);\n const templateInstance = New(templateHandlerClass, {\n component: _self,\n template: value\n });\n templateInstance.component = _self;\n let selfData = _self.data;\n if (Object.hasOwn(_self, \"assignRoutingParams\") && _self.assignRoutingParams) {\n try {\n selfData = Object.assign(selfData, _self.routingParams);\n } catch (e: any) {\n logger.debug(`An error ocurred: ${e}.`);\n logger.debug(\"[parseTemplate] it was not possible to assign the routing params to the template\");\n }\n }\n _parsedAssignmentText = templateInstance.assign(selfData);\n } else {\n logger.debug(`[Component][${this.name}][parseTemplate] No value for templateHandler. Using raw content...`);\n _parsedAssignmentText = value;\n }\n return _parsedAssignmentText;\n }\n\n _reroute_(): Promise {\n /* This method set the selected routing and makes the switch to the templateURI */\n const rc = this;\n return new Promise(function (resolve) {\n if (isBrowser) {\n if (__valid_routing_way__(rc.validRoutingWays, rc.routingWay || \"\")) {\n rc.routingPath = (location as any)[rc.routingWay as string];\n rc.routingSelected.map((routing: TComponentRouting,): TComponentRouting => {\n const componentURI = ComponentURI({\n \"COMPONENTS_BASE_PATH\": CONFIG.get(\"componentsBasePath\"),\n \"COMPONENT_NAME\": routing.name.toString(),\n \"TPLEXTENSION\": (Object.hasOwn(routing, \"tplextension\")) ? (routing.tplextension || \"\") : (rc.tplextension),\n \"TPL_SOURCE\": \"default\" /* here is always default in order to get the right uri */\n });\n rc.templateURI = componentURI;\n return routing;\n });\n if (rc.routingSelected.length > 0) {\n rc.template = \"\";\n if (typeof rc.body !== \"undefined\" && rc.body !== null) {\n (rc.body as HTMLElement).innerHTML = \"\";\n }\n }\n }\n }\n resolve(rc);\n\n });\n }\n\n lazyLoadImages() {\n if (isBrowser) {\n const component = this;\n const _componentRoot = component.componentRoot as IQCObjectsShadowedElement;\n if (typeof _componentRoot !== \"undefined\" && _componentRoot !== null) {\n const _imgLazyLoaded = [..._componentRoot.subelements(\"img[lazy-src]\")];\n const _lazyLoadImages = function (image: Element | HTMLElement) {\n image.setAttribute(\"src\", image.getAttribute(\"lazy-src\")?.toString() as string);\n (image as HTMLImageElement).onload = () => {\n image.removeAttribute(\"lazy-src\");\n };\n };\n if (\"IntersectionObserver\" in window) {\n const observer = new IntersectionObserver((items, observer) => {\n items.forEach((item) => {\n if (item.isIntersecting) {\n _lazyLoadImages(item.target);\n observer.unobserve(item.target);\n }\n });\n });\n _imgLazyLoaded.map(function (img) {\n return observer.observe(img as unknown as HTMLImageElement);\n });\n } else {\n (_imgLazyLoaded as (HTMLElement | Element)[]).map(_lazyLoadImages);\n }\n }\n } else {\n // not yet implemented\n }\n return null;\n }\n\n applyTransitionEffect(effectClassName: string):void {\n const _Effect = ClassFactory(effectClassName);\n if (typeof _Effect === \"undefined\") {\n throw Error(`${effectClassName} not found.`);\n }\n if (typeof _Effect !== \"undefined\" && is_a(_Effect, \"TransitionEffect\")) {\n this.effect = New(_Effect, {\n component: this\n });\n (this.effect as any)?.apply((this.effect as any)?.defaultParams);\n } else {\n logger.debug(`${effectClassName} is ${__getType__(_Effect)} but is not a TransitionEffect`);\n }\n }\n\n applyObserveTransitionEffect(effectClassName: any):void {\n if (isBrowser) {\n const component = this;\n const _componentRoot = component.componentRoot;\n const _applyEffect_ = function () {\n component.applyTransitionEffect(effectClassName);\n };\n if (\"IntersectionObserver\" in window) {\n const observer = new IntersectionObserver((items, observer) => {\n items.forEach((item) => {\n if (item.isIntersecting) {\n _applyEffect_();\n observer.unobserve(item.target);\n }\n });\n });\n observer.observe(_componentRoot as Element);\n } else {\n _applyEffect_();\n }\n } else {\n // not yet implemented\n }\n\n }\n\n get componentRoot(): TBody {\n return (this.shadowed) ? (this.shadowRoot) : (this.body);\n }\n\n scrollIntoHash():void {\n if (isBrowser) {\n const component = this;\n if (document.location.hash !== \"\") {\n const _componentRoot = component.componentRoot;\n ((_componentRoot as IQCObjectsShadowedElement)?.subelements(document.location.hash) as unknown as Element[]).map(\n (element: Element): any => {\n if (typeof element.scrollIntoView === \"function\") {\n element.scrollIntoView(\n CONFIG.get(\"scrollIntoHash\", {\n behavior: \"auto\",\n block: \"top\",\n inline: \"top\"\n })\n );\n }\n return element;\n }\n );\n }\n } else {\n // not yet implemented\n }\n }\n\n i18n_translate():void {\n if (isBrowser) {\n if (CONFIG.get(\"use_i18n\")) {\n const component = this;\n const _componentRoot = component.componentRoot as IQCObjectsShadowedElement;\n const lang1 = CONFIG.get(\"lang\", \"en\");\n const lang2 = navigator.language.slice(0, 2);\n const i18n = _top.global.get(\"i18n\");\n if ((lang1 !== lang2) && (typeof i18n === \"object\" && Object.hasOwn(i18n, \"messages\"))) {\n const callback_i18n = () => {\n return new Promise(function (resolve) {\n const messages = i18n.messages.filter(function (message: any) {\n return Object.hasOwn(message, lang1) && Object.hasOwn(message, lang2);\n });\n (_componentRoot?.subelements(\"ul,li,h1,h2,h3,a,b,p,input,textarea,summary,details,option,component\") as HTMLElement[])\n .map((element: HTMLElement): HTMLElement => {\n messages.map(function (message: { [x: string]: any; }) {\n let _innerHTML = element.innerHTML;\n _innerHTML = _innerHTML?.replace(new RegExp(`${message[lang1]}`, \"g\"), message[lang2]);\n element.innerHTML = _innerHTML;\n return null;\n });\n return element;\n });\n resolve();\n });\n };\n callback_i18n.call(component).then(function () {\n logger.debug(\"i18n loaded for component: \" + component.name);\n }).catch((e: any) => { throw new Error(`An error ocurred when parsing i18n: ${e}.`); });\n\n }\n }\n } else {\n // not yet implemented\n }\n }\n\n addComponentHelper(componentHelper: any):void {\n const component = this;\n component._componentHelpers.push(componentHelper as never);\n }\n\n runComponentHelpers():void {\n if (isBrowser) {\n const component = this;\n let __component_helpers__ = [];\n /*\n * BEGIN use i18n translation\n */\n __component_helpers__.push(component.i18n_translate.bind(component));\n /*\n * END use i18n translation\n */\n\n /*\n * BEGIN component scrollIntoHash\n */\n __component_helpers__.push(component.scrollIntoHash.bind(component));\n /*\n * END component scrollIntoHash\n */\n\n /*\n * BEGIN component images lazy-load\n */\n\n __component_helpers__.push(component.lazyLoadImages.bind(component));\n\n /*\n * END component images lazy-load\n */\n\n __component_helpers__ = __component_helpers__.concat(component._componentHelpers);\n\n __component_helpers__.map(\n (_component_helper_): any => {\n logger.debug(`Executing ${_component_helper_.name} as component helper for ${component.name}...`);\n _component_helper_();\n return _component_helper_;\n }\n );\n\n } else {\n // not yet implemented\n }\n\n }\n\n}\n\nPackage(\"com.qcobjects\", [\n Component\n]);\n\n(_methods_)(ClassFactory(\"Component\")).map((__c__): any => {\n (_protected_code_)(__c__);\n return __c__;\n});\n", "import { IQCObjectsElement, TComponentURIParams } from \"./types/global\";\nimport { Class } from \"./Class\";\nimport { ClassFactory } from \"./ClassFactory\";\nimport { Component } from \"./Component\";\nimport { CONFIG } from \"./CONFIG\";\nimport { _DOMCreateElement } from \"./DOMCreateElement\";\nimport { __getType__ } from \"./getType\";\nimport { logger } from \"./Logger\";\nimport { New } from \"./New\";\nimport { Package } from \"./Package\";\nimport { isBrowser } from \"./platform\";\nimport { _tag_filter_ } from \"./tag_filter\";\n\n/**\n * Returns a standarized uri for a component\n * @example\n * templateURI = ComponentURI({'COMPONENTS_BASE_PATH':'','COMPONENT_NAME':'','TPLEXTENSION':'','TPL_SOURCE':''})\n * @author: Jean Machuca \n * @param params an object with the params to build the uri path\n */\nexport const ComponentURI = ({ TPL_SOURCE, COMPONENTS_BASE_PATH, COMPONENT_NAME, TPLEXTENSION }:TComponentURIParams):string => {\n const templateURI = (TPL_SOURCE === \"default\") ? (`${COMPONENTS_BASE_PATH}${COMPONENT_NAME}.${TPLEXTENSION}`) : (\"\");\n return templateURI;\n};\n\nexport const _buildComponentFromElement_ = (element: Element, __parent__: any):Component => {\n const __shadowed_not_set = (element.getAttribute(\"shadowed\") === null);\n const __tplsource_attr_not_set = (element.getAttribute(\"template-source\") === null);\n const shadowed = (element.getAttribute(\"shadowed\") === \"true\");\n const __cached_not_set = (element.getAttribute(\"cached\") === null);\n const cached = (element.getAttribute(\"cached\") === \"true\");\n let tplextension = (typeof CONFIG.get(\"tplextension\") !== \"undefined\") ? (CONFIG.get(\"tplextension\")) : (\"html\");\n tplextension = (element.getAttribute(\"tplextension\") !== null) ? (element.getAttribute(\"tplextension\")) : (tplextension);\n let _componentName = element.getAttribute(\"name\");\n const _componentClassName = (element.getAttribute(\"componentClass\") !== null) ? (element.getAttribute(\"componentClass\")) : (\"Component\");\n const __componentClassName = (CONFIG.get(\"preserveComponentBodyTag\")) ? (\n (_componentName !== null) ? (\"com.qcobjects.components.\" + _componentName + \".ComponentBody\") : (\"com.qcobjects.components.ComponentBody\")\n ) : (_componentClassName);\n _componentName = (_componentName !== null) ? (_componentName) : (\n (ClassFactory(__componentClassName as string) &&\n typeof (ClassFactory(__componentClassName as string) as unknown as typeof Component).name !== \"undefined\"\n ) ? (\n (ClassFactory(__componentClassName as string) as unknown as Component).name\n ) : (\"\")\n );\n const __classDefinition = ClassFactory(__componentClassName as string) as Component;\n const __tplsource_prop_set = !!((__componentClassName !== \"Component\" && ((typeof __classDefinition !== \"undefined\" && typeof __classDefinition.tplsource === \"string\") && __classDefinition.tplsource !== \"\")));\n const tplsource = (__tplsource_attr_not_set && __tplsource_prop_set) ? (__classDefinition.tplsource) : ((__tplsource_attr_not_set) ? (\"default\") : (element.getAttribute(\"template-source\")));\n logger.debug(`template source for ${_componentName} is ${tplsource} `);\n logger.debug(`type for ${_componentName} is ${__getType__(__classDefinition)} `);\n\n const componentURI: string = ComponentURI({\n \"COMPONENTS_BASE_PATH\": CONFIG.get(\"componentsBasePath\"),\n \"COMPONENT_NAME\": _componentName ,\n \"TPLEXTENSION\": tplextension,\n \"TPL_SOURCE\": tplsource as string\n });\n if (CONFIG.get(\"preserveComponentBodyTag\")) {\n Package((_componentName !== \"\") ? (\"com.qcobjects.components.\" + _componentName + \"\") : (\"com.qcobjects.components\"), [\n Class(\"ComponentBody\", Component, {\n name: _componentName,\n tplsource,\n tplextension,\n reload: true\n })\n ]);\n }\n\n const __create_component_instance_ = function ():Component {\n const __shadowed = (__shadowed_not_set) ? ((__classDefinition && __classDefinition.shadowed) || Component.shadowed) : (shadowed);\n const __definition = {\n __parent__,\n name: _componentName,\n cached: (__cached_not_set) ? (Component.cached) : (cached),\n shadowed: __shadowed,\n tplextension,\n body: (CONFIG.get(\"preserveComponentBodyTag\")) ? (_DOMCreateElement(\"componentBody\")) : (element),\n templateURI: componentURI,\n tplsource\n };\n if (typeof _componentName === \"undefined\" || _componentName === \"\" || _componentName === null) {\n /* this allows to use the original property defined\n in the component definition if it is not present in the tag */\n delete (__definition as any).name;\n }\n if (componentURI === \"\") {\n /* this allows to use the original property defined\n in the component definition if it is not present in the tag */\n delete (__definition as any).templateURI;\n }\n const newComponent = New(__classDefinition, __definition) as Component;\n\n if (CONFIG.get(\"preserveComponentBodyTag\")) {\n if (typeof newComponent !== \"undefined\") {\n element.append(newComponent.body as string | Node);\n }\n }\n return newComponent;\n };\n const newComponent = __create_component_instance_();\n return newComponent;\n};\n\nexport const _buildComponentsFromElements_ = (elements: HTMLElement[], __parent__: Component | null):Component[] => {\n let componentsBuiltWith:Component[] = [];\n if (isBrowser) {\n componentsBuiltWith = elements.map(\n function (element: any) {\n return _buildComponentFromElement_(element, __parent__);\n }\n );\n } else {\n logger.debug(\"[_buildComponentsFromElements_] not implemented for Non-Browser environments\");\n }\n return componentsBuiltWith;\n};\n\nexport const buildComponents = (element:HTMLElement):Component[] => {\n const tagFilter = _tag_filter_;\n const elements = (element as unknown as IQCObjectsElement).subelements(tagFilter) as HTMLElement[];\n return _buildComponentsFromElements_(elements, null);\n};", "import { _basePath_ } from \"./basePath\";\nimport { _Crypt } from \"./Crypt\";\nimport { _domain_ } from \"./domain\";\nimport { InheritClass } from \"./InheritClass\";\nimport { logger } from \"./Logger\";\nimport { Package } from \"./Package\";\nimport { _secretKey } from \"./secretKey\";\nimport { CONFIG } from \"./CONFIG\";\nimport { IJSONService, IService, TServiceDoneResponse, TServiceStandardResponse } from \"./types/global\";\n\nexport class Service extends InheritClass implements IService{\n options!: object;\n withCredentials!: boolean;\n useHTTP2: any;\n // eslint-disable-next-line no-unused-vars\n mockup({ request, service }: TServiceStandardResponse): void {\n throw new Error(\"Method not implemented.\");\n }\n name!: string;\n responseHeaders: any;\n // eslint-disable-next-line no-unused-vars\n local({ request, service }: TServiceStandardResponse): void {\n throw new Error(\"Method not implemented.\");\n }\n kind = \"rest\";\n /* it can be rest, mockup, local */\n domain:string = _domain_;\n basePath:string = _basePath_;\n url = \"\";\n method = \"GET\";\n data = {};\n reload = false;\n cached = false;\n\n headers: any;\n template: unknown;\n \n // eslint-disable-next-line no-unused-vars\n done({ request, service }: TServiceDoneResponse): void {\n throw new Error(\"Method not implemented.\");\n }\n // eslint-disable-next-line no-unused-vars\n fail(...args: any[]): void {\n throw new Error(\"Method not implemented.\");\n }\n\n set(name:string, value:never):void {\n this[name] = value;\n }\n\n get(name:string, _default?:never):any {\n return this[name] as never || _default;\n }\n\n}\n\nexport class JSONService extends Service implements IJSONService{\n method = \"GET\";\n cached = false;\n headers = {\n \"Content-Type\": \"application/json\",\n \"charset\": \"utf-8\"\n };\n\n JSONresponse?:JSON = undefined;\n done(result:TServiceDoneResponse):void {\n logger.debug(\"***** RECEIVED RESPONSE:\");\n logger.debug(result.service.template as string);\n this.JSONresponse = JSON.parse(result.service.template as string);\n }\n\n\n\n}\n\nexport class ConfigService extends JSONService {\n method = \"GET\";\n cached = false;\n configFileName = \"config.json\";\n headers = {\n \"Content-Type\": \"application/json\",\n \"charset\": \"utf-8\"\n };\n\n configLoaded():Promise{\n throw Error (\"Method not implemented.\");\n }\n\n JSONresponse?:JSON = undefined;\n done(result:TServiceDoneResponse):void {\n logger.debug(\"***** CONFIG LOADED:\");\n logger.debug(result.service.template as string);\n this.JSONresponse = JSON.parse(result.service.template as string);\n if (Object.hasOwn(this.JSONresponse as object, \"__encoded__\")) {\n const decodedValue:string = _Crypt.decrypt((this.JSONresponse as any)?.__encoded__, _secretKey);\n this.JSONresponse = JSON.parse(decodedValue);\n }\n const jsonResponse:any = this.JSONresponse;\n Object.keys(jsonResponse as object).map((k:string) => {\n CONFIG.set(k, (jsonResponse as never)[k]);\n return k;\n });\n this.configLoaded().catch((e:any)=>{throw new Error (`An error ocurred: ${e}`);});\n }\n\n fail():void {\n this.configLoaded().catch((e:any)=>{throw new Error (`An error ocurred: ${e}`);});\n }\n\n constructor() {\n super();\n this.set(\"url\", `${this.get(\"basePath\") as string}${this.get(\"configFileName\") as string}` as never);\n }\n}\n\n\nPackage(\"com.qcobjects.api\", [\n Service\n]);\n\nPackage(\"com.qcobjects.api.services\", [\n JSONService\n]);\n\nPackage(\"com.qcobjects.api.config\", [\n ConfigService\n]);\n", "import { IGlobalSettings } from \"./types/global\";\nimport { CONFIG } from \"./CONFIG\";\nimport { InheritClass } from \"./InheritClass\";\nimport { Logger, logger } from \"./Logger\";\nimport { Package } from \"./Package\";\nimport { isBrowser } from \"./platform\";\nimport { serviceLoader } from \"./serviceLoader\";\nimport { _top, buildComponentsStack, configService, setConfigService } from \"./top\";\nimport { ConfigService } from \"./Service\";\n\nexport class GlobalSettings extends InheritClass implements IGlobalSettings {\n static __start__(): Promise {\n return GlobalSettings.instance.__start__();\n }\n [key: string]: any;\n\n _GLOBAL: any = {};\n private static _instance: GlobalSettings;\n static get instance(): GlobalSettings {\n if (typeof GlobalSettings._instance === \"undefined\") {\n GlobalSettings._instance = new GlobalSettings();\n }\n return GlobalSettings._instance;\n }\n\n protected _logger: Logger = new Logger();\n get logger(): Logger {\n return this._logger;\n }\n\n set logger(value: Logger) {\n this._logger = value;\n }\n\n set(name: string, value: any): void {\n this._GLOBAL[name] = value;\n }\n\n get(name: string, _default?: any): any {\n let _value: any;\n if (typeof this._GLOBAL[name] !== \"undefined\") {\n _value = this._GLOBAL[name];\n } else if (typeof _default !== \"undefined\") {\n _value = _default;\n }\n return _value;\n }\n\n __start__(): Promise {\n const __load__serviceWorker = function () {\n let _promise: Promise | Promise;\n if (isBrowser) {\n _promise = new Promise(function (resolve, reject) {\n if ((\"serviceWorker\" in navigator) &&\n (typeof CONFIG.get(\"serviceWorkerURI\") !== \"undefined\")) {\n CONFIG.set(\"serviceWorkerScope\", CONFIG.get(\"serviceWorkerScope\") ? (CONFIG.get(\"serviceWorkerScope\")) : (\"/\"));\n navigator.serviceWorker.register(CONFIG.get(\"serviceWorkerURI\"), {\n scope: CONFIG.get(\"serviceWorkerScope\")\n })\n .then(function (registration) {\n logger.debug(\"Service Worker Registered\");\n resolve.call(_promise, registration);\n }, function (registration) {\n logger.debug(\"Error registering Service Worker\");\n reject.call(_promise, registration);\n });\n navigator.serviceWorker.ready.then(function (registration) {\n logger.debug(\"Service Worker Ready\");\n resolve.call(_promise, registration);\n }, function (registration) {\n logger.debug(\"Error loading Service Worker\");\n reject.call(_promise, registration);\n });\n }\n });\n } else {\n _promise = Promise.resolve();\n }\n return _promise;\n };\n const _buildComponents = function () {\n return new Promise((resolve) => {\n if (isBrowser) {\n logger.debug(\"Starting to building components\");\n try {\n buildComponentsStack();\n } catch (e: any) {\n throw Error(`Something went wrong trying to start components tree: ${e.message}`);\n }\n logger.debug(\"Initializing the service worker\");\n __load__serviceWorker.call(_top)\n .catch(function (e) {\n logger.debug(`error loading the service worker ${e}`);\n });\n }\n resolve();\n });\n };\n\n return new Promise((resolve) => {\n logger.debug(\"Starting to load the config settings...\");\n if (CONFIG.get(\"useConfigService\", false)) {\n logger.debug(\"Loading settings using local configuration file...\");\n setConfigService(new ConfigService());\n configService.configLoaded = _buildComponents;\n serviceLoader(configService)\n ?.then((standardResponse: any) => {\n resolve(standardResponse);\n })\n ?.catch((e: any) => { throw new Error(`An error ocurred while trying to load ${configService.url}: ${e}`); });\n } else {\n logger.debug(\"Starting to load the components...\");\n _buildComponents.call(this)\n .then(() => {\n resolve({});\n })\n .catch((e: any) => { throw new Error(`An error ocurred while trying to build the components stack. ${e}`); });\n }\n\n });\n }\n\n}\n\nPackage(\"com.qcobjects\", [\n GlobalSettings\n]);\n", "import { IComplexStorageCache, IComponent, IConfigService, IQCObjectsElement } from \"./types/global\";\nimport { buildComponents } from \"./ComponentFactory\";\nimport { _CastProps } from \"./Cast\";\nimport { GlobalSettings } from \"./globalSettings\";\nimport { Class } from \"./Class\";\nimport { ClassFactory } from \"./ClassFactory\";\nimport { Export } from \"./Export\";\nimport { isBrowser } from \"./platform\";\nimport { _QC_CLASSES, getPackagesNamesList, getPackagesList, getClassesList, getClassesNamesList } from \"./PrimaryCollections\";\nimport { logger } from \"./Logger\";\n\ntype QCObjects = {\n lastCache?:IComplexStorageCache,\n componentsStack:IComponent[],\n Microservice:any,\n Route:any,\n BackendMicroservice:any,\n QCObjectsElement:any,\n QCObjectsShadowedElement:any,\n Logger:any,\n Class:any, \n _Crypt:any, \n TagElements:any, \n DefaultTemplateHandler:any, \n SourceJS:any, \n SourceCSS:any, \n ArrayList:any, \n ArrayCollection:any, \n GlobalSettings:any, \n GLOBAL:any, \n DDO:any, \n CacheController:any, \n ComplexCacheParams:any, \n ComplexStorageCache:any, \n ComponentWidget:any, \n asyncLoad:any, \n RegisterClass:any, \n ComponentURI:any, \n waitUntil:any, \n super:any, \n _DOMCreateElement:any, \n shortCode:any, \n getType:any, \n is_a:any, \n _DataStringify:any, \n serviceLoader:any, \n componentLoader:any, \n ObjectName:any, \n isQCObjects_Class:any, \n isQCObjects_Object:any, \n NamespaceRef:any, \n RegisterWidget:any, \n RegisterWidgets:any, \n range:any, \n getDocumentLayout:any, \n Export:any, \n New:any, \n Tag:any, \n Ready:any, \n methods:any, \n // eslint-disable-next-line no-unused-vars\n set:(name:string, value:any) => void, \n // eslint-disable-next-line no-unused-vars\n get:(name:string, _default?:any) => any, \n start:any, \n InheritClass:any, \n Processor:any, \n ComponentParams:any, \n ComponentDoneResponse:any, \n Component:any, \n CONFIG:any, \n ControllerParams:any, \n Controller:any, \n ViewParams:any, \n View:any, \n Service:any, \n JSONService:any, \n ConfigService:any, \n VO:any, \n EffectParams:any, \n Effect:any, \n TransitionEffect:any, \n TimerParams:any, \n Timer:any, \n Toggle:any, \n logger:any, \n sdk:any, \n global:any, \n ClassFactory:any, \n Package:any, \n Import:any,\n _sdk_:any,\n ClassesList:any[], \n PackagesList:any[],\n PackagesNameList:any[],\n ClassesNameList:any[]\n} & typeof self & typeof global ;\n\nexport var _top: QCObjects = (\n (typeof module !== \"undefined\" && typeof module.exports !== \"undefined\" && module.exports) ||\n (typeof global !== \"undefined\" && global) ||\n (typeof globalThis !== \"undefined\" && globalThis) ||\n (typeof window !== \"undefined\" && window) ||\n (typeof self !== \"undefined\" && self !== null && self) ||\n this\n) as QCObjects;\n(_top as any).lastCache = undefined;\nexport let componentsStack:IComponent[] = [];\n\nexport const resetTop = ():void => {\n const globalSettings = GlobalSettings.instance;\n _top = _CastProps(globalSettings, _top, true);\n};\n\nexport const buildComponentsStack = ():void => {\n componentsStack = buildComponents(document as unknown as IQCObjectsElement);\n};\nexport let configService:IConfigService;\nexport const setConfigService = (_configService:IConfigService):void => {\n _top.global.configService = _configService;\n configService = _configService;\n};\n\nexport const set = (name:string, value:any):void => {\n _top[name as never] = value;\n};\n\nexport const get = (name:string, _defaultValue?:any):any => {\n return _top[name as never] || _defaultValue;\n};\n\nresetTop();\n\nconst _define_props = function (_top: any) {\n if (!Object.hasOwn(_top, \"PackagesList\")) {\n Object.defineProperty(_top, \"PackagesList\", {\n // eslint-disable-next-line no-unused-vars\n set:(value) => {\n logger.debug(\"PackagesList is readonly\");\n \n },\n get:():any => {\n return getPackagesList();\n }\n });\n \n }\n \n \n if (!Object.hasOwn(_top, \"PackagesNameList\")) {\n Object.defineProperty(_top, \"PackagesNameList\", {\n // eslint-disable-next-line no-unused-vars\n set:(val) => {\n logger.debug(\"PackagesNameList is readonly\");\n\n },\n get:():any =>{\n return getPackagesNamesList();\n }\n });\n\n }\n\n if (!Object.hasOwn(_top, \"ClassesList\")) {\n Object.defineProperty(_top, \"ClassesList\", {\n // eslint-disable-next-line no-unused-vars\n set:(value) => {\n logger.debug(\"ClassesList is readonly\");\n\n },\n get:(): any => {\n return getClassesList();\n }\n });\n }\n\n if (!Object.hasOwn(_top, \"ClassesNameList\")) {\n Object.defineProperty(_top, \"ClassesNameList\", {\n // eslint-disable-next-line no-unused-vars\n set(value):any {\n logger.debug(\"ClassesNameList is readonly\");\n\n },\n get:(): any => {\n return getClassesNamesList();\n }\n });\n\n }\n\n\n };\n\n\n if (isBrowser) {\n // use of GLOBAL word is deprecated in node.js\n // this is only for compatibility purpose with old versions of QCObjects in browsers\n Class(\"GLOBAL\", (_QC_CLASSES as any).global); // case insensitive for compatibility con old versions;\n Export(ClassFactory(\"GLOBAL\"));\n }\n\n if (isBrowser && typeof window !== \"undefined\") {\n set(\"global\", window);\n } else if (isBrowser && typeof globalThis !== \"undefined\") {\n set(\"global\", globalThis);\n }\n\n _define_props(_top);\n", "import { logger } from \"./Logger\";\nimport { isBrowser } from \"./platform\";\n\nexport let supportsPassive = false;\nexport const captureFalseTouch = ():boolean | { passive: boolean; } => {\n return (supportsPassive) ? ({\n passive: true\n }) : (false);\n};\n\n// Test via a getter in the options object to see if the passive property is accessed\nif (isBrowser) {\n try {\n const opts = Object.defineProperty({}, \"passive\", {\n get() {\n supportsPassive = true;\n return supportsPassive;\n }\n });\n (window as any).addEventListener(\"testPassive\", null, opts);\n (window as any).removeEventListener(\"testPassive\", null, opts);\n } catch (e:any) {\n logger.debug(`An error ocurred: ${e}.`);\n supportsPassive = false;\n }\n\n} else {\n supportsPassive = false;\n}", "import { _protected_code_ } from \"./introspection\";\n\nexport const range = (start: number, stop = 0, step = 1): number[] => {\n if (stop === 0 || typeof stop === \"undefined\") {\n stop = start;\n start = 0;\n }\n return Array.from({\n length: (stop - start) / step + 1\n }, function (_, i) {\n return start + (i * step);\n });\n};\n(_protected_code_)(range);\n\n", "import { logger } from \"./Logger\";\nimport { GlobalProcessor as Processor } from \"./Processor\";\nimport { _top } from \"./top\";\nimport { range } from \"./range\";\nimport { IComponent } from \"./types/global\";\n\n// Set Processors\nexport const setDefaultProcessors = ():void => {\n (function (_top):void {\n\n const mapper = (componentInstance:IComponent, componentName:string, valueName:string):string => {\n /*\n * Mapper processor\n * @usage\n * $mapper(,)\n *\n * Where componentName is the name of the component (same value as in attribute tag name) without quotes\n * and valueName is the name of the variable that contains the value to map, it can be either a property of\n * the component instance, the data object or a global value\n */\n \n if (typeof componentInstance === \"undefined\" || componentInstance === null) {\n throw Error(`mapper.${componentName}.${valueName} does not have a component instance or it is null.`);\n }\n const globalValue = _top.global.get(valueName);\n const componentValue = componentInstance.get(valueName);\n const dataValue = componentInstance.data[valueName];\n const list = (typeof dataValue !== \"undefined\") ? (dataValue) : ((typeof componentValue !== \"undefined\") ? (componentValue) : (globalValue));\n let listItems = \"\";\n if (typeof list !== \"undefined\" && typeof list.map !== \"undefined\") {\n listItems = list.map(function (element:HTMLElement) {\n const dataItems = [...Object.keys(element)].map(k => ` data-${k}=\"${(typeof (element as any)[k] !== \"undefined\" && (element as any)[k] !== null) ? ((element as any)[k].toString()) : (\"\")}\"`).join(\"\");\n return ``;\n }).join(\"\");\n } else {\n logger.debug(`${componentName}.${valueName} does not have a map property`);\n }\n return listItems;\n };\n Processor.setProcessor(mapper);\n \n const layout = function (componentInstance:IComponent, layoutname:string, cssfile:string):string {\n /*\n * Layout processor\n * @usage\n * $layout(, )\n * Where layoutname can be \"portrait\" or \"landscape\" without quotes\n * cssfile is the uri for the css file to import\n */\n \n const layout_portrait = `\n /* CSS Document for Mobile Imports */\n @import url(\"${cssfile}\") (orientation:portrait);\n @import url(\"${cssfile}\") (max-width:460px);\n @import url(\"${cssfile}\") (aspect-ratio: 9/16);\n @import url(\"${cssfile}\") (aspect-ratio: 10/16);\n @import url(\"${cssfile}\") (aspect-ratio: 5/8);\n @import url(\"${cssfile}\") (aspect-ratio: 3/4);\n @import url(\"${cssfile}\") (aspect-ratio: 2/3);\n `;\n const layout_landscape = `\n @import url(\"${cssfile}\") (orientation:landscape) and (min-width:460px);\n @import url(\"${cssfile}\") (aspect-ratio: 16/9) and (min-width:460px);\n @import url(\"${cssfile}\") (aspect-ratio: 16/10) and (min-width:460px);\n @import url(\"${cssfile}\") (aspect-ratio: 8/5) and (min-width:460px);\n @import url(\"${cssfile}\") (aspect-ratio: 4/3) and (min-width:460px);\n @import url(\"${cssfile}\") (aspect-ratio: 3/2) and (min-width:460px);\n `;\n const layout_code = {\n \"landscape\": layout_landscape,\n \"portrait\": layout_portrait\n };\n \n return (Object.hasOwn(layout_code, layoutname)) ? ((layout_code as any)[layoutname] as string) : (\"\");\n };\n \n Processor.setProcessor(layout);\n \n const component = (componentInstance:IComponent ,name:string, componentClass:string, ...args:string[]):string => {\n /*\n * component processor\n * @usage\n * $component(name=, componentClass=, ...)\n * Returns a component tag declaration like:\n * ...>\n */\n const arg = [...args].map(function (a) {\n return {\n [a.split(\"=\")[0]]: a.split(\"=\")[1]\n };\n }).reduce(function (k1, k2) {\n return Object.assign(k1, k2);\n });\n const attrs = [...Object.keys(arg)].map(function (a) {\n return `${a}=${arg[a as any]}`;\n }).join(\" \");\n return ``;\n };\n \n Processor.setProcessor(component);\n \n const quick_component = (componentInstance: IComponent,name:string, componentClass:string, ...args:string[]):string => {\n /*\n * component processor\n * @usage\n * $quick_component(name=, componentClass=, ...)\n * Returns a component tag declaration like:\n * ...>\n */\n const arg = [...args].map(function (a) {\n return {\n [a.split(\"=\")[0]]: a.split(\"=\")[1]\n };\n }).reduce(function (k1, k2) {\n return Object.assign(k1, k2);\n });\n const attrs = [...Object.keys(arg)].map(function (a) {\n return `${a}=${arg[a as any]}`;\n }).join(\" \");\n return ``;\n };\n \n Processor.setProcessor(quick_component);\n \n \n const repeat = (componentInstance:IComponent, length:number, text:string):string => {\n /*\n * Repeat processor\n * @usage\n * $repeat(, )\n * Where length is the number of occurrences of text\n */\n return range(length).map(\n function (index) {\n return text.replace(\"{{index}}\", index.toString());\n }\n ).join(\"\");\n };\n \n Processor.setProcessor(repeat);\n \n })(_top);\n \n};\n\n", "import { CONFIG } from \"./CONFIG\";\nimport { Export } from \"./Export\";\nimport { logger } from \"./Logger\";\nimport { isBrowser } from \"./platform\";\n\nexport const findPackageNodePath = function (packagename:string):string|null {\n let sdkPath = null;\n if (!isBrowser) {\n // eslint-disable-next-line @typescript-eslint/no-require-imports\n const fs = require(\"fs\");\n try {\n let sdkPaths = [\n `${CONFIG.get(\"projectPath\")}${CONFIG.get(\"relativeImportPath\")}`,\n `${CONFIG.get(\"basePath\")}${CONFIG.get(\"relativeImportPath\")}`,\n `${CONFIG.get(\"projectPath\")}`,\n `${CONFIG.get(\"basePath\")}`,\n `${CONFIG.get(\"relativeImportPath\")}`,\n `${process.cwd()}${CONFIG.get(\"relativeImportPath\")}`,\n `${process.cwd()}/node_modules/` + packagename,\n `${process.cwd()}/node_modules`,\n `${process.cwd()}`,\n \"node_modules\",\n \"./\",\n \"\"\n ].concat(module.paths);\n sdkPaths = sdkPaths.filter(p => {\n return (fs).existsSync(p + \"/\" + packagename);\n });\n if (sdkPaths.length > 0) {\n sdkPath = sdkPaths[0];\n logger.info(packagename + \" is Installed.\");\n } else {\n sdkPath = \"\";\n logger.info(`${packagename} is not in a standard path.`);\n }\n } catch (e) {\n // do nothing\n console.log(e);\n }\n\n }\n return sdkPath;\n};\nExport(findPackageNodePath);\n", "import { _basePath_ } from \"./basePath\";\nimport { CONFIG } from \"./CONFIG\";\nimport { _DataStringify } from \"./DataStringify\";\nimport { _DOMCreateElement } from \"./DOMCreateElement\";\nimport { findPackageNodePath } from \"./findPackageNodePath\";\nimport { logger } from \"./Logger\";\nimport { _require_, isBrowser } from \"./platform\";\nimport { _QC_PACKAGES, _QC_PACKAGES_IMPORTED, _QC_READY_LISTENERS } from \"./PrimaryCollections\";\n\n/**\n * Imports a script with the package nomenclature\n *\n * @param {Object} packagename\n * @param {Object} ready\n * @param {Boolean} external\n */\nexport const Import = function (packagename:string, ready?:Function, external?:boolean):Promise<{_imported_?:any, _package_name_?:string}> | undefined {\n\n if (external !== undefined){\n logger.debug(`[Import] Setting external=${external.toString()} resource to import: ${packagename}`);\n } \n if (external) {\n logger.debug(`[Import] Registering external resource to import: ${packagename}`);\n } else {\n logger.debug(`[Import] Registering local resource to import: ${packagename}`);\n }\n let _promise_import_: Promise;\n if (isBrowser) {\n _promise_import_ = new Promise(function (resolve, reject) {\n\n const allPackagesImported = function () {\n let ret = false;\n let cp = 0;\n // eslint-disable-next-line no-unused-vars\n for (const p in _QC_PACKAGES) {\n cp++;\n }\n if (cp < _QC_PACKAGES_IMPORTED.length) {\n ret = false;\n } else {\n ret = true;\n }\n return ret;\n };\n\n const readyImported = function (e: { target: { remove: () => void; }; }) {\n _QC_PACKAGES_IMPORTED.push(ready as never);\n if (allPackagesImported()) {\n _QC_PACKAGES_IMPORTED.map( (_imported_) => {\n return _QC_READY_LISTENERS.push(_imported_);\n });\n }\n if (isBrowser && CONFIG.get(\"removePackageScriptAfterLoading\")) {\n e.target.remove();\n }\n resolve.call(_promise_import_, {\n \"_imported_\": e.target,\n \"_package_name_\": packagename\n });\n };\n\n if (!Object.hasOwn(_QC_PACKAGES, packagename)) {\n const s1:HTMLScriptElement = _DOMCreateElement(\"script\") as unknown as HTMLScriptElement;\n s1.type = CONFIG.get(\"sourceType\", \"text/javascript\");\n s1.async = !!(CONFIG.get(\"asynchronousImportsLoad\"));\n (s1 as any).onreadystatechange = function () {\n if ((s1 as any).readyState === \"complete\") {\n readyImported(s1 as any);\n }\n };\n (s1 as any).onload = readyImported;\n s1.onerror = function (e: any) {\n logger.debug(`An error ocurred: ${e}.`);\n reject.call(_promise_import_, {\n \"_imported_\": s1,\n \"_package_name_\": packagename\n });\n };\n s1.src = (external) ? (CONFIG.get(\"remoteImportsPath\") + packagename + \".js\") : (_basePath_ + CONFIG.get(\"relativeImportPath\") + packagename + \".js\");\n document.getElementsByTagName(\"head\")[0].appendChild(s1);\n }\n });\n _promise_import_.catch(function () {\n logger.debug(\"Import: Error loading a package \");\n });\n\n } else {\n // support to be used in a nodejs environment\n _promise_import_ = new Promise(function (resolve, reject) {\n try {\n const standardNodePath = findPackageNodePath(packagename);\n let packageAbsoluteName = \"\";\n if (standardNodePath !== null) {\n packageAbsoluteName = standardNodePath + \"/\" + packagename;\n } else {\n const jsNodePath = findPackageNodePath(packagename + \".js\");\n if (jsNodePath !== null) {\n packageAbsoluteName = jsNodePath + \"/\" + packagename + \".js\";\n } else {\n packageAbsoluteName = _basePath_ + CONFIG.get(\"relativeImportPath\") + packagename;\n }\n }\n try {\n resolve.call(_promise_import_, {\n \"_imported_\": _require_(`${packageAbsoluteName}`),\n \"_package_name_\": packagename\n });\n } catch (e) {\n reject.call(_promise_import_, {\n \"_imported_\": null,\n \"_package_name_\": packagename,\n \"error\": e\n });\n }\n } catch (e) {\n reject.call(_promise_import_, {\n \"_imported_\": null,\n \"_package_name_\": packagename,\n \"error\": e\n });\n }\n }).catch(function (e) {\n // something wrong importing a package\n logger.debug(\"Something happened when importing \" + packagename);\n console.warn(e);\n });\n }\n _promise_import_.catch(function (e) {\n logger.warn(_DataStringify(e));\n });\n return _promise_import_;\n};\nImport.prototype.toString = function () {\n return \"Import(packagename,ready,external) { [QCObjects native code] }\";\n};\n", "export const __to_number = function (value:any): number {\n return ((isNaN(value)) ? (new Number(0) as number) : (new Number(value) as number));\n};", "import { isQCObjects_Class } from \"./isQCObjects\";\nimport { Package } from \"./Package\";\n\n/**\n * Declare Namespace\n *\n * @param {String} packageName\n * @param {Object} package\n */\nexport const NamespaceRef = function (namespace:string):any {\n const packageInstance = Package(namespace) || [];\n const classes = packageInstance.filter((c:any) => isQCObjects_Class(c)).map((c:any) => {\n return {\n [c.__definition.__classType]: c\n };\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n }).reduce((a:any, b:any):any => {return Object.assign(a, b);});\n return namespace.split(\".\").map(c => {\n return {\n [c]: classes\n };\n }).reverse().reduce((a, b) => {\n b[Object.keys(b).join(\".\")] = a;\n return b;\n });\n};\n", "import { CONFIG } from \"./CONFIG\";\nimport { isBrowser } from \"./platform\";\nimport { _QC_READY_LISTENERS } from \"./PrimaryCollections\";\nimport { _top } from \"./top\";\n\n/**\n * Defines a Custom Ready listener\n */\nexport const Ready = (e:any):void => {\n if (isBrowser) {\n _QC_READY_LISTENERS.push(e.bind(window) as never);\n } else if (typeof global !== \"undefined\") {\n _QC_READY_LISTENERS.push(e.bind(global) as never);\n }\n};\n\nexport const ready:Function = Ready; // case insensitive ready option\n\n/**\n * Default Ready event function for window. Executes all micro ready events of Import calls\n *\n * @param {Object} e\n */\n// eslint-disable-next-line no-unused-vars\nexport const _Ready = (e:any):void => {\n const _execReady = ():void => {\n // eslint-disable-next-line array-callback-return\n _QC_READY_LISTENERS.map(function (_ready_listener_, _r):any {\n if (typeof _ready_listener_ === \"function\") {\n (_ready_listener_ as Function)();\n _QC_READY_LISTENERS.splice(_r, 1);\n }\n });\n };\n if (CONFIG.get(\"delayForReady\") > 0) {\n if (isBrowser) {\n setTimeout(_execReady.bind(window), CONFIG.get(\"delayForReady\"));\n } else if (typeof global !== \"undefined\") {\n setTimeout(_execReady.bind(global), CONFIG.get(\"delayForReady\"));\n }\n } else {\n _execReady.call(_top);\n }\n};\n", "import { IArrayCollection, IArrayList } from \"./types/global\";\nimport { ClassFactory } from \"./ClassFactory\";\nimport { logger } from \"./Logger\";\nimport { New } from \"./New\";\nimport { __to_number } from \"./mathFunctions\";\n\n\nexport class ArrayList extends Array implements IArrayList {\n prototype: any;\n\n unique ():any[] {\n return this.filter(function (value:any, index:any, self:any) {\n return self.indexOf(value) === index;\n });\n };\n\n table(): void {\n console.table(this);\n };\n sum(): number {\n return this.reduce( (prev:any, current:any):number => {\n return (__to_number(prev)) + (__to_number(current));\n }, 0) as number;\n }\n avg(): number {\n return (this.length < 1) ? (0) : (this.reduce( (prev:any, current:any):number => {\n return (((__to_number(prev)) + (__to_number(current))) / 2);\n })) as number;\n }\n min(): number {\n return this.reduce( (prev:any, current:any):number => {\n return (__to_number(prev) <= __to_number(current)) ? (prev) : (current);\n }, Infinity) as number;\n }\n max(): number {\n return this.reduce( (prev:any, current:any):number => {\n return (__to_number(prev) >= __to_number(current)) ? (prev) : (current);\n }, 0) as number;\n }\n sortBy(propName: string, sortAsc?: boolean): any[] {\n const sort_function = (sortAsc) ? (\n function (prev:any, current:any) {\n return current[propName] < prev[propName] ? 1 : -1;\n }\n ) : (\n function (prev:any, current:any) {\n return current[propName] > prev[propName] ? 1 : -1;\n }\n );\n return this.sort(sort_function);\n }\n matrix(length: number, fillValue?: number): any[] {\n const x_func = () => {\n return fillValue;\n };\n return Array.from({\n length: length\n }, x_func);\n }\n matrix2d(length: number, fillValue?: number): any[][] {\n const y_func = function () {\n return fillValue;\n };\n const x_func = function () {\n return Array.from({\n length\n }, y_func);\n };\n return Array.from({\n length\n }, x_func);\n }\n matrix3d(length: number, fillValue?: number): any[][][] {\n const y_func = function () {\n return Array.from({\n length\n }, function () {\n return fillValue;\n });\n };\n const x_func = function () {\n return Array.from({\n length\n }, y_func);\n };\n return Array.from({\n length\n }, x_func);\n }\n\n\n}\n\nexport class ArrayCollection implements IArrayCollection {\n source :ArrayList = New(ArrayList, []);\n changed(prop: string, value: any):void {\n logger.debug(\"VALUE CHANGED\");\n logger.debug(prop);\n logger.debug(value);\n }\n push(value: any):number {\n const self = this;\n logger.debug(\"VALUE ADDED\");\n logger.debug(value);\n return self.source.push(value);\n }\n pop():any {\n const self = this;\n logger.debug(\"VALUE POPPED\");\n return self.source.pop();\n }\n _new_(source: ArrayList):void {\n const self = this;\n let _index = 0;\n self.source = New(ClassFactory(\"ArrayList\"), source);\n for (const _k in self.source) {\n if (!isNaN(_k as any)) {\n logger.debug(\"binding \" + _k.toString());\n (function (_pname:any) {\n Object.defineProperty(self, _pname, {\n set(value) {\n logger.debug(\"setting \" + _pname + \"=\" + value);\n self.source[_pname] = value;\n self.changed(_pname, value);\n },\n get():unknown {\n return self.source[_pname];\n }\n });\n })(_k);\n _index++;\n }\n\n }\n self.source.length = _index;\n Object.defineProperty(self, \"length\", {\n get() {\n return self.source.length;\n }\n });\n }\n}\n\n", "import { IQCObjectsElement, ITagElements } from \"./types/global\";\nimport { ClassFactory } from \"./ClassFactory\";\nimport { New } from \"./New\";\nimport { Package } from \"./Package\";\nimport { isBrowser } from \"./platform\";\nimport { Effect } from \"./Effect\";\nimport { ArrayList } from \"./ArrayCollection\";\n\nexport class TagElements extends ArrayList implements ITagElements {\n show():void {\n this.map(function (element:any) {\n return element.style.opacity = 1;\n });\n }\n hide():void {\n this.map(function (element:any) {\n return element.style.opacity = 0;\n });\n }\n effect(...args:T[]):void {\n const effectArguments = [...args].slice(1);\n const effectClassName = args[0] as string;\n let effectClass = undefined;\n if ((typeof effectClassName).toLowerCase() === \"string\") {\n effectClass = ClassFactory(effectClassName);\n }\n this.map(function (element:any):T {\n return ((effectClass as Effect).apply as Function).apply(effectClass, [element].concat(effectArguments)) as T;\n });\n }\n findElements(elementName:any):any {\n const _o = New(ClassFactory(\"TagElements\"));\n if (isBrowser) {\n for (const _k in this) {\n if (typeof _k === \"number\" && typeof this[_k] !== \"function\" && Object.hasOwn(this[_k], \"subelements\")) {\n _o.push(this[_k].subelements(elementName));\n }\n }\n } else {\n // not yet implemented.\n }\n return _o;\n }\n }\n\n /**\n * Gets the element of DOM found by tag name\n *\n * @param {Object} tagname\n * @param {Object} innerHTML\n */\n export const Tag = function (tagname:string, innerHTML?:string): T[] {\n const _o = New(TagElements);\n if (isBrowser) {\n const o = (document as unknown as IQCObjectsElement).subelements(tagname);\n const addedKeys = [];\n for (let _i = 0; _i < o.length; _i++) {\n if (typeof innerHTML !== \"undefined\" && Object.hasOwn(o[_i], \"innerHTML\")) {\n o[_i].innerHTML = innerHTML;\n }\n if (addedKeys.indexOf(_i) < 0) {\n _o.push(o[_i]);\n addedKeys.push(_i);\n }\n }\n } else {\n // not yet implemented.\n }\n return _o as T[];\n };\n\n\n Package(\"com.qcobjects\",[\n TagElements,\n Tag\n ]);", "import { _Crypt } from \"./Crypt\";\n\nexport const shortCode = (): string => {\n const length = 1000;\n const code1 = _Crypt.encrypt((Math.random() * length).toString().replace(\".\", \"\"), (new Date()).getTime().toString());\n const code2 = _Crypt.encrypt((Math.random() * length).toString().replace(\".\", \"\"), (new Date((new Date()).getTime() - 1000 * 1000)).getTime().toString());\n const shortCode = [...code2].map((o1: any, index: any): any => {\n return [...code1][index] === o1 ? null : o1;\n }).filter((c: any) => c !== null).join(\"\");\n return shortCode;\n};\n", "import { ClassFactory } from \"./ClassFactory\";\n\n/**\n * Returns a method from a superior QCObjects Class\n * It is useful for Class Inheritance in the _new_ and __new__ method constructors\n * @example _super_('MySuperClass','MySuperMethod').call(this,params) #where this is the current instance and params are method parameters\n *\n * @param {String} className\n * @param {String} classMethodName\n * @param {Object} params\n */\nexport const _super_ = function (className: string, classMethodName: string):T {\n return (ClassFactory(className))[classMethodName] as T;\n};\n_super_.prototype.toString = function () {\n return \"_super_(className,classMethodName,params) { [QCObjects native code] }\";\n};\n", "import { logger } from \"./Logger\";\n\nexport const waitUntil = (func:()=>void, exp:()=>any):void => {\n const _waitUntil = (func:()=>void, exp:()=>any):void => {\n const maxWaitCycles = 2000;\n let _w = 0;\n var _t = setInterval(function () {\n if (exp()) {\n clearInterval(_t);\n func();\n logger.debug(\"Ejecuting \" + func.name + \" after wait\");\n } else {\n if (_w < maxWaitCycles) {\n _w += 1;\n logger.debug(\"WAIT UNTIL \" + func.name + \" is true, \" + _w.toString() + \" cycles\");\n } else {\n logger.debug(\"Max execution time for \" + func.name + \" expression until true\");\n clearInterval(_t);\n }\n }\n }, 1);\n };\n setTimeout(function () {\n _waitUntil(func, exp);\n }, 1);\n };\n", "export const subelements = function subelements(this: any, query: string): T[] {\n const _self = this;\n return [..._self.querySelectorAll(query)] as T[];\n};", "import { CONFIG } from \"./CONFIG\";\nimport { findPackageNodePath } from \"./findPackageNodePath\";\nimport { Import } from \"./Import\";\nimport { logger } from \"./Logger\";\nimport { _require_, isBrowser, isNodeCommonJS } from \"./platform\";\n\nconst loadSDK = ():void => {\n if (CONFIG.get(\"useSDK\")) {\n (function () {\n const remoteImportsPath = CONFIG.get(\"remoteImportsPath\");\n const external = (!CONFIG.get(\"useLocalSDK\"));\n CONFIG.set(\"remoteImportsPath\", CONFIG.get(\"remoteSDKPath\"));\n\n let tryImportingSDK = false;\n let sdkName = \"QCObjects-SDK\";\n if (isBrowser) {\n tryImportingSDK = true;\n } else {\n const sdkPath = findPackageNodePath(\"qcobjects-sdk\");\n if (sdkPath !== null) {\n sdkName = \"qcobjects-sdk\";\n tryImportingSDK = true;\n } else if (sdkPath !== \"\"){\n sdkName = \"node_modules/qcobjects-sdk/QCObjects-SDK\";\n tryImportingSDK = true;\n } else {\n tryImportingSDK = false;\n }\n }\n\n if (tryImportingSDK) {\n logger.info(\"Importing SDK... \" + sdkName);\n if (isNodeCommonJS && typeof require !== \"undefined\") {\n const sdk = _require_(\"qcobjects-sdk\");\n if (sdk) {\n logger.debug(\"QCObjects SDK was loaded OK.\");\n } else {\n logger.debug(\"QCObjects SDK could not be imported.\");\n }\n } else {\n Import(sdkName, function () {\n if (external) {\n logger.debug(\"QCObjects-SDK.js loaded from remote location\");\n } else {\n logger.debug(\"QCObjects-SDK.js loaded from local\");\n }\n CONFIG.set(\"remoteImportsPath\", remoteImportsPath);\n }, external)\n ?.catch((e: any) => { throw new Error(`An error ocurred when trying to import: ${e}`); });\n }\n } else {\n logger.debug(\"SDK has not been imported as it is not available at the moment\");\n }\n })();\n }\n\n};\n\nexport default loadSDK;\n", "import { IQCObjectsElement, IQCObjectsShadowedElement } from \"./types/global\";\nimport { _top } from \"./top\";\nimport { _fireAsyncLoad, asyncLoad } from \"./asyncLoad\";\nimport { captureFalseTouch } from \"./captureFalseTouch\";\nimport { _Cast } from \"./Cast\";\nimport { Class } from \"./Class\";\nimport { ClassFactory } from \"./ClassFactory\";\nimport { Component } from \"./Component\";\nimport { ComponentURI } from \"./ComponentFactory\";\nimport { componentLoader } from \"./componentLoader\";\nimport { CONFIG } from \"./CONFIG\";\nimport { _DataStringify } from \"./DataStringify\";\nimport { setDefaultProcessors } from \"./defaultProcessors\";\nimport { Export } from \"./Export\";\nimport { Import } from \"./Import\";\nimport { _methods_, _protected_code_ } from \"./introspection\";\nimport { isQCObjects_Class, isQCObjects_Object } from \"./isQCObjects\";\nimport { logger } from \"./Logger\";\nimport { __to_number } from \"./mathFunctions\";\nimport { NamespaceRef } from \"./NamespaceRef\";\nimport { New } from \"./New\";\nimport { ObjectName } from \"./ObjectName\";\nimport { Package } from \"./Package\";\nimport { is_phonegap, isBrowser } from \"./platform\";\nimport { _Ready, ready, Ready } from \"./Ready\";\nimport { serviceLoader } from \"./serviceLoader\";\nimport { Tag } from \"./Tag\";\nimport { Processor } from \"./Processor\";\nimport { is_a } from \"./is_a\";\nimport { __getType__ } from \"./getType\";\nimport { shortCode } from \"./shortCode\";\nimport { _DOMCreateElement } from \"./DOMCreateElement\";\nimport { ComplexStorageCache } from \"./ComplexStorageCache\";\nimport { _super_ } from \"./super\";\nimport { waitUntil } from \"./waitUntil\";\nimport { subelements } from \"./subelements\";\nimport { GlobalSettings } from \"./globalSettings\";\nimport loadSDK from \"./loadSDK\";\nimport { range } from \"./range\";\n\n(function __qcobjects__(_top: any) {\n if (typeof Object.defineProperty !== \"undefined\" && typeof _top !== \"undefined\") {\n try {\n Object.defineProperty(_top, \"__qcobjects__\", {\n enumerable: true,\n configurable: false,\n writable: false,\n value: __qcobjects__,\n });\n } catch (e: any) {\n logger.debug(`An error ocurred: ${e}`);\n if (typeof _top.__qcobjects__ !== \"undefined\") {\n _top.__qcobjects__.loaded = true;\n }\n }\n }\n if (typeof _top.__qcobjects__.loaded === \"undefined\") {\n _top.__qcobjects__.loaded = true;\n\n if (isBrowser) {\n (Element as unknown as IQCObjectsElement).prototype.subelements = subelements;\n (Document as unknown as IQCObjectsElement).prototype.subelements = subelements;\n (HTMLElement as unknown as IQCObjectsElement).prototype.subelements = subelements;\n if (typeof ShadowRoot !== \"undefined\") {\n (ShadowRoot as unknown as IQCObjectsShadowedElement).prototype.subelements = subelements;\n }\n }\n\n\n logger.debugEnabled = false;\n logger.infoEnabled = true;\n\n /**\n * Basic Type of all elements\n */\n if (isBrowser) {\n (Element as unknown as IQCObjectsElement).prototype.find = function (tag: string): IQCObjectsElement[] {\n const _self = this;\n const _oo: IQCObjectsElement[] = [];\n const _tags = (document as unknown as IQCObjectsElement).subelements(tag);\n _tags.map((_tt, _t) => {\n if ((typeof _tags[_t] !== \"undefined\") && (_tags[_t].parentNode as Element).tagName === _self.parentNode.tagName) {\n _oo.push(_Cast(_tt, (new Object())));\n }\n return _tt;\n });\n return _oo;\n };\n }\n\n if (isBrowser) {\n Element.prototype.append = function QC_Append(child) {\n if (isQCObjects_Object(child) || typeof (child as any).body !== \"undefined\") {\n this.appendChild((child as any).body);\n } else {\n this.appendChild(child as any);\n }\n };\n\n /**\n * A replacement for direct using of innerHTML\n * use: [element].render('content') where 'content' is the string corresponding\n * to the DOM to insert in the element\n **/\n (Element as unknown as IQCObjectsElement).prototype.render = function QC_Render(content: string) {\n const _self = this;\n const _appendVDOM = (_self: any, content: string): any => {\n if (typeof document.implementation.createHTMLDocument !== \"undefined\") {\n const doc = document.implementation.createHTMLDocument(\"\");\n doc.body.innerHTML = content;\n (doc.body as unknown as IQCObjectsElement).subelements(\"*\").map((element): any => {\n return _self.append(element);\n });\n }\n };\n if (typeof this.innerHTML !== \"undefined\") {\n try {\n this.innerHTML += content;\n } catch (e: any) {\n logger.debug(`An error ocurred: ${e}`);\n _appendVDOM(_self, content);\n }\n } else {\n _appendVDOM(_self, content);\n }\n };\n }\n\n\n\n Export(waitUntil);\n Export(_super_);\n Export(ComplexStorageCache);\n Export(ClassFactory);\n Export(_DOMCreateElement);\n Export(shortCode);\n Export(__getType__);\n Export(is_a);\n Package(\"com.qcobjects\", [Processor]);\n\n\n\n\n if (isBrowser) {\n /**\n * Adds a Cast functionality to every Element of DOM\n */\n (Element as unknown as IQCObjectsElement).prototype.Cast = function QC_Cast(_o: T): T {\n const _self: any = this;\n return _Cast(_self, _o) as T;\n };\n }\n\n\n\n if (isBrowser) {\n window.onload = _Ready;\n if (is_phonegap) {\n document.addEventListener(\"deviceready\", _Ready, captureFalseTouch as any);\n }\n } else {\n global.onload = _Ready;\n }\n\n if (isBrowser) {\n window.addEventListener(\"popstate\", function (popStateEvent) {\n popStateEvent.stopImmediatePropagation();\n popStateEvent.stopPropagation();\n Component.route()\n .catch((e: any) => { throw new Error(`An error ocurred when trying to load initial routes. ${e}`); });\n });\n }\n\n\n\n Export(serviceLoader);\n Export(componentLoader);\n Export(ComponentURI);\n Export(ObjectName);\n Export(_DataStringify);\n Export(isQCObjects_Class);\n Export(isQCObjects_Object);\n Export(NamespaceRef);\n\n /**\n * Array math functions\n */\n // eslint-disable-next-line no-unused-vars\n (Array as any).prototype.unique = function (this: T[]): T[] {\n return this.filter(function (value: any, index: any, self: any) {\n return self.indexOf(value) === index;\n });\n };\n (Array as any).unique = function (a: Array): T[] {\n return (a as any).unique() as T[];\n };\n (_protected_code_)((Array as any).unique);\n (_protected_code_)((Array as any).prototype.unique);\n (Array as any).prototype.table = function (): void {\n console.table(this);\n };\n (Array as any).table = function (a: any): void {\n a.table();\n return;\n };\n (_protected_code_)((Array as any).table);\n (_protected_code_)((Array as any).prototype.table);\n (Array as any).prototype.sum = function (): number {\n return this.reduce(function (prev: any, current: any) {\n return (__to_number(prev)) + (__to_number(current));\n }, 0) as number;\n };\n (Array as any).sum = function (a: any): number {\n return a.sum() as number;\n };\n (_protected_code_)((Array as any).sum);\n (_protected_code_)((Array as any).prototype.sum);\n (Array as any).prototype.avg = function (): number {\n return (this.length < 1) ? (0) : (this.reduce(function (prev: any, current: any) {\n return (((__to_number(prev)) + (__to_number(current))) / 2);\n })) as number;\n };\n (Array as any).avg = function (a: any): number {\n return a.avg() as number;\n };\n (_protected_code_)((Array as any).avg);\n (_protected_code_)((Array as any).prototype.avg);\n (Array as any).prototype.min = function (): number {\n return this.reduce(function (prev: number, current: number) {\n return (__to_number(prev) <= __to_number(current)) ? (prev) : (current);\n }, Infinity) as number;\n };\n (Array as any).min = function (a: any): number {\n return a.min() as number;\n };\n (_protected_code_)((Array as any).min);\n (_protected_code_)((Array as any).prototype.min);\n (Array as any).prototype.max = function (): number {\n return this.reduce(function (prev: number, current: number) {\n return (__to_number(prev) >= __to_number(current)) ? (prev) : (current);\n }, 0) as number;\n };\n (Array as any).max = function (a: any): number {\n return a.max() as number;\n };\n (_protected_code_)((Array as any).max);\n (_protected_code_)((Array as any).prototype.max);\n (Array as any).prototype.sortBy = function (propName: string, sortAsc = true): Array[] {\n const sort_function = (sortAsc) ? (\n function (prev: any, current: any) {\n return current[propName] < prev[propName] ? 1 : -1;\n }\n ) : (\n function (prev: any, current: any) {\n return current[propName] > prev[propName] ? 1 : -1;\n }\n );\n return this.sort(sort_function) as Array[];\n };\n (Array as any).sortBy = function (a: any, propName: string, sortAsc = true): Array[] {\n return a.sortBy(propName, sortAsc) as Array[];\n };\n (_protected_code_)((Array as any).sortBy);\n (_protected_code_)((Array as any).prototype.sortBy);\n\n /**\n * Extends the Array prototype to include a method that creates a matrix (2D array)\n * with specified dimensions and fill value.\n *\n * @param {number} _length - The number of rows in the matrix.\n * @param {any} [_fillValue=0] - The value to fill the matrix with (default is 0).\n * @returns {Array>} A 2D array (matrix) filled with the specified value.\n *\n * @example\n * // Create a 3x3 matrix filled with zeros\n * const matrix = [].matrix(3);\n * console.log(matrix);\n * // Output: [0, 0, 0]\n *\n * @example\n * // Create a 2x4 matrix filled with a specific value\n * const matrix = [].matrix(2, 5);\n * console.log(matrix);\n * // Output: [5, 5]\n *\n * @example\n * // Create a 4x2 matrix filled with null values\n * const matrix = [].matrix(4, null);\n * console.log(matrix);\n * // Output: [null, null, null, null]\n */\n (Array as any).prototype.matrix = function (_length: number, _fillValue = 0) {\n // eslint-disable-next-line no-unused-vars\n const x_func = function (x = undefined) {\n return _fillValue;\n };\n return Array.from({\n length: _length\n }, x_func);\n };\n\n /**\n * Creates a matrix (2D array) from a given array.\n * \n * This function extends the Array constructor by adding a static method\n * that generates a matrix with specified dimensions and fill value.\n * \n * @function\n * @param {Array} a - The input array used to generate the matrix.\n * @param {number} _length - The length of the matrix (number of rows).\n * @param {number} [_fillValue=0] - The value to fill the matrix with (default is 0).\n * @returns {Array} A 2D array (matrix) created from the input parameters.\n * \n * @example\n * const myMatrix = Array.matrix(2, 5);\n * // myMatrix will be [5, 5, 5]\n */\n (Array as any).matrix = function (a: any, _length: number, _fillValue = 0): T[] {\n return a.matrix(_length, _fillValue) as T[];\n };\n\n (_protected_code_)((Array as any).matrix);\n (_protected_code_)((Array as any).prototype.matrix);\n\n\n (Array as any).prototype.matrix2d = function (_length: number, _fillValue = 0) {\n // eslint-disable-next-line no-unused-vars\n const y_func = function (y: any) {\n return _fillValue;\n };\n // eslint-disable-next-line no-unused-vars\n const x_func = function (x: any) {\n return Array.from({\n length: _length\n }, y_func);\n };\n return Array.from({\n length: _length\n }, x_func);\n };\n (Array as any).matrix2d = function (a: any, _length: number, _fillValue = 0): T[][] {\n return a.matrix2d(_length, _fillValue) as T[][];\n };\n\n (_protected_code_)((Array as any).matrix2d);\n (_protected_code_)((Array as any).prototype.matrix2d);\n\n (Array as any).prototype.matrix3d = function (_length: number, _fillValue = 0) {\n // eslint-disable-next-line no-unused-vars\n const y_func = function (y: any) {\n return Array.from({\n length: _length\n }, function () {\n return _fillValue;\n });\n };\n // eslint-disable-next-line no-unused-vars\n const x_func = function (x: any) {\n return Array.from({\n length: _length\n }, y_func);\n };\n return Array.from({\n length: _length\n }, x_func);\n };\n\n (Array as any).matrix3d = function (a: any, _length: number, _fillValue = 0): T[][][] {\n return a.matrix3d(_length, _fillValue) as T[][][];\n };\n\n\n (_protected_code_)((Array as any).matrix3d);\n (_protected_code_)((Array as any).prototype.matrix3d);\n\n\n\n (String as unknown as any).prototype.list = function (): string[] {\n const __instance = this;\n return range(0, __instance.length - 1).map(function (i: any): T {\n return __instance[i] as T;\n }) as string[];\n };\n (_protected_code_)((String as unknown as any).prototype.list);\n\n\n\n /**\n * End of array math functions\n */\n\n\n\n setDefaultProcessors();\n\n\n /**\n * Load every component tag declared in the body\n **/\n Ready(function () {\n if (!CONFIG.get(\"useSDK\")) {\n GlobalSettings.__start__()\n .catch((e: any) => {\n throw Error(e);\n });\n }\n });\n\n /*\n Public variables and functions\n */\n Export(Export); /* exports the same Export function once */\n Export(Import);\n Export(Package);\n Export(Class);\n Export(New);\n Export(Tag);\n Export(Ready);\n Export(ready);\n Export(isBrowser);\n Export(_methods_);\n Export(GlobalSettings);\n\n\n (loadSDK)();\n\n if (isBrowser) {\n asyncLoad(function (): any {\n Ready(function () {\n\n /*\n * scroll management custom events\n * usage: document.addEventListener('percentY90',function(e){console.log(e.detail.percentY)});\n * possible events: scrollpercent, defaultscroll, percentY0, percentY25, percentY50, percentY75, percentY90\n */\n\n (function (_top) {\n let ticking = false;\n const scrollHeight = Math.max(\n document.body.scrollHeight, document.documentElement.scrollHeight,\n document.body.offsetHeight, document.documentElement.offsetHeight,\n document.body.clientHeight, document.documentElement.clientHeight\n );\n\n const scrollWidth = Math.max(\n document.body.scrollWidth, document.documentElement.scrollWidth,\n document.body.offsetWidth, document.documentElement.offsetWidth,\n document.body.clientWidth, document.documentElement.clientWidth\n );\n\n function scrollDispatcher(event: any) {\n const percentY = Math.round(_top.scrollY * 100 / scrollHeight);\n const percentX = Math.round(_top.scrollX * 100 / scrollWidth);\n const scrollPercentEventEvent = new CustomEvent(\"scrollpercent\", {\n detail: {\n percentX,\n percentY\n }\n });\n event.target.dispatchEvent(scrollPercentEventEvent);\n let secondaryEventName = \"defaultscroll\";\n const __valid_scrolls__ = [0, 5, 10, 25, 50, 75, 90, 95, 100];\n __valid_scrolls__.filter(function (p) {\n return p === percentY;\n }).map(function (pY: T): T {\n secondaryEventName = \"percentY\" + percentY.toString();\n const secondaryCustomEvent = new CustomEvent(secondaryEventName, {\n detail: {\n percentX,\n percentY\n }\n });\n event.target.dispatchEvent(secondaryCustomEvent);\n return pY;\n });\n\n }\n\n document.addEventListener(\"scroll\", function (event) {\n\n if (!ticking) {\n requestAnimationFrame(function () {\n scrollDispatcher(event);\n ticking = false;\n });\n\n ticking = true;\n }\n });\n\n })(_top);\n\n });\n }, []);\n }\n\n if (!isBrowser) {\n if (typeof _top.global !== \"undefined\" && Object.hasOwn(_top.global, \"_fireAsyncLoad\")) {\n _fireAsyncLoad.call(_top);\n }\n if (typeof _top.global !== \"undefined\" && Object.hasOwn(_top.global, \"onload\")) {\n _top.global.onload.call(_top);\n }\n }\n\n\n /* Freezing Object && Object.prototype to prevent prototype pollution risks */\n (function (isBrowser) {\n const __freeze__ = function () {\n Object.freeze(Object.prototype);\n Object.freeze(Object);\n };\n if (isBrowser && CONFIG.get(\"secureObjects\", false)) {\n Ready(function () {\n __freeze__();\n });\n } else if (CONFIG.get(\"secureObjects\", false)) {\n __freeze__();\n }\n })(isBrowser);\n }\n\n})(_top);\n", "/**\n * QCObjects 2.4\n * ________________\n *\n * Author: Jean Machuca \n *\n * Cross Browser Javascript Framework for MVC Patterns\n * QuickCorp/QCObjects is licensed under the\n * GNU Lesser General Public License v3.0\n * [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)\n *\n * Permissions of this copyleft license are conditioned on making available\n * complete source code of licensed works and modifications under the same\n * license or the GNU GPLv3. Copyright and license notices must be preserved.\n * Contributors provide an express grant of patent rights. However, a larger\n * work using the licensed work through interfaces provided by the licensed\n * work may be distributed under different terms and without source code for\n * the larger work.\n *\n * Copyright (C) 2015 Jean Machuca,\n *\n * Everyone is permitted to copy and distribute verbatim copies of this\n * license document, but changing it is not allowed.\n */\n/* eslint no-unused-vars: \"off\" */\n/* eslint no-redeclare: \"off\" */\n/* eslint no-empty: \"off\" */\n/* eslint strict: \"off\" */\n\n/* eslint no-mixed-operators: \"off\" */\n\n\"use strict\";\n\nexport * as AssignPolyfill from \"./assign\";\nexport * as __top__ from \"./top\";\nexport * as qcobjects from \"./MainProcess\";\nexport {_top, resetTop} from \"./top\";\nexport { _QC_CLASSES, _QC_PACKAGES, _QC_PACKAGES_IMPORTED, _QC_READY_LISTENERS } from \"./PrimaryCollections\";\nexport { _DataStringify } from \"./DataStringify\";\nexport { _DOMCreateElement } from \"./DOMCreateElement\";\nexport { _methods_, _protected_code_ } from \"./introspection\";\nexport { logger, Logger } from \"./Logger\";\nexport { _require_, is_phonegap, isBrowser, isNodeCommonJS } from \"./platform\";\nexport { subelements } from \"./subelements\";\nexport { __is_raw_class__ } from \"./is_raw_class\";\nexport { _LegacyCopy } from \"./LegacyCopy\";\nexport { _fireAsyncLoad, asyncLoad } from \"./asyncLoad\";\nexport { __instanceID } from \"./IncrementInstanceID\";\nexport { ObjectName } from \"./ObjectName\";\nexport { __getType__ } from \"./getType\";\nexport { is_a } from \"./is_a\";\nexport { ComplexStorageCache } from \"./ComplexStorageCache\";\nexport { waitUntil } from \"./waitUntil\";\nexport { _Cast, _CastProps } from \"./Cast\";\nexport { isQCObjects_Class, isQCObjects_Object } from \"./isQCObjects\";\nexport { Package } from \"./Package\";\nexport { ClassFactory } from \"./ClassFactory\";\nexport { Export } from \"./Export\";\nexport { Class } from \"./Class\";\nexport { InheritClass } from \"./InheritClass\";\nexport { _super_ } from \"./super\";\nexport { shortCode } from \"./shortCode\";\nexport { Processor } from \"./Processor\";\nexport { New } from \"./New\";\nexport { _Ready, ready, Ready } from \"./Ready\";\nexport { captureFalseTouch } from \"./captureFalseTouch\";\nexport { serviceLoader } from \"./serviceLoader\";\nexport { componentLoader } from \"./componentLoader\";\nexport { _buildComponentsFromElements_, ComponentURI } from \"./ComponentFactory\";\nexport { NamespaceRef } from \"./NamespaceRef\";\nexport { setDefaultProcessors } from \"./defaultProcessors\";\nexport { Tag, TagElements } from \"./Tag\";\nexport { Import } from \"./Import\";\nexport { BackendMicroservice } from \"./BackendMicroservice\";\nexport { Component } from \"./Component\";\nexport { _Crypt } from \"./Crypt\";\nexport { DefaultTemplateHandler } from \"./DefaultTemplateHandler\";\nexport { SourceJS } from \"./SourceJS\";\nexport { SourceCSS } from \"./SourceCSS\";\nexport { GlobalSettings } from \"./globalSettings\";\nexport { RegisterClass } from \"./RegisterClass\";\nexport { _ComponentWidget_, RegisterWidget, RegisterWidgets } from \"./WidgetsFactory\";\nexport { CONFIG } from \"./CONFIG\";\nexport { Controller } from \"./Controller\";\nexport { View } from \"./View\";\nexport { ConfigService, JSONService, Service } from \"./Service\";\nexport { VO } from \"./VO\";\nexport { Effect } from \"./Effect\";\nexport { TransitionEffect } from \"./TransitionEffect\";\nexport { Timer } from \"./Timer\";\nexport { _tag_filter_ } from \"./tag_filter\";\nexport { range } from \"./range\";\nexport { ArrayCollection, ArrayList } from \"./ArrayCollection\";\nexport { DDO } from \"./DDO\";\nexport { Toggle } from \"./Toggle\";\nexport { findPackageNodePath } from \"./findPackageNodePath\";\nexport { getDocumentLayout } from \"./DocumentLayout\";\nexport { IQCObjectsElement, IQCObjectsShadowedElement } from \"./types/global\";\nexport { __to_number } from \"./mathFunctions\";\nexport {_top as global} from \"./top\";\nexport {__make_global__} from \"./make_global\";\nexport {get, set} from \"./top\";\n", " // Object.assign Polyfilling\n // Reference: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign#Polyfill\n if (typeof Object.assign !== \"function\") {\n // Must be writable: true, enumerable: false, configurable: true\n Object.defineProperty(Object, \"assign\", {\n // eslint-disable-next-line no-unused-vars\n value: function assign(target: null, varArgs: any):any { // .length of function is 2\n \"use strict\";\n if (target === null) { // TypeError if undefined or null\n throw new TypeError(\"Cannot convert undefined or null to object\");\n }\n \n const to = Object(target);\n \n for (let index = 1; index < arguments.length; index++) {\n // eslint-disable-next-line prefer-rest-params\n const nextSource = arguments[index];\n \n if (nextSource !== null) { // Skip over if undefined or null\n for (const nextKey in nextSource) {\n // Avoid bugs when hasOwnProperty is shadowed\n if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {\n to[nextKey] = nextSource[nextKey];\n }\n }\n }\n }\n return to;\n },\n writable: true,\n configurable: true\n });\n }\nexport {};", "import { Http2Stream } from \"http2\";\nimport { Stream } from \"stream\";\nimport { _basePath_ } from \"./basePath\";\nimport { _DataStringify } from \"./DataStringify\";\nimport { _domain_ } from \"./domain\";\nimport { InheritClass } from \"./InheritClass\";\nimport { logger } from \"./Logger\";\nimport { Package } from \"./Package\";\nimport { IMicroservice } from \"./types/global\";\n\nexport class BackendMicroservice extends InheritClass {\n stream: any;\n route: any;\n headers: any;\n request: any;\n\n constructor({\n domain = _domain_,\n basePath = _basePath_,\n body = null,\n stream = null,\n request = null\n }:IMicroservice) {\n super({\n domain,\n basePath,\n body,\n stream,\n request\n });\n logger.debug(\"Initializing BackendMicroservice...\");\n const microservice = this;\n if (typeof this.body === \"undefined\") {\n this.body = null;\n }\n if (typeof body !== \"undefined\") {\n this.body = body;\n }\n this.cors();\n microservice.stream = stream;\n (stream as any)?.on(\"data\", (data: any) => {\n // data from POST, GET\n const requestMethod = (request as any)?.method.toLowerCase();\n const supportedMethods = {\n \"post\": microservice.post.bind(microservice),\n };\n if (Object.hasOwn(supportedMethods, requestMethod)) {\n (supportedMethods as any)[requestMethod].call(microservice, data);\n }\n });\n\n // data from POST, GET\n const requestMethod = (request as any)?.method.toLowerCase();\n const supportedMethods = {\n \"get\": microservice.get.bind(microservice),\n \"head\": microservice.head.bind(microservice),\n \"put\": microservice.put.bind(microservice),\n \"delete\": microservice.delete.bind(microservice),\n \"connect\": microservice.connect.bind(microservice),\n \"options\": microservice.options.bind(microservice),\n \"trace\": microservice.trace.bind(microservice),\n \"patch\": microservice.patch.bind(microservice)\n };\n if (Object.hasOwn(supportedMethods, requestMethod)) {\n (supportedMethods as any)[requestMethod].call(microservice);\n }\n\n\n }\n\n cors():void {\n if (this.route.cors) {\n logger.debug(\"Validating CORS...\");\n const {\n allow_origins,\n allow_credentials,\n allow_methods,\n allow_headers\n } = this.route.cors;\n const microservice = this;\n if (typeof microservice.headers !== \"object\") {\n microservice.headers = {};\n }\n if (typeof microservice.route.responseHeaders !== \"object\") {\n microservice.route.responseHeaders = {};\n }\n if (typeof allow_origins !== \"undefined\") {\n logger.debug(\"CORS: allow_origins available. Validating origins...\");\n // an example of allow_origins is ['https://example.com','http://www.example.com']\n if (allow_origins === \"*\" || (typeof microservice.request.headers.origin === \"undefined\") || [...allow_origins].indexOf(microservice.request.headers.origin) !== -1) {\n // for compatibility with all browsers allways return a wildcard when the origin is allowed\n logger.debug(\"CORS: Adding header Access-Control-Allow-Origin=*\");\n microservice.route.responseHeaders[\"Access-Control-Allow-Origin\"] = \"*\";\n } else {\n logger.debug(\"CORS: Origin is not allowed: \" + microservice.request.headers.origin);\n logger.debug(\"CORS: Forcing to finish the response...\");\n this.body = {};\n try {\n this.done();\n } catch (e:any) {\n logger.debug(`It was not possible to finish the call to the microservice: ${e}`);\n }\n }\n } else {\n logger.debug(\"CORS: no allow_origins available. Allowing all origins...\");\n logger.debug(\"CORS: Adding header Access-Control-Allow-Origin=*\");\n microservice.route.responseHeaders[\"Access-Control-Allow-Origin\"] = \"*\";\n }\n if (typeof allow_credentials !== \"undefined\") {\n logger.debug(`CORS: allow_credentials present. Allowing ${allow_credentials}...`);\n microservice.route.responseHeaders[\"Access-Control-Allow-Credentials\"] = allow_credentials.toString();\n } else {\n logger.debug(\"CORS: No allow_credentials present. Allowing all credentials.\");\n microservice.route.responseHeaders[\"Access-Control-Allow-Credentials\"] = \"true\";\n }\n if (typeof allow_methods !== \"undefined\") {\n logger.debug(`CORS: allow_methods present. Allowing ${allow_methods}...`);\n microservice.route.responseHeaders[\"Access-Control-Allow-Methods\"] = [...allow_methods].join(\",\");\n } else {\n logger.debug(\"CORS: No allow_methods present. Allowing only GET, OPTIONS and POST\");\n microservice.route.responseHeaders[\"Access-Control-Allow-Methods\"] = \"GET, OPTIONS, POST\";\n }\n if (typeof allow_headers !== \"undefined\") {\n logger.debug(`CORS: allow_headers present. Allowing ${allow_headers}...`);\n microservice.route.responseHeaders[\"Access-Control-Allow-Headers\"] = [...allow_headers].join(\",\");\n } else {\n logger.debug(\"CORS: No allow_headers present. Allowing all headers...\");\n microservice.route.responseHeaders[\"Access-Control-Allow-Headers\"] = \"*\";\n }\n } else {\n logger.debug(\"No CORS validation available. You can specify cors in CONFIG.backend.routes[].cors\");\n }\n }\n\n\n head(formData: any):void {\n logger.debug(`[BackendMicroservice.head] Data received: ${_DataStringify(formData)}`);\n this.done();\n }\n\n get(formData: any):void {\n logger.debug(`[BackendMicroservice.get] Data received: ${_DataStringify(formData)}`);\n this.done();\n }\n\n post(formData: any):void {\n logger.debug(`[BackendMicroservice.post] Data received: ${_DataStringify(formData)}`);\n this.done();\n }\n\n put(formData: any):void {\n logger.debug(`[BackendMicroservice.put] Data received: ${_DataStringify(formData)}`);\n this.done();\n }\n\n delete(formData: any):void {\n logger.debug(`[BackendMicroservice.delete] Data received: ${_DataStringify(formData)}`);\n this.done();\n }\n\n connect(formData: any):void {\n logger.debug(`[BackendMicroservice.connect] Data received: ${_DataStringify(formData)}`);\n this.done();\n }\n\n options(formData: any):void {\n logger.debug(`[BackendMicroservice.options] Data received: ${_DataStringify(formData)}`);\n this.done();\n }\n\n trace(formData: any):void {\n logger.debug(`[BackendMicroservice.trace] Data received: ${_DataStringify(formData)}`);\n this.done();\n }\n\n patch(formData: any):void {\n logger.debug(`[BackendMicroservice.patch] Data received: ${_DataStringify(formData)}`);\n this.done();\n }\n\n finishWithBody(stream?: Http2Stream | Stream):void {\n try {\n logger.debug(\"[BackendMicroservice.finishWithBody] Ending the stream...\");\n logger.debug(`[BackendMicroservice.finishWithBody] type of body is: ${typeof this.body}`);\n if (typeof this.body !== \"string\") {\n this.body = _DataStringify(this.body);\n }\n logger.debug(`[BackendMicroservice.finishWithBody] \\n body: ${this.body} `);\n (stream as any)?.write(this.body);\n (stream as any)?.end();\n logger.debug(\"[BackendMicroservice.finishWithBody] Stream ended.\");\n } catch (e:any) {\n logger.debug(`[BackendMicroservice.finishWithBody] Something went wrong ending the stream: ${e}`);\n }\n }\n\n done():void {\n logger.debug(\"[BackendMicroservice.done] Finalizing the response...\");\n const microservice = this;\n const stream = microservice.stream;\n try {\n logger.debug(\"[BackendMicroservice.done] Sending response headers...\");\n if (microservice.route.responseHeaders) {\n logger.debug(`[BackendMicroservice.done] Response headers present: ${Object.keys(microservice.route.responseHeaders).join(\",\")}`);\n stream.respond(microservice.route.responseHeaders);\n } else {\n throw Error(\"[BackendMicroservice.done] No headers present.\");\n }\n } catch (e:any) {\n logger.debug(`[BackendMicroservice.done] Something went wrong sending response headers: ${e}`);\n }\n if (microservice.body !== null) {\n try {\n logger.debug(\"[BackendMicroservice.done] A body of message is present. Finalizing the response...\");\n microservice.finishWithBody.call(microservice, stream);\n } catch (e:any) {\n logger.debug(`[BackendMicroservice.done] Something went wrong finalizing the response: ${e}`);\n }\n } else {\n logger.debug(\"[BackendMicroservice.done] No body present. Ending stream...\");\n stream.end();\n }\n }\n\n\n}\n\nPackage(\"com.qcobjects.api\", [\n BackendMicroservice\n]);\n", "import { DefaultTemplateHandlerParams, IComponent } from \"./types/global\";\nimport { logger } from \"./Logger\";\nimport { GlobalProcessor as Processor } from \"./Processor\";\nimport { RegisterClass } from \"./RegisterClass\";\n\nexport class DefaultTemplateHandler {\n template = \"\";\n __definition = {};\n static __definition = {};\n component?: IComponent;\n\n constructor({ component, template }: DefaultTemplateHandlerParams) {\n this.component = component;\n this.template = template;\n }\n\n assign(data: any): string {\n const templateInstance = this;\n if (typeof templateInstance.component === \"undefined\") {\n throw new Error(\"DefaultTemplateHandler.assign: component is undefined\");\n }\n if (typeof templateInstance.component.processorHandler === \"undefined\") {\n throw new Error(\"DefaultTemplateHandler.assign: component.processorHandler is undefined\");\n }\n const processorHandler = templateInstance.component.processorHandler;\n processorHandler.component = templateInstance.component;\n let parsedAssignmentText = (typeof templateInstance.template !== \"undefined\") ? (templateInstance.template) : (\"\");\n if (typeof data === \"object\") {\n [...Object.keys(data)].map((k): any => {\n let _value = data[k];\n if (typeof _value === \"string\" || typeof _value === \"number\" || (!isNaN(_value))) {\n try {\n _value = Processor.processObject.bind(processorHandler).call(processorHandler, _value, templateInstance.component);\n parsedAssignmentText = parsedAssignmentText.replace((new RegExp(`{{${k}}}`, \"g\")), _value);\n } catch (e: any) {\n logger.warn(`${templateInstance.component?.name} could not parse processors.`);\n throw Error(`${templateInstance.component?.name} could not parse processors. Reason: ${e.message}`);\n }\n }\n return k;\n });\n } else {\n logger.debug(`${templateInstance.component?.name}.data is not an object`);\n }\n try {\n parsedAssignmentText = Processor.processObject.call(processorHandler, parsedAssignmentText, templateInstance.component);\n } catch (e: any) {\n logger.warn(`${templateInstance.component?.name} could not parse processors.`);\n throw Error(`${templateInstance.component?.name} could not parse processors. Reason: ${e.message}`);\n }\n return parsedAssignmentText;\n }\n\n}\nRegisterClass(DefaultTemplateHandler, \"com.qcobjects\");\n", "import { __make_global__ } from \"./make_global\";\nimport { __register_class__ } from \"./PrimaryCollections\";\n\n\n\nexport const RegisterClass = function (_class_:any, __namespace?:string):any {\n return __register_class__(_class_, __namespace);\n};\n__make_global__(RegisterClass);", "import { ISourceJS } from \"./types/global\";\nimport { _basePath_ } from \"./basePath\";\nimport { _Cast } from \"./Cast\";\nimport { _domain_ } from \"./domain\";\nimport { _DOMCreateElement } from \"./DOMCreateElement\";\nimport { InheritClass } from \"./InheritClass\";\nimport { Package } from \"./Package\";\nimport { logger } from \"./Logger\";\n\nexport class SourceJS extends InheritClass implements ISourceJS {\n domain:string= _domain_;\n basePath:string= _basePath_;\n type= \"text/javascript\";\n containerTag= \"body\";\n url= \"\";\n data= {};\n async= false;\n external= false;\n\n constructor(o:any){\n super(o);\n this.body= _DOMCreateElement(\"script\");\n\n }\n set(name:string, value:any):void {\n this[name] = value;\n }\n get(name:string, _default?:any):any {\n return this[name] || _default;\n }\n status= false;\n done():void { }\n fail():void { }\n rebuild():void {\n const context = this;\n try {\n document.getElementsByTagName(context.containerTag)[0].appendChild(\n (function (s:any, url:string, context:any):any {\n s.type = context.type;\n s.src = url;\n s.crossOrigin = (Object.hasOwn(context, \"crossOrigin\")) ? (context.crossOrigin) : (\"anonymous\");\n s.async = context.async;\n s.onreadystatechange = function () {\n if (this.readyState === \"complete\") {\n context.done.call(context);\n }\n };\n s.onload = function (e:any) {\n context.status = true;\n context.done.call(context, e);\n };\n s.onerror = function (e:any) {\n context.status = false;\n context.fail.call(context, e);\n };\n context.body = s;\n return s;\n }).call(this,\n _DOMCreateElement(\"script\"),\n (this.external) ? (this.url) : (this.basePath + this.url), context));\n } catch (e:any) {\n context.status = false;\n logger.debug(`An error ocurred: ${e}`);\n context.fail();\n }\n }\n Cast(o:any):any {\n return _Cast(this, o);\n }\n _new_(properties:any):void {\n this.__new__(properties);\n this.rebuild();\n }\n }\n\n Package(\"com.qcobjects\", [SourceJS]);\n", "import { ISourceCSS, TBody } from \"./types/global\";\nimport { _basePath_ } from \"./basePath\";\nimport { _Cast } from \"./Cast\";\nimport { _domain_ } from \"./domain\";\nimport { _DOMCreateElement } from \"./DOMCreateElement\";\nimport { InheritClass } from \"./InheritClass\";\nimport { isBrowser } from \"./platform\";\nimport { Package } from \"./Package\";\n\nexport class SourceCSS extends InheritClass implements ISourceCSS {\n domain: string = _domain_;\n basePath: string = _basePath_;\n url = \"\";\n data = {};\n async = false;\n external = false;\n\n constructor(o: any) {\n super(o);\n this.body = _DOMCreateElement(\"link\") as TBody;\n }\n fail(): void {\n throw new Error(\"Method not implemented.\");\n }\n Cast(o: any): any {\n return _Cast(this, o);\n }\n set(name: string, value: any): void {\n this[name] = value;\n }\n get(name: string, _default?: any): any {\n return this[name] || _default;\n }\n done(): void { }\n rebuild(): void {\n const context = this;\n if (isBrowser) {\n window.document.getElementsByTagName(\"head\")[0].appendChild(\n (function (s: any, url: string, context: any): any {\n s.type = \"text/css\";\n s.rel = \"stylesheet\";\n s.href = url;\n s.crossOrigin = \"anonymous\";\n s.onreadystatechange = function () {\n if (this.readyState === \"complete\") {\n context.done.call(context);\n }\n };\n s.onload = context.done;\n context.body = s;\n return s;\n }).call(this,\n _DOMCreateElement(\"link\"),\n (this.external) ? (this.url) : (this.basePath + this.url), context));\n }\n }\n}\n\nPackage(\"com.qcobjects\", [SourceCSS]);", " \n/* eslint-disable no-unused-vars */\nimport { _DOMCreateElement } from \"./DOMCreateElement\";\nimport { Export } from \"./Export\";\nimport { _protected_code_ } from \"./introspection\";\nimport { isBrowser } from \"./platform\";\nimport { I_ComponentWidget_ } from \"./types/global\";\n\nclass QCObjectsWidgetNode implements I_ComponentWidget_ {\n writingSuggestions!: string;\n currentCSSZoom!: number;\n ariaColIndexText!: string | null;\n ariaRowIndexText!: string | null;\n accessKey!: string;\n accessKeyLabel!: string;\n autocapitalize!: string;\n dir!: string;\n draggable!: boolean;\n hidden!: boolean;\n inert!: boolean;\n innerText!: string;\n lang!: string;\n offsetHeight!: number;\n offsetLeft!: number;\n offsetParent!: Element | null;\n offsetTop!: number;\n offsetWidth!: number;\n outerText!: string;\n popover!: string | null;\n spellcheck!: boolean;\n title!: string;\n translate!: boolean;\n attachInternals(): ElementInternals {\n throw new Error(\"Method not implemented.\");\n }\n click(): void {\n throw new Error(\"Method not implemented.\");\n }\n hidePopover(): void {\n throw new Error(\"Method not implemented.\");\n }\n showPopover(): void {\n throw new Error(\"Method not implemented.\");\n }\n togglePopover(force?: boolean): boolean {\n throw new Error(\"Method not implemented.\");\n }\n addEventListener(type: unknown, listener: unknown, options?: unknown): void {\n throw new Error(\"Method not implemented.\");\n }\n removeEventListener(type: unknown, listener: unknown, options?: unknown): void {\n throw new Error(\"Method not implemented.\");\n }\n attributes!: NamedNodeMap;\n classList!: DOMTokenList;\n className!: string;\n clientHeight!: number;\n clientLeft!: number;\n clientTop!: number;\n clientWidth!: number;\n id!: string;\n innerHTML!: string;\n localName!: string;\n namespaceURI!: string | null;\n onfullscreenchange!: ((this: Element, ev: Event) => any) | null;\n onfullscreenerror!: ((this: Element, ev: Event) => any) | null;\n outerHTML!: string;\n ownerDocument!: Document;\n part!: DOMTokenList;\n prefix!: string | null;\n scrollHeight!: number;\n scrollLeft!: number;\n scrollTop!: number;\n scrollWidth!: number;\n shadowRoot!: ShadowRoot | null;\n slot!: string;\n tagName!: string;\n attachShadow(init: ShadowRootInit): ShadowRoot {\n throw new Error(\"Method not implemented.\");\n }\n checkVisibility(options?: CheckVisibilityOptions): boolean {\n throw new Error(\"Method not implemented.\");\n }\n closest(selectors: unknown): any {\n throw new Error(\"Method not implemented.\");\n }\n computedStyleMap(): StylePropertyMapReadOnly {\n throw new Error(\"Method not implemented.\");\n }\n getAttribute(qualifiedName: string): string | null {\n throw new Error(\"Method not implemented.\");\n }\n getAttributeNS(namespace: string | null, localName: string): string | null {\n throw new Error(\"Method not implemented.\");\n }\n getAttributeNames(): string[] {\n throw new Error(\"Method not implemented.\");\n }\n getAttributeNode(qualifiedName: string): Attr | null {\n throw new Error(\"Method not implemented.\");\n }\n getAttributeNodeNS(namespace: string | null, localName: string): Attr | null {\n throw new Error(\"Method not implemented.\");\n }\n getBoundingClientRect(): DOMRect {\n throw new Error(\"Method not implemented.\");\n }\n getClientRects(): DOMRectList {\n throw new Error(\"Method not implemented.\");\n }\n getElementsByClassName(classNames: string): HTMLCollectionOf {\n throw new Error(\"Method not implemented.\");\n }\n getElementsByTagName(qualifiedName: unknown): HTMLCollectionOf | HTMLCollectionOf {\n throw new Error(\"Method not implemented.\");\n }\n getElementsByTagNameNS(namespace: unknown, localName: unknown): HTMLCollectionOf {\n throw new Error(\"Method not implemented.\");\n }\n getHTML(options?: GetHTMLOptions): string {\n throw new Error(\"Method not implemented.\");\n }\n hasAttribute(qualifiedName: string): boolean {\n throw new Error(\"Method not implemented.\");\n }\n hasAttributeNS(namespace: string | null, localName: string): boolean {\n throw new Error(\"Method not implemented.\");\n }\n hasAttributes(): boolean {\n throw new Error(\"Method not implemented.\");\n }\n hasPointerCapture(pointerId: number): boolean {\n throw new Error(\"Method not implemented.\");\n }\n insertAdjacentElement(where: InsertPosition, element: Element): Element | null {\n throw new Error(\"Method not implemented.\");\n }\n insertAdjacentHTML(position: InsertPosition, string: string): void {\n throw new Error(\"Method not implemented.\");\n }\n insertAdjacentText(where: InsertPosition, data: string): void {\n throw new Error(\"Method not implemented.\");\n }\n matches(selectors: string): boolean {\n throw new Error(\"Method not implemented.\");\n }\n releasePointerCapture(pointerId: number): void {\n throw new Error(\"Method not implemented.\");\n }\n removeAttribute(qualifiedName: string): void {\n throw new Error(\"Method not implemented.\");\n }\n removeAttributeNS(namespace: string | null, localName: string): void {\n throw new Error(\"Method not implemented.\");\n }\n removeAttributeNode(attr: Attr): Attr {\n throw new Error(\"Method not implemented.\");\n }\n requestFullscreen(options?: FullscreenOptions): Promise {\n throw new Error(\"Method not implemented.\");\n }\n requestPointerLock(options?: PointerLockOptions): Promise {\n throw new Error(\"Method not implemented.\");\n }\n scroll(x?: unknown, y?: unknown): void {\n throw new Error(\"Method not implemented.\");\n }\n scrollBy(x?: unknown, y?: unknown): void {\n throw new Error(\"Method not implemented.\");\n }\n scrollIntoView(arg?: boolean | ScrollIntoViewOptions): void {\n throw new Error(\"Method not implemented.\");\n }\n scrollTo(x?: unknown, y?: unknown): void {\n throw new Error(\"Method not implemented.\");\n }\n setAttribute(qualifiedName: string, value: string): void {\n throw new Error(\"Method not implemented.\");\n }\n setAttributeNS(namespace: string | null, qualifiedName: string, value: string): void {\n throw new Error(\"Method not implemented.\");\n }\n setAttributeNode(attr: Attr): Attr | null {\n throw new Error(\"Method not implemented.\");\n }\n setAttributeNodeNS(attr: Attr): Attr | null {\n throw new Error(\"Method not implemented.\");\n }\n setHTMLUnsafe(html: string): void {\n throw new Error(\"Method not implemented.\");\n }\n setPointerCapture(pointerId: number): void {\n throw new Error(\"Method not implemented.\");\n }\n toggleAttribute(qualifiedName: string, force?: boolean): boolean {\n throw new Error(\"Method not implemented.\");\n }\n webkitMatchesSelector(selectors: string): boolean {\n throw new Error(\"Method not implemented.\");\n }\n baseURI!: string;\n childNodes!: NodeListOf;\n firstChild!: ChildNode | null;\n isConnected!: boolean;\n lastChild!: ChildNode | null;\n nextSibling!: ChildNode | null;\n nodeName!: string;\n nodeType!: number;\n nodeValue!: string | null;\n parentElement!: HTMLElement | null;\n parentNode!: ParentNode | null;\n previousSibling!: ChildNode | null;\n textContent!: string | null;\n appendChild(node: T): T {\n throw new Error(\"Method not implemented.\");\n }\n cloneNode(deep?: boolean): Node {\n throw new Error(\"Method not implemented.\");\n }\n compareDocumentPosition(other: Node): number {\n throw new Error(\"Method not implemented.\");\n }\n contains(other: Node | null): boolean {\n throw new Error(\"Method not implemented.\");\n }\n getRootNode(options?: GetRootNodeOptions): Node {\n throw new Error(\"Method not implemented.\");\n }\n hasChildNodes(): boolean {\n throw new Error(\"Method not implemented.\");\n }\n insertBefore(node: T, child: Node | null): T {\n throw new Error(\"Method not implemented.\");\n }\n isDefaultNamespace(namespace: string | null): boolean {\n throw new Error(\"Method not implemented.\");\n }\n isEqualNode(otherNode: Node | null): boolean {\n throw new Error(\"Method not implemented.\");\n }\n isSameNode(otherNode: Node | null): boolean {\n throw new Error(\"Method not implemented.\");\n }\n lookupNamespaceURI(prefix: string | null): string | null {\n throw new Error(\"Method not implemented.\");\n }\n lookupPrefix(namespace: string | null): string | null {\n throw new Error(\"Method not implemented.\");\n }\n normalize(): void {\n throw new Error(\"Method not implemented.\");\n }\n removeChild(child: T): T {\n throw new Error(\"Method not implemented.\");\n }\n replaceChild(node: Node, child: T): T {\n throw new Error(\"Method not implemented.\");\n }\n ELEMENT_NODE!: 1;\n ATTRIBUTE_NODE!: 2;\n TEXT_NODE!: 3;\n CDATA_SECTION_NODE!: 4;\n ENTITY_REFERENCE_NODE!: 5;\n ENTITY_NODE!: 6;\n PROCESSING_INSTRUCTION_NODE!: 7;\n COMMENT_NODE!: 8;\n DOCUMENT_NODE!: 9;\n DOCUMENT_TYPE_NODE!: 10;\n DOCUMENT_FRAGMENT_NODE!: 11;\n NOTATION_NODE!: 12;\n DOCUMENT_POSITION_DISCONNECTED!: 1;\n DOCUMENT_POSITION_PRECEDING!: 2;\n DOCUMENT_POSITION_FOLLOWING!: 4;\n DOCUMENT_POSITION_CONTAINS!: 8;\n DOCUMENT_POSITION_CONTAINED_BY!: 16;\n DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC!: 32;\n dispatchEvent(event: Event): boolean {\n throw new Error(\"Method not implemented.\");\n }\n ariaAtomic!: string | null;\n ariaAutoComplete!: string | null;\n ariaBrailleLabel!: string | null;\n ariaBrailleRoleDescription!: string | null;\n ariaBusy!: string | null;\n ariaChecked!: string | null;\n ariaColCount!: string | null;\n ariaColIndex!: string | null;\n ariaColSpan!: string | null;\n ariaCurrent!: string | null;\n ariaDescription!: string | null;\n ariaDisabled!: string | null;\n ariaExpanded!: string | null;\n ariaHasPopup!: string | null;\n ariaHidden!: string | null;\n ariaInvalid!: string | null;\n ariaKeyShortcuts!: string | null;\n ariaLabel!: string | null;\n ariaLevel!: string | null;\n ariaLive!: string | null;\n ariaModal!: string | null;\n ariaMultiLine!: string | null;\n ariaMultiSelectable!: string | null;\n ariaOrientation!: string | null;\n ariaPlaceholder!: string | null;\n ariaPosInSet!: string | null;\n ariaPressed!: string | null;\n ariaReadOnly!: string | null;\n ariaRequired!: string | null;\n ariaRoleDescription!: string | null;\n ariaRowCount!: string | null;\n ariaRowIndex!: string | null;\n ariaRowSpan!: string | null;\n ariaSelected!: string | null;\n ariaSetSize!: string | null;\n ariaSort!: string | null;\n ariaValueMax!: string | null;\n ariaValueMin!: string | null;\n ariaValueNow!: string | null;\n ariaValueText!: string | null;\n role!: string | null;\n animate(keyframes: Keyframe[] | PropertyIndexedKeyframes | null, options?: number | KeyframeAnimationOptions): Animation {\n throw new Error(\"Method not implemented.\");\n }\n getAnimations(options?: GetAnimationsOptions): Animation[] {\n throw new Error(\"Method not implemented.\");\n }\n after(...nodes: (Node | string)[]): void {\n throw new Error(\"Method not implemented.\");\n }\n before(...nodes: (Node | string)[]): void {\n throw new Error(\"Method not implemented.\");\n }\n remove(): void {\n throw new Error(\"Method not implemented.\");\n }\n replaceWith(...nodes: (Node | string)[]): void {\n throw new Error(\"Method not implemented.\");\n }\n nextElementSibling!: Element | null;\n previousElementSibling!: Element | null;\n childElementCount!: number;\n children!: HTMLCollection;\n firstElementChild!: Element | null;\n lastElementChild!: Element | null;\n \n append(...nodes: (Node | string)[]): void {\n throw new Error(\"Method not implemented.\");\n }\n \n prepend(...nodes: (Node | string)[]): void {\n throw new Error(\"Method not implemented.\");\n }\n \n querySelector(selectors: unknown): any {\n throw new Error(\"Method not implemented.\");\n }\n \n querySelectorAll(selectors: unknown): NodeListOf {\n throw new Error(\"Method not implemented.\");\n }\n replaceChildren(...nodes: (Node | string)[]): void {\n throw new Error(\"Method not implemented.\");\n }\n assignedSlot!: HTMLSlotElement | null;\n attributeStyleMap!: StylePropertyMap;\n style!: CSSStyleDeclaration;\n contentEditable!: string;\n enterKeyHint!: string;\n inputMode!: string;\n isContentEditable!: boolean;\n onabort!: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;\n onanimationcancel!: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;\n onanimationend!: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;\n onanimationiteration!: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;\n onanimationstart!: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;\n onauxclick!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n onbeforeinput!: ((this: GlobalEventHandlers, ev: InputEvent) => any) | null;\n onbeforetoggle!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onblur!: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;\n oncancel!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n oncanplay!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n oncanplaythrough!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onchange!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onclick!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n onclose!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n oncontextlost!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n oncontextmenu!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n oncontextrestored!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n oncopy!: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;\n oncuechange!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n oncut!: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;\n ondblclick!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n ondrag!: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;\n ondragend!: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;\n ondragenter!: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;\n ondragleave!: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;\n ondragover!: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;\n ondragstart!: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;\n ondrop!: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;\n ondurationchange!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onemptied!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onended!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onerror!: OnErrorEventHandler;\n onfocus!: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;\n onformdata!: ((this: GlobalEventHandlers, ev: FormDataEvent) => any) | null;\n ongotpointercapture!: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;\n oninput!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n oninvalid!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onkeydown!: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;\n onkeypress!: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;\n onkeyup!: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;\n onload!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onloadeddata!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onloadedmetadata!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onloadstart!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onlostpointercapture!: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;\n onmousedown!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n onmouseenter!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n onmouseleave!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n onmousemove!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n onmouseout!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n onmouseover!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n onmouseup!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n onpaste!: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;\n onpause!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onplay!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onplaying!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onpointercancel!: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;\n onpointerdown!: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;\n onpointerenter!: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;\n onpointerleave!: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;\n onpointermove!: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;\n onpointerout!: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;\n onpointerover!: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;\n onpointerup!: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;\n onprogress!: ((this: GlobalEventHandlers, ev: ProgressEvent) => any) | null;\n onratechange!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onreset!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onresize!: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;\n onscroll!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onscrollend!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onsecuritypolicyviolation!: ((this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any) | null;\n onseeked!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onseeking!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onselect!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onselectionchange!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onselectstart!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onslotchange!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onstalled!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onsubmit!: ((this: GlobalEventHandlers, ev: SubmitEvent) => any) | null;\n onsuspend!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n ontimeupdate!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n ontoggle!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n ontouchcancel?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;\n ontouchend?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;\n ontouchmove?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;\n ontouchstart?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;\n ontransitioncancel!: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;\n ontransitionend!: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;\n ontransitionrun!: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;\n ontransitionstart!: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;\n onvolumechange!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onwaiting!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onwebkitanimationend!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onwebkitanimationiteration!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onwebkitanimationstart!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onwebkittransitionend!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onwheel!: ((this: GlobalEventHandlers, ev: WheelEvent) => any) | null;\n autofocus!: boolean;\n dataset!: DOMStringMap;\n nonce?: string | undefined;\n tabIndex!: number;\n blur(): void {\n throw new Error(\"Method not implemented.\");\n }\n focus(options?: FocusOptions): void {\n throw new Error(\"Method not implemented.\");\n }\n\n}\n\nexport let _ComponentWidget_:CustomElementConstructor;\nif (isBrowser) {\n _ComponentWidget_ = class _ComponentWidget_ extends HTMLElement implements I_ComponentWidget_ {\n constructor() {\n super();\n const componentWidget = this;\n const componentName = componentWidget.nodeName.toLowerCase();\n const componentBody = _DOMCreateElement(\"quick-component\");\n const __enabled__atributes__ = componentWidget.getAttributeNames();\n componentBody.setAttribute(\"name\", componentName);\n \n if (!componentWidget.hasAttribute(\"shadowed\")) {\n componentBody.setAttribute(\"shadowed\", \"true\");\n }\n __enabled__atributes__.forEach( (attributeName) => {\n if (componentWidget.hasAttribute(attributeName)) {\n componentBody.setAttribute(attributeName, componentWidget?.getAttribute(attributeName) as any);\n componentWidget.removeAttribute(attributeName);\n }\n });\n const data_attributenames = componentWidget.getAttributeNames().filter(function (a) {\n return a.startsWith(\"data-\");\n }).map(function (a) {\n return a.split(\"-\")[1];\n });\n data_attributenames.forEach(function (_attribute_name_) {\n componentBody.setAttribute(\"data-\" + _attribute_name_, componentWidget?.getAttribute(\"data-\" + _attribute_name_) as any);\n componentWidget.removeAttribute(\"data-\" + _attribute_name_);\n });\n [...(componentWidget as any).children].forEach( (element) => {\n componentBody.appendChild(element.cloneNode(true));\n element.remove();\n });\n \n componentWidget.append(componentBody);\n }\n };\n \n} else {\n _ComponentWidget_ = class _ComponentWidget_ extends QCObjectsWidgetNode {\n constructor (){\n super();\n throw new Error (\"Class not implemented.\");\n }\n };\n}\nExport(_ComponentWidget_);\nexport const RegisterWidget = (widgetName: string):void => {\n if (isBrowser){\n customElements.define(widgetName, class extends _ComponentWidget_ { });\n } else {\n throw new Error (\"RegisterWidget is not implemented for non browser ecosystems yet.\");\n }\n};\nexport const RegisterWidgets = (...args: string[]):void =>{\n const widgetList = [...args];\n widgetList.filter(function (widgetName) {\n return typeof widgetName === \"string\";\n }).map(function (widgetName) {\n return RegisterWidget(widgetName);\n });\n};\n(_protected_code_)(RegisterWidget);\n(_protected_code_)(RegisterWidgets);\nExport(RegisterWidget);\nExport(RegisterWidgets);\n", "import { IController, IComponent, TControllerParams, IQCObjectsElement, IQCObjectsShadowedElement } from \"./types/global\";\nimport { ClassFactory } from \"./ClassFactory\";\nimport { __getType__ } from \"./getType\";\nimport { InheritClass } from \"./InheritClass\";\nimport { logger } from \"./Logger\";\nimport { New } from \"./New\";\nimport { Package } from \"./Package\";\nimport { isBrowser } from \"./platform\";\n\nexport class Controller extends InheritClass implements IController{\n\n component!: IComponent ;\n dependencies?: any[] = [];\n constructor({\n component,\n dependencies\n }: TControllerParams) {\n super({ component, dependencies });\n this.component = component;\n this.dependencies = dependencies;\n if (typeof this.component === \"undefined\" || this.component === null) {\n throw Error(`${__getType__(this)} must be called with a component`);\n }\n }\n\n // eslint-disable-next-line no-unused-vars\n fail?(...args: [...args: any[]] ): void {\n throw new Error(\"Method not implemented.\");\n }\n\n\n routingSelectedAttr(attrName: string):any {\n return this.component?.routingSelected.map( (r: any):any => {\n return r[attrName];\n }).filter(function (v: any) {\n return v;\n }).pop();\n }\n\n isTouchable():boolean {\n return (\"ontouchstart\" in window) ||\n ((navigator as any).MaxTouchPoints > 0) ||\n ((navigator as any).msMaxTouchPoints > 0);\n }\n\n onpress(subelementSelector: string, handler: Function):void {\n if (isBrowser){\n try {\n if (this.isTouchable()) {\n ((this.component?.componentRoot as IQCObjectsElement| IQCObjectsShadowedElement)?.subelements(subelementSelector) as any[])[0].addEventListener(\"touchstart\", handler, {\n passive: true\n });\n } else {\n ((this.component?.componentRoot as IQCObjectsElement | IQCObjectsShadowedElement)?.subelements(subelementSelector) as any[])[0].addEventListener(\"click\", handler, {\n passive: true\n });\n }\n } catch (e:any) {\n logger.debug(`An error ocurred: ${e}.`);\n logger.debug(\"No button to assign press event\");\n }\n \n }\n }\n\n createRoutingController():void {\n const controller = this;\n const component = controller.component;\n const controllerName = controller.routingSelectedAttr(\"controllerclass\");\n if (typeof controllerName !== \"undefined\") {\n const _Controller = ClassFactory(controllerName) as unknown as IController;\n if (typeof _Controller !== \"undefined\" && component !== null) {\n component.routingController = New(_Controller, {\n component\n }) as IController; // Initializes the main controller for the component\n if (typeof component.routingController !== \"undefined\" \n && Object.hasOwn(component.routingController, \"done\") \n && typeof component.routingController.done === \"function\") {\n component.routingController.done.call(component.routingController);\n }\n }\n }\n }\n\n done():void { }\n}\n\nPackage(\"com.qcobjects.controllers\", [\n Controller\n]);\n", "import { __getType__ } from \"./getType\";\nimport { InheritClass } from \"./InheritClass\";\nimport { Package } from \"./Package\";\nimport { TViewParams } from \"./types/global\";\n\nexport class View extends InheritClass {\n constructor({ component = undefined, dependencies = [] }:TViewParams) {\n super({component, dependencies});\n if (typeof this.component === \"undefined\" || this.component === \"null\") {\n throw Error(`${__getType__(this)} must be called with a component`);\n }\n\n }\n }\n\nPackage(\"com.qcobjects.views\", [\n View\n]);", "import { InheritClass } from \"./InheritClass\";\nimport { Package } from \"./Package\";\n\nexport class VO extends InheritClass {}\n\nPackage(\"com.qcobjects.valueObjects\", [\n VO\n ]);", "import { IEffect, TEffectParams } from \"./types/global\";\nimport { InheritClass } from \"./InheritClass\";\nimport { Package } from \"./Package\";\nimport { _methods_, _protected_code_ } from \"./introspection\";\nimport { ClassFactory } from \"./ClassFactory\";\n\nclass Effect extends InheritClass implements IEffect {\n // eslint-disable-next-line no-unused-vars\n done(...args: any[]): any {\n throw new Error(\"Method not implemented.\");\n };\n // eslint-disable-next-line no-unused-vars\n apply(...args: any[]): void {\n throw new Error(\"Method not implemented.\");\n }\n duration = 1000;\n\n\n animate({\n timing,\n draw,\n duration\n }: TEffectParams): void {\n const _self: this = this;\n\n const start = performance.now();\n\n requestAnimationFrame(function animate(time) {\n // timeFraction goes from 0 to 1\n let timeFraction = (time - start) / duration;\n if (timeFraction > 1) timeFraction = 1;\n\n // calculate the current animation state\n const progress = timing(timeFraction);\n\n draw(Math.round(progress * 100)); // draw it\n\n if (timeFraction < 1) {\n requestAnimationFrame(animate);\n } else {\n // if this is an object with a done method\n if (typeof _self !== \"undefined\" &&\n _self !== null &&\n Object.hasOwn(_self, \"done\") &&\n (typeof _self.done).toLowerCase() === \"function\") {\n _self.done.call(_self);\n }\n }\n\n });\n }\n\n}\n\n\nPackage(\"com.qcobjects.effects.base\", [\n Effect\n]);\n\n(_methods_)(ClassFactory(\"Effect\")).map((__c__): any => {\n (_protected_code_)(__c__);\n return __c__;\n});\n\nexport { Effect };", "import { Effect } from \"./Effect\";\nimport { logger } from \"./Logger\";\nimport { Package } from \"./Package\";\nimport { ClassFactory } from \"./ClassFactory\";\nimport { IQCObjectsElement, IQCObjectsShadowedElement } from \"./types/global\";\nimport { ITransitionEffect, IComponent, TTransitionEffectParams } from \"./types/global\";\n\nexport class TransitionEffect extends Effect implements ITransitionEffect{\n duration = 385;\n defaultParams = {\n alphaFrom: 0,\n alphaTo: 1,\n angleFrom: 180,\n angleTo: 0,\n radiusFrom: 0,\n radiusTo: 30,\n scaleFrom: 0,\n scaleTo: 1\n };\n\n fitToHeight = false;\n fitToWidth = false;\n\n component!: IComponent;\n effects!: string[];\n\n apply({\n alphaFrom,\n alphaTo,\n angleFrom,\n angleTo,\n radiusFrom,\n radiusTo,\n scaleFrom,\n scaleTo\n }: TTransitionEffectParams):void {\n const _transition_ = this;\n logger.info(\"EXECUTING TransitionEffect \");\n const componentRoot =_transition_.component.componentRoot as IQCObjectsElement | IQCObjectsShadowedElement | HTMLElement | ShadowRoot;\n\n if (typeof componentRoot !== \"undefined\" && componentRoot !== null){\n if (_transition_.fitToHeight) {\n (componentRoot as any).height = (typeof (componentRoot as HTMLElement).offsetParent === \"object\" && (componentRoot as HTMLElement).offsetParent !== null) ? ((componentRoot as HTMLElement).offsetParent?.scrollHeight) : ((componentRoot as HTMLElement).getBoundingClientRect().height);\n }\n if (_transition_.fitToWidth) {\n (componentRoot as any).width = (typeof (componentRoot as HTMLElement).offsetParent === \"object\" && (componentRoot as HTMLElement).offsetParent !== null) ? ((componentRoot as HTMLElement).offsetParent?.scrollWidth) : ((componentRoot as HTMLElement).getBoundingClientRect().width);\n }\n if (_transition_.component.shadowed){\n ((componentRoot as ShadowRoot).host as HTMLElement).style.display = \"block\";\n } else {\n (componentRoot as HTMLElement).style.display = \"block\";\n }\n _transition_.effects.map( (effectClassName:string):string => {\n\n const __effectClass__ = ClassFactory(effectClassName) as unknown as typeof Effect;\n const effectObj = new __effectClass__({});\n const effectClassMethod = effectObj.apply.bind(_transition_);\n const componentHost = (_transition_.component.shadowed)? ((componentRoot as ShadowRoot).host) : (componentRoot);\n const effectParams = {\n alphaFrom,\n alphaTo,\n angleFrom,\n angleTo,\n radiusFrom,\n radiusTo,\n scaleFrom,\n scaleTo\n }; \n effectClassMethod(componentHost,...Object.values(effectParams));\n return effectClassName;\n });\n \n }\n\n }\n\n}\n\nPackage(\"com.qcobjects.effects.transitions.base\", [\n TransitionEffect\n]);\n", "import { ITimer, TTimerParams } from \"./types/global\";\nimport { InheritClass } from \"./InheritClass\";\nimport { Package } from \"./Package\";\n\nexport class Timer extends InheritClass implements ITimer {\n\n\n duration = 1000;\n alive = true;\n thread({\n timing,\n intervalInterceptor,\n duration\n }:TTimerParams):void {\n const timer = this;\n\n const start = performance.now();\n\n requestAnimationFrame(function thread(time) {\n // timeFraction goes from 0 to 1\n const elapsed = (time - start);\n let timeFraction = elapsed / duration;\n if (timeFraction > 1) timeFraction = 1;\n\n // calculate the current progress state\n const progress = timing(timeFraction, elapsed);\n\n intervalInterceptor(Math.round(progress * 100)); // draw it\n\n if ((timeFraction < 1 || duration === -1) && timer.alive) {\n requestAnimationFrame(thread);\n }\n\n });\n }\n\n\n }\n\nPackage(\"com.qcobjects.timing\", [\n Timer\n ]);\n", "import { TDDOParams } from \"./types/global\";\nimport { Export } from \"./Export\";\nimport { InheritClass } from \"./InheritClass\";\nimport { logger } from \"./Logger\";\nimport { ObjectName } from \"./ObjectName\";\n\n/**\n * Dynamic Data Objects Class\n * Usage:\n * Class('TestDDO',{\n * data: {},\n * _new_ (){\n * this.ddo = New(DDO,{\n * instance:this,\n * name:'data',\n * value:{},\n * fget (value){\n * logger.debug('returned value '+ value );\n * }\n * })\n * }\n * });\n *\n */\nexport class DDO extends InheritClass {\n constructor({\n instance,\n name,\n fget,\n fset,\n value\n }:TDDOParams) {\n super({\n instance,\n name,\n fget,\n fset,\n value\n });\n this._new_({\n instance,\n name,\n fget,\n fset,\n value\n });\n\n }\n\n _new_({\n instance,\n name,\n fget,\n fset\n }:TDDOParams):void {\n const ddoInstance = this;\n var name = (typeof name === \"undefined\") ? (ObjectName(ddoInstance)) : (name);\n\n Object.defineProperty(instance, name, {\n set(val) {\n const _value = val;\n logger.debug(\"value changed \" + name);\n let ret;\n if (typeof fset !== \"undefined\" && typeof fset === \"function\") {\n ret = fset(_value);\n } else {\n ret = _value;\n }\n instance[\"_\" + name] = ret;\n \n },\n get():any {\n const _value = instance[\"_\" + name];\n logger.debug(\"returning value \" + name);\n const is_ddo = (v:any):any => {\n if (typeof v === \"object\" && Object.hasOwn(v, \"value\")) {\n return v.value;\n }\n return v;\n };\n let ret;\n if (typeof fget !== \"undefined\" && typeof fget === \"function\") {\n ret = fget(is_ddo(_value));\n } else {\n ret = is_ddo(_value);\n }\n return ret;\n }\n });\n }\n\n}\nExport(DDO);\n", "import { InheritClass } from \"./InheritClass\";\nimport { logger } from \"./Logger\";\nimport { Package } from \"./Package\";\nexport class Toggle extends InheritClass {\n _toggle = false;\n _inverse = true;\n _positive:Function|null = null;\n _negative:Function|null = null;\n _dispatched:Function|null = null;\n _args = {};\n\n constructor(positive: Function, negative: Function, args: Array) {\n super({positive, negative, args});\n this._new_({positive, negative, args});\n }\n\n changeToggle():void {\n this._toggle = !(this._toggle);\n }\n\n _new_({\n positive,\n negative,\n args\n }:{positive: Function, negative: Function, args: Array}):void {\n this._positive = positive;\n this._negative = negative;\n this._args = args;\n }\n\n fire():Promise {\n const toggle = this;\n var _promise = new Promise(function (resolve, reject) {\n\n if (typeof toggle._positive === \"function\" && typeof toggle._negative === \"function\") {\n if (toggle._inverse) {\n toggle._dispatched = (toggle._toggle) ? (toggle._negative.bind(toggle)) : (toggle._positive.bind(toggle));\n } else {\n toggle._dispatched = (toggle._toggle) ? (toggle._positive.bind(toggle)) : (toggle._negative.bind(toggle));\n }\n toggle._dispatched?.call(toggle, toggle._args);\n resolve.call(_promise, toggle);\n } else {\n logger.debug(\"Toggle functions are not declared\");\n reject.call(_promise, toggle as Toggle);\n }\n return toggle;\n }).then(function (toggle:Toggle) {\n toggle.changeToggle();\n return toggle;\n }).catch(function (e) {\n logger.debug(e.toString());\n return toggle;\n }).finally(()=> {\n return toggle;\n });\n return _promise;\n }\n\n\n}\n\nPackage(\"com.qcobjects.tools.essentials\", [\n Toggle\n]);\n", "export const getDocumentLayout = function ():string|undefined {\n const h = (w:number, h:number) => {\n return w > h ? \"landscape\" : null;\n };\n const v = (w:number, h:number) => {\n return h > w ? \"portrait\" : null;\n };\n const square = (w:number, h:number) => {\n return w === h ? \"square\" : null;\n };\n return [\n h(document.documentElement.clientWidth, document.documentElement.clientHeight),\n v(document.documentElement.clientWidth, document.documentElement.clientHeight),\n square(document.documentElement.clientWidth, document.documentElement.clientHeight)\n ].filter(e => e !== null).pop();\n };\n", "import * as QCObjects from \"./qcobjects.js\";\nmodule.exports = QCObjects;"], + "sourcesContent": ["export const __is_raw_class__ = (o_c: any): boolean => {\n return !!((typeof o_c === \"function\" && o_c.toString().startsWith(\"class\")));\n};\n", "/**\n * Returns the object or function name\n *\n * @param Object or function\n */\nexport const ObjectName = (o: any):string => {\n let ret = \"\";\n if (typeof o === \"function\" && Object.hasOwn(o, \"name\") && o.name !== \"\") {\n ret = o.name;\n } else if (typeof o !== \"undefined\" && typeof o.constructor === \"function\" && o.constructor.name !== \"\") {\n ret = o.constructor.name;\n } else if (typeof o !== \"undefined\" && typeof o.constructor === \"object\") {\n ret = o.constructor.toString().replace(/\\[(.*?)\\]/g, \"$1\").split(\" \").slice(1).join(\"\");\n }\n return ret;\n};", "import { __is_raw_class__ } from \"./is_raw_class\";\nimport { ObjectName } from \"./ObjectName\";\n\n/**\n * Determine the type of the Object for any QCObjects Object\n *\n * @param {Object} object\n */\nexport const __getType__ = function __getType__(o_c: any): any {\n let _ret_ = \"\";\n switch (true) {\n case typeof o_c === \"object\" &&\n (!!o_c.constructor &&\n !!o_c.constructor.name)\n && o_c.constructor.name !== \"\":\n _ret_ = o_c.constructor.name;\n break;\n case typeof o_c === \"function\" && !!o_c.name:\n _ret_ = o_c.name;\n break;\n case __is_raw_class__(o_c) && !!o_c.name:\n _ret_ = o_c.name;\n break;\n case (!!o_c && !!o_c.__classType) && o_c.__classType !== \"\":\n _ret_ = o_c.__classType;\n break;\n case (!!o_c && !!o_c.__definition) && (!!o_c.__definition.__classType) && o_c.__definition.__classType !== \"\":\n _ret_ = o_c.__definition.__classType;\n break;\n default:\n _ret_ = ObjectName(o_c);\n break;\n }\n return _ret_;\n};\n", "import { _top, set } from \"./top\";\ndeclare const global:any;\ndeclare const globalThis:any;\n\nexport const __make_global__ = (f:any):void => {\n if (!!f && !!f.name) {\n if (typeof _top !== \"undefined\" && typeof f !== \"undefined\" && _top !== null && !Object.hasOwn(_top,f.name)) {\n set(f.name, f);\n } else if (typeof global !== \"undefined\"){\n global[f.name] = f;\n } else if (typeof globalThis !== \"undefined\"){\n globalThis[f.name] = f;\n }\n \n }\n\n};", "import { T_QC_CLASSES, T_QC_PACKAGES } from \"@types\";\nimport { __getType__ } from \"./getType\";\nimport { __make_global__ } from \"./make_global\";\n\nexport var _QC_CLASSES: T_QC_CLASSES = {};\nexport var _QC_PACKAGES: T_QC_PACKAGES = {};\nexport var _QC_PACKAGES_IMPORTED: any[] = [];\nexport var _QC_READY_LISTENERS: any[] = [];\n\nexport const __register_class__ = function (_class_: any, __namespace?: string): any {\n const __classType = __getType__(_class_);\n let name = _class_.name || __classType;\n if (name.toLowerCase() === \"function\") {\n name = __classType;\n }\n if (typeof _class_.__definition === \"undefined\") {\n _class_.__definition = {};\n }\n _class_.__definition.__classType = __classType;\n if (typeof __namespace !== \"undefined\") {\n _class_.__definition.__namespace = __namespace;\n }\n _QC_CLASSES[name] = _class_;\n __make_global__(_class_);\n return _QC_CLASSES[name];\n};\n\nexport const get_QC_CLASS = (name:string):any => {\n return _QC_CLASSES[name];\n};\n\nconst _get_packages_names = function (_packages: any): T[] {\n let _keys: any[] = [];\n for (const _k of Object.keys(_packages)) {\n if (\n typeof _packages[_k] !== \"undefined\" &&\n typeof _packages[_k] !== \"function\" &&\n Object.hasOwn(_packages[_k], \"length\") &&\n _packages[_k].length > 0\n ) {\n _keys.push(_k);\n _keys = _keys.concat(_get_packages_names(_packages[_k]));\n }\n }\n return _keys as T[];\n};\n\n\nexport const getPackagesNamesList = (): any[] => {\n return _get_packages_names(_QC_PACKAGES);\n};\n\nexport const getPackagesList = (): any[] => {\n return [...getPackagesNamesList()].map((packagename: string): T => {\n const _classesList: any[] = _QC_PACKAGES[packagename] as any[];\n let _ret_: any = undefined;\n if (_classesList) {\n _ret_ = {\n packageName: packagename,\n classesList: _classesList.filter(function (): boolean {\n return true;\n })\n };\n }\n return _ret_ as T;\n }).filter(function (_p: any): boolean {\n return typeof _p !== \"undefined\";\n });\n};\n\nexport const getClassesList = (): any[] => {\n let _classesList: any[] = [];\n [...getPackagesList()].forEach(function (_package_element: any): T {\n _classesList = _classesList.concat(_package_element.classesList.map(\n (_class_element: any) => {\n return {\n packageName: _package_element.packageName,\n className: `${_package_element.packageName}.${__getType__(_class_element)}`,\n classFactory: _class_element\n };\n }\n ));\n return _package_element as T;\n });\n\n return _classesList;\n};\n\nexport const getClassesNamesList = (): any[] => {\n return [...getClassesList()].map((_class_element: any): T => {\n return _class_element.className as T;\n });\n};\n\nexport const set_QC_PACKAGE = (packageName: string, _qc_packages: any[]):void => {\n _QC_PACKAGES[packageName] = _qc_packages;\n};\n\n", "import { __make_global__ } from \"./make_global\";\n\nexport const Export = function (f: any):void {\n return __make_global__(f);\n};\nExport.prototype.toString = function () {\n return \"Export(function or symbol) { [QCObjects native code] }\";\n};\n", "import { logger } from \"./Logger\";\n\nasync function _import_(name:string):Promise {\n logger.debug(`Importing ${name}...`);\n function isPackage(name:string) {\n logger.debug(`Validating if ${name} is a package name...`);\n // Simple check to determine if the name is a package\n // This can be enhanced based on your specific needs\n return !name.startsWith(\".\") && !name.startsWith(\"/\") && !name.includes(\"/\");\n }\n \n try {\n // Ensure the name has a .js extension if it's not a package\n const hasExtension = /\\.[^/\\\\]+$/.test(name);\n if (!hasExtension && !isPackage(name)) {\n logger.debug(`${name} does not have an extension and is not a package. Adding js extension.`);\n name += \".js\";\n }\n \n const m:any = await import(name);\n return m;\n } catch (error:any) {\n logger.warn(`Failed to load module: ${error}`);\n }\n }\n \nexport {_import_};", "import { _import_ } from \"./_import_\";\nimport { logger } from \"./Logger\";\n\nexport const isDeno:boolean = (typeof window !== \"undefined\" && \"Deno\" in window);\nexport const isBrowser:boolean = (typeof window !== \"undefined\" && typeof window.self !== \"undefined\" && window === window.self) && !isDeno;\nexport const isNodeCommonJS:boolean = (typeof module !== \"undefined\");\n// eslint-disable-next-line no-unused-vars\nexport const deno_require = (name:string):void => { /* not yet implemented */};\nexport const _require_ = (name:string):any => {\n \n return (isDeno)?(deno_require(name)):(\n ( (name):any => {\n let r:any;\n try {\n (async () => {\n r = await _import_(name);\n })().then((m:any) => {\n r = (m && m.default) || m;\n })\n .catch ((e:any) => {\n logger.warn(`An error ocurred: ${e}`);\n });\n\n } catch (e:any) {\n logger.debug(`An error ocurred importing module. ${e}`);\n r = {export:{}};\n }\n return r;\n } ) (name)\n );\n};\ndeclare const cordova: any;\n\nexport const is_phonegap:boolean = (\n function () {\n return (typeof cordova !== \"undefined\");\n }\n)();", "import { Export } from \"./Export\";\nimport { isBrowser } from \"./platform\";\n\nexport class Logger {\n debugEnabled = true;\n infoEnabled = true;\n warnEnabled = true;\n debug(message: string): void {\n if (this.debugEnabled) {\n console.log(\"\\x1b[35m%s\\x1b[0m\", `[DEBUG][${performance.now().toLocaleString()}] ${message}`);\n }\n }\n\n info(message: string): void {\n let color;\n if (this.infoEnabled) {\n if (isBrowser) {\n color = \"\\x1b[103m%s\\x1b[0m\";\n } else {\n color = \"\\x1b[33m%s\\x1b[0m\";\n }\n console.info(color, `[INFO][${performance.now().toLocaleString()}] ${message}`);\n }\n }\n\n warn(message: string): void {\n if (this.warnEnabled) {\n console.warn(\"\\x1b[31m%s\\x1b[0m\", `[WARN][${performance.now().toLocaleString()}] ${message}`);\n }\n }\n}\n\nexport const logger: Logger = new Logger();\nExport(logger);", "import { logger } from \"./Logger\";\n\n/**\n * Casts an object to another object class type\n *\n * @param {Object} obj_source\n * @param {Object} obj_dest\n */\nexport const _Cast = function (obj_source: any, obj_dest: any):any {\n for (const v in obj_source) {\n if (typeof obj_source[v] !== \"undefined\") {\n try {\n obj_dest[v] = obj_source[v];\n } catch (e:any) {\n logger.debug(`An error ocurred: ${e}.`);\n logger.warn(`Unable to cast ${(typeof obj_source).toString()}.${typeof v.toString()} to ${(typeof obj_dest).toString()}.${typeof v.toString()}`);\n }\n }\n }\n return obj_dest;\n};\n\n/**\n * Casts an object to another object class type. Only properties\n *\n * @param {Object} obj_source\n * @param {Object} obj_dest\n */\nexport const _CastProps = function (obj_source: any, obj_dest: any, _ignoreError:boolean = true):any {\n for (const v in obj_source) {\n if (typeof obj_source[v] !== \"undefined\" && typeof obj_source[v] !== \"function\") {\n try {\n obj_dest[v] = obj_source[v];\n } catch (e:any) {\n if (!_ignoreError){\n logger.debug(`An error ocurred: ${e}.`);\n }\n }\n } else if (typeof obj_source[v] === \"function\") {\n try {\n obj_dest[v] = obj_source[v].bind(obj_dest);\n } catch (e:any) {\n logger.warn(e);\n }\n }\n }\n return obj_dest;\n};\n", "import { IQCObjectsElement } from \"@types\";\nimport { isBrowser } from \"./platform\";\n\nexport const _DOMCreateElement = function (elementName: string, props?: any[], children?: any): IQCObjectsElement {\n let _ret_;\n if (isBrowser) {\n _ret_ = _DOMCreateComplexElement(elementName, props, children) as unknown as IQCObjectsElement;\n } else {\n _ret_ = {} as IQCObjectsElement;\n }\n return _ret_;\n};\n\n\nconst ComplexTypeCall = (_type: Function, { props, children }: { props?: any[], children?: any }): IQCObjectsElement => {\n return _type({ props, children }) as IQCObjectsElement;\n};\nexport const _DOMCreateComplexElement = (_type: string | Function, props?: any[], children?: any): HTMLElement | IQCObjectsElement => {\n\n if (typeof _type !== \"string\") {\n return ComplexTypeCall(_type, { props, children });\n }\n const element = document.createElement(_type);\n\n if (props) {\n Object.entries(props).forEach(([key, value]) => {\n if (typeof value === \"string\" || typeof value === \"number\") {\n element.setAttribute(key, value.toString());\n } else if (typeof value === \"function\" && key.toLowerCase().startsWith(\"on\")) {\n element.addEventListener(key.slice(2).toLowerCase(), value.bind(element));\n }\n });\n }\n\n if (Array.isArray(children)) {\n children.filter((child => child instanceof Node)).forEach(child => {\n element.appendChild(child);\n });\n } else if (children instanceof Node) {\n element.appendChild(children);\n } else if (typeof children === \"string\") {\n element.innerHTML = children;\n }\n\n return element;\n};\n", "/**\n * Primary instance ID of all objects\n */\nexport var __instanceID = 0;\n\nexport const IncrementInstanceID = (): void => {\n __instanceID = (typeof __instanceID === \"undefined\" || __instanceID === null) ? (0) : (__instanceID + 1);\n};\n", "export const _protected_code_ = (_: any): void => {\n const __oldtoString = (typeof _.prototype !== \"undefined\") ? (_.prototype.toString) : (function () {\n return \"\";\n });\n if (typeof _.prototype !== \"undefined\") {\n _.prototype.toString = function (): string {\n const _protected_symbols = [\n \"__qcobjects__\",\n \"__qcobjects_sdk__\",\n \"__loaded__\",\n \"ComplexStorageCache\",\n \"css\",\n \"append\",\n \"attachIn\",\n \"debug\",\n \"info\",\n \"warn\",\n \"QC_Append\",\n \"set\",\n \"get\",\n \"done\",\n \"componentDone\",\n \"_new_\",\n \"__new__\",\n \"Class\",\n \"ClassFactory\",\n \"New\",\n \"Export\",\n \"Package\",\n \"Import\",\n \"subelements\",\n \"componentLoader\",\n \"buildComponents\",\n \"Controller\",\n \"View\",\n \"VO\",\n \"Service\",\n \"serviceLoader\",\n \"JSONService\",\n \"ConfigService\",\n \"SourceJS\",\n \"SourceCSS\",\n \"ArrayList\",\n \"ArrayCollection\",\n \"Effect\",\n \"Timer\",\n \"sum\",\n \"avg\",\n \"table\",\n \"max\",\n \"min\",\n \"range\",\n \"matrix\",\n \"matrix2d\",\n \"matrix3d\",\n \"unique\",\n \"uniqueId\",\n \"shortCode\",\n \"NamespaceRef\"\n ];\n let _ret_;\n if (_protected_symbols.includes(this.name)) {\n _ret_ = this.name + \"{ [QCObjects native code] }\";\n } else {\n _ret_ = __oldtoString.call(this);\n }\n return _ret_ as string;\n };\n }\n};\n(_protected_code_)(Function);\nexport const _methods_ = function (_: any): T[] {\n const _m = [];\n for (const i in _) {\n if ((typeof _[i]).toLowerCase() === \"function\") {\n _m.push(_[i]);\n }\n }\n return _m as T[];\n};\n", "import { __is_raw_class__ } from \"./is_raw_class\";\nimport {_QC_PACKAGES, set_QC_PACKAGE, __register_class__ } from \"./PrimaryCollections\";\n\n/**\n * Defines a package for Class classification\n *\n * @param {Object} namespace\n * @param {Object} classes\n */\nexport const Package = (namespace: string, classes: any[] = []): any[] => {\n\n if (Object.hasOwn(_QC_PACKAGES, namespace) &&\n typeof _QC_PACKAGES[namespace] !== \"undefined\" &&\n typeof _QC_PACKAGES[namespace] !== \"string\" &&\n Object.hasOwn(_QC_PACKAGES[namespace], \"length\") &&\n _QC_PACKAGES[namespace].length > 0 &&\n typeof classes !== \"undefined\" &&\n Object.hasOwn(classes, \"length\") &&\n classes.length > 0\n ) {\n classes.forEach((_class_: any) => {\n __register_class__(_class_, namespace);\n });\n set_QC_PACKAGE(namespace, _QC_PACKAGES[namespace].concat(classes));\n } else if (typeof classes !== \"undefined\"\n && typeof classes !== \"undefined\"\n && Object.hasOwn(classes, \"length\")\n && classes.length > 0) {\n classes.forEach((_class_: any) => {\n __register_class__(_class_, namespace);\n });\n set_QC_PACKAGE(namespace, classes);\n } else if (__is_raw_class__(classes)) {\n if (typeof (classes as any).__definition === \"undefined\") {\n (classes as any).__definition = {};\n }\n (classes as any).__definition.__namespace = namespace;\n (classes as any).__namespace = namespace;\n __register_class__(classes, namespace);\n set_QC_PACKAGE(namespace, [classes]);\n } else {\n throw new Error (`An error ocurred. It was not possible to add classes to ${namespace}.`);\n }\n return ((Object.hasOwn(_QC_PACKAGES, namespace)) ? (_QC_PACKAGES[namespace]) : []) as any[] | [];\n};\n", "import { type IInheritClass, type IQCObjectsElement, type TBody } from \"@types\";\nimport { logger } from \"./Logger\";\nimport { __instanceID, IncrementInstanceID } from \"./IncrementInstanceID\";\nimport { _CastProps, _Cast } from \"./Cast\";\nimport { _DOMCreateElement } from \"./DOMCreateElement\";\nimport { __getType__ } from \"./getType\";\nimport { _methods_ } from \"./introspection\";\nimport { is_a } from \"./is_a\";\nimport { isBrowser } from \"./platform\";\nimport { _QC_CLASSES } from \"./PrimaryCollections\";\nimport { Package } from \"./Package\";\n\nexport class InheritClass implements IInheritClass {\n [key: string]: any;\n __definition: any;\n private _body: TBody;\n public get body(): TBody {\n return this._body;\n }\n public set body(value: TBody) {\n this._body = value;\n }\n childs: any;\n __instanceID!: number;\n\n constructor(_o_?: any) {\n\n if (typeof _o_ !== \"undefined\" && typeof _o_.__definition !== \"undefined\") {\n this.__definition = {\n ...(_o_.__definition)\n };\n }\n\n const self: this = this;\n if (typeof _o_ !== \"undefined\" && _o_ !== null) {\n Object.keys(_o_)\n .filter(function (k) {\n return isNaN(k as any) && ![\"__instanceID\", \"__classType\", \"__definition\"].includes(k);\n })\n .forEach(function (key) {\n if (typeof self[key] === \"function\") {\n self[key] = _o_[key].bind(self);\n } else {\n self[key] = _o_[key];\n }\n });\n }\n\n IncrementInstanceID();\n if (!self.__instanceID) {\n Object.defineProperty(self, \"__instanceID\", {\n value: __instanceID,\n writable: false\n });\n }\n\n if (typeof self.__definition !== \"undefined\") {\n Object.keys(self.__definition).filter(function (k) {\n return isNaN(k as any) && ![\"name\", \"__instanceID\", \"__classType\", \"__definition\"].includes(k);\n }).forEach(function (key) {\n if (typeof self.__definition[key] === \"function\") {\n self[key] = self.__definition[key].bind(self);\n } else {\n self[key] = self.__definition[key];\n }\n });\n }\n _methods_((_QC_CLASSES as any)[self.__classType]).map(function (m): any {\n self[(m as Function).name] = (m as Function).bind(self);\n return m;\n });\n _methods_(self.__definition).map(function (m): any {\n self[(m as Function).name] = (m as Function).bind(self);\n return m;\n });\n\n if (self.body) {\n if (typeof self.__definition === \"undefined\" || (!Object.hasOwn(self.__definition, \"body\")) || typeof self.__definition.body === \"undefined\") {\n try {\n if (isBrowser) {\n self.body = _DOMCreateElement(self.__definition.__classType);\n } else {\n self.body = {};\n }\n } catch (e: any) {\n logger.debug(`An error ocurred: ${e}.`);\n self.body = {};\n }\n } else if (Object.hasOwn(self.__definition, \"body\")) {\n self.body = self.__definition.body;\n }\n }\n\n\n try {\n self.__new__.call(self, _o_);\n if (typeof self === \"object\" && Object.hasOwn(self, \"_new_\") && typeof (self._new_ as any).isCalled === \"undefined\") {\n try {\n self._new_(_o_);\n (self._new_ as any).isCalled = true;\n } catch (e: any) {\n logger.warn(`${self.__classType}._new_() failed with error: ${e}`);\n }\n }\n } catch (e: any) {\n logger.warn(e);\n }\n }\n\n static get __classType(): any {\n return (Object.getPrototypeOf(this.constructor) as Function).name;\n }\n\n get __classType(): string {\n return this.constructor.name;\n }\n\n\n static hierarchy(__class__: any): any[] {\n const __classType = function (o_c: any): any {\n return (Object.hasOwn(o_c, \"__classType\")) ? (o_c.__classType) : (__getType__.call(__class__, o_c));\n };\n const __hierarchy__proto__ = (c: any): any[] => {\n return (typeof c !== \"undefined\" && typeof c.__proto__ !== \"undefined\" && c.__proto__ !== null) ? (((__classType(c) !== \"\") ? ([__classType(c)]) : ([])).concat(__hierarchy__proto__(c.__proto__))) : ([]);\n };\n\n if (typeof __class__ === \"undefined\" || __class__ === null) {\n __class__ = this;\n }\n let __hierarchy = [];\n __hierarchy.push(__classType(__class__));\n __hierarchy = __hierarchy.concat(__hierarchy__proto__(__class__.__proto__));\n return __hierarchy;\n }\n\n\n __namespace?: string | undefined;\n\n __new__(_o_: any): void {\n _CastProps(_o_, this);\n }\n\n // eslint-disable-next-line no-unused-vars\n _new_(_o_?: any): void { }\n\n static getParentClass(): any {\n return Object.getPrototypeOf(this.prototype.constructor);\n }\n getParentClass(): any {\n return (this.constructor as typeof InheritClass).getParentClass();\n }\n\n\n static getClass(): any {\n return Object.getPrototypeOf(this.constructor);\n }\n\n getClass(): any {\n return (this.constructor as typeof InheritClass).getClass();\n }\n\n css(_css: any): any {\n if (typeof this.body !== \"undefined\" && typeof this?.body !== \"string\" && typeof (this?.body as HTMLElement)?.style !== \"undefined\") {\n logger.debug(\"body style\");\n if (this.body) {\n (this.body as any).style = _Cast(_css, (this?.body as HTMLElement)?.style);\n }\n }\n return (typeof this.body !== \"string\") ? (this?.body as HTMLElement)?.style : {};\n }\n\n hierarchy(): any {\n const __instance__ = this;\n return (this.constructor as typeof InheritClass).hierarchy(__instance__);\n }\n\n\n append(_child?: any): void {\n const child: any = _child || this.body;\n logger.debug(\"append: start\");\n if (is_a(child, \"Component\")) {\n logger.debug(\"append: child is a Component\");\n logger.debug(`appending the body of ${child.name}`);\n }\n if (typeof this.body !== \"undefined\") {\n logger.debug(\"append element\");\n if (arguments.length > 0) {\n logger.debug(\"append to element\");\n if (typeof this.body !== \"string\") {\n if (typeof (this.body as IQCObjectsElement)?.append !== \"undefined\") {\n (this?.body as IQCObjectsElement)?.append(child);\n } else {\n throw Error(\"body.append is undefined. That means the body is not well formed.\");\n }\n } else {\n this.append(child);\n }\n if (typeof this.childs === \"undefined\") {\n this.childs = [];\n }\n this.childs.push(child);\n } else {\n if (isBrowser) {\n logger.debug(\"append to body\");\n document.body.append(child);\n }\n }\n }\n }\n\n attachIn(tag: any): void {\n if (isBrowser) {\n const tags = (document as any).subelements(tag);\n for (let i = 0, j = tags.length; i < j; i++) {\n tags[i].append(this as any);\n }\n } else {\n throw new Error(\"attachIn not yet implemented for non browser platforms\");\n }\n }\n\n}\n\nPackage(\"com.qcobjects\", [InheritClass]);", "import { InheritClass } from \"./InheritClass\";\n\nexport const isQCObjects_Object = function (_:any):boolean {\n return (!!((typeof _ === \"object\" &&\n Object.hasOwn(_, \"__classType\") &&\n (!!_.__instanceID) &&\n Object.hasOwn(_, \"__definition\") &&\n typeof _.__definition !== \"undefined\"\n ))) || _ instanceof InheritClass;\n };\n\n export const isQCObjects_Class = function (_:any):boolean {\n return (!!((typeof _ === \"function\" &&\n (!_.__instanceID) &&\n (!!_.__definition) &&\n typeof _.__definition !== \"undefined\" &&\n !!_.__definition.__classType\n ))) || _.prototype instanceof InheritClass;\n };\n", "import { __getType__ } from \"./getType\";\nimport { isQCObjects_Class, isQCObjects_Object } from \"./isQCObjects\";\nimport { ObjectName } from \"./ObjectName\";\n\n/**\n * Returns if a class or object is from a determinated type\n * @param {Object} object\n * @param {String} typeName\n */\nexport const is_a = (obj: any, typeName: string):boolean => {\n return !!((typeof obj !== \"undefined\" && obj !== null &&\n (((isQCObjects_Class(obj) || isQCObjects_Object(obj)) && (obj.hierarchy().includes(typeName))) ||\n __getType__(obj) === typeName ||\n ObjectName(obj) === typeName ||\n typeof obj === typeName)));\n};", "/**\n * Internal use to determine the forbidden names for classes\n * Reserved words\n *\n * @param {String} name\n * @param {Object} type\n * @param {Object} definition\n */\nexport const __is__forbidden_name__ = (name: string):boolean => {\n return ([\"__proto__\", \"prototype\", \"Object\", \"Map\", \"defineProperty\", \"indexOf\", \"toString\", \"__instanceID\", \"function\", \"Function\"].indexOf(name) !== -1);\n};\n", "import { __is_raw_class__ } from \"./is_raw_class\";\n\nexport const _LegacyCopy = function (obj:any, _ignore?:string[]):any {\n let _value_;\n switch (true) {\n case typeof obj === \"string\":\n _value_ = obj;\n break;\n case typeof obj === \"number\":\n _value_ = obj;\n break;\n case typeof obj === \"object\":\n _value_ = [{...Object.keys(obj).filter(k => !_ignore?.includes(k))}]\n .map(k => {return {[k as never]:obj[k as never]}; })\n .reduce ((p, c) => Object.assign(p, c)) as any;\n break;\n case typeof obj === \"function\":\n _value_ = obj.bind({});\n break;\n case __is_raw_class__(obj):\n _value_ = class extends obj { };\n break;\n default:\n break;\n }\n return _value_;\n };\n", "import { _QC_CLASSES } from \"./PrimaryCollections\";\nimport { _Cast, _CastProps } from \"./Cast\";\nimport { _DOMCreateElement } from \"./DOMCreateElement\";\nimport { __getType__ } from \"./getType\";\nimport { __instanceID, IncrementInstanceID } from \"./IncrementInstanceID\";\nimport { _methods_ } from \"./introspection\";\nimport { is_a } from \"./is_a\";\nimport { __is__forbidden_name__ } from \"./is_forbidden_name\";\nimport { _LegacyCopy } from \"./LegacyCopy\";\nimport { logger } from \"./Logger\";\nimport { isBrowser } from \"./platform\";\nimport { IQCObjectsElement, TBody, TClass } from \"@types\";\nimport { InheritClass } from \"./InheritClass\";\nimport { _top } from \"./top\";\n\n/**\n * Creates new object class of another object\n *\n * @param {String} name\n * @param {Object} type\n * @param {Object} definition\n * \n * @example \n * Class (name, type, definition)\n * Class (name, type)\n * Class (name, definition)\n * Class ()\n * \n * \n * const MyClass = Class (\"MyComponent\", Component, {\n * name: \"one_component\",\n * method1 : () => {console.log (\"done\") }\n * })\n * const myClassInstance = new MyClass ({name: \"one_component\"})\n * \n * const MyClass = Class (\"MyService\",{\n * name: \"myservice\",\n * })\n * \n * const myClassInstance = new MyClass ({name: \"myservice\"})\n */\n\n\n\nexport const Class: TClass = (name?: string, _type?: unknown, _definition?: unknown): InheritClass => {\n const _types_ = {};\n let type: unknown, definition: unknown;\n\n switch (true) {\n case !name && !_type && !_definition:\n return class { } as unknown as InheritClass;\n case !!name && !_type && !_definition:\n type = class { };\n definition = {};\n break;\n case !!name && !_type && !!_definition:\n type = class { };\n definition = _definition;\n break;\n case !!name && !!_type && !!_definition:\n type = _type;\n definition = _definition;\n break;\n default:\n return class { } as unknown as InheritClass;\n }\n if (typeof name !== \"string\") {\n throw new Error(\"Class name must be a string\");\n }\n\n if (typeof type !== \"function\") {\n throw new Error(\"Class type must be a function or class\");\n }\n\n if (__is__forbidden_name__(name)) {\n throw new Error(`${name} is not an allowed word in the name of a class`);\n }\n\n if (typeof (type as any).__definition === \"object\"\n && (type as any).__definition\n && Object.keys((type as any).__definition).length !== 0) {\n (definition as any).__definition = Object.assign(_LegacyCopy((type as any).__definition,[\"name\"]), type);\n }\n\n (_types_ as any)[type.name] = type;\n\n if (typeof definition === \"undefined\" || definition === null) {\n definition = {};\n } else {\n definition = { ...definition };\n }\n\n /* hack to prevent duplicate __instanceID */\n if (typeof (definition as any).__instanceID !== \"undefined\") {\n delete (definition as any).__instanceID;\n }\n\n _QC_CLASSES[name] = class extends (_types_ as any)[type.name] {\n __instanceID!: number;\n __namespace?: string | undefined;\n __definition: any = {\n ...(definition as any)\n };\n childs: any;\n private _body: TBody;\n public get body(): TBody {\n return this._body;\n }\n public set body(value: TBody) {\n this._body = value;\n }\n\n static get __classType(): any {\n return (Object.getPrototypeOf(this.constructor) as Function).name;\n }\n\n get __classType(): string {\n return this.constructor.name;\n }\n\n static hierarchy(__class__: any): any[] {\n const __classType = function (o_c: any): any {\n return (Object.hasOwn(o_c, \"__classType\")) ? (o_c.__classType) : (__getType__.call(__class__, o_c));\n };\n const __hierarchy__proto__ = (c: any): any[] => {\n return (typeof c !== \"undefined\" && typeof c.__proto__ !== \"undefined\" && c.__proto__ !== null) ? (((__classType(c) !== \"\") ? ([__classType(c)]) : ([])).concat(__hierarchy__proto__(c.__proto__))) : ([]);\n };\n\n if (typeof __class__ === \"undefined\" || __class__ === null) {\n __class__ = this;\n }\n let __hierarchy = [];\n __hierarchy.push(__classType(__class__));\n __hierarchy = __hierarchy.concat(__hierarchy__proto__(__class__.__proto__));\n return __hierarchy;\n }\n\n static getParentClass(): any {\n return Object.getPrototypeOf(this.prototype.constructor);\n }\n\n constructor(_o_?: any) {\n super(_o_ || {});\n\n const self = this;\n IncrementInstanceID();\n if (!(self as any).__instanceID) {\n Object.defineProperty(self, \"__instanceID\", {\n value: __instanceID,\n writable: false\n });\n }\n\n if (typeof self.__definition !== \"undefined\") {\n Object.keys(self.__definition).filter(function (k) {\n return isNaN(k as any) && ![\"name\", \"__instanceID\", \"__classType\", \"__definition\"].includes(k);\n }).forEach(function (key) {\n if (typeof self.__definition[key] === \"function\") {\n self[key] = self.__definition[key].bind(self);\n } else {\n self[key] = self.__definition[key];\n }\n });\n }\n _methods_(_QC_CLASSES[self.__classType]).map(function (m: unknown): T {\n self[(m as Function).name] = (m as Function).bind(self);\n return m as T;\n });\n _methods_(self.__definition).map(function (m): any {\n self[(m as Function).name] = (m as Function).bind(self);\n return m;\n });\n\n if (self.body) {\n if (typeof self.__definition === \"undefined\" || (!Object.hasOwn(self.__definition, \"body\")) || typeof self.__definition.body === \"undefined\") {\n try {\n if (isBrowser) {\n self.body = _DOMCreateElement(self.__definition.__classType);\n } else {\n self.body = {};\n }\n } catch (e: any) {\n logger.debug(`An error ocurred: ${e}.`);\n self.body = {};\n }\n } else if (Object.hasOwn(self.__definition, \"body\")) {\n self.body = self.__definition.body;\n }\n }\n\n\n try {\n if (typeof self.__new__ === \"function\") {\n self.__new__.call(self, _o_);\n } else if (typeof super.__new__ === \"function\") {\n self.__new__ = super.__new__.bind(self);\n self.__new__.call(self, _o_);\n }\n if (typeof self === \"object\" && Object.hasOwn(self, \"_new_\") && typeof (self._new_ as any).isCalled === \"undefined\") {\n try {\n self._new_(_o_);\n (self._new_ as any).isCalled = true;\n } catch (e: any) {\n logger.warn(`${self.__classType}._new_() failed with error: ${e}`);\n }\n }\n } catch (e: any) {\n logger.warn(e);\n }\n }\n\n __new__(_o_: any) {\n _CastProps(_o_, this);\n }\n\n // eslint-disable-next-line no-unused-vars\n _new_(_o_?: any) { }\n\n getClass(): any {\n return Object.getPrototypeOf(this.constructor);\n }\n\n css(_css: any): any {\n if (typeof this.body !== \"undefined\" && typeof this?.body !== \"string\" && typeof (this?.body as HTMLElement)?.style !== \"undefined\") {\n logger.debug(\"body style\");\n if (this.body) {\n (this.body as any).style = _Cast(_css, (this?.body as HTMLElement)?.style);\n }\n }\n return (typeof this.body !== \"string\") ? (this?.body as HTMLElement)?.style : {};\n }\n\n hierarchy(): any {\n const __instance__ = this;\n return this.getClass()?.hierarchy(__instance__);\n }\n\n\n append(_child?: any) {\n const child: any = _child || this.body;\n logger.debug(\"append: start\");\n if (is_a(child, \"Component\")) {\n logger.debug(\"append: child is a Component\");\n logger.debug(`appending the body of ${child.name}`);\n }\n if (typeof this.body !== \"undefined\") {\n logger.debug(\"append element\");\n if (arguments.length > 0) {\n logger.debug(\"append to element\");\n if (typeof this.body !== \"string\") {\n if (typeof (this.body as IQCObjectsElement)?.append !== \"undefined\") {\n (this?.body as IQCObjectsElement)?.append(child);\n } else {\n throw Error(\"body.append is undefined. That means the body is not well formed.\");\n }\n } else {\n this.append(child);\n }\n if (typeof this.childs === \"undefined\") {\n this.childs = [];\n }\n this.childs.push(child);\n } else {\n if (isBrowser) {\n logger.debug(\"append to body\");\n document.body.append(child);\n }\n }\n }\n }\n\n attachIn(tag: any) {\n if (isBrowser) {\n const tags = (document as any).subelements(tag);\n for (let i = 0, j = tags.length; i < j; i++) {\n tags[i].append(this as any);\n }\n } else {\n throw new Error(\"attachIn not yet implemented for non browser platforms\");\n }\n }\n\n };\n\n // remove the keys from definition that exist in the prototype\n\n _QC_CLASSES[name] = _CastProps(definition, _QC_CLASSES[name]);\n _QC_CLASSES[name].__definition = definition;\n _QC_CLASSES[name].__definition.__classType = name;\n\n (_top as any)[name] = _QC_CLASSES[name];\n\n return _QC_CLASSES[name] as InheritClass;\n};\nif (typeof Class.prototype !== \"undefined\") {\n Class.prototype.toString = function () {\n return \"Class(name, type, definition) { [QCObjects native code] }\";\n };\n}\n\n", "/**\n * Returns the QCObjects Class Factory of a given ClassName\n *\n * @param {String} name\n */\n\nimport { __is_raw_class__ } from \"./is_raw_class\";\nimport { _QC_CLASSES, _QC_PACKAGES, get_QC_CLASS } from \"./PrimaryCollections\";\nimport { TClassFactory } from \"@types\";\n\nexport const ClassFactory:TClassFactory = (className:string):any => {\n let _classFactory;\n if (typeof className === \"undefined\" || className === null) {\n throw Error (\"You need to pass a parameter {className}\");\n }\n if (className !== null && className.indexOf(\".\") !== -1) {\n const packageName = className.split(\".\").slice(0, className.split(\".\").length - 1).join(\".\");\n const _className = className.split(\".\").slice(-1).join(\"\");\n const _package = _QC_PACKAGES[packageName] || [];\n const packageClasses = _package.filter((classFactory:any) => {\n return (__is_raw_class__(classFactory));\n }).reverse();\n if (packageClasses.length > 0) {\n _classFactory = packageClasses[0];\n } else {\n throw Error(`Class ${_className} not found. Found classes: ${JSON.stringify(packageClasses)} in package ${packageName}`);\n }\n } else if (className !== null) {\n _classFactory = get_QC_CLASS(className);\n if (typeof _classFactory === \"undefined\"){\n throw new Error (`${className} is undefined.`); \n }\n } else {\n throw Error(`className is null. Unable to retrieve the class factory.\\n Not found in: \\n ${Object.keys(_QC_CLASSES).join(\"\\n\")}`);\n }\n return _classFactory;\n};\n", "export class Base64 {\n static _keyStr: string = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\n static encode(e: string): string {\n let t = \"\";\n let n: number, r: number, i: number, s: number, o: number, u: number, a: number;\n let f = 0;\n e = Base64._utf8_encode(e);\n while (f < e.length) {\n n = e.charCodeAt(f++);\n r = e.charCodeAt(f++);\n i = e.charCodeAt(f++);\n s = n >> 2;\n o = (n & 3) << 4 | r >> 4;\n u = (r & 15) << 2 | i >> 6;\n a = i & 63;\n if (isNaN(r)) {\n u = a = 64;\n } else if (isNaN(i)) {\n a = 64;\n }\n t = t + this._keyStr.charAt(s) + this._keyStr.charAt(o) + this._keyStr.charAt(u) + this._keyStr.charAt(a);\n }\n return t;\n }\n static decode(e: string): string {\n let t = \"\";\n let n: number, r: number, i: number;\n let s: number, o: number, u: number, a: number;\n let f = 0;\n e = e.replace(/[^A-Za-z0-9+/=]/g, \"\");\n while (f < e.length) {\n s = this._keyStr.indexOf(e.charAt(f++));\n o = this._keyStr.indexOf(e.charAt(f++));\n u = this._keyStr.indexOf(e.charAt(f++));\n a = this._keyStr.indexOf(e.charAt(f++));\n n = s << 2 | o >> 4;\n r = (o & 15) << 4 | u >> 2;\n i = (u & 3) << 6 | a;\n t = t + String.fromCharCode(n);\n if (u !== 64) {\n t = t + String.fromCharCode(r);\n }\n if (a !== 64) {\n t = t + String.fromCharCode(i);\n }\n }\n t = Base64._utf8_decode(t);\n return t;\n }\n static _utf8_encode(e: string): string {\n e = e.replace(/rn/g, \"n\");\n let t = \"\";\n for (let n = 0; n < e.length; n++) {\n const r = e.charCodeAt(n);\n if (r < 128) {\n t += String.fromCharCode(r);\n } else if (r > 127 && r < 2048) {\n t += String.fromCharCode(r >> 6 | 192);\n t += String.fromCharCode(r & 63 | 128);\n } else {\n t += String.fromCharCode(r >> 12 | 224);\n t += String.fromCharCode(r >> 6 & 63 | 128);\n t += String.fromCharCode(r & 63 | 128);\n }\n }\n return t;\n }\n static _utf8_decode(e: string): string {\n let t = \"\";\n let n = 0;\n let r = 0;\n let c2 = 0;\n let c3: number;\n while (n < e.length) {\n r = e.charCodeAt(n);\n if (r < 128) {\n t += String.fromCharCode(r);\n n++;\n } else if (r > 191 && r < 224) {\n c2 = e.charCodeAt(n + 1);\n t += String.fromCharCode((r & 31) << 6 | c2 & 63);\n n += 2;\n } else {\n c2 = e.charCodeAt(n + 1);\n c3 = e.charCodeAt(n + 2);\n t += String.fromCharCode((r & 15) << 12 | (c2 & 63) << 6 | c3 & 63);\n n += 3;\n }\n }\n return t;\n }\n};", "import { isBrowser } from \"./platform\";\nimport process from \"node:process\";\n\nexport var _basePath_:string = (\n function ():string {\n let _basePath:string = \"\";\n if (isBrowser) {\n const baseURI:string[] = document.baseURI.split(\"?\")[0].split(\"/\");\n baseURI.pop();\n _basePath = baseURI.join(\"/\") + \"/\";\n } else {\n if (typeof process !== \"undefined\") {\n _basePath = `${(process).cwd()}/`;\n } else {\n _basePath = \"\";\n }\n }\n return _basePath;\n }\n )();\n\nexport const setBasePath = (value:string):void => { _basePath_ = value;};", "import { _LegacyCopy } from \"./LegacyCopy\";\n\nexport const _DataStringify = (data: any): string => {\n const getCircularReplacer = function () {\n const seen = new WeakSet();\n let _level = 0;\n return function (key: string, value: any): any {\n if (typeof value === \"object\" && value !== null) {\n if (seen.has(value)) {\n _level += 1;\n return (_level <= 3) ? (_LegacyCopy(value)) : (null);\n }\n seen.add(value);\n }\n return value;\n };\n };\n return JSON.stringify(data, getCircularReplacer());\n};\n", "export const _domain_:string = (typeof location !== \"undefined\" && location.hostname !== \"\") ? (location.hostname) : (\"localhost\");\n", " /**\n * Creates an object from a Class definition\n *\n * @param {QC_Object} o\n * @param {Object} args\n */\n\n export const New = function (__class__:any, args = {}):any {\n args = (arguments.length > 1) ? (args) : ({});\n return (typeof __class__ === \"undefined\") ? (new Object()) : (new __class__(args));\n };\n \n New.prototype.toString = function () {\n return \"New(QCObjectsClassName, args) { [QCObjects native code] }\";\n };", "import { isBrowser } from \"./platform\";\n\nexport const _secretKey:string = (isBrowser)?(location.host):(\"secret\");", "import { _ICrypt } from \"@types\";\nimport { Base64 } from \"./Base64\";\nimport { _DataStringify } from \"./DataStringify\";\nimport { InheritClass } from \"./InheritClass\";\nimport { Package } from \"./Package\";\nimport { _secretKey } from \"./secretKey\";\n\n\nexport class _Crypt extends InheritClass implements _ICrypt {\n string: string = \"\";\n key: string = \"\";\n // eslint-disable-next-line no-unused-vars\n encrypt(_string_: string, key: string): string {\n throw new Error(\"Method not implemented.\");\n }\n // eslint-disable-next-line no-unused-vars\n decrypt(_string_: string, key: string): string {\n throw new Error(\"Method not implemented.\");\n }\n last_string = \"\";\n last_key = \"\";\n construct = false;\n _new_(o: { string?: string; key: string; }):void {\n const string = o.string;\n let key: string = (Object.hasOwn(o, \"key\")) ? (o.key) : (\"\");\n this.__new__(o);\n key = (key === \"\") ? (this.__instanceID.toString()) : (key);\n this.last_key = key;\n this.last_string = string as string;\n this.construct = true;\n }\n _encrypt(): string {\n const string = this.string;\n const key = this.key;\n let result = \"\";\n let char;\n let keychar;\n for (let i = 0; i < string.length; i++) {\n char = string.substr(i, 1);\n keychar = key.substr((i % key.length) - 1, 1);\n char = String.fromCharCode(char.charCodeAt(0) + keychar.charCodeAt(0));\n result += char;\n }\n this.last_string = Base64.encode(result);\n return this.last_string;\n }\n _decrypt(): string {\n let string = this.string;\n const key = this.key;\n let result = \"\";\n let char;\n let keychar;\n string = Base64.decode(string);\n for (let i = 0; i < string.length; i++) {\n char = string.substr(i, 1);\n keychar = key.substr((i % key.length) - 1, 1);\n char = String.fromCharCode(char.charCodeAt(0) - keychar.charCodeAt(0));\n result += char;\n }\n\n this.last_string = result;\n return this.last_string;\n }\n static encrypt(string: string, key: string): string {\n const crypt = new _Crypt({\n string,\n key: (key !== \"\") ? (key) : (\"12345678ABC\")\n });\n return crypt._encrypt();\n }\n static decrypt(string: string, key: string):string {\n const crypt = new _Crypt({\n string,\n key: (key !== \"\") ? (key) : (\"12345678ABC\")\n });\n return crypt._decrypt();\n }\n}\n\nexport const _CryptObject = function (o: any): string {\n return _Crypt.encrypt(_DataStringify(o), _secretKey);\n};\nexport const _DecryptObject = function (s: string): any {\n return (s === \"\") ? ({}) : (JSON.parse(_Crypt.decrypt(s, _secretKey)));\n};\n\nPackage(\"com.qcobjects\", [_Crypt]);", "import { _basePath_ } from \"./basePath\";\nimport { InheritClass } from \"./InheritClass\";\nimport { Package } from \"./Package\";\n\ntype TConfigSettings = {\n [key: string]: any,\n relativeImportPath:string,\n remoteImportsPath:string,\n remoteSDKPath:string,\n asynchronousImportsLoad:boolean,\n removePackageScriptAfterLoading:boolean,\n componentsBasePath:string,\n delayForReady:number,\n preserveComponentBodyTag:false,\n useConfigService:false,\n routingWay:string,\n useSDK:boolean,\n useLocalSDK:boolean,\n basePath:string\n};\n\n\nexport class ConfigSettings extends InheritClass {\n public _CONFIG: TConfigSettings = {\n \"relativeImportPath\": \"\",\n \"remoteImportsPath\": \"\",\n \"remoteSDKPath\": \"https://sdk.qcobjects.dev/\",\n \"asynchronousImportsLoad\": false,\n \"removePackageScriptAfterLoading\": true,\n \"componentsBasePath\": \"\",\n \"delayForReady\": 0,\n \"preserveComponentBodyTag\": false,\n \"useConfigService\": false,\n \"routingWay\": \"hash\",\n \"useSDK\": true,\n \"useLocalSDK\": false,\n \"basePath\": _basePath_\n };\n protected static _instance: ConfigSettings;\n public _CONFIG_ENC = \"\";\n\n set(name:string, value:any):void {\n this._CONFIG[name] = value;\n }\n\n get(name:string, _defaultValue?:any):any {\n return this._CONFIG[name] || _defaultValue;\n }\n\n static get instance():ConfigSettings {\n\n if (typeof ConfigSettings._instance === \"undefined\") {\n ConfigSettings._instance = new ConfigSettings();\n }\n\n return ConfigSettings._instance;\n }\n\n\n}\n\nPackage(\"com.qcobjects\", [ConfigSettings]);\n", "import { setBasePath } from \"./basePath\";\nimport { _CastProps } from \"./Cast\";\nimport { _Crypt, _CryptObject, _DecryptObject } from \"./Crypt\";\nimport { _DataStringify } from \"./DataStringify\";\nimport { logger } from \"./Logger\";\nimport { GlobalProcessor as Processor } from \"./Processor\";\nimport { _secretKey } from \"./secretKey\";\nimport { Package } from \"./Package\";\nimport { InheritClass } from \"./InheritClass\";\nimport { ICONFIG } from \"@types\";\nimport { ConfigSettings } from \"./ConfigSettings\";\n\n\nexport class CONFIG extends InheritClass implements ICONFIG {\n\n get _CONFIG_ENC(): string {\n return ConfigSettings.instance._CONFIG_ENC;\n }\n\n get _CONFIG(): unknown {\n return ConfigSettings.instance._CONFIG as unknown;\n }\n\n set(name: string, value: unknown):void {\n logger.debug(`CONFIG.set ${name}: ${value as string}`);\n // hack to force update basePath from CONFIG\n if (name === \"basePath\") {\n setBasePath(value as string);\n }\n let _conf;\n try {\n _conf = (\n function (config): any {\n if (config._CONFIG_ENC === null) {\n config._CONFIG_ENC = _Crypt.encrypt(_DataStringify({}), _secretKey);\n }\n const _protectedEnc = config._CONFIG_ENC.valueOf();\n const _protectedConf = config._CONFIG?.valueOf();\n return _CastProps(_protectedConf, _DecryptObject(_protectedEnc));\n }\n )(ConfigSettings.instance);\n } catch (e) {\n _conf = {};\n console.error(e);\n logger.debug(\"failed to encrypt config\");\n }\n\n _conf[name] = value;\n ConfigSettings.instance._CONFIG_ENC = _CryptObject(_conf);\n ConfigSettings.instance.set(name, value);\n }\n\n get(name: string, _default?: unknown): any {\n let _value;\n try {\n const _conf = (\n function (config): any {\n if (config._CONFIG_ENC === null) {\n config._CONFIG_ENC = _Crypt.encrypt(_DataStringify({}), _secretKey);\n }\n const _protectedEnc = config._CONFIG_ENC.valueOf();\n const _protectedConf = config._CONFIG.valueOf();\n return _CastProps(_protectedConf, _DecryptObject(_protectedEnc));\n }\n )(ConfigSettings.instance);\n if (typeof _conf[name] !== \"undefined\") {\n _value = _conf[name];\n }\n } catch (e) {\n console.error(e);\n logger.debug(\"Something wrong when trying to get CONFIG values\");\n logger.debug(\"No config value for: \" + name);\n _value = _default;\n }\n return Processor.processObject(_value) || _default;\n }\n\n private static _instance:CONFIG;\n static get instance ():CONFIG {\n if (typeof CONFIG._instance === \"undefined\") {\n CONFIG._instance = new CONFIG();\n }\n return CONFIG._instance;\n }\n\n static set(name: string, value: unknown):void {\n (CONFIG.instance.set(name, value));\n }\n static get(name: string, value?: unknown): any {\n return (CONFIG.instance.get(name, value));\n }\n\n}\n\n\nPackage(\"com.qcobjects\", [CONFIG]);", "import { type IComponent, type IProcessor } from \"@types\";\nimport { CONFIG } from \"./CONFIG\";\nimport { InheritClass } from \"./InheritClass\";\nimport { New } from \"./New\";\nimport { _top } from \"./top\";\nimport { Component } from \"./Component\";\nimport { Package } from \"./Package\";\n\nexport class Processor extends InheritClass implements IProcessor {\n protected static _instance: IProcessor | undefined;\n constructor({ component, processors }: { component: IComponent | null, processors?: any }) {\n super({ component });\n if (typeof processors !== \"undefined\") {\n this.processors = Object.assign(processors, Processor.instance.processors);\n }\n }\n\n processors: any = {\n \"config\"(component: Component, arg: string): string {\n return CONFIG.get(arg, \"\") as string;\n },\n \"ENV\"(component: Component, arg: string): string {\n return (typeof process !== \"undefined\") ? (process.env[arg] as string) : (\"\");\n },\n \"global\"(component: Component, arg: string): string {\n return (typeof _top !== \"undefined\") ? ((_top as any)[arg] as string) : (\"\");\n }\n };\n\n static get instance(): IProcessor {\n if (typeof Processor._instance === \"undefined\") {\n Processor._instance = new Processor({ component: null });\n }\n return Processor._instance;\n }\n\n setProcessor(_proc_: Function):void {\n if (typeof _proc_ === \"function\" && _proc_.name !== \"\") {\n this.processors[_proc_.name] = _proc_;\n }\n }\n\n component!: IComponent | null;\n\n\n execute(component: IComponent, processorName: string, args: string): string {\n const processorHandler = (typeof component !== \"undefined\" && component !== null) ? (component.processorHandler) : (this);\n return processorHandler?.processors[processorName].bind(processorHandler).apply(processorHandler, [component, args?.split(\",\")]) as string;\n }\n\n process(template: string, component: IComponent | null = null):string {\n const processorHandler = (component !== null) ? (component.processorHandler) : (New(Processor, { component: null }));\n if (typeof template === \"string\") {\n Object.keys(processorHandler.processors).map((funcName) => {\n return [...template.matchAll(new RegExp(\"\\\\$\" + funcName + \"\\\\((.*)\\\\).*\", \"g\"))].map(\n function (procesorMatch) {\n const match0 = `$${funcName}(${procesorMatch[1]})`;\n template = template.replace(match0, processorHandler.execute.bind(processorHandler).call(processorHandler, component, funcName, procesorMatch[1]));\n return procesorMatch;\n }\n );\n });\n }\n return template;\n }\n\n processObject(obj: any, component: IComponent | null = null): any {\n let __instance__: IProcessor | undefined = (component === null) ? (this) : (component.processorHandler);\n if (typeof __instance__ === \"undefined\") {\n __instance__ = new Processor({ component });\n }\n if (typeof obj === \"object\") {\n Object.keys(obj).map(\n (_k) => {\n if (typeof obj[_k] === \"object\" && !Object.hasOwn(obj[_k], \"call\")) {\n obj[_k] = __instance__?.processObject.bind(__instance__)(obj[_k], component as IComponent);\n } else if (typeof obj[_k] === \"string\") {\n obj[_k] = __instance__?.process.bind(__instance__)(obj[_k], component as IComponent);\n }\n return _k;\n }\n );\n } else if (typeof obj === \"string\") {\n obj = __instance__.process.bind(__instance__)(obj, component as IComponent);\n }\n return obj;\n }\n\n}\n\nexport const GlobalProcessor: IProcessor = Processor.instance;\n\nPackage(\"com.qcobjects\", [Processor]);", "import { TComponentRouting } from \"@types\";\n\nexport const __routing_params__ = (routing:TComponentRouting, routingPath:string):object => {\n const standardRoutingPath = routing.path.replace(/{(.*?)}/g, \"(?<$1>.*)\"); // allowing {param}\n return {\n ...[...routingPath.matchAll((new RegExp(standardRoutingPath, \"g\")))][0].groups\n };\n};\n\nexport const __valid_routings__ = function (routings:TComponentRouting[], routingPath:string):TComponentRouting[] {\n return routings.filter(function (routing) {\n const standardRoutingPath = routing.path.replace(/{(.*?)}/g, \"(?<$1>.*)\");\n return (new RegExp(standardRoutingPath, \"g\")).test(routingPath);\n }).reverse();\n};\nexport const __valid_routing_way__ = (validRoutingWays:string[], routingWay:string):boolean => {\n return validRoutingWays.includes(routingWay);\n};\n", "import { TAsyncLoadCallback } from \"@types\";\nimport { Export } from \"./Export\";\nimport { isBrowser } from \"./platform\";\nimport { _top } from \"./top\";\n\nexport const _asyncLoad:any[] = [];\nexport function asyncLoad(callback: TAsyncLoadCallback, args?: any[]): any {\n\n class AsyncCallback {\n func:TAsyncLoadCallback;\n args?:any[];\n constructor(callback: TAsyncLoadCallback, args: any[] = []) {\n this.func = callback;\n this.args = args;\n } \n dispatch() {\n ((this as AsyncCallback).func as Function).apply(this, ...args as [], this);\n }\n }\n _asyncLoad.push((new AsyncCallback(callback, args)) as unknown as never);\n return AsyncCallback;\n}\n\nexport const _fireAsyncLoad = ():void => {\n if (isBrowser){\n document.addEventListener(\"readystatechange\", () => {\n if (document.readyState === \"complete\") {\n // eslint-disable-next-line array-callback-return\n _asyncLoad.map(function (fc) {\n (fc).dispatch.call(fc);\n });\n }\n });\n } else if (typeof _top.global !== \"undefined\") {\n // eslint-disable-next-line array-callback-return\n _asyncLoad.map(function (fc) {\n (fc).dispatch.call(fc);\n });\n }\n };\n\nExport(asyncLoad);", "import { Base64 } from \"./Base64\";\nimport { _DataStringify } from \"./DataStringify\";\nimport { logger } from \"./Logger\";\n\nexport class ComplexStorageCache {\n\n constructor(params: { index: any; load: any; alternate: any; }) {\n let load, alternate;\n const object = params.index;\n if (typeof object !== \"undefined\") {\n load = params.load;\n alternate = params.alternate;\n const cachedObjectID = this.getID(object);\n const cachedResponse = localStorage.getItem(cachedObjectID as string);\n if (this.isEmpty(cachedResponse)) {\n const cachedNewResponse = load.call(null, {\n cachedObjectID,\n cachedResponse,\n \"cache\": this\n });\n this.save(object, cachedNewResponse);\n logger.debug(\"RESPONSE OF {{cachedObjectID}} CACHED\".replace(\"{{cachedObjectID}}\", cachedObjectID as string));\n } else {\n alternate.call(null, {\n cachedObjectID,\n cachedResponse,\n \"cache\": this\n });\n logger.debug(\"RESPONSE OF {{cachedObjectID}} IS ALREADY CACHED \".replace(\"{{cachedObjectID}}\", cachedObjectID as string));\n }\n\n } else {\n throw new Error(\"ComplexStorageCache: index is undefined\");\n }\n return this;\n }\n\n getItem(cachedObjectID: string):any {\n const retrievedObject = localStorage.getItem(cachedObjectID);\n if (!this.isEmpty(retrievedObject)) {\n return JSON.parse(retrievedObject as string);\n } else {\n return null;\n }\n }\n\n\n setItem(cachedObjectID: string, value: any):void {\n localStorage.setItem(cachedObjectID, _DataStringify(value));\n }\n\n isEmpty(object: string | number | null):boolean {\n let r = false;\n switch (true) {\n case (typeof object === \"undefined\"):\n case (typeof object === \"string\" && object === \"\"):\n case (typeof object === \"string\" && object === \"undefined\"):\n case (typeof object === \"number\" && object === 0):\n case (object === null):\n r = true;\n break;\n default:\n r = false;\n }\n return r;\n }\n\n\n getID(object: any):string|undefined {\n let cachedObjectID;\n if (typeof object !== \"undefined\") {\n cachedObjectID = \"cachedObject_\" + Base64.encode(_DataStringify(object).replace(/\\{|\\}|,/g, \"_\"));\n }\n return cachedObjectID;\n }\n\n save(object: any, cachedNewResponse: any):void {\n const cachedObjectID = this.getID(object);\n logger.debug(\"CACHING THE RESPONSE OF {{cachedObjectID}} \".replace(\"{{cachedObjectID}}\", cachedObjectID as string));\n this.setItem(cachedObjectID as string, cachedNewResponse);\n }\n\n getCached(object: any):any {\n const cachedObjectID = this.getID(object);\n return this.getItem(cachedObjectID as string);\n }\n\n clear():void {\n Object.keys(localStorage).filter(function (k) {\n return k.startsWith(\"cachedObject_\");\n }).map(function (c):any {\n localStorage.removeItem(c);\n return c;\n });\n }\n\n}\n", "import { IService, TCacheController } from \"@types\";\nimport { asyncLoad } from \"./asyncLoad\";\nimport { ComplexStorageCache } from \"./ComplexStorageCache\";\nimport { _DataStringify } from \"./DataStringify\";\nimport { logger } from \"./Logger\";\nimport { _require_, isBrowser } from \"./platform\";\nimport { _top } from \"./top\";\n\n/**\n * Loads a simple component from a template\n *\n * @author: Jean Machuca \n * @param service a Service object\n */\nexport const serviceLoader = function (service:IService, _async = false):Promise|undefined {\n const _serviceLoaderInBrowser = function (service:IService):Promise {\n var _promise = new Promise(\n function (resolve, reject) {\n\n logger.debug(\"LOADING SERVICE DATA {{DATA}} FROM {{URL}}\".replace(\"{{DATA}}\", _DataStringify(service.data)).replace(\"{{URL}}\", service.url));\n const xhr = new XMLHttpRequest();\n xhr.withCredentials = service.withCredentials;\n const xhrasync = true; // always async because xhr sync is deprecated\n xhr.open(service.method, service.url, xhrasync);\n for (const header in service.headers) {\n try {\n if (typeof service.headers[header] !== \"function\") {\n xhr.setRequestHeader(header, service.headers[header]);\n }\n } catch (e:any) {\n logger.debug(\"Something went wrong when assign the header \" + header);\n logger.debug(`An error ocurred: ${e}`);\n }\n }\n xhr.onload = function () {\n if (xhr.status === 200) {\n const response = xhr.responseText;\n logger.debug(\"Data received {{DATA}}\".replace(\"{{DATA}}\", _DataStringify(response)));\n logger.debug(\"CREATING SERVICE {{NAME}}\".replace(\"{{NAME}}\", service.name));\n service.template = response;\n if (service.cached && (typeof cache !== \"undefined\")) {\n cache.save(service.name, service.template);\n }\n if (typeof service.done === \"function\") {\n var standardResponse = {\n \"request\": xhr,\n service\n };\n service.done.call(service, standardResponse);\n resolve.call(_promise, standardResponse);\n }\n } else {\n if (typeof service.fail === \"function\") {\n var standardResponse = {\n \"request\": xhr,\n service\n };\n service.fail.call(service, standardResponse);\n reject.call(_promise, standardResponse);\n }\n }\n };\n\n const _directLoad = function () {\n logger.debug(\"SENDING THE NORMAL REQUEST \");\n try {\n xhr.send(_DataStringify(service.data));\n } catch (e:any) {\n logger.debug(\"SOMETHING WRONG WITH REQUEST \");\n logger.debug(`An error ocurred: ${e}`);\n reject.call(_promise, {\n request: xhr,\n service\n });\n }\n };\n\n if (service.cached) {\n var cache = new ComplexStorageCache({\n index: service.data,\n load() {\n _directLoad.call(this);\n },\n alternate(cacheController:TCacheController) {\n if (service.method === \"GET\") {\n service.template = cacheController.cache.getCached(service.name);\n if (typeof service.done === \"function\") {\n const standardResponse = {\n \"request\": xhr,\n service\n };\n service.done.call(service, standardResponse);\n resolve.call(_promise, standardResponse);\n }\n } else {\n _directLoad();\n }\n \n }\n });\n (_top as any).lastCache = cache;\n } else {\n _directLoad();\n }\n\n return xhr;\n }\n );\n return _promise;\n };\n\n const _serviceLoaderInNode = function (service:IService) {\n var _promise = new Promise(\n function (resolve, reject) {\n if (typeof URL === \"undefined\") {\n global.URL = (_require_(\"url\")).URL;\n // eslint-disable-next-line no-unused-vars\n const URL = global.URL;\n }\n const serviceURL = new URL(service.url);\n var req;\n service.useHTTP2 = Object.hasOwn(service, \"useHTTP2\") && service.useHTTP2;\n\n\n const captureEvents = function (req:any) {\n logger.debug(\"LOADING SERVICE DATA (non-browser) {{DATA}} FROM {{URL}}\".replace(\"{{DATA}}\", _DataStringify(service.data)).replace(\"{{URL}}\", service.url));\n let dataXML:any;\n const standardResponse = {\n \"http2Client\": client,\n \"request\": req,\n service,\n \"responseHeaders\": null\n };\n\n if (typeof service.data === \"object\" && service.data !== null) {\n if (service.useHTTP2) {\n try {\n logger.debug(\"Sending data...\");\n const buffer = new Buffer(_DataStringify(service.data));\n req.write(buffer);\n } catch (e:any) {\n logger.debug(\"It was not possible to send any data\");\n logger.debug(`An error ocurred: ${e}`);\n }\n }\n }\n\n dataXML = \"\";\n req.on(\"response\", (responseHeaders:any) => {\n logger.debug(\"receiving response...\");\n standardResponse.responseHeaders = responseHeaders;\n /*\n for (const name in responseHeaders) {\n logger.debug(`${name}: ${responseHeaders[name]}`);\n }\n */\n dataXML = \"\";\n });\n req.on(\"data\", (chunk:any) => {\n logger.debug(\"receiving data...\");\n // do something with the data\n dataXML += \"\" + chunk.toString();\n service.template = dataXML;\n });\n if (service.useHTTP2) {\n req.resume();\n }\n req.on(\"end\", () => {\n logger.debug(\"ending call...\");\n service.template = dataXML;\n if (Object.hasOwn(service, \"useHTTP2\") && service.useHTTP2) {\n client.destroy();\n } else {\n req.destroy();\n }\n service.done.call(service, standardResponse);\n resolve.call(_promise, standardResponse);\n });\n if (service.useHTTP2) {\n req.end();\n }\n\n };\n\n try {\n let requestOptions;\n if (service.useHTTP2) {\n logger.debug(\"using http2\");\n const http2 = _require_(\"http2\");\n var client = (http2).connect(serviceURL.origin);\n requestOptions = Object.assign({\n \":method\": service.method,\n \":path\": serviceURL.pathname\n }, service.options);\n requestOptions = Object.assign(requestOptions, service.headers);\n req = client.request(requestOptions);\n req.setEncoding(\"utf8\");\n captureEvents(req);\n } else {\n if (serviceURL.protocol === \"http:\") {\n const http = _require_(\"http\");\n const request = (http).request;\n requestOptions = Object.assign({\n \"url\": service.url,\n headers: service.headers\n }, service.options);\n req = request(service.url);\n captureEvents(req);\n } else if (serviceURL.protocol === \"https:\") {\n const https = _require_(\"https\");\n requestOptions = Object.assign({\n hostname: serviceURL.hostname,\n port: serviceURL.port,\n path: serviceURL.pathname,\n method: service.method,\n headers: service.headers\n }, service.options);\n const _req_ = (https).request(requestOptions, function (req:any) {\n captureEvents(req);\n });\n _req_.end();\n } else {\n const e = \"Protocol not supported: \" + serviceURL.protocol;\n logger.debug(e);\n throw new Error(e);\n }\n }\n\n\n } catch (e:any) {\n logger.debug(e);\n service.fail.call(service, e);\n reject.call(_promise, e);\n\n }\n }).catch( (e:any) => {\n logger.debug(`Something happened when trying to call the service: ${service.name}. Error: ${e}`);\n service.fail.call(service, e);\n });\n return _promise;\n\n };\n\n const _serviceLoaderMockup = function (service:IService) {\n var _promise = new Promise(\n function (resolve) {\n logger.debug(`Calling mockup service ${service.name} ...`);\n const standardResponse = {\n \"request\": null,\n service,\n \"responseHeaders\": service.responseHeaders\n };\n if (typeof service.mockup === \"function\") {\n service.mockup.call(service, standardResponse);\n } else {\n service.done.call(service, standardResponse);\n }\n resolve.call(_promise, standardResponse);\n });\n return _promise;\n };\n const _serviceLoaderLocal = function (service:IService) {\n var _promise = new Promise(\n function (resolve) {\n logger.debug(`Calling local service ${service.name} ...`);\n const standardResponse = {\n \"request\": null,\n service,\n \"responseHeaders\": service.responseHeaders\n };\n if (typeof service.local === \"function\") {\n service.local.call(service, standardResponse);\n } else {\n service.done.call(service, standardResponse);\n }\n resolve.call(_promise, standardResponse);\n });\n return _promise;\n };\n\n let _ret_: Promise;\n switch (service.kind) {\n case \"rest\":\n if (isBrowser) {\n if (typeof _async !== \"undefined\" && _async) {\n _ret_ = asyncLoad(_serviceLoaderInBrowser, [service, _async]);\n } else {\n _ret_ = _serviceLoaderInBrowser(service);\n }\n } else {\n _ret_ = _serviceLoaderInNode(service);\n }\n break;\n case \"mockup\":\n _ret_ = _serviceLoaderMockup(service);\n break;\n case \"local\":\n _ret_ = _serviceLoaderLocal(service);\n break;\n default:\n logger.debug(`The value of the kind property of the service ${service.name} is not valid`);\n _ret_ = Promise.resolve();\n break;\n }\n return _ret_;\n};\n", "export const _tag_filter_ = \"quick-component:not([loaded]),component:not([loaded])\";\n", "import { IComponent, TCacheController } from \"@types\";\nimport { asyncLoad } from \"./asyncLoad\";\nimport { ComplexStorageCache } from \"./ComplexStorageCache\";\nimport { _DataStringify } from \"./DataStringify\";\nimport { logger } from \"./Logger\";\nimport { is_phonegap, isBrowser } from \"./platform\";\nimport { _top } from \"./top\";\n\n/**\n * Loads a simple component from a template\n *\n * @author: Jean Machuca \n * @param component a Component object\n */\nexport const componentLoader = function (component: IComponent, _async: boolean):Promise {\n let __promise__: Promise;\n const _componentLoaderInBrowser = function (component: IComponent) {\n __promise__ = new Promise(function (resolve, reject) {\n const _promise = component.__promise__;\n const container = (Object.hasOwn(component, \"container\") && typeof component.container !== \"undefined\" && component.container !== null) ? (component.container) : (component.body);\n if (container !== null) {\n const _feedComponent_ = function (component: { feedComponent: () => void; }) {\n component.feedComponent();\n const standardResponse = {\n \"request\": xhr,\n component\n };\n resolve.call(_promise, standardResponse);\n };\n logger.debug(\"LOADING COMPONENT DATA {{DATA}} FROM {{URL}}\".replace(\"{{DATA}}\", _DataStringify(component.data)).replace(\"{{URL}}\", component.url));\n\n const _componentLoaded = function () {\n const successStatus = (is_file) ? (0) : (200);\n if (xhr.status === successStatus) {\n const response = xhr.responseText;\n logger.debug(\"Data received {{DATA}}\".replace(\"{{DATA}}\", _DataStringify(response)));\n logger.debug(\"CREATING COMPONENT {{NAME}}\".replace(\"{{NAME}}\", component.name));\n component.template = response;\n if (component.cached && (typeof cache !== \"undefined\")) {\n cache.save(component.name, component.template);\n }\n _feedComponent_(component);\n } else {\n const standardResponse = {\n \"request\": xhr,\n component\n };\n reject.call(_promise, standardResponse);\n\n }\n };\n if (typeof component.template === \"string\" && component.template !== \"\") {\n // component already has a template it does not need to be reloaded\n _feedComponent_(component);\n } else {\n var is_file = !!(component.url.startsWith(\"file:\"));\n var xhr = new XMLHttpRequest();\n if (!is_file) {\n try {\n logger.debug(\"Calling the url of component in async mode.\");\n xhr.open(component.method, component.url, true);\n } catch (e:any) {\n logger.debug(`An error ocurred: ${e}.`);\n logger.debug(\"Last try has failed... The component cannot be loaded.\");\n }\n } else {\n if (\"fetch\" in _top) {\n logger.debug(\"I can use fetch...\");\n logger.debug(\"It is a file to be loaded, so I will try to use fetch\");\n fetch(component.url).then(response => {\n logger.debug(\"I got a response from fetch, so I'll feed the component\");\n response.text().then(text => {\n component.template = text;\n _feedComponent_(component);\n })\n .catch((e:any) => {throw new Error (`An error ocurred: ${e}`);});\n }).catch ((e:any) => {throw new Error (`An error ocurred: ${e}`);});\n }\n }\n if (!is_phonegap && !is_file) {\n xhr.setRequestHeader(\"Content-Type\", \"text/html\");\n }\n if (!is_file) {\n xhr.onload = _componentLoaded;\n }\n const _directLoad = function (is_file: boolean) {\n is_file = !((typeof is_file === \"undefined\" || !is_file));\n logger.debug(\"SENDING THE NORMAL REQUEST \");\n if (is_file) {\n if (!(\"fetch\" in _top)) {\n logger.debug(\"I have to try to load the file using xhr... \");\n xhr.send(null);\n if (xhr.status === XMLHttpRequest.DONE) {\n _componentLoaded();\n }\n }\n } else {\n logger.debug(\"Trying to send the data to the component... \");\n xhr.send(_DataStringify(component.data));\n }\n };\n\n if (component.cached && (!is_file)) {\n logger.debug(\"USING CACHE FOR COMPONENT: \" + component.name);\n var cache = new ComplexStorageCache({\n index: component.cacheIndex,\n load() {\n _directLoad.call(this, is_file);\n },\n alternate(cacheController: TCacheController) {\n if (component.method === \"GET\") {\n component.template = cacheController.cache.getCached(component.cacheIndex);\n _feedComponent_.call(this, component);\n } else {\n _directLoad.call(this, is_file);\n }\n \n }\n });\n (_top as any).lastCache = cache;\n } else {\n logger.debug(\"NOT USING CACHE FOR COMPONENT: \" + component.name);\n _directLoad(is_file);\n }\n\n }\n } else {\n logger.debug(\"CONTAINER DOESNT EXIST\");\n }\n });\n __promise__.then(function (standardResponse) {\n return component.__done__().then(function () {\n let _ret_;\n if (typeof component.done === \"function\") {\n _ret_ = component.done.call(component, standardResponse);\n }\n return Promise.resolve(_ret_);\n });\n }, function (standardResponse) {\n if (typeof component.fail === \"function\") {\n component.fail.call(component, standardResponse)\n .catch ((e:any)=> {throw new Error (`${e}`);});\n }\n return Promise.reject(new Error (\"An error ocurred\"));\n }).catch(function (e:any) {\n logger.debug(\"Something wrong loading the component\");\n throw new Error (`An error ocurred: ${e}`);\n });\n return __promise__;\n };\n const _componentLoaderInNode = function (component: IComponent) {\n __promise__ = new Promise(function (resolve, reject) {\n const _promise = __promise__;\n const _feedComponent_ = function (component: IComponent) {\n component.feedComponent()\n .catch ((e:any) => {\n throw new Error (`An error ocurred trying to feed the component: ${component.name}. Error: ${e}`);\n });\n const standardResponse = {\n \"request\": null,\n component\n };\n resolve.call(_promise, standardResponse);\n };\n logger.debug(\"LOADING COMPONENT DATA {{DATA}} FROM {{URL}}\".replace(\"{{DATA}}\", _DataStringify(component.data)).replace(\"{{URL}}\", component.url));\n\n const _componentLoaded = function (err: any, responseText: { toString: () => any; }) {\n if (!err) {\n const response = responseText.toString();\n logger.debug(\"Data received {{DATA}}\".replace(\"{{DATA}}\", _DataStringify(response)));\n logger.debug(\"CREATING COMPONENT {{NAME}}\".replace(\"{{NAME}}\", component.name));\n component.template = response;\n if (component.cached && (typeof cache !== \"undefined\")) {\n cache.save(component.name, component.template);\n }\n _feedComponent_(component);\n } else {\n const standardResponse = {\n \"request\": null,\n component\n };\n reject.call(_promise, standardResponse);\n }\n };\n if (typeof component.template === \"string\" && component.template !== \"\") {\n // component already has a template it does not need to be reloaded\n _feedComponent_(component);\n } else {\n logger.debug(\"Loading the component as a local file in server...\");\n const _directLoad = function () {\n // eslint-disable-next-line @typescript-eslint/no-require-imports\n const {readFile} = require(\"node:fs\");\n logger.debug(\"SENDING THE NORMAL REQUEST \");\n readFile(component.url, _componentLoaded);\n };\n\n if (component.cached) {\n logger.debug(\"USING CACHE FOR COMPONENT: \" + component.name);\n var cache = new ComplexStorageCache({\n index: component.cacheIndex,\n load() {\n _directLoad();\n },\n alternate(cacheController: TCacheController) {\n if (component.method === \"GET\") {\n component.template = cacheController.cache.getCached(component.cacheIndex);\n _feedComponent_.call(this, component);\n } else {\n _directLoad.call(this);\n }\n \n }\n });\n (_top as any).lastCache = cache;\n } else {\n logger.debug(\"NOT USING CACHE FOR COMPONENT: \" + component.name);\n _directLoad();\n }\n\n }\n });\n __promise__.then(function (standardResponse) {\n return component.__done__().then(function () {\n let _ret_;\n if (typeof component.done === \"function\") {\n _ret_ = component.done.call(component, standardResponse);\n }\n return Promise.resolve(_ret_);\n });\n }, function (standardResponse) {\n if (typeof component.fail === \"function\") {\n component.fail.call(component, standardResponse)\n .catch((e:any) => {throw new Error (`An error ocurred: ${e}`);});\n }\n return Promise.reject(new Error (\"An error ocurred.\"));\n }).catch(function (e) {\n logger.debug(`Something wrong loading the component: ${e}`);\n });\n return __promise__;\n };\n\n let _ret_;\n if (isBrowser) {\n if (typeof _async !== \"undefined\" && _async) {\n _ret_ = asyncLoad(_componentLoaderInBrowser, [component, _async]);\n } else {\n _ret_ = _componentLoaderInBrowser(component);\n }\n } else {\n _ret_ = _componentLoaderInNode(component);\n }\n return _ret_ as Promise;\n};", "import { Base64 } from \"./Base64\";\nimport { _basePath_ } from \"./basePath\";\nimport { _Cast } from \"./Cast\";\nimport { ClassFactory } from \"./ClassFactory\";\nimport { _buildComponentsFromElements_, ComponentURI } from \"./ComponentFactory\";\nimport { _DataStringify } from \"./DataStringify\";\nimport { _domain_ } from \"./domain\";\nimport { _DOMCreateElement } from \"./DOMCreateElement\";\nimport { __getType__ } from \"./getType\";\nimport { InheritClass } from \"./InheritClass\";\nimport { _methods_, _protected_code_ } from \"./introspection\";\nimport { is_a } from \"./is_a\";\nimport { isQCObjects_Object } from \"./isQCObjects\";\nimport { logger } from \"./Logger\";\nimport { New } from \"./New\";\nimport { Package } from \"./Package\";\nimport { isBrowser } from \"./platform\";\nimport { Processor } from \"./Processor\";\nimport { __routing_params__, __valid_routing_way__, __valid_routings__ } from \"./routings\";\nimport { _top, componentsStack } from \"./top\";\nimport { CONFIG } from \"./CONFIG\";\nimport { serviceLoader } from \"./serviceLoader\";\nimport { _tag_filter_ } from \"./tag_filter\";\nimport { componentLoader } from \"./componentLoader\";\nimport { IComponent, IController, IEffect, IProcessor, IQCObjectsElement, IQCObjectsShadowedElement, IView, TBody, TComponentDoneResponse, TComponentParams, TComponentRouting, TComponentRoutings } from \"@types\";\n\nexport class Component extends InheritClass implements IComponent {\n static shadowed: boolean | undefined = false;\n static cached: any = true;\n [key: string]: any;\n name!: string;\n templateURI!: string;\n url!: string;\n tplsource!: string;\n tplextension!: string;\n template!: string;\n validRoutingWays: string[] = [\"pathname\", \"hash\", \"search\"];\n basePath:string = _basePath_;\n domain:string = _domain_;\n templateHandler = \"DefaultTemplateHandler\";\n processorHandler?: IProcessor;\n routingWay: string | null = null;\n routingNodes: (IQCObjectsElement | HTMLElement)[] = [];\n routings: TComponentRoutings = [];\n routingPath = \"\";\n routingPaths: string[] = [];\n _componentHelpers: any[] = [];\n subcomponents: any[] = [];\n splashScreenComponent?: IComponent = undefined;\n controller?: IController = undefined;\n routingController?: IController = undefined;\n\n view?: IView = undefined;\n effect?: IEffect = undefined;\n effectClass!: string;\n method = \"GET\";\n cached?: boolean = true;\n __promise__?: Promise | null = null;\n data!: any;\n __namespace?: string = undefined;\n protected _parsedAssignmentText!: string;\n protected __shadowRoot: any;\n protected _serviceClassName: string | null = null;\n enableServiceClass?: boolean | undefined = true;\n serviceInstance: any;\n serviceData: any;\n shadowed?: boolean = false;\n container: any;\n innerHTML: any;\n reload: any;\n static subcomponents: any;\n assignRoutingParams?: boolean = true;\n responseTo?: string | undefined;\n static responseTo?: string | undefined;\n\n constructor({\n __parent__,\n templateURI = \"\",\n template,\n tplsource = \"default\",\n tplextension,\n url = \"\",\n name = \"\",\n method = \"GET\",\n data = {},\n reload = false,\n shadowed = false,\n cached = true,\n enableServiceClass,\n assignRoutingParams = true,\n _body = _DOMCreateElement(\"div\"),\n __promise__ = null,\n __shadowRoot,\n body,\n shadowRoot,\n splashScreenComponent,\n controller,\n view\n }: TComponentParams) {\n if (arguments.length < 1) {\n throw Error(\"No arguments in component. You must at least give one argument.\");\n }\n super({\n __parent__,\n templateURI,\n template,\n tplsource,\n tplextension,\n url,\n name,\n method,\n data,\n reload,\n shadowed,\n cached,\n enableServiceClass,\n assignRoutingParams,\n _body,\n __promise__,\n __shadowRoot,\n body,\n shadowRoot,\n splashScreenComponent,\n controller,\n view\n });\n const self = this;\n\n if (typeof name !== \"undefined\") {\n self.name = name;\n }\n\n if (typeof self.name === \"undefined\" && typeof name === \"undefined\") {\n logger.warn(\"A name is not defined for \" + __getType__(self));\n }\n\n self.routingWay = CONFIG.get(\"routingWay\");\n\n self.processorHandler = new Processor({\n component: self\n });\n\n /* assign body data attributes to data */\n self.data = (typeof self.data === \"undefined\" || self.data === null) ? ({}) : (self.data);\n self.data = Object.assign(self.data, self.dataAttributes);\n\n self.createServiceInstance()\n .then(() => {\n if (typeof self.__new__ === \"function\") {\n self.__new__(self);\n }\n\n self._generateRoutingPaths(self.body)\n .then(function () {\n self._reroute_()\n .then(function () {\n return self.rebuild()\n .then(function () {\n logger.info(`Component._new_ The component ${self.name} was built successfully!`);\n }).catch(function (standardResponse) {\n logger.warn(`Component._new_ Something went wrong building the component ${self.name}`);\n console.error(`Component._new_ Something went wrong building the component ${self.name}`, standardResponse);\n });\n }).catch((e: any) => {\n throw Error(`Unexpected error ${e}`);\n });\n }).catch((e: any) => {\n throw Error(`Unexpected error ${e}`);\n });\n\n }).catch((e: any) => {\n throw Error(`Unexpected error. ${e}`);\n });\n\n }\n\n set cacheIndex(value) {\n // readonly\n logger.debug(\"[cacheIndex] This property is readonly\");\n }\n\n get cacheIndex():string {\n const self = this;\n const __routing_path__ = _DataStringify(self.routingPath);\n return Base64.encode(self.name + __routing_path__);\n }\n\n set parsedAssignmentText(value: string) {\n // readonly\n logger.debug(\"[parsedAssignmentText] This property is readonly\");\n }\n\n get parsedAssignmentText(): string {\n const self = this;\n self._parsedAssignmentText = self.parseTemplate(self.template);\n if (typeof self._parsedAssignmentText === \"undefined\") {\n throw Error(`[Component][${this.name}][parsedAssignmentText] Could not generate content!`);\n }\n return self._parsedAssignmentText;\n }\n\n\n set shadowRoot(value: IQCObjectsShadowedElement) {\n const self = this;\n if (typeof self.__shadowRoot === \"undefined\") {\n self.__shadowRoot = value;\n } else {\n logger.debug(\"[shadowRoot] This property can only be assigned once!\");\n }\n }\n\n get shadowRoot(): IQCObjectsShadowedElement {\n const self = this;\n return self.__shadowRoot as IQCObjectsShadowedElement;\n }\n\n\n set routingSelected(value: TComponentRouting[]) {\n logger.debug(\"[routingSelected] This is a read-only property of the component\");\n }\n\n get routingSelected(): TComponentRouting[] {\n const self = this;\n return __valid_routings__(self.routings, self.routingPath);\n }\n\n set routingParams(value) {\n logger.debug(\"[routingParams] This is a read-only property of the component\");\n }\n\n get routingParams(): object {\n const component = this;\n return [{}].concat(component.routingSelected.map(function (routing: any) {\n return __routing_params__(routing, component.routingPath);\n })).reduce(function (accumulator, colData) {\n return Object.assign(accumulator, colData);\n });\n }\n\n\n set serviceClassName(_serviceClassName: string) {\n this._serviceClassName = _serviceClassName;\n }\n\n get serviceClassName(): string | null {\n let _serviceClassName: string | null = \"\";\n if (isBrowser) {\n _serviceClassName = ((this.body as HTMLElement).getAttribute(\"serviceClass\") !== null) ? ((this.body as HTMLElement).getAttribute(\"serviceClass\")) : (\n this._serviceClassName\n );\n } else {\n _serviceClassName = this._serviceClassName;\n }\n return _serviceClassName;\n }\n\n protected get responseToData(): boolean {\n let _response_to_data_: boolean = false;\n if (isBrowser) {\n const responseToAttr = (this.body as HTMLElement).getAttribute(\"response-to\");\n _response_to_data_ = responseToAttr === \"data\" || this.responseTo === \"data\";\n } else {\n _response_to_data_ = this.responseTo === \"data\";\n }\n return _response_to_data_;\n }\n\n protected get responseToTemplate(): boolean {\n let _response_to_template_: boolean = false;\n if (isBrowser) {\n const responseToAttr = (this.body as HTMLElement).getAttribute(\"response-to\");\n _response_to_template_ = responseToAttr === \"template\" || this.responseTo === \"template\";\n } else {\n _response_to_template_ = this.responseTo === \"template\";\n }\n return _response_to_template_;\n }\n\n createServiceInstance(): Promise {\n const component = this;\n let data = this.data;\n let __serviceClass: any;\n const __classDefinition = component.getClass().__definition;\n const _serviceClassName = component.serviceClassName;\n\n return new Promise(function (resolve, reject) {\n /* __enable_service_class__ = true by default */\n const __enable_service_class__ = component.enableServiceClass;\n let _response_to_data_ = component.responseToData;\n let _response_to_template_ = component.responseToTemplate;\n\n if (__enable_service_class__ && _serviceClassName !== null) {\n __serviceClass = ClassFactory(_serviceClassName);\n }\n if (!_response_to_data_ && __classDefinition && Object.hasOwn(__classDefinition, \"responseTo\")) {\n _response_to_data_ = (__classDefinition.responseTo === \"data\");\n } else if (!_response_to_data_ && Object.hasOwn(ClassFactory(\"Component\"), \"responseTo\")) {\n _response_to_data_ = ((ClassFactory(\"Component\") as Component).responseTo === \"data\");\n }\n if (!_response_to_template_ && __classDefinition && Object.hasOwn(__classDefinition, \"responseTo\")) {\n _response_to_template_ = (__classDefinition.responseTo === \"template\");\n } else if (!_response_to_template_ && Object.hasOwn(ClassFactory(\"Component\"), \"responseTo\")) {\n _response_to_template_ = ((ClassFactory(\"Component\") as Component).responseTo === \"template\");\n }\n\n if (typeof __serviceClass !== \"undefined\" &&\n (typeof __enable_service_class__ !== \"undefined\" &&\n __enable_service_class__ === true) &&\n (_response_to_data_ || _response_to_template_)\n ) {\n logger.info(\"Loading service \" + _serviceClassName);\n const serviceInstance = New(__serviceClass, {\n data\n });\n (serviceLoader(serviceInstance) as Promise)?.then(function ({\n service\n }: { request: any, service: any }) {\n let serviceResponse;\n if (typeof service.JSONresponse !== \"undefined\" && service.JSONresponse !== null) {\n serviceResponse = service.JSONresponse;\n } else {\n serviceResponse = service.template;\n }\n if (_response_to_data_) {\n if (typeof data === \"object\" && typeof serviceResponse === \"object\") {\n data = Object.assign(data, serviceResponse);\n } else {\n data = serviceResponse;\n }\n component.data = data;\n }\n component.serviceInstance = serviceInstance;\n component.serviceData = data;\n\n if (_response_to_template_) {\n component.template = serviceResponse;\n }\n resolve(serviceResponse);\n }, function (rejectedResponse: Error) {\n logger.debug(`Service loading rejected for ${_serviceClassName} in ${component.name}`);\n reject(rejectedResponse);\n }).catch(function (e: any) {\n logger.debug(\"Something went wroing while trying to load the service \" + _serviceClassName);\n throw Error(`Error loading ${_serviceClassName} for ${component.name}. Detail: ${e}`);\n });\n } else {\n resolve(null);\n }\n });\n }\n\n _bindroute_():void {\n const _component_ = this;\n if (!(_component_ as any)._bindroute_.loaded) {\n if (isBrowser) {\n\n (_component_.hostElements(\"a\") as unknown as HTMLAnchorElement[]).map(function (a: HTMLAnchorElement) {\n (a as any).oldclick = a.onclick;\n a.onclick = function (e) {\n let _ret_ = true;\n if (!_top.global.get(\"routingPaths\")) {\n _top.global.set(\"routingPaths\", []);\n }\n const routingWay = CONFIG.get(\"routingWay\");\n const routingPath = (e.target as any)[routingWay];\n if (_top.global.get(\"routingPaths\").includes(routingPath) &&\n (e.target as any)[routingWay] !== (location as any)[routingWay] &&\n (e.target as HTMLAnchorElement).href !== document.location.href\n ) {\n logger.debug(\"A ROUTING WAS FOUND: \" + routingPath);\n window.history.pushState({\n href: (e.target as HTMLAnchorElement).href\n }, (e?.target as HTMLAnchorElement)?.href, (e.target as HTMLAnchorElement).href);\n Component.route().catch((e) => { throw Error(`Unexpected error: ${e}`); });\n _ret_ = false;\n } else {\n logger.debug(\"NO ROUTING FOUND FOR: \" + routingPath);\n }\n if (typeof (e.target as any).oldclick !== \"undefined\" && typeof (e.target as any).oldclick === \"function\") {\n (e.target as any).oldclick.call(e.target, e);\n }\n return _ret_;\n };\n return null;\n });\n\n } else {\n // not yet implemented.\n }\n (_component_ as any)._bindroute_.loaded = true;\n } else {\n logger.debug(`Routes already bound to popstate events for ${_component_.name}`);\n }\n\n }\n\n done(standardResponse?: TComponentDoneResponse): Promise {\n const _ret_ = new Promise((resolve) => {\n if (typeof standardResponse !== \"undefined\") {\n const { request, component } = standardResponse;\n resolve({ request, component });\n } else {\n resolve({ request: undefined, component: undefined });\n }\n });\n return _ret_;\n }\n\n createControllerInstance(): Promise<{ component: IComponent, controller: IController }> {\n let _Controller: any;\n if (isBrowser) {\n if (typeof this.body === \"undefined\") {\n throw new Error(\"The component has no body\");\n }\n var controllerName = (this.body as HTMLElement).getAttribute(\"controllerClass\");\n if (!controllerName) {\n controllerName = \"Controller\";\n }\n _Controller = ClassFactory(controllerName);\n if (typeof _Controller !== \"undefined\") {\n this.controller = New(_Controller, {\n component: this\n });\n }\n\n }\n\n return new Promise((resolve, reject) => {\n if (isBrowser) {\n if (typeof _Controller !== \"undefined\" && typeof this.controller !== \"undefined\") {\n if (typeof (this.controller).done === \"function\") {\n try {\n this.controller.done.call(this.controller);\n } catch (e: any) {\n throw Error(e);\n }\n } else {\n logger.debug(`${controllerName} does not have a done() method.`);\n reject(new Error(`${controllerName} does not have a done() method.`));\n }\n if (typeof this.controller.createRoutingController === \"function\") {\n this.controller.createRoutingController.call(this.controller);\n } else {\n logger.debug(`${controllerName} does not have a createRoutingController() method.`);\n }\n }\n }\n resolve({ component: this, controller: this.controller as IController });\n });\n }\n\n createEffectInstance(): Promise<{ component: Component, effect: IEffect }> {\n const _component_ = this;\n return new Promise(function (resolve) {\n if (isBrowser) {\n const effectClassName = (_component_.body as HTMLElement)?.getAttribute(\"effectClass\");\n let applyEffectTo = (_component_.body as HTMLElement)?.getAttribute(\"apply-effect-to\");\n applyEffectTo = (applyEffectTo !== null) ? (applyEffectTo) : (\"load\");\n if (effectClassName !== null && applyEffectTo === \"observe\") {\n _component_.applyObserveTransitionEffect(effectClassName);\n } else if (effectClassName !== null && applyEffectTo === \"load\") {\n _component_.applyTransitionEffect(effectClassName);\n }\n }\n resolve({ component: _component_, effect: _component_.effect as IEffect });\n });\n }\n\n createViewInstance(): Promise<{ component: Component, view: IView }> {\n const _component_ = this;\n return new Promise(function (resolve) {\n const viewName = (isBrowser) ? ((_component_.body as HTMLElement).getAttribute(\"viewClass\")) : (null);\n if (viewName !== null) {\n const _View = ClassFactory(viewName);\n if (typeof _View !== \"undefined\") {\n _component_.view = New(_View, {\n component: _component_\n }); // Initializes the main view for the component\n if (Object.hasOwn(_component_.view as object, \"done\") && typeof _component_.view?.done === \"function\") {\n _component_.view?.done.call(_component_.view);\n }\n }\n\n }\n resolve({ component: _component_, view: _component_.view as IView });\n\n });\n }\n\n __done__(): Promise {\n const _component_ = this;\n const componentDone = function () {\n if (typeof _component_ === \"undefined\") {\n throw new Error(\"componentDone() has lost its context\");\n }\n if (typeof _component_.body === \"undefined\") {\n throw new Error(\"The component has no body\");\n }\n\n (async () => {\n await _component_.createViewInstance();\n await _component_.createControllerInstance();\n await _component_.createEffectInstance();\n })()\n .catch((e: any) => {\n throw new Error(`Unknown error ${e}.`);\n });\n\n logger.debug(`Trying to run component helpers for ${_component_.name}...`);\n try {\n _component_.runComponentHelpers();\n logger.debug(`Component helpers for ${_component_.name} executed.`);\n } catch (e: any) {\n logger.debug(`Component helpers for ${_component_.name} could not be executed.`);\n throw Error(e);\n }\n\n _component_.subcomponents = _component_.__buildSubComponents__();\n\n _component_._bindroute_();\n if (isBrowser) {\n (_component_.body as HTMLElement).setAttribute(\"loaded\", \"true\");\n }\n };\n\n return new Promise(function (resolve, reject) {\n try {\n resolve(componentDone.call(_component_));\n } catch (e: any) {\n reject(new Error(e));\n }\n });\n\n }\n\n hostElements(tagFilter: string): (IQCObjectsElement | HTMLElement | IQCObjectsShadowedElement)[] {\n const _component_ = this;\n let elementList: (IQCObjectsElement | HTMLElement | IQCObjectsShadowedElement)[] = [];\n if (isBrowser) {\n elementList = (_component_.shadowed && (typeof _component_.shadowRoot !== \"undefined\")) ? (\n _component_.shadowRoot.subelements(tagFilter) as IQCObjectsShadowedElement[]\n ) : (\n (_component_.body as IQCObjectsElement).subelements(tagFilter)\n );\n\n }\n return elementList;\n }\n\n get subtags(): (HTMLElement | IQCObjectsElement | IQCObjectsShadowedElement)[] {\n const _component_ = this;\n const tagFilter = _tag_filter_;\n return _component_.hostElements(tagFilter);\n }\n\n get bodyAttributes():any {\n const _component_ = this;\n const c = _component_.body;\n return (isBrowser) ? ([...(c as HTMLElement).getAttributeNames()].map(a => { return { [a]: (c as HTMLElement).getAttribute(a) }; }).reduce((accumulator, colData) => { return Object.assign(accumulator, colData); })) : ({});\n }\n\n get dataAttributes():any {\n const _component_ = this;\n const c = _component_.body;\n return (isBrowser) ? ([{}].concat([...(c as HTMLElement).getAttributeNames()].filter(n => n.startsWith(\"data-\")).map(a => { return { [a.split(\"-\")[1]]: (c as HTMLElement).getAttribute(a) }; })).reduce((accumulator, colData) => { return Object.assign(accumulator, colData); })) : ({});\n }\n\n __buildSubComponents__(rebuildObjects = false): any {\n const _component_: Component = this as Component;\n let elementList = _component_.subtags;\n if (!rebuildObjects) {\n elementList = (elementList as HTMLElement[]).filter((t: HTMLElement) => t.getAttribute(\"loaded\") !== \"true\") as unknown[] as IQCObjectsElement[];\n }\n if ((typeof _component_ !== \"undefined\") || (_component_ as Component).subcomponents.length < 1) {\n _component_.subcomponents = _buildComponentsFromElements_(elementList as HTMLElement[], _component_);\n }\n return _component_.subcomponents;\n }\n\n fail(standardResponse: { error: any; component: Component; }): Promise<{ error: any; component: Component; }> {\n const _ret_ = new Promise<{ error: any; component: Component; }>((resolve, reject) => {\n if (typeof standardResponse !== \"undefined\") {\n const { error, component } = standardResponse;\n resolve({ error, component });\n } else {\n reject(new Error(\" Unknown error.\"));\n }\n });\n return _ret_;\n }\n\n set(key: string, value: any):void {\n this[key] = value;\n }\n\n get(key: string, _defaultValue?: string): any {\n return this[key] || _defaultValue;\n }\n\n feedComponent(): Promise {\n const _component_ = this;\n logger.debug(`[Component][${this.name}][feedComponent] start feeding component...`);\n const _feedComponent_InBrowser = function (_component_: Component): any {\n if (typeof _component_.container === \"undefined\" && typeof _component_.body === \"undefined\") {\n logger.warn(\"COMPONENT {{NAME}} has an undefined container and body\".replace(\"{{NAME}}\", _component_.name));\n return;\n }\n const container = (typeof _component_.container === \"undefined\" || _component_.container === null) ? (_component_.body) : (_component_.container);\n const parsedAssignmentText = _component_.parsedAssignmentText;\n _component_.innerHTML = parsedAssignmentText;\n if (_component_.shadowed) {\n logger.debug(\"COMPONENT {{NAME}} is shadowed\".replace(\"{{NAME}}\", _component_.name));\n logger.debug(\"Preparing slots for Shadowed COMPONENT {{NAME}}\".replace(\"{{NAME}}\", _component_.name));\n const tmp_shadowContainer = _DOMCreateElement(\"div\");\n container.subelements(\"[slot]\").map(\n (c: { parentElement: any; }): any => {\n if (c.parentElement === container) {\n tmp_shadowContainer.appendChild(c as any);\n }\n return c;\n });\n logger.debug(\"Creating shadowedContainer for COMPONENT {{NAME}}\".replace(\"{{NAME}}\", _component_.name));\n const shadowContainer = _DOMCreateElement(\"div\");\n shadowContainer.classList.add(\"shadowHost\");\n try {\n _component_.shadowRoot = shadowContainer.attachShadow({\n mode: \"open\"\n }) as IQCObjectsShadowedElement;\n } catch (e: any) {\n logger.debug(`An error ocurred: ${e}.`);\n try {\n logger.debug(\"Shadowed COMPONENT {{NAME}} is repeated\".replace(\"{{NAME}}\", _component_.name));\n _component_.shadowRoot = shadowContainer.shadowRoot as IQCObjectsShadowedElement;\n } catch (e: any) {\n logger.debug(`An error ocurred: ${e}.`);\n logger.warn(\"Shadowed COMPONENT {{NAME}} is not allowed on this browser\".replace(\"{{NAME}}\", _component_.name));\n }\n }\n if (typeof _component_.shadowRoot !== \"undefined\" && _component_.shadowRoot !== null) {\n if (_component_.reload) {\n logger.debug(\"FORCED RELOADING OF CONTAINER FOR Shadowed COMPONENT {{NAME}}\".replace(\"{{NAME}}\", _component_.name));\n if (shadowContainer !== null && shadowContainer.shadowRoot !== null) {\n shadowContainer.shadowRoot.innerHTML = _component_.innerHTML;\n }\n } else {\n tmp_shadowContainer.innerHTML = _component_.parseTemplate(tmp_shadowContainer.innerHTML);\n logger.debug(\"ADDING Shadowed COMPONENT {{NAME}} \".replace(\"{{NAME}}\", _component_.name));\n if (shadowContainer !== null && shadowContainer.shadowRoot !== null) {\n shadowContainer.shadowRoot.innerHTML += _component_.innerHTML;\n }\n }\n logger.debug(\"ADDING Slots to Shadowed COMPONENT {{NAME}} \".replace(\"{{NAME}}\", _component_.name));\n shadowContainer.innerHTML += tmp_shadowContainer.innerHTML;\n logger.debug(\"APPENDING Shadowed COMPONENT {{NAME}} to Container \".replace(\"{{NAME}}\", _component_.name));\n const qs = container.querySelector(\".shadowHost\");\n if (!(typeof qs !== \"undefined\" && qs !== null)) {\n container.appendChild(shadowContainer);\n } else {\n logger.debug(\"Shadowed Container for COMPONENT {{NAME}} is already present in the tree \".replace(\"{{NAME}}\", _component_.name));\n if (_component_.shadowRoot !== null && shadowContainer.shadowRoot !== null) {\n _component_.shadowRoot.innerHTML = shadowContainer.shadowRoot.innerHTML;\n }\n }\n } else {\n logger.warn(\"Shadowed COMPONENT {{NAME}} is bad configured\".replace(\"{{NAME}}\", _component_.name));\n }\n } else {\n if (_component_.reload) {\n logger.debug(\"FORCED RELOADING OF CONTAINER FOR COMPONENT {{NAME}}\".replace(\"{{NAME}}\", _component_.name));\n container.innerHTML = _component_.innerHTML;\n } else if (container && _component_) {\n logger.debug(\"ADDING COMPONENT {{NAME}} \".replace(\"{{NAME}}\", _component_.name));\n container.innerHTML += _component_.innerHTML;\n } else {\n logger.warn(\"COMPONENT {{NAME}} is not added to the DOM\".replace(\"{{NAME}}\", _component_.name));\n }\n }\n\n };\n\n const _feedComponent_InNode = function (_component_: Component): any {\n const parsedAssignmentText = _component_.parsedAssignmentText;\n _component_.innerHTML = parsedAssignmentText;\n };\n\n let _ret_;\n if (!is_a(_component_, \"Component\")) {\n logger.warn(\"Trying to feed a non component object\");\n return Promise.reject(new Error(`Trying to feed a non component object ${typeof _component_}`));\n }\n return new Promise((resolve, reject) => {\n if (isBrowser) {\n try {\n _ret_ = _feedComponent_InBrowser(_component_);\n resolve(_ret_);\n } catch (e: any) {\n reject(new Error(e));\n }\n } else {\n try {\n _ret_ = _feedComponent_InNode(_component_);\n resolve(_ret_);\n } catch (e: any) {\n reject(new Error(e));\n }\n\n }\n\n });\n }\n\n rebuild(): Promise<{ request?: XMLHttpRequest, component: Component }> {\n const _component = this as Component;\n var _promise = new Promise<{ request?: XMLHttpRequest, component: Component }>(function (resolve, reject) {\n if (typeof _component === \"undefined\" || _component === null) {\n reject(new Error(\"Component is undefined\"));\n }\n if (isQCObjects_Object(_component) && is_a(_component, \"Component\")) {\n switch (true) {\n case (_component.get(\"tplsource\") === \"none\"):\n logger.debug(\"Component \" + _component.name + \" has specified template-source=none, so no template load was done\");\n var standardResponse = {\n request: undefined,\n component: _component\n };\n _component.__done__().then(function () {\n if (typeof _component.done === \"function\") {\n _component.done.call(_component, standardResponse)\n .catch((e: any) => {\n logger.debug(`It was an error while calling done() in ${_component.name}: ${e}`);\n });\n }\n resolve.call(_promise, standardResponse);\n }, function () {\n reject.call(_promise, standardResponse);\n });\n break;\n case (_component.get(\"tplsource\") === \"inline\"):\n logger.debug(\"Component \" + _component.name + \" has specified template-source=inline, so it is assumed that template is already declared\");\n (async (_component) => {\n await _component.feedComponent.bind(_component)();\n })(_component)\n .catch((e: any) => {\n logger.debug(`It was not possible to feed the component ${_component.name}: ${e}`);\n });\n var standardResponse = {\n request: undefined,\n component: _component\n };\n _component.__done__().then(async () => {\n if (typeof _component.done === \"function\") {\n await _component.done(standardResponse);\n }\n resolve.call(_promise, standardResponse);\n }, function () {\n reject.call(_promise, standardResponse);\n });\n break;\n case (_component.get(\"tplsource\") === \"default\" &&\n _component.get(\"templateURI\") !== \"\"):\n _component.set(\"url\", _component.get(\"basePath\") + _component.get(\"templateURI\"));\n (componentLoader(_component, false))?.then(\n function (standardResponse: any) {\n resolve.call(_promise, standardResponse);\n },\n function (standardResponse: any) {\n reject.call(_promise, standardResponse);\n });\n break;\n case (_component.get(\"tplsource\") === \"external\" &&\n _component.get(\"templateURI\") !== \"\"):\n _component.set(\"url\", _component.get(\"templateURI\"));\n (componentLoader(_component, false)).then(\n function (standardResponse: any) {\n resolve.call(_promise, standardResponse);\n },\n function (standardResponse: any) {\n reject.call(_promise, standardResponse);\n });\n break;\n case _component.get(\"tplsource\") === \"default\" && _component.get(\"templateURI\", \"\") === \"\":\n logger.debug(`Component ${_component.name} template-source is ${_component.get(\"tplsource\")} and no templateURI is present`);\n reject.call(_promise, `Component ${_component.name} template-source is ${_component.get(\"tplsource\")} and no templateURI is present`);\n break;\n default:\n logger.debug(\"Component \" + _component.name + \" will not be rebuilt because no templateURI is present\");\n reject.call(_promise, {\n request: null,\n component: _component\n });\n break;\n }\n\n }\n });\n return _promise;\n }\n\n Cast(oClass: any): any {\n /* Cast method for components has been deprecated. Don't use this method, it is available only for compatibility purposes */\n const o = _methods_(oClass).map((m): any => (m as Function).name.replace(/bound /g, \"\")).map(m => {\n return {\n [m]: oClass[m].bind(this)\n };\n }).reduce((c, p) => Object.assign(c, p), {});\n return _Cast(this, o);\n }\n\n route():Promise {\n return (this.constructor as typeof Component).route();\n }\n\n static route():Promise {\n const componentClass = this; /* is can be class or object */\n let _route_promise_;\n const isValidInstance = !!((isQCObjects_Object(componentClass) && is_a(componentClass, \"Component\")));\n const __route__ = function (componentList: any[]) {\n const _componentNames_: any[] = [];\n const _promises_ = componentList.filter(function (rc: any) {\n return typeof rc !== \"undefined\";\n }).map(function (rc: Component): Promise {\n if (typeof rc.name !== \"undefined\") {\n _componentNames_.push(rc.name);\n } else {\n throw new Error(__getType__(rc) + \" does not have a name\");\n }\n return new Promise(function (resolve, reject) {\n if (typeof rc !== \"undefined\" && !!rc._reroute_) {\n rc._reroute_()\n .then(function () {\n rc.reload = true;\n rc.rebuild()\n .then(() => {\n resolve();\n })\n .catch((e: any) => {\n logger.debug(`Error ${e}`);\n });\n return;\n })\n .then(function () {\n if (Object.hasOwn(rc, \"subcomponents\") &&\n typeof rc.subcomponents !== \"undefined\" &&\n rc.subcomponents.length > 0\n ) {\n logger.debug(\"LOOKING FOR ROUTINGS IN SUBCOMPONENTS FOR: \" + rc.name);\n return __route__.call(rc, rc.subcomponents);\n } else {\n logger.debug(\"No subcomponents to look for routings in: \" + rc.name);\n if (rc.subtags.length > 0) {\n rc.subcomponents = rc.__buildSubComponents__(true);\n }\n resolve();\n }\n }).catch((e: any) => {\n logger.debug(`Error: ${e}`);\n });\n } else if (typeof rc !== \"undefined\") {\n reject(new Error(\"Component \" + rc.name + \" is not an instance of Component\"));\n }\n return;\n });\n });\n return Promise.all(_promises_)\n .then(function () {\n logger.debug(\"ROUTING COMPLETED FOR \" + _componentNames_.join(\", \"));\n }).catch(function (err) {\n logger.warn(\"ROUTING FAILED FOR \" + _componentNames_.join(\", \") + \": \" + err);\n });\n };\n if (isValidInstance || !!componentsStack) {\n if (isValidInstance) {\n logger.debug(\"loading routings for instance \" + componentClass.name);\n }\n _route_promise_ = __route__.call(componentClass, (isValidInstance) ? (componentClass.subcomponents) : (componentsStack));\n } else {\n logger.debug(\"An undetermined result expected if load routings. So will not be loaded this time.\");\n throw Error(\"There is no valid instance and no components stack available to apply rountings\");\n }\n return _route_promise_;\n }\n\n fullscreen():void {\n if (isBrowser) {\n const elem: HTMLElement = this.body as HTMLElement;\n if (elem.requestFullscreen) {\n elem.requestFullscreen()\n .catch((e: any) => {\n throw new Error(`An error ocurred when requesting fullscreen: ${e}`);\n });\n } else if ((elem as any).mozRequestFullScreen) {\n /* Firefox */\n (elem as any).mozRequestFullScreen();\n } else if ((elem as any).webkitRequestFullscreen) {\n /* Chrome, Safari & Opera */\n (elem as any).webkitRequestFullscreen();\n } else if ((elem as any).msRequestFullscreen) {\n /* IE/Edge */\n (elem as any).msRequestFullscreen();\n }\n } else {\n // not yet implemented.\n }\n }\n\n closefullscreen():void {\n if (isBrowser) {\n if (document.exitFullscreen) {\n document.exitFullscreen()\n .catch((e: any) => { throw new Error(`An error ocurred when trying to exit fullscrenn ${e}.`); });\n } else if ((document as any).mozCancelFullScreen) {\n (document as any).mozCancelFullScreen();\n } else if ((document as any).webkitExitFullscreen) {\n (document as any).webkitExitFullscreen();\n } else if ((document as any).msExitFullscreen) {\n (document as any).msExitFullscreen();\n }\n } else {\n // noy yet implemented.\n }\n }\n\n _generateRoutingPaths(componentBody: TBody):Promise {\n const component = this;\n return new Promise(function (resolve) {\n if (isBrowser) {\n if (__valid_routing_way__(component.validRoutingWays, component.routingWay || \"\")) {\n if (typeof componentBody !== \"undefined\") {\n component.innerHTML = (componentBody as HTMLElement)?.innerHTML;\n component.routingNodes = (componentBody as IQCObjectsElement)?.subelements(\"routing\");\n component.routings = [];\n component.routingNodes.map((routingNode): any => {\n const attributeNames = (routingNode as HTMLElement).getAttributeNames();\n const routing = {} as TComponentRouting;\n attributeNames.map((attributeName: any, a: string | number): any => {\n (routing as any)[attributeNames[a as any]] = (routingNode as HTMLElement).getAttribute(attributeNames[a as any]);\n return attributeName;\n });\n component.routings.push(routing as never);\n if (!component.routingPaths) {\n component.routingPaths = [];\n }\n if (!component.routingPaths.includes(routing.path as never)) {\n component.routingPaths.push(routing.path as never);\n }\n if (!_top.global.get(\"routingPaths\")) {\n _top.global.set(\"routingPaths\", []);\n }\n if (!_top.global.get(\"routingPaths\").includes(routing.path)) {\n _top.global.get(\"routingPaths\").push(routing.path);\n }\n return routingNode;\n });\n }\n }\n } else {\n // not yet implemented.\n }\n resolve();\n\n });\n }\n\n parseTemplate(template: any): string {\n const _self = this;\n let _parsedAssignmentText: string;\n const value = template;\n if (Object.hasOwn(_self, \"templateHandler\")) {\n const templateHandlerName = _self.templateHandler;\n logger.debug(`[Component][${this.name}][parseTemplate] Attempting to use ${templateHandlerName} ...`);\n const templateHandlerClass = ClassFactory(templateHandlerName);\n const templateInstance = New(templateHandlerClass, {\n component: _self,\n template: value\n });\n templateInstance.component = _self;\n let selfData = _self.data;\n if (Object.hasOwn(_self, \"assignRoutingParams\") && _self.assignRoutingParams) {\n try {\n selfData = Object.assign(selfData, _self.routingParams);\n } catch (e: any) {\n logger.debug(`An error ocurred: ${e}.`);\n logger.debug(\"[parseTemplate] it was not possible to assign the routing params to the template\");\n }\n }\n _parsedAssignmentText = templateInstance.assign(selfData);\n } else {\n logger.debug(`[Component][${this.name}][parseTemplate] No value for templateHandler. Using raw content...`);\n _parsedAssignmentText = value;\n }\n return _parsedAssignmentText;\n }\n\n _reroute_(): Promise {\n /* This method set the selected routing and makes the switch to the templateURI */\n const rc = this;\n return new Promise(function (resolve) {\n if (isBrowser) {\n if (__valid_routing_way__(rc.validRoutingWays, rc.routingWay || \"\")) {\n rc.routingPath = (location as any)[rc.routingWay as string];\n rc.routingSelected.map((routing: TComponentRouting,): TComponentRouting => {\n const componentURI = ComponentURI({\n \"COMPONENTS_BASE_PATH\": CONFIG.get(\"componentsBasePath\"),\n \"COMPONENT_NAME\": routing.name.toString(),\n \"TPLEXTENSION\": (Object.hasOwn(routing, \"tplextension\")) ? (routing.tplextension || \"\") : (rc.tplextension),\n \"TPL_SOURCE\": \"default\" /* here is always default in order to get the right uri */\n });\n rc.templateURI = componentURI;\n return routing;\n });\n if (rc.routingSelected.length > 0) {\n rc.template = \"\";\n if (typeof rc.body !== \"undefined\" && rc.body !== null) {\n (rc.body as HTMLElement).innerHTML = \"\";\n }\n }\n }\n }\n resolve(rc);\n\n });\n }\n\n lazyLoadImages() {\n if (isBrowser) {\n const component = this;\n const _componentRoot = component.componentRoot as IQCObjectsShadowedElement;\n if (typeof _componentRoot !== \"undefined\" && _componentRoot !== null) {\n const _imgLazyLoaded = [..._componentRoot.subelements(\"img[lazy-src]\")];\n const _lazyLoadImages = function (image: Element | HTMLElement) {\n image.setAttribute(\"src\", image.getAttribute(\"lazy-src\")?.toString() as string);\n (image as HTMLImageElement).onload = () => {\n image.removeAttribute(\"lazy-src\");\n };\n };\n if (\"IntersectionObserver\" in window) {\n const observer = new IntersectionObserver((items, observer) => {\n items.forEach((item) => {\n if (item.isIntersecting) {\n _lazyLoadImages(item.target);\n observer.unobserve(item.target);\n }\n });\n });\n _imgLazyLoaded.map(function (img) {\n return observer.observe(img as unknown as HTMLImageElement);\n });\n } else {\n (_imgLazyLoaded as (HTMLElement | Element)[]).map(_lazyLoadImages);\n }\n }\n } else {\n // not yet implemented\n }\n return null;\n }\n\n applyTransitionEffect(effectClassName: string):void {\n const _Effect = ClassFactory(effectClassName);\n if (typeof _Effect === \"undefined\") {\n throw Error(`${effectClassName} not found.`);\n }\n if (typeof _Effect !== \"undefined\" && is_a(_Effect, \"TransitionEffect\")) {\n this.effect = New(_Effect, {\n component: this\n });\n (this.effect as any)?.apply((this.effect as any)?.defaultParams);\n } else {\n logger.debug(`${effectClassName} is ${__getType__(_Effect)} but is not a TransitionEffect`);\n }\n }\n\n applyObserveTransitionEffect(effectClassName: any):void {\n if (isBrowser) {\n const component = this;\n const _componentRoot = component.componentRoot;\n const _applyEffect_ = function () {\n component.applyTransitionEffect(effectClassName);\n };\n if (\"IntersectionObserver\" in window) {\n const observer = new IntersectionObserver((items, observer) => {\n items.forEach((item) => {\n if (item.isIntersecting) {\n _applyEffect_();\n observer.unobserve(item.target);\n }\n });\n });\n observer.observe(_componentRoot as Element);\n } else {\n _applyEffect_();\n }\n } else {\n // not yet implemented\n }\n\n }\n\n get componentRoot(): TBody {\n return (this.shadowed) ? (this.shadowRoot) : (this.body);\n }\n\n scrollIntoHash():void {\n if (isBrowser) {\n const component = this;\n if (document.location.hash !== \"\") {\n const _componentRoot = component.componentRoot;\n ((_componentRoot as IQCObjectsShadowedElement)?.subelements(document.location.hash) as unknown as Element[]).map(\n (element: Element): any => {\n if (typeof element.scrollIntoView === \"function\") {\n element.scrollIntoView(\n CONFIG.get(\"scrollIntoHash\", {\n behavior: \"auto\",\n block: \"top\",\n inline: \"top\"\n })\n );\n }\n return element;\n }\n );\n }\n } else {\n // not yet implemented\n }\n }\n\n i18n_translate():void {\n if (isBrowser) {\n if (CONFIG.get(\"use_i18n\")) {\n const component = this;\n const _componentRoot = component.componentRoot as IQCObjectsShadowedElement;\n const lang1 = CONFIG.get(\"lang\", \"en\");\n const lang2 = navigator.language.slice(0, 2);\n const i18n = _top.global.get(\"i18n\");\n if ((lang1 !== lang2) && (typeof i18n === \"object\" && Object.hasOwn(i18n, \"messages\"))) {\n const callback_i18n = () => {\n return new Promise(function (resolve) {\n const messages = i18n.messages.filter(function (message: any) {\n return Object.hasOwn(message, lang1) && Object.hasOwn(message, lang2);\n });\n (_componentRoot?.subelements(\"ul,li,h1,h2,h3,a,b,p,input,textarea,summary,details,option,component\") as HTMLElement[])\n .map((element: HTMLElement): HTMLElement => {\n messages.map(function (message: { [x: string]: any; }) {\n let _innerHTML = element.innerHTML;\n _innerHTML = _innerHTML?.replace(new RegExp(`${message[lang1]}`, \"g\"), message[lang2]);\n element.innerHTML = _innerHTML;\n return null;\n });\n return element;\n });\n resolve();\n });\n };\n callback_i18n.call(component).then(function () {\n logger.debug(\"i18n loaded for component: \" + component.name);\n }).catch((e: any) => { throw new Error(`An error ocurred when parsing i18n: ${e}.`); });\n\n }\n }\n } else {\n // not yet implemented\n }\n }\n\n addComponentHelper(componentHelper: any):void {\n const component = this;\n component._componentHelpers.push(componentHelper as never);\n }\n\n runComponentHelpers():void {\n if (isBrowser) {\n const component = this;\n let __component_helpers__ = [];\n /*\n * BEGIN use i18n translation\n */\n __component_helpers__.push(component.i18n_translate.bind(component));\n /*\n * END use i18n translation\n */\n\n /*\n * BEGIN component scrollIntoHash\n */\n __component_helpers__.push(component.scrollIntoHash.bind(component));\n /*\n * END component scrollIntoHash\n */\n\n /*\n * BEGIN component images lazy-load\n */\n\n __component_helpers__.push(component.lazyLoadImages.bind(component));\n\n /*\n * END component images lazy-load\n */\n\n __component_helpers__ = __component_helpers__.concat(component._componentHelpers);\n\n __component_helpers__.map(\n (_component_helper_): any => {\n logger.debug(`Executing ${_component_helper_.name} as component helper for ${component.name}...`);\n _component_helper_();\n return _component_helper_;\n }\n );\n\n } else {\n // not yet implemented\n }\n\n }\n\n}\n\nPackage(\"com.qcobjects\", [\n Component\n]);\n\n(_methods_)(ClassFactory(\"Component\")).map((__c__): any => {\n (_protected_code_)(__c__);\n return __c__;\n});\n", "import { IQCObjectsElement, TComponentURIParams } from \"@types\";\nimport { Class } from \"./Class\";\nimport { ClassFactory } from \"./ClassFactory\";\nimport { Component } from \"./Component\";\nimport { CONFIG } from \"./CONFIG\";\nimport { _DOMCreateElement } from \"./DOMCreateElement\";\nimport { __getType__ } from \"./getType\";\nimport { logger } from \"./Logger\";\nimport { New } from \"./New\";\nimport { Package } from \"./Package\";\nimport { isBrowser } from \"./platform\";\nimport { _tag_filter_ } from \"./tag_filter\";\n\n/**\n * Returns a standarized uri for a component\n * @example\n * templateURI = ComponentURI({'COMPONENTS_BASE_PATH':'','COMPONENT_NAME':'','TPLEXTENSION':'','TPL_SOURCE':''})\n * @author: Jean Machuca \n * @param params an object with the params to build the uri path\n */\nexport const ComponentURI = ({ TPL_SOURCE, COMPONENTS_BASE_PATH, COMPONENT_NAME, TPLEXTENSION }:TComponentURIParams):string => {\n const templateURI = (TPL_SOURCE === \"default\") ? (`${COMPONENTS_BASE_PATH}${COMPONENT_NAME}.${TPLEXTENSION}`) : (\"\");\n return templateURI;\n};\n\nexport const _buildComponentFromElement_ = (element: Element, __parent__: any):Component => {\n const __shadowed_not_set = (element.getAttribute(\"shadowed\") === null);\n const __tplsource_attr_not_set = (element.getAttribute(\"template-source\") === null);\n const shadowed = (element.getAttribute(\"shadowed\") === \"true\");\n const __cached_not_set = (element.getAttribute(\"cached\") === null);\n const cached = (element.getAttribute(\"cached\") === \"true\");\n let tplextension = (typeof CONFIG.get(\"tplextension\") !== \"undefined\") ? (CONFIG.get(\"tplextension\")) : (\"html\");\n tplextension = (element.getAttribute(\"tplextension\") !== null) ? (element.getAttribute(\"tplextension\")) : (tplextension);\n let _componentName = element.getAttribute(\"name\");\n const _componentClassName = (element.getAttribute(\"componentClass\") !== null) ? (element.getAttribute(\"componentClass\")) : (\"Component\");\n const __componentClassName = (CONFIG.get(\"preserveComponentBodyTag\")) ? (\n (_componentName !== null) ? (\"com.qcobjects.components.\" + _componentName + \".ComponentBody\") : (\"com.qcobjects.components.ComponentBody\")\n ) : (_componentClassName);\n _componentName = (_componentName !== null) ? (_componentName) : (\n (ClassFactory(__componentClassName as string) &&\n typeof (ClassFactory(__componentClassName as string) as unknown as typeof Component).name !== \"undefined\"\n ) ? (\n (ClassFactory(__componentClassName as string) as unknown as Component).name\n ) : (\"\")\n );\n const __classDefinition = ClassFactory(__componentClassName as string) as Component;\n const __tplsource_prop_set = !!((__componentClassName !== \"Component\" && ((typeof __classDefinition !== \"undefined\" && typeof __classDefinition.tplsource === \"string\") && __classDefinition.tplsource !== \"\")));\n const tplsource = (__tplsource_attr_not_set && __tplsource_prop_set) ? (__classDefinition.tplsource) : ((__tplsource_attr_not_set) ? (\"default\") : (element.getAttribute(\"template-source\")));\n logger.debug(`template source for ${_componentName} is ${tplsource} `);\n logger.debug(`type for ${_componentName} is ${__getType__(__classDefinition)} `);\n\n const componentURI: string = ComponentURI({\n \"COMPONENTS_BASE_PATH\": CONFIG.get(\"componentsBasePath\"),\n \"COMPONENT_NAME\": _componentName ,\n \"TPLEXTENSION\": tplextension,\n \"TPL_SOURCE\": tplsource as string\n });\n if (CONFIG.get(\"preserveComponentBodyTag\")) {\n Package((_componentName !== \"\") ? (\"com.qcobjects.components.\" + _componentName + \"\") : (\"com.qcobjects.components\"), [\n Class(\"ComponentBody\", Component, {\n name: _componentName,\n tplsource,\n tplextension,\n reload: true\n })\n ]);\n }\n\n const __create_component_instance_ = function ():Component {\n const __shadowed = (__shadowed_not_set) ? ((__classDefinition && __classDefinition.shadowed) || Component.shadowed) : (shadowed);\n const __definition = {\n __parent__,\n name: _componentName,\n cached: (__cached_not_set) ? (Component.cached) : (cached),\n shadowed: __shadowed,\n tplextension,\n body: (CONFIG.get(\"preserveComponentBodyTag\")) ? (_DOMCreateElement(\"componentBody\")) : (element),\n templateURI: componentURI,\n tplsource\n };\n if (typeof _componentName === \"undefined\" || _componentName === \"\" || _componentName === null) {\n /* this allows to use the original property defined\n in the component definition if it is not present in the tag */\n delete (__definition as any).name;\n }\n if (componentURI === \"\") {\n /* this allows to use the original property defined\n in the component definition if it is not present in the tag */\n delete (__definition as any).templateURI;\n }\n const newComponent = New(__classDefinition, __definition) as Component;\n\n if (CONFIG.get(\"preserveComponentBodyTag\")) {\n if (typeof newComponent !== \"undefined\") {\n element.append(newComponent.body as string | Node);\n }\n }\n return newComponent;\n };\n const newComponent = __create_component_instance_();\n return newComponent;\n};\n\nexport const _buildComponentsFromElements_ = (elements: HTMLElement[], __parent__: Component | null):Component[] => {\n let componentsBuiltWith:Component[] = [];\n if (isBrowser) {\n componentsBuiltWith = elements.map(\n function (element: any) {\n return _buildComponentFromElement_(element, __parent__);\n }\n );\n } else {\n logger.debug(\"[_buildComponentsFromElements_] not implemented for Non-Browser environments\");\n }\n return componentsBuiltWith;\n};\n\nexport const buildComponents = (element:HTMLElement):Component[] => {\n const tagFilter = _tag_filter_;\n const elements = (element as unknown as IQCObjectsElement).subelements(tagFilter) as HTMLElement[];\n return _buildComponentsFromElements_(elements, null);\n};", "import { _basePath_ } from \"./basePath\";\nimport { _Crypt } from \"./Crypt\";\nimport { _domain_ } from \"./domain\";\nimport { InheritClass } from \"./InheritClass\";\nimport { logger } from \"./Logger\";\nimport { Package } from \"./Package\";\nimport { _secretKey } from \"./secretKey\";\nimport { CONFIG } from \"./CONFIG\";\nimport { IJSONService, IService, TServiceDoneResponse, TServiceStandardResponse } from \"@types\";\n\nexport class Service extends InheritClass implements IService{\n options!: object;\n withCredentials!: boolean;\n useHTTP2: any;\n // eslint-disable-next-line no-unused-vars\n mockup({ request, service }: TServiceStandardResponse): void {\n throw new Error(\"Method not implemented.\");\n }\n name!: string;\n responseHeaders: any;\n // eslint-disable-next-line no-unused-vars\n local({ request, service }: TServiceStandardResponse): void {\n throw new Error(\"Method not implemented.\");\n }\n kind = \"rest\";\n /* it can be rest, mockup, local */\n domain:string = _domain_;\n basePath:string = _basePath_;\n url = \"\";\n method = \"GET\";\n data = {};\n reload = false;\n cached = false;\n\n headers: any;\n template: unknown;\n \n // eslint-disable-next-line no-unused-vars\n done({ request, service }: TServiceDoneResponse): void {\n throw new Error(\"Method not implemented.\");\n }\n // eslint-disable-next-line no-unused-vars\n fail(...args: any[]): void {\n throw new Error(\"Method not implemented.\");\n }\n\n set(name:string, value:never):void {\n this[name] = value;\n }\n\n get(name:string, _default?:never):any {\n return this[name] as never || _default;\n }\n\n}\n\nexport class JSONService extends Service implements IJSONService{\n method = \"GET\";\n cached = false;\n headers = {\n \"Content-Type\": \"application/json\",\n \"charset\": \"utf-8\"\n };\n\n JSONresponse?:JSON = undefined;\n done(result:TServiceDoneResponse):void {\n logger.debug(\"***** RECEIVED RESPONSE:\");\n logger.debug(result.service.template as string);\n this.JSONresponse = JSON.parse(result.service.template as string);\n }\n\n\n\n}\n\nexport class ConfigService extends JSONService {\n method = \"GET\";\n cached = false;\n configFileName = \"config.json\";\n headers = {\n \"Content-Type\": \"application/json\",\n \"charset\": \"utf-8\"\n };\n\n configLoaded():Promise{\n throw Error (\"Method not implemented.\");\n }\n\n JSONresponse?:JSON = undefined;\n done(result:TServiceDoneResponse):void {\n logger.debug(\"***** CONFIG LOADED:\");\n logger.debug(result.service.template as string);\n this.JSONresponse = JSON.parse(result.service.template as string);\n if (Object.hasOwn(this.JSONresponse as object, \"__encoded__\")) {\n const decodedValue:string = _Crypt.decrypt((this.JSONresponse as any)?.__encoded__, _secretKey);\n this.JSONresponse = JSON.parse(decodedValue);\n }\n const jsonResponse:any = this.JSONresponse;\n Object.keys(jsonResponse as object).map((k:string) => {\n CONFIG.set(k, (jsonResponse as never)[k]);\n return k;\n });\n this.configLoaded().catch((e:any)=>{throw new Error (`An error ocurred: ${e}`);});\n }\n\n fail():void {\n this.configLoaded().catch((e:any)=>{throw new Error (`An error ocurred: ${e}`);});\n }\n\n constructor() {\n super();\n this.set(\"url\", `${this.get(\"basePath\") as string}${this.get(\"configFileName\") as string}` as never);\n }\n}\n\n\nPackage(\"com.qcobjects.api\", [\n Service\n]);\n\nPackage(\"com.qcobjects.api.services\", [\n JSONService\n]);\n\nPackage(\"com.qcobjects.api.config\", [\n ConfigService\n]);\n", "import { IGlobalSettings } from \"@types\";\nimport { CONFIG } from \"./CONFIG\";\nimport { InheritClass } from \"./InheritClass\";\nimport { Logger, logger } from \"./Logger\";\nimport { Package } from \"./Package\";\nimport { isBrowser } from \"./platform\";\nimport { serviceLoader } from \"./serviceLoader\";\nimport { _top, buildComponentsStack, configService, setConfigService } from \"./top\";\nimport { ConfigService } from \"./Service\";\n\nexport class GlobalSettings extends InheritClass implements IGlobalSettings {\n static __start__(): Promise {\n return GlobalSettings.instance.__start__();\n }\n [key: string]: any;\n\n _GLOBAL: any = {};\n private static _instance: GlobalSettings;\n static get instance(): GlobalSettings {\n if (typeof GlobalSettings._instance === \"undefined\") {\n GlobalSettings._instance = new GlobalSettings();\n }\n return GlobalSettings._instance;\n }\n\n protected _logger: Logger = new Logger();\n get logger(): Logger {\n return this._logger;\n }\n\n set logger(value: Logger) {\n this._logger = value;\n }\n\n set(name: string, value: any): void {\n this._GLOBAL[name] = value;\n }\n\n get(name: string, _default?: any): any {\n let _value: any;\n if (typeof this._GLOBAL[name] !== \"undefined\") {\n _value = this._GLOBAL[name];\n } else if (typeof _default !== \"undefined\") {\n _value = _default;\n }\n return _value;\n }\n\n __start__(): Promise {\n const __load__serviceWorker = function () {\n let _promise: Promise | Promise;\n if (isBrowser) {\n _promise = new Promise(function (resolve, reject) {\n if ((\"serviceWorker\" in navigator) &&\n (typeof CONFIG.get(\"serviceWorkerURI\") !== \"undefined\")) {\n CONFIG.set(\"serviceWorkerScope\", CONFIG.get(\"serviceWorkerScope\") ? (CONFIG.get(\"serviceWorkerScope\")) : (\"/\"));\n navigator.serviceWorker.register(CONFIG.get(\"serviceWorkerURI\"), {\n scope: CONFIG.get(\"serviceWorkerScope\")\n })\n .then(function (registration) {\n logger.debug(\"Service Worker Registered\");\n resolve.call(_promise, registration);\n }, function (registration) {\n logger.debug(\"Error registering Service Worker\");\n reject.call(_promise, registration);\n });\n navigator.serviceWorker.ready.then(function (registration) {\n logger.debug(\"Service Worker Ready\");\n resolve.call(_promise, registration);\n }, function (registration) {\n logger.debug(\"Error loading Service Worker\");\n reject.call(_promise, registration);\n });\n }\n });\n } else {\n _promise = Promise.resolve();\n }\n return _promise;\n };\n const _buildComponents = function () {\n return new Promise((resolve) => {\n if (isBrowser) {\n logger.debug(\"Starting to building components\");\n try {\n buildComponentsStack();\n } catch (e: any) {\n throw Error(`Something went wrong trying to start components tree: ${e.message}`);\n }\n logger.debug(\"Initializing the service worker\");\n __load__serviceWorker.call(_top)\n .catch(function (e) {\n logger.debug(`error loading the service worker ${e}`);\n });\n }\n resolve();\n });\n };\n\n return new Promise((resolve) => {\n logger.debug(\"Starting to load the config settings...\");\n if (CONFIG.get(\"useConfigService\", false)) {\n logger.debug(\"Loading settings using local configuration file...\");\n setConfigService(new ConfigService());\n configService.configLoaded = _buildComponents;\n serviceLoader(configService)\n ?.then((standardResponse: any) => {\n resolve(standardResponse);\n })\n ?.catch((e: any) => { throw new Error(`An error ocurred while trying to load ${configService.url}: ${e}`); });\n } else {\n logger.debug(\"Starting to load the components...\");\n _buildComponents.call(this)\n .then(() => {\n resolve({});\n })\n .catch((e: any) => { throw new Error(`An error ocurred while trying to build the components stack. ${e}`); });\n }\n\n });\n }\n\n}\n\nPackage(\"com.qcobjects\", [\n GlobalSettings\n]);\n", "import { IComplexStorageCache, IComponent, IConfigService, IQCObjectsElement } from \"@types\";\nimport { buildComponents } from \"./ComponentFactory\";\nimport { _CastProps } from \"./Cast\";\nimport { GlobalSettings } from \"./globalSettings\";\nimport { Class } from \"./Class\";\nimport { ClassFactory } from \"./ClassFactory\";\nimport { Export } from \"./Export\";\nimport { isBrowser } from \"./platform\";\nimport { _QC_CLASSES, getPackagesNamesList, getPackagesList, getClassesList, getClassesNamesList } from \"./PrimaryCollections\";\nimport { logger } from \"./Logger\";\n\ntype QCObjects = {\n lastCache?:IComplexStorageCache,\n componentsStack:IComponent[],\n Microservice:any,\n Route:any,\n BackendMicroservice:any,\n QCObjectsElement:any,\n QCObjectsShadowedElement:any,\n Logger:any,\n Class:any, \n _Crypt:any, \n TagElements:any, \n DefaultTemplateHandler:any, \n SourceJS:any, \n SourceCSS:any, \n ArrayList:any, \n ArrayCollection:any, \n GlobalSettings:any, \n GLOBAL:any, \n DDO:any, \n CacheController:any, \n ComplexCacheParams:any, \n ComplexStorageCache:any, \n ComponentWidget:any, \n asyncLoad:any, \n RegisterClass:any, \n ComponentURI:any, \n waitUntil:any, \n super:any, \n _DOMCreateElement:any, \n shortCode:any, \n getType:any, \n is_a:any, \n _DataStringify:any, \n serviceLoader:any, \n componentLoader:any, \n ObjectName:any, \n isQCObjects_Class:any, \n isQCObjects_Object:any, \n NamespaceRef:any, \n RegisterWidget:any, \n RegisterWidgets:any, \n range:any, \n getDocumentLayout:any, \n Export:any, \n New:any, \n Tag:any, \n Ready:any, \n methods:any, \n // eslint-disable-next-line no-unused-vars\n set:(name:string, value:any) => void, \n // eslint-disable-next-line no-unused-vars\n get:(name:string, _default?:any) => any, \n start:any, \n InheritClass:any, \n Processor:any, \n ComponentParams:any, \n ComponentDoneResponse:any, \n Component:any, \n CONFIG:any, \n ControllerParams:any, \n Controller:any, \n ViewParams:any, \n View:any, \n Service:any, \n JSONService:any, \n ConfigService:any, \n VO:any, \n EffectParams:any, \n Effect:any, \n TransitionEffect:any, \n TimerParams:any, \n Timer:any, \n Toggle:any, \n logger:any, \n sdk:any, \n global:any, \n ClassFactory:any, \n Package:any, \n Import:any,\n _sdk_:any,\n ClassesList:any[], \n PackagesList:any[],\n PackagesNameList:any[],\n ClassesNameList:any[]\n} & typeof self & typeof global ;\n\nexport var _top: QCObjects = (\n (typeof module !== \"undefined\" && typeof module.exports !== \"undefined\" && module.exports) ||\n (typeof global !== \"undefined\" && global) ||\n (typeof globalThis !== \"undefined\" && globalThis) ||\n (typeof window !== \"undefined\" && window) ||\n (typeof self !== \"undefined\" && self !== null && self) ||\n this\n) as QCObjects;\n(_top as any).lastCache = undefined;\nexport let componentsStack:IComponent[] = [];\n\nexport const resetTop = ():void => {\n const globalSettings = GlobalSettings.instance;\n _top = _CastProps(globalSettings, _top, true);\n};\n\nexport const buildComponentsStack = ():void => {\n componentsStack = buildComponents(document as unknown as IQCObjectsElement);\n};\nexport let configService:IConfigService;\nexport const setConfigService = (_configService:IConfigService):void => {\n _top.global.configService = _configService;\n configService = _configService;\n};\n\nexport const set = (name:string, value:any):void => {\n _top[name as never] = value;\n};\n\nexport const get = (name:string, _defaultValue?:any):any => {\n return _top[name as never] || _defaultValue;\n};\n\nresetTop();\n\nconst _define_props = function (_top: any) {\n if (!Object.hasOwn(_top, \"PackagesList\")) {\n Object.defineProperty(_top, \"PackagesList\", {\n // eslint-disable-next-line no-unused-vars\n set:(value) => {\n logger.debug(\"PackagesList is readonly\");\n \n },\n get:():any => {\n return getPackagesList();\n }\n });\n \n }\n \n \n if (!Object.hasOwn(_top, \"PackagesNameList\")) {\n Object.defineProperty(_top, \"PackagesNameList\", {\n // eslint-disable-next-line no-unused-vars\n set:(val) => {\n logger.debug(\"PackagesNameList is readonly\");\n\n },\n get:():any =>{\n return getPackagesNamesList();\n }\n });\n\n }\n\n if (!Object.hasOwn(_top, \"ClassesList\")) {\n Object.defineProperty(_top, \"ClassesList\", {\n // eslint-disable-next-line no-unused-vars\n set:(value) => {\n logger.debug(\"ClassesList is readonly\");\n\n },\n get:(): any => {\n return getClassesList();\n }\n });\n }\n\n if (!Object.hasOwn(_top, \"ClassesNameList\")) {\n Object.defineProperty(_top, \"ClassesNameList\", {\n // eslint-disable-next-line no-unused-vars\n set(value):any {\n logger.debug(\"ClassesNameList is readonly\");\n\n },\n get:(): any => {\n return getClassesNamesList();\n }\n });\n\n }\n\n\n };\n\n\n if (isBrowser) {\n // use of GLOBAL word is deprecated in node.js\n // this is only for compatibility purpose with old versions of QCObjects in browsers\n Class(\"GLOBAL\", (_QC_CLASSES as any).global); // case insensitive for compatibility con old versions;\n Export(ClassFactory(\"GLOBAL\"));\n }\n\n if (isBrowser && typeof window !== \"undefined\") {\n set(\"global\", window);\n } else if (isBrowser && typeof globalThis !== \"undefined\") {\n set(\"global\", globalThis);\n }\n\n _define_props(_top);\n", "import { logger } from \"./Logger\";\nimport { isBrowser } from \"./platform\";\n\nexport let supportsPassive = false;\nexport const captureFalseTouch = ():boolean | { passive: boolean; } => {\n return (supportsPassive) ? ({\n passive: true\n }) : (false);\n};\n\n// Test via a getter in the options object to see if the passive property is accessed\nif (isBrowser) {\n try {\n const opts = Object.defineProperty({}, \"passive\", {\n get() {\n supportsPassive = true;\n return supportsPassive;\n }\n });\n (window as any).addEventListener(\"testPassive\", null, opts);\n (window as any).removeEventListener(\"testPassive\", null, opts);\n } catch (e:any) {\n logger.debug(`An error ocurred: ${e}.`);\n supportsPassive = false;\n }\n\n} else {\n supportsPassive = false;\n}", "import { _protected_code_ } from \"./introspection\";\n\nexport const range = (start: number, stop = 0, step = 1): number[] => {\n if (stop === 0 || typeof stop === \"undefined\") {\n stop = start;\n start = 0;\n }\n return Array.from({\n length: (stop - start) / step + 1\n }, function (_, i) {\n return start + (i * step);\n });\n};\n(_protected_code_)(range);\n\n", "import { logger } from \"./Logger\";\nimport { GlobalProcessor as Processor } from \"./Processor\";\nimport { _top } from \"./top\";\nimport { range } from \"./range\";\nimport { IComponent } from \"@types\";\n\n// Set Processors\nexport const setDefaultProcessors = ():void => {\n (function (_top):void {\n\n const mapper = (componentInstance:IComponent, componentName:string, valueName:string):string => {\n /*\n * Mapper processor\n * @usage\n * $mapper(,)\n *\n * Where componentName is the name of the component (same value as in attribute tag name) without quotes\n * and valueName is the name of the variable that contains the value to map, it can be either a property of\n * the component instance, the data object or a global value\n */\n \n if (typeof componentInstance === \"undefined\" || componentInstance === null) {\n throw Error(`mapper.${componentName}.${valueName} does not have a component instance or it is null.`);\n }\n const globalValue = _top.global.get(valueName);\n const componentValue = componentInstance.get(valueName);\n const dataValue = componentInstance.data[valueName];\n const list = (typeof dataValue !== \"undefined\") ? (dataValue) : ((typeof componentValue !== \"undefined\") ? (componentValue) : (globalValue));\n let listItems = \"\";\n if (typeof list !== \"undefined\" && typeof list.map !== \"undefined\") {\n listItems = list.map(function (element:HTMLElement) {\n const dataItems = [...Object.keys(element)].map(k => ` data-${k}=\"${(typeof (element as any)[k] !== \"undefined\" && (element as any)[k] !== null) ? ((element as any)[k].toString()) : (\"\")}\"`).join(\"\");\n return ``;\n }).join(\"\");\n } else {\n logger.debug(`${componentName}.${valueName} does not have a map property`);\n }\n return listItems;\n };\n Processor.setProcessor(mapper);\n \n const layout = function (componentInstance:IComponent, layoutname:string, cssfile:string):string {\n /*\n * Layout processor\n * @usage\n * $layout(, )\n * Where layoutname can be \"portrait\" or \"landscape\" without quotes\n * cssfile is the uri for the css file to import\n */\n \n const layout_portrait = `\n /* CSS Document for Mobile Imports */\n @import url(\"${cssfile}\") (orientation:portrait);\n @import url(\"${cssfile}\") (max-width:460px);\n @import url(\"${cssfile}\") (aspect-ratio: 9/16);\n @import url(\"${cssfile}\") (aspect-ratio: 10/16);\n @import url(\"${cssfile}\") (aspect-ratio: 5/8);\n @import url(\"${cssfile}\") (aspect-ratio: 3/4);\n @import url(\"${cssfile}\") (aspect-ratio: 2/3);\n `;\n const layout_landscape = `\n @import url(\"${cssfile}\") (orientation:landscape) and (min-width:460px);\n @import url(\"${cssfile}\") (aspect-ratio: 16/9) and (min-width:460px);\n @import url(\"${cssfile}\") (aspect-ratio: 16/10) and (min-width:460px);\n @import url(\"${cssfile}\") (aspect-ratio: 8/5) and (min-width:460px);\n @import url(\"${cssfile}\") (aspect-ratio: 4/3) and (min-width:460px);\n @import url(\"${cssfile}\") (aspect-ratio: 3/2) and (min-width:460px);\n `;\n const layout_code = {\n \"landscape\": layout_landscape,\n \"portrait\": layout_portrait\n };\n \n return (Object.hasOwn(layout_code, layoutname)) ? ((layout_code as any)[layoutname] as string) : (\"\");\n };\n \n Processor.setProcessor(layout);\n \n const component = (componentInstance:IComponent ,name:string, componentClass:string, ...args:string[]):string => {\n /*\n * component processor\n * @usage\n * $component(name=, componentClass=, ...)\n * Returns a component tag declaration like:\n * ...>\n */\n const arg = [...args].map(function (a) {\n return {\n [a.split(\"=\")[0]]: a.split(\"=\")[1]\n };\n }).reduce(function (k1, k2) {\n return Object.assign(k1, k2);\n });\n const attrs = [...Object.keys(arg)].map(function (a) {\n return `${a}=${arg[a as any]}`;\n }).join(\" \");\n return ``;\n };\n \n Processor.setProcessor(component);\n \n const quick_component = (componentInstance: IComponent,name:string, componentClass:string, ...args:string[]):string => {\n /*\n * component processor\n * @usage\n * $quick_component(name=, componentClass=, ...)\n * Returns a component tag declaration like:\n * ...>\n */\n const arg = [...args].map(function (a) {\n return {\n [a.split(\"=\")[0]]: a.split(\"=\")[1]\n };\n }).reduce(function (k1, k2) {\n return Object.assign(k1, k2);\n });\n const attrs = [...Object.keys(arg)].map(function (a) {\n return `${a}=${arg[a as any]}`;\n }).join(\" \");\n return ``;\n };\n \n Processor.setProcessor(quick_component);\n \n \n const repeat = (componentInstance:IComponent, length:number, text:string):string => {\n /*\n * Repeat processor\n * @usage\n * $repeat(, )\n * Where length is the number of occurrences of text\n */\n return range(length).map(\n function (index) {\n return text.replace(\"{{index}}\", index.toString());\n }\n ).join(\"\");\n };\n \n Processor.setProcessor(repeat);\n \n })(_top);\n \n};\n\n", "import { CONFIG } from \"./CONFIG\";\nimport { Export } from \"./Export\";\nimport { logger } from \"./Logger\";\nimport { isBrowser } from \"./platform\";\n\nexport const findPackageNodePath = function (packagename:string):string|null {\n let sdkPath = null;\n if (!isBrowser) {\n // eslint-disable-next-line @typescript-eslint/no-require-imports\n const fs = require(\"fs\");\n try {\n let sdkPaths = [\n `${CONFIG.get(\"projectPath\")}${CONFIG.get(\"relativeImportPath\")}`,\n `${CONFIG.get(\"basePath\")}${CONFIG.get(\"relativeImportPath\")}`,\n `${CONFIG.get(\"projectPath\")}`,\n `${CONFIG.get(\"basePath\")}`,\n `${CONFIG.get(\"relativeImportPath\")}`,\n `${process.cwd()}${CONFIG.get(\"relativeImportPath\")}`,\n `${process.cwd()}/node_modules/` + packagename,\n `${process.cwd()}/node_modules`,\n `${process.cwd()}`,\n \"node_modules\",\n \"./\",\n \"\"\n ].concat(module.paths);\n sdkPaths = sdkPaths.filter(p => {\n return (fs).existsSync(p + \"/\" + packagename);\n });\n if (sdkPaths.length > 0) {\n sdkPath = sdkPaths[0];\n logger.info(packagename + \" is Installed.\");\n } else {\n sdkPath = \"\";\n logger.info(`${packagename} is not in a standard path.`);\n }\n } catch (e) {\n // do nothing\n console.log(e);\n }\n\n }\n return sdkPath;\n};\nExport(findPackageNodePath);\n", "import { _basePath_ } from \"./basePath\";\nimport { CONFIG } from \"./CONFIG\";\nimport { _DataStringify } from \"./DataStringify\";\nimport { _DOMCreateElement } from \"./DOMCreateElement\";\nimport { findPackageNodePath } from \"./findPackageNodePath\";\nimport { logger } from \"./Logger\";\nimport { _require_, isBrowser } from \"./platform\";\nimport { _QC_PACKAGES, _QC_PACKAGES_IMPORTED, _QC_READY_LISTENERS } from \"./PrimaryCollections\";\n\n/**\n * Imports a script with the package nomenclature\n *\n * @param {Object} packagename\n * @param {Object} ready\n * @param {Boolean} external\n */\nexport const Import = function (packagename:string, ready?:Function, external?:boolean):Promise<{_imported_?:any, _package_name_?:string}> | undefined {\n\n if (external !== undefined){\n logger.debug(`[Import] Setting external=${external.toString()} resource to import: ${packagename}`);\n } \n if (external) {\n logger.debug(`[Import] Registering external resource to import: ${packagename}`);\n } else {\n logger.debug(`[Import] Registering local resource to import: ${packagename}`);\n }\n let _promise_import_: Promise;\n if (isBrowser) {\n _promise_import_ = new Promise(function (resolve, reject) {\n\n const allPackagesImported = function () {\n let ret = false;\n let cp = 0;\n // eslint-disable-next-line no-unused-vars\n for (const p in _QC_PACKAGES) {\n cp++;\n }\n if (cp < _QC_PACKAGES_IMPORTED.length) {\n ret = false;\n } else {\n ret = true;\n }\n return ret;\n };\n\n const readyImported = function (e: { target: { remove: () => void; }; }) {\n _QC_PACKAGES_IMPORTED.push(ready as never);\n if (allPackagesImported()) {\n _QC_PACKAGES_IMPORTED.map( (_imported_) => {\n return _QC_READY_LISTENERS.push(_imported_);\n });\n }\n if (isBrowser && CONFIG.get(\"removePackageScriptAfterLoading\")) {\n e.target.remove();\n }\n resolve.call(_promise_import_, {\n \"_imported_\": e.target,\n \"_package_name_\": packagename\n });\n };\n\n if (!Object.hasOwn(_QC_PACKAGES, packagename)) {\n const s1:HTMLScriptElement = _DOMCreateElement(\"script\") as unknown as HTMLScriptElement;\n s1.type = CONFIG.get(\"sourceType\", \"text/javascript\");\n s1.async = !!(CONFIG.get(\"asynchronousImportsLoad\"));\n (s1 as any).onreadystatechange = function () {\n if ((s1 as any).readyState === \"complete\") {\n readyImported(s1 as any);\n }\n };\n (s1 as any).onload = readyImported;\n s1.onerror = function (e: any) {\n logger.debug(`An error ocurred: ${e}.`);\n reject.call(_promise_import_, {\n \"_imported_\": s1,\n \"_package_name_\": packagename\n });\n };\n s1.src = (external) ? (CONFIG.get(\"remoteImportsPath\") + packagename + \".js\") : (_basePath_ + CONFIG.get(\"relativeImportPath\") + packagename + \".js\");\n document.getElementsByTagName(\"head\")[0].appendChild(s1);\n }\n });\n _promise_import_.catch(function () {\n logger.debug(\"Import: Error loading a package \");\n });\n\n } else {\n // support to be used in a nodejs environment\n _promise_import_ = new Promise(function (resolve, reject) {\n try {\n const standardNodePath = findPackageNodePath(packagename);\n let packageAbsoluteName = \"\";\n if (standardNodePath !== null) {\n packageAbsoluteName = standardNodePath + \"/\" + packagename;\n } else {\n const jsNodePath = findPackageNodePath(packagename + \".js\");\n if (jsNodePath !== null) {\n packageAbsoluteName = jsNodePath + \"/\" + packagename + \".js\";\n } else {\n packageAbsoluteName = _basePath_ + CONFIG.get(\"relativeImportPath\") + packagename;\n }\n }\n try {\n resolve.call(_promise_import_, {\n \"_imported_\": _require_(`${packageAbsoluteName}`),\n \"_package_name_\": packagename\n });\n } catch (e) {\n reject.call(_promise_import_, {\n \"_imported_\": null,\n \"_package_name_\": packagename,\n \"error\": e\n });\n }\n } catch (e) {\n reject.call(_promise_import_, {\n \"_imported_\": null,\n \"_package_name_\": packagename,\n \"error\": e\n });\n }\n }).catch(function (e) {\n // something wrong importing a package\n logger.debug(\"Something happened when importing \" + packagename);\n console.warn(e);\n });\n }\n _promise_import_.catch(function (e) {\n logger.warn(_DataStringify(e));\n });\n return _promise_import_;\n};\nImport.prototype.toString = function () {\n return \"Import(packagename,ready,external) { [QCObjects native code] }\";\n};\n", "export const __to_number = function (value:any): number {\n return ((isNaN(value)) ? (new Number(0) as number) : (new Number(value) as number));\n};", "import { isQCObjects_Class } from \"./isQCObjects\";\nimport { Package } from \"./Package\";\n\n/**\n * Declare Namespace\n *\n * @param {String} packageName\n * @param {Object} package\n */\nexport const NamespaceRef = function (namespace:string):any {\n const packageInstance = Package(namespace) || [];\n const classes = packageInstance.filter((c:any) => isQCObjects_Class(c)).map((c:any) => {\n return {\n [c.__definition.__classType]: c\n };\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n }).reduce((a:any, b:any):any => {return Object.assign(a, b);});\n return namespace.split(\".\").map(c => {\n return {\n [c]: classes\n };\n }).reverse().reduce((a, b) => {\n b[Object.keys(b).join(\".\")] = a;\n return b;\n });\n};\n", "import { CONFIG } from \"./CONFIG\";\nimport { isBrowser } from \"./platform\";\nimport { _QC_READY_LISTENERS } from \"./PrimaryCollections\";\nimport { _top } from \"./top\";\n\n/**\n * Defines a Custom Ready listener\n */\nexport const Ready = (e:any):void => {\n if (isBrowser) {\n _QC_READY_LISTENERS.push(e.bind(window) as never);\n } else if (typeof global !== \"undefined\") {\n _QC_READY_LISTENERS.push(e.bind(global) as never);\n }\n};\n\nexport const ready:Function = Ready; // case insensitive ready option\n\n/**\n * Default Ready event function for window. Executes all micro ready events of Import calls\n *\n * @param {Object} e\n */\n// eslint-disable-next-line no-unused-vars\nexport const _Ready = (e:any):void => {\n const _execReady = ():void => {\n // eslint-disable-next-line array-callback-return\n _QC_READY_LISTENERS.map(function (_ready_listener_, _r):any {\n if (typeof _ready_listener_ === \"function\") {\n (_ready_listener_ as Function)();\n _QC_READY_LISTENERS.splice(_r, 1);\n }\n });\n };\n if (CONFIG.get(\"delayForReady\") > 0) {\n if (isBrowser) {\n setTimeout(_execReady.bind(window), CONFIG.get(\"delayForReady\"));\n } else if (typeof global !== \"undefined\") {\n setTimeout(_execReady.bind(global), CONFIG.get(\"delayForReady\"));\n }\n } else {\n _execReady.call(_top);\n }\n};\n", "import { IArrayCollection, IArrayList } from \"@types\";\nimport { ClassFactory } from \"./ClassFactory\";\nimport { logger } from \"./Logger\";\nimport { New } from \"./New\";\nimport { __to_number } from \"./mathFunctions\";\n\n\nexport class ArrayList extends Array implements IArrayList {\n prototype: any;\n\n unique ():any[] {\n return this.filter(function (value:any, index:any, self:any) {\n return self.indexOf(value) === index;\n });\n };\n\n table(): void {\n console.table(this);\n };\n sum(): number {\n return this.reduce( (prev:any, current:any):number => {\n return (__to_number(prev)) + (__to_number(current));\n }, 0) as number;\n }\n avg(): number {\n return (this.length < 1) ? (0) : (this.reduce( (prev:any, current:any):number => {\n return (((__to_number(prev)) + (__to_number(current))) / 2);\n })) as number;\n }\n min(): number {\n return this.reduce( (prev:any, current:any):number => {\n return (__to_number(prev) <= __to_number(current)) ? (prev) : (current);\n }, Infinity) as number;\n }\n max(): number {\n return this.reduce( (prev:any, current:any):number => {\n return (__to_number(prev) >= __to_number(current)) ? (prev) : (current);\n }, 0) as number;\n }\n sortBy(propName: string, sortAsc?: boolean): any[] {\n const sort_function = (sortAsc) ? (\n function (prev:any, current:any) {\n return current[propName] < prev[propName] ? 1 : -1;\n }\n ) : (\n function (prev:any, current:any) {\n return current[propName] > prev[propName] ? 1 : -1;\n }\n );\n return this.sort(sort_function);\n }\n matrix(length: number, fillValue?: number): any[] {\n const x_func = () => {\n return fillValue;\n };\n return Array.from({\n length: length\n }, x_func);\n }\n matrix2d(length: number, fillValue?: number): any[][] {\n const y_func = function () {\n return fillValue;\n };\n const x_func = function () {\n return Array.from({\n length\n }, y_func);\n };\n return Array.from({\n length\n }, x_func);\n }\n matrix3d(length: number, fillValue?: number): any[][][] {\n const y_func = function () {\n return Array.from({\n length\n }, function () {\n return fillValue;\n });\n };\n const x_func = function () {\n return Array.from({\n length\n }, y_func);\n };\n return Array.from({\n length\n }, x_func);\n }\n\n\n}\n\nexport class ArrayCollection implements IArrayCollection {\n source :ArrayList = New(ArrayList, []);\n changed(prop: string, value: any):void {\n logger.debug(\"VALUE CHANGED\");\n logger.debug(prop);\n logger.debug(value);\n }\n push(value: any):number {\n const self = this;\n logger.debug(\"VALUE ADDED\");\n logger.debug(value);\n return self.source.push(value);\n }\n pop():any {\n const self = this;\n logger.debug(\"VALUE POPPED\");\n return self.source.pop();\n }\n _new_(source: ArrayList):void {\n const self = this;\n let _index = 0;\n self.source = New(ClassFactory(\"ArrayList\"), source);\n for (const _k in self.source) {\n if (!isNaN(_k as any)) {\n logger.debug(\"binding \" + _k.toString());\n (function (_pname:any) {\n Object.defineProperty(self, _pname, {\n set(value) {\n logger.debug(\"setting \" + _pname + \"=\" + value);\n self.source[_pname] = value;\n self.changed(_pname, value);\n },\n get():unknown {\n return self.source[_pname];\n }\n });\n })(_k);\n _index++;\n }\n\n }\n self.source.length = _index;\n Object.defineProperty(self, \"length\", {\n get() {\n return self.source.length;\n }\n });\n }\n}\n\n", "import { IQCObjectsElement, ITagElements } from \"@types\";\nimport { ClassFactory } from \"./ClassFactory\";\nimport { New } from \"./New\";\nimport { Package } from \"./Package\";\nimport { isBrowser } from \"./platform\";\nimport { Effect } from \"./Effect\";\nimport { ArrayList } from \"./ArrayCollection\";\n\nexport class TagElements extends ArrayList implements ITagElements {\n show():void {\n this.map(function (element:any) {\n return element.style.opacity = 1;\n });\n }\n hide():void {\n this.map(function (element:any) {\n return element.style.opacity = 0;\n });\n }\n effect(...args:T[]):void {\n const effectArguments = [...args].slice(1);\n const effectClassName = args[0] as string;\n let effectClass = undefined;\n if ((typeof effectClassName).toLowerCase() === \"string\") {\n effectClass = ClassFactory(effectClassName);\n }\n this.map(function (element:any):T {\n return ((effectClass as Effect).apply as Function).apply(effectClass, [element].concat(effectArguments)) as T;\n });\n }\n findElements(elementName:any):any {\n const _o = New(ClassFactory(\"TagElements\"));\n if (isBrowser) {\n for (const _k in this) {\n if (typeof _k === \"number\" && typeof this[_k] !== \"function\" && Object.hasOwn(this[_k], \"subelements\")) {\n _o.push(this[_k].subelements(elementName));\n }\n }\n } else {\n // not yet implemented.\n }\n return _o;\n }\n }\n\n /**\n * Gets the element of DOM found by tag name\n *\n * @param {Object} tagname\n * @param {Object} innerHTML\n */\n export const Tag = function (tagname:string, innerHTML?:string): T[] {\n const _o = New(TagElements);\n if (isBrowser) {\n const o = (document as unknown as IQCObjectsElement).subelements(tagname);\n const addedKeys = [];\n for (let _i = 0; _i < o.length; _i++) {\n if (typeof innerHTML !== \"undefined\" && Object.hasOwn(o[_i], \"innerHTML\")) {\n o[_i].innerHTML = innerHTML;\n }\n if (addedKeys.indexOf(_i) < 0) {\n _o.push(o[_i]);\n addedKeys.push(_i);\n }\n }\n } else {\n // not yet implemented.\n }\n return _o as T[];\n };\n\n\n Package(\"com.qcobjects\",[\n TagElements,\n Tag\n ]);", "import { _Crypt } from \"./Crypt\";\n\nexport const shortCode = (): string => {\n const length = 1000;\n const code1 = _Crypt.encrypt((Math.random() * length).toString().replace(\".\", \"\"), (new Date()).getTime().toString());\n const code2 = _Crypt.encrypt((Math.random() * length).toString().replace(\".\", \"\"), (new Date((new Date()).getTime() - 1000 * 1000)).getTime().toString());\n const shortCode = [...code2].map((o1: any, index: any): any => {\n return [...code1][index] === o1 ? null : o1;\n }).filter((c: any) => c !== null).join(\"\");\n return shortCode;\n};\n", "import { ClassFactory } from \"./ClassFactory\";\n\n/**\n * Returns a method from a superior QCObjects Class\n * It is useful for Class Inheritance in the _new_ and __new__ method constructors\n * @example _super_('MySuperClass','MySuperMethod').call(this,params) #where this is the current instance and params are method parameters\n *\n * @param {String} className\n * @param {String} classMethodName\n * @param {Object} params\n */\nexport const _super_ = function (className: string, classMethodName: string):T {\n return (ClassFactory(className))[classMethodName] as T;\n};\n_super_.prototype.toString = function () {\n return \"_super_(className,classMethodName,params) { [QCObjects native code] }\";\n};\n", "import { logger } from \"./Logger\";\n\nexport const waitUntil = (func:()=>void, exp:()=>any):void => {\n const _waitUntil = (func:()=>void, exp:()=>any):void => {\n const maxWaitCycles = 2000;\n let _w = 0;\n var _t = setInterval(function () {\n if (exp()) {\n clearInterval(_t);\n func();\n logger.debug(\"Ejecuting \" + func.name + \" after wait\");\n } else {\n if (_w < maxWaitCycles) {\n _w += 1;\n logger.debug(\"WAIT UNTIL \" + func.name + \" is true, \" + _w.toString() + \" cycles\");\n } else {\n logger.debug(\"Max execution time for \" + func.name + \" expression until true\");\n clearInterval(_t);\n }\n }\n }, 1);\n };\n setTimeout(function () {\n _waitUntil(func, exp);\n }, 1);\n };\n", "export const subelements = function subelements(this: any, query: string): T[] {\n const _self = this;\n return [..._self.querySelectorAll(query)] as T[];\n};", "import { CONFIG } from \"./CONFIG\";\nimport { findPackageNodePath } from \"./findPackageNodePath\";\nimport { Import } from \"./Import\";\nimport { logger } from \"./Logger\";\nimport { _require_, isBrowser, isNodeCommonJS } from \"./platform\";\n\nconst loadSDK = ():void => {\n if (CONFIG.get(\"useSDK\")) {\n (function () {\n const remoteImportsPath = CONFIG.get(\"remoteImportsPath\");\n const external = (!CONFIG.get(\"useLocalSDK\"));\n CONFIG.set(\"remoteImportsPath\", CONFIG.get(\"remoteSDKPath\"));\n\n let tryImportingSDK = false;\n let sdkName = \"QCObjects-SDK\";\n if (isBrowser) {\n tryImportingSDK = true;\n } else {\n const sdkPath = findPackageNodePath(\"qcobjects-sdk\");\n if (sdkPath !== null) {\n sdkName = \"qcobjects-sdk\";\n tryImportingSDK = true;\n } else if (sdkPath !== \"\"){\n sdkName = \"node_modules/qcobjects-sdk/QCObjects-SDK\";\n tryImportingSDK = true;\n } else {\n tryImportingSDK = false;\n }\n }\n\n if (tryImportingSDK) {\n logger.info(\"Importing SDK... \" + sdkName);\n if (isNodeCommonJS && typeof require !== \"undefined\") {\n const sdk = _require_(\"qcobjects-sdk\");\n if (sdk) {\n logger.debug(\"QCObjects SDK was loaded OK.\");\n } else {\n logger.debug(\"QCObjects SDK could not be imported.\");\n }\n } else {\n Import(sdkName, function () {\n if (external) {\n logger.debug(\"QCObjects-SDK.js loaded from remote location\");\n } else {\n logger.debug(\"QCObjects-SDK.js loaded from local\");\n }\n CONFIG.set(\"remoteImportsPath\", remoteImportsPath);\n }, external)\n ?.catch((e: any) => { throw new Error(`An error ocurred when trying to import: ${e}`); });\n }\n } else {\n logger.debug(\"SDK has not been imported as it is not available at the moment\");\n }\n })();\n }\n\n};\n\nexport default loadSDK;\n", "import { IQCObjectsElement, IQCObjectsShadowedElement } from \"@types\";\nimport { _top } from \"./top\";\nimport { _fireAsyncLoad, asyncLoad } from \"./asyncLoad\";\nimport { captureFalseTouch } from \"./captureFalseTouch\";\nimport { _Cast } from \"./Cast\";\nimport { Class } from \"./Class\";\nimport { ClassFactory } from \"./ClassFactory\";\nimport { Component } from \"./Component\";\nimport { ComponentURI } from \"./ComponentFactory\";\nimport { componentLoader } from \"./componentLoader\";\nimport { CONFIG } from \"./CONFIG\";\nimport { _DataStringify } from \"./DataStringify\";\nimport { setDefaultProcessors } from \"./defaultProcessors\";\nimport { Export } from \"./Export\";\nimport { Import } from \"./Import\";\nimport { _methods_, _protected_code_ } from \"./introspection\";\nimport { isQCObjects_Class, isQCObjects_Object } from \"./isQCObjects\";\nimport { logger } from \"./Logger\";\nimport { __to_number } from \"./mathFunctions\";\nimport { NamespaceRef } from \"./NamespaceRef\";\nimport { New } from \"./New\";\nimport { ObjectName } from \"./ObjectName\";\nimport { Package } from \"./Package\";\nimport { is_phonegap, isBrowser } from \"./platform\";\nimport { _Ready, ready, Ready } from \"./Ready\";\nimport { serviceLoader } from \"./serviceLoader\";\nimport { Tag } from \"./Tag\";\nimport { Processor } from \"./Processor\";\nimport { is_a } from \"./is_a\";\nimport { __getType__ } from \"./getType\";\nimport { shortCode } from \"./shortCode\";\nimport { _DOMCreateElement } from \"./DOMCreateElement\";\nimport { ComplexStorageCache } from \"./ComplexStorageCache\";\nimport { _super_ } from \"./super\";\nimport { waitUntil } from \"./waitUntil\";\nimport { subelements } from \"./subelements\";\nimport { GlobalSettings } from \"./globalSettings\";\nimport loadSDK from \"./loadSDK\";\nimport { range } from \"./range\";\n\n(function __qcobjects__(_top: any) {\n if (typeof Object.defineProperty !== \"undefined\" && typeof _top !== \"undefined\") {\n try {\n Object.defineProperty(_top, \"__qcobjects__\", {\n enumerable: true,\n configurable: false,\n writable: false,\n value: __qcobjects__,\n });\n } catch (e: any) {\n logger.debug(`An error ocurred: ${e}`);\n if (typeof _top.__qcobjects__ !== \"undefined\") {\n _top.__qcobjects__.loaded = true;\n }\n }\n }\n if (typeof _top.__qcobjects__.loaded === \"undefined\") {\n _top.__qcobjects__.loaded = true;\n\n if (isBrowser) {\n (Element as unknown as IQCObjectsElement).prototype.subelements = subelements;\n (Document as unknown as IQCObjectsElement).prototype.subelements = subelements;\n (HTMLElement as unknown as IQCObjectsElement).prototype.subelements = subelements;\n if (typeof ShadowRoot !== \"undefined\") {\n (ShadowRoot as unknown as IQCObjectsShadowedElement).prototype.subelements = subelements;\n }\n }\n\n\n logger.debugEnabled = false;\n logger.infoEnabled = true;\n\n /**\n * Basic Type of all elements\n */\n if (isBrowser) {\n (Element as unknown as IQCObjectsElement).prototype.find = function (tag: string): IQCObjectsElement[] {\n const _self = this;\n const _oo: IQCObjectsElement[] = [];\n const _tags = (document as unknown as IQCObjectsElement).subelements(tag);\n _tags.map((_tt, _t) => {\n if ((typeof _tags[_t] !== \"undefined\") && (_tags[_t].parentNode as Element).tagName === _self.parentNode.tagName) {\n _oo.push(_Cast(_tt, (new Object())));\n }\n return _tt;\n });\n return _oo;\n };\n }\n\n if (isBrowser) {\n Element.prototype.append = function QC_Append(child) {\n if (isQCObjects_Object(child) || typeof (child as any).body !== \"undefined\") {\n this.appendChild((child as any).body);\n } else {\n this.appendChild(child as any);\n }\n };\n\n /**\n * A replacement for direct using of innerHTML\n * use: [element].render('content') where 'content' is the string corresponding\n * to the DOM to insert in the element\n **/\n (Element as unknown as IQCObjectsElement).prototype.render = function QC_Render(content: string) {\n const _self = this;\n const _appendVDOM = (_self: any, content: string): any => {\n if (typeof document.implementation.createHTMLDocument !== \"undefined\") {\n const doc = document.implementation.createHTMLDocument(\"\");\n doc.body.innerHTML = content;\n (doc.body as unknown as IQCObjectsElement).subelements(\"*\").map((element): any => {\n return _self.append(element);\n });\n }\n };\n if (typeof this.innerHTML !== \"undefined\") {\n try {\n this.innerHTML += content;\n } catch (e: any) {\n logger.debug(`An error ocurred: ${e}`);\n _appendVDOM(_self, content);\n }\n } else {\n _appendVDOM(_self, content);\n }\n };\n }\n\n\n\n Export(waitUntil);\n Export(_super_);\n Export(ComplexStorageCache);\n Export(ClassFactory);\n Export(_DOMCreateElement);\n Export(shortCode);\n Export(__getType__);\n Export(is_a);\n Package(\"com.qcobjects\", [Processor]);\n\n\n\n\n if (isBrowser) {\n /**\n * Adds a Cast functionality to every Element of DOM\n */\n (Element as unknown as IQCObjectsElement).prototype.Cast = function QC_Cast(_o: T): T {\n const _self: any = this;\n return _Cast(_self, _o) as T;\n };\n }\n\n\n\n if (isBrowser) {\n window.onload = _Ready;\n if (is_phonegap) {\n document.addEventListener(\"deviceready\", _Ready, captureFalseTouch as any);\n }\n } else {\n global.onload = _Ready;\n }\n\n if (isBrowser) {\n window.addEventListener(\"popstate\", function (popStateEvent) {\n popStateEvent.stopImmediatePropagation();\n popStateEvent.stopPropagation();\n Component.route()\n .catch((e: any) => { throw new Error(`An error ocurred when trying to load initial routes. ${e}`); });\n });\n }\n\n\n\n Export(serviceLoader);\n Export(componentLoader);\n Export(ComponentURI);\n Export(ObjectName);\n Export(_DataStringify);\n Export(isQCObjects_Class);\n Export(isQCObjects_Object);\n Export(NamespaceRef);\n\n /**\n * Array math functions\n */\n // eslint-disable-next-line no-unused-vars\n (Array as any).prototype.unique = function (this: T[]): T[] {\n return this.filter(function (value: any, index: any, self: any) {\n return self.indexOf(value) === index;\n });\n };\n (Array as any).unique = function (a: Array): T[] {\n return (a as any).unique() as T[];\n };\n (_protected_code_)((Array as any).unique);\n (_protected_code_)((Array as any).prototype.unique);\n (Array as any).prototype.table = function (): void {\n console.table(this);\n };\n (Array as any).table = function (a: any): void {\n a.table();\n return;\n };\n (_protected_code_)((Array as any).table);\n (_protected_code_)((Array as any).prototype.table);\n (Array as any).prototype.sum = function (): number {\n return this.reduce(function (prev: any, current: any) {\n return (__to_number(prev)) + (__to_number(current));\n }, 0) as number;\n };\n (Array as any).sum = function (a: any): number {\n return a.sum() as number;\n };\n (_protected_code_)((Array as any).sum);\n (_protected_code_)((Array as any).prototype.sum);\n (Array as any).prototype.avg = function (): number {\n return (this.length < 1) ? (0) : (this.reduce(function (prev: any, current: any) {\n return (((__to_number(prev)) + (__to_number(current))) / 2);\n })) as number;\n };\n (Array as any).avg = function (a: any): number {\n return a.avg() as number;\n };\n (_protected_code_)((Array as any).avg);\n (_protected_code_)((Array as any).prototype.avg);\n (Array as any).prototype.min = function (): number {\n return this.reduce(function (prev: number, current: number) {\n return (__to_number(prev) <= __to_number(current)) ? (prev) : (current);\n }, Infinity) as number;\n };\n (Array as any).min = function (a: any): number {\n return a.min() as number;\n };\n (_protected_code_)((Array as any).min);\n (_protected_code_)((Array as any).prototype.min);\n (Array as any).prototype.max = function (): number {\n return this.reduce(function (prev: number, current: number) {\n return (__to_number(prev) >= __to_number(current)) ? (prev) : (current);\n }, 0) as number;\n };\n (Array as any).max = function (a: any): number {\n return a.max() as number;\n };\n (_protected_code_)((Array as any).max);\n (_protected_code_)((Array as any).prototype.max);\n (Array as any).prototype.sortBy = function (propName: string, sortAsc = true): Array[] {\n const sort_function = (sortAsc) ? (\n function (prev: any, current: any) {\n return current[propName] < prev[propName] ? 1 : -1;\n }\n ) : (\n function (prev: any, current: any) {\n return current[propName] > prev[propName] ? 1 : -1;\n }\n );\n return this.sort(sort_function) as Array[];\n };\n (Array as any).sortBy = function (a: any, propName: string, sortAsc = true): Array[] {\n return a.sortBy(propName, sortAsc) as Array[];\n };\n (_protected_code_)((Array as any).sortBy);\n (_protected_code_)((Array as any).prototype.sortBy);\n\n /**\n * Extends the Array prototype to include a method that creates a matrix (2D array)\n * with specified dimensions and fill value.\n *\n * @param {number} _length - The number of rows in the matrix.\n * @param {any} [_fillValue=0] - The value to fill the matrix with (default is 0).\n * @returns {Array>} A 2D array (matrix) filled with the specified value.\n *\n * @example\n * // Create a 3x3 matrix filled with zeros\n * const matrix = [].matrix(3);\n * console.log(matrix);\n * // Output: [0, 0, 0]\n *\n * @example\n * // Create a 2x4 matrix filled with a specific value\n * const matrix = [].matrix(2, 5);\n * console.log(matrix);\n * // Output: [5, 5]\n *\n * @example\n * // Create a 4x2 matrix filled with null values\n * const matrix = [].matrix(4, null);\n * console.log(matrix);\n * // Output: [null, null, null, null]\n */\n (Array as any).prototype.matrix = function (_length: number, _fillValue = 0) {\n // eslint-disable-next-line no-unused-vars\n const x_func = function (x = undefined) {\n return _fillValue;\n };\n return Array.from({\n length: _length\n }, x_func);\n };\n\n /**\n * Creates a matrix (2D array) from a given array.\n * \n * This function extends the Array constructor by adding a static method\n * that generates a matrix with specified dimensions and fill value.\n * \n * @function\n * @param {Array} a - The input array used to generate the matrix.\n * @param {number} _length - The length of the matrix (number of rows).\n * @param {number} [_fillValue=0] - The value to fill the matrix with (default is 0).\n * @returns {Array} A 2D array (matrix) created from the input parameters.\n * \n * @example\n * const myMatrix = Array.matrix(2, 5);\n * // myMatrix will be [5, 5, 5]\n */\n (Array as any).matrix = function (a: any, _length: number, _fillValue = 0): T[] {\n return a.matrix(_length, _fillValue) as T[];\n };\n\n (_protected_code_)((Array as any).matrix);\n (_protected_code_)((Array as any).prototype.matrix);\n\n\n (Array as any).prototype.matrix2d = function (_length: number, _fillValue = 0) {\n // eslint-disable-next-line no-unused-vars\n const y_func = function (y: any) {\n return _fillValue;\n };\n // eslint-disable-next-line no-unused-vars\n const x_func = function (x: any) {\n return Array.from({\n length: _length\n }, y_func);\n };\n return Array.from({\n length: _length\n }, x_func);\n };\n (Array as any).matrix2d = function (a: any, _length: number, _fillValue = 0): T[][] {\n return a.matrix2d(_length, _fillValue) as T[][];\n };\n\n (_protected_code_)((Array as any).matrix2d);\n (_protected_code_)((Array as any).prototype.matrix2d);\n\n (Array as any).prototype.matrix3d = function (_length: number, _fillValue = 0) {\n // eslint-disable-next-line no-unused-vars\n const y_func = function (y: any) {\n return Array.from({\n length: _length\n }, function () {\n return _fillValue;\n });\n };\n // eslint-disable-next-line no-unused-vars\n const x_func = function (x: any) {\n return Array.from({\n length: _length\n }, y_func);\n };\n return Array.from({\n length: _length\n }, x_func);\n };\n\n (Array as any).matrix3d = function (a: any, _length: number, _fillValue = 0): T[][][] {\n return a.matrix3d(_length, _fillValue) as T[][][];\n };\n\n\n (_protected_code_)((Array as any).matrix3d);\n (_protected_code_)((Array as any).prototype.matrix3d);\n\n\n\n (String as unknown as any).prototype.list = function (): string[] {\n const __instance = this;\n return range(0, __instance.length - 1).map(function (i: any): T {\n return __instance[i] as T;\n }) as string[];\n };\n (_protected_code_)((String as unknown as any).prototype.list);\n\n\n\n /**\n * End of array math functions\n */\n\n\n\n setDefaultProcessors();\n\n\n /**\n * Load every component tag declared in the body\n **/\n Ready(function () {\n if (!CONFIG.get(\"useSDK\")) {\n GlobalSettings.__start__()\n .catch((e: any) => {\n throw Error(e);\n });\n }\n });\n\n /*\n Public variables and functions\n */\n Export(Export); /* exports the same Export function once */\n Export(Import);\n Export(Package);\n Export(Class);\n Export(New);\n Export(Tag);\n Export(Ready);\n Export(ready);\n Export(isBrowser);\n Export(_methods_);\n Export(GlobalSettings);\n\n\n (loadSDK)();\n\n if (isBrowser) {\n asyncLoad(function (): any {\n Ready(function () {\n\n /*\n * scroll management custom events\n * usage: document.addEventListener('percentY90',function(e){console.log(e.detail.percentY)});\n * possible events: scrollpercent, defaultscroll, percentY0, percentY25, percentY50, percentY75, percentY90\n */\n\n (function (_top) {\n let ticking = false;\n const scrollHeight = Math.max(\n document.body.scrollHeight, document.documentElement.scrollHeight,\n document.body.offsetHeight, document.documentElement.offsetHeight,\n document.body.clientHeight, document.documentElement.clientHeight\n );\n\n const scrollWidth = Math.max(\n document.body.scrollWidth, document.documentElement.scrollWidth,\n document.body.offsetWidth, document.documentElement.offsetWidth,\n document.body.clientWidth, document.documentElement.clientWidth\n );\n\n function scrollDispatcher(event: any) {\n const percentY = Math.round(_top.scrollY * 100 / scrollHeight);\n const percentX = Math.round(_top.scrollX * 100 / scrollWidth);\n const scrollPercentEventEvent = new CustomEvent(\"scrollpercent\", {\n detail: {\n percentX,\n percentY\n }\n });\n event.target.dispatchEvent(scrollPercentEventEvent);\n let secondaryEventName = \"defaultscroll\";\n const __valid_scrolls__ = [0, 5, 10, 25, 50, 75, 90, 95, 100];\n __valid_scrolls__.filter(function (p) {\n return p === percentY;\n }).map(function (pY: T): T {\n secondaryEventName = \"percentY\" + percentY.toString();\n const secondaryCustomEvent = new CustomEvent(secondaryEventName, {\n detail: {\n percentX,\n percentY\n }\n });\n event.target.dispatchEvent(secondaryCustomEvent);\n return pY;\n });\n\n }\n\n document.addEventListener(\"scroll\", function (event) {\n\n if (!ticking) {\n requestAnimationFrame(function () {\n scrollDispatcher(event);\n ticking = false;\n });\n\n ticking = true;\n }\n });\n\n })(_top);\n\n });\n }, []);\n }\n\n if (!isBrowser) {\n if (typeof _top.global !== \"undefined\" && Object.hasOwn(_top.global, \"_fireAsyncLoad\")) {\n _fireAsyncLoad.call(_top);\n }\n if (typeof _top.global !== \"undefined\" && Object.hasOwn(_top.global, \"onload\")) {\n _top.global.onload.call(_top);\n }\n }\n\n\n /* Freezing Object && Object.prototype to prevent prototype pollution risks */\n (function (isBrowser) {\n const __freeze__ = function () {\n Object.freeze(Object.prototype);\n Object.freeze(Object);\n };\n if (isBrowser && CONFIG.get(\"secureObjects\", false)) {\n Ready(function () {\n __freeze__();\n });\n } else if (CONFIG.get(\"secureObjects\", false)) {\n __freeze__();\n }\n })(isBrowser);\n }\n\n})(_top);\n", "/**\n * QCObjects 2.4\n * ________________\n *\n * Author: Jean Machuca \n *\n * Cross Browser Javascript Framework for MVC Patterns\n * QuickCorp/QCObjects is licensed under the\n * GNU Lesser General Public License v3.0\n * [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)\n *\n * Permissions of this copyleft license are conditioned on making available\n * complete source code of licensed works and modifications under the same\n * license or the GNU GPLv3. Copyright and license notices must be preserved.\n * Contributors provide an express grant of patent rights. However, a larger\n * work using the licensed work through interfaces provided by the licensed\n * work may be distributed under different terms and without source code for\n * the larger work.\n *\n * Copyright (C) 2015 Jean Machuca,\n *\n * Everyone is permitted to copy and distribute verbatim copies of this\n * license document, but changing it is not allowed.\n */\n/* eslint no-unused-vars: \"off\" */\n/* eslint no-redeclare: \"off\" */\n/* eslint no-empty: \"off\" */\n/* eslint strict: \"off\" */\n\n/* eslint no-mixed-operators: \"off\" */\n\n\"use strict\";\n\nexport * as AssignPolyfill from \"./assign\";\nexport * as __top__ from \"./top\";\nexport * as qcobjects from \"./MainProcess\";\nexport {_top, resetTop} from \"./top\";\nexport { _QC_CLASSES, _QC_PACKAGES, _QC_PACKAGES_IMPORTED, _QC_READY_LISTENERS } from \"./PrimaryCollections\";\nexport { _DataStringify } from \"./DataStringify\";\nexport { _DOMCreateElement } from \"./DOMCreateElement\";\nexport { _methods_, _protected_code_ } from \"./introspection\";\nexport { logger, Logger } from \"./Logger\";\nexport { _require_, is_phonegap, isBrowser, isNodeCommonJS } from \"./platform\";\nexport { subelements } from \"./subelements\";\nexport { __is_raw_class__ } from \"./is_raw_class\";\nexport { _LegacyCopy } from \"./LegacyCopy\";\nexport { _fireAsyncLoad, asyncLoad } from \"./asyncLoad\";\nexport { __instanceID } from \"./IncrementInstanceID\";\nexport { ObjectName } from \"./ObjectName\";\nexport { __getType__ } from \"./getType\";\nexport { is_a } from \"./is_a\";\nexport { ComplexStorageCache } from \"./ComplexStorageCache\";\nexport { waitUntil } from \"./waitUntil\";\nexport { _Cast, _CastProps } from \"./Cast\";\nexport { isQCObjects_Class, isQCObjects_Object } from \"./isQCObjects\";\nexport { Package } from \"./Package\";\nexport { ClassFactory } from \"./ClassFactory\";\nexport { Export } from \"./Export\";\nexport { Class } from \"./Class\";\nexport { InheritClass } from \"./InheritClass\";\nexport { _super_ } from \"./super\";\nexport { shortCode } from \"./shortCode\";\nexport { Processor } from \"./Processor\";\nexport { New } from \"./New\";\nexport { _Ready, ready, Ready } from \"./Ready\";\nexport { captureFalseTouch } from \"./captureFalseTouch\";\nexport { serviceLoader } from \"./serviceLoader\";\nexport { componentLoader } from \"./componentLoader\";\nexport { _buildComponentsFromElements_, ComponentURI } from \"./ComponentFactory\";\nexport { NamespaceRef } from \"./NamespaceRef\";\nexport { setDefaultProcessors } from \"./defaultProcessors\";\nexport { Tag, TagElements } from \"./Tag\";\nexport { Import } from \"./Import\";\nexport { BackendMicroservice } from \"./BackendMicroservice\";\nexport { Component } from \"./Component\";\nexport { _Crypt } from \"./Crypt\";\nexport { DefaultTemplateHandler } from \"./DefaultTemplateHandler\";\nexport { SourceJS } from \"./SourceJS\";\nexport { SourceCSS } from \"./SourceCSS\";\nexport { GlobalSettings } from \"./globalSettings\";\nexport { RegisterClass } from \"./RegisterClass\";\nexport { _ComponentWidget_, RegisterWidget, RegisterWidgets } from \"./WidgetsFactory\";\nexport { CONFIG } from \"./CONFIG\";\nexport { Controller } from \"./Controller\";\nexport { View } from \"./View\";\nexport { ConfigService, JSONService, Service } from \"./Service\";\nexport { VO } from \"./VO\";\nexport { Effect } from \"./Effect\";\nexport { TransitionEffect } from \"./TransitionEffect\";\nexport { Timer } from \"./Timer\";\nexport { _tag_filter_ } from \"./tag_filter\";\nexport { range } from \"./range\";\nexport { ArrayCollection, ArrayList } from \"./ArrayCollection\";\nexport { DDO } from \"./DDO\";\nexport { Toggle } from \"./Toggle\";\nexport { findPackageNodePath } from \"./findPackageNodePath\";\nexport { getDocumentLayout } from \"./DocumentLayout\";\nexport { IQCObjectsElement, IQCObjectsShadowedElement } from \"@types\";\nexport { __to_number } from \"./mathFunctions\";\nexport {_top as global} from \"./top\";\nexport {__make_global__} from \"./make_global\";\nexport {get, set} from \"./top\";\n", " // Object.assign Polyfilling\n // Reference: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign#Polyfill\n if (typeof Object.assign !== \"function\") {\n // Must be writable: true, enumerable: false, configurable: true\n Object.defineProperty(Object, \"assign\", {\n // eslint-disable-next-line no-unused-vars\n value: function assign(target: null, varArgs: any):any { // .length of function is 2\n \"use strict\";\n if (target === null) { // TypeError if undefined or null\n throw new TypeError(\"Cannot convert undefined or null to object\");\n }\n \n const to = Object(target);\n \n for (let index = 1; index < arguments.length; index++) {\n // eslint-disable-next-line prefer-rest-params\n const nextSource = arguments[index];\n \n if (nextSource !== null) { // Skip over if undefined or null\n for (const nextKey in nextSource) {\n // Avoid bugs when hasOwnProperty is shadowed\n if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {\n to[nextKey] = nextSource[nextKey];\n }\n }\n }\n }\n return to;\n },\n writable: true,\n configurable: true\n });\n }\nexport {};", "import { Http2Stream } from \"http2\";\nimport { Stream } from \"stream\";\nimport { _basePath_ } from \"./basePath\";\nimport { _DataStringify } from \"./DataStringify\";\nimport { _domain_ } from \"./domain\";\nimport { InheritClass } from \"./InheritClass\";\nimport { logger } from \"./Logger\";\nimport { Package } from \"./Package\";\nimport { IMicroservice } from \"@types\";\n\nexport class BackendMicroservice extends InheritClass {\n stream: any;\n route: any;\n headers: any;\n request: any;\n\n constructor({\n domain = _domain_,\n basePath = _basePath_,\n body = null,\n stream = null,\n request = null\n }:IMicroservice) {\n super({\n domain,\n basePath,\n body,\n stream,\n request\n });\n logger.debug(\"Initializing BackendMicroservice...\");\n const microservice = this;\n if (typeof this.body === \"undefined\") {\n this.body = null;\n }\n if (typeof body !== \"undefined\") {\n this.body = body;\n }\n this.cors();\n microservice.stream = stream;\n (stream as any)?.on(\"data\", (data: any) => {\n // data from POST, GET\n const requestMethod = (request as any)?.method.toLowerCase();\n const supportedMethods = {\n \"post\": microservice.post.bind(microservice),\n };\n if (Object.hasOwn(supportedMethods, requestMethod)) {\n (supportedMethods as any)[requestMethod].call(microservice, data);\n }\n });\n\n // data from POST, GET\n const requestMethod = (request as any)?.method.toLowerCase();\n const supportedMethods = {\n \"get\": microservice.get.bind(microservice),\n \"head\": microservice.head.bind(microservice),\n \"put\": microservice.put.bind(microservice),\n \"delete\": microservice.delete.bind(microservice),\n \"connect\": microservice.connect.bind(microservice),\n \"options\": microservice.options.bind(microservice),\n \"trace\": microservice.trace.bind(microservice),\n \"patch\": microservice.patch.bind(microservice)\n };\n if (Object.hasOwn(supportedMethods, requestMethod)) {\n (supportedMethods as any)[requestMethod].call(microservice);\n }\n\n\n }\n\n cors():void {\n if (this.route.cors) {\n logger.debug(\"Validating CORS...\");\n const {\n allow_origins,\n allow_credentials,\n allow_methods,\n allow_headers\n } = this.route.cors;\n const microservice = this;\n if (typeof microservice.headers !== \"object\") {\n microservice.headers = {};\n }\n if (typeof microservice.route.responseHeaders !== \"object\") {\n microservice.route.responseHeaders = {};\n }\n if (typeof allow_origins !== \"undefined\") {\n logger.debug(\"CORS: allow_origins available. Validating origins...\");\n // an example of allow_origins is ['https://example.com','http://www.example.com']\n if (allow_origins === \"*\" || (typeof microservice.request.headers.origin === \"undefined\") || [...allow_origins].indexOf(microservice.request.headers.origin) !== -1) {\n // for compatibility with all browsers allways return a wildcard when the origin is allowed\n logger.debug(\"CORS: Adding header Access-Control-Allow-Origin=*\");\n microservice.route.responseHeaders[\"Access-Control-Allow-Origin\"] = \"*\";\n } else {\n logger.debug(\"CORS: Origin is not allowed: \" + microservice.request.headers.origin);\n logger.debug(\"CORS: Forcing to finish the response...\");\n this.body = {};\n try {\n this.done();\n } catch (e:any) {\n logger.debug(`It was not possible to finish the call to the microservice: ${e}`);\n }\n }\n } else {\n logger.debug(\"CORS: no allow_origins available. Allowing all origins...\");\n logger.debug(\"CORS: Adding header Access-Control-Allow-Origin=*\");\n microservice.route.responseHeaders[\"Access-Control-Allow-Origin\"] = \"*\";\n }\n if (typeof allow_credentials !== \"undefined\") {\n logger.debug(`CORS: allow_credentials present. Allowing ${allow_credentials}...`);\n microservice.route.responseHeaders[\"Access-Control-Allow-Credentials\"] = allow_credentials.toString();\n } else {\n logger.debug(\"CORS: No allow_credentials present. Allowing all credentials.\");\n microservice.route.responseHeaders[\"Access-Control-Allow-Credentials\"] = \"true\";\n }\n if (typeof allow_methods !== \"undefined\") {\n logger.debug(`CORS: allow_methods present. Allowing ${allow_methods}...`);\n microservice.route.responseHeaders[\"Access-Control-Allow-Methods\"] = [...allow_methods].join(\",\");\n } else {\n logger.debug(\"CORS: No allow_methods present. Allowing only GET, OPTIONS and POST\");\n microservice.route.responseHeaders[\"Access-Control-Allow-Methods\"] = \"GET, OPTIONS, POST\";\n }\n if (typeof allow_headers !== \"undefined\") {\n logger.debug(`CORS: allow_headers present. Allowing ${allow_headers}...`);\n microservice.route.responseHeaders[\"Access-Control-Allow-Headers\"] = [...allow_headers].join(\",\");\n } else {\n logger.debug(\"CORS: No allow_headers present. Allowing all headers...\");\n microservice.route.responseHeaders[\"Access-Control-Allow-Headers\"] = \"*\";\n }\n } else {\n logger.debug(\"No CORS validation available. You can specify cors in CONFIG.backend.routes[].cors\");\n }\n }\n\n\n head(formData: any):void {\n logger.debug(`[BackendMicroservice.head] Data received: ${_DataStringify(formData)}`);\n this.done();\n }\n\n get(formData: any):void {\n logger.debug(`[BackendMicroservice.get] Data received: ${_DataStringify(formData)}`);\n this.done();\n }\n\n post(formData: any):void {\n logger.debug(`[BackendMicroservice.post] Data received: ${_DataStringify(formData)}`);\n this.done();\n }\n\n put(formData: any):void {\n logger.debug(`[BackendMicroservice.put] Data received: ${_DataStringify(formData)}`);\n this.done();\n }\n\n delete(formData: any):void {\n logger.debug(`[BackendMicroservice.delete] Data received: ${_DataStringify(formData)}`);\n this.done();\n }\n\n connect(formData: any):void {\n logger.debug(`[BackendMicroservice.connect] Data received: ${_DataStringify(formData)}`);\n this.done();\n }\n\n options(formData: any):void {\n logger.debug(`[BackendMicroservice.options] Data received: ${_DataStringify(formData)}`);\n this.done();\n }\n\n trace(formData: any):void {\n logger.debug(`[BackendMicroservice.trace] Data received: ${_DataStringify(formData)}`);\n this.done();\n }\n\n patch(formData: any):void {\n logger.debug(`[BackendMicroservice.patch] Data received: ${_DataStringify(formData)}`);\n this.done();\n }\n\n finishWithBody(stream?: Http2Stream | Stream):void {\n try {\n logger.debug(\"[BackendMicroservice.finishWithBody] Ending the stream...\");\n logger.debug(`[BackendMicroservice.finishWithBody] type of body is: ${typeof this.body}`);\n if (typeof this.body !== \"string\") {\n this.body = _DataStringify(this.body);\n }\n logger.debug(`[BackendMicroservice.finishWithBody] \\n body: ${this.body} `);\n (stream as any)?.write(this.body);\n (stream as any)?.end();\n logger.debug(\"[BackendMicroservice.finishWithBody] Stream ended.\");\n } catch (e:any) {\n logger.debug(`[BackendMicroservice.finishWithBody] Something went wrong ending the stream: ${e}`);\n }\n }\n\n done():void {\n logger.debug(\"[BackendMicroservice.done] Finalizing the response...\");\n const microservice = this;\n const stream = microservice.stream;\n try {\n logger.debug(\"[BackendMicroservice.done] Sending response headers...\");\n if (microservice.route.responseHeaders) {\n logger.debug(`[BackendMicroservice.done] Response headers present: ${Object.keys(microservice.route.responseHeaders).join(\",\")}`);\n stream.respond(microservice.route.responseHeaders);\n } else {\n throw Error(\"[BackendMicroservice.done] No headers present.\");\n }\n } catch (e:any) {\n logger.debug(`[BackendMicroservice.done] Something went wrong sending response headers: ${e}`);\n }\n if (microservice.body !== null) {\n try {\n logger.debug(\"[BackendMicroservice.done] A body of message is present. Finalizing the response...\");\n microservice.finishWithBody.call(microservice, stream);\n } catch (e:any) {\n logger.debug(`[BackendMicroservice.done] Something went wrong finalizing the response: ${e}`);\n }\n } else {\n logger.debug(\"[BackendMicroservice.done] No body present. Ending stream...\");\n stream.end();\n }\n }\n\n\n}\n\nPackage(\"com.qcobjects.api\", [\n BackendMicroservice\n]);\n", "import { DefaultTemplateHandlerParams, IComponent } from \"@types\";\nimport { logger } from \"./Logger\";\nimport { GlobalProcessor as Processor } from \"./Processor\";\nimport { RegisterClass } from \"./RegisterClass\";\n\nexport class DefaultTemplateHandler {\n template = \"\";\n __definition = {};\n static __definition = {};\n component?: IComponent;\n\n constructor({ component, template }: DefaultTemplateHandlerParams) {\n this.component = component;\n this.template = template;\n }\n\n assign(data: any): string {\n const templateInstance = this;\n if (typeof templateInstance.component === \"undefined\") {\n throw new Error(\"DefaultTemplateHandler.assign: component is undefined\");\n }\n if (typeof templateInstance.component.processorHandler === \"undefined\") {\n throw new Error(\"DefaultTemplateHandler.assign: component.processorHandler is undefined\");\n }\n const processorHandler = templateInstance.component.processorHandler;\n processorHandler.component = templateInstance.component;\n let parsedAssignmentText = (typeof templateInstance.template !== \"undefined\") ? (templateInstance.template) : (\"\");\n if (typeof data === \"object\") {\n [...Object.keys(data)].map((k): any => {\n let _value = data[k];\n if (typeof _value === \"string\" || typeof _value === \"number\" || (!isNaN(_value))) {\n try {\n _value = Processor.processObject.bind(processorHandler).call(processorHandler, _value, templateInstance.component);\n parsedAssignmentText = parsedAssignmentText.replace((new RegExp(`{{${k}}}`, \"g\")), _value);\n } catch (e: any) {\n logger.warn(`${templateInstance.component?.name} could not parse processors.`);\n throw Error(`${templateInstance.component?.name} could not parse processors. Reason: ${e.message}`);\n }\n }\n return k;\n });\n } else {\n logger.debug(`${templateInstance.component?.name}.data is not an object`);\n }\n try {\n parsedAssignmentText = Processor.processObject.call(processorHandler, parsedAssignmentText, templateInstance.component);\n } catch (e: any) {\n logger.warn(`${templateInstance.component?.name} could not parse processors.`);\n throw Error(`${templateInstance.component?.name} could not parse processors. Reason: ${e.message}`);\n }\n return parsedAssignmentText;\n }\n\n}\nRegisterClass(DefaultTemplateHandler, \"com.qcobjects\");\n", "import { __make_global__ } from \"./make_global\";\nimport { __register_class__ } from \"./PrimaryCollections\";\n\n\n\nexport const RegisterClass = function (_class_:any, __namespace?:string):any {\n return __register_class__(_class_, __namespace);\n};\n__make_global__(RegisterClass);", "import { ISourceJS } from \"@types\";\nimport { _basePath_ } from \"./basePath\";\nimport { _Cast } from \"./Cast\";\nimport { _domain_ } from \"./domain\";\nimport { _DOMCreateElement } from \"./DOMCreateElement\";\nimport { InheritClass } from \"./InheritClass\";\nimport { Package } from \"./Package\";\nimport { logger } from \"./Logger\";\n\nexport class SourceJS extends InheritClass implements ISourceJS {\n domain:string= _domain_;\n basePath:string= _basePath_;\n type= \"text/javascript\";\n containerTag= \"body\";\n url= \"\";\n data= {};\n async= false;\n external= false;\n\n constructor(o:any){\n super(o);\n this.body= _DOMCreateElement(\"script\");\n\n }\n set(name:string, value:any):void {\n this[name] = value;\n }\n get(name:string, _default?:any):any {\n return this[name] || _default;\n }\n status= false;\n done():void { }\n fail():void { }\n rebuild():void {\n const context = this;\n try {\n document.getElementsByTagName(context.containerTag)[0].appendChild(\n (function (s:any, url:string, context:any):any {\n s.type = context.type;\n s.src = url;\n s.crossOrigin = (Object.hasOwn(context, \"crossOrigin\")) ? (context.crossOrigin) : (\"anonymous\");\n s.async = context.async;\n s.onreadystatechange = function () {\n if (this.readyState === \"complete\") {\n context.done.call(context);\n }\n };\n s.onload = function (e:any) {\n context.status = true;\n context.done.call(context, e);\n };\n s.onerror = function (e:any) {\n context.status = false;\n context.fail.call(context, e);\n };\n context.body = s;\n return s;\n }).call(this,\n _DOMCreateElement(\"script\"),\n (this.external) ? (this.url) : (this.basePath + this.url), context));\n } catch (e:any) {\n context.status = false;\n logger.debug(`An error ocurred: ${e}`);\n context.fail();\n }\n }\n Cast(o:any):any {\n return _Cast(this, o);\n }\n _new_(properties:any):void {\n this.__new__(properties);\n this.rebuild();\n }\n }\n\n Package(\"com.qcobjects\", [SourceJS]);\n", "import { ISourceCSS, TBody } from \"@types\";\nimport { _basePath_ } from \"./basePath\";\nimport { _Cast } from \"./Cast\";\nimport { _domain_ } from \"./domain\";\nimport { _DOMCreateElement } from \"./DOMCreateElement\";\nimport { InheritClass } from \"./InheritClass\";\nimport { isBrowser } from \"./platform\";\nimport { Package } from \"./Package\";\n\nexport class SourceCSS extends InheritClass implements ISourceCSS {\n domain: string = _domain_;\n basePath: string = _basePath_;\n url = \"\";\n data = {};\n async = false;\n external = false;\n\n constructor(o: any) {\n super(o);\n this.body = _DOMCreateElement(\"link\") as TBody;\n }\n fail(): void {\n throw new Error(\"Method not implemented.\");\n }\n Cast(o: any): any {\n return _Cast(this, o);\n }\n set(name: string, value: any): void {\n this[name] = value;\n }\n get(name: string, _default?: any): any {\n return this[name] || _default;\n }\n done(): void { }\n rebuild(): void {\n const context = this;\n if (isBrowser) {\n window.document.getElementsByTagName(\"head\")[0].appendChild(\n (function (s: any, url: string, context: any): any {\n s.type = \"text/css\";\n s.rel = \"stylesheet\";\n s.href = url;\n s.crossOrigin = \"anonymous\";\n s.onreadystatechange = function () {\n if (this.readyState === \"complete\") {\n context.done.call(context);\n }\n };\n s.onload = context.done;\n context.body = s;\n return s;\n }).call(this,\n _DOMCreateElement(\"link\"),\n (this.external) ? (this.url) : (this.basePath + this.url), context));\n }\n }\n}\n\nPackage(\"com.qcobjects\", [SourceCSS]);", " \n/* eslint-disable no-unused-vars */\nimport { _DOMCreateElement } from \"./DOMCreateElement\";\nimport { Export } from \"./Export\";\nimport { _protected_code_ } from \"./introspection\";\nimport { isBrowser } from \"./platform\";\nimport { I_ComponentWidget_ } from \"@types\";\n\nclass QCObjectsWidgetNode implements I_ComponentWidget_ {\n writingSuggestions!: string;\n currentCSSZoom!: number;\n ariaColIndexText!: string | null;\n ariaRowIndexText!: string | null;\n accessKey!: string;\n accessKeyLabel!: string;\n autocapitalize!: string;\n dir!: string;\n draggable!: boolean;\n hidden!: boolean;\n inert!: boolean;\n innerText!: string;\n lang!: string;\n offsetHeight!: number;\n offsetLeft!: number;\n offsetParent!: Element | null;\n offsetTop!: number;\n offsetWidth!: number;\n outerText!: string;\n popover!: string | null;\n spellcheck!: boolean;\n title!: string;\n translate!: boolean;\n attachInternals(): ElementInternals {\n throw new Error(\"Method not implemented.\");\n }\n click(): void {\n throw new Error(\"Method not implemented.\");\n }\n hidePopover(): void {\n throw new Error(\"Method not implemented.\");\n }\n showPopover(): void {\n throw new Error(\"Method not implemented.\");\n }\n togglePopover(force?: boolean): boolean {\n throw new Error(\"Method not implemented.\");\n }\n addEventListener(type: unknown, listener: unknown, options?: unknown): void {\n throw new Error(\"Method not implemented.\");\n }\n removeEventListener(type: unknown, listener: unknown, options?: unknown): void {\n throw new Error(\"Method not implemented.\");\n }\n attributes!: NamedNodeMap;\n classList!: DOMTokenList;\n className!: string;\n clientHeight!: number;\n clientLeft!: number;\n clientTop!: number;\n clientWidth!: number;\n id!: string;\n innerHTML!: string;\n localName!: string;\n namespaceURI!: string | null;\n onfullscreenchange!: ((this: Element, ev: Event) => any) | null;\n onfullscreenerror!: ((this: Element, ev: Event) => any) | null;\n outerHTML!: string;\n ownerDocument!: Document;\n part!: DOMTokenList;\n prefix!: string | null;\n scrollHeight!: number;\n scrollLeft!: number;\n scrollTop!: number;\n scrollWidth!: number;\n shadowRoot!: ShadowRoot | null;\n slot!: string;\n tagName!: string;\n attachShadow(init: ShadowRootInit): ShadowRoot {\n throw new Error(\"Method not implemented.\");\n }\n checkVisibility(options?: CheckVisibilityOptions): boolean {\n throw new Error(\"Method not implemented.\");\n }\n closest(selectors: unknown): any {\n throw new Error(\"Method not implemented.\");\n }\n computedStyleMap(): StylePropertyMapReadOnly {\n throw new Error(\"Method not implemented.\");\n }\n getAttribute(qualifiedName: string): string | null {\n throw new Error(\"Method not implemented.\");\n }\n getAttributeNS(namespace: string | null, localName: string): string | null {\n throw new Error(\"Method not implemented.\");\n }\n getAttributeNames(): string[] {\n throw new Error(\"Method not implemented.\");\n }\n getAttributeNode(qualifiedName: string): Attr | null {\n throw new Error(\"Method not implemented.\");\n }\n getAttributeNodeNS(namespace: string | null, localName: string): Attr | null {\n throw new Error(\"Method not implemented.\");\n }\n getBoundingClientRect(): DOMRect {\n throw new Error(\"Method not implemented.\");\n }\n getClientRects(): DOMRectList {\n throw new Error(\"Method not implemented.\");\n }\n getElementsByClassName(classNames: string): HTMLCollectionOf {\n throw new Error(\"Method not implemented.\");\n }\n getElementsByTagName(qualifiedName: unknown): HTMLCollectionOf | HTMLCollectionOf {\n throw new Error(\"Method not implemented.\");\n }\n getElementsByTagNameNS(namespace: unknown, localName: unknown): HTMLCollectionOf {\n throw new Error(\"Method not implemented.\");\n }\n getHTML(options?: GetHTMLOptions): string {\n throw new Error(\"Method not implemented.\");\n }\n hasAttribute(qualifiedName: string): boolean {\n throw new Error(\"Method not implemented.\");\n }\n hasAttributeNS(namespace: string | null, localName: string): boolean {\n throw new Error(\"Method not implemented.\");\n }\n hasAttributes(): boolean {\n throw new Error(\"Method not implemented.\");\n }\n hasPointerCapture(pointerId: number): boolean {\n throw new Error(\"Method not implemented.\");\n }\n insertAdjacentElement(where: InsertPosition, element: Element): Element | null {\n throw new Error(\"Method not implemented.\");\n }\n insertAdjacentHTML(position: InsertPosition, string: string): void {\n throw new Error(\"Method not implemented.\");\n }\n insertAdjacentText(where: InsertPosition, data: string): void {\n throw new Error(\"Method not implemented.\");\n }\n matches(selectors: string): boolean {\n throw new Error(\"Method not implemented.\");\n }\n releasePointerCapture(pointerId: number): void {\n throw new Error(\"Method not implemented.\");\n }\n removeAttribute(qualifiedName: string): void {\n throw new Error(\"Method not implemented.\");\n }\n removeAttributeNS(namespace: string | null, localName: string): void {\n throw new Error(\"Method not implemented.\");\n }\n removeAttributeNode(attr: Attr): Attr {\n throw new Error(\"Method not implemented.\");\n }\n requestFullscreen(options?: FullscreenOptions): Promise {\n throw new Error(\"Method not implemented.\");\n }\n requestPointerLock(options?: PointerLockOptions): Promise {\n throw new Error(\"Method not implemented.\");\n }\n scroll(x?: unknown, y?: unknown): void {\n throw new Error(\"Method not implemented.\");\n }\n scrollBy(x?: unknown, y?: unknown): void {\n throw new Error(\"Method not implemented.\");\n }\n scrollIntoView(arg?: boolean | ScrollIntoViewOptions): void {\n throw new Error(\"Method not implemented.\");\n }\n scrollTo(x?: unknown, y?: unknown): void {\n throw new Error(\"Method not implemented.\");\n }\n setAttribute(qualifiedName: string, value: string): void {\n throw new Error(\"Method not implemented.\");\n }\n setAttributeNS(namespace: string | null, qualifiedName: string, value: string): void {\n throw new Error(\"Method not implemented.\");\n }\n setAttributeNode(attr: Attr): Attr | null {\n throw new Error(\"Method not implemented.\");\n }\n setAttributeNodeNS(attr: Attr): Attr | null {\n throw new Error(\"Method not implemented.\");\n }\n setHTMLUnsafe(html: string): void {\n throw new Error(\"Method not implemented.\");\n }\n setPointerCapture(pointerId: number): void {\n throw new Error(\"Method not implemented.\");\n }\n toggleAttribute(qualifiedName: string, force?: boolean): boolean {\n throw new Error(\"Method not implemented.\");\n }\n webkitMatchesSelector(selectors: string): boolean {\n throw new Error(\"Method not implemented.\");\n }\n baseURI!: string;\n childNodes!: NodeListOf;\n firstChild!: ChildNode | null;\n isConnected!: boolean;\n lastChild!: ChildNode | null;\n nextSibling!: ChildNode | null;\n nodeName!: string;\n nodeType!: number;\n nodeValue!: string | null;\n parentElement!: HTMLElement | null;\n parentNode!: ParentNode | null;\n previousSibling!: ChildNode | null;\n textContent!: string | null;\n appendChild(node: T): T {\n throw new Error(\"Method not implemented.\");\n }\n cloneNode(deep?: boolean): Node {\n throw new Error(\"Method not implemented.\");\n }\n compareDocumentPosition(other: Node): number {\n throw new Error(\"Method not implemented.\");\n }\n contains(other: Node | null): boolean {\n throw new Error(\"Method not implemented.\");\n }\n getRootNode(options?: GetRootNodeOptions): Node {\n throw new Error(\"Method not implemented.\");\n }\n hasChildNodes(): boolean {\n throw new Error(\"Method not implemented.\");\n }\n insertBefore(node: T, child: Node | null): T {\n throw new Error(\"Method not implemented.\");\n }\n isDefaultNamespace(namespace: string | null): boolean {\n throw new Error(\"Method not implemented.\");\n }\n isEqualNode(otherNode: Node | null): boolean {\n throw new Error(\"Method not implemented.\");\n }\n isSameNode(otherNode: Node | null): boolean {\n throw new Error(\"Method not implemented.\");\n }\n lookupNamespaceURI(prefix: string | null): string | null {\n throw new Error(\"Method not implemented.\");\n }\n lookupPrefix(namespace: string | null): string | null {\n throw new Error(\"Method not implemented.\");\n }\n normalize(): void {\n throw new Error(\"Method not implemented.\");\n }\n removeChild(child: T): T {\n throw new Error(\"Method not implemented.\");\n }\n replaceChild(node: Node, child: T): T {\n throw new Error(\"Method not implemented.\");\n }\n ELEMENT_NODE!: 1;\n ATTRIBUTE_NODE!: 2;\n TEXT_NODE!: 3;\n CDATA_SECTION_NODE!: 4;\n ENTITY_REFERENCE_NODE!: 5;\n ENTITY_NODE!: 6;\n PROCESSING_INSTRUCTION_NODE!: 7;\n COMMENT_NODE!: 8;\n DOCUMENT_NODE!: 9;\n DOCUMENT_TYPE_NODE!: 10;\n DOCUMENT_FRAGMENT_NODE!: 11;\n NOTATION_NODE!: 12;\n DOCUMENT_POSITION_DISCONNECTED!: 1;\n DOCUMENT_POSITION_PRECEDING!: 2;\n DOCUMENT_POSITION_FOLLOWING!: 4;\n DOCUMENT_POSITION_CONTAINS!: 8;\n DOCUMENT_POSITION_CONTAINED_BY!: 16;\n DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC!: 32;\n dispatchEvent(event: Event): boolean {\n throw new Error(\"Method not implemented.\");\n }\n ariaAtomic!: string | null;\n ariaAutoComplete!: string | null;\n ariaBrailleLabel!: string | null;\n ariaBrailleRoleDescription!: string | null;\n ariaBusy!: string | null;\n ariaChecked!: string | null;\n ariaColCount!: string | null;\n ariaColIndex!: string | null;\n ariaColSpan!: string | null;\n ariaCurrent!: string | null;\n ariaDescription!: string | null;\n ariaDisabled!: string | null;\n ariaExpanded!: string | null;\n ariaHasPopup!: string | null;\n ariaHidden!: string | null;\n ariaInvalid!: string | null;\n ariaKeyShortcuts!: string | null;\n ariaLabel!: string | null;\n ariaLevel!: string | null;\n ariaLive!: string | null;\n ariaModal!: string | null;\n ariaMultiLine!: string | null;\n ariaMultiSelectable!: string | null;\n ariaOrientation!: string | null;\n ariaPlaceholder!: string | null;\n ariaPosInSet!: string | null;\n ariaPressed!: string | null;\n ariaReadOnly!: string | null;\n ariaRequired!: string | null;\n ariaRoleDescription!: string | null;\n ariaRowCount!: string | null;\n ariaRowIndex!: string | null;\n ariaRowSpan!: string | null;\n ariaSelected!: string | null;\n ariaSetSize!: string | null;\n ariaSort!: string | null;\n ariaValueMax!: string | null;\n ariaValueMin!: string | null;\n ariaValueNow!: string | null;\n ariaValueText!: string | null;\n role!: string | null;\n animate(keyframes: Keyframe[] | PropertyIndexedKeyframes | null, options?: number | KeyframeAnimationOptions): Animation {\n throw new Error(\"Method not implemented.\");\n }\n getAnimations(options?: GetAnimationsOptions): Animation[] {\n throw new Error(\"Method not implemented.\");\n }\n after(...nodes: (Node | string)[]): void {\n throw new Error(\"Method not implemented.\");\n }\n before(...nodes: (Node | string)[]): void {\n throw new Error(\"Method not implemented.\");\n }\n remove(): void {\n throw new Error(\"Method not implemented.\");\n }\n replaceWith(...nodes: (Node | string)[]): void {\n throw new Error(\"Method not implemented.\");\n }\n nextElementSibling!: Element | null;\n previousElementSibling!: Element | null;\n childElementCount!: number;\n children!: HTMLCollection;\n firstElementChild!: Element | null;\n lastElementChild!: Element | null;\n \n append(...nodes: (Node | string)[]): void {\n throw new Error(\"Method not implemented.\");\n }\n \n prepend(...nodes: (Node | string)[]): void {\n throw new Error(\"Method not implemented.\");\n }\n \n querySelector(selectors: unknown): any {\n throw new Error(\"Method not implemented.\");\n }\n \n querySelectorAll(selectors: unknown): NodeListOf {\n throw new Error(\"Method not implemented.\");\n }\n replaceChildren(...nodes: (Node | string)[]): void {\n throw new Error(\"Method not implemented.\");\n }\n assignedSlot!: HTMLSlotElement | null;\n attributeStyleMap!: StylePropertyMap;\n style!: CSSStyleDeclaration;\n contentEditable!: string;\n enterKeyHint!: string;\n inputMode!: string;\n isContentEditable!: boolean;\n onabort!: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;\n onanimationcancel!: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;\n onanimationend!: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;\n onanimationiteration!: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;\n onanimationstart!: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;\n onauxclick!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n onbeforeinput!: ((this: GlobalEventHandlers, ev: InputEvent) => any) | null;\n onbeforetoggle!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onblur!: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;\n oncancel!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n oncanplay!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n oncanplaythrough!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onchange!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onclick!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n onclose!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n oncontextlost!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n oncontextmenu!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n oncontextrestored!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n oncopy!: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;\n oncuechange!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n oncut!: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;\n ondblclick!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n ondrag!: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;\n ondragend!: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;\n ondragenter!: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;\n ondragleave!: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;\n ondragover!: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;\n ondragstart!: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;\n ondrop!: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;\n ondurationchange!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onemptied!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onended!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onerror!: OnErrorEventHandler;\n onfocus!: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;\n onformdata!: ((this: GlobalEventHandlers, ev: FormDataEvent) => any) | null;\n ongotpointercapture!: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;\n oninput!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n oninvalid!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onkeydown!: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;\n onkeypress!: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;\n onkeyup!: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;\n onload!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onloadeddata!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onloadedmetadata!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onloadstart!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onlostpointercapture!: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;\n onmousedown!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n onmouseenter!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n onmouseleave!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n onmousemove!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n onmouseout!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n onmouseover!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n onmouseup!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n onpaste!: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;\n onpause!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onplay!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onplaying!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onpointercancel!: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;\n onpointerdown!: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;\n onpointerenter!: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;\n onpointerleave!: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;\n onpointermove!: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;\n onpointerout!: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;\n onpointerover!: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;\n onpointerup!: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;\n onprogress!: ((this: GlobalEventHandlers, ev: ProgressEvent) => any) | null;\n onratechange!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onreset!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onresize!: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;\n onscroll!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onscrollend!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onsecuritypolicyviolation!: ((this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any) | null;\n onseeked!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onseeking!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onselect!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onselectionchange!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onselectstart!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onslotchange!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onstalled!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onsubmit!: ((this: GlobalEventHandlers, ev: SubmitEvent) => any) | null;\n onsuspend!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n ontimeupdate!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n ontoggle!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n ontouchcancel?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;\n ontouchend?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;\n ontouchmove?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;\n ontouchstart?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;\n ontransitioncancel!: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;\n ontransitionend!: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;\n ontransitionrun!: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;\n ontransitionstart!: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;\n onvolumechange!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onwaiting!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onwebkitanimationend!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onwebkitanimationiteration!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onwebkitanimationstart!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onwebkittransitionend!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onwheel!: ((this: GlobalEventHandlers, ev: WheelEvent) => any) | null;\n autofocus!: boolean;\n dataset!: DOMStringMap;\n nonce?: string | undefined;\n tabIndex!: number;\n blur(): void {\n throw new Error(\"Method not implemented.\");\n }\n focus(options?: FocusOptions): void {\n throw new Error(\"Method not implemented.\");\n }\n\n}\n\nexport let _ComponentWidget_:CustomElementConstructor;\nif (isBrowser) {\n _ComponentWidget_ = class _ComponentWidget_ extends HTMLElement implements I_ComponentWidget_ {\n constructor() {\n super();\n const componentWidget = this;\n const componentName = componentWidget.nodeName.toLowerCase();\n const componentBody = _DOMCreateElement(\"quick-component\");\n const __enabled__atributes__ = componentWidget.getAttributeNames();\n componentBody.setAttribute(\"name\", componentName);\n \n if (!componentWidget.hasAttribute(\"shadowed\")) {\n componentBody.setAttribute(\"shadowed\", \"true\");\n }\n __enabled__atributes__.forEach( (attributeName) => {\n if (componentWidget.hasAttribute(attributeName)) {\n componentBody.setAttribute(attributeName, componentWidget?.getAttribute(attributeName) as any);\n componentWidget.removeAttribute(attributeName);\n }\n });\n const data_attributenames = componentWidget.getAttributeNames().filter(function (a) {\n return a.startsWith(\"data-\");\n }).map(function (a) {\n return a.split(\"-\")[1];\n });\n data_attributenames.forEach(function (_attribute_name_) {\n componentBody.setAttribute(\"data-\" + _attribute_name_, componentWidget?.getAttribute(\"data-\" + _attribute_name_) as any);\n componentWidget.removeAttribute(\"data-\" + _attribute_name_);\n });\n [...(componentWidget as any).children].forEach( (element) => {\n componentBody.appendChild(element.cloneNode(true));\n element.remove();\n });\n \n componentWidget.append(componentBody);\n }\n };\n \n} else {\n _ComponentWidget_ = class _ComponentWidget_ extends QCObjectsWidgetNode {\n constructor (){\n super();\n throw new Error (\"Class not implemented.\");\n }\n };\n}\nExport(_ComponentWidget_);\nexport const RegisterWidget = (widgetName: string):void => {\n if (isBrowser){\n customElements.define(widgetName, class extends _ComponentWidget_ { });\n } else {\n throw new Error (\"RegisterWidget is not implemented for non browser ecosystems yet.\");\n }\n};\nexport const RegisterWidgets = (...args: string[]):void =>{\n const widgetList = [...args];\n widgetList.filter(function (widgetName) {\n return typeof widgetName === \"string\";\n }).map(function (widgetName) {\n return RegisterWidget(widgetName);\n });\n};\n(_protected_code_)(RegisterWidget);\n(_protected_code_)(RegisterWidgets);\nExport(RegisterWidget);\nExport(RegisterWidgets);\n", "import { IController, IComponent, TControllerParams, IQCObjectsElement, IQCObjectsShadowedElement } from \"@types\";\nimport { ClassFactory } from \"./ClassFactory\";\nimport { __getType__ } from \"./getType\";\nimport { InheritClass } from \"./InheritClass\";\nimport { logger } from \"./Logger\";\nimport { New } from \"./New\";\nimport { Package } from \"./Package\";\nimport { isBrowser } from \"./platform\";\n\nexport class Controller extends InheritClass implements IController{\n\n component!: IComponent ;\n dependencies?: any[] = [];\n constructor({\n component,\n dependencies\n }: TControllerParams) {\n super({ component, dependencies });\n this.component = component;\n this.dependencies = dependencies;\n if (typeof this.component === \"undefined\" || this.component === null) {\n throw Error(`${__getType__(this)} must be called with a component`);\n }\n }\n\n // eslint-disable-next-line no-unused-vars\n fail?(...args: [...args: any[]] ): void {\n throw new Error(\"Method not implemented.\");\n }\n\n\n routingSelectedAttr(attrName: string):any {\n return this.component?.routingSelected.map( (r: any):any => {\n return r[attrName];\n }).filter(function (v: any) {\n return v;\n }).pop();\n }\n\n isTouchable():boolean {\n return (\"ontouchstart\" in window) ||\n ((navigator as any).MaxTouchPoints > 0) ||\n ((navigator as any).msMaxTouchPoints > 0);\n }\n\n onpress(subelementSelector: string, handler: Function):void {\n if (isBrowser){\n try {\n if (this.isTouchable()) {\n ((this.component?.componentRoot as IQCObjectsElement| IQCObjectsShadowedElement)?.subelements(subelementSelector) as any[])[0].addEventListener(\"touchstart\", handler, {\n passive: true\n });\n } else {\n ((this.component?.componentRoot as IQCObjectsElement | IQCObjectsShadowedElement)?.subelements(subelementSelector) as any[])[0].addEventListener(\"click\", handler, {\n passive: true\n });\n }\n } catch (e:any) {\n logger.debug(`An error ocurred: ${e}.`);\n logger.debug(\"No button to assign press event\");\n }\n \n }\n }\n\n createRoutingController():void {\n const controller = this;\n const component = controller.component;\n const controllerName = controller.routingSelectedAttr(\"controllerclass\");\n if (typeof controllerName !== \"undefined\") {\n const _Controller = ClassFactory(controllerName) as unknown as IController;\n if (typeof _Controller !== \"undefined\" && component !== null) {\n component.routingController = New(_Controller, {\n component\n }) as IController; // Initializes the main controller for the component\n if (typeof component.routingController !== \"undefined\" \n && Object.hasOwn(component.routingController, \"done\") \n && typeof component.routingController.done === \"function\") {\n component.routingController.done.call(component.routingController);\n }\n }\n }\n }\n\n done():void { }\n}\n\nPackage(\"com.qcobjects.controllers\", [\n Controller\n]);\n", "import { __getType__ } from \"./getType\";\nimport { InheritClass } from \"./InheritClass\";\nimport { Package } from \"./Package\";\nimport { TViewParams } from \"@types\";\n\nexport class View extends InheritClass {\n constructor({ component = undefined, dependencies = [] }:TViewParams) {\n super({component, dependencies});\n if (typeof this.component === \"undefined\" || this.component === \"null\") {\n throw Error(`${__getType__(this)} must be called with a component`);\n }\n\n }\n }\n\nPackage(\"com.qcobjects.views\", [\n View\n]);", "import { InheritClass } from \"./InheritClass\";\nimport { Package } from \"./Package\";\n\nexport class VO extends InheritClass {}\n\nPackage(\"com.qcobjects.valueObjects\", [\n VO\n ]);", "import { IEffect, TEffectParams } from \"@types\";\nimport { InheritClass } from \"./InheritClass\";\nimport { Package } from \"./Package\";\nimport { _methods_, _protected_code_ } from \"./introspection\";\nimport { ClassFactory } from \"./ClassFactory\";\n\nclass Effect extends InheritClass implements IEffect {\n // eslint-disable-next-line no-unused-vars\n done(...args: any[]): any {\n throw new Error(\"Method not implemented.\");\n };\n // eslint-disable-next-line no-unused-vars\n apply(...args: any[]): void {\n throw new Error(\"Method not implemented.\");\n }\n duration = 1000;\n\n\n animate({\n timing,\n draw,\n duration\n }: TEffectParams): void {\n const _self: this = this;\n\n const start = performance.now();\n\n requestAnimationFrame(function animate(time) {\n // timeFraction goes from 0 to 1\n let timeFraction = (time - start) / duration;\n if (timeFraction > 1) timeFraction = 1;\n\n // calculate the current animation state\n const progress = timing(timeFraction);\n\n draw(Math.round(progress * 100)); // draw it\n\n if (timeFraction < 1) {\n requestAnimationFrame(animate);\n } else {\n // if this is an object with a done method\n if (typeof _self !== \"undefined\" &&\n _self !== null &&\n Object.hasOwn(_self, \"done\") &&\n (typeof _self.done).toLowerCase() === \"function\") {\n _self.done.call(_self);\n }\n }\n\n });\n }\n\n}\n\n\nPackage(\"com.qcobjects.effects.base\", [\n Effect\n]);\n\n(_methods_)(ClassFactory(\"Effect\")).map((__c__): any => {\n (_protected_code_)(__c__);\n return __c__;\n});\n\nexport { Effect };", "import { Effect } from \"./Effect\";\nimport { logger } from \"./Logger\";\nimport { Package } from \"./Package\";\nimport { ClassFactory } from \"./ClassFactory\";\nimport { IQCObjectsElement, IQCObjectsShadowedElement } from \"@types\";\nimport { ITransitionEffect, IComponent, TTransitionEffectParams } from \"@types\";\n\nexport class TransitionEffect extends Effect implements ITransitionEffect{\n duration = 385;\n defaultParams = {\n alphaFrom: 0,\n alphaTo: 1,\n angleFrom: 180,\n angleTo: 0,\n radiusFrom: 0,\n radiusTo: 30,\n scaleFrom: 0,\n scaleTo: 1\n };\n\n fitToHeight = false;\n fitToWidth = false;\n\n component!: IComponent;\n effects!: string[];\n\n apply({\n alphaFrom,\n alphaTo,\n angleFrom,\n angleTo,\n radiusFrom,\n radiusTo,\n scaleFrom,\n scaleTo\n }: TTransitionEffectParams):void {\n const _transition_ = this;\n logger.info(\"EXECUTING TransitionEffect \");\n const componentRoot =_transition_.component.componentRoot as IQCObjectsElement | IQCObjectsShadowedElement | HTMLElement | ShadowRoot;\n\n if (typeof componentRoot !== \"undefined\" && componentRoot !== null){\n if (_transition_.fitToHeight) {\n (componentRoot as any).height = (typeof (componentRoot as HTMLElement).offsetParent === \"object\" && (componentRoot as HTMLElement).offsetParent !== null) ? ((componentRoot as HTMLElement).offsetParent?.scrollHeight) : ((componentRoot as HTMLElement).getBoundingClientRect().height);\n }\n if (_transition_.fitToWidth) {\n (componentRoot as any).width = (typeof (componentRoot as HTMLElement).offsetParent === \"object\" && (componentRoot as HTMLElement).offsetParent !== null) ? ((componentRoot as HTMLElement).offsetParent?.scrollWidth) : ((componentRoot as HTMLElement).getBoundingClientRect().width);\n }\n if (_transition_.component.shadowed){\n ((componentRoot as ShadowRoot).host as HTMLElement).style.display = \"block\";\n } else {\n (componentRoot as HTMLElement).style.display = \"block\";\n }\n _transition_.effects.map( (effectClassName:string):string => {\n\n const __effectClass__ = ClassFactory(effectClassName) as unknown as typeof Effect;\n const effectObj = new __effectClass__({});\n const effectClassMethod = effectObj.apply.bind(_transition_);\n const componentHost = (_transition_.component.shadowed)? ((componentRoot as ShadowRoot).host) : (componentRoot);\n const effectParams = {\n alphaFrom,\n alphaTo,\n angleFrom,\n angleTo,\n radiusFrom,\n radiusTo,\n scaleFrom,\n scaleTo\n }; \n effectClassMethod(componentHost,...Object.values(effectParams));\n return effectClassName;\n });\n \n }\n\n }\n\n}\n\nPackage(\"com.qcobjects.effects.transitions.base\", [\n TransitionEffect\n]);\n", "import { ITimer, TTimerParams } from \"@types\";\nimport { InheritClass } from \"./InheritClass\";\nimport { Package } from \"./Package\";\n\nexport class Timer extends InheritClass implements ITimer {\n\n\n duration = 1000;\n alive = true;\n thread({\n timing,\n intervalInterceptor,\n duration\n }:TTimerParams):void {\n const timer = this;\n\n const start = performance.now();\n\n requestAnimationFrame(function thread(time) {\n // timeFraction goes from 0 to 1\n const elapsed = (time - start);\n let timeFraction = elapsed / duration;\n if (timeFraction > 1) timeFraction = 1;\n\n // calculate the current progress state\n const progress = timing(timeFraction, elapsed);\n\n intervalInterceptor(Math.round(progress * 100)); // draw it\n\n if ((timeFraction < 1 || duration === -1) && timer.alive) {\n requestAnimationFrame(thread);\n }\n\n });\n }\n\n\n }\n\nPackage(\"com.qcobjects.timing\", [\n Timer\n ]);\n", "import { TDDOParams } from \"@types\";\nimport { Export } from \"./Export\";\nimport { InheritClass } from \"./InheritClass\";\nimport { logger } from \"./Logger\";\nimport { ObjectName } from \"./ObjectName\";\n\n/**\n * Dynamic Data Objects Class\n * Usage:\n * Class('TestDDO',{\n * data: {},\n * _new_ (){\n * this.ddo = New(DDO,{\n * instance:this,\n * name:'data',\n * value:{},\n * fget (value){\n * logger.debug('returned value '+ value );\n * }\n * })\n * }\n * });\n *\n */\nexport class DDO extends InheritClass {\n constructor({\n instance,\n name,\n fget,\n fset,\n value\n }:TDDOParams) {\n super({\n instance,\n name,\n fget,\n fset,\n value\n });\n this._new_({\n instance,\n name,\n fget,\n fset,\n value\n });\n\n }\n\n _new_({\n instance,\n name,\n fget,\n fset\n }:TDDOParams):void {\n const ddoInstance = this;\n var name = (typeof name === \"undefined\") ? (ObjectName(ddoInstance)) : (name);\n\n Object.defineProperty(instance, name, {\n set(val) {\n const _value = val;\n logger.debug(\"value changed \" + name);\n let ret;\n if (typeof fset !== \"undefined\" && typeof fset === \"function\") {\n ret = fset(_value);\n } else {\n ret = _value;\n }\n instance[\"_\" + name] = ret;\n \n },\n get():any {\n const _value = instance[\"_\" + name];\n logger.debug(\"returning value \" + name);\n const is_ddo = (v:any):any => {\n if (typeof v === \"object\" && Object.hasOwn(v, \"value\")) {\n return v.value;\n }\n return v;\n };\n let ret;\n if (typeof fget !== \"undefined\" && typeof fget === \"function\") {\n ret = fget(is_ddo(_value));\n } else {\n ret = is_ddo(_value);\n }\n return ret;\n }\n });\n }\n\n}\nExport(DDO);\n", "import { InheritClass } from \"./InheritClass\";\nimport { logger } from \"./Logger\";\nimport { Package } from \"./Package\";\nexport class Toggle extends InheritClass {\n _toggle = false;\n _inverse = true;\n _positive:Function|null = null;\n _negative:Function|null = null;\n _dispatched:Function|null = null;\n _args = {};\n\n constructor(positive: Function, negative: Function, args: Array) {\n super({positive, negative, args});\n this._new_({positive, negative, args});\n }\n\n changeToggle():void {\n this._toggle = !(this._toggle);\n }\n\n _new_({\n positive,\n negative,\n args\n }:{positive: Function, negative: Function, args: Array}):void {\n this._positive = positive;\n this._negative = negative;\n this._args = args;\n }\n\n fire():Promise {\n const toggle = this;\n var _promise = new Promise(function (resolve, reject) {\n\n if (typeof toggle._positive === \"function\" && typeof toggle._negative === \"function\") {\n if (toggle._inverse) {\n toggle._dispatched = (toggle._toggle) ? (toggle._negative.bind(toggle)) : (toggle._positive.bind(toggle));\n } else {\n toggle._dispatched = (toggle._toggle) ? (toggle._positive.bind(toggle)) : (toggle._negative.bind(toggle));\n }\n toggle._dispatched?.call(toggle, toggle._args);\n resolve.call(_promise, toggle);\n } else {\n logger.debug(\"Toggle functions are not declared\");\n reject.call(_promise, toggle as Toggle);\n }\n return toggle;\n }).then(function (toggle:Toggle) {\n toggle.changeToggle();\n return toggle;\n }).catch(function (e) {\n logger.debug(e.toString());\n return toggle;\n }).finally(()=> {\n return toggle;\n });\n return _promise;\n }\n\n\n}\n\nPackage(\"com.qcobjects.tools.essentials\", [\n Toggle\n]);\n", "export const getDocumentLayout = function ():string|undefined {\n const h = (w:number, h:number) => {\n return w > h ? \"landscape\" : null;\n };\n const v = (w:number, h:number) => {\n return h > w ? \"portrait\" : null;\n };\n const square = (w:number, h:number) => {\n return w === h ? \"square\" : null;\n };\n return [\n h(document.documentElement.clientWidth, document.documentElement.clientHeight),\n v(document.documentElement.clientWidth, document.documentElement.clientHeight),\n square(document.documentElement.clientWidth, document.documentElement.clientHeight)\n ].filter(e => e !== null).pop();\n };\n", "import * as QCObjects from \"./qcobjects.js\";\nmodule.exports = QCObjects;"], "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAa;AAAb;AAAA;AAAA;AAAO,IAAM,mBAAmB,wBAAC,QAAsB;AACrD,aAAO,CAAC,EAAG,OAAO,QAAQ,cAAc,IAAI,SAAS,EAAE,WAAW,OAAO;AAAA,IAC3E,GAFgC;AAAA;AAAA;;;ACAhC,IAKa;AALb;AAAA;AAAA;AAKO,IAAM,aAAa,wBAAC,MAAkB;AAC3C,UAAI,MAAM;AACV,UAAI,OAAO,MAAM,cAAc,OAAO,OAAO,GAAG,MAAM,KAAK,EAAE,SAAS,IAAI;AACxE,cAAM,EAAE;AAAA,MACV,WAAW,OAAO,MAAM,eAAe,OAAO,EAAE,gBAAgB,cAAc,EAAE,YAAY,SAAS,IAAI;AACvG,cAAM,EAAE,YAAY;AAAA,MACtB,WAAW,OAAO,MAAM,eAAe,OAAO,EAAE,gBAAgB,UAAU;AACxE,cAAM,EAAE,YAAY,SAAS,EAAE,QAAQ,cAAc,IAAI,EAAE,MAAM,GAAG,EAAE,MAAM,CAAC,EAAE,KAAK,EAAE;AAAA,MACxF;AACA,aAAO;AAAA,IACT,GAV0B;AAAA;AAAA;;;ACL1B,IAQa;AARb;AAAA;AAAA;AAAA;AACA;AAOO,IAAM,cAAc,gCAASA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;AAChC,WAAO,IAAIA,KAAI,cAAc;AAAA,EAC/B,GAFU;AAGV,QAAM,IAAI,wBAAC,GAAUA,OAAa;AAChC,WAAOA,KAAI,IAAI,aAAa;AAAA,EAC9B,GAFU;AAGV,QAAM,SAAS,wBAAC,GAAUA,OAAa;AACrC,WAAO,MAAMA,KAAI,WAAW;AAAA,EAC9B,GAFe;AAGf,SAAO;AAAA,IACL,EAAE,SAAS,gBAAgB,aAAa,SAAS,gBAAgB,YAAY;AAAA,IAC7E,EAAE,SAAS,gBAAgB,aAAa,SAAS,gBAAgB,YAAY;AAAA,IAC7E,OAAO,SAAS,gBAAgB,aAAa,SAAS,gBAAgB,YAAY;AAAA,EACpF,EAAE,OAAO,OAAK,MAAM,IAAI,EAAE,IAAI;AAChC,GAf+B;;;AhBkGjC;AACA;AACA;AACA;;;AiBpGA,OAAO,UAAU;", "names": ["__getType__", "name", "name", "self", "self", "process", "callback", "args", "service", "URL", "req", "component", "is_file", "_ret_", "self", "e", "_component_", "_component", "standardResponse", "observer", "newComponent", "_top", "_top", "ready", "self", "shortCode", "func", "exp", "subelements", "_top", "_self", "content", "self", "isBrowser", "requestMethod", "supportedMethods", "context", "context", "_Controller", "toggle", "h"] } diff --git a/public/esm/index.mjs.map b/public/esm/index.mjs.map index 690a2a22..6a461e20 100644 --- a/public/esm/index.mjs.map +++ b/public/esm/index.mjs.map @@ -1,7 +1,7 @@ { "version": 3, "sources": ["../../src/is_raw_class.ts", "../../src/ObjectName.ts", "../../src/getType.ts", "../../src/make_global.ts", "../../src/PrimaryCollections.ts", "../../src/Export.ts", "../../src/_import_.ts", "../../src/platform.ts", "../../src/Logger.ts", "../../src/Cast.ts", "../../src/DOMCreateElement.ts", "../../src/IncrementInstanceID.ts", "../../src/introspection.ts", "../../src/Package.ts", "../../src/InheritClass.ts", "../../src/isQCObjects.ts", "../../src/is_a.ts", "../../src/is_forbidden_name.ts", "../../src/LegacyCopy.ts", "../../src/Class.ts", "../../src/ClassFactory.ts", "../../src/Base64.ts", "../../src/basePath.ts", "../../src/DataStringify.ts", "../../src/domain.ts", "../../src/New.ts", "../../src/secretKey.ts", "../../src/Crypt.ts", "../../src/ConfigSettings.ts", "../../src/CONFIG.ts", "../../src/Processor.ts", "../../src/routings.ts", "../../src/asyncLoad.ts", "../../src/ComplexStorageCache.ts", "../../src/serviceLoader.ts", "../../src/tag_filter.ts", "../../src/componentLoader.ts", "../../src/Component.ts", "../../src/ComponentFactory.ts", "../../src/Service.ts", "../../src/globalSettings.ts", "../../src/top.ts", "../../src/captureFalseTouch.ts", "../../src/range.ts", "../../src/defaultProcessors.ts", "../../src/findPackageNodePath.ts", "../../src/Import.ts", "../../src/mathFunctions.ts", "../../src/NamespaceRef.ts", "../../src/Ready.ts", "../../src/ArrayCollection.ts", "../../src/Tag.ts", "../../src/shortCode.ts", "../../src/super.ts", "../../src/waitUntil.ts", "../../src/subelements.ts", "../../src/loadSDK.ts", "../../src/MainProcess.ts", "../../src/qcobjects.ts", "../../src/assign.ts", "../../src/BackendMicroservice.ts", "../../src/DefaultTemplateHandler.ts", "../../src/RegisterClass.ts", "../../src/SourceJS.ts", "../../src/SourceCSS.ts", "../../src/WidgetsFactory.ts", "../../src/Controller.ts", "../../src/View.ts", "../../src/VO.ts", "../../src/Effect.ts", "../../src/TransitionEffect.ts", "../../src/Timer.ts", "../../src/DDO.ts", "../../src/Toggle.ts", "../../src/DocumentLayout.ts", "../../src/index.mts"], - "sourcesContent": ["export const __is_raw_class__ = (o_c: any): boolean => {\n return !!((typeof o_c === \"function\" && o_c.toString().startsWith(\"class\")));\n};\n", "/**\n * Returns the object or function name\n *\n * @param Object or function\n */\nexport const ObjectName = (o: any):string => {\n let ret = \"\";\n if (typeof o === \"function\" && Object.hasOwn(o, \"name\") && o.name !== \"\") {\n ret = o.name;\n } else if (typeof o !== \"undefined\" && typeof o.constructor === \"function\" && o.constructor.name !== \"\") {\n ret = o.constructor.name;\n } else if (typeof o !== \"undefined\" && typeof o.constructor === \"object\") {\n ret = o.constructor.toString().replace(/\\[(.*?)\\]/g, \"$1\").split(\" \").slice(1).join(\"\");\n }\n return ret;\n};", "import { __is_raw_class__ } from \"./is_raw_class\";\nimport { ObjectName } from \"./ObjectName\";\n\n/**\n * Determine the type of the Object for any QCObjects Object\n *\n * @param {Object} object\n */\nexport const __getType__ = function __getType__(o_c: any): any {\n let _ret_ = \"\";\n switch (true) {\n case typeof o_c === \"object\" &&\n (!!o_c.constructor &&\n !!o_c.constructor.name)\n && o_c.constructor.name !== \"\":\n _ret_ = o_c.constructor.name;\n break;\n case typeof o_c === \"function\" && !!o_c.name:\n _ret_ = o_c.name;\n break;\n case __is_raw_class__(o_c) && !!o_c.name:\n _ret_ = o_c.name;\n break;\n case (!!o_c && !!o_c.__classType) && o_c.__classType !== \"\":\n _ret_ = o_c.__classType;\n break;\n case (!!o_c && !!o_c.__definition) && (!!o_c.__definition.__classType) && o_c.__definition.__classType !== \"\":\n _ret_ = o_c.__definition.__classType;\n break;\n default:\n _ret_ = ObjectName(o_c);\n break;\n }\n return _ret_;\n};\n", "import { _top, set } from \"./top\";\ndeclare const global:any;\ndeclare const globalThis:any;\n\nexport const __make_global__ = (f:any):void => {\n if (!!f && !!f.name) {\n if (typeof _top !== \"undefined\" && typeof f !== \"undefined\" && _top !== null && !Object.hasOwn(_top,f.name)) {\n set(f.name, f);\n } else if (typeof global !== \"undefined\"){\n global[f.name] = f;\n } else if (typeof globalThis !== \"undefined\"){\n globalThis[f.name] = f;\n }\n \n }\n\n};", "import { T_QC_CLASSES, T_QC_PACKAGES } from \"./types/global\";\nimport { __getType__ } from \"./getType\";\nimport { __make_global__ } from \"./make_global\";\n\nexport var _QC_CLASSES: T_QC_CLASSES = {};\nexport var _QC_PACKAGES: T_QC_PACKAGES = {};\nexport var _QC_PACKAGES_IMPORTED: any[] = [];\nexport var _QC_READY_LISTENERS: any[] = [];\n\nexport const __register_class__ = function (_class_: any, __namespace?: string): any {\n const __classType = __getType__(_class_);\n let name = _class_.name || __classType;\n if (name.toLowerCase() === \"function\") {\n name = __classType;\n }\n if (typeof _class_.__definition === \"undefined\") {\n _class_.__definition = {};\n }\n _class_.__definition.__classType = __classType;\n if (typeof __namespace !== \"undefined\") {\n _class_.__definition.__namespace = __namespace;\n }\n _QC_CLASSES[name] = _class_;\n __make_global__(_class_);\n return _QC_CLASSES[name];\n};\n\nexport const get_QC_CLASS = (name:string):any => {\n return _QC_CLASSES[name];\n};\n\nconst _get_packages_names = function (_packages: any): T[] {\n let _keys: any[] = [];\n for (const _k of Object.keys(_packages)) {\n if (\n typeof _packages[_k] !== \"undefined\" &&\n typeof _packages[_k] !== \"function\" &&\n Object.hasOwn(_packages[_k], \"length\") &&\n _packages[_k].length > 0\n ) {\n _keys.push(_k);\n _keys = _keys.concat(_get_packages_names(_packages[_k]));\n }\n }\n return _keys as T[];\n};\n\n\nexport const getPackagesNamesList = (): any[] => {\n return _get_packages_names(_QC_PACKAGES);\n};\n\nexport const getPackagesList = (): any[] => {\n return [...getPackagesNamesList()].map((packagename: string): T => {\n const _classesList: any[] = _QC_PACKAGES[packagename] as any[];\n let _ret_: any = undefined;\n if (_classesList) {\n _ret_ = {\n packageName: packagename,\n classesList: _classesList.filter(function (): boolean {\n return true;\n })\n };\n }\n return _ret_ as T;\n }).filter(function (_p: any): boolean {\n return typeof _p !== \"undefined\";\n });\n};\n\nexport const getClassesList = (): any[] => {\n let _classesList: any[] = [];\n [...getPackagesList()].forEach(function (_package_element: any): T {\n _classesList = _classesList.concat(_package_element.classesList.map(\n (_class_element: any) => {\n return {\n packageName: _package_element.packageName,\n className: `${_package_element.packageName}.${__getType__(_class_element)}`,\n classFactory: _class_element\n };\n }\n ));\n return _package_element as T;\n });\n\n return _classesList;\n};\n\nexport const getClassesNamesList = (): any[] => {\n return [...getClassesList()].map((_class_element: any): T => {\n return _class_element.className as T;\n });\n};\n\nexport const set_QC_PACKAGE = (packageName: string, _qc_packages: any[]):void => {\n _QC_PACKAGES[packageName] = _qc_packages;\n};\n\n", "import { __make_global__ } from \"./make_global\";\n\nexport const Export = function (f: any):void {\n return __make_global__(f);\n};\nExport.prototype.toString = function () {\n return \"Export(function or symbol) { [QCObjects native code] }\";\n};\n", "import { logger } from \"./Logger\";\n\nasync function _import_(name:string):Promise {\n logger.debug(`Importing ${name}...`);\n function isPackage(name:string) {\n logger.debug(`Validating if ${name} is a package name...`);\n // Simple check to determine if the name is a package\n // This can be enhanced based on your specific needs\n return !name.startsWith(\".\") && !name.startsWith(\"/\") && !name.includes(\"/\");\n }\n \n try {\n // Ensure the name has a .js extension if it's not a package\n const hasExtension = /\\.[^/\\\\]+$/.test(name);\n if (!hasExtension && !isPackage(name)) {\n logger.debug(`${name} does not have an extension and is not a package. Adding js extension.`);\n name += \".js\";\n }\n \n const m:any = await import(name);\n return m;\n } catch (error:any) {\n logger.warn(`Failed to load module: ${error}`);\n }\n }\n \nexport {_import_};", "import { _import_ } from \"./_import_\";\nimport { logger } from \"./Logger\";\n\nexport const isDeno:boolean = (typeof window !== \"undefined\" && \"Deno\" in window);\nexport const isBrowser:boolean = (typeof window !== \"undefined\" && typeof window.self !== \"undefined\" && window === window.self) && !isDeno;\nexport const isNodeCommonJS:boolean = (typeof module !== \"undefined\");\n// eslint-disable-next-line no-unused-vars\nexport const deno_require = (name:string):void => { /* not yet implemented */};\nexport const _require_ = (name:string):any => {\n \n return (isDeno)?(deno_require(name)):(\n ( (name):any => {\n let r:any;\n try {\n (async () => {\n r = await _import_(name);\n })().then((m:any) => {\n r = (m && m.default) || m;\n })\n .catch ((e:any) => {\n logger.warn(`An error ocurred: ${e}`);\n });\n\n } catch (e:any) {\n logger.debug(`An error ocurred importing module. ${e}`);\n r = {export:{}};\n }\n return r;\n } ) (name)\n );\n};\ndeclare const cordova: any;\n\nexport const is_phonegap:boolean = (\n function () {\n return (typeof cordova !== \"undefined\");\n }\n)();", "import { Export } from \"./Export\";\nimport { isBrowser } from \"./platform\";\n\nexport class Logger {\n debugEnabled = true;\n infoEnabled = true;\n warnEnabled = true;\n debug(message: string): void {\n if (this.debugEnabled) {\n console.log(\"\\x1b[35m%s\\x1b[0m\", `[DEBUG][${performance.now().toLocaleString()}] ${message}`);\n }\n }\n\n info(message: string): void {\n let color;\n if (this.infoEnabled) {\n if (isBrowser) {\n color = \"\\x1b[103m%s\\x1b[0m\";\n } else {\n color = \"\\x1b[33m%s\\x1b[0m\";\n }\n console.info(color, `[INFO][${performance.now().toLocaleString()}] ${message}`);\n }\n }\n\n warn(message: string): void {\n if (this.warnEnabled) {\n console.warn(\"\\x1b[31m%s\\x1b[0m\", `[WARN][${performance.now().toLocaleString()}] ${message}`);\n }\n }\n}\n\nexport const logger: Logger = new Logger();\nExport(logger);", "import { logger } from \"./Logger\";\n\n/**\n * Casts an object to another object class type\n *\n * @param {Object} obj_source\n * @param {Object} obj_dest\n */\nexport const _Cast = function (obj_source: any, obj_dest: any):any {\n for (const v in obj_source) {\n if (typeof obj_source[v] !== \"undefined\") {\n try {\n obj_dest[v] = obj_source[v];\n } catch (e:any) {\n logger.debug(`An error ocurred: ${e}.`);\n logger.warn(`Unable to cast ${(typeof obj_source).toString()}.${typeof v.toString()} to ${(typeof obj_dest).toString()}.${typeof v.toString()}`);\n }\n }\n }\n return obj_dest;\n};\n\n/**\n * Casts an object to another object class type. Only properties\n *\n * @param {Object} obj_source\n * @param {Object} obj_dest\n */\nexport const _CastProps = function (obj_source: any, obj_dest: any, _ignoreError:boolean = true):any {\n for (const v in obj_source) {\n if (typeof obj_source[v] !== \"undefined\" && typeof obj_source[v] !== \"function\") {\n try {\n obj_dest[v] = obj_source[v];\n } catch (e:any) {\n if (!_ignoreError){\n logger.debug(`An error ocurred: ${e}.`);\n }\n }\n } else if (typeof obj_source[v] === \"function\") {\n try {\n obj_dest[v] = obj_source[v].bind(obj_dest);\n } catch (e:any) {\n logger.warn(e);\n }\n }\n }\n return obj_dest;\n};\n", "import { IQCObjectsElement } from \"./types/global\";\nimport { isBrowser } from \"./platform\";\n\nexport const _DOMCreateElement = function (elementName: string, props?: any[], children?: any): IQCObjectsElement {\n let _ret_;\n if (isBrowser) {\n _ret_ = _DOMCreateComplexElement(elementName, props, children) as unknown as IQCObjectsElement;\n } else {\n _ret_ = {} as IQCObjectsElement;\n }\n return _ret_;\n};\n\n\nconst ComplexTypeCall = (_type: Function, { props, children }: { props?: any[], children?: any }): IQCObjectsElement => {\n return _type({ props, children }) as IQCObjectsElement;\n};\nexport const _DOMCreateComplexElement = (_type: string | Function, props?: any[], children?: any): HTMLElement | IQCObjectsElement => {\n\n if (typeof _type !== \"string\") {\n return ComplexTypeCall(_type, { props, children });\n }\n const element = document.createElement(_type);\n\n if (props) {\n Object.entries(props).forEach(([key, value]) => {\n if (typeof value === \"string\" || typeof value === \"number\") {\n element.setAttribute(key, value.toString());\n } else if (typeof value === \"function\" && key.toLowerCase().startsWith(\"on\")) {\n element.addEventListener(key.slice(2).toLowerCase(), value.bind(element));\n }\n });\n }\n\n if (Array.isArray(children)) {\n children.filter((child => child instanceof Node)).forEach(child => {\n element.appendChild(child);\n });\n } else if (children instanceof Node) {\n element.appendChild(children);\n } else if (typeof children === \"string\") {\n element.innerHTML = children;\n }\n\n return element;\n};\n", "/**\n * Primary instance ID of all objects\n */\nexport var __instanceID = 0;\n\nexport const IncrementInstanceID = (): void => {\n __instanceID = (typeof __instanceID === \"undefined\" || __instanceID === null) ? (0) : (__instanceID + 1);\n};\n", "export const _protected_code_ = (_: any): void => {\n const __oldtoString = (typeof _.prototype !== \"undefined\") ? (_.prototype.toString) : (function () {\n return \"\";\n });\n if (typeof _.prototype !== \"undefined\") {\n _.prototype.toString = function (): string {\n const _protected_symbols = [\n \"__qcobjects__\",\n \"__qcobjects_sdk__\",\n \"__loaded__\",\n \"ComplexStorageCache\",\n \"css\",\n \"append\",\n \"attachIn\",\n \"debug\",\n \"info\",\n \"warn\",\n \"QC_Append\",\n \"set\",\n \"get\",\n \"done\",\n \"componentDone\",\n \"_new_\",\n \"__new__\",\n \"Class\",\n \"ClassFactory\",\n \"New\",\n \"Export\",\n \"Package\",\n \"Import\",\n \"subelements\",\n \"componentLoader\",\n \"buildComponents\",\n \"Controller\",\n \"View\",\n \"VO\",\n \"Service\",\n \"serviceLoader\",\n \"JSONService\",\n \"ConfigService\",\n \"SourceJS\",\n \"SourceCSS\",\n \"ArrayList\",\n \"ArrayCollection\",\n \"Effect\",\n \"Timer\",\n \"sum\",\n \"avg\",\n \"table\",\n \"max\",\n \"min\",\n \"range\",\n \"matrix\",\n \"matrix2d\",\n \"matrix3d\",\n \"unique\",\n \"uniqueId\",\n \"shortCode\",\n \"NamespaceRef\"\n ];\n let _ret_;\n if (_protected_symbols.includes(this.name)) {\n _ret_ = this.name + \"{ [QCObjects native code] }\";\n } else {\n _ret_ = __oldtoString.call(this);\n }\n return _ret_ as string;\n };\n }\n};\n(_protected_code_)(Function);\nexport const _methods_ = function (_: any): T[] {\n const _m = [];\n for (const i in _) {\n if ((typeof _[i]).toLowerCase() === \"function\") {\n _m.push(_[i]);\n }\n }\n return _m as T[];\n};\n", "import { __is_raw_class__ } from \"./is_raw_class\";\nimport {_QC_PACKAGES, set_QC_PACKAGE, __register_class__ } from \"./PrimaryCollections\";\n\n/**\n * Defines a package for Class classification\n *\n * @param {Object} namespace\n * @param {Object} classes\n */\nexport const Package = (namespace: string, classes: any[] = []): any[] => {\n\n if (Object.hasOwn(_QC_PACKAGES, namespace) &&\n typeof _QC_PACKAGES[namespace] !== \"undefined\" &&\n typeof _QC_PACKAGES[namespace] !== \"string\" &&\n Object.hasOwn(_QC_PACKAGES[namespace], \"length\") &&\n _QC_PACKAGES[namespace].length > 0 &&\n typeof classes !== \"undefined\" &&\n Object.hasOwn(classes, \"length\") &&\n classes.length > 0\n ) {\n classes.forEach((_class_: any) => {\n __register_class__(_class_, namespace);\n });\n set_QC_PACKAGE(namespace, _QC_PACKAGES[namespace].concat(classes));\n } else if (typeof classes !== \"undefined\"\n && typeof classes !== \"undefined\"\n && Object.hasOwn(classes, \"length\")\n && classes.length > 0) {\n classes.forEach((_class_: any) => {\n __register_class__(_class_, namespace);\n });\n set_QC_PACKAGE(namespace, classes);\n } else if (__is_raw_class__(classes)) {\n if (typeof (classes as any).__definition === \"undefined\") {\n (classes as any).__definition = {};\n }\n (classes as any).__definition.__namespace = namespace;\n (classes as any).__namespace = namespace;\n __register_class__(classes, namespace);\n set_QC_PACKAGE(namespace, [classes]);\n } else {\n throw new Error (`An error ocurred. It was not possible to add classes to ${namespace}.`);\n }\n return ((Object.hasOwn(_QC_PACKAGES, namespace)) ? (_QC_PACKAGES[namespace]) : []) as any[] | [];\n};\n", "import { type IInheritClass, type IQCObjectsElement, type TBody } from \"./types/global\";\nimport { logger } from \"./Logger\";\nimport { __instanceID, IncrementInstanceID } from \"./IncrementInstanceID\";\nimport { _CastProps, _Cast } from \"./Cast\";\nimport { _DOMCreateElement } from \"./DOMCreateElement\";\nimport { __getType__ } from \"./getType\";\nimport { _methods_ } from \"./introspection\";\nimport { is_a } from \"./is_a\";\nimport { isBrowser } from \"./platform\";\nimport { _QC_CLASSES } from \"./PrimaryCollections\";\nimport { Package } from \"./Package\";\n\nexport class InheritClass implements IInheritClass {\n [key: string]: any;\n __definition: any;\n private _body: TBody;\n public get body(): TBody {\n return this._body;\n }\n public set body(value: TBody) {\n this._body = value;\n }\n childs: any;\n __instanceID!: number;\n\n constructor(_o_?: any) {\n\n if (typeof _o_ !== \"undefined\" && typeof _o_.__definition !== \"undefined\") {\n this.__definition = {\n ...(_o_.__definition)\n };\n }\n\n const self: this = this;\n if (typeof _o_ !== \"undefined\" && _o_ !== null) {\n Object.keys(_o_)\n .filter(function (k) {\n return isNaN(k as any) && ![\"__instanceID\", \"__classType\", \"__definition\"].includes(k);\n })\n .forEach(function (key) {\n if (typeof self[key] === \"function\") {\n self[key] = _o_[key].bind(self);\n } else {\n self[key] = _o_[key];\n }\n });\n }\n\n IncrementInstanceID();\n if (!self.__instanceID) {\n Object.defineProperty(self, \"__instanceID\", {\n value: __instanceID,\n writable: false\n });\n }\n\n if (typeof self.__definition !== \"undefined\") {\n Object.keys(self.__definition).filter(function (k) {\n return isNaN(k as any) && ![\"name\", \"__instanceID\", \"__classType\", \"__definition\"].includes(k);\n }).forEach(function (key) {\n if (typeof self.__definition[key] === \"function\") {\n self[key] = self.__definition[key].bind(self);\n } else {\n self[key] = self.__definition[key];\n }\n });\n }\n _methods_((_QC_CLASSES as any)[self.__classType]).map(function (m): any {\n self[(m as Function).name] = (m as Function).bind(self);\n return m;\n });\n _methods_(self.__definition).map(function (m): any {\n self[(m as Function).name] = (m as Function).bind(self);\n return m;\n });\n\n if (self.body) {\n if (typeof self.__definition === \"undefined\" || (!Object.hasOwn(self.__definition, \"body\")) || typeof self.__definition.body === \"undefined\") {\n try {\n if (isBrowser) {\n self.body = _DOMCreateElement(self.__definition.__classType);\n } else {\n self.body = {};\n }\n } catch (e: any) {\n logger.debug(`An error ocurred: ${e}.`);\n self.body = {};\n }\n } else if (Object.hasOwn(self.__definition, \"body\")) {\n self.body = self.__definition.body;\n }\n }\n\n\n try {\n self.__new__.call(self, _o_);\n if (typeof self === \"object\" && Object.hasOwn(self, \"_new_\") && typeof (self._new_ as any).isCalled === \"undefined\") {\n try {\n self._new_(_o_);\n (self._new_ as any).isCalled = true;\n } catch (e: any) {\n logger.warn(`${self.__classType}._new_() failed with error: ${e}`);\n }\n }\n } catch (e: any) {\n logger.warn(e);\n }\n }\n\n static get __classType(): any {\n return (Object.getPrototypeOf(this.constructor) as Function).name;\n }\n\n get __classType(): string {\n return this.constructor.name;\n }\n\n\n static hierarchy(__class__: any): any[] {\n const __classType = function (o_c: any): any {\n return (Object.hasOwn(o_c, \"__classType\")) ? (o_c.__classType) : (__getType__.call(__class__, o_c));\n };\n const __hierarchy__proto__ = (c: any): any[] => {\n return (typeof c !== \"undefined\" && typeof c.__proto__ !== \"undefined\" && c.__proto__ !== null) ? (((__classType(c) !== \"\") ? ([__classType(c)]) : ([])).concat(__hierarchy__proto__(c.__proto__))) : ([]);\n };\n\n if (typeof __class__ === \"undefined\" || __class__ === null) {\n __class__ = this;\n }\n let __hierarchy = [];\n __hierarchy.push(__classType(__class__));\n __hierarchy = __hierarchy.concat(__hierarchy__proto__(__class__.__proto__));\n return __hierarchy;\n }\n\n\n __namespace?: string | undefined;\n\n __new__(_o_: any): void {\n _CastProps(_o_, this);\n }\n\n // eslint-disable-next-line no-unused-vars\n _new_(_o_?: any): void { }\n\n static getParentClass(): any {\n return Object.getPrototypeOf(this.prototype.constructor);\n }\n getParentClass(): any {\n return (this.constructor as typeof InheritClass).getParentClass();\n }\n\n\n static getClass(): any {\n return Object.getPrototypeOf(this.constructor);\n }\n\n getClass(): any {\n return (this.constructor as typeof InheritClass).getClass();\n }\n\n css(_css: any): any {\n if (typeof this.body !== \"undefined\" && typeof this?.body !== \"string\" && typeof (this?.body as HTMLElement)?.style !== \"undefined\") {\n logger.debug(\"body style\");\n if (this.body) {\n (this.body as any).style = _Cast(_css, (this?.body as HTMLElement)?.style);\n }\n }\n return (typeof this.body !== \"string\") ? (this?.body as HTMLElement)?.style : {};\n }\n\n hierarchy(): any {\n const __instance__ = this;\n return (this.constructor as typeof InheritClass).hierarchy(__instance__);\n }\n\n\n append(_child?: any): void {\n const child: any = _child || this.body;\n logger.debug(\"append: start\");\n if (is_a(child, \"Component\")) {\n logger.debug(\"append: child is a Component\");\n logger.debug(`appending the body of ${child.name}`);\n }\n if (typeof this.body !== \"undefined\") {\n logger.debug(\"append element\");\n if (arguments.length > 0) {\n logger.debug(\"append to element\");\n if (typeof this.body !== \"string\") {\n if (typeof (this.body as IQCObjectsElement)?.append !== \"undefined\") {\n (this?.body as IQCObjectsElement)?.append(child);\n } else {\n throw Error(\"body.append is undefined. That means the body is not well formed.\");\n }\n } else {\n this.append(child);\n }\n if (typeof this.childs === \"undefined\") {\n this.childs = [];\n }\n this.childs.push(child);\n } else {\n if (isBrowser) {\n logger.debug(\"append to body\");\n document.body.append(child);\n }\n }\n }\n }\n\n attachIn(tag: any): void {\n if (isBrowser) {\n const tags = (document as any).subelements(tag);\n for (let i = 0, j = tags.length; i < j; i++) {\n tags[i].append(this as any);\n }\n } else {\n throw new Error(\"attachIn not yet implemented for non browser platforms\");\n }\n }\n\n}\n\nPackage(\"com.qcobjects\", [InheritClass]);", "import { InheritClass } from \"./InheritClass\";\n\nexport const isQCObjects_Object = function (_:any):boolean {\n return (!!((typeof _ === \"object\" &&\n Object.hasOwn(_, \"__classType\") &&\n (!!_.__instanceID) &&\n Object.hasOwn(_, \"__definition\") &&\n typeof _.__definition !== \"undefined\"\n ))) || _ instanceof InheritClass;\n };\n\n export const isQCObjects_Class = function (_:any):boolean {\n return (!!((typeof _ === \"function\" &&\n (!_.__instanceID) &&\n (!!_.__definition) &&\n typeof _.__definition !== \"undefined\" &&\n !!_.__definition.__classType\n ))) || _.prototype instanceof InheritClass;\n };\n", "import { __getType__ } from \"./getType\";\nimport { isQCObjects_Class, isQCObjects_Object } from \"./isQCObjects\";\nimport { ObjectName } from \"./ObjectName\";\n\n/**\n * Returns if a class or object is from a determinated type\n * @param {Object} object\n * @param {String} typeName\n */\nexport const is_a = (obj: any, typeName: string):boolean => {\n return !!((typeof obj !== \"undefined\" && obj !== null &&\n (((isQCObjects_Class(obj) || isQCObjects_Object(obj)) && (obj.hierarchy().includes(typeName))) ||\n __getType__(obj) === typeName ||\n ObjectName(obj) === typeName ||\n typeof obj === typeName)));\n};", "/**\n * Internal use to determine the forbidden names for classes\n * Reserved words\n *\n * @param {String} name\n * @param {Object} type\n * @param {Object} definition\n */\nexport const __is__forbidden_name__ = (name: string):boolean => {\n return ([\"__proto__\", \"prototype\", \"Object\", \"Map\", \"defineProperty\", \"indexOf\", \"toString\", \"__instanceID\", \"function\", \"Function\"].indexOf(name) !== -1);\n};\n", "import { __is_raw_class__ } from \"./is_raw_class\";\n\nexport const _LegacyCopy = function (obj:any, _ignore?:string[]):any {\n let _value_;\n switch (true) {\n case typeof obj === \"string\":\n _value_ = obj;\n break;\n case typeof obj === \"number\":\n _value_ = obj;\n break;\n case typeof obj === \"object\":\n _value_ = [{...Object.keys(obj).filter(k => !_ignore?.includes(k))}]\n .map(k => {return {[k as never]:obj[k as never]}; })\n .reduce ((p, c) => Object.assign(p, c)) as any;\n break;\n case typeof obj === \"function\":\n _value_ = obj.bind({});\n break;\n case __is_raw_class__(obj):\n _value_ = class extends obj { };\n break;\n default:\n break;\n }\n return _value_;\n };\n", "import { _QC_CLASSES } from \"./PrimaryCollections\";\nimport { _Cast, _CastProps } from \"./Cast\";\nimport { _DOMCreateElement } from \"./DOMCreateElement\";\nimport { __getType__ } from \"./getType\";\nimport { __instanceID, IncrementInstanceID } from \"./IncrementInstanceID\";\nimport { _methods_ } from \"./introspection\";\nimport { is_a } from \"./is_a\";\nimport { __is__forbidden_name__ } from \"./is_forbidden_name\";\nimport { _LegacyCopy } from \"./LegacyCopy\";\nimport { logger } from \"./Logger\";\nimport { isBrowser } from \"./platform\";\nimport { IQCObjectsElement, TBody, TClass } from \"./types/global\";\nimport { InheritClass } from \"./InheritClass\";\nimport { _top } from \"./top\";\n\n/**\n * Creates new object class of another object\n *\n * @param {String} name\n * @param {Object} type\n * @param {Object} definition\n * \n * @example \n * Class (name, type, definition)\n * Class (name, type)\n * Class (name, definition)\n * Class ()\n * \n * \n * const MyClass = Class (\"MyComponent\", Component, {\n * name: \"one_component\",\n * method1 : () => {console.log (\"done\") }\n * })\n * const myClassInstance = new MyClass ({name: \"one_component\"})\n * \n * const MyClass = Class (\"MyService\",{\n * name: \"myservice\",\n * })\n * \n * const myClassInstance = new MyClass ({name: \"myservice\"})\n */\n\n\n\nexport const Class: TClass = (name?: string, _type?: unknown, _definition?: unknown): InheritClass => {\n const _types_ = {};\n let type: unknown, definition: unknown;\n\n switch (true) {\n case !name && !_type && !_definition:\n return class { } as unknown as InheritClass;\n case !!name && !_type && !_definition:\n type = class { };\n definition = {};\n break;\n case !!name && !_type && !!_definition:\n type = class { };\n definition = _definition;\n break;\n case !!name && !!_type && !!_definition:\n type = _type;\n definition = _definition;\n break;\n default:\n return class { } as unknown as InheritClass;\n }\n if (typeof name !== \"string\") {\n throw new Error(\"Class name must be a string\");\n }\n\n if (typeof type !== \"function\") {\n throw new Error(\"Class type must be a function or class\");\n }\n\n if (__is__forbidden_name__(name)) {\n throw new Error(`${name} is not an allowed word in the name of a class`);\n }\n\n if (typeof (type as any).__definition === \"object\"\n && (type as any).__definition\n && Object.keys((type as any).__definition).length !== 0) {\n (definition as any).__definition = Object.assign(_LegacyCopy((type as any).__definition,[\"name\"]), type);\n }\n\n (_types_ as any)[type.name] = type;\n\n if (typeof definition === \"undefined\" || definition === null) {\n definition = {};\n } else {\n definition = { ...definition };\n }\n\n /* hack to prevent duplicate __instanceID */\n if (typeof (definition as any).__instanceID !== \"undefined\") {\n delete (definition as any).__instanceID;\n }\n\n _QC_CLASSES[name] = class extends (_types_ as any)[type.name] {\n __instanceID!: number;\n __namespace?: string | undefined;\n __definition: any = {\n ...(definition as any)\n };\n childs: any;\n private _body: TBody;\n public get body(): TBody {\n return this._body;\n }\n public set body(value: TBody) {\n this._body = value;\n }\n\n static get __classType(): any {\n return (Object.getPrototypeOf(this.constructor) as Function).name;\n }\n\n get __classType(): string {\n return this.constructor.name;\n }\n\n static hierarchy(__class__: any): any[] {\n const __classType = function (o_c: any): any {\n return (Object.hasOwn(o_c, \"__classType\")) ? (o_c.__classType) : (__getType__.call(__class__, o_c));\n };\n const __hierarchy__proto__ = (c: any): any[] => {\n return (typeof c !== \"undefined\" && typeof c.__proto__ !== \"undefined\" && c.__proto__ !== null) ? (((__classType(c) !== \"\") ? ([__classType(c)]) : ([])).concat(__hierarchy__proto__(c.__proto__))) : ([]);\n };\n\n if (typeof __class__ === \"undefined\" || __class__ === null) {\n __class__ = this;\n }\n let __hierarchy = [];\n __hierarchy.push(__classType(__class__));\n __hierarchy = __hierarchy.concat(__hierarchy__proto__(__class__.__proto__));\n return __hierarchy;\n }\n\n static getParentClass(): any {\n return Object.getPrototypeOf(this.prototype.constructor);\n }\n\n constructor(_o_?: any) {\n super(_o_ || {});\n\n const self = this;\n IncrementInstanceID();\n if (!(self as any).__instanceID) {\n Object.defineProperty(self, \"__instanceID\", {\n value: __instanceID,\n writable: false\n });\n }\n\n if (typeof self.__definition !== \"undefined\") {\n Object.keys(self.__definition).filter(function (k) {\n return isNaN(k as any) && ![\"name\", \"__instanceID\", \"__classType\", \"__definition\"].includes(k);\n }).forEach(function (key) {\n if (typeof self.__definition[key] === \"function\") {\n self[key] = self.__definition[key].bind(self);\n } else {\n self[key] = self.__definition[key];\n }\n });\n }\n _methods_(_QC_CLASSES[self.__classType]).map(function (m: unknown): T {\n self[(m as Function).name] = (m as Function).bind(self);\n return m as T;\n });\n _methods_(self.__definition).map(function (m): any {\n self[(m as Function).name] = (m as Function).bind(self);\n return m;\n });\n\n if (self.body) {\n if (typeof self.__definition === \"undefined\" || (!Object.hasOwn(self.__definition, \"body\")) || typeof self.__definition.body === \"undefined\") {\n try {\n if (isBrowser) {\n self.body = _DOMCreateElement(self.__definition.__classType);\n } else {\n self.body = {};\n }\n } catch (e: any) {\n logger.debug(`An error ocurred: ${e}.`);\n self.body = {};\n }\n } else if (Object.hasOwn(self.__definition, \"body\")) {\n self.body = self.__definition.body;\n }\n }\n\n\n try {\n if (typeof self.__new__ === \"function\") {\n self.__new__.call(self, _o_);\n } else if (typeof super.__new__ === \"function\") {\n self.__new__ = super.__new__.bind(self);\n self.__new__.call(self, _o_);\n }\n if (typeof self === \"object\" && Object.hasOwn(self, \"_new_\") && typeof (self._new_ as any).isCalled === \"undefined\") {\n try {\n self._new_(_o_);\n (self._new_ as any).isCalled = true;\n } catch (e: any) {\n logger.warn(`${self.__classType}._new_() failed with error: ${e}`);\n }\n }\n } catch (e: any) {\n logger.warn(e);\n }\n }\n\n __new__(_o_: any) {\n _CastProps(_o_, this);\n }\n\n // eslint-disable-next-line no-unused-vars\n _new_(_o_?: any) { }\n\n getClass(): any {\n return Object.getPrototypeOf(this.constructor);\n }\n\n css(_css: any): any {\n if (typeof this.body !== \"undefined\" && typeof this?.body !== \"string\" && typeof (this?.body as HTMLElement)?.style !== \"undefined\") {\n logger.debug(\"body style\");\n if (this.body) {\n (this.body as any).style = _Cast(_css, (this?.body as HTMLElement)?.style);\n }\n }\n return (typeof this.body !== \"string\") ? (this?.body as HTMLElement)?.style : {};\n }\n\n hierarchy(): any {\n const __instance__ = this;\n return this.getClass()?.hierarchy(__instance__);\n }\n\n\n append(_child?: any) {\n const child: any = _child || this.body;\n logger.debug(\"append: start\");\n if (is_a(child, \"Component\")) {\n logger.debug(\"append: child is a Component\");\n logger.debug(`appending the body of ${child.name}`);\n }\n if (typeof this.body !== \"undefined\") {\n logger.debug(\"append element\");\n if (arguments.length > 0) {\n logger.debug(\"append to element\");\n if (typeof this.body !== \"string\") {\n if (typeof (this.body as IQCObjectsElement)?.append !== \"undefined\") {\n (this?.body as IQCObjectsElement)?.append(child);\n } else {\n throw Error(\"body.append is undefined. That means the body is not well formed.\");\n }\n } else {\n this.append(child);\n }\n if (typeof this.childs === \"undefined\") {\n this.childs = [];\n }\n this.childs.push(child);\n } else {\n if (isBrowser) {\n logger.debug(\"append to body\");\n document.body.append(child);\n }\n }\n }\n }\n\n attachIn(tag: any) {\n if (isBrowser) {\n const tags = (document as any).subelements(tag);\n for (let i = 0, j = tags.length; i < j; i++) {\n tags[i].append(this as any);\n }\n } else {\n throw new Error(\"attachIn not yet implemented for non browser platforms\");\n }\n }\n\n };\n\n // remove the keys from definition that exist in the prototype\n\n _QC_CLASSES[name] = _CastProps(definition, _QC_CLASSES[name]);\n _QC_CLASSES[name].__definition = definition;\n _QC_CLASSES[name].__definition.__classType = name;\n\n (_top as any)[name] = _QC_CLASSES[name];\n\n return _QC_CLASSES[name] as InheritClass;\n};\nif (typeof Class.prototype !== \"undefined\") {\n Class.prototype.toString = function () {\n return \"Class(name, type, definition) { [QCObjects native code] }\";\n };\n}\n\n", "/**\n * Returns the QCObjects Class Factory of a given ClassName\n *\n * @param {String} name\n */\n\nimport { __is_raw_class__ } from \"./is_raw_class\";\nimport { _QC_CLASSES, _QC_PACKAGES, get_QC_CLASS } from \"./PrimaryCollections\";\nimport { TClassFactory } from \"./types/global\";\n\nexport const ClassFactory:TClassFactory = (className:string):any => {\n let _classFactory;\n if (typeof className === \"undefined\" || className === null) {\n throw Error (\"You need to pass a parameter {className}\");\n }\n if (className !== null && className.indexOf(\".\") !== -1) {\n const packageName = className.split(\".\").slice(0, className.split(\".\").length - 1).join(\".\");\n const _className = className.split(\".\").slice(-1).join(\"\");\n const _package = _QC_PACKAGES[packageName] || [];\n const packageClasses = _package.filter((classFactory:any) => {\n return (__is_raw_class__(classFactory));\n }).reverse();\n if (packageClasses.length > 0) {\n _classFactory = packageClasses[0];\n } else {\n throw Error(`Class ${_className} not found. Found classes: ${JSON.stringify(packageClasses)} in package ${packageName}`);\n }\n } else if (className !== null) {\n _classFactory = get_QC_CLASS(className);\n if (typeof _classFactory === \"undefined\"){\n throw new Error (`${className} is undefined.`); \n }\n } else {\n throw Error(`className is null. Unable to retrieve the class factory.\\n Not found in: \\n ${Object.keys(_QC_CLASSES).join(\"\\n\")}`);\n }\n return _classFactory;\n};\n", "export class Base64 {\n static _keyStr: string = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\n static encode(e: string): string {\n let t = \"\";\n let n: number, r: number, i: number, s: number, o: number, u: number, a: number;\n let f = 0;\n e = Base64._utf8_encode(e);\n while (f < e.length) {\n n = e.charCodeAt(f++);\n r = e.charCodeAt(f++);\n i = e.charCodeAt(f++);\n s = n >> 2;\n o = (n & 3) << 4 | r >> 4;\n u = (r & 15) << 2 | i >> 6;\n a = i & 63;\n if (isNaN(r)) {\n u = a = 64;\n } else if (isNaN(i)) {\n a = 64;\n }\n t = t + this._keyStr.charAt(s) + this._keyStr.charAt(o) + this._keyStr.charAt(u) + this._keyStr.charAt(a);\n }\n return t;\n }\n static decode(e: string): string {\n let t = \"\";\n let n: number, r: number, i: number;\n let s: number, o: number, u: number, a: number;\n let f = 0;\n e = e.replace(/[^A-Za-z0-9+/=]/g, \"\");\n while (f < e.length) {\n s = this._keyStr.indexOf(e.charAt(f++));\n o = this._keyStr.indexOf(e.charAt(f++));\n u = this._keyStr.indexOf(e.charAt(f++));\n a = this._keyStr.indexOf(e.charAt(f++));\n n = s << 2 | o >> 4;\n r = (o & 15) << 4 | u >> 2;\n i = (u & 3) << 6 | a;\n t = t + String.fromCharCode(n);\n if (u !== 64) {\n t = t + String.fromCharCode(r);\n }\n if (a !== 64) {\n t = t + String.fromCharCode(i);\n }\n }\n t = Base64._utf8_decode(t);\n return t;\n }\n static _utf8_encode(e: string): string {\n e = e.replace(/rn/g, \"n\");\n let t = \"\";\n for (let n = 0; n < e.length; n++) {\n const r = e.charCodeAt(n);\n if (r < 128) {\n t += String.fromCharCode(r);\n } else if (r > 127 && r < 2048) {\n t += String.fromCharCode(r >> 6 | 192);\n t += String.fromCharCode(r & 63 | 128);\n } else {\n t += String.fromCharCode(r >> 12 | 224);\n t += String.fromCharCode(r >> 6 & 63 | 128);\n t += String.fromCharCode(r & 63 | 128);\n }\n }\n return t;\n }\n static _utf8_decode(e: string): string {\n let t = \"\";\n let n = 0;\n let r = 0;\n let c2 = 0;\n let c3: number;\n while (n < e.length) {\n r = e.charCodeAt(n);\n if (r < 128) {\n t += String.fromCharCode(r);\n n++;\n } else if (r > 191 && r < 224) {\n c2 = e.charCodeAt(n + 1);\n t += String.fromCharCode((r & 31) << 6 | c2 & 63);\n n += 2;\n } else {\n c2 = e.charCodeAt(n + 1);\n c3 = e.charCodeAt(n + 2);\n t += String.fromCharCode((r & 15) << 12 | (c2 & 63) << 6 | c3 & 63);\n n += 3;\n }\n }\n return t;\n }\n};", "import { isBrowser } from \"./platform\";\nimport process from \"node:process\";\n\nexport var _basePath_:string = (\n function ():string {\n let _basePath:string = \"\";\n if (isBrowser) {\n const baseURI:string[] = document.baseURI.split(\"?\")[0].split(\"/\");\n baseURI.pop();\n _basePath = baseURI.join(\"/\") + \"/\";\n } else {\n if (typeof process !== \"undefined\") {\n _basePath = `${(process).cwd()}/`;\n } else {\n _basePath = \"\";\n }\n }\n return _basePath;\n }\n )();\n\nexport const setBasePath = (value:string):void => { _basePath_ = value;};", "import { _LegacyCopy } from \"./LegacyCopy\";\n\nexport const _DataStringify = (data: any): string => {\n const getCircularReplacer = function () {\n const seen = new WeakSet();\n let _level = 0;\n return function (key: string, value: any): any {\n if (typeof value === \"object\" && value !== null) {\n if (seen.has(value)) {\n _level += 1;\n return (_level <= 3) ? (_LegacyCopy(value)) : (null);\n }\n seen.add(value);\n }\n return value;\n };\n };\n return JSON.stringify(data, getCircularReplacer());\n};\n", "export const _domain_:string = (typeof location !== \"undefined\" && location.hostname !== \"\") ? (location.hostname) : (\"localhost\");\n", " /**\n * Creates an object from a Class definition\n *\n * @param {QC_Object} o\n * @param {Object} args\n */\n\n export const New = function (__class__:any, args = {}):any {\n args = (arguments.length > 1) ? (args) : ({});\n return (typeof __class__ === \"undefined\") ? (new Object()) : (new __class__(args));\n };\n \n New.prototype.toString = function () {\n return \"New(QCObjectsClassName, args) { [QCObjects native code] }\";\n };", "import { isBrowser } from \"./platform\";\n\nexport const _secretKey:string = (isBrowser)?(location.host):(\"secret\");", "import { _ICrypt } from \"./types/global\";\nimport { Base64 } from \"./Base64\";\nimport { _DataStringify } from \"./DataStringify\";\nimport { InheritClass } from \"./InheritClass\";\nimport { Package } from \"./Package\";\nimport { _secretKey } from \"./secretKey\";\n\n\nexport class _Crypt extends InheritClass implements _ICrypt {\n string: string = \"\";\n key: string = \"\";\n // eslint-disable-next-line no-unused-vars\n encrypt(_string_: string, key: string): string {\n throw new Error(\"Method not implemented.\");\n }\n // eslint-disable-next-line no-unused-vars\n decrypt(_string_: string, key: string): string {\n throw new Error(\"Method not implemented.\");\n }\n last_string = \"\";\n last_key = \"\";\n construct = false;\n _new_(o: { string?: string; key: string; }):void {\n const string = o.string;\n let key: string = (Object.hasOwn(o, \"key\")) ? (o.key) : (\"\");\n this.__new__(o);\n key = (key === \"\") ? (this.__instanceID.toString()) : (key);\n this.last_key = key;\n this.last_string = string as string;\n this.construct = true;\n }\n _encrypt(): string {\n const string = this.string;\n const key = this.key;\n let result = \"\";\n let char;\n let keychar;\n for (let i = 0; i < string.length; i++) {\n char = string.substr(i, 1);\n keychar = key.substr((i % key.length) - 1, 1);\n char = String.fromCharCode(char.charCodeAt(0) + keychar.charCodeAt(0));\n result += char;\n }\n this.last_string = Base64.encode(result);\n return this.last_string;\n }\n _decrypt(): string {\n let string = this.string;\n const key = this.key;\n let result = \"\";\n let char;\n let keychar;\n string = Base64.decode(string);\n for (let i = 0; i < string.length; i++) {\n char = string.substr(i, 1);\n keychar = key.substr((i % key.length) - 1, 1);\n char = String.fromCharCode(char.charCodeAt(0) - keychar.charCodeAt(0));\n result += char;\n }\n\n this.last_string = result;\n return this.last_string;\n }\n static encrypt(string: string, key: string): string {\n const crypt = new _Crypt({\n string,\n key: (key !== \"\") ? (key) : (\"12345678ABC\")\n });\n return crypt._encrypt();\n }\n static decrypt(string: string, key: string):string {\n const crypt = new _Crypt({\n string,\n key: (key !== \"\") ? (key) : (\"12345678ABC\")\n });\n return crypt._decrypt();\n }\n}\n\nexport const _CryptObject = function (o: any): string {\n return _Crypt.encrypt(_DataStringify(o), _secretKey);\n};\nexport const _DecryptObject = function (s: string): any {\n return (s === \"\") ? ({}) : (JSON.parse(_Crypt.decrypt(s, _secretKey)));\n};\n\nPackage(\"com.qcobjects\", [_Crypt]);", "import { _basePath_ } from \"./basePath\";\nimport { InheritClass } from \"./InheritClass\";\nimport { Package } from \"./Package\";\n\ntype TConfigSettings = {\n [key: string]: any,\n relativeImportPath:string,\n remoteImportsPath:string,\n remoteSDKPath:string,\n asynchronousImportsLoad:boolean,\n removePackageScriptAfterLoading:boolean,\n componentsBasePath:string,\n delayForReady:number,\n preserveComponentBodyTag:false,\n useConfigService:false,\n routingWay:string,\n useSDK:boolean,\n useLocalSDK:boolean,\n basePath:string\n};\n\n\nexport class ConfigSettings extends InheritClass {\n public _CONFIG: TConfigSettings = {\n \"relativeImportPath\": \"\",\n \"remoteImportsPath\": \"\",\n \"remoteSDKPath\": \"https://sdk.qcobjects.dev/\",\n \"asynchronousImportsLoad\": false,\n \"removePackageScriptAfterLoading\": true,\n \"componentsBasePath\": \"\",\n \"delayForReady\": 0,\n \"preserveComponentBodyTag\": false,\n \"useConfigService\": false,\n \"routingWay\": \"hash\",\n \"useSDK\": true,\n \"useLocalSDK\": false,\n \"basePath\": _basePath_\n };\n protected static _instance: ConfigSettings;\n public _CONFIG_ENC = \"\";\n\n set(name:string, value:any):void {\n this._CONFIG[name] = value;\n }\n\n get(name:string, _defaultValue?:any):any {\n return this._CONFIG[name] || _defaultValue;\n }\n\n static get instance():ConfigSettings {\n\n if (typeof ConfigSettings._instance === \"undefined\") {\n ConfigSettings._instance = new ConfigSettings();\n }\n\n return ConfigSettings._instance;\n }\n\n\n}\n\nPackage(\"com.qcobjects\", [ConfigSettings]);\n", "import { setBasePath } from \"./basePath\";\nimport { _CastProps } from \"./Cast\";\nimport { _Crypt, _CryptObject, _DecryptObject } from \"./Crypt\";\nimport { _DataStringify } from \"./DataStringify\";\nimport { logger } from \"./Logger\";\nimport { GlobalProcessor as Processor } from \"./Processor\";\nimport { _secretKey } from \"./secretKey\";\nimport { Package } from \"./Package\";\nimport { InheritClass } from \"./InheritClass\";\nimport { ICONFIG } from \"./types/global\";\nimport { ConfigSettings } from \"./ConfigSettings\";\n\n\nexport class CONFIG extends InheritClass implements ICONFIG {\n\n get _CONFIG_ENC(): string {\n return ConfigSettings.instance._CONFIG_ENC;\n }\n\n get _CONFIG(): unknown {\n return ConfigSettings.instance._CONFIG as unknown;\n }\n\n set(name: string, value: unknown):void {\n logger.debug(`CONFIG.set ${name}: ${value as string}`);\n // hack to force update basePath from CONFIG\n if (name === \"basePath\") {\n setBasePath(value as string);\n }\n let _conf;\n try {\n _conf = (\n function (config): any {\n if (config._CONFIG_ENC === null) {\n config._CONFIG_ENC = _Crypt.encrypt(_DataStringify({}), _secretKey);\n }\n const _protectedEnc = config._CONFIG_ENC.valueOf();\n const _protectedConf = config._CONFIG?.valueOf();\n return _CastProps(_protectedConf, _DecryptObject(_protectedEnc));\n }\n )(ConfigSettings.instance);\n } catch (e) {\n _conf = {};\n console.error(e);\n logger.debug(\"failed to encrypt config\");\n }\n\n _conf[name] = value;\n ConfigSettings.instance._CONFIG_ENC = _CryptObject(_conf);\n ConfigSettings.instance.set(name, value);\n }\n\n get(name: string, _default?: unknown): any {\n let _value;\n try {\n const _conf = (\n function (config): any {\n if (config._CONFIG_ENC === null) {\n config._CONFIG_ENC = _Crypt.encrypt(_DataStringify({}), _secretKey);\n }\n const _protectedEnc = config._CONFIG_ENC.valueOf();\n const _protectedConf = config._CONFIG.valueOf();\n return _CastProps(_protectedConf, _DecryptObject(_protectedEnc));\n }\n )(ConfigSettings.instance);\n if (typeof _conf[name] !== \"undefined\") {\n _value = _conf[name];\n }\n } catch (e) {\n console.error(e);\n logger.debug(\"Something wrong when trying to get CONFIG values\");\n logger.debug(\"No config value for: \" + name);\n _value = _default;\n }\n return Processor.processObject(_value) || _default;\n }\n\n private static _instance:CONFIG;\n static get instance ():CONFIG {\n if (typeof CONFIG._instance === \"undefined\") {\n CONFIG._instance = new CONFIG();\n }\n return CONFIG._instance;\n }\n\n static set(name: string, value: unknown):void {\n (CONFIG.instance.set(name, value));\n }\n static get(name: string, value?: unknown): any {\n return (CONFIG.instance.get(name, value));\n }\n\n}\n\n\nPackage(\"com.qcobjects\", [CONFIG]);", "import { type IComponent, type IProcessor } from \"./types/global\";\nimport { CONFIG } from \"./CONFIG\";\nimport { InheritClass } from \"./InheritClass\";\nimport { New } from \"./New\";\nimport { _top } from \"./top\";\nimport { Component } from \"./Component\";\nimport { Package } from \"./Package\";\n\nexport class Processor extends InheritClass implements IProcessor {\n protected static _instance: IProcessor | undefined;\n constructor({ component, processors }: { component: IComponent | null, processors?: any }) {\n super({ component });\n if (typeof processors !== \"undefined\") {\n this.processors = Object.assign(processors, Processor.instance.processors);\n }\n }\n\n processors: any = {\n \"config\"(component: Component, arg: string): string {\n return CONFIG.get(arg, \"\") as string;\n },\n \"ENV\"(component: Component, arg: string): string {\n return (typeof process !== \"undefined\") ? (process.env[arg] as string) : (\"\");\n },\n \"global\"(component: Component, arg: string): string {\n return (typeof _top !== \"undefined\") ? ((_top as any)[arg] as string) : (\"\");\n }\n };\n\n static get instance(): IProcessor {\n if (typeof Processor._instance === \"undefined\") {\n Processor._instance = new Processor({ component: null });\n }\n return Processor._instance;\n }\n\n setProcessor(_proc_: Function):void {\n if (typeof _proc_ === \"function\" && _proc_.name !== \"\") {\n this.processors[_proc_.name] = _proc_;\n }\n }\n\n component!: IComponent | null;\n\n\n execute(component: IComponent, processorName: string, args: string): string {\n const processorHandler = (typeof component !== \"undefined\" && component !== null) ? (component.processorHandler) : (this);\n return processorHandler?.processors[processorName].bind(processorHandler).apply(processorHandler, [component, args?.split(\",\")]) as string;\n }\n\n process(template: string, component: IComponent | null = null):string {\n const processorHandler = (component !== null) ? (component.processorHandler) : (New(Processor, { component: null }));\n if (typeof template === \"string\") {\n Object.keys(processorHandler.processors).map((funcName) => {\n return [...template.matchAll(new RegExp(\"\\\\$\" + funcName + \"\\\\((.*)\\\\).*\", \"g\"))].map(\n function (procesorMatch) {\n const match0 = `$${funcName}(${procesorMatch[1]})`;\n template = template.replace(match0, processorHandler.execute.bind(processorHandler).call(processorHandler, component, funcName, procesorMatch[1]));\n return procesorMatch;\n }\n );\n });\n }\n return template;\n }\n\n processObject(obj: any, component: IComponent | null = null): any {\n let __instance__: IProcessor | undefined = (component === null) ? (this) : (component.processorHandler);\n if (typeof __instance__ === \"undefined\") {\n __instance__ = new Processor({ component });\n }\n if (typeof obj === \"object\") {\n Object.keys(obj).map(\n (_k) => {\n if (typeof obj[_k] === \"object\" && !Object.hasOwn(obj[_k], \"call\")) {\n obj[_k] = __instance__?.processObject.bind(__instance__)(obj[_k], component as IComponent);\n } else if (typeof obj[_k] === \"string\") {\n obj[_k] = __instance__?.process.bind(__instance__)(obj[_k], component as IComponent);\n }\n return _k;\n }\n );\n } else if (typeof obj === \"string\") {\n obj = __instance__.process.bind(__instance__)(obj, component as IComponent);\n }\n return obj;\n }\n\n}\n\nexport const GlobalProcessor: IProcessor = Processor.instance;\n\nPackage(\"com.qcobjects\", [Processor]);", "import { TComponentRouting } from \"./types/global\";\n\nexport const __routing_params__ = (routing:TComponentRouting, routingPath:string):object => {\n const standardRoutingPath = routing.path.replace(/{(.*?)}/g, \"(?<$1>.*)\"); // allowing {param}\n return {\n ...[...routingPath.matchAll((new RegExp(standardRoutingPath, \"g\")))][0].groups\n };\n};\n\nexport const __valid_routings__ = function (routings:TComponentRouting[], routingPath:string):TComponentRouting[] {\n return routings.filter(function (routing) {\n const standardRoutingPath = routing.path.replace(/{(.*?)}/g, \"(?<$1>.*)\");\n return (new RegExp(standardRoutingPath, \"g\")).test(routingPath);\n }).reverse();\n};\nexport const __valid_routing_way__ = (validRoutingWays:string[], routingWay:string):boolean => {\n return validRoutingWays.includes(routingWay);\n};\n", "import { TAsyncLoadCallback } from \"./types/global\";\nimport { Export } from \"./Export\";\nimport { isBrowser } from \"./platform\";\nimport { _top } from \"./top\";\n\nexport const _asyncLoad:any[] = [];\nexport function asyncLoad(callback: TAsyncLoadCallback, args?: any[]): any {\n\n class AsyncCallback {\n func:TAsyncLoadCallback;\n args?:any[];\n constructor(callback: TAsyncLoadCallback, args: any[] = []) {\n this.func = callback;\n this.args = args;\n } \n dispatch() {\n ((this as AsyncCallback).func as Function).apply(this, ...args as [], this);\n }\n }\n _asyncLoad.push((new AsyncCallback(callback, args)) as unknown as never);\n return AsyncCallback;\n}\n\nexport const _fireAsyncLoad = ():void => {\n if (isBrowser){\n document.addEventListener(\"readystatechange\", () => {\n if (document.readyState === \"complete\") {\n // eslint-disable-next-line array-callback-return\n _asyncLoad.map(function (fc) {\n (fc).dispatch.call(fc);\n });\n }\n });\n } else if (typeof _top.global !== \"undefined\") {\n // eslint-disable-next-line array-callback-return\n _asyncLoad.map(function (fc) {\n (fc).dispatch.call(fc);\n });\n }\n };\n\nExport(asyncLoad);", "import { Base64 } from \"./Base64\";\nimport { _DataStringify } from \"./DataStringify\";\nimport { logger } from \"./Logger\";\n\nexport class ComplexStorageCache {\n\n constructor(params: { index: any; load: any; alternate: any; }) {\n let load, alternate;\n const object = params.index;\n if (typeof object !== \"undefined\") {\n load = params.load;\n alternate = params.alternate;\n const cachedObjectID = this.getID(object);\n const cachedResponse = localStorage.getItem(cachedObjectID as string);\n if (this.isEmpty(cachedResponse)) {\n const cachedNewResponse = load.call(null, {\n cachedObjectID,\n cachedResponse,\n \"cache\": this\n });\n this.save(object, cachedNewResponse);\n logger.debug(\"RESPONSE OF {{cachedObjectID}} CACHED\".replace(\"{{cachedObjectID}}\", cachedObjectID as string));\n } else {\n alternate.call(null, {\n cachedObjectID,\n cachedResponse,\n \"cache\": this\n });\n logger.debug(\"RESPONSE OF {{cachedObjectID}} IS ALREADY CACHED \".replace(\"{{cachedObjectID}}\", cachedObjectID as string));\n }\n\n } else {\n throw new Error(\"ComplexStorageCache: index is undefined\");\n }\n return this;\n }\n\n getItem(cachedObjectID: string):any {\n const retrievedObject = localStorage.getItem(cachedObjectID);\n if (!this.isEmpty(retrievedObject)) {\n return JSON.parse(retrievedObject as string);\n } else {\n return null;\n }\n }\n\n\n setItem(cachedObjectID: string, value: any):void {\n localStorage.setItem(cachedObjectID, _DataStringify(value));\n }\n\n isEmpty(object: string | number | null):boolean {\n let r = false;\n switch (true) {\n case (typeof object === \"undefined\"):\n case (typeof object === \"string\" && object === \"\"):\n case (typeof object === \"string\" && object === \"undefined\"):\n case (typeof object === \"number\" && object === 0):\n case (object === null):\n r = true;\n break;\n default:\n r = false;\n }\n return r;\n }\n\n\n getID(object: any):string|undefined {\n let cachedObjectID;\n if (typeof object !== \"undefined\") {\n cachedObjectID = \"cachedObject_\" + Base64.encode(_DataStringify(object).replace(/\\{|\\}|,/g, \"_\"));\n }\n return cachedObjectID;\n }\n\n save(object: any, cachedNewResponse: any):void {\n const cachedObjectID = this.getID(object);\n logger.debug(\"CACHING THE RESPONSE OF {{cachedObjectID}} \".replace(\"{{cachedObjectID}}\", cachedObjectID as string));\n this.setItem(cachedObjectID as string, cachedNewResponse);\n }\n\n getCached(object: any):any {\n const cachedObjectID = this.getID(object);\n return this.getItem(cachedObjectID as string);\n }\n\n clear():void {\n Object.keys(localStorage).filter(function (k) {\n return k.startsWith(\"cachedObject_\");\n }).map(function (c):any {\n localStorage.removeItem(c);\n return c;\n });\n }\n\n}\n", "import { IService, TCacheController } from \"./types/global\";\nimport { asyncLoad } from \"./asyncLoad\";\nimport { ComplexStorageCache } from \"./ComplexStorageCache\";\nimport { _DataStringify } from \"./DataStringify\";\nimport { logger } from \"./Logger\";\nimport { _require_, isBrowser } from \"./platform\";\nimport { _top } from \"./top\";\n\n/**\n * Loads a simple component from a template\n *\n * @author: Jean Machuca \n * @param service a Service object\n */\nexport const serviceLoader = function (service:IService, _async = false):Promise|undefined {\n const _serviceLoaderInBrowser = function (service:IService):Promise {\n var _promise = new Promise(\n function (resolve, reject) {\n\n logger.debug(\"LOADING SERVICE DATA {{DATA}} FROM {{URL}}\".replace(\"{{DATA}}\", _DataStringify(service.data)).replace(\"{{URL}}\", service.url));\n const xhr = new XMLHttpRequest();\n xhr.withCredentials = service.withCredentials;\n const xhrasync = true; // always async because xhr sync is deprecated\n xhr.open(service.method, service.url, xhrasync);\n for (const header in service.headers) {\n try {\n if (typeof service.headers[header] !== \"function\") {\n xhr.setRequestHeader(header, service.headers[header]);\n }\n } catch (e:any) {\n logger.debug(\"Something went wrong when assign the header \" + header);\n logger.debug(`An error ocurred: ${e}`);\n }\n }\n xhr.onload = function () {\n if (xhr.status === 200) {\n const response = xhr.responseText;\n logger.debug(\"Data received {{DATA}}\".replace(\"{{DATA}}\", _DataStringify(response)));\n logger.debug(\"CREATING SERVICE {{NAME}}\".replace(\"{{NAME}}\", service.name));\n service.template = response;\n if (service.cached && (typeof cache !== \"undefined\")) {\n cache.save(service.name, service.template);\n }\n if (typeof service.done === \"function\") {\n var standardResponse = {\n \"request\": xhr,\n service\n };\n service.done.call(service, standardResponse);\n resolve.call(_promise, standardResponse);\n }\n } else {\n if (typeof service.fail === \"function\") {\n var standardResponse = {\n \"request\": xhr,\n service\n };\n service.fail.call(service, standardResponse);\n reject.call(_promise, standardResponse);\n }\n }\n };\n\n const _directLoad = function () {\n logger.debug(\"SENDING THE NORMAL REQUEST \");\n try {\n xhr.send(_DataStringify(service.data));\n } catch (e:any) {\n logger.debug(\"SOMETHING WRONG WITH REQUEST \");\n logger.debug(`An error ocurred: ${e}`);\n reject.call(_promise, {\n request: xhr,\n service\n });\n }\n };\n\n if (service.cached) {\n var cache = new ComplexStorageCache({\n index: service.data,\n load() {\n _directLoad.call(this);\n },\n alternate(cacheController:TCacheController) {\n if (service.method === \"GET\") {\n service.template = cacheController.cache.getCached(service.name);\n if (typeof service.done === \"function\") {\n const standardResponse = {\n \"request\": xhr,\n service\n };\n service.done.call(service, standardResponse);\n resolve.call(_promise, standardResponse);\n }\n } else {\n _directLoad();\n }\n \n }\n });\n (_top as any).lastCache = cache;\n } else {\n _directLoad();\n }\n\n return xhr;\n }\n );\n return _promise;\n };\n\n const _serviceLoaderInNode = function (service:IService) {\n var _promise = new Promise(\n function (resolve, reject) {\n if (typeof URL === \"undefined\") {\n global.URL = (_require_(\"url\")).URL;\n // eslint-disable-next-line no-unused-vars\n const URL = global.URL;\n }\n const serviceURL = new URL(service.url);\n var req;\n service.useHTTP2 = Object.hasOwn(service, \"useHTTP2\") && service.useHTTP2;\n\n\n const captureEvents = function (req:any) {\n logger.debug(\"LOADING SERVICE DATA (non-browser) {{DATA}} FROM {{URL}}\".replace(\"{{DATA}}\", _DataStringify(service.data)).replace(\"{{URL}}\", service.url));\n let dataXML:any;\n const standardResponse = {\n \"http2Client\": client,\n \"request\": req,\n service,\n \"responseHeaders\": null\n };\n\n if (typeof service.data === \"object\" && service.data !== null) {\n if (service.useHTTP2) {\n try {\n logger.debug(\"Sending data...\");\n const buffer = new Buffer(_DataStringify(service.data));\n req.write(buffer);\n } catch (e:any) {\n logger.debug(\"It was not possible to send any data\");\n logger.debug(`An error ocurred: ${e}`);\n }\n }\n }\n\n dataXML = \"\";\n req.on(\"response\", (responseHeaders:any) => {\n logger.debug(\"receiving response...\");\n standardResponse.responseHeaders = responseHeaders;\n /*\n for (const name in responseHeaders) {\n logger.debug(`${name}: ${responseHeaders[name]}`);\n }\n */\n dataXML = \"\";\n });\n req.on(\"data\", (chunk:any) => {\n logger.debug(\"receiving data...\");\n // do something with the data\n dataXML += \"\" + chunk.toString();\n service.template = dataXML;\n });\n if (service.useHTTP2) {\n req.resume();\n }\n req.on(\"end\", () => {\n logger.debug(\"ending call...\");\n service.template = dataXML;\n if (Object.hasOwn(service, \"useHTTP2\") && service.useHTTP2) {\n client.destroy();\n } else {\n req.destroy();\n }\n service.done.call(service, standardResponse);\n resolve.call(_promise, standardResponse);\n });\n if (service.useHTTP2) {\n req.end();\n }\n\n };\n\n try {\n let requestOptions;\n if (service.useHTTP2) {\n logger.debug(\"using http2\");\n const http2 = _require_(\"http2\");\n var client = (http2).connect(serviceURL.origin);\n requestOptions = Object.assign({\n \":method\": service.method,\n \":path\": serviceURL.pathname\n }, service.options);\n requestOptions = Object.assign(requestOptions, service.headers);\n req = client.request(requestOptions);\n req.setEncoding(\"utf8\");\n captureEvents(req);\n } else {\n if (serviceURL.protocol === \"http:\") {\n const http = _require_(\"http\");\n const request = (http).request;\n requestOptions = Object.assign({\n \"url\": service.url,\n headers: service.headers\n }, service.options);\n req = request(service.url);\n captureEvents(req);\n } else if (serviceURL.protocol === \"https:\") {\n const https = _require_(\"https\");\n requestOptions = Object.assign({\n hostname: serviceURL.hostname,\n port: serviceURL.port,\n path: serviceURL.pathname,\n method: service.method,\n headers: service.headers\n }, service.options);\n const _req_ = (https).request(requestOptions, function (req:any) {\n captureEvents(req);\n });\n _req_.end();\n } else {\n const e = \"Protocol not supported: \" + serviceURL.protocol;\n logger.debug(e);\n throw new Error(e);\n }\n }\n\n\n } catch (e:any) {\n logger.debug(e);\n service.fail.call(service, e);\n reject.call(_promise, e);\n\n }\n }).catch( (e:any) => {\n logger.debug(`Something happened when trying to call the service: ${service.name}. Error: ${e}`);\n service.fail.call(service, e);\n });\n return _promise;\n\n };\n\n const _serviceLoaderMockup = function (service:IService) {\n var _promise = new Promise(\n function (resolve) {\n logger.debug(`Calling mockup service ${service.name} ...`);\n const standardResponse = {\n \"request\": null,\n service,\n \"responseHeaders\": service.responseHeaders\n };\n if (typeof service.mockup === \"function\") {\n service.mockup.call(service, standardResponse);\n } else {\n service.done.call(service, standardResponse);\n }\n resolve.call(_promise, standardResponse);\n });\n return _promise;\n };\n const _serviceLoaderLocal = function (service:IService) {\n var _promise = new Promise(\n function (resolve) {\n logger.debug(`Calling local service ${service.name} ...`);\n const standardResponse = {\n \"request\": null,\n service,\n \"responseHeaders\": service.responseHeaders\n };\n if (typeof service.local === \"function\") {\n service.local.call(service, standardResponse);\n } else {\n service.done.call(service, standardResponse);\n }\n resolve.call(_promise, standardResponse);\n });\n return _promise;\n };\n\n let _ret_: Promise;\n switch (service.kind) {\n case \"rest\":\n if (isBrowser) {\n if (typeof _async !== \"undefined\" && _async) {\n _ret_ = asyncLoad(_serviceLoaderInBrowser, [service, _async]);\n } else {\n _ret_ = _serviceLoaderInBrowser(service);\n }\n } else {\n _ret_ = _serviceLoaderInNode(service);\n }\n break;\n case \"mockup\":\n _ret_ = _serviceLoaderMockup(service);\n break;\n case \"local\":\n _ret_ = _serviceLoaderLocal(service);\n break;\n default:\n logger.debug(`The value of the kind property of the service ${service.name} is not valid`);\n _ret_ = Promise.resolve();\n break;\n }\n return _ret_;\n};\n", "export const _tag_filter_ = \"quick-component:not([loaded]),component:not([loaded])\";\n", "import { IComponent, TCacheController } from \"./types/global\";\nimport { asyncLoad } from \"./asyncLoad\";\nimport { ComplexStorageCache } from \"./ComplexStorageCache\";\nimport { _DataStringify } from \"./DataStringify\";\nimport { logger } from \"./Logger\";\nimport { is_phonegap, isBrowser } from \"./platform\";\nimport { _top } from \"./top\";\n\n/**\n * Loads a simple component from a template\n *\n * @author: Jean Machuca \n * @param component a Component object\n */\nexport const componentLoader = function (component: IComponent, _async: boolean):Promise {\n let __promise__: Promise;\n const _componentLoaderInBrowser = function (component: IComponent) {\n __promise__ = new Promise(function (resolve, reject) {\n const _promise = component.__promise__;\n const container = (Object.hasOwn(component, \"container\") && typeof component.container !== \"undefined\" && component.container !== null) ? (component.container) : (component.body);\n if (container !== null) {\n const _feedComponent_ = function (component: { feedComponent: () => void; }) {\n component.feedComponent();\n const standardResponse = {\n \"request\": xhr,\n component\n };\n resolve.call(_promise, standardResponse);\n };\n logger.debug(\"LOADING COMPONENT DATA {{DATA}} FROM {{URL}}\".replace(\"{{DATA}}\", _DataStringify(component.data)).replace(\"{{URL}}\", component.url));\n\n const _componentLoaded = function () {\n const successStatus = (is_file) ? (0) : (200);\n if (xhr.status === successStatus) {\n const response = xhr.responseText;\n logger.debug(\"Data received {{DATA}}\".replace(\"{{DATA}}\", _DataStringify(response)));\n logger.debug(\"CREATING COMPONENT {{NAME}}\".replace(\"{{NAME}}\", component.name));\n component.template = response;\n if (component.cached && (typeof cache !== \"undefined\")) {\n cache.save(component.name, component.template);\n }\n _feedComponent_(component);\n } else {\n const standardResponse = {\n \"request\": xhr,\n component\n };\n reject.call(_promise, standardResponse);\n\n }\n };\n if (typeof component.template === \"string\" && component.template !== \"\") {\n // component already has a template it does not need to be reloaded\n _feedComponent_(component);\n } else {\n var is_file = !!(component.url.startsWith(\"file:\"));\n var xhr = new XMLHttpRequest();\n if (!is_file) {\n try {\n logger.debug(\"Calling the url of component in async mode.\");\n xhr.open(component.method, component.url, true);\n } catch (e:any) {\n logger.debug(`An error ocurred: ${e}.`);\n logger.debug(\"Last try has failed... The component cannot be loaded.\");\n }\n } else {\n if (\"fetch\" in _top) {\n logger.debug(\"I can use fetch...\");\n logger.debug(\"It is a file to be loaded, so I will try to use fetch\");\n fetch(component.url).then(response => {\n logger.debug(\"I got a response from fetch, so I'll feed the component\");\n response.text().then(text => {\n component.template = text;\n _feedComponent_(component);\n })\n .catch((e:any) => {throw new Error (`An error ocurred: ${e}`);});\n }).catch ((e:any) => {throw new Error (`An error ocurred: ${e}`);});\n }\n }\n if (!is_phonegap && !is_file) {\n xhr.setRequestHeader(\"Content-Type\", \"text/html\");\n }\n if (!is_file) {\n xhr.onload = _componentLoaded;\n }\n const _directLoad = function (is_file: boolean) {\n is_file = !((typeof is_file === \"undefined\" || !is_file));\n logger.debug(\"SENDING THE NORMAL REQUEST \");\n if (is_file) {\n if (!(\"fetch\" in _top)) {\n logger.debug(\"I have to try to load the file using xhr... \");\n xhr.send(null);\n if (xhr.status === XMLHttpRequest.DONE) {\n _componentLoaded();\n }\n }\n } else {\n logger.debug(\"Trying to send the data to the component... \");\n xhr.send(_DataStringify(component.data));\n }\n };\n\n if (component.cached && (!is_file)) {\n logger.debug(\"USING CACHE FOR COMPONENT: \" + component.name);\n var cache = new ComplexStorageCache({\n index: component.cacheIndex,\n load() {\n _directLoad.call(this, is_file);\n },\n alternate(cacheController: TCacheController) {\n if (component.method === \"GET\") {\n component.template = cacheController.cache.getCached(component.cacheIndex);\n _feedComponent_.call(this, component);\n } else {\n _directLoad.call(this, is_file);\n }\n \n }\n });\n (_top as any).lastCache = cache;\n } else {\n logger.debug(\"NOT USING CACHE FOR COMPONENT: \" + component.name);\n _directLoad(is_file);\n }\n\n }\n } else {\n logger.debug(\"CONTAINER DOESNT EXIST\");\n }\n });\n __promise__.then(function (standardResponse) {\n return component.__done__().then(function () {\n let _ret_;\n if (typeof component.done === \"function\") {\n _ret_ = component.done.call(component, standardResponse);\n }\n return Promise.resolve(_ret_);\n });\n }, function (standardResponse) {\n if (typeof component.fail === \"function\") {\n component.fail.call(component, standardResponse)\n .catch ((e:any)=> {throw new Error (`${e}`);});\n }\n return Promise.reject(new Error (\"An error ocurred\"));\n }).catch(function (e:any) {\n logger.debug(\"Something wrong loading the component\");\n throw new Error (`An error ocurred: ${e}`);\n });\n return __promise__;\n };\n const _componentLoaderInNode = function (component: IComponent) {\n __promise__ = new Promise(function (resolve, reject) {\n const _promise = __promise__;\n const _feedComponent_ = function (component: IComponent) {\n component.feedComponent()\n .catch ((e:any) => {\n throw new Error (`An error ocurred trying to feed the component: ${component.name}. Error: ${e}`);\n });\n const standardResponse = {\n \"request\": null,\n component\n };\n resolve.call(_promise, standardResponse);\n };\n logger.debug(\"LOADING COMPONENT DATA {{DATA}} FROM {{URL}}\".replace(\"{{DATA}}\", _DataStringify(component.data)).replace(\"{{URL}}\", component.url));\n\n const _componentLoaded = function (err: any, responseText: { toString: () => any; }) {\n if (!err) {\n const response = responseText.toString();\n logger.debug(\"Data received {{DATA}}\".replace(\"{{DATA}}\", _DataStringify(response)));\n logger.debug(\"CREATING COMPONENT {{NAME}}\".replace(\"{{NAME}}\", component.name));\n component.template = response;\n if (component.cached && (typeof cache !== \"undefined\")) {\n cache.save(component.name, component.template);\n }\n _feedComponent_(component);\n } else {\n const standardResponse = {\n \"request\": null,\n component\n };\n reject.call(_promise, standardResponse);\n }\n };\n if (typeof component.template === \"string\" && component.template !== \"\") {\n // component already has a template it does not need to be reloaded\n _feedComponent_(component);\n } else {\n logger.debug(\"Loading the component as a local file in server...\");\n const _directLoad = function () {\n // eslint-disable-next-line @typescript-eslint/no-require-imports\n const {readFile} = require(\"node:fs\");\n logger.debug(\"SENDING THE NORMAL REQUEST \");\n readFile(component.url, _componentLoaded);\n };\n\n if (component.cached) {\n logger.debug(\"USING CACHE FOR COMPONENT: \" + component.name);\n var cache = new ComplexStorageCache({\n index: component.cacheIndex,\n load() {\n _directLoad();\n },\n alternate(cacheController: TCacheController) {\n if (component.method === \"GET\") {\n component.template = cacheController.cache.getCached(component.cacheIndex);\n _feedComponent_.call(this, component);\n } else {\n _directLoad.call(this);\n }\n \n }\n });\n (_top as any).lastCache = cache;\n } else {\n logger.debug(\"NOT USING CACHE FOR COMPONENT: \" + component.name);\n _directLoad();\n }\n\n }\n });\n __promise__.then(function (standardResponse) {\n return component.__done__().then(function () {\n let _ret_;\n if (typeof component.done === \"function\") {\n _ret_ = component.done.call(component, standardResponse);\n }\n return Promise.resolve(_ret_);\n });\n }, function (standardResponse) {\n if (typeof component.fail === \"function\") {\n component.fail.call(component, standardResponse)\n .catch((e:any) => {throw new Error (`An error ocurred: ${e}`);});\n }\n return Promise.reject(new Error (\"An error ocurred.\"));\n }).catch(function (e) {\n logger.debug(`Something wrong loading the component: ${e}`);\n });\n return __promise__;\n };\n\n let _ret_;\n if (isBrowser) {\n if (typeof _async !== \"undefined\" && _async) {\n _ret_ = asyncLoad(_componentLoaderInBrowser, [component, _async]);\n } else {\n _ret_ = _componentLoaderInBrowser(component);\n }\n } else {\n _ret_ = _componentLoaderInNode(component);\n }\n return _ret_ as Promise;\n};", "import { Base64 } from \"./Base64\";\nimport { _basePath_ } from \"./basePath\";\nimport { _Cast } from \"./Cast\";\nimport { ClassFactory } from \"./ClassFactory\";\nimport { _buildComponentsFromElements_, ComponentURI } from \"./ComponentFactory\";\nimport { _DataStringify } from \"./DataStringify\";\nimport { _domain_ } from \"./domain\";\nimport { _DOMCreateElement } from \"./DOMCreateElement\";\nimport { __getType__ } from \"./getType\";\nimport { InheritClass } from \"./InheritClass\";\nimport { _methods_, _protected_code_ } from \"./introspection\";\nimport { is_a } from \"./is_a\";\nimport { isQCObjects_Object } from \"./isQCObjects\";\nimport { logger } from \"./Logger\";\nimport { New } from \"./New\";\nimport { Package } from \"./Package\";\nimport { isBrowser } from \"./platform\";\nimport { Processor } from \"./Processor\";\nimport { __routing_params__, __valid_routing_way__, __valid_routings__ } from \"./routings\";\nimport { _top, componentsStack } from \"./top\";\nimport { CONFIG } from \"./CONFIG\";\nimport { serviceLoader } from \"./serviceLoader\";\nimport { _tag_filter_ } from \"./tag_filter\";\nimport { componentLoader } from \"./componentLoader\";\nimport { IComponent, IController, IEffect, IProcessor, IQCObjectsElement, IQCObjectsShadowedElement, IView, TBody, TComponentDoneResponse, TComponentParams, TComponentRouting, TComponentRoutings } from \"./types/global\";\n\nexport class Component extends InheritClass implements IComponent {\n static shadowed: boolean | undefined = false;\n static cached: any = true;\n [key: string]: any;\n name!: string;\n templateURI!: string;\n url!: string;\n tplsource!: string;\n tplextension!: string;\n template!: string;\n validRoutingWays: string[] = [\"pathname\", \"hash\", \"search\"];\n basePath:string = _basePath_;\n domain:string = _domain_;\n templateHandler = \"DefaultTemplateHandler\";\n processorHandler?: IProcessor;\n routingWay: string | null = null;\n routingNodes: (IQCObjectsElement | HTMLElement)[] = [];\n routings: TComponentRoutings = [];\n routingPath = \"\";\n routingPaths: string[] = [];\n _componentHelpers: any[] = [];\n subcomponents: any[] = [];\n splashScreenComponent?: IComponent = undefined;\n controller?: IController = undefined;\n routingController?: IController = undefined;\n\n view?: IView = undefined;\n effect?: IEffect = undefined;\n effectClass!: string;\n method = \"GET\";\n cached?: boolean = true;\n __promise__?: Promise | null = null;\n data!: any;\n __namespace?: string = undefined;\n protected _parsedAssignmentText!: string;\n protected __shadowRoot: any;\n protected _serviceClassName: string | null = null;\n enableServiceClass?: boolean | undefined = true;\n serviceInstance: any;\n serviceData: any;\n shadowed?: boolean = false;\n container: any;\n innerHTML: any;\n reload: any;\n static subcomponents: any;\n assignRoutingParams?: boolean = true;\n responseTo?: string | undefined;\n static responseTo?: string | undefined;\n\n constructor({\n __parent__,\n templateURI = \"\",\n template,\n tplsource = \"default\",\n tplextension,\n url = \"\",\n name = \"\",\n method = \"GET\",\n data = {},\n reload = false,\n shadowed = false,\n cached = true,\n enableServiceClass,\n assignRoutingParams = true,\n _body = _DOMCreateElement(\"div\"),\n __promise__ = null,\n __shadowRoot,\n body,\n shadowRoot,\n splashScreenComponent,\n controller,\n view\n }: TComponentParams) {\n if (arguments.length < 1) {\n throw Error(\"No arguments in component. You must at least give one argument.\");\n }\n super({\n __parent__,\n templateURI,\n template,\n tplsource,\n tplextension,\n url,\n name,\n method,\n data,\n reload,\n shadowed,\n cached,\n enableServiceClass,\n assignRoutingParams,\n _body,\n __promise__,\n __shadowRoot,\n body,\n shadowRoot,\n splashScreenComponent,\n controller,\n view\n });\n const self = this;\n\n if (typeof name !== \"undefined\") {\n self.name = name;\n }\n\n if (typeof self.name === \"undefined\" && typeof name === \"undefined\") {\n logger.warn(\"A name is not defined for \" + __getType__(self));\n }\n\n self.routingWay = CONFIG.get(\"routingWay\");\n\n self.processorHandler = new Processor({\n component: self\n });\n\n /* assign body data attributes to data */\n self.data = (typeof self.data === \"undefined\" || self.data === null) ? ({}) : (self.data);\n self.data = Object.assign(self.data, self.dataAttributes);\n\n self.createServiceInstance()\n .then(() => {\n if (typeof self.__new__ === \"function\") {\n self.__new__(self);\n }\n\n self._generateRoutingPaths(self.body)\n .then(function () {\n self._reroute_()\n .then(function () {\n return self.rebuild()\n .then(function () {\n logger.info(`Component._new_ The component ${self.name} was built successfully!`);\n }).catch(function (standardResponse) {\n logger.warn(`Component._new_ Something went wrong building the component ${self.name}`);\n console.error(`Component._new_ Something went wrong building the component ${self.name}`, standardResponse);\n });\n }).catch((e: any) => {\n throw Error(`Unexpected error ${e}`);\n });\n }).catch((e: any) => {\n throw Error(`Unexpected error ${e}`);\n });\n\n }).catch((e: any) => {\n throw Error(`Unexpected error. ${e}`);\n });\n\n }\n\n set cacheIndex(value) {\n // readonly\n logger.debug(\"[cacheIndex] This property is readonly\");\n }\n\n get cacheIndex():string {\n const self = this;\n const __routing_path__ = _DataStringify(self.routingPath);\n return Base64.encode(self.name + __routing_path__);\n }\n\n set parsedAssignmentText(value: string) {\n // readonly\n logger.debug(\"[parsedAssignmentText] This property is readonly\");\n }\n\n get parsedAssignmentText(): string {\n const self = this;\n self._parsedAssignmentText = self.parseTemplate(self.template);\n if (typeof self._parsedAssignmentText === \"undefined\") {\n throw Error(`[Component][${this.name}][parsedAssignmentText] Could not generate content!`);\n }\n return self._parsedAssignmentText;\n }\n\n\n set shadowRoot(value: IQCObjectsShadowedElement) {\n const self = this;\n if (typeof self.__shadowRoot === \"undefined\") {\n self.__shadowRoot = value;\n } else {\n logger.debug(\"[shadowRoot] This property can only be assigned once!\");\n }\n }\n\n get shadowRoot(): IQCObjectsShadowedElement {\n const self = this;\n return self.__shadowRoot as IQCObjectsShadowedElement;\n }\n\n\n set routingSelected(value: TComponentRouting[]) {\n logger.debug(\"[routingSelected] This is a read-only property of the component\");\n }\n\n get routingSelected(): TComponentRouting[] {\n const self = this;\n return __valid_routings__(self.routings, self.routingPath);\n }\n\n set routingParams(value) {\n logger.debug(\"[routingParams] This is a read-only property of the component\");\n }\n\n get routingParams(): object {\n const component = this;\n return [{}].concat(component.routingSelected.map(function (routing: any) {\n return __routing_params__(routing, component.routingPath);\n })).reduce(function (accumulator, colData) {\n return Object.assign(accumulator, colData);\n });\n }\n\n\n set serviceClassName(_serviceClassName: string) {\n this._serviceClassName = _serviceClassName;\n }\n\n get serviceClassName(): string | null {\n let _serviceClassName: string | null = \"\";\n if (isBrowser) {\n _serviceClassName = ((this.body as HTMLElement).getAttribute(\"serviceClass\") !== null) ? ((this.body as HTMLElement).getAttribute(\"serviceClass\")) : (\n this._serviceClassName\n );\n } else {\n _serviceClassName = this._serviceClassName;\n }\n return _serviceClassName;\n }\n\n protected get responseToData(): boolean {\n let _response_to_data_: boolean = false;\n if (isBrowser) {\n const responseToAttr = (this.body as HTMLElement).getAttribute(\"response-to\");\n _response_to_data_ = responseToAttr === \"data\" || this.responseTo === \"data\";\n } else {\n _response_to_data_ = this.responseTo === \"data\";\n }\n return _response_to_data_;\n }\n\n protected get responseToTemplate(): boolean {\n let _response_to_template_: boolean = false;\n if (isBrowser) {\n const responseToAttr = (this.body as HTMLElement).getAttribute(\"response-to\");\n _response_to_template_ = responseToAttr === \"template\" || this.responseTo === \"template\";\n } else {\n _response_to_template_ = this.responseTo === \"template\";\n }\n return _response_to_template_;\n }\n\n createServiceInstance(): Promise {\n const component = this;\n let data = this.data;\n let __serviceClass: any;\n const __classDefinition = component.getClass().__definition;\n const _serviceClassName = component.serviceClassName;\n\n return new Promise(function (resolve, reject) {\n /* __enable_service_class__ = true by default */\n const __enable_service_class__ = component.enableServiceClass;\n let _response_to_data_ = component.responseToData;\n let _response_to_template_ = component.responseToTemplate;\n\n if (__enable_service_class__ && _serviceClassName !== null) {\n __serviceClass = ClassFactory(_serviceClassName);\n }\n if (!_response_to_data_ && __classDefinition && Object.hasOwn(__classDefinition, \"responseTo\")) {\n _response_to_data_ = (__classDefinition.responseTo === \"data\");\n } else if (!_response_to_data_ && Object.hasOwn(ClassFactory(\"Component\"), \"responseTo\")) {\n _response_to_data_ = ((ClassFactory(\"Component\") as Component).responseTo === \"data\");\n }\n if (!_response_to_template_ && __classDefinition && Object.hasOwn(__classDefinition, \"responseTo\")) {\n _response_to_template_ = (__classDefinition.responseTo === \"template\");\n } else if (!_response_to_template_ && Object.hasOwn(ClassFactory(\"Component\"), \"responseTo\")) {\n _response_to_template_ = ((ClassFactory(\"Component\") as Component).responseTo === \"template\");\n }\n\n if (typeof __serviceClass !== \"undefined\" &&\n (typeof __enable_service_class__ !== \"undefined\" &&\n __enable_service_class__ === true) &&\n (_response_to_data_ || _response_to_template_)\n ) {\n logger.info(\"Loading service \" + _serviceClassName);\n const serviceInstance = New(__serviceClass, {\n data\n });\n (serviceLoader(serviceInstance) as Promise)?.then(function ({\n service\n }: { request: any, service: any }) {\n let serviceResponse;\n if (typeof service.JSONresponse !== \"undefined\" && service.JSONresponse !== null) {\n serviceResponse = service.JSONresponse;\n } else {\n serviceResponse = service.template;\n }\n if (_response_to_data_) {\n if (typeof data === \"object\" && typeof serviceResponse === \"object\") {\n data = Object.assign(data, serviceResponse);\n } else {\n data = serviceResponse;\n }\n component.data = data;\n }\n component.serviceInstance = serviceInstance;\n component.serviceData = data;\n\n if (_response_to_template_) {\n component.template = serviceResponse;\n }\n resolve(serviceResponse);\n }, function (rejectedResponse: Error) {\n logger.debug(`Service loading rejected for ${_serviceClassName} in ${component.name}`);\n reject(rejectedResponse);\n }).catch(function (e: any) {\n logger.debug(\"Something went wroing while trying to load the service \" + _serviceClassName);\n throw Error(`Error loading ${_serviceClassName} for ${component.name}. Detail: ${e}`);\n });\n } else {\n resolve(null);\n }\n });\n }\n\n _bindroute_():void {\n const _component_ = this;\n if (!(_component_ as any)._bindroute_.loaded) {\n if (isBrowser) {\n\n (_component_.hostElements(\"a\") as unknown as HTMLAnchorElement[]).map(function (a: HTMLAnchorElement) {\n (a as any).oldclick = a.onclick;\n a.onclick = function (e) {\n let _ret_ = true;\n if (!_top.global.get(\"routingPaths\")) {\n _top.global.set(\"routingPaths\", []);\n }\n const routingWay = CONFIG.get(\"routingWay\");\n const routingPath = (e.target as any)[routingWay];\n if (_top.global.get(\"routingPaths\").includes(routingPath) &&\n (e.target as any)[routingWay] !== (location as any)[routingWay] &&\n (e.target as HTMLAnchorElement).href !== document.location.href\n ) {\n logger.debug(\"A ROUTING WAS FOUND: \" + routingPath);\n window.history.pushState({\n href: (e.target as HTMLAnchorElement).href\n }, (e?.target as HTMLAnchorElement)?.href, (e.target as HTMLAnchorElement).href);\n Component.route().catch((e) => { throw Error(`Unexpected error: ${e}`); });\n _ret_ = false;\n } else {\n logger.debug(\"NO ROUTING FOUND FOR: \" + routingPath);\n }\n if (typeof (e.target as any).oldclick !== \"undefined\" && typeof (e.target as any).oldclick === \"function\") {\n (e.target as any).oldclick.call(e.target, e);\n }\n return _ret_;\n };\n return null;\n });\n\n } else {\n // not yet implemented.\n }\n (_component_ as any)._bindroute_.loaded = true;\n } else {\n logger.debug(`Routes already bound to popstate events for ${_component_.name}`);\n }\n\n }\n\n done(standardResponse?: TComponentDoneResponse): Promise {\n const _ret_ = new Promise((resolve) => {\n if (typeof standardResponse !== \"undefined\") {\n const { request, component } = standardResponse;\n resolve({ request, component });\n } else {\n resolve({ request: undefined, component: undefined });\n }\n });\n return _ret_;\n }\n\n createControllerInstance(): Promise<{ component: IComponent, controller: IController }> {\n let _Controller: any;\n if (isBrowser) {\n if (typeof this.body === \"undefined\") {\n throw new Error(\"The component has no body\");\n }\n var controllerName = (this.body as HTMLElement).getAttribute(\"controllerClass\");\n if (!controllerName) {\n controllerName = \"Controller\";\n }\n _Controller = ClassFactory(controllerName);\n if (typeof _Controller !== \"undefined\") {\n this.controller = New(_Controller, {\n component: this\n });\n }\n\n }\n\n return new Promise((resolve, reject) => {\n if (isBrowser) {\n if (typeof _Controller !== \"undefined\" && typeof this.controller !== \"undefined\") {\n if (typeof (this.controller).done === \"function\") {\n try {\n this.controller.done.call(this.controller);\n } catch (e: any) {\n throw Error(e);\n }\n } else {\n logger.debug(`${controllerName} does not have a done() method.`);\n reject(new Error(`${controllerName} does not have a done() method.`));\n }\n if (typeof this.controller.createRoutingController === \"function\") {\n this.controller.createRoutingController.call(this.controller);\n } else {\n logger.debug(`${controllerName} does not have a createRoutingController() method.`);\n }\n }\n }\n resolve({ component: this, controller: this.controller as IController });\n });\n }\n\n createEffectInstance(): Promise<{ component: Component, effect: IEffect }> {\n const _component_ = this;\n return new Promise(function (resolve) {\n if (isBrowser) {\n const effectClassName = (_component_.body as HTMLElement)?.getAttribute(\"effectClass\");\n let applyEffectTo = (_component_.body as HTMLElement)?.getAttribute(\"apply-effect-to\");\n applyEffectTo = (applyEffectTo !== null) ? (applyEffectTo) : (\"load\");\n if (effectClassName !== null && applyEffectTo === \"observe\") {\n _component_.applyObserveTransitionEffect(effectClassName);\n } else if (effectClassName !== null && applyEffectTo === \"load\") {\n _component_.applyTransitionEffect(effectClassName);\n }\n }\n resolve({ component: _component_, effect: _component_.effect as IEffect });\n });\n }\n\n createViewInstance(): Promise<{ component: Component, view: IView }> {\n const _component_ = this;\n return new Promise(function (resolve) {\n const viewName = (isBrowser) ? ((_component_.body as HTMLElement).getAttribute(\"viewClass\")) : (null);\n if (viewName !== null) {\n const _View = ClassFactory(viewName);\n if (typeof _View !== \"undefined\") {\n _component_.view = New(_View, {\n component: _component_\n }); // Initializes the main view for the component\n if (Object.hasOwn(_component_.view as object, \"done\") && typeof _component_.view?.done === \"function\") {\n _component_.view?.done.call(_component_.view);\n }\n }\n\n }\n resolve({ component: _component_, view: _component_.view as IView });\n\n });\n }\n\n __done__(): Promise {\n const _component_ = this;\n const componentDone = function () {\n if (typeof _component_ === \"undefined\") {\n throw new Error(\"componentDone() has lost its context\");\n }\n if (typeof _component_.body === \"undefined\") {\n throw new Error(\"The component has no body\");\n }\n\n (async () => {\n await _component_.createViewInstance();\n await _component_.createControllerInstance();\n await _component_.createEffectInstance();\n })()\n .catch((e: any) => {\n throw new Error(`Unknown error ${e}.`);\n });\n\n logger.debug(`Trying to run component helpers for ${_component_.name}...`);\n try {\n _component_.runComponentHelpers();\n logger.debug(`Component helpers for ${_component_.name} executed.`);\n } catch (e: any) {\n logger.debug(`Component helpers for ${_component_.name} could not be executed.`);\n throw Error(e);\n }\n\n _component_.subcomponents = _component_.__buildSubComponents__();\n\n _component_._bindroute_();\n if (isBrowser) {\n (_component_.body as HTMLElement).setAttribute(\"loaded\", \"true\");\n }\n };\n\n return new Promise(function (resolve, reject) {\n try {\n resolve(componentDone.call(_component_));\n } catch (e: any) {\n reject(new Error(e));\n }\n });\n\n }\n\n hostElements(tagFilter: string): (IQCObjectsElement | HTMLElement | IQCObjectsShadowedElement)[] {\n const _component_ = this;\n let elementList: (IQCObjectsElement | HTMLElement | IQCObjectsShadowedElement)[] = [];\n if (isBrowser) {\n elementList = (_component_.shadowed && (typeof _component_.shadowRoot !== \"undefined\")) ? (\n _component_.shadowRoot.subelements(tagFilter) as IQCObjectsShadowedElement[]\n ) : (\n (_component_.body as IQCObjectsElement).subelements(tagFilter)\n );\n\n }\n return elementList;\n }\n\n get subtags(): (HTMLElement | IQCObjectsElement | IQCObjectsShadowedElement)[] {\n const _component_ = this;\n const tagFilter = _tag_filter_;\n return _component_.hostElements(tagFilter);\n }\n\n get bodyAttributes():any {\n const _component_ = this;\n const c = _component_.body;\n return (isBrowser) ? ([...(c as HTMLElement).getAttributeNames()].map(a => { return { [a]: (c as HTMLElement).getAttribute(a) }; }).reduce((accumulator, colData) => { return Object.assign(accumulator, colData); })) : ({});\n }\n\n get dataAttributes():any {\n const _component_ = this;\n const c = _component_.body;\n return (isBrowser) ? ([{}].concat([...(c as HTMLElement).getAttributeNames()].filter(n => n.startsWith(\"data-\")).map(a => { return { [a.split(\"-\")[1]]: (c as HTMLElement).getAttribute(a) }; })).reduce((accumulator, colData) => { return Object.assign(accumulator, colData); })) : ({});\n }\n\n __buildSubComponents__(rebuildObjects = false): any {\n const _component_: Component = this as Component;\n let elementList = _component_.subtags;\n if (!rebuildObjects) {\n elementList = (elementList as HTMLElement[]).filter((t: HTMLElement) => t.getAttribute(\"loaded\") !== \"true\") as unknown[] as IQCObjectsElement[];\n }\n if ((typeof _component_ !== \"undefined\") || (_component_ as Component).subcomponents.length < 1) {\n _component_.subcomponents = _buildComponentsFromElements_(elementList as HTMLElement[], _component_);\n }\n return _component_.subcomponents;\n }\n\n fail(standardResponse: { error: any; component: Component; }): Promise<{ error: any; component: Component; }> {\n const _ret_ = new Promise<{ error: any; component: Component; }>((resolve, reject) => {\n if (typeof standardResponse !== \"undefined\") {\n const { error, component } = standardResponse;\n resolve({ error, component });\n } else {\n reject(new Error(\" Unknown error.\"));\n }\n });\n return _ret_;\n }\n\n set(key: string, value: any):void {\n this[key] = value;\n }\n\n get(key: string, _defaultValue?: string): any {\n return this[key] || _defaultValue;\n }\n\n feedComponent(): Promise {\n const _component_ = this;\n logger.debug(`[Component][${this.name}][feedComponent] start feeding component...`);\n const _feedComponent_InBrowser = function (_component_: Component): any {\n if (typeof _component_.container === \"undefined\" && typeof _component_.body === \"undefined\") {\n logger.warn(\"COMPONENT {{NAME}} has an undefined container and body\".replace(\"{{NAME}}\", _component_.name));\n return;\n }\n const container = (typeof _component_.container === \"undefined\" || _component_.container === null) ? (_component_.body) : (_component_.container);\n const parsedAssignmentText = _component_.parsedAssignmentText;\n _component_.innerHTML = parsedAssignmentText;\n if (_component_.shadowed) {\n logger.debug(\"COMPONENT {{NAME}} is shadowed\".replace(\"{{NAME}}\", _component_.name));\n logger.debug(\"Preparing slots for Shadowed COMPONENT {{NAME}}\".replace(\"{{NAME}}\", _component_.name));\n const tmp_shadowContainer = _DOMCreateElement(\"div\");\n container.subelements(\"[slot]\").map(\n (c: { parentElement: any; }): any => {\n if (c.parentElement === container) {\n tmp_shadowContainer.appendChild(c as any);\n }\n return c;\n });\n logger.debug(\"Creating shadowedContainer for COMPONENT {{NAME}}\".replace(\"{{NAME}}\", _component_.name));\n const shadowContainer = _DOMCreateElement(\"div\");\n shadowContainer.classList.add(\"shadowHost\");\n try {\n _component_.shadowRoot = shadowContainer.attachShadow({\n mode: \"open\"\n }) as IQCObjectsShadowedElement;\n } catch (e: any) {\n logger.debug(`An error ocurred: ${e}.`);\n try {\n logger.debug(\"Shadowed COMPONENT {{NAME}} is repeated\".replace(\"{{NAME}}\", _component_.name));\n _component_.shadowRoot = shadowContainer.shadowRoot as IQCObjectsShadowedElement;\n } catch (e: any) {\n logger.debug(`An error ocurred: ${e}.`);\n logger.warn(\"Shadowed COMPONENT {{NAME}} is not allowed on this browser\".replace(\"{{NAME}}\", _component_.name));\n }\n }\n if (typeof _component_.shadowRoot !== \"undefined\" && _component_.shadowRoot !== null) {\n if (_component_.reload) {\n logger.debug(\"FORCED RELOADING OF CONTAINER FOR Shadowed COMPONENT {{NAME}}\".replace(\"{{NAME}}\", _component_.name));\n if (shadowContainer !== null && shadowContainer.shadowRoot !== null) {\n shadowContainer.shadowRoot.innerHTML = _component_.innerHTML;\n }\n } else {\n tmp_shadowContainer.innerHTML = _component_.parseTemplate(tmp_shadowContainer.innerHTML);\n logger.debug(\"ADDING Shadowed COMPONENT {{NAME}} \".replace(\"{{NAME}}\", _component_.name));\n if (shadowContainer !== null && shadowContainer.shadowRoot !== null) {\n shadowContainer.shadowRoot.innerHTML += _component_.innerHTML;\n }\n }\n logger.debug(\"ADDING Slots to Shadowed COMPONENT {{NAME}} \".replace(\"{{NAME}}\", _component_.name));\n shadowContainer.innerHTML += tmp_shadowContainer.innerHTML;\n logger.debug(\"APPENDING Shadowed COMPONENT {{NAME}} to Container \".replace(\"{{NAME}}\", _component_.name));\n const qs = container.querySelector(\".shadowHost\");\n if (!(typeof qs !== \"undefined\" && qs !== null)) {\n container.appendChild(shadowContainer);\n } else {\n logger.debug(\"Shadowed Container for COMPONENT {{NAME}} is already present in the tree \".replace(\"{{NAME}}\", _component_.name));\n if (_component_.shadowRoot !== null && shadowContainer.shadowRoot !== null) {\n _component_.shadowRoot.innerHTML = shadowContainer.shadowRoot.innerHTML;\n }\n }\n } else {\n logger.warn(\"Shadowed COMPONENT {{NAME}} is bad configured\".replace(\"{{NAME}}\", _component_.name));\n }\n } else {\n if (_component_.reload) {\n logger.debug(\"FORCED RELOADING OF CONTAINER FOR COMPONENT {{NAME}}\".replace(\"{{NAME}}\", _component_.name));\n container.innerHTML = _component_.innerHTML;\n } else if (container && _component_) {\n logger.debug(\"ADDING COMPONENT {{NAME}} \".replace(\"{{NAME}}\", _component_.name));\n container.innerHTML += _component_.innerHTML;\n } else {\n logger.warn(\"COMPONENT {{NAME}} is not added to the DOM\".replace(\"{{NAME}}\", _component_.name));\n }\n }\n\n };\n\n const _feedComponent_InNode = function (_component_: Component): any {\n const parsedAssignmentText = _component_.parsedAssignmentText;\n _component_.innerHTML = parsedAssignmentText;\n };\n\n let _ret_;\n if (!is_a(_component_, \"Component\")) {\n logger.warn(\"Trying to feed a non component object\");\n return Promise.reject(new Error(`Trying to feed a non component object ${typeof _component_}`));\n }\n return new Promise((resolve, reject) => {\n if (isBrowser) {\n try {\n _ret_ = _feedComponent_InBrowser(_component_);\n resolve(_ret_);\n } catch (e: any) {\n reject(new Error(e));\n }\n } else {\n try {\n _ret_ = _feedComponent_InNode(_component_);\n resolve(_ret_);\n } catch (e: any) {\n reject(new Error(e));\n }\n\n }\n\n });\n }\n\n rebuild(): Promise<{ request?: XMLHttpRequest, component: Component }> {\n const _component = this as Component;\n var _promise = new Promise<{ request?: XMLHttpRequest, component: Component }>(function (resolve, reject) {\n if (typeof _component === \"undefined\" || _component === null) {\n reject(new Error(\"Component is undefined\"));\n }\n if (isQCObjects_Object(_component) && is_a(_component, \"Component\")) {\n switch (true) {\n case (_component.get(\"tplsource\") === \"none\"):\n logger.debug(\"Component \" + _component.name + \" has specified template-source=none, so no template load was done\");\n var standardResponse = {\n request: undefined,\n component: _component\n };\n _component.__done__().then(function () {\n if (typeof _component.done === \"function\") {\n _component.done.call(_component, standardResponse)\n .catch((e: any) => {\n logger.debug(`It was an error while calling done() in ${_component.name}: ${e}`);\n });\n }\n resolve.call(_promise, standardResponse);\n }, function () {\n reject.call(_promise, standardResponse);\n });\n break;\n case (_component.get(\"tplsource\") === \"inline\"):\n logger.debug(\"Component \" + _component.name + \" has specified template-source=inline, so it is assumed that template is already declared\");\n (async (_component) => {\n await _component.feedComponent.bind(_component)();\n })(_component)\n .catch((e: any) => {\n logger.debug(`It was not possible to feed the component ${_component.name}: ${e}`);\n });\n var standardResponse = {\n request: undefined,\n component: _component\n };\n _component.__done__().then(async () => {\n if (typeof _component.done === \"function\") {\n await _component.done(standardResponse);\n }\n resolve.call(_promise, standardResponse);\n }, function () {\n reject.call(_promise, standardResponse);\n });\n break;\n case (_component.get(\"tplsource\") === \"default\" &&\n _component.get(\"templateURI\") !== \"\"):\n _component.set(\"url\", _component.get(\"basePath\") + _component.get(\"templateURI\"));\n (componentLoader(_component, false))?.then(\n function (standardResponse: any) {\n resolve.call(_promise, standardResponse);\n },\n function (standardResponse: any) {\n reject.call(_promise, standardResponse);\n });\n break;\n case (_component.get(\"tplsource\") === \"external\" &&\n _component.get(\"templateURI\") !== \"\"):\n _component.set(\"url\", _component.get(\"templateURI\"));\n (componentLoader(_component, false)).then(\n function (standardResponse: any) {\n resolve.call(_promise, standardResponse);\n },\n function (standardResponse: any) {\n reject.call(_promise, standardResponse);\n });\n break;\n case _component.get(\"tplsource\") === \"default\" && _component.get(\"templateURI\", \"\") === \"\":\n logger.debug(`Component ${_component.name} template-source is ${_component.get(\"tplsource\")} and no templateURI is present`);\n reject.call(_promise, `Component ${_component.name} template-source is ${_component.get(\"tplsource\")} and no templateURI is present`);\n break;\n default:\n logger.debug(\"Component \" + _component.name + \" will not be rebuilt because no templateURI is present\");\n reject.call(_promise, {\n request: null,\n component: _component\n });\n break;\n }\n\n }\n });\n return _promise;\n }\n\n Cast(oClass: any): any {\n /* Cast method for components has been deprecated. Don't use this method, it is available only for compatibility purposes */\n const o = _methods_(oClass).map((m): any => (m as Function).name.replace(/bound /g, \"\")).map(m => {\n return {\n [m]: oClass[m].bind(this)\n };\n }).reduce((c, p) => Object.assign(c, p), {});\n return _Cast(this, o);\n }\n\n route():Promise {\n return (this.constructor as typeof Component).route();\n }\n\n static route():Promise {\n const componentClass = this; /* is can be class or object */\n let _route_promise_;\n const isValidInstance = !!((isQCObjects_Object(componentClass) && is_a(componentClass, \"Component\")));\n const __route__ = function (componentList: any[]) {\n const _componentNames_: any[] = [];\n const _promises_ = componentList.filter(function (rc: any) {\n return typeof rc !== \"undefined\";\n }).map(function (rc: Component): Promise {\n if (typeof rc.name !== \"undefined\") {\n _componentNames_.push(rc.name);\n } else {\n throw new Error(__getType__(rc) + \" does not have a name\");\n }\n return new Promise(function (resolve, reject) {\n if (typeof rc !== \"undefined\" && !!rc._reroute_) {\n rc._reroute_()\n .then(function () {\n rc.reload = true;\n rc.rebuild()\n .then(() => {\n resolve();\n })\n .catch((e: any) => {\n logger.debug(`Error ${e}`);\n });\n return;\n })\n .then(function () {\n if (Object.hasOwn(rc, \"subcomponents\") &&\n typeof rc.subcomponents !== \"undefined\" &&\n rc.subcomponents.length > 0\n ) {\n logger.debug(\"LOOKING FOR ROUTINGS IN SUBCOMPONENTS FOR: \" + rc.name);\n return __route__.call(rc, rc.subcomponents);\n } else {\n logger.debug(\"No subcomponents to look for routings in: \" + rc.name);\n if (rc.subtags.length > 0) {\n rc.subcomponents = rc.__buildSubComponents__(true);\n }\n resolve();\n }\n }).catch((e: any) => {\n logger.debug(`Error: ${e}`);\n });\n } else if (typeof rc !== \"undefined\") {\n reject(new Error(\"Component \" + rc.name + \" is not an instance of Component\"));\n }\n return;\n });\n });\n return Promise.all(_promises_)\n .then(function () {\n logger.debug(\"ROUTING COMPLETED FOR \" + _componentNames_.join(\", \"));\n }).catch(function (err) {\n logger.warn(\"ROUTING FAILED FOR \" + _componentNames_.join(\", \") + \": \" + err);\n });\n };\n if (isValidInstance || !!componentsStack) {\n if (isValidInstance) {\n logger.debug(\"loading routings for instance \" + componentClass.name);\n }\n _route_promise_ = __route__.call(componentClass, (isValidInstance) ? (componentClass.subcomponents) : (componentsStack));\n } else {\n logger.debug(\"An undetermined result expected if load routings. So will not be loaded this time.\");\n throw Error(\"There is no valid instance and no components stack available to apply rountings\");\n }\n return _route_promise_;\n }\n\n fullscreen():void {\n if (isBrowser) {\n const elem: HTMLElement = this.body as HTMLElement;\n if (elem.requestFullscreen) {\n elem.requestFullscreen()\n .catch((e: any) => {\n throw new Error(`An error ocurred when requesting fullscreen: ${e}`);\n });\n } else if ((elem as any).mozRequestFullScreen) {\n /* Firefox */\n (elem as any).mozRequestFullScreen();\n } else if ((elem as any).webkitRequestFullscreen) {\n /* Chrome, Safari & Opera */\n (elem as any).webkitRequestFullscreen();\n } else if ((elem as any).msRequestFullscreen) {\n /* IE/Edge */\n (elem as any).msRequestFullscreen();\n }\n } else {\n // not yet implemented.\n }\n }\n\n closefullscreen():void {\n if (isBrowser) {\n if (document.exitFullscreen) {\n document.exitFullscreen()\n .catch((e: any) => { throw new Error(`An error ocurred when trying to exit fullscrenn ${e}.`); });\n } else if ((document as any).mozCancelFullScreen) {\n (document as any).mozCancelFullScreen();\n } else if ((document as any).webkitExitFullscreen) {\n (document as any).webkitExitFullscreen();\n } else if ((document as any).msExitFullscreen) {\n (document as any).msExitFullscreen();\n }\n } else {\n // noy yet implemented.\n }\n }\n\n _generateRoutingPaths(componentBody: TBody):Promise {\n const component = this;\n return new Promise(function (resolve) {\n if (isBrowser) {\n if (__valid_routing_way__(component.validRoutingWays, component.routingWay || \"\")) {\n if (typeof componentBody !== \"undefined\") {\n component.innerHTML = (componentBody as HTMLElement)?.innerHTML;\n component.routingNodes = (componentBody as IQCObjectsElement)?.subelements(\"routing\");\n component.routings = [];\n component.routingNodes.map((routingNode): any => {\n const attributeNames = (routingNode as HTMLElement).getAttributeNames();\n const routing = {} as TComponentRouting;\n attributeNames.map((attributeName: any, a: string | number): any => {\n (routing as any)[attributeNames[a as any]] = (routingNode as HTMLElement).getAttribute(attributeNames[a as any]);\n return attributeName;\n });\n component.routings.push(routing as never);\n if (!component.routingPaths) {\n component.routingPaths = [];\n }\n if (!component.routingPaths.includes(routing.path as never)) {\n component.routingPaths.push(routing.path as never);\n }\n if (!_top.global.get(\"routingPaths\")) {\n _top.global.set(\"routingPaths\", []);\n }\n if (!_top.global.get(\"routingPaths\").includes(routing.path)) {\n _top.global.get(\"routingPaths\").push(routing.path);\n }\n return routingNode;\n });\n }\n }\n } else {\n // not yet implemented.\n }\n resolve();\n\n });\n }\n\n parseTemplate(template: any): string {\n const _self = this;\n let _parsedAssignmentText: string;\n const value = template;\n if (Object.hasOwn(_self, \"templateHandler\")) {\n const templateHandlerName = _self.templateHandler;\n logger.debug(`[Component][${this.name}][parseTemplate] Attempting to use ${templateHandlerName} ...`);\n const templateHandlerClass = ClassFactory(templateHandlerName);\n const templateInstance = New(templateHandlerClass, {\n component: _self,\n template: value\n });\n templateInstance.component = _self;\n let selfData = _self.data;\n if (Object.hasOwn(_self, \"assignRoutingParams\") && _self.assignRoutingParams) {\n try {\n selfData = Object.assign(selfData, _self.routingParams);\n } catch (e: any) {\n logger.debug(`An error ocurred: ${e}.`);\n logger.debug(\"[parseTemplate] it was not possible to assign the routing params to the template\");\n }\n }\n _parsedAssignmentText = templateInstance.assign(selfData);\n } else {\n logger.debug(`[Component][${this.name}][parseTemplate] No value for templateHandler. Using raw content...`);\n _parsedAssignmentText = value;\n }\n return _parsedAssignmentText;\n }\n\n _reroute_(): Promise {\n /* This method set the selected routing and makes the switch to the templateURI */\n const rc = this;\n return new Promise(function (resolve) {\n if (isBrowser) {\n if (__valid_routing_way__(rc.validRoutingWays, rc.routingWay || \"\")) {\n rc.routingPath = (location as any)[rc.routingWay as string];\n rc.routingSelected.map((routing: TComponentRouting,): TComponentRouting => {\n const componentURI = ComponentURI({\n \"COMPONENTS_BASE_PATH\": CONFIG.get(\"componentsBasePath\"),\n \"COMPONENT_NAME\": routing.name.toString(),\n \"TPLEXTENSION\": (Object.hasOwn(routing, \"tplextension\")) ? (routing.tplextension || \"\") : (rc.tplextension),\n \"TPL_SOURCE\": \"default\" /* here is always default in order to get the right uri */\n });\n rc.templateURI = componentURI;\n return routing;\n });\n if (rc.routingSelected.length > 0) {\n rc.template = \"\";\n if (typeof rc.body !== \"undefined\" && rc.body !== null) {\n (rc.body as HTMLElement).innerHTML = \"\";\n }\n }\n }\n }\n resolve(rc);\n\n });\n }\n\n lazyLoadImages() {\n if (isBrowser) {\n const component = this;\n const _componentRoot = component.componentRoot as IQCObjectsShadowedElement;\n if (typeof _componentRoot !== \"undefined\" && _componentRoot !== null) {\n const _imgLazyLoaded = [..._componentRoot.subelements(\"img[lazy-src]\")];\n const _lazyLoadImages = function (image: Element | HTMLElement) {\n image.setAttribute(\"src\", image.getAttribute(\"lazy-src\")?.toString() as string);\n (image as HTMLImageElement).onload = () => {\n image.removeAttribute(\"lazy-src\");\n };\n };\n if (\"IntersectionObserver\" in window) {\n const observer = new IntersectionObserver((items, observer) => {\n items.forEach((item) => {\n if (item.isIntersecting) {\n _lazyLoadImages(item.target);\n observer.unobserve(item.target);\n }\n });\n });\n _imgLazyLoaded.map(function (img) {\n return observer.observe(img as unknown as HTMLImageElement);\n });\n } else {\n (_imgLazyLoaded as (HTMLElement | Element)[]).map(_lazyLoadImages);\n }\n }\n } else {\n // not yet implemented\n }\n return null;\n }\n\n applyTransitionEffect(effectClassName: string):void {\n const _Effect = ClassFactory(effectClassName);\n if (typeof _Effect === \"undefined\") {\n throw Error(`${effectClassName} not found.`);\n }\n if (typeof _Effect !== \"undefined\" && is_a(_Effect, \"TransitionEffect\")) {\n this.effect = New(_Effect, {\n component: this\n });\n (this.effect as any)?.apply((this.effect as any)?.defaultParams);\n } else {\n logger.debug(`${effectClassName} is ${__getType__(_Effect)} but is not a TransitionEffect`);\n }\n }\n\n applyObserveTransitionEffect(effectClassName: any):void {\n if (isBrowser) {\n const component = this;\n const _componentRoot = component.componentRoot;\n const _applyEffect_ = function () {\n component.applyTransitionEffect(effectClassName);\n };\n if (\"IntersectionObserver\" in window) {\n const observer = new IntersectionObserver((items, observer) => {\n items.forEach((item) => {\n if (item.isIntersecting) {\n _applyEffect_();\n observer.unobserve(item.target);\n }\n });\n });\n observer.observe(_componentRoot as Element);\n } else {\n _applyEffect_();\n }\n } else {\n // not yet implemented\n }\n\n }\n\n get componentRoot(): TBody {\n return (this.shadowed) ? (this.shadowRoot) : (this.body);\n }\n\n scrollIntoHash():void {\n if (isBrowser) {\n const component = this;\n if (document.location.hash !== \"\") {\n const _componentRoot = component.componentRoot;\n ((_componentRoot as IQCObjectsShadowedElement)?.subelements(document.location.hash) as unknown as Element[]).map(\n (element: Element): any => {\n if (typeof element.scrollIntoView === \"function\") {\n element.scrollIntoView(\n CONFIG.get(\"scrollIntoHash\", {\n behavior: \"auto\",\n block: \"top\",\n inline: \"top\"\n })\n );\n }\n return element;\n }\n );\n }\n } else {\n // not yet implemented\n }\n }\n\n i18n_translate():void {\n if (isBrowser) {\n if (CONFIG.get(\"use_i18n\")) {\n const component = this;\n const _componentRoot = component.componentRoot as IQCObjectsShadowedElement;\n const lang1 = CONFIG.get(\"lang\", \"en\");\n const lang2 = navigator.language.slice(0, 2);\n const i18n = _top.global.get(\"i18n\");\n if ((lang1 !== lang2) && (typeof i18n === \"object\" && Object.hasOwn(i18n, \"messages\"))) {\n const callback_i18n = () => {\n return new Promise(function (resolve) {\n const messages = i18n.messages.filter(function (message: any) {\n return Object.hasOwn(message, lang1) && Object.hasOwn(message, lang2);\n });\n (_componentRoot?.subelements(\"ul,li,h1,h2,h3,a,b,p,input,textarea,summary,details,option,component\") as HTMLElement[])\n .map((element: HTMLElement): HTMLElement => {\n messages.map(function (message: { [x: string]: any; }) {\n let _innerHTML = element.innerHTML;\n _innerHTML = _innerHTML?.replace(new RegExp(`${message[lang1]}`, \"g\"), message[lang2]);\n element.innerHTML = _innerHTML;\n return null;\n });\n return element;\n });\n resolve();\n });\n };\n callback_i18n.call(component).then(function () {\n logger.debug(\"i18n loaded for component: \" + component.name);\n }).catch((e: any) => { throw new Error(`An error ocurred when parsing i18n: ${e}.`); });\n\n }\n }\n } else {\n // not yet implemented\n }\n }\n\n addComponentHelper(componentHelper: any):void {\n const component = this;\n component._componentHelpers.push(componentHelper as never);\n }\n\n runComponentHelpers():void {\n if (isBrowser) {\n const component = this;\n let __component_helpers__ = [];\n /*\n * BEGIN use i18n translation\n */\n __component_helpers__.push(component.i18n_translate.bind(component));\n /*\n * END use i18n translation\n */\n\n /*\n * BEGIN component scrollIntoHash\n */\n __component_helpers__.push(component.scrollIntoHash.bind(component));\n /*\n * END component scrollIntoHash\n */\n\n /*\n * BEGIN component images lazy-load\n */\n\n __component_helpers__.push(component.lazyLoadImages.bind(component));\n\n /*\n * END component images lazy-load\n */\n\n __component_helpers__ = __component_helpers__.concat(component._componentHelpers);\n\n __component_helpers__.map(\n (_component_helper_): any => {\n logger.debug(`Executing ${_component_helper_.name} as component helper for ${component.name}...`);\n _component_helper_();\n return _component_helper_;\n }\n );\n\n } else {\n // not yet implemented\n }\n\n }\n\n}\n\nPackage(\"com.qcobjects\", [\n Component\n]);\n\n(_methods_)(ClassFactory(\"Component\")).map((__c__): any => {\n (_protected_code_)(__c__);\n return __c__;\n});\n", "import { IQCObjectsElement, TComponentURIParams } from \"./types/global\";\nimport { Class } from \"./Class\";\nimport { ClassFactory } from \"./ClassFactory\";\nimport { Component } from \"./Component\";\nimport { CONFIG } from \"./CONFIG\";\nimport { _DOMCreateElement } from \"./DOMCreateElement\";\nimport { __getType__ } from \"./getType\";\nimport { logger } from \"./Logger\";\nimport { New } from \"./New\";\nimport { Package } from \"./Package\";\nimport { isBrowser } from \"./platform\";\nimport { _tag_filter_ } from \"./tag_filter\";\n\n/**\n * Returns a standarized uri for a component\n * @example\n * templateURI = ComponentURI({'COMPONENTS_BASE_PATH':'','COMPONENT_NAME':'','TPLEXTENSION':'','TPL_SOURCE':''})\n * @author: Jean Machuca \n * @param params an object with the params to build the uri path\n */\nexport const ComponentURI = ({ TPL_SOURCE, COMPONENTS_BASE_PATH, COMPONENT_NAME, TPLEXTENSION }:TComponentURIParams):string => {\n const templateURI = (TPL_SOURCE === \"default\") ? (`${COMPONENTS_BASE_PATH}${COMPONENT_NAME}.${TPLEXTENSION}`) : (\"\");\n return templateURI;\n};\n\nexport const _buildComponentFromElement_ = (element: Element, __parent__: any):Component => {\n const __shadowed_not_set = (element.getAttribute(\"shadowed\") === null);\n const __tplsource_attr_not_set = (element.getAttribute(\"template-source\") === null);\n const shadowed = (element.getAttribute(\"shadowed\") === \"true\");\n const __cached_not_set = (element.getAttribute(\"cached\") === null);\n const cached = (element.getAttribute(\"cached\") === \"true\");\n let tplextension = (typeof CONFIG.get(\"tplextension\") !== \"undefined\") ? (CONFIG.get(\"tplextension\")) : (\"html\");\n tplextension = (element.getAttribute(\"tplextension\") !== null) ? (element.getAttribute(\"tplextension\")) : (tplextension);\n let _componentName = element.getAttribute(\"name\");\n const _componentClassName = (element.getAttribute(\"componentClass\") !== null) ? (element.getAttribute(\"componentClass\")) : (\"Component\");\n const __componentClassName = (CONFIG.get(\"preserveComponentBodyTag\")) ? (\n (_componentName !== null) ? (\"com.qcobjects.components.\" + _componentName + \".ComponentBody\") : (\"com.qcobjects.components.ComponentBody\")\n ) : (_componentClassName);\n _componentName = (_componentName !== null) ? (_componentName) : (\n (ClassFactory(__componentClassName as string) &&\n typeof (ClassFactory(__componentClassName as string) as unknown as typeof Component).name !== \"undefined\"\n ) ? (\n (ClassFactory(__componentClassName as string) as unknown as Component).name\n ) : (\"\")\n );\n const __classDefinition = ClassFactory(__componentClassName as string) as Component;\n const __tplsource_prop_set = !!((__componentClassName !== \"Component\" && ((typeof __classDefinition !== \"undefined\" && typeof __classDefinition.tplsource === \"string\") && __classDefinition.tplsource !== \"\")));\n const tplsource = (__tplsource_attr_not_set && __tplsource_prop_set) ? (__classDefinition.tplsource) : ((__tplsource_attr_not_set) ? (\"default\") : (element.getAttribute(\"template-source\")));\n logger.debug(`template source for ${_componentName} is ${tplsource} `);\n logger.debug(`type for ${_componentName} is ${__getType__(__classDefinition)} `);\n\n const componentURI: string = ComponentURI({\n \"COMPONENTS_BASE_PATH\": CONFIG.get(\"componentsBasePath\"),\n \"COMPONENT_NAME\": _componentName ,\n \"TPLEXTENSION\": tplextension,\n \"TPL_SOURCE\": tplsource as string\n });\n if (CONFIG.get(\"preserveComponentBodyTag\")) {\n Package((_componentName !== \"\") ? (\"com.qcobjects.components.\" + _componentName + \"\") : (\"com.qcobjects.components\"), [\n Class(\"ComponentBody\", Component, {\n name: _componentName,\n tplsource,\n tplextension,\n reload: true\n })\n ]);\n }\n\n const __create_component_instance_ = function ():Component {\n const __shadowed = (__shadowed_not_set) ? ((__classDefinition && __classDefinition.shadowed) || Component.shadowed) : (shadowed);\n const __definition = {\n __parent__,\n name: _componentName,\n cached: (__cached_not_set) ? (Component.cached) : (cached),\n shadowed: __shadowed,\n tplextension,\n body: (CONFIG.get(\"preserveComponentBodyTag\")) ? (_DOMCreateElement(\"componentBody\")) : (element),\n templateURI: componentURI,\n tplsource\n };\n if (typeof _componentName === \"undefined\" || _componentName === \"\" || _componentName === null) {\n /* this allows to use the original property defined\n in the component definition if it is not present in the tag */\n delete (__definition as any).name;\n }\n if (componentURI === \"\") {\n /* this allows to use the original property defined\n in the component definition if it is not present in the tag */\n delete (__definition as any).templateURI;\n }\n const newComponent = New(__classDefinition, __definition) as Component;\n\n if (CONFIG.get(\"preserveComponentBodyTag\")) {\n if (typeof newComponent !== \"undefined\") {\n element.append(newComponent.body as string | Node);\n }\n }\n return newComponent;\n };\n const newComponent = __create_component_instance_();\n return newComponent;\n};\n\nexport const _buildComponentsFromElements_ = (elements: HTMLElement[], __parent__: Component | null):Component[] => {\n let componentsBuiltWith:Component[] = [];\n if (isBrowser) {\n componentsBuiltWith = elements.map(\n function (element: any) {\n return _buildComponentFromElement_(element, __parent__);\n }\n );\n } else {\n logger.debug(\"[_buildComponentsFromElements_] not implemented for Non-Browser environments\");\n }\n return componentsBuiltWith;\n};\n\nexport const buildComponents = (element:HTMLElement):Component[] => {\n const tagFilter = _tag_filter_;\n const elements = (element as unknown as IQCObjectsElement).subelements(tagFilter) as HTMLElement[];\n return _buildComponentsFromElements_(elements, null);\n};", "import { _basePath_ } from \"./basePath\";\nimport { _Crypt } from \"./Crypt\";\nimport { _domain_ } from \"./domain\";\nimport { InheritClass } from \"./InheritClass\";\nimport { logger } from \"./Logger\";\nimport { Package } from \"./Package\";\nimport { _secretKey } from \"./secretKey\";\nimport { CONFIG } from \"./CONFIG\";\nimport { IJSONService, IService, TServiceDoneResponse, TServiceStandardResponse } from \"./types/global\";\n\nexport class Service extends InheritClass implements IService{\n options!: object;\n withCredentials!: boolean;\n useHTTP2: any;\n // eslint-disable-next-line no-unused-vars\n mockup({ request, service }: TServiceStandardResponse): void {\n throw new Error(\"Method not implemented.\");\n }\n name!: string;\n responseHeaders: any;\n // eslint-disable-next-line no-unused-vars\n local({ request, service }: TServiceStandardResponse): void {\n throw new Error(\"Method not implemented.\");\n }\n kind = \"rest\";\n /* it can be rest, mockup, local */\n domain:string = _domain_;\n basePath:string = _basePath_;\n url = \"\";\n method = \"GET\";\n data = {};\n reload = false;\n cached = false;\n\n headers: any;\n template: unknown;\n \n // eslint-disable-next-line no-unused-vars\n done({ request, service }: TServiceDoneResponse): void {\n throw new Error(\"Method not implemented.\");\n }\n // eslint-disable-next-line no-unused-vars\n fail(...args: any[]): void {\n throw new Error(\"Method not implemented.\");\n }\n\n set(name:string, value:never):void {\n this[name] = value;\n }\n\n get(name:string, _default?:never):any {\n return this[name] as never || _default;\n }\n\n}\n\nexport class JSONService extends Service implements IJSONService{\n method = \"GET\";\n cached = false;\n headers = {\n \"Content-Type\": \"application/json\",\n \"charset\": \"utf-8\"\n };\n\n JSONresponse?:JSON = undefined;\n done(result:TServiceDoneResponse):void {\n logger.debug(\"***** RECEIVED RESPONSE:\");\n logger.debug(result.service.template as string);\n this.JSONresponse = JSON.parse(result.service.template as string);\n }\n\n\n\n}\n\nexport class ConfigService extends JSONService {\n method = \"GET\";\n cached = false;\n configFileName = \"config.json\";\n headers = {\n \"Content-Type\": \"application/json\",\n \"charset\": \"utf-8\"\n };\n\n configLoaded():Promise{\n throw Error (\"Method not implemented.\");\n }\n\n JSONresponse?:JSON = undefined;\n done(result:TServiceDoneResponse):void {\n logger.debug(\"***** CONFIG LOADED:\");\n logger.debug(result.service.template as string);\n this.JSONresponse = JSON.parse(result.service.template as string);\n if (Object.hasOwn(this.JSONresponse as object, \"__encoded__\")) {\n const decodedValue:string = _Crypt.decrypt((this.JSONresponse as any)?.__encoded__, _secretKey);\n this.JSONresponse = JSON.parse(decodedValue);\n }\n const jsonResponse:any = this.JSONresponse;\n Object.keys(jsonResponse as object).map((k:string) => {\n CONFIG.set(k, (jsonResponse as never)[k]);\n return k;\n });\n this.configLoaded().catch((e:any)=>{throw new Error (`An error ocurred: ${e}`);});\n }\n\n fail():void {\n this.configLoaded().catch((e:any)=>{throw new Error (`An error ocurred: ${e}`);});\n }\n\n constructor() {\n super();\n this.set(\"url\", `${this.get(\"basePath\") as string}${this.get(\"configFileName\") as string}` as never);\n }\n}\n\n\nPackage(\"com.qcobjects.api\", [\n Service\n]);\n\nPackage(\"com.qcobjects.api.services\", [\n JSONService\n]);\n\nPackage(\"com.qcobjects.api.config\", [\n ConfigService\n]);\n", "import { IGlobalSettings } from \"./types/global\";\nimport { CONFIG } from \"./CONFIG\";\nimport { InheritClass } from \"./InheritClass\";\nimport { Logger, logger } from \"./Logger\";\nimport { Package } from \"./Package\";\nimport { isBrowser } from \"./platform\";\nimport { serviceLoader } from \"./serviceLoader\";\nimport { _top, buildComponentsStack, configService, setConfigService } from \"./top\";\nimport { ConfigService } from \"./Service\";\n\nexport class GlobalSettings extends InheritClass implements IGlobalSettings {\n static __start__(): Promise {\n return GlobalSettings.instance.__start__();\n }\n [key: string]: any;\n\n _GLOBAL: any = {};\n private static _instance: GlobalSettings;\n static get instance(): GlobalSettings {\n if (typeof GlobalSettings._instance === \"undefined\") {\n GlobalSettings._instance = new GlobalSettings();\n }\n return GlobalSettings._instance;\n }\n\n protected _logger: Logger = new Logger();\n get logger(): Logger {\n return this._logger;\n }\n\n set logger(value: Logger) {\n this._logger = value;\n }\n\n set(name: string, value: any): void {\n this._GLOBAL[name] = value;\n }\n\n get(name: string, _default?: any): any {\n let _value: any;\n if (typeof this._GLOBAL[name] !== \"undefined\") {\n _value = this._GLOBAL[name];\n } else if (typeof _default !== \"undefined\") {\n _value = _default;\n }\n return _value;\n }\n\n __start__(): Promise {\n const __load__serviceWorker = function () {\n let _promise: Promise | Promise;\n if (isBrowser) {\n _promise = new Promise(function (resolve, reject) {\n if ((\"serviceWorker\" in navigator) &&\n (typeof CONFIG.get(\"serviceWorkerURI\") !== \"undefined\")) {\n CONFIG.set(\"serviceWorkerScope\", CONFIG.get(\"serviceWorkerScope\") ? (CONFIG.get(\"serviceWorkerScope\")) : (\"/\"));\n navigator.serviceWorker.register(CONFIG.get(\"serviceWorkerURI\"), {\n scope: CONFIG.get(\"serviceWorkerScope\")\n })\n .then(function (registration) {\n logger.debug(\"Service Worker Registered\");\n resolve.call(_promise, registration);\n }, function (registration) {\n logger.debug(\"Error registering Service Worker\");\n reject.call(_promise, registration);\n });\n navigator.serviceWorker.ready.then(function (registration) {\n logger.debug(\"Service Worker Ready\");\n resolve.call(_promise, registration);\n }, function (registration) {\n logger.debug(\"Error loading Service Worker\");\n reject.call(_promise, registration);\n });\n }\n });\n } else {\n _promise = Promise.resolve();\n }\n return _promise;\n };\n const _buildComponents = function () {\n return new Promise((resolve) => {\n if (isBrowser) {\n logger.debug(\"Starting to building components\");\n try {\n buildComponentsStack();\n } catch (e: any) {\n throw Error(`Something went wrong trying to start components tree: ${e.message}`);\n }\n logger.debug(\"Initializing the service worker\");\n __load__serviceWorker.call(_top)\n .catch(function (e) {\n logger.debug(`error loading the service worker ${e}`);\n });\n }\n resolve();\n });\n };\n\n return new Promise((resolve) => {\n logger.debug(\"Starting to load the config settings...\");\n if (CONFIG.get(\"useConfigService\", false)) {\n logger.debug(\"Loading settings using local configuration file...\");\n setConfigService(new ConfigService());\n configService.configLoaded = _buildComponents;\n serviceLoader(configService)\n ?.then((standardResponse: any) => {\n resolve(standardResponse);\n })\n ?.catch((e: any) => { throw new Error(`An error ocurred while trying to load ${configService.url}: ${e}`); });\n } else {\n logger.debug(\"Starting to load the components...\");\n _buildComponents.call(this)\n .then(() => {\n resolve({});\n })\n .catch((e: any) => { throw new Error(`An error ocurred while trying to build the components stack. ${e}`); });\n }\n\n });\n }\n\n}\n\nPackage(\"com.qcobjects\", [\n GlobalSettings\n]);\n", "import { IComplexStorageCache, IComponent, IConfigService, IQCObjectsElement } from \"./types/global\";\nimport { buildComponents } from \"./ComponentFactory\";\nimport { _CastProps } from \"./Cast\";\nimport { GlobalSettings } from \"./globalSettings\";\nimport { Class } from \"./Class\";\nimport { ClassFactory } from \"./ClassFactory\";\nimport { Export } from \"./Export\";\nimport { isBrowser } from \"./platform\";\nimport { _QC_CLASSES, getPackagesNamesList, getPackagesList, getClassesList, getClassesNamesList } from \"./PrimaryCollections\";\nimport { logger } from \"./Logger\";\n\ntype QCObjects = {\n lastCache?:IComplexStorageCache,\n componentsStack:IComponent[],\n Microservice:any,\n Route:any,\n BackendMicroservice:any,\n QCObjectsElement:any,\n QCObjectsShadowedElement:any,\n Logger:any,\n Class:any, \n _Crypt:any, \n TagElements:any, \n DefaultTemplateHandler:any, \n SourceJS:any, \n SourceCSS:any, \n ArrayList:any, \n ArrayCollection:any, \n GlobalSettings:any, \n GLOBAL:any, \n DDO:any, \n CacheController:any, \n ComplexCacheParams:any, \n ComplexStorageCache:any, \n ComponentWidget:any, \n asyncLoad:any, \n RegisterClass:any, \n ComponentURI:any, \n waitUntil:any, \n super:any, \n _DOMCreateElement:any, \n shortCode:any, \n getType:any, \n is_a:any, \n _DataStringify:any, \n serviceLoader:any, \n componentLoader:any, \n ObjectName:any, \n isQCObjects_Class:any, \n isQCObjects_Object:any, \n NamespaceRef:any, \n RegisterWidget:any, \n RegisterWidgets:any, \n range:any, \n getDocumentLayout:any, \n Export:any, \n New:any, \n Tag:any, \n Ready:any, \n methods:any, \n // eslint-disable-next-line no-unused-vars\n set:(name:string, value:any) => void, \n // eslint-disable-next-line no-unused-vars\n get:(name:string, _default?:any) => any, \n start:any, \n InheritClass:any, \n Processor:any, \n ComponentParams:any, \n ComponentDoneResponse:any, \n Component:any, \n CONFIG:any, \n ControllerParams:any, \n Controller:any, \n ViewParams:any, \n View:any, \n Service:any, \n JSONService:any, \n ConfigService:any, \n VO:any, \n EffectParams:any, \n Effect:any, \n TransitionEffect:any, \n TimerParams:any, \n Timer:any, \n Toggle:any, \n logger:any, \n sdk:any, \n global:any, \n ClassFactory:any, \n Package:any, \n Import:any,\n _sdk_:any,\n ClassesList:any[], \n PackagesList:any[],\n PackagesNameList:any[],\n ClassesNameList:any[]\n} & typeof self & typeof global ;\n\nexport var _top: QCObjects = (\n (typeof module !== \"undefined\" && typeof module.exports !== \"undefined\" && module.exports) ||\n (typeof global !== \"undefined\" && global) ||\n (typeof globalThis !== \"undefined\" && globalThis) ||\n (typeof window !== \"undefined\" && window) ||\n (typeof self !== \"undefined\" && self !== null && self) ||\n this\n) as QCObjects;\n(_top as any).lastCache = undefined;\nexport let componentsStack:IComponent[] = [];\n\nexport const resetTop = ():void => {\n const globalSettings = GlobalSettings.instance;\n _top = _CastProps(globalSettings, _top, true);\n};\n\nexport const buildComponentsStack = ():void => {\n componentsStack = buildComponents(document as unknown as IQCObjectsElement);\n};\nexport let configService:IConfigService;\nexport const setConfigService = (_configService:IConfigService):void => {\n _top.global.configService = _configService;\n configService = _configService;\n};\n\nexport const set = (name:string, value:any):void => {\n _top[name as never] = value;\n};\n\nexport const get = (name:string, _defaultValue?:any):any => {\n return _top[name as never] || _defaultValue;\n};\n\nresetTop();\n\nconst _define_props = function (_top: any) {\n if (!Object.hasOwn(_top, \"PackagesList\")) {\n Object.defineProperty(_top, \"PackagesList\", {\n // eslint-disable-next-line no-unused-vars\n set:(value) => {\n logger.debug(\"PackagesList is readonly\");\n \n },\n get:():any => {\n return getPackagesList();\n }\n });\n \n }\n \n \n if (!Object.hasOwn(_top, \"PackagesNameList\")) {\n Object.defineProperty(_top, \"PackagesNameList\", {\n // eslint-disable-next-line no-unused-vars\n set:(val) => {\n logger.debug(\"PackagesNameList is readonly\");\n\n },\n get:():any =>{\n return getPackagesNamesList();\n }\n });\n\n }\n\n if (!Object.hasOwn(_top, \"ClassesList\")) {\n Object.defineProperty(_top, \"ClassesList\", {\n // eslint-disable-next-line no-unused-vars\n set:(value) => {\n logger.debug(\"ClassesList is readonly\");\n\n },\n get:(): any => {\n return getClassesList();\n }\n });\n }\n\n if (!Object.hasOwn(_top, \"ClassesNameList\")) {\n Object.defineProperty(_top, \"ClassesNameList\", {\n // eslint-disable-next-line no-unused-vars\n set(value):any {\n logger.debug(\"ClassesNameList is readonly\");\n\n },\n get:(): any => {\n return getClassesNamesList();\n }\n });\n\n }\n\n\n };\n\n\n if (isBrowser) {\n // use of GLOBAL word is deprecated in node.js\n // this is only for compatibility purpose with old versions of QCObjects in browsers\n Class(\"GLOBAL\", (_QC_CLASSES as any).global); // case insensitive for compatibility con old versions;\n Export(ClassFactory(\"GLOBAL\"));\n }\n\n if (isBrowser && typeof window !== \"undefined\") {\n set(\"global\", window);\n } else if (isBrowser && typeof globalThis !== \"undefined\") {\n set(\"global\", globalThis);\n }\n\n _define_props(_top);\n", "import { logger } from \"./Logger\";\nimport { isBrowser } from \"./platform\";\n\nexport let supportsPassive = false;\nexport const captureFalseTouch = ():boolean | { passive: boolean; } => {\n return (supportsPassive) ? ({\n passive: true\n }) : (false);\n};\n\n// Test via a getter in the options object to see if the passive property is accessed\nif (isBrowser) {\n try {\n const opts = Object.defineProperty({}, \"passive\", {\n get() {\n supportsPassive = true;\n return supportsPassive;\n }\n });\n (window as any).addEventListener(\"testPassive\", null, opts);\n (window as any).removeEventListener(\"testPassive\", null, opts);\n } catch (e:any) {\n logger.debug(`An error ocurred: ${e}.`);\n supportsPassive = false;\n }\n\n} else {\n supportsPassive = false;\n}", "import { _protected_code_ } from \"./introspection\";\n\nexport const range = (start: number, stop = 0, step = 1): number[] => {\n if (stop === 0 || typeof stop === \"undefined\") {\n stop = start;\n start = 0;\n }\n return Array.from({\n length: (stop - start) / step + 1\n }, function (_, i) {\n return start + (i * step);\n });\n};\n(_protected_code_)(range);\n\n", "import { logger } from \"./Logger\";\nimport { GlobalProcessor as Processor } from \"./Processor\";\nimport { _top } from \"./top\";\nimport { range } from \"./range\";\nimport { IComponent } from \"./types/global\";\n\n// Set Processors\nexport const setDefaultProcessors = ():void => {\n (function (_top):void {\n\n const mapper = (componentInstance:IComponent, componentName:string, valueName:string):string => {\n /*\n * Mapper processor\n * @usage\n * $mapper(,)\n *\n * Where componentName is the name of the component (same value as in attribute tag name) without quotes\n * and valueName is the name of the variable that contains the value to map, it can be either a property of\n * the component instance, the data object or a global value\n */\n \n if (typeof componentInstance === \"undefined\" || componentInstance === null) {\n throw Error(`mapper.${componentName}.${valueName} does not have a component instance or it is null.`);\n }\n const globalValue = _top.global.get(valueName);\n const componentValue = componentInstance.get(valueName);\n const dataValue = componentInstance.data[valueName];\n const list = (typeof dataValue !== \"undefined\") ? (dataValue) : ((typeof componentValue !== \"undefined\") ? (componentValue) : (globalValue));\n let listItems = \"\";\n if (typeof list !== \"undefined\" && typeof list.map !== \"undefined\") {\n listItems = list.map(function (element:HTMLElement) {\n const dataItems = [...Object.keys(element)].map(k => ` data-${k}=\"${(typeof (element as any)[k] !== \"undefined\" && (element as any)[k] !== null) ? ((element as any)[k].toString()) : (\"\")}\"`).join(\"\");\n return ``;\n }).join(\"\");\n } else {\n logger.debug(`${componentName}.${valueName} does not have a map property`);\n }\n return listItems;\n };\n Processor.setProcessor(mapper);\n \n const layout = function (componentInstance:IComponent, layoutname:string, cssfile:string):string {\n /*\n * Layout processor\n * @usage\n * $layout(, )\n * Where layoutname can be \"portrait\" or \"landscape\" without quotes\n * cssfile is the uri for the css file to import\n */\n \n const layout_portrait = `\n /* CSS Document for Mobile Imports */\n @import url(\"${cssfile}\") (orientation:portrait);\n @import url(\"${cssfile}\") (max-width:460px);\n @import url(\"${cssfile}\") (aspect-ratio: 9/16);\n @import url(\"${cssfile}\") (aspect-ratio: 10/16);\n @import url(\"${cssfile}\") (aspect-ratio: 5/8);\n @import url(\"${cssfile}\") (aspect-ratio: 3/4);\n @import url(\"${cssfile}\") (aspect-ratio: 2/3);\n `;\n const layout_landscape = `\n @import url(\"${cssfile}\") (orientation:landscape) and (min-width:460px);\n @import url(\"${cssfile}\") (aspect-ratio: 16/9) and (min-width:460px);\n @import url(\"${cssfile}\") (aspect-ratio: 16/10) and (min-width:460px);\n @import url(\"${cssfile}\") (aspect-ratio: 8/5) and (min-width:460px);\n @import url(\"${cssfile}\") (aspect-ratio: 4/3) and (min-width:460px);\n @import url(\"${cssfile}\") (aspect-ratio: 3/2) and (min-width:460px);\n `;\n const layout_code = {\n \"landscape\": layout_landscape,\n \"portrait\": layout_portrait\n };\n \n return (Object.hasOwn(layout_code, layoutname)) ? ((layout_code as any)[layoutname] as string) : (\"\");\n };\n \n Processor.setProcessor(layout);\n \n const component = (componentInstance:IComponent ,name:string, componentClass:string, ...args:string[]):string => {\n /*\n * component processor\n * @usage\n * $component(name=, componentClass=, ...)\n * Returns a component tag declaration like:\n * ...>\n */\n const arg = [...args].map(function (a) {\n return {\n [a.split(\"=\")[0]]: a.split(\"=\")[1]\n };\n }).reduce(function (k1, k2) {\n return Object.assign(k1, k2);\n });\n const attrs = [...Object.keys(arg)].map(function (a) {\n return `${a}=${arg[a as any]}`;\n }).join(\" \");\n return ``;\n };\n \n Processor.setProcessor(component);\n \n const quick_component = (componentInstance: IComponent,name:string, componentClass:string, ...args:string[]):string => {\n /*\n * component processor\n * @usage\n * $quick_component(name=, componentClass=, ...)\n * Returns a component tag declaration like:\n * ...>\n */\n const arg = [...args].map(function (a) {\n return {\n [a.split(\"=\")[0]]: a.split(\"=\")[1]\n };\n }).reduce(function (k1, k2) {\n return Object.assign(k1, k2);\n });\n const attrs = [...Object.keys(arg)].map(function (a) {\n return `${a}=${arg[a as any]}`;\n }).join(\" \");\n return ``;\n };\n \n Processor.setProcessor(quick_component);\n \n \n const repeat = (componentInstance:IComponent, length:number, text:string):string => {\n /*\n * Repeat processor\n * @usage\n * $repeat(, )\n * Where length is the number of occurrences of text\n */\n return range(length).map(\n function (index) {\n return text.replace(\"{{index}}\", index.toString());\n }\n ).join(\"\");\n };\n \n Processor.setProcessor(repeat);\n \n })(_top);\n \n};\n\n", "import { CONFIG } from \"./CONFIG\";\nimport { Export } from \"./Export\";\nimport { logger } from \"./Logger\";\nimport { isBrowser } from \"./platform\";\n\nexport const findPackageNodePath = function (packagename:string):string|null {\n let sdkPath = null;\n if (!isBrowser) {\n // eslint-disable-next-line @typescript-eslint/no-require-imports\n const fs = require(\"fs\");\n try {\n let sdkPaths = [\n `${CONFIG.get(\"projectPath\")}${CONFIG.get(\"relativeImportPath\")}`,\n `${CONFIG.get(\"basePath\")}${CONFIG.get(\"relativeImportPath\")}`,\n `${CONFIG.get(\"projectPath\")}`,\n `${CONFIG.get(\"basePath\")}`,\n `${CONFIG.get(\"relativeImportPath\")}`,\n `${process.cwd()}${CONFIG.get(\"relativeImportPath\")}`,\n `${process.cwd()}/node_modules/` + packagename,\n `${process.cwd()}/node_modules`,\n `${process.cwd()}`,\n \"node_modules\",\n \"./\",\n \"\"\n ].concat(module.paths);\n sdkPaths = sdkPaths.filter(p => {\n return (fs).existsSync(p + \"/\" + packagename);\n });\n if (sdkPaths.length > 0) {\n sdkPath = sdkPaths[0];\n logger.info(packagename + \" is Installed.\");\n } else {\n sdkPath = \"\";\n logger.info(`${packagename} is not in a standard path.`);\n }\n } catch (e) {\n // do nothing\n console.log(e);\n }\n\n }\n return sdkPath;\n};\nExport(findPackageNodePath);\n", "import { _basePath_ } from \"./basePath\";\nimport { CONFIG } from \"./CONFIG\";\nimport { _DataStringify } from \"./DataStringify\";\nimport { _DOMCreateElement } from \"./DOMCreateElement\";\nimport { findPackageNodePath } from \"./findPackageNodePath\";\nimport { logger } from \"./Logger\";\nimport { _require_, isBrowser } from \"./platform\";\nimport { _QC_PACKAGES, _QC_PACKAGES_IMPORTED, _QC_READY_LISTENERS } from \"./PrimaryCollections\";\n\n/**\n * Imports a script with the package nomenclature\n *\n * @param {Object} packagename\n * @param {Object} ready\n * @param {Boolean} external\n */\nexport const Import = function (packagename:string, ready?:Function, external?:boolean):Promise<{_imported_?:any, _package_name_?:string}> | undefined {\n\n if (external !== undefined){\n logger.debug(`[Import] Setting external=${external.toString()} resource to import: ${packagename}`);\n } \n if (external) {\n logger.debug(`[Import] Registering external resource to import: ${packagename}`);\n } else {\n logger.debug(`[Import] Registering local resource to import: ${packagename}`);\n }\n let _promise_import_: Promise;\n if (isBrowser) {\n _promise_import_ = new Promise(function (resolve, reject) {\n\n const allPackagesImported = function () {\n let ret = false;\n let cp = 0;\n // eslint-disable-next-line no-unused-vars\n for (const p in _QC_PACKAGES) {\n cp++;\n }\n if (cp < _QC_PACKAGES_IMPORTED.length) {\n ret = false;\n } else {\n ret = true;\n }\n return ret;\n };\n\n const readyImported = function (e: { target: { remove: () => void; }; }) {\n _QC_PACKAGES_IMPORTED.push(ready as never);\n if (allPackagesImported()) {\n _QC_PACKAGES_IMPORTED.map( (_imported_) => {\n return _QC_READY_LISTENERS.push(_imported_);\n });\n }\n if (isBrowser && CONFIG.get(\"removePackageScriptAfterLoading\")) {\n e.target.remove();\n }\n resolve.call(_promise_import_, {\n \"_imported_\": e.target,\n \"_package_name_\": packagename\n });\n };\n\n if (!Object.hasOwn(_QC_PACKAGES, packagename)) {\n const s1:HTMLScriptElement = _DOMCreateElement(\"script\") as unknown as HTMLScriptElement;\n s1.type = CONFIG.get(\"sourceType\", \"text/javascript\");\n s1.async = !!(CONFIG.get(\"asynchronousImportsLoad\"));\n (s1 as any).onreadystatechange = function () {\n if ((s1 as any).readyState === \"complete\") {\n readyImported(s1 as any);\n }\n };\n (s1 as any).onload = readyImported;\n s1.onerror = function (e: any) {\n logger.debug(`An error ocurred: ${e}.`);\n reject.call(_promise_import_, {\n \"_imported_\": s1,\n \"_package_name_\": packagename\n });\n };\n s1.src = (external) ? (CONFIG.get(\"remoteImportsPath\") + packagename + \".js\") : (_basePath_ + CONFIG.get(\"relativeImportPath\") + packagename + \".js\");\n document.getElementsByTagName(\"head\")[0].appendChild(s1);\n }\n });\n _promise_import_.catch(function () {\n logger.debug(\"Import: Error loading a package \");\n });\n\n } else {\n // support to be used in a nodejs environment\n _promise_import_ = new Promise(function (resolve, reject) {\n try {\n const standardNodePath = findPackageNodePath(packagename);\n let packageAbsoluteName = \"\";\n if (standardNodePath !== null) {\n packageAbsoluteName = standardNodePath + \"/\" + packagename;\n } else {\n const jsNodePath = findPackageNodePath(packagename + \".js\");\n if (jsNodePath !== null) {\n packageAbsoluteName = jsNodePath + \"/\" + packagename + \".js\";\n } else {\n packageAbsoluteName = _basePath_ + CONFIG.get(\"relativeImportPath\") + packagename;\n }\n }\n try {\n resolve.call(_promise_import_, {\n \"_imported_\": _require_(`${packageAbsoluteName}`),\n \"_package_name_\": packagename\n });\n } catch (e) {\n reject.call(_promise_import_, {\n \"_imported_\": null,\n \"_package_name_\": packagename,\n \"error\": e\n });\n }\n } catch (e) {\n reject.call(_promise_import_, {\n \"_imported_\": null,\n \"_package_name_\": packagename,\n \"error\": e\n });\n }\n }).catch(function (e) {\n // something wrong importing a package\n logger.debug(\"Something happened when importing \" + packagename);\n console.warn(e);\n });\n }\n _promise_import_.catch(function (e) {\n logger.warn(_DataStringify(e));\n });\n return _promise_import_;\n};\nImport.prototype.toString = function () {\n return \"Import(packagename,ready,external) { [QCObjects native code] }\";\n};\n", "export const __to_number = function (value:any): number {\n return ((isNaN(value)) ? (new Number(0) as number) : (new Number(value) as number));\n};", "import { isQCObjects_Class } from \"./isQCObjects\";\nimport { Package } from \"./Package\";\n\n/**\n * Declare Namespace\n *\n * @param {String} packageName\n * @param {Object} package\n */\nexport const NamespaceRef = function (namespace:string):any {\n const packageInstance = Package(namespace) || [];\n const classes = packageInstance.filter((c:any) => isQCObjects_Class(c)).map((c:any) => {\n return {\n [c.__definition.__classType]: c\n };\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n }).reduce((a:any, b:any):any => {return Object.assign(a, b);});\n return namespace.split(\".\").map(c => {\n return {\n [c]: classes\n };\n }).reverse().reduce((a, b) => {\n b[Object.keys(b).join(\".\")] = a;\n return b;\n });\n};\n", "import { CONFIG } from \"./CONFIG\";\nimport { isBrowser } from \"./platform\";\nimport { _QC_READY_LISTENERS } from \"./PrimaryCollections\";\nimport { _top } from \"./top\";\n\n/**\n * Defines a Custom Ready listener\n */\nexport const Ready = (e:any):void => {\n if (isBrowser) {\n _QC_READY_LISTENERS.push(e.bind(window) as never);\n } else if (typeof global !== \"undefined\") {\n _QC_READY_LISTENERS.push(e.bind(global) as never);\n }\n};\n\nexport const ready:Function = Ready; // case insensitive ready option\n\n/**\n * Default Ready event function for window. Executes all micro ready events of Import calls\n *\n * @param {Object} e\n */\n// eslint-disable-next-line no-unused-vars\nexport const _Ready = (e:any):void => {\n const _execReady = ():void => {\n // eslint-disable-next-line array-callback-return\n _QC_READY_LISTENERS.map(function (_ready_listener_, _r):any {\n if (typeof _ready_listener_ === \"function\") {\n (_ready_listener_ as Function)();\n _QC_READY_LISTENERS.splice(_r, 1);\n }\n });\n };\n if (CONFIG.get(\"delayForReady\") > 0) {\n if (isBrowser) {\n setTimeout(_execReady.bind(window), CONFIG.get(\"delayForReady\"));\n } else if (typeof global !== \"undefined\") {\n setTimeout(_execReady.bind(global), CONFIG.get(\"delayForReady\"));\n }\n } else {\n _execReady.call(_top);\n }\n};\n", "import { IArrayCollection, IArrayList } from \"./types/global\";\nimport { ClassFactory } from \"./ClassFactory\";\nimport { logger } from \"./Logger\";\nimport { New } from \"./New\";\nimport { __to_number } from \"./mathFunctions\";\n\n\nexport class ArrayList extends Array implements IArrayList {\n prototype: any;\n\n unique ():any[] {\n return this.filter(function (value:any, index:any, self:any) {\n return self.indexOf(value) === index;\n });\n };\n\n table(): void {\n console.table(this);\n };\n sum(): number {\n return this.reduce( (prev:any, current:any):number => {\n return (__to_number(prev)) + (__to_number(current));\n }, 0) as number;\n }\n avg(): number {\n return (this.length < 1) ? (0) : (this.reduce( (prev:any, current:any):number => {\n return (((__to_number(prev)) + (__to_number(current))) / 2);\n })) as number;\n }\n min(): number {\n return this.reduce( (prev:any, current:any):number => {\n return (__to_number(prev) <= __to_number(current)) ? (prev) : (current);\n }, Infinity) as number;\n }\n max(): number {\n return this.reduce( (prev:any, current:any):number => {\n return (__to_number(prev) >= __to_number(current)) ? (prev) : (current);\n }, 0) as number;\n }\n sortBy(propName: string, sortAsc?: boolean): any[] {\n const sort_function = (sortAsc) ? (\n function (prev:any, current:any) {\n return current[propName] < prev[propName] ? 1 : -1;\n }\n ) : (\n function (prev:any, current:any) {\n return current[propName] > prev[propName] ? 1 : -1;\n }\n );\n return this.sort(sort_function);\n }\n matrix(length: number, fillValue?: number): any[] {\n const x_func = () => {\n return fillValue;\n };\n return Array.from({\n length: length\n }, x_func);\n }\n matrix2d(length: number, fillValue?: number): any[][] {\n const y_func = function () {\n return fillValue;\n };\n const x_func = function () {\n return Array.from({\n length\n }, y_func);\n };\n return Array.from({\n length\n }, x_func);\n }\n matrix3d(length: number, fillValue?: number): any[][][] {\n const y_func = function () {\n return Array.from({\n length\n }, function () {\n return fillValue;\n });\n };\n const x_func = function () {\n return Array.from({\n length\n }, y_func);\n };\n return Array.from({\n length\n }, x_func);\n }\n\n\n}\n\nexport class ArrayCollection implements IArrayCollection {\n source :ArrayList = New(ArrayList, []);\n changed(prop: string, value: any):void {\n logger.debug(\"VALUE CHANGED\");\n logger.debug(prop);\n logger.debug(value);\n }\n push(value: any):number {\n const self = this;\n logger.debug(\"VALUE ADDED\");\n logger.debug(value);\n return self.source.push(value);\n }\n pop():any {\n const self = this;\n logger.debug(\"VALUE POPPED\");\n return self.source.pop();\n }\n _new_(source: ArrayList):void {\n const self = this;\n let _index = 0;\n self.source = New(ClassFactory(\"ArrayList\"), source);\n for (const _k in self.source) {\n if (!isNaN(_k as any)) {\n logger.debug(\"binding \" + _k.toString());\n (function (_pname:any) {\n Object.defineProperty(self, _pname, {\n set(value) {\n logger.debug(\"setting \" + _pname + \"=\" + value);\n self.source[_pname] = value;\n self.changed(_pname, value);\n },\n get():unknown {\n return self.source[_pname];\n }\n });\n })(_k);\n _index++;\n }\n\n }\n self.source.length = _index;\n Object.defineProperty(self, \"length\", {\n get() {\n return self.source.length;\n }\n });\n }\n}\n\n", "import { IQCObjectsElement, ITagElements } from \"./types/global\";\nimport { ClassFactory } from \"./ClassFactory\";\nimport { New } from \"./New\";\nimport { Package } from \"./Package\";\nimport { isBrowser } from \"./platform\";\nimport { Effect } from \"./Effect\";\nimport { ArrayList } from \"./ArrayCollection\";\n\nexport class TagElements extends ArrayList implements ITagElements {\n show():void {\n this.map(function (element:any) {\n return element.style.opacity = 1;\n });\n }\n hide():void {\n this.map(function (element:any) {\n return element.style.opacity = 0;\n });\n }\n effect(...args:T[]):void {\n const effectArguments = [...args].slice(1);\n const effectClassName = args[0] as string;\n let effectClass = undefined;\n if ((typeof effectClassName).toLowerCase() === \"string\") {\n effectClass = ClassFactory(effectClassName);\n }\n this.map(function (element:any):T {\n return ((effectClass as Effect).apply as Function).apply(effectClass, [element].concat(effectArguments)) as T;\n });\n }\n findElements(elementName:any):any {\n const _o = New(ClassFactory(\"TagElements\"));\n if (isBrowser) {\n for (const _k in this) {\n if (typeof _k === \"number\" && typeof this[_k] !== \"function\" && Object.hasOwn(this[_k], \"subelements\")) {\n _o.push(this[_k].subelements(elementName));\n }\n }\n } else {\n // not yet implemented.\n }\n return _o;\n }\n }\n\n /**\n * Gets the element of DOM found by tag name\n *\n * @param {Object} tagname\n * @param {Object} innerHTML\n */\n export const Tag = function (tagname:string, innerHTML?:string): T[] {\n const _o = New(TagElements);\n if (isBrowser) {\n const o = (document as unknown as IQCObjectsElement).subelements(tagname);\n const addedKeys = [];\n for (let _i = 0; _i < o.length; _i++) {\n if (typeof innerHTML !== \"undefined\" && Object.hasOwn(o[_i], \"innerHTML\")) {\n o[_i].innerHTML = innerHTML;\n }\n if (addedKeys.indexOf(_i) < 0) {\n _o.push(o[_i]);\n addedKeys.push(_i);\n }\n }\n } else {\n // not yet implemented.\n }\n return _o as T[];\n };\n\n\n Package(\"com.qcobjects\",[\n TagElements,\n Tag\n ]);", "import { _Crypt } from \"./Crypt\";\n\nexport const shortCode = (): string => {\n const length = 1000;\n const code1 = _Crypt.encrypt((Math.random() * length).toString().replace(\".\", \"\"), (new Date()).getTime().toString());\n const code2 = _Crypt.encrypt((Math.random() * length).toString().replace(\".\", \"\"), (new Date((new Date()).getTime() - 1000 * 1000)).getTime().toString());\n const shortCode = [...code2].map((o1: any, index: any): any => {\n return [...code1][index] === o1 ? null : o1;\n }).filter((c: any) => c !== null).join(\"\");\n return shortCode;\n};\n", "import { ClassFactory } from \"./ClassFactory\";\n\n/**\n * Returns a method from a superior QCObjects Class\n * It is useful for Class Inheritance in the _new_ and __new__ method constructors\n * @example _super_('MySuperClass','MySuperMethod').call(this,params) #where this is the current instance and params are method parameters\n *\n * @param {String} className\n * @param {String} classMethodName\n * @param {Object} params\n */\nexport const _super_ = function (className: string, classMethodName: string):T {\n return (ClassFactory(className))[classMethodName] as T;\n};\n_super_.prototype.toString = function () {\n return \"_super_(className,classMethodName,params) { [QCObjects native code] }\";\n};\n", "import { logger } from \"./Logger\";\n\nexport const waitUntil = (func:()=>void, exp:()=>any):void => {\n const _waitUntil = (func:()=>void, exp:()=>any):void => {\n const maxWaitCycles = 2000;\n let _w = 0;\n var _t = setInterval(function () {\n if (exp()) {\n clearInterval(_t);\n func();\n logger.debug(\"Ejecuting \" + func.name + \" after wait\");\n } else {\n if (_w < maxWaitCycles) {\n _w += 1;\n logger.debug(\"WAIT UNTIL \" + func.name + \" is true, \" + _w.toString() + \" cycles\");\n } else {\n logger.debug(\"Max execution time for \" + func.name + \" expression until true\");\n clearInterval(_t);\n }\n }\n }, 1);\n };\n setTimeout(function () {\n _waitUntil(func, exp);\n }, 1);\n };\n", "export const subelements = function subelements(this: any, query: string): T[] {\n const _self = this;\n return [..._self.querySelectorAll(query)] as T[];\n};", "import { CONFIG } from \"./CONFIG\";\nimport { findPackageNodePath } from \"./findPackageNodePath\";\nimport { Import } from \"./Import\";\nimport { logger } from \"./Logger\";\nimport { _require_, isBrowser, isNodeCommonJS } from \"./platform\";\n\nconst loadSDK = ():void => {\n if (CONFIG.get(\"useSDK\")) {\n (function () {\n const remoteImportsPath = CONFIG.get(\"remoteImportsPath\");\n const external = (!CONFIG.get(\"useLocalSDK\"));\n CONFIG.set(\"remoteImportsPath\", CONFIG.get(\"remoteSDKPath\"));\n\n let tryImportingSDK = false;\n let sdkName = \"QCObjects-SDK\";\n if (isBrowser) {\n tryImportingSDK = true;\n } else {\n const sdkPath = findPackageNodePath(\"qcobjects-sdk\");\n if (sdkPath !== null) {\n sdkName = \"qcobjects-sdk\";\n tryImportingSDK = true;\n } else if (sdkPath !== \"\"){\n sdkName = \"node_modules/qcobjects-sdk/QCObjects-SDK\";\n tryImportingSDK = true;\n } else {\n tryImportingSDK = false;\n }\n }\n\n if (tryImportingSDK) {\n logger.info(\"Importing SDK... \" + sdkName);\n if (isNodeCommonJS && typeof require !== \"undefined\") {\n const sdk = _require_(\"qcobjects-sdk\");\n if (sdk) {\n logger.debug(\"QCObjects SDK was loaded OK.\");\n } else {\n logger.debug(\"QCObjects SDK could not be imported.\");\n }\n } else {\n Import(sdkName, function () {\n if (external) {\n logger.debug(\"QCObjects-SDK.js loaded from remote location\");\n } else {\n logger.debug(\"QCObjects-SDK.js loaded from local\");\n }\n CONFIG.set(\"remoteImportsPath\", remoteImportsPath);\n }, external)\n ?.catch((e: any) => { throw new Error(`An error ocurred when trying to import: ${e}`); });\n }\n } else {\n logger.debug(\"SDK has not been imported as it is not available at the moment\");\n }\n })();\n }\n\n};\n\nexport default loadSDK;\n", "import { IQCObjectsElement, IQCObjectsShadowedElement } from \"./types/global\";\nimport { _top } from \"./top\";\nimport { _fireAsyncLoad, asyncLoad } from \"./asyncLoad\";\nimport { captureFalseTouch } from \"./captureFalseTouch\";\nimport { _Cast } from \"./Cast\";\nimport { Class } from \"./Class\";\nimport { ClassFactory } from \"./ClassFactory\";\nimport { Component } from \"./Component\";\nimport { ComponentURI } from \"./ComponentFactory\";\nimport { componentLoader } from \"./componentLoader\";\nimport { CONFIG } from \"./CONFIG\";\nimport { _DataStringify } from \"./DataStringify\";\nimport { setDefaultProcessors } from \"./defaultProcessors\";\nimport { Export } from \"./Export\";\nimport { Import } from \"./Import\";\nimport { _methods_, _protected_code_ } from \"./introspection\";\nimport { isQCObjects_Class, isQCObjects_Object } from \"./isQCObjects\";\nimport { logger } from \"./Logger\";\nimport { __to_number } from \"./mathFunctions\";\nimport { NamespaceRef } from \"./NamespaceRef\";\nimport { New } from \"./New\";\nimport { ObjectName } from \"./ObjectName\";\nimport { Package } from \"./Package\";\nimport { is_phonegap, isBrowser } from \"./platform\";\nimport { _Ready, ready, Ready } from \"./Ready\";\nimport { serviceLoader } from \"./serviceLoader\";\nimport { Tag } from \"./Tag\";\nimport { Processor } from \"./Processor\";\nimport { is_a } from \"./is_a\";\nimport { __getType__ } from \"./getType\";\nimport { shortCode } from \"./shortCode\";\nimport { _DOMCreateElement } from \"./DOMCreateElement\";\nimport { ComplexStorageCache } from \"./ComplexStorageCache\";\nimport { _super_ } from \"./super\";\nimport { waitUntil } from \"./waitUntil\";\nimport { subelements } from \"./subelements\";\nimport { GlobalSettings } from \"./globalSettings\";\nimport loadSDK from \"./loadSDK\";\nimport { range } from \"./range\";\n\n(function __qcobjects__(_top: any) {\n if (typeof Object.defineProperty !== \"undefined\" && typeof _top !== \"undefined\") {\n try {\n Object.defineProperty(_top, \"__qcobjects__\", {\n enumerable: true,\n configurable: false,\n writable: false,\n value: __qcobjects__,\n });\n } catch (e: any) {\n logger.debug(`An error ocurred: ${e}`);\n if (typeof _top.__qcobjects__ !== \"undefined\") {\n _top.__qcobjects__.loaded = true;\n }\n }\n }\n if (typeof _top.__qcobjects__.loaded === \"undefined\") {\n _top.__qcobjects__.loaded = true;\n\n if (isBrowser) {\n (Element as unknown as IQCObjectsElement).prototype.subelements = subelements;\n (Document as unknown as IQCObjectsElement).prototype.subelements = subelements;\n (HTMLElement as unknown as IQCObjectsElement).prototype.subelements = subelements;\n if (typeof ShadowRoot !== \"undefined\") {\n (ShadowRoot as unknown as IQCObjectsShadowedElement).prototype.subelements = subelements;\n }\n }\n\n\n logger.debugEnabled = false;\n logger.infoEnabled = true;\n\n /**\n * Basic Type of all elements\n */\n if (isBrowser) {\n (Element as unknown as IQCObjectsElement).prototype.find = function (tag: string): IQCObjectsElement[] {\n const _self = this;\n const _oo: IQCObjectsElement[] = [];\n const _tags = (document as unknown as IQCObjectsElement).subelements(tag);\n _tags.map((_tt, _t) => {\n if ((typeof _tags[_t] !== \"undefined\") && (_tags[_t].parentNode as Element).tagName === _self.parentNode.tagName) {\n _oo.push(_Cast(_tt, (new Object())));\n }\n return _tt;\n });\n return _oo;\n };\n }\n\n if (isBrowser) {\n Element.prototype.append = function QC_Append(child) {\n if (isQCObjects_Object(child) || typeof (child as any).body !== \"undefined\") {\n this.appendChild((child as any).body);\n } else {\n this.appendChild(child as any);\n }\n };\n\n /**\n * A replacement for direct using of innerHTML\n * use: [element].render('content') where 'content' is the string corresponding\n * to the DOM to insert in the element\n **/\n (Element as unknown as IQCObjectsElement).prototype.render = function QC_Render(content: string) {\n const _self = this;\n const _appendVDOM = (_self: any, content: string): any => {\n if (typeof document.implementation.createHTMLDocument !== \"undefined\") {\n const doc = document.implementation.createHTMLDocument(\"\");\n doc.body.innerHTML = content;\n (doc.body as unknown as IQCObjectsElement).subelements(\"*\").map((element): any => {\n return _self.append(element);\n });\n }\n };\n if (typeof this.innerHTML !== \"undefined\") {\n try {\n this.innerHTML += content;\n } catch (e: any) {\n logger.debug(`An error ocurred: ${e}`);\n _appendVDOM(_self, content);\n }\n } else {\n _appendVDOM(_self, content);\n }\n };\n }\n\n\n\n Export(waitUntil);\n Export(_super_);\n Export(ComplexStorageCache);\n Export(ClassFactory);\n Export(_DOMCreateElement);\n Export(shortCode);\n Export(__getType__);\n Export(is_a);\n Package(\"com.qcobjects\", [Processor]);\n\n\n\n\n if (isBrowser) {\n /**\n * Adds a Cast functionality to every Element of DOM\n */\n (Element as unknown as IQCObjectsElement).prototype.Cast = function QC_Cast(_o: T): T {\n const _self: any = this;\n return _Cast(_self, _o) as T;\n };\n }\n\n\n\n if (isBrowser) {\n window.onload = _Ready;\n if (is_phonegap) {\n document.addEventListener(\"deviceready\", _Ready, captureFalseTouch as any);\n }\n } else {\n global.onload = _Ready;\n }\n\n if (isBrowser) {\n window.addEventListener(\"popstate\", function (popStateEvent) {\n popStateEvent.stopImmediatePropagation();\n popStateEvent.stopPropagation();\n Component.route()\n .catch((e: any) => { throw new Error(`An error ocurred when trying to load initial routes. ${e}`); });\n });\n }\n\n\n\n Export(serviceLoader);\n Export(componentLoader);\n Export(ComponentURI);\n Export(ObjectName);\n Export(_DataStringify);\n Export(isQCObjects_Class);\n Export(isQCObjects_Object);\n Export(NamespaceRef);\n\n /**\n * Array math functions\n */\n // eslint-disable-next-line no-unused-vars\n (Array as any).prototype.unique = function (this: T[]): T[] {\n return this.filter(function (value: any, index: any, self: any) {\n return self.indexOf(value) === index;\n });\n };\n (Array as any).unique = function (a: Array): T[] {\n return (a as any).unique() as T[];\n };\n (_protected_code_)((Array as any).unique);\n (_protected_code_)((Array as any).prototype.unique);\n (Array as any).prototype.table = function (): void {\n console.table(this);\n };\n (Array as any).table = function (a: any): void {\n a.table();\n return;\n };\n (_protected_code_)((Array as any).table);\n (_protected_code_)((Array as any).prototype.table);\n (Array as any).prototype.sum = function (): number {\n return this.reduce(function (prev: any, current: any) {\n return (__to_number(prev)) + (__to_number(current));\n }, 0) as number;\n };\n (Array as any).sum = function (a: any): number {\n return a.sum() as number;\n };\n (_protected_code_)((Array as any).sum);\n (_protected_code_)((Array as any).prototype.sum);\n (Array as any).prototype.avg = function (): number {\n return (this.length < 1) ? (0) : (this.reduce(function (prev: any, current: any) {\n return (((__to_number(prev)) + (__to_number(current))) / 2);\n })) as number;\n };\n (Array as any).avg = function (a: any): number {\n return a.avg() as number;\n };\n (_protected_code_)((Array as any).avg);\n (_protected_code_)((Array as any).prototype.avg);\n (Array as any).prototype.min = function (): number {\n return this.reduce(function (prev: number, current: number) {\n return (__to_number(prev) <= __to_number(current)) ? (prev) : (current);\n }, Infinity) as number;\n };\n (Array as any).min = function (a: any): number {\n return a.min() as number;\n };\n (_protected_code_)((Array as any).min);\n (_protected_code_)((Array as any).prototype.min);\n (Array as any).prototype.max = function (): number {\n return this.reduce(function (prev: number, current: number) {\n return (__to_number(prev) >= __to_number(current)) ? (prev) : (current);\n }, 0) as number;\n };\n (Array as any).max = function (a: any): number {\n return a.max() as number;\n };\n (_protected_code_)((Array as any).max);\n (_protected_code_)((Array as any).prototype.max);\n (Array as any).prototype.sortBy = function (propName: string, sortAsc = true): Array[] {\n const sort_function = (sortAsc) ? (\n function (prev: any, current: any) {\n return current[propName] < prev[propName] ? 1 : -1;\n }\n ) : (\n function (prev: any, current: any) {\n return current[propName] > prev[propName] ? 1 : -1;\n }\n );\n return this.sort(sort_function) as Array[];\n };\n (Array as any).sortBy = function (a: any, propName: string, sortAsc = true): Array[] {\n return a.sortBy(propName, sortAsc) as Array[];\n };\n (_protected_code_)((Array as any).sortBy);\n (_protected_code_)((Array as any).prototype.sortBy);\n\n /**\n * Extends the Array prototype to include a method that creates a matrix (2D array)\n * with specified dimensions and fill value.\n *\n * @param {number} _length - The number of rows in the matrix.\n * @param {any} [_fillValue=0] - The value to fill the matrix with (default is 0).\n * @returns {Array>} A 2D array (matrix) filled with the specified value.\n *\n * @example\n * // Create a 3x3 matrix filled with zeros\n * const matrix = [].matrix(3);\n * console.log(matrix);\n * // Output: [0, 0, 0]\n *\n * @example\n * // Create a 2x4 matrix filled with a specific value\n * const matrix = [].matrix(2, 5);\n * console.log(matrix);\n * // Output: [5, 5]\n *\n * @example\n * // Create a 4x2 matrix filled with null values\n * const matrix = [].matrix(4, null);\n * console.log(matrix);\n * // Output: [null, null, null, null]\n */\n (Array as any).prototype.matrix = function (_length: number, _fillValue = 0) {\n // eslint-disable-next-line no-unused-vars\n const x_func = function (x = undefined) {\n return _fillValue;\n };\n return Array.from({\n length: _length\n }, x_func);\n };\n\n /**\n * Creates a matrix (2D array) from a given array.\n * \n * This function extends the Array constructor by adding a static method\n * that generates a matrix with specified dimensions and fill value.\n * \n * @function\n * @param {Array} a - The input array used to generate the matrix.\n * @param {number} _length - The length of the matrix (number of rows).\n * @param {number} [_fillValue=0] - The value to fill the matrix with (default is 0).\n * @returns {Array} A 2D array (matrix) created from the input parameters.\n * \n * @example\n * const myMatrix = Array.matrix(2, 5);\n * // myMatrix will be [5, 5, 5]\n */\n (Array as any).matrix = function (a: any, _length: number, _fillValue = 0): T[] {\n return a.matrix(_length, _fillValue) as T[];\n };\n\n (_protected_code_)((Array as any).matrix);\n (_protected_code_)((Array as any).prototype.matrix);\n\n\n (Array as any).prototype.matrix2d = function (_length: number, _fillValue = 0) {\n // eslint-disable-next-line no-unused-vars\n const y_func = function (y: any) {\n return _fillValue;\n };\n // eslint-disable-next-line no-unused-vars\n const x_func = function (x: any) {\n return Array.from({\n length: _length\n }, y_func);\n };\n return Array.from({\n length: _length\n }, x_func);\n };\n (Array as any).matrix2d = function (a: any, _length: number, _fillValue = 0): T[][] {\n return a.matrix2d(_length, _fillValue) as T[][];\n };\n\n (_protected_code_)((Array as any).matrix2d);\n (_protected_code_)((Array as any).prototype.matrix2d);\n\n (Array as any).prototype.matrix3d = function (_length: number, _fillValue = 0) {\n // eslint-disable-next-line no-unused-vars\n const y_func = function (y: any) {\n return Array.from({\n length: _length\n }, function () {\n return _fillValue;\n });\n };\n // eslint-disable-next-line no-unused-vars\n const x_func = function (x: any) {\n return Array.from({\n length: _length\n }, y_func);\n };\n return Array.from({\n length: _length\n }, x_func);\n };\n\n (Array as any).matrix3d = function (a: any, _length: number, _fillValue = 0): T[][][] {\n return a.matrix3d(_length, _fillValue) as T[][][];\n };\n\n\n (_protected_code_)((Array as any).matrix3d);\n (_protected_code_)((Array as any).prototype.matrix3d);\n\n\n\n (String as unknown as any).prototype.list = function (): string[] {\n const __instance = this;\n return range(0, __instance.length - 1).map(function (i: any): T {\n return __instance[i] as T;\n }) as string[];\n };\n (_protected_code_)((String as unknown as any).prototype.list);\n\n\n\n /**\n * End of array math functions\n */\n\n\n\n setDefaultProcessors();\n\n\n /**\n * Load every component tag declared in the body\n **/\n Ready(function () {\n if (!CONFIG.get(\"useSDK\")) {\n GlobalSettings.__start__()\n .catch((e: any) => {\n throw Error(e);\n });\n }\n });\n\n /*\n Public variables and functions\n */\n Export(Export); /* exports the same Export function once */\n Export(Import);\n Export(Package);\n Export(Class);\n Export(New);\n Export(Tag);\n Export(Ready);\n Export(ready);\n Export(isBrowser);\n Export(_methods_);\n Export(GlobalSettings);\n\n\n (loadSDK)();\n\n if (isBrowser) {\n asyncLoad(function (): any {\n Ready(function () {\n\n /*\n * scroll management custom events\n * usage: document.addEventListener('percentY90',function(e){console.log(e.detail.percentY)});\n * possible events: scrollpercent, defaultscroll, percentY0, percentY25, percentY50, percentY75, percentY90\n */\n\n (function (_top) {\n let ticking = false;\n const scrollHeight = Math.max(\n document.body.scrollHeight, document.documentElement.scrollHeight,\n document.body.offsetHeight, document.documentElement.offsetHeight,\n document.body.clientHeight, document.documentElement.clientHeight\n );\n\n const scrollWidth = Math.max(\n document.body.scrollWidth, document.documentElement.scrollWidth,\n document.body.offsetWidth, document.documentElement.offsetWidth,\n document.body.clientWidth, document.documentElement.clientWidth\n );\n\n function scrollDispatcher(event: any) {\n const percentY = Math.round(_top.scrollY * 100 / scrollHeight);\n const percentX = Math.round(_top.scrollX * 100 / scrollWidth);\n const scrollPercentEventEvent = new CustomEvent(\"scrollpercent\", {\n detail: {\n percentX,\n percentY\n }\n });\n event.target.dispatchEvent(scrollPercentEventEvent);\n let secondaryEventName = \"defaultscroll\";\n const __valid_scrolls__ = [0, 5, 10, 25, 50, 75, 90, 95, 100];\n __valid_scrolls__.filter(function (p) {\n return p === percentY;\n }).map(function (pY: T): T {\n secondaryEventName = \"percentY\" + percentY.toString();\n const secondaryCustomEvent = new CustomEvent(secondaryEventName, {\n detail: {\n percentX,\n percentY\n }\n });\n event.target.dispatchEvent(secondaryCustomEvent);\n return pY;\n });\n\n }\n\n document.addEventListener(\"scroll\", function (event) {\n\n if (!ticking) {\n requestAnimationFrame(function () {\n scrollDispatcher(event);\n ticking = false;\n });\n\n ticking = true;\n }\n });\n\n })(_top);\n\n });\n }, []);\n }\n\n if (!isBrowser) {\n if (typeof _top.global !== \"undefined\" && Object.hasOwn(_top.global, \"_fireAsyncLoad\")) {\n _fireAsyncLoad.call(_top);\n }\n if (typeof _top.global !== \"undefined\" && Object.hasOwn(_top.global, \"onload\")) {\n _top.global.onload.call(_top);\n }\n }\n\n\n /* Freezing Object && Object.prototype to prevent prototype pollution risks */\n (function (isBrowser) {\n const __freeze__ = function () {\n Object.freeze(Object.prototype);\n Object.freeze(Object);\n };\n if (isBrowser && CONFIG.get(\"secureObjects\", false)) {\n Ready(function () {\n __freeze__();\n });\n } else if (CONFIG.get(\"secureObjects\", false)) {\n __freeze__();\n }\n })(isBrowser);\n }\n\n})(_top);\n", "/**\n * QCObjects 2.4\n * ________________\n *\n * Author: Jean Machuca \n *\n * Cross Browser Javascript Framework for MVC Patterns\n * QuickCorp/QCObjects is licensed under the\n * GNU Lesser General Public License v3.0\n * [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)\n *\n * Permissions of this copyleft license are conditioned on making available\n * complete source code of licensed works and modifications under the same\n * license or the GNU GPLv3. Copyright and license notices must be preserved.\n * Contributors provide an express grant of patent rights. However, a larger\n * work using the licensed work through interfaces provided by the licensed\n * work may be distributed under different terms and without source code for\n * the larger work.\n *\n * Copyright (C) 2015 Jean Machuca,\n *\n * Everyone is permitted to copy and distribute verbatim copies of this\n * license document, but changing it is not allowed.\n */\n/* eslint no-unused-vars: \"off\" */\n/* eslint no-redeclare: \"off\" */\n/* eslint no-empty: \"off\" */\n/* eslint strict: \"off\" */\n\n/* eslint no-mixed-operators: \"off\" */\n\n\"use strict\";\n\nexport * as AssignPolyfill from \"./assign\";\nexport * as __top__ from \"./top\";\nexport * as qcobjects from \"./MainProcess\";\nexport {_top, resetTop} from \"./top\";\nexport { _QC_CLASSES, _QC_PACKAGES, _QC_PACKAGES_IMPORTED, _QC_READY_LISTENERS } from \"./PrimaryCollections\";\nexport { _DataStringify } from \"./DataStringify\";\nexport { _DOMCreateElement } from \"./DOMCreateElement\";\nexport { _methods_, _protected_code_ } from \"./introspection\";\nexport { logger, Logger } from \"./Logger\";\nexport { _require_, is_phonegap, isBrowser, isNodeCommonJS } from \"./platform\";\nexport { subelements } from \"./subelements\";\nexport { __is_raw_class__ } from \"./is_raw_class\";\nexport { _LegacyCopy } from \"./LegacyCopy\";\nexport { _fireAsyncLoad, asyncLoad } from \"./asyncLoad\";\nexport { __instanceID } from \"./IncrementInstanceID\";\nexport { ObjectName } from \"./ObjectName\";\nexport { __getType__ } from \"./getType\";\nexport { is_a } from \"./is_a\";\nexport { ComplexStorageCache } from \"./ComplexStorageCache\";\nexport { waitUntil } from \"./waitUntil\";\nexport { _Cast, _CastProps } from \"./Cast\";\nexport { isQCObjects_Class, isQCObjects_Object } from \"./isQCObjects\";\nexport { Package } from \"./Package\";\nexport { ClassFactory } from \"./ClassFactory\";\nexport { Export } from \"./Export\";\nexport { Class } from \"./Class\";\nexport { InheritClass } from \"./InheritClass\";\nexport { _super_ } from \"./super\";\nexport { shortCode } from \"./shortCode\";\nexport { Processor } from \"./Processor\";\nexport { New } from \"./New\";\nexport { _Ready, ready, Ready } from \"./Ready\";\nexport { captureFalseTouch } from \"./captureFalseTouch\";\nexport { serviceLoader } from \"./serviceLoader\";\nexport { componentLoader } from \"./componentLoader\";\nexport { _buildComponentsFromElements_, ComponentURI } from \"./ComponentFactory\";\nexport { NamespaceRef } from \"./NamespaceRef\";\nexport { setDefaultProcessors } from \"./defaultProcessors\";\nexport { Tag, TagElements } from \"./Tag\";\nexport { Import } from \"./Import\";\nexport { BackendMicroservice } from \"./BackendMicroservice\";\nexport { Component } from \"./Component\";\nexport { _Crypt } from \"./Crypt\";\nexport { DefaultTemplateHandler } from \"./DefaultTemplateHandler\";\nexport { SourceJS } from \"./SourceJS\";\nexport { SourceCSS } from \"./SourceCSS\";\nexport { GlobalSettings } from \"./globalSettings\";\nexport { RegisterClass } from \"./RegisterClass\";\nexport { _ComponentWidget_, RegisterWidget, RegisterWidgets } from \"./WidgetsFactory\";\nexport { CONFIG } from \"./CONFIG\";\nexport { Controller } from \"./Controller\";\nexport { View } from \"./View\";\nexport { ConfigService, JSONService, Service } from \"./Service\";\nexport { VO } from \"./VO\";\nexport { Effect } from \"./Effect\";\nexport { TransitionEffect } from \"./TransitionEffect\";\nexport { Timer } from \"./Timer\";\nexport { _tag_filter_ } from \"./tag_filter\";\nexport { range } from \"./range\";\nexport { ArrayCollection, ArrayList } from \"./ArrayCollection\";\nexport { DDO } from \"./DDO\";\nexport { Toggle } from \"./Toggle\";\nexport { findPackageNodePath } from \"./findPackageNodePath\";\nexport { getDocumentLayout } from \"./DocumentLayout\";\nexport { IQCObjectsElement, IQCObjectsShadowedElement } from \"./types/global\";\nexport { __to_number } from \"./mathFunctions\";\nexport {_top as global} from \"./top\";\nexport {__make_global__} from \"./make_global\";\nexport {get, set} from \"./top\";\n", " // Object.assign Polyfilling\n // Reference: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign#Polyfill\n if (typeof Object.assign !== \"function\") {\n // Must be writable: true, enumerable: false, configurable: true\n Object.defineProperty(Object, \"assign\", {\n // eslint-disable-next-line no-unused-vars\n value: function assign(target: null, varArgs: any):any { // .length of function is 2\n \"use strict\";\n if (target === null) { // TypeError if undefined or null\n throw new TypeError(\"Cannot convert undefined or null to object\");\n }\n \n const to = Object(target);\n \n for (let index = 1; index < arguments.length; index++) {\n // eslint-disable-next-line prefer-rest-params\n const nextSource = arguments[index];\n \n if (nextSource !== null) { // Skip over if undefined or null\n for (const nextKey in nextSource) {\n // Avoid bugs when hasOwnProperty is shadowed\n if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {\n to[nextKey] = nextSource[nextKey];\n }\n }\n }\n }\n return to;\n },\n writable: true,\n configurable: true\n });\n }\nexport {};", "import { Http2Stream } from \"http2\";\nimport { Stream } from \"stream\";\nimport { _basePath_ } from \"./basePath\";\nimport { _DataStringify } from \"./DataStringify\";\nimport { _domain_ } from \"./domain\";\nimport { InheritClass } from \"./InheritClass\";\nimport { logger } from \"./Logger\";\nimport { Package } from \"./Package\";\nimport { IMicroservice } from \"./types/global\";\n\nexport class BackendMicroservice extends InheritClass {\n stream: any;\n route: any;\n headers: any;\n request: any;\n\n constructor({\n domain = _domain_,\n basePath = _basePath_,\n body = null,\n stream = null,\n request = null\n }:IMicroservice) {\n super({\n domain,\n basePath,\n body,\n stream,\n request\n });\n logger.debug(\"Initializing BackendMicroservice...\");\n const microservice = this;\n if (typeof this.body === \"undefined\") {\n this.body = null;\n }\n if (typeof body !== \"undefined\") {\n this.body = body;\n }\n this.cors();\n microservice.stream = stream;\n (stream as any)?.on(\"data\", (data: any) => {\n // data from POST, GET\n const requestMethod = (request as any)?.method.toLowerCase();\n const supportedMethods = {\n \"post\": microservice.post.bind(microservice),\n };\n if (Object.hasOwn(supportedMethods, requestMethod)) {\n (supportedMethods as any)[requestMethod].call(microservice, data);\n }\n });\n\n // data from POST, GET\n const requestMethod = (request as any)?.method.toLowerCase();\n const supportedMethods = {\n \"get\": microservice.get.bind(microservice),\n \"head\": microservice.head.bind(microservice),\n \"put\": microservice.put.bind(microservice),\n \"delete\": microservice.delete.bind(microservice),\n \"connect\": microservice.connect.bind(microservice),\n \"options\": microservice.options.bind(microservice),\n \"trace\": microservice.trace.bind(microservice),\n \"patch\": microservice.patch.bind(microservice)\n };\n if (Object.hasOwn(supportedMethods, requestMethod)) {\n (supportedMethods as any)[requestMethod].call(microservice);\n }\n\n\n }\n\n cors():void {\n if (this.route.cors) {\n logger.debug(\"Validating CORS...\");\n const {\n allow_origins,\n allow_credentials,\n allow_methods,\n allow_headers\n } = this.route.cors;\n const microservice = this;\n if (typeof microservice.headers !== \"object\") {\n microservice.headers = {};\n }\n if (typeof microservice.route.responseHeaders !== \"object\") {\n microservice.route.responseHeaders = {};\n }\n if (typeof allow_origins !== \"undefined\") {\n logger.debug(\"CORS: allow_origins available. Validating origins...\");\n // an example of allow_origins is ['https://example.com','http://www.example.com']\n if (allow_origins === \"*\" || (typeof microservice.request.headers.origin === \"undefined\") || [...allow_origins].indexOf(microservice.request.headers.origin) !== -1) {\n // for compatibility with all browsers allways return a wildcard when the origin is allowed\n logger.debug(\"CORS: Adding header Access-Control-Allow-Origin=*\");\n microservice.route.responseHeaders[\"Access-Control-Allow-Origin\"] = \"*\";\n } else {\n logger.debug(\"CORS: Origin is not allowed: \" + microservice.request.headers.origin);\n logger.debug(\"CORS: Forcing to finish the response...\");\n this.body = {};\n try {\n this.done();\n } catch (e:any) {\n logger.debug(`It was not possible to finish the call to the microservice: ${e}`);\n }\n }\n } else {\n logger.debug(\"CORS: no allow_origins available. Allowing all origins...\");\n logger.debug(\"CORS: Adding header Access-Control-Allow-Origin=*\");\n microservice.route.responseHeaders[\"Access-Control-Allow-Origin\"] = \"*\";\n }\n if (typeof allow_credentials !== \"undefined\") {\n logger.debug(`CORS: allow_credentials present. Allowing ${allow_credentials}...`);\n microservice.route.responseHeaders[\"Access-Control-Allow-Credentials\"] = allow_credentials.toString();\n } else {\n logger.debug(\"CORS: No allow_credentials present. Allowing all credentials.\");\n microservice.route.responseHeaders[\"Access-Control-Allow-Credentials\"] = \"true\";\n }\n if (typeof allow_methods !== \"undefined\") {\n logger.debug(`CORS: allow_methods present. Allowing ${allow_methods}...`);\n microservice.route.responseHeaders[\"Access-Control-Allow-Methods\"] = [...allow_methods].join(\",\");\n } else {\n logger.debug(\"CORS: No allow_methods present. Allowing only GET, OPTIONS and POST\");\n microservice.route.responseHeaders[\"Access-Control-Allow-Methods\"] = \"GET, OPTIONS, POST\";\n }\n if (typeof allow_headers !== \"undefined\") {\n logger.debug(`CORS: allow_headers present. Allowing ${allow_headers}...`);\n microservice.route.responseHeaders[\"Access-Control-Allow-Headers\"] = [...allow_headers].join(\",\");\n } else {\n logger.debug(\"CORS: No allow_headers present. Allowing all headers...\");\n microservice.route.responseHeaders[\"Access-Control-Allow-Headers\"] = \"*\";\n }\n } else {\n logger.debug(\"No CORS validation available. You can specify cors in CONFIG.backend.routes[].cors\");\n }\n }\n\n\n head(formData: any):void {\n logger.debug(`[BackendMicroservice.head] Data received: ${_DataStringify(formData)}`);\n this.done();\n }\n\n get(formData: any):void {\n logger.debug(`[BackendMicroservice.get] Data received: ${_DataStringify(formData)}`);\n this.done();\n }\n\n post(formData: any):void {\n logger.debug(`[BackendMicroservice.post] Data received: ${_DataStringify(formData)}`);\n this.done();\n }\n\n put(formData: any):void {\n logger.debug(`[BackendMicroservice.put] Data received: ${_DataStringify(formData)}`);\n this.done();\n }\n\n delete(formData: any):void {\n logger.debug(`[BackendMicroservice.delete] Data received: ${_DataStringify(formData)}`);\n this.done();\n }\n\n connect(formData: any):void {\n logger.debug(`[BackendMicroservice.connect] Data received: ${_DataStringify(formData)}`);\n this.done();\n }\n\n options(formData: any):void {\n logger.debug(`[BackendMicroservice.options] Data received: ${_DataStringify(formData)}`);\n this.done();\n }\n\n trace(formData: any):void {\n logger.debug(`[BackendMicroservice.trace] Data received: ${_DataStringify(formData)}`);\n this.done();\n }\n\n patch(formData: any):void {\n logger.debug(`[BackendMicroservice.patch] Data received: ${_DataStringify(formData)}`);\n this.done();\n }\n\n finishWithBody(stream?: Http2Stream | Stream):void {\n try {\n logger.debug(\"[BackendMicroservice.finishWithBody] Ending the stream...\");\n logger.debug(`[BackendMicroservice.finishWithBody] type of body is: ${typeof this.body}`);\n if (typeof this.body !== \"string\") {\n this.body = _DataStringify(this.body);\n }\n logger.debug(`[BackendMicroservice.finishWithBody] \\n body: ${this.body} `);\n (stream as any)?.write(this.body);\n (stream as any)?.end();\n logger.debug(\"[BackendMicroservice.finishWithBody] Stream ended.\");\n } catch (e:any) {\n logger.debug(`[BackendMicroservice.finishWithBody] Something went wrong ending the stream: ${e}`);\n }\n }\n\n done():void {\n logger.debug(\"[BackendMicroservice.done] Finalizing the response...\");\n const microservice = this;\n const stream = microservice.stream;\n try {\n logger.debug(\"[BackendMicroservice.done] Sending response headers...\");\n if (microservice.route.responseHeaders) {\n logger.debug(`[BackendMicroservice.done] Response headers present: ${Object.keys(microservice.route.responseHeaders).join(\",\")}`);\n stream.respond(microservice.route.responseHeaders);\n } else {\n throw Error(\"[BackendMicroservice.done] No headers present.\");\n }\n } catch (e:any) {\n logger.debug(`[BackendMicroservice.done] Something went wrong sending response headers: ${e}`);\n }\n if (microservice.body !== null) {\n try {\n logger.debug(\"[BackendMicroservice.done] A body of message is present. Finalizing the response...\");\n microservice.finishWithBody.call(microservice, stream);\n } catch (e:any) {\n logger.debug(`[BackendMicroservice.done] Something went wrong finalizing the response: ${e}`);\n }\n } else {\n logger.debug(\"[BackendMicroservice.done] No body present. Ending stream...\");\n stream.end();\n }\n }\n\n\n}\n\nPackage(\"com.qcobjects.api\", [\n BackendMicroservice\n]);\n", "import { DefaultTemplateHandlerParams, IComponent } from \"./types/global\";\nimport { logger } from \"./Logger\";\nimport { GlobalProcessor as Processor } from \"./Processor\";\nimport { RegisterClass } from \"./RegisterClass\";\n\nexport class DefaultTemplateHandler {\n template = \"\";\n __definition = {};\n static __definition = {};\n component?: IComponent;\n\n constructor({ component, template }: DefaultTemplateHandlerParams) {\n this.component = component;\n this.template = template;\n }\n\n assign(data: any): string {\n const templateInstance = this;\n if (typeof templateInstance.component === \"undefined\") {\n throw new Error(\"DefaultTemplateHandler.assign: component is undefined\");\n }\n if (typeof templateInstance.component.processorHandler === \"undefined\") {\n throw new Error(\"DefaultTemplateHandler.assign: component.processorHandler is undefined\");\n }\n const processorHandler = templateInstance.component.processorHandler;\n processorHandler.component = templateInstance.component;\n let parsedAssignmentText = (typeof templateInstance.template !== \"undefined\") ? (templateInstance.template) : (\"\");\n if (typeof data === \"object\") {\n [...Object.keys(data)].map((k): any => {\n let _value = data[k];\n if (typeof _value === \"string\" || typeof _value === \"number\" || (!isNaN(_value))) {\n try {\n _value = Processor.processObject.bind(processorHandler).call(processorHandler, _value, templateInstance.component);\n parsedAssignmentText = parsedAssignmentText.replace((new RegExp(`{{${k}}}`, \"g\")), _value);\n } catch (e: any) {\n logger.warn(`${templateInstance.component?.name} could not parse processors.`);\n throw Error(`${templateInstance.component?.name} could not parse processors. Reason: ${e.message}`);\n }\n }\n return k;\n });\n } else {\n logger.debug(`${templateInstance.component?.name}.data is not an object`);\n }\n try {\n parsedAssignmentText = Processor.processObject.call(processorHandler, parsedAssignmentText, templateInstance.component);\n } catch (e: any) {\n logger.warn(`${templateInstance.component?.name} could not parse processors.`);\n throw Error(`${templateInstance.component?.name} could not parse processors. Reason: ${e.message}`);\n }\n return parsedAssignmentText;\n }\n\n}\nRegisterClass(DefaultTemplateHandler, \"com.qcobjects\");\n", "import { __make_global__ } from \"./make_global\";\nimport { __register_class__ } from \"./PrimaryCollections\";\n\n\n\nexport const RegisterClass = function (_class_:any, __namespace?:string):any {\n return __register_class__(_class_, __namespace);\n};\n__make_global__(RegisterClass);", "import { ISourceJS } from \"./types/global\";\nimport { _basePath_ } from \"./basePath\";\nimport { _Cast } from \"./Cast\";\nimport { _domain_ } from \"./domain\";\nimport { _DOMCreateElement } from \"./DOMCreateElement\";\nimport { InheritClass } from \"./InheritClass\";\nimport { Package } from \"./Package\";\nimport { logger } from \"./Logger\";\n\nexport class SourceJS extends InheritClass implements ISourceJS {\n domain:string= _domain_;\n basePath:string= _basePath_;\n type= \"text/javascript\";\n containerTag= \"body\";\n url= \"\";\n data= {};\n async= false;\n external= false;\n\n constructor(o:any){\n super(o);\n this.body= _DOMCreateElement(\"script\");\n\n }\n set(name:string, value:any):void {\n this[name] = value;\n }\n get(name:string, _default?:any):any {\n return this[name] || _default;\n }\n status= false;\n done():void { }\n fail():void { }\n rebuild():void {\n const context = this;\n try {\n document.getElementsByTagName(context.containerTag)[0].appendChild(\n (function (s:any, url:string, context:any):any {\n s.type = context.type;\n s.src = url;\n s.crossOrigin = (Object.hasOwn(context, \"crossOrigin\")) ? (context.crossOrigin) : (\"anonymous\");\n s.async = context.async;\n s.onreadystatechange = function () {\n if (this.readyState === \"complete\") {\n context.done.call(context);\n }\n };\n s.onload = function (e:any) {\n context.status = true;\n context.done.call(context, e);\n };\n s.onerror = function (e:any) {\n context.status = false;\n context.fail.call(context, e);\n };\n context.body = s;\n return s;\n }).call(this,\n _DOMCreateElement(\"script\"),\n (this.external) ? (this.url) : (this.basePath + this.url), context));\n } catch (e:any) {\n context.status = false;\n logger.debug(`An error ocurred: ${e}`);\n context.fail();\n }\n }\n Cast(o:any):any {\n return _Cast(this, o);\n }\n _new_(properties:any):void {\n this.__new__(properties);\n this.rebuild();\n }\n }\n\n Package(\"com.qcobjects\", [SourceJS]);\n", "import { ISourceCSS, TBody } from \"./types/global\";\nimport { _basePath_ } from \"./basePath\";\nimport { _Cast } from \"./Cast\";\nimport { _domain_ } from \"./domain\";\nimport { _DOMCreateElement } from \"./DOMCreateElement\";\nimport { InheritClass } from \"./InheritClass\";\nimport { isBrowser } from \"./platform\";\nimport { Package } from \"./Package\";\n\nexport class SourceCSS extends InheritClass implements ISourceCSS {\n domain: string = _domain_;\n basePath: string = _basePath_;\n url = \"\";\n data = {};\n async = false;\n external = false;\n\n constructor(o: any) {\n super(o);\n this.body = _DOMCreateElement(\"link\") as TBody;\n }\n fail(): void {\n throw new Error(\"Method not implemented.\");\n }\n Cast(o: any): any {\n return _Cast(this, o);\n }\n set(name: string, value: any): void {\n this[name] = value;\n }\n get(name: string, _default?: any): any {\n return this[name] || _default;\n }\n done(): void { }\n rebuild(): void {\n const context = this;\n if (isBrowser) {\n window.document.getElementsByTagName(\"head\")[0].appendChild(\n (function (s: any, url: string, context: any): any {\n s.type = \"text/css\";\n s.rel = \"stylesheet\";\n s.href = url;\n s.crossOrigin = \"anonymous\";\n s.onreadystatechange = function () {\n if (this.readyState === \"complete\") {\n context.done.call(context);\n }\n };\n s.onload = context.done;\n context.body = s;\n return s;\n }).call(this,\n _DOMCreateElement(\"link\"),\n (this.external) ? (this.url) : (this.basePath + this.url), context));\n }\n }\n}\n\nPackage(\"com.qcobjects\", [SourceCSS]);", " \n/* eslint-disable no-unused-vars */\nimport { _DOMCreateElement } from \"./DOMCreateElement\";\nimport { Export } from \"./Export\";\nimport { _protected_code_ } from \"./introspection\";\nimport { isBrowser } from \"./platform\";\nimport { I_ComponentWidget_ } from \"./types/global\";\n\nclass QCObjectsWidgetNode implements I_ComponentWidget_ {\n writingSuggestions!: string;\n currentCSSZoom!: number;\n ariaColIndexText!: string | null;\n ariaRowIndexText!: string | null;\n accessKey!: string;\n accessKeyLabel!: string;\n autocapitalize!: string;\n dir!: string;\n draggable!: boolean;\n hidden!: boolean;\n inert!: boolean;\n innerText!: string;\n lang!: string;\n offsetHeight!: number;\n offsetLeft!: number;\n offsetParent!: Element | null;\n offsetTop!: number;\n offsetWidth!: number;\n outerText!: string;\n popover!: string | null;\n spellcheck!: boolean;\n title!: string;\n translate!: boolean;\n attachInternals(): ElementInternals {\n throw new Error(\"Method not implemented.\");\n }\n click(): void {\n throw new Error(\"Method not implemented.\");\n }\n hidePopover(): void {\n throw new Error(\"Method not implemented.\");\n }\n showPopover(): void {\n throw new Error(\"Method not implemented.\");\n }\n togglePopover(force?: boolean): boolean {\n throw new Error(\"Method not implemented.\");\n }\n addEventListener(type: unknown, listener: unknown, options?: unknown): void {\n throw new Error(\"Method not implemented.\");\n }\n removeEventListener(type: unknown, listener: unknown, options?: unknown): void {\n throw new Error(\"Method not implemented.\");\n }\n attributes!: NamedNodeMap;\n classList!: DOMTokenList;\n className!: string;\n clientHeight!: number;\n clientLeft!: number;\n clientTop!: number;\n clientWidth!: number;\n id!: string;\n innerHTML!: string;\n localName!: string;\n namespaceURI!: string | null;\n onfullscreenchange!: ((this: Element, ev: Event) => any) | null;\n onfullscreenerror!: ((this: Element, ev: Event) => any) | null;\n outerHTML!: string;\n ownerDocument!: Document;\n part!: DOMTokenList;\n prefix!: string | null;\n scrollHeight!: number;\n scrollLeft!: number;\n scrollTop!: number;\n scrollWidth!: number;\n shadowRoot!: ShadowRoot | null;\n slot!: string;\n tagName!: string;\n attachShadow(init: ShadowRootInit): ShadowRoot {\n throw new Error(\"Method not implemented.\");\n }\n checkVisibility(options?: CheckVisibilityOptions): boolean {\n throw new Error(\"Method not implemented.\");\n }\n closest(selectors: unknown): any {\n throw new Error(\"Method not implemented.\");\n }\n computedStyleMap(): StylePropertyMapReadOnly {\n throw new Error(\"Method not implemented.\");\n }\n getAttribute(qualifiedName: string): string | null {\n throw new Error(\"Method not implemented.\");\n }\n getAttributeNS(namespace: string | null, localName: string): string | null {\n throw new Error(\"Method not implemented.\");\n }\n getAttributeNames(): string[] {\n throw new Error(\"Method not implemented.\");\n }\n getAttributeNode(qualifiedName: string): Attr | null {\n throw new Error(\"Method not implemented.\");\n }\n getAttributeNodeNS(namespace: string | null, localName: string): Attr | null {\n throw new Error(\"Method not implemented.\");\n }\n getBoundingClientRect(): DOMRect {\n throw new Error(\"Method not implemented.\");\n }\n getClientRects(): DOMRectList {\n throw new Error(\"Method not implemented.\");\n }\n getElementsByClassName(classNames: string): HTMLCollectionOf {\n throw new Error(\"Method not implemented.\");\n }\n getElementsByTagName(qualifiedName: unknown): HTMLCollectionOf | HTMLCollectionOf {\n throw new Error(\"Method not implemented.\");\n }\n getElementsByTagNameNS(namespace: unknown, localName: unknown): HTMLCollectionOf {\n throw new Error(\"Method not implemented.\");\n }\n getHTML(options?: GetHTMLOptions): string {\n throw new Error(\"Method not implemented.\");\n }\n hasAttribute(qualifiedName: string): boolean {\n throw new Error(\"Method not implemented.\");\n }\n hasAttributeNS(namespace: string | null, localName: string): boolean {\n throw new Error(\"Method not implemented.\");\n }\n hasAttributes(): boolean {\n throw new Error(\"Method not implemented.\");\n }\n hasPointerCapture(pointerId: number): boolean {\n throw new Error(\"Method not implemented.\");\n }\n insertAdjacentElement(where: InsertPosition, element: Element): Element | null {\n throw new Error(\"Method not implemented.\");\n }\n insertAdjacentHTML(position: InsertPosition, string: string): void {\n throw new Error(\"Method not implemented.\");\n }\n insertAdjacentText(where: InsertPosition, data: string): void {\n throw new Error(\"Method not implemented.\");\n }\n matches(selectors: string): boolean {\n throw new Error(\"Method not implemented.\");\n }\n releasePointerCapture(pointerId: number): void {\n throw new Error(\"Method not implemented.\");\n }\n removeAttribute(qualifiedName: string): void {\n throw new Error(\"Method not implemented.\");\n }\n removeAttributeNS(namespace: string | null, localName: string): void {\n throw new Error(\"Method not implemented.\");\n }\n removeAttributeNode(attr: Attr): Attr {\n throw new Error(\"Method not implemented.\");\n }\n requestFullscreen(options?: FullscreenOptions): Promise {\n throw new Error(\"Method not implemented.\");\n }\n requestPointerLock(options?: PointerLockOptions): Promise {\n throw new Error(\"Method not implemented.\");\n }\n scroll(x?: unknown, y?: unknown): void {\n throw new Error(\"Method not implemented.\");\n }\n scrollBy(x?: unknown, y?: unknown): void {\n throw new Error(\"Method not implemented.\");\n }\n scrollIntoView(arg?: boolean | ScrollIntoViewOptions): void {\n throw new Error(\"Method not implemented.\");\n }\n scrollTo(x?: unknown, y?: unknown): void {\n throw new Error(\"Method not implemented.\");\n }\n setAttribute(qualifiedName: string, value: string): void {\n throw new Error(\"Method not implemented.\");\n }\n setAttributeNS(namespace: string | null, qualifiedName: string, value: string): void {\n throw new Error(\"Method not implemented.\");\n }\n setAttributeNode(attr: Attr): Attr | null {\n throw new Error(\"Method not implemented.\");\n }\n setAttributeNodeNS(attr: Attr): Attr | null {\n throw new Error(\"Method not implemented.\");\n }\n setHTMLUnsafe(html: string): void {\n throw new Error(\"Method not implemented.\");\n }\n setPointerCapture(pointerId: number): void {\n throw new Error(\"Method not implemented.\");\n }\n toggleAttribute(qualifiedName: string, force?: boolean): boolean {\n throw new Error(\"Method not implemented.\");\n }\n webkitMatchesSelector(selectors: string): boolean {\n throw new Error(\"Method not implemented.\");\n }\n baseURI!: string;\n childNodes!: NodeListOf;\n firstChild!: ChildNode | null;\n isConnected!: boolean;\n lastChild!: ChildNode | null;\n nextSibling!: ChildNode | null;\n nodeName!: string;\n nodeType!: number;\n nodeValue!: string | null;\n parentElement!: HTMLElement | null;\n parentNode!: ParentNode | null;\n previousSibling!: ChildNode | null;\n textContent!: string | null;\n appendChild(node: T): T {\n throw new Error(\"Method not implemented.\");\n }\n cloneNode(deep?: boolean): Node {\n throw new Error(\"Method not implemented.\");\n }\n compareDocumentPosition(other: Node): number {\n throw new Error(\"Method not implemented.\");\n }\n contains(other: Node | null): boolean {\n throw new Error(\"Method not implemented.\");\n }\n getRootNode(options?: GetRootNodeOptions): Node {\n throw new Error(\"Method not implemented.\");\n }\n hasChildNodes(): boolean {\n throw new Error(\"Method not implemented.\");\n }\n insertBefore(node: T, child: Node | null): T {\n throw new Error(\"Method not implemented.\");\n }\n isDefaultNamespace(namespace: string | null): boolean {\n throw new Error(\"Method not implemented.\");\n }\n isEqualNode(otherNode: Node | null): boolean {\n throw new Error(\"Method not implemented.\");\n }\n isSameNode(otherNode: Node | null): boolean {\n throw new Error(\"Method not implemented.\");\n }\n lookupNamespaceURI(prefix: string | null): string | null {\n throw new Error(\"Method not implemented.\");\n }\n lookupPrefix(namespace: string | null): string | null {\n throw new Error(\"Method not implemented.\");\n }\n normalize(): void {\n throw new Error(\"Method not implemented.\");\n }\n removeChild(child: T): T {\n throw new Error(\"Method not implemented.\");\n }\n replaceChild(node: Node, child: T): T {\n throw new Error(\"Method not implemented.\");\n }\n ELEMENT_NODE!: 1;\n ATTRIBUTE_NODE!: 2;\n TEXT_NODE!: 3;\n CDATA_SECTION_NODE!: 4;\n ENTITY_REFERENCE_NODE!: 5;\n ENTITY_NODE!: 6;\n PROCESSING_INSTRUCTION_NODE!: 7;\n COMMENT_NODE!: 8;\n DOCUMENT_NODE!: 9;\n DOCUMENT_TYPE_NODE!: 10;\n DOCUMENT_FRAGMENT_NODE!: 11;\n NOTATION_NODE!: 12;\n DOCUMENT_POSITION_DISCONNECTED!: 1;\n DOCUMENT_POSITION_PRECEDING!: 2;\n DOCUMENT_POSITION_FOLLOWING!: 4;\n DOCUMENT_POSITION_CONTAINS!: 8;\n DOCUMENT_POSITION_CONTAINED_BY!: 16;\n DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC!: 32;\n dispatchEvent(event: Event): boolean {\n throw new Error(\"Method not implemented.\");\n }\n ariaAtomic!: string | null;\n ariaAutoComplete!: string | null;\n ariaBrailleLabel!: string | null;\n ariaBrailleRoleDescription!: string | null;\n ariaBusy!: string | null;\n ariaChecked!: string | null;\n ariaColCount!: string | null;\n ariaColIndex!: string | null;\n ariaColSpan!: string | null;\n ariaCurrent!: string | null;\n ariaDescription!: string | null;\n ariaDisabled!: string | null;\n ariaExpanded!: string | null;\n ariaHasPopup!: string | null;\n ariaHidden!: string | null;\n ariaInvalid!: string | null;\n ariaKeyShortcuts!: string | null;\n ariaLabel!: string | null;\n ariaLevel!: string | null;\n ariaLive!: string | null;\n ariaModal!: string | null;\n ariaMultiLine!: string | null;\n ariaMultiSelectable!: string | null;\n ariaOrientation!: string | null;\n ariaPlaceholder!: string | null;\n ariaPosInSet!: string | null;\n ariaPressed!: string | null;\n ariaReadOnly!: string | null;\n ariaRequired!: string | null;\n ariaRoleDescription!: string | null;\n ariaRowCount!: string | null;\n ariaRowIndex!: string | null;\n ariaRowSpan!: string | null;\n ariaSelected!: string | null;\n ariaSetSize!: string | null;\n ariaSort!: string | null;\n ariaValueMax!: string | null;\n ariaValueMin!: string | null;\n ariaValueNow!: string | null;\n ariaValueText!: string | null;\n role!: string | null;\n animate(keyframes: Keyframe[] | PropertyIndexedKeyframes | null, options?: number | KeyframeAnimationOptions): Animation {\n throw new Error(\"Method not implemented.\");\n }\n getAnimations(options?: GetAnimationsOptions): Animation[] {\n throw new Error(\"Method not implemented.\");\n }\n after(...nodes: (Node | string)[]): void {\n throw new Error(\"Method not implemented.\");\n }\n before(...nodes: (Node | string)[]): void {\n throw new Error(\"Method not implemented.\");\n }\n remove(): void {\n throw new Error(\"Method not implemented.\");\n }\n replaceWith(...nodes: (Node | string)[]): void {\n throw new Error(\"Method not implemented.\");\n }\n nextElementSibling!: Element | null;\n previousElementSibling!: Element | null;\n childElementCount!: number;\n children!: HTMLCollection;\n firstElementChild!: Element | null;\n lastElementChild!: Element | null;\n \n append(...nodes: (Node | string)[]): void {\n throw new Error(\"Method not implemented.\");\n }\n \n prepend(...nodes: (Node | string)[]): void {\n throw new Error(\"Method not implemented.\");\n }\n \n querySelector(selectors: unknown): any {\n throw new Error(\"Method not implemented.\");\n }\n \n querySelectorAll(selectors: unknown): NodeListOf {\n throw new Error(\"Method not implemented.\");\n }\n replaceChildren(...nodes: (Node | string)[]): void {\n throw new Error(\"Method not implemented.\");\n }\n assignedSlot!: HTMLSlotElement | null;\n attributeStyleMap!: StylePropertyMap;\n style!: CSSStyleDeclaration;\n contentEditable!: string;\n enterKeyHint!: string;\n inputMode!: string;\n isContentEditable!: boolean;\n onabort!: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;\n onanimationcancel!: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;\n onanimationend!: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;\n onanimationiteration!: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;\n onanimationstart!: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;\n onauxclick!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n onbeforeinput!: ((this: GlobalEventHandlers, ev: InputEvent) => any) | null;\n onbeforetoggle!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onblur!: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;\n oncancel!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n oncanplay!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n oncanplaythrough!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onchange!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onclick!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n onclose!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n oncontextlost!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n oncontextmenu!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n oncontextrestored!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n oncopy!: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;\n oncuechange!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n oncut!: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;\n ondblclick!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n ondrag!: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;\n ondragend!: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;\n ondragenter!: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;\n ondragleave!: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;\n ondragover!: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;\n ondragstart!: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;\n ondrop!: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;\n ondurationchange!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onemptied!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onended!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onerror!: OnErrorEventHandler;\n onfocus!: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;\n onformdata!: ((this: GlobalEventHandlers, ev: FormDataEvent) => any) | null;\n ongotpointercapture!: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;\n oninput!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n oninvalid!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onkeydown!: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;\n onkeypress!: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;\n onkeyup!: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;\n onload!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onloadeddata!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onloadedmetadata!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onloadstart!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onlostpointercapture!: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;\n onmousedown!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n onmouseenter!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n onmouseleave!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n onmousemove!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n onmouseout!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n onmouseover!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n onmouseup!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n onpaste!: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;\n onpause!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onplay!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onplaying!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onpointercancel!: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;\n onpointerdown!: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;\n onpointerenter!: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;\n onpointerleave!: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;\n onpointermove!: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;\n onpointerout!: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;\n onpointerover!: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;\n onpointerup!: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;\n onprogress!: ((this: GlobalEventHandlers, ev: ProgressEvent) => any) | null;\n onratechange!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onreset!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onresize!: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;\n onscroll!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onscrollend!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onsecuritypolicyviolation!: ((this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any) | null;\n onseeked!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onseeking!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onselect!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onselectionchange!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onselectstart!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onslotchange!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onstalled!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onsubmit!: ((this: GlobalEventHandlers, ev: SubmitEvent) => any) | null;\n onsuspend!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n ontimeupdate!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n ontoggle!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n ontouchcancel?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;\n ontouchend?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;\n ontouchmove?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;\n ontouchstart?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;\n ontransitioncancel!: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;\n ontransitionend!: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;\n ontransitionrun!: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;\n ontransitionstart!: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;\n onvolumechange!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onwaiting!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onwebkitanimationend!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onwebkitanimationiteration!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onwebkitanimationstart!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onwebkittransitionend!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onwheel!: ((this: GlobalEventHandlers, ev: WheelEvent) => any) | null;\n autofocus!: boolean;\n dataset!: DOMStringMap;\n nonce?: string | undefined;\n tabIndex!: number;\n blur(): void {\n throw new Error(\"Method not implemented.\");\n }\n focus(options?: FocusOptions): void {\n throw new Error(\"Method not implemented.\");\n }\n\n}\n\nexport let _ComponentWidget_:CustomElementConstructor;\nif (isBrowser) {\n _ComponentWidget_ = class _ComponentWidget_ extends HTMLElement implements I_ComponentWidget_ {\n constructor() {\n super();\n const componentWidget = this;\n const componentName = componentWidget.nodeName.toLowerCase();\n const componentBody = _DOMCreateElement(\"quick-component\");\n const __enabled__atributes__ = componentWidget.getAttributeNames();\n componentBody.setAttribute(\"name\", componentName);\n \n if (!componentWidget.hasAttribute(\"shadowed\")) {\n componentBody.setAttribute(\"shadowed\", \"true\");\n }\n __enabled__atributes__.forEach( (attributeName) => {\n if (componentWidget.hasAttribute(attributeName)) {\n componentBody.setAttribute(attributeName, componentWidget?.getAttribute(attributeName) as any);\n componentWidget.removeAttribute(attributeName);\n }\n });\n const data_attributenames = componentWidget.getAttributeNames().filter(function (a) {\n return a.startsWith(\"data-\");\n }).map(function (a) {\n return a.split(\"-\")[1];\n });\n data_attributenames.forEach(function (_attribute_name_) {\n componentBody.setAttribute(\"data-\" + _attribute_name_, componentWidget?.getAttribute(\"data-\" + _attribute_name_) as any);\n componentWidget.removeAttribute(\"data-\" + _attribute_name_);\n });\n [...(componentWidget as any).children].forEach( (element) => {\n componentBody.appendChild(element.cloneNode(true));\n element.remove();\n });\n \n componentWidget.append(componentBody);\n }\n };\n \n} else {\n _ComponentWidget_ = class _ComponentWidget_ extends QCObjectsWidgetNode {\n constructor (){\n super();\n throw new Error (\"Class not implemented.\");\n }\n };\n}\nExport(_ComponentWidget_);\nexport const RegisterWidget = (widgetName: string):void => {\n if (isBrowser){\n customElements.define(widgetName, class extends _ComponentWidget_ { });\n } else {\n throw new Error (\"RegisterWidget is not implemented for non browser ecosystems yet.\");\n }\n};\nexport const RegisterWidgets = (...args: string[]):void =>{\n const widgetList = [...args];\n widgetList.filter(function (widgetName) {\n return typeof widgetName === \"string\";\n }).map(function (widgetName) {\n return RegisterWidget(widgetName);\n });\n};\n(_protected_code_)(RegisterWidget);\n(_protected_code_)(RegisterWidgets);\nExport(RegisterWidget);\nExport(RegisterWidgets);\n", "import { IController, IComponent, TControllerParams, IQCObjectsElement, IQCObjectsShadowedElement } from \"./types/global\";\nimport { ClassFactory } from \"./ClassFactory\";\nimport { __getType__ } from \"./getType\";\nimport { InheritClass } from \"./InheritClass\";\nimport { logger } from \"./Logger\";\nimport { New } from \"./New\";\nimport { Package } from \"./Package\";\nimport { isBrowser } from \"./platform\";\n\nexport class Controller extends InheritClass implements IController{\n\n component!: IComponent ;\n dependencies?: any[] = [];\n constructor({\n component,\n dependencies\n }: TControllerParams) {\n super({ component, dependencies });\n this.component = component;\n this.dependencies = dependencies;\n if (typeof this.component === \"undefined\" || this.component === null) {\n throw Error(`${__getType__(this)} must be called with a component`);\n }\n }\n\n // eslint-disable-next-line no-unused-vars\n fail?(...args: [...args: any[]] ): void {\n throw new Error(\"Method not implemented.\");\n }\n\n\n routingSelectedAttr(attrName: string):any {\n return this.component?.routingSelected.map( (r: any):any => {\n return r[attrName];\n }).filter(function (v: any) {\n return v;\n }).pop();\n }\n\n isTouchable():boolean {\n return (\"ontouchstart\" in window) ||\n ((navigator as any).MaxTouchPoints > 0) ||\n ((navigator as any).msMaxTouchPoints > 0);\n }\n\n onpress(subelementSelector: string, handler: Function):void {\n if (isBrowser){\n try {\n if (this.isTouchable()) {\n ((this.component?.componentRoot as IQCObjectsElement| IQCObjectsShadowedElement)?.subelements(subelementSelector) as any[])[0].addEventListener(\"touchstart\", handler, {\n passive: true\n });\n } else {\n ((this.component?.componentRoot as IQCObjectsElement | IQCObjectsShadowedElement)?.subelements(subelementSelector) as any[])[0].addEventListener(\"click\", handler, {\n passive: true\n });\n }\n } catch (e:any) {\n logger.debug(`An error ocurred: ${e}.`);\n logger.debug(\"No button to assign press event\");\n }\n \n }\n }\n\n createRoutingController():void {\n const controller = this;\n const component = controller.component;\n const controllerName = controller.routingSelectedAttr(\"controllerclass\");\n if (typeof controllerName !== \"undefined\") {\n const _Controller = ClassFactory(controllerName) as unknown as IController;\n if (typeof _Controller !== \"undefined\" && component !== null) {\n component.routingController = New(_Controller, {\n component\n }) as IController; // Initializes the main controller for the component\n if (typeof component.routingController !== \"undefined\" \n && Object.hasOwn(component.routingController, \"done\") \n && typeof component.routingController.done === \"function\") {\n component.routingController.done.call(component.routingController);\n }\n }\n }\n }\n\n done():void { }\n}\n\nPackage(\"com.qcobjects.controllers\", [\n Controller\n]);\n", "import { __getType__ } from \"./getType\";\nimport { InheritClass } from \"./InheritClass\";\nimport { Package } from \"./Package\";\nimport { TViewParams } from \"./types/global\";\n\nexport class View extends InheritClass {\n constructor({ component = undefined, dependencies = [] }:TViewParams) {\n super({component, dependencies});\n if (typeof this.component === \"undefined\" || this.component === \"null\") {\n throw Error(`${__getType__(this)} must be called with a component`);\n }\n\n }\n }\n\nPackage(\"com.qcobjects.views\", [\n View\n]);", "import { InheritClass } from \"./InheritClass\";\nimport { Package } from \"./Package\";\n\nexport class VO extends InheritClass {}\n\nPackage(\"com.qcobjects.valueObjects\", [\n VO\n ]);", "import { IEffect, TEffectParams } from \"./types/global\";\nimport { InheritClass } from \"./InheritClass\";\nimport { Package } from \"./Package\";\nimport { _methods_, _protected_code_ } from \"./introspection\";\nimport { ClassFactory } from \"./ClassFactory\";\n\nclass Effect extends InheritClass implements IEffect {\n // eslint-disable-next-line no-unused-vars\n done(...args: any[]): any {\n throw new Error(\"Method not implemented.\");\n };\n // eslint-disable-next-line no-unused-vars\n apply(...args: any[]): void {\n throw new Error(\"Method not implemented.\");\n }\n duration = 1000;\n\n\n animate({\n timing,\n draw,\n duration\n }: TEffectParams): void {\n const _self: this = this;\n\n const start = performance.now();\n\n requestAnimationFrame(function animate(time) {\n // timeFraction goes from 0 to 1\n let timeFraction = (time - start) / duration;\n if (timeFraction > 1) timeFraction = 1;\n\n // calculate the current animation state\n const progress = timing(timeFraction);\n\n draw(Math.round(progress * 100)); // draw it\n\n if (timeFraction < 1) {\n requestAnimationFrame(animate);\n } else {\n // if this is an object with a done method\n if (typeof _self !== \"undefined\" &&\n _self !== null &&\n Object.hasOwn(_self, \"done\") &&\n (typeof _self.done).toLowerCase() === \"function\") {\n _self.done.call(_self);\n }\n }\n\n });\n }\n\n}\n\n\nPackage(\"com.qcobjects.effects.base\", [\n Effect\n]);\n\n(_methods_)(ClassFactory(\"Effect\")).map((__c__): any => {\n (_protected_code_)(__c__);\n return __c__;\n});\n\nexport { Effect };", "import { Effect } from \"./Effect\";\nimport { logger } from \"./Logger\";\nimport { Package } from \"./Package\";\nimport { ClassFactory } from \"./ClassFactory\";\nimport { IQCObjectsElement, IQCObjectsShadowedElement } from \"./types/global\";\nimport { ITransitionEffect, IComponent, TTransitionEffectParams } from \"./types/global\";\n\nexport class TransitionEffect extends Effect implements ITransitionEffect{\n duration = 385;\n defaultParams = {\n alphaFrom: 0,\n alphaTo: 1,\n angleFrom: 180,\n angleTo: 0,\n radiusFrom: 0,\n radiusTo: 30,\n scaleFrom: 0,\n scaleTo: 1\n };\n\n fitToHeight = false;\n fitToWidth = false;\n\n component!: IComponent;\n effects!: string[];\n\n apply({\n alphaFrom,\n alphaTo,\n angleFrom,\n angleTo,\n radiusFrom,\n radiusTo,\n scaleFrom,\n scaleTo\n }: TTransitionEffectParams):void {\n const _transition_ = this;\n logger.info(\"EXECUTING TransitionEffect \");\n const componentRoot =_transition_.component.componentRoot as IQCObjectsElement | IQCObjectsShadowedElement | HTMLElement | ShadowRoot;\n\n if (typeof componentRoot !== \"undefined\" && componentRoot !== null){\n if (_transition_.fitToHeight) {\n (componentRoot as any).height = (typeof (componentRoot as HTMLElement).offsetParent === \"object\" && (componentRoot as HTMLElement).offsetParent !== null) ? ((componentRoot as HTMLElement).offsetParent?.scrollHeight) : ((componentRoot as HTMLElement).getBoundingClientRect().height);\n }\n if (_transition_.fitToWidth) {\n (componentRoot as any).width = (typeof (componentRoot as HTMLElement).offsetParent === \"object\" && (componentRoot as HTMLElement).offsetParent !== null) ? ((componentRoot as HTMLElement).offsetParent?.scrollWidth) : ((componentRoot as HTMLElement).getBoundingClientRect().width);\n }\n if (_transition_.component.shadowed){\n ((componentRoot as ShadowRoot).host as HTMLElement).style.display = \"block\";\n } else {\n (componentRoot as HTMLElement).style.display = \"block\";\n }\n _transition_.effects.map( (effectClassName:string):string => {\n\n const __effectClass__ = ClassFactory(effectClassName) as unknown as typeof Effect;\n const effectObj = new __effectClass__({});\n const effectClassMethod = effectObj.apply.bind(_transition_);\n const componentHost = (_transition_.component.shadowed)? ((componentRoot as ShadowRoot).host) : (componentRoot);\n const effectParams = {\n alphaFrom,\n alphaTo,\n angleFrom,\n angleTo,\n radiusFrom,\n radiusTo,\n scaleFrom,\n scaleTo\n }; \n effectClassMethod(componentHost,...Object.values(effectParams));\n return effectClassName;\n });\n \n }\n\n }\n\n}\n\nPackage(\"com.qcobjects.effects.transitions.base\", [\n TransitionEffect\n]);\n", "import { ITimer, TTimerParams } from \"./types/global\";\nimport { InheritClass } from \"./InheritClass\";\nimport { Package } from \"./Package\";\n\nexport class Timer extends InheritClass implements ITimer {\n\n\n duration = 1000;\n alive = true;\n thread({\n timing,\n intervalInterceptor,\n duration\n }:TTimerParams):void {\n const timer = this;\n\n const start = performance.now();\n\n requestAnimationFrame(function thread(time) {\n // timeFraction goes from 0 to 1\n const elapsed = (time - start);\n let timeFraction = elapsed / duration;\n if (timeFraction > 1) timeFraction = 1;\n\n // calculate the current progress state\n const progress = timing(timeFraction, elapsed);\n\n intervalInterceptor(Math.round(progress * 100)); // draw it\n\n if ((timeFraction < 1 || duration === -1) && timer.alive) {\n requestAnimationFrame(thread);\n }\n\n });\n }\n\n\n }\n\nPackage(\"com.qcobjects.timing\", [\n Timer\n ]);\n", "import { TDDOParams } from \"./types/global\";\nimport { Export } from \"./Export\";\nimport { InheritClass } from \"./InheritClass\";\nimport { logger } from \"./Logger\";\nimport { ObjectName } from \"./ObjectName\";\n\n/**\n * Dynamic Data Objects Class\n * Usage:\n * Class('TestDDO',{\n * data: {},\n * _new_ (){\n * this.ddo = New(DDO,{\n * instance:this,\n * name:'data',\n * value:{},\n * fget (value){\n * logger.debug('returned value '+ value );\n * }\n * })\n * }\n * });\n *\n */\nexport class DDO extends InheritClass {\n constructor({\n instance,\n name,\n fget,\n fset,\n value\n }:TDDOParams) {\n super({\n instance,\n name,\n fget,\n fset,\n value\n });\n this._new_({\n instance,\n name,\n fget,\n fset,\n value\n });\n\n }\n\n _new_({\n instance,\n name,\n fget,\n fset\n }:TDDOParams):void {\n const ddoInstance = this;\n var name = (typeof name === \"undefined\") ? (ObjectName(ddoInstance)) : (name);\n\n Object.defineProperty(instance, name, {\n set(val) {\n const _value = val;\n logger.debug(\"value changed \" + name);\n let ret;\n if (typeof fset !== \"undefined\" && typeof fset === \"function\") {\n ret = fset(_value);\n } else {\n ret = _value;\n }\n instance[\"_\" + name] = ret;\n \n },\n get():any {\n const _value = instance[\"_\" + name];\n logger.debug(\"returning value \" + name);\n const is_ddo = (v:any):any => {\n if (typeof v === \"object\" && Object.hasOwn(v, \"value\")) {\n return v.value;\n }\n return v;\n };\n let ret;\n if (typeof fget !== \"undefined\" && typeof fget === \"function\") {\n ret = fget(is_ddo(_value));\n } else {\n ret = is_ddo(_value);\n }\n return ret;\n }\n });\n }\n\n}\nExport(DDO);\n", "import { InheritClass } from \"./InheritClass\";\nimport { logger } from \"./Logger\";\nimport { Package } from \"./Package\";\nexport class Toggle extends InheritClass {\n _toggle = false;\n _inverse = true;\n _positive:Function|null = null;\n _negative:Function|null = null;\n _dispatched:Function|null = null;\n _args = {};\n\n constructor(positive: Function, negative: Function, args: Array) {\n super({positive, negative, args});\n this._new_({positive, negative, args});\n }\n\n changeToggle():void {\n this._toggle = !(this._toggle);\n }\n\n _new_({\n positive,\n negative,\n args\n }:{positive: Function, negative: Function, args: Array}):void {\n this._positive = positive;\n this._negative = negative;\n this._args = args;\n }\n\n fire():Promise {\n const toggle = this;\n var _promise = new Promise(function (resolve, reject) {\n\n if (typeof toggle._positive === \"function\" && typeof toggle._negative === \"function\") {\n if (toggle._inverse) {\n toggle._dispatched = (toggle._toggle) ? (toggle._negative.bind(toggle)) : (toggle._positive.bind(toggle));\n } else {\n toggle._dispatched = (toggle._toggle) ? (toggle._positive.bind(toggle)) : (toggle._negative.bind(toggle));\n }\n toggle._dispatched?.call(toggle, toggle._args);\n resolve.call(_promise, toggle);\n } else {\n logger.debug(\"Toggle functions are not declared\");\n reject.call(_promise, toggle as Toggle);\n }\n return toggle;\n }).then(function (toggle:Toggle) {\n toggle.changeToggle();\n return toggle;\n }).catch(function (e) {\n logger.debug(e.toString());\n return toggle;\n }).finally(()=> {\n return toggle;\n });\n return _promise;\n }\n\n\n}\n\nPackage(\"com.qcobjects.tools.essentials\", [\n Toggle\n]);\n", "export const getDocumentLayout = function ():string|undefined {\n const h = (w:number, h:number) => {\n return w > h ? \"landscape\" : null;\n };\n const v = (w:number, h:number) => {\n return h > w ? \"portrait\" : null;\n };\n const square = (w:number, h:number) => {\n return w === h ? \"square\" : null;\n };\n return [\n h(document.documentElement.clientWidth, document.documentElement.clientHeight),\n v(document.documentElement.clientWidth, document.documentElement.clientHeight),\n square(document.documentElement.clientWidth, document.documentElement.clientHeight)\n ].filter(e => e !== null).pop();\n };\n", "import * as QCObjects from \"./qcobjects.js\";\nexport default QCObjects;\n"], + "sourcesContent": ["export const __is_raw_class__ = (o_c: any): boolean => {\n return !!((typeof o_c === \"function\" && o_c.toString().startsWith(\"class\")));\n};\n", "/**\n * Returns the object or function name\n *\n * @param Object or function\n */\nexport const ObjectName = (o: any):string => {\n let ret = \"\";\n if (typeof o === \"function\" && Object.hasOwn(o, \"name\") && o.name !== \"\") {\n ret = o.name;\n } else if (typeof o !== \"undefined\" && typeof o.constructor === \"function\" && o.constructor.name !== \"\") {\n ret = o.constructor.name;\n } else if (typeof o !== \"undefined\" && typeof o.constructor === \"object\") {\n ret = o.constructor.toString().replace(/\\[(.*?)\\]/g, \"$1\").split(\" \").slice(1).join(\"\");\n }\n return ret;\n};", "import { __is_raw_class__ } from \"./is_raw_class\";\nimport { ObjectName } from \"./ObjectName\";\n\n/**\n * Determine the type of the Object for any QCObjects Object\n *\n * @param {Object} object\n */\nexport const __getType__ = function __getType__(o_c: any): any {\n let _ret_ = \"\";\n switch (true) {\n case typeof o_c === \"object\" &&\n (!!o_c.constructor &&\n !!o_c.constructor.name)\n && o_c.constructor.name !== \"\":\n _ret_ = o_c.constructor.name;\n break;\n case typeof o_c === \"function\" && !!o_c.name:\n _ret_ = o_c.name;\n break;\n case __is_raw_class__(o_c) && !!o_c.name:\n _ret_ = o_c.name;\n break;\n case (!!o_c && !!o_c.__classType) && o_c.__classType !== \"\":\n _ret_ = o_c.__classType;\n break;\n case (!!o_c && !!o_c.__definition) && (!!o_c.__definition.__classType) && o_c.__definition.__classType !== \"\":\n _ret_ = o_c.__definition.__classType;\n break;\n default:\n _ret_ = ObjectName(o_c);\n break;\n }\n return _ret_;\n};\n", "import { _top, set } from \"./top\";\ndeclare const global:any;\ndeclare const globalThis:any;\n\nexport const __make_global__ = (f:any):void => {\n if (!!f && !!f.name) {\n if (typeof _top !== \"undefined\" && typeof f !== \"undefined\" && _top !== null && !Object.hasOwn(_top,f.name)) {\n set(f.name, f);\n } else if (typeof global !== \"undefined\"){\n global[f.name] = f;\n } else if (typeof globalThis !== \"undefined\"){\n globalThis[f.name] = f;\n }\n \n }\n\n};", "import { T_QC_CLASSES, T_QC_PACKAGES } from \"@types\";\nimport { __getType__ } from \"./getType\";\nimport { __make_global__ } from \"./make_global\";\n\nexport var _QC_CLASSES: T_QC_CLASSES = {};\nexport var _QC_PACKAGES: T_QC_PACKAGES = {};\nexport var _QC_PACKAGES_IMPORTED: any[] = [];\nexport var _QC_READY_LISTENERS: any[] = [];\n\nexport const __register_class__ = function (_class_: any, __namespace?: string): any {\n const __classType = __getType__(_class_);\n let name = _class_.name || __classType;\n if (name.toLowerCase() === \"function\") {\n name = __classType;\n }\n if (typeof _class_.__definition === \"undefined\") {\n _class_.__definition = {};\n }\n _class_.__definition.__classType = __classType;\n if (typeof __namespace !== \"undefined\") {\n _class_.__definition.__namespace = __namespace;\n }\n _QC_CLASSES[name] = _class_;\n __make_global__(_class_);\n return _QC_CLASSES[name];\n};\n\nexport const get_QC_CLASS = (name:string):any => {\n return _QC_CLASSES[name];\n};\n\nconst _get_packages_names = function (_packages: any): T[] {\n let _keys: any[] = [];\n for (const _k of Object.keys(_packages)) {\n if (\n typeof _packages[_k] !== \"undefined\" &&\n typeof _packages[_k] !== \"function\" &&\n Object.hasOwn(_packages[_k], \"length\") &&\n _packages[_k].length > 0\n ) {\n _keys.push(_k);\n _keys = _keys.concat(_get_packages_names(_packages[_k]));\n }\n }\n return _keys as T[];\n};\n\n\nexport const getPackagesNamesList = (): any[] => {\n return _get_packages_names(_QC_PACKAGES);\n};\n\nexport const getPackagesList = (): any[] => {\n return [...getPackagesNamesList()].map((packagename: string): T => {\n const _classesList: any[] = _QC_PACKAGES[packagename] as any[];\n let _ret_: any = undefined;\n if (_classesList) {\n _ret_ = {\n packageName: packagename,\n classesList: _classesList.filter(function (): boolean {\n return true;\n })\n };\n }\n return _ret_ as T;\n }).filter(function (_p: any): boolean {\n return typeof _p !== \"undefined\";\n });\n};\n\nexport const getClassesList = (): any[] => {\n let _classesList: any[] = [];\n [...getPackagesList()].forEach(function (_package_element: any): T {\n _classesList = _classesList.concat(_package_element.classesList.map(\n (_class_element: any) => {\n return {\n packageName: _package_element.packageName,\n className: `${_package_element.packageName}.${__getType__(_class_element)}`,\n classFactory: _class_element\n };\n }\n ));\n return _package_element as T;\n });\n\n return _classesList;\n};\n\nexport const getClassesNamesList = (): any[] => {\n return [...getClassesList()].map((_class_element: any): T => {\n return _class_element.className as T;\n });\n};\n\nexport const set_QC_PACKAGE = (packageName: string, _qc_packages: any[]):void => {\n _QC_PACKAGES[packageName] = _qc_packages;\n};\n\n", "import { __make_global__ } from \"./make_global\";\n\nexport const Export = function (f: any):void {\n return __make_global__(f);\n};\nExport.prototype.toString = function () {\n return \"Export(function or symbol) { [QCObjects native code] }\";\n};\n", "import { logger } from \"./Logger\";\n\nasync function _import_(name:string):Promise {\n logger.debug(`Importing ${name}...`);\n function isPackage(name:string) {\n logger.debug(`Validating if ${name} is a package name...`);\n // Simple check to determine if the name is a package\n // This can be enhanced based on your specific needs\n return !name.startsWith(\".\") && !name.startsWith(\"/\") && !name.includes(\"/\");\n }\n \n try {\n // Ensure the name has a .js extension if it's not a package\n const hasExtension = /\\.[^/\\\\]+$/.test(name);\n if (!hasExtension && !isPackage(name)) {\n logger.debug(`${name} does not have an extension and is not a package. Adding js extension.`);\n name += \".js\";\n }\n \n const m:any = await import(name);\n return m;\n } catch (error:any) {\n logger.warn(`Failed to load module: ${error}`);\n }\n }\n \nexport {_import_};", "import { _import_ } from \"./_import_\";\nimport { logger } from \"./Logger\";\n\nexport const isDeno:boolean = (typeof window !== \"undefined\" && \"Deno\" in window);\nexport const isBrowser:boolean = (typeof window !== \"undefined\" && typeof window.self !== \"undefined\" && window === window.self) && !isDeno;\nexport const isNodeCommonJS:boolean = (typeof module !== \"undefined\");\n// eslint-disable-next-line no-unused-vars\nexport const deno_require = (name:string):void => { /* not yet implemented */};\nexport const _require_ = (name:string):any => {\n \n return (isDeno)?(deno_require(name)):(\n ( (name):any => {\n let r:any;\n try {\n (async () => {\n r = await _import_(name);\n })().then((m:any) => {\n r = (m && m.default) || m;\n })\n .catch ((e:any) => {\n logger.warn(`An error ocurred: ${e}`);\n });\n\n } catch (e:any) {\n logger.debug(`An error ocurred importing module. ${e}`);\n r = {export:{}};\n }\n return r;\n } ) (name)\n );\n};\ndeclare const cordova: any;\n\nexport const is_phonegap:boolean = (\n function () {\n return (typeof cordova !== \"undefined\");\n }\n)();", "import { Export } from \"./Export\";\nimport { isBrowser } from \"./platform\";\n\nexport class Logger {\n debugEnabled = true;\n infoEnabled = true;\n warnEnabled = true;\n debug(message: string): void {\n if (this.debugEnabled) {\n console.log(\"\\x1b[35m%s\\x1b[0m\", `[DEBUG][${performance.now().toLocaleString()}] ${message}`);\n }\n }\n\n info(message: string): void {\n let color;\n if (this.infoEnabled) {\n if (isBrowser) {\n color = \"\\x1b[103m%s\\x1b[0m\";\n } else {\n color = \"\\x1b[33m%s\\x1b[0m\";\n }\n console.info(color, `[INFO][${performance.now().toLocaleString()}] ${message}`);\n }\n }\n\n warn(message: string): void {\n if (this.warnEnabled) {\n console.warn(\"\\x1b[31m%s\\x1b[0m\", `[WARN][${performance.now().toLocaleString()}] ${message}`);\n }\n }\n}\n\nexport const logger: Logger = new Logger();\nExport(logger);", "import { logger } from \"./Logger\";\n\n/**\n * Casts an object to another object class type\n *\n * @param {Object} obj_source\n * @param {Object} obj_dest\n */\nexport const _Cast = function (obj_source: any, obj_dest: any):any {\n for (const v in obj_source) {\n if (typeof obj_source[v] !== \"undefined\") {\n try {\n obj_dest[v] = obj_source[v];\n } catch (e:any) {\n logger.debug(`An error ocurred: ${e}.`);\n logger.warn(`Unable to cast ${(typeof obj_source).toString()}.${typeof v.toString()} to ${(typeof obj_dest).toString()}.${typeof v.toString()}`);\n }\n }\n }\n return obj_dest;\n};\n\n/**\n * Casts an object to another object class type. Only properties\n *\n * @param {Object} obj_source\n * @param {Object} obj_dest\n */\nexport const _CastProps = function (obj_source: any, obj_dest: any, _ignoreError:boolean = true):any {\n for (const v in obj_source) {\n if (typeof obj_source[v] !== \"undefined\" && typeof obj_source[v] !== \"function\") {\n try {\n obj_dest[v] = obj_source[v];\n } catch (e:any) {\n if (!_ignoreError){\n logger.debug(`An error ocurred: ${e}.`);\n }\n }\n } else if (typeof obj_source[v] === \"function\") {\n try {\n obj_dest[v] = obj_source[v].bind(obj_dest);\n } catch (e:any) {\n logger.warn(e);\n }\n }\n }\n return obj_dest;\n};\n", "import { IQCObjectsElement } from \"@types\";\nimport { isBrowser } from \"./platform\";\n\nexport const _DOMCreateElement = function (elementName: string, props?: any[], children?: any): IQCObjectsElement {\n let _ret_;\n if (isBrowser) {\n _ret_ = _DOMCreateComplexElement(elementName, props, children) as unknown as IQCObjectsElement;\n } else {\n _ret_ = {} as IQCObjectsElement;\n }\n return _ret_;\n};\n\n\nconst ComplexTypeCall = (_type: Function, { props, children }: { props?: any[], children?: any }): IQCObjectsElement => {\n return _type({ props, children }) as IQCObjectsElement;\n};\nexport const _DOMCreateComplexElement = (_type: string | Function, props?: any[], children?: any): HTMLElement | IQCObjectsElement => {\n\n if (typeof _type !== \"string\") {\n return ComplexTypeCall(_type, { props, children });\n }\n const element = document.createElement(_type);\n\n if (props) {\n Object.entries(props).forEach(([key, value]) => {\n if (typeof value === \"string\" || typeof value === \"number\") {\n element.setAttribute(key, value.toString());\n } else if (typeof value === \"function\" && key.toLowerCase().startsWith(\"on\")) {\n element.addEventListener(key.slice(2).toLowerCase(), value.bind(element));\n }\n });\n }\n\n if (Array.isArray(children)) {\n children.filter((child => child instanceof Node)).forEach(child => {\n element.appendChild(child);\n });\n } else if (children instanceof Node) {\n element.appendChild(children);\n } else if (typeof children === \"string\") {\n element.innerHTML = children;\n }\n\n return element;\n};\n", "/**\n * Primary instance ID of all objects\n */\nexport var __instanceID = 0;\n\nexport const IncrementInstanceID = (): void => {\n __instanceID = (typeof __instanceID === \"undefined\" || __instanceID === null) ? (0) : (__instanceID + 1);\n};\n", "export const _protected_code_ = (_: any): void => {\n const __oldtoString = (typeof _.prototype !== \"undefined\") ? (_.prototype.toString) : (function () {\n return \"\";\n });\n if (typeof _.prototype !== \"undefined\") {\n _.prototype.toString = function (): string {\n const _protected_symbols = [\n \"__qcobjects__\",\n \"__qcobjects_sdk__\",\n \"__loaded__\",\n \"ComplexStorageCache\",\n \"css\",\n \"append\",\n \"attachIn\",\n \"debug\",\n \"info\",\n \"warn\",\n \"QC_Append\",\n \"set\",\n \"get\",\n \"done\",\n \"componentDone\",\n \"_new_\",\n \"__new__\",\n \"Class\",\n \"ClassFactory\",\n \"New\",\n \"Export\",\n \"Package\",\n \"Import\",\n \"subelements\",\n \"componentLoader\",\n \"buildComponents\",\n \"Controller\",\n \"View\",\n \"VO\",\n \"Service\",\n \"serviceLoader\",\n \"JSONService\",\n \"ConfigService\",\n \"SourceJS\",\n \"SourceCSS\",\n \"ArrayList\",\n \"ArrayCollection\",\n \"Effect\",\n \"Timer\",\n \"sum\",\n \"avg\",\n \"table\",\n \"max\",\n \"min\",\n \"range\",\n \"matrix\",\n \"matrix2d\",\n \"matrix3d\",\n \"unique\",\n \"uniqueId\",\n \"shortCode\",\n \"NamespaceRef\"\n ];\n let _ret_;\n if (_protected_symbols.includes(this.name)) {\n _ret_ = this.name + \"{ [QCObjects native code] }\";\n } else {\n _ret_ = __oldtoString.call(this);\n }\n return _ret_ as string;\n };\n }\n};\n(_protected_code_)(Function);\nexport const _methods_ = function (_: any): T[] {\n const _m = [];\n for (const i in _) {\n if ((typeof _[i]).toLowerCase() === \"function\") {\n _m.push(_[i]);\n }\n }\n return _m as T[];\n};\n", "import { __is_raw_class__ } from \"./is_raw_class\";\nimport {_QC_PACKAGES, set_QC_PACKAGE, __register_class__ } from \"./PrimaryCollections\";\n\n/**\n * Defines a package for Class classification\n *\n * @param {Object} namespace\n * @param {Object} classes\n */\nexport const Package = (namespace: string, classes: any[] = []): any[] => {\n\n if (Object.hasOwn(_QC_PACKAGES, namespace) &&\n typeof _QC_PACKAGES[namespace] !== \"undefined\" &&\n typeof _QC_PACKAGES[namespace] !== \"string\" &&\n Object.hasOwn(_QC_PACKAGES[namespace], \"length\") &&\n _QC_PACKAGES[namespace].length > 0 &&\n typeof classes !== \"undefined\" &&\n Object.hasOwn(classes, \"length\") &&\n classes.length > 0\n ) {\n classes.forEach((_class_: any) => {\n __register_class__(_class_, namespace);\n });\n set_QC_PACKAGE(namespace, _QC_PACKAGES[namespace].concat(classes));\n } else if (typeof classes !== \"undefined\"\n && typeof classes !== \"undefined\"\n && Object.hasOwn(classes, \"length\")\n && classes.length > 0) {\n classes.forEach((_class_: any) => {\n __register_class__(_class_, namespace);\n });\n set_QC_PACKAGE(namespace, classes);\n } else if (__is_raw_class__(classes)) {\n if (typeof (classes as any).__definition === \"undefined\") {\n (classes as any).__definition = {};\n }\n (classes as any).__definition.__namespace = namespace;\n (classes as any).__namespace = namespace;\n __register_class__(classes, namespace);\n set_QC_PACKAGE(namespace, [classes]);\n } else {\n throw new Error (`An error ocurred. It was not possible to add classes to ${namespace}.`);\n }\n return ((Object.hasOwn(_QC_PACKAGES, namespace)) ? (_QC_PACKAGES[namespace]) : []) as any[] | [];\n};\n", "import { type IInheritClass, type IQCObjectsElement, type TBody } from \"@types\";\nimport { logger } from \"./Logger\";\nimport { __instanceID, IncrementInstanceID } from \"./IncrementInstanceID\";\nimport { _CastProps, _Cast } from \"./Cast\";\nimport { _DOMCreateElement } from \"./DOMCreateElement\";\nimport { __getType__ } from \"./getType\";\nimport { _methods_ } from \"./introspection\";\nimport { is_a } from \"./is_a\";\nimport { isBrowser } from \"./platform\";\nimport { _QC_CLASSES } from \"./PrimaryCollections\";\nimport { Package } from \"./Package\";\n\nexport class InheritClass implements IInheritClass {\n [key: string]: any;\n __definition: any;\n private _body: TBody;\n public get body(): TBody {\n return this._body;\n }\n public set body(value: TBody) {\n this._body = value;\n }\n childs: any;\n __instanceID!: number;\n\n constructor(_o_?: any) {\n\n if (typeof _o_ !== \"undefined\" && typeof _o_.__definition !== \"undefined\") {\n this.__definition = {\n ...(_o_.__definition)\n };\n }\n\n const self: this = this;\n if (typeof _o_ !== \"undefined\" && _o_ !== null) {\n Object.keys(_o_)\n .filter(function (k) {\n return isNaN(k as any) && ![\"__instanceID\", \"__classType\", \"__definition\"].includes(k);\n })\n .forEach(function (key) {\n if (typeof self[key] === \"function\") {\n self[key] = _o_[key].bind(self);\n } else {\n self[key] = _o_[key];\n }\n });\n }\n\n IncrementInstanceID();\n if (!self.__instanceID) {\n Object.defineProperty(self, \"__instanceID\", {\n value: __instanceID,\n writable: false\n });\n }\n\n if (typeof self.__definition !== \"undefined\") {\n Object.keys(self.__definition).filter(function (k) {\n return isNaN(k as any) && ![\"name\", \"__instanceID\", \"__classType\", \"__definition\"].includes(k);\n }).forEach(function (key) {\n if (typeof self.__definition[key] === \"function\") {\n self[key] = self.__definition[key].bind(self);\n } else {\n self[key] = self.__definition[key];\n }\n });\n }\n _methods_((_QC_CLASSES as any)[self.__classType]).map(function (m): any {\n self[(m as Function).name] = (m as Function).bind(self);\n return m;\n });\n _methods_(self.__definition).map(function (m): any {\n self[(m as Function).name] = (m as Function).bind(self);\n return m;\n });\n\n if (self.body) {\n if (typeof self.__definition === \"undefined\" || (!Object.hasOwn(self.__definition, \"body\")) || typeof self.__definition.body === \"undefined\") {\n try {\n if (isBrowser) {\n self.body = _DOMCreateElement(self.__definition.__classType);\n } else {\n self.body = {};\n }\n } catch (e: any) {\n logger.debug(`An error ocurred: ${e}.`);\n self.body = {};\n }\n } else if (Object.hasOwn(self.__definition, \"body\")) {\n self.body = self.__definition.body;\n }\n }\n\n\n try {\n self.__new__.call(self, _o_);\n if (typeof self === \"object\" && Object.hasOwn(self, \"_new_\") && typeof (self._new_ as any).isCalled === \"undefined\") {\n try {\n self._new_(_o_);\n (self._new_ as any).isCalled = true;\n } catch (e: any) {\n logger.warn(`${self.__classType}._new_() failed with error: ${e}`);\n }\n }\n } catch (e: any) {\n logger.warn(e);\n }\n }\n\n static get __classType(): any {\n return (Object.getPrototypeOf(this.constructor) as Function).name;\n }\n\n get __classType(): string {\n return this.constructor.name;\n }\n\n\n static hierarchy(__class__: any): any[] {\n const __classType = function (o_c: any): any {\n return (Object.hasOwn(o_c, \"__classType\")) ? (o_c.__classType) : (__getType__.call(__class__, o_c));\n };\n const __hierarchy__proto__ = (c: any): any[] => {\n return (typeof c !== \"undefined\" && typeof c.__proto__ !== \"undefined\" && c.__proto__ !== null) ? (((__classType(c) !== \"\") ? ([__classType(c)]) : ([])).concat(__hierarchy__proto__(c.__proto__))) : ([]);\n };\n\n if (typeof __class__ === \"undefined\" || __class__ === null) {\n __class__ = this;\n }\n let __hierarchy = [];\n __hierarchy.push(__classType(__class__));\n __hierarchy = __hierarchy.concat(__hierarchy__proto__(__class__.__proto__));\n return __hierarchy;\n }\n\n\n __namespace?: string | undefined;\n\n __new__(_o_: any): void {\n _CastProps(_o_, this);\n }\n\n // eslint-disable-next-line no-unused-vars\n _new_(_o_?: any): void { }\n\n static getParentClass(): any {\n return Object.getPrototypeOf(this.prototype.constructor);\n }\n getParentClass(): any {\n return (this.constructor as typeof InheritClass).getParentClass();\n }\n\n\n static getClass(): any {\n return Object.getPrototypeOf(this.constructor);\n }\n\n getClass(): any {\n return (this.constructor as typeof InheritClass).getClass();\n }\n\n css(_css: any): any {\n if (typeof this.body !== \"undefined\" && typeof this?.body !== \"string\" && typeof (this?.body as HTMLElement)?.style !== \"undefined\") {\n logger.debug(\"body style\");\n if (this.body) {\n (this.body as any).style = _Cast(_css, (this?.body as HTMLElement)?.style);\n }\n }\n return (typeof this.body !== \"string\") ? (this?.body as HTMLElement)?.style : {};\n }\n\n hierarchy(): any {\n const __instance__ = this;\n return (this.constructor as typeof InheritClass).hierarchy(__instance__);\n }\n\n\n append(_child?: any): void {\n const child: any = _child || this.body;\n logger.debug(\"append: start\");\n if (is_a(child, \"Component\")) {\n logger.debug(\"append: child is a Component\");\n logger.debug(`appending the body of ${child.name}`);\n }\n if (typeof this.body !== \"undefined\") {\n logger.debug(\"append element\");\n if (arguments.length > 0) {\n logger.debug(\"append to element\");\n if (typeof this.body !== \"string\") {\n if (typeof (this.body as IQCObjectsElement)?.append !== \"undefined\") {\n (this?.body as IQCObjectsElement)?.append(child);\n } else {\n throw Error(\"body.append is undefined. That means the body is not well formed.\");\n }\n } else {\n this.append(child);\n }\n if (typeof this.childs === \"undefined\") {\n this.childs = [];\n }\n this.childs.push(child);\n } else {\n if (isBrowser) {\n logger.debug(\"append to body\");\n document.body.append(child);\n }\n }\n }\n }\n\n attachIn(tag: any): void {\n if (isBrowser) {\n const tags = (document as any).subelements(tag);\n for (let i = 0, j = tags.length; i < j; i++) {\n tags[i].append(this as any);\n }\n } else {\n throw new Error(\"attachIn not yet implemented for non browser platforms\");\n }\n }\n\n}\n\nPackage(\"com.qcobjects\", [InheritClass]);", "import { InheritClass } from \"./InheritClass\";\n\nexport const isQCObjects_Object = function (_:any):boolean {\n return (!!((typeof _ === \"object\" &&\n Object.hasOwn(_, \"__classType\") &&\n (!!_.__instanceID) &&\n Object.hasOwn(_, \"__definition\") &&\n typeof _.__definition !== \"undefined\"\n ))) || _ instanceof InheritClass;\n };\n\n export const isQCObjects_Class = function (_:any):boolean {\n return (!!((typeof _ === \"function\" &&\n (!_.__instanceID) &&\n (!!_.__definition) &&\n typeof _.__definition !== \"undefined\" &&\n !!_.__definition.__classType\n ))) || _.prototype instanceof InheritClass;\n };\n", "import { __getType__ } from \"./getType\";\nimport { isQCObjects_Class, isQCObjects_Object } from \"./isQCObjects\";\nimport { ObjectName } from \"./ObjectName\";\n\n/**\n * Returns if a class or object is from a determinated type\n * @param {Object} object\n * @param {String} typeName\n */\nexport const is_a = (obj: any, typeName: string):boolean => {\n return !!((typeof obj !== \"undefined\" && obj !== null &&\n (((isQCObjects_Class(obj) || isQCObjects_Object(obj)) && (obj.hierarchy().includes(typeName))) ||\n __getType__(obj) === typeName ||\n ObjectName(obj) === typeName ||\n typeof obj === typeName)));\n};", "/**\n * Internal use to determine the forbidden names for classes\n * Reserved words\n *\n * @param {String} name\n * @param {Object} type\n * @param {Object} definition\n */\nexport const __is__forbidden_name__ = (name: string):boolean => {\n return ([\"__proto__\", \"prototype\", \"Object\", \"Map\", \"defineProperty\", \"indexOf\", \"toString\", \"__instanceID\", \"function\", \"Function\"].indexOf(name) !== -1);\n};\n", "import { __is_raw_class__ } from \"./is_raw_class\";\n\nexport const _LegacyCopy = function (obj:any, _ignore?:string[]):any {\n let _value_;\n switch (true) {\n case typeof obj === \"string\":\n _value_ = obj;\n break;\n case typeof obj === \"number\":\n _value_ = obj;\n break;\n case typeof obj === \"object\":\n _value_ = [{...Object.keys(obj).filter(k => !_ignore?.includes(k))}]\n .map(k => {return {[k as never]:obj[k as never]}; })\n .reduce ((p, c) => Object.assign(p, c)) as any;\n break;\n case typeof obj === \"function\":\n _value_ = obj.bind({});\n break;\n case __is_raw_class__(obj):\n _value_ = class extends obj { };\n break;\n default:\n break;\n }\n return _value_;\n };\n", "import { _QC_CLASSES } from \"./PrimaryCollections\";\nimport { _Cast, _CastProps } from \"./Cast\";\nimport { _DOMCreateElement } from \"./DOMCreateElement\";\nimport { __getType__ } from \"./getType\";\nimport { __instanceID, IncrementInstanceID } from \"./IncrementInstanceID\";\nimport { _methods_ } from \"./introspection\";\nimport { is_a } from \"./is_a\";\nimport { __is__forbidden_name__ } from \"./is_forbidden_name\";\nimport { _LegacyCopy } from \"./LegacyCopy\";\nimport { logger } from \"./Logger\";\nimport { isBrowser } from \"./platform\";\nimport { IQCObjectsElement, TBody, TClass } from \"@types\";\nimport { InheritClass } from \"./InheritClass\";\nimport { _top } from \"./top\";\n\n/**\n * Creates new object class of another object\n *\n * @param {String} name\n * @param {Object} type\n * @param {Object} definition\n * \n * @example \n * Class (name, type, definition)\n * Class (name, type)\n * Class (name, definition)\n * Class ()\n * \n * \n * const MyClass = Class (\"MyComponent\", Component, {\n * name: \"one_component\",\n * method1 : () => {console.log (\"done\") }\n * })\n * const myClassInstance = new MyClass ({name: \"one_component\"})\n * \n * const MyClass = Class (\"MyService\",{\n * name: \"myservice\",\n * })\n * \n * const myClassInstance = new MyClass ({name: \"myservice\"})\n */\n\n\n\nexport const Class: TClass = (name?: string, _type?: unknown, _definition?: unknown): InheritClass => {\n const _types_ = {};\n let type: unknown, definition: unknown;\n\n switch (true) {\n case !name && !_type && !_definition:\n return class { } as unknown as InheritClass;\n case !!name && !_type && !_definition:\n type = class { };\n definition = {};\n break;\n case !!name && !_type && !!_definition:\n type = class { };\n definition = _definition;\n break;\n case !!name && !!_type && !!_definition:\n type = _type;\n definition = _definition;\n break;\n default:\n return class { } as unknown as InheritClass;\n }\n if (typeof name !== \"string\") {\n throw new Error(\"Class name must be a string\");\n }\n\n if (typeof type !== \"function\") {\n throw new Error(\"Class type must be a function or class\");\n }\n\n if (__is__forbidden_name__(name)) {\n throw new Error(`${name} is not an allowed word in the name of a class`);\n }\n\n if (typeof (type as any).__definition === \"object\"\n && (type as any).__definition\n && Object.keys((type as any).__definition).length !== 0) {\n (definition as any).__definition = Object.assign(_LegacyCopy((type as any).__definition,[\"name\"]), type);\n }\n\n (_types_ as any)[type.name] = type;\n\n if (typeof definition === \"undefined\" || definition === null) {\n definition = {};\n } else {\n definition = { ...definition };\n }\n\n /* hack to prevent duplicate __instanceID */\n if (typeof (definition as any).__instanceID !== \"undefined\") {\n delete (definition as any).__instanceID;\n }\n\n _QC_CLASSES[name] = class extends (_types_ as any)[type.name] {\n __instanceID!: number;\n __namespace?: string | undefined;\n __definition: any = {\n ...(definition as any)\n };\n childs: any;\n private _body: TBody;\n public get body(): TBody {\n return this._body;\n }\n public set body(value: TBody) {\n this._body = value;\n }\n\n static get __classType(): any {\n return (Object.getPrototypeOf(this.constructor) as Function).name;\n }\n\n get __classType(): string {\n return this.constructor.name;\n }\n\n static hierarchy(__class__: any): any[] {\n const __classType = function (o_c: any): any {\n return (Object.hasOwn(o_c, \"__classType\")) ? (o_c.__classType) : (__getType__.call(__class__, o_c));\n };\n const __hierarchy__proto__ = (c: any): any[] => {\n return (typeof c !== \"undefined\" && typeof c.__proto__ !== \"undefined\" && c.__proto__ !== null) ? (((__classType(c) !== \"\") ? ([__classType(c)]) : ([])).concat(__hierarchy__proto__(c.__proto__))) : ([]);\n };\n\n if (typeof __class__ === \"undefined\" || __class__ === null) {\n __class__ = this;\n }\n let __hierarchy = [];\n __hierarchy.push(__classType(__class__));\n __hierarchy = __hierarchy.concat(__hierarchy__proto__(__class__.__proto__));\n return __hierarchy;\n }\n\n static getParentClass(): any {\n return Object.getPrototypeOf(this.prototype.constructor);\n }\n\n constructor(_o_?: any) {\n super(_o_ || {});\n\n const self = this;\n IncrementInstanceID();\n if (!(self as any).__instanceID) {\n Object.defineProperty(self, \"__instanceID\", {\n value: __instanceID,\n writable: false\n });\n }\n\n if (typeof self.__definition !== \"undefined\") {\n Object.keys(self.__definition).filter(function (k) {\n return isNaN(k as any) && ![\"name\", \"__instanceID\", \"__classType\", \"__definition\"].includes(k);\n }).forEach(function (key) {\n if (typeof self.__definition[key] === \"function\") {\n self[key] = self.__definition[key].bind(self);\n } else {\n self[key] = self.__definition[key];\n }\n });\n }\n _methods_(_QC_CLASSES[self.__classType]).map(function (m: unknown): T {\n self[(m as Function).name] = (m as Function).bind(self);\n return m as T;\n });\n _methods_(self.__definition).map(function (m): any {\n self[(m as Function).name] = (m as Function).bind(self);\n return m;\n });\n\n if (self.body) {\n if (typeof self.__definition === \"undefined\" || (!Object.hasOwn(self.__definition, \"body\")) || typeof self.__definition.body === \"undefined\") {\n try {\n if (isBrowser) {\n self.body = _DOMCreateElement(self.__definition.__classType);\n } else {\n self.body = {};\n }\n } catch (e: any) {\n logger.debug(`An error ocurred: ${e}.`);\n self.body = {};\n }\n } else if (Object.hasOwn(self.__definition, \"body\")) {\n self.body = self.__definition.body;\n }\n }\n\n\n try {\n if (typeof self.__new__ === \"function\") {\n self.__new__.call(self, _o_);\n } else if (typeof super.__new__ === \"function\") {\n self.__new__ = super.__new__.bind(self);\n self.__new__.call(self, _o_);\n }\n if (typeof self === \"object\" && Object.hasOwn(self, \"_new_\") && typeof (self._new_ as any).isCalled === \"undefined\") {\n try {\n self._new_(_o_);\n (self._new_ as any).isCalled = true;\n } catch (e: any) {\n logger.warn(`${self.__classType}._new_() failed with error: ${e}`);\n }\n }\n } catch (e: any) {\n logger.warn(e);\n }\n }\n\n __new__(_o_: any) {\n _CastProps(_o_, this);\n }\n\n // eslint-disable-next-line no-unused-vars\n _new_(_o_?: any) { }\n\n getClass(): any {\n return Object.getPrototypeOf(this.constructor);\n }\n\n css(_css: any): any {\n if (typeof this.body !== \"undefined\" && typeof this?.body !== \"string\" && typeof (this?.body as HTMLElement)?.style !== \"undefined\") {\n logger.debug(\"body style\");\n if (this.body) {\n (this.body as any).style = _Cast(_css, (this?.body as HTMLElement)?.style);\n }\n }\n return (typeof this.body !== \"string\") ? (this?.body as HTMLElement)?.style : {};\n }\n\n hierarchy(): any {\n const __instance__ = this;\n return this.getClass()?.hierarchy(__instance__);\n }\n\n\n append(_child?: any) {\n const child: any = _child || this.body;\n logger.debug(\"append: start\");\n if (is_a(child, \"Component\")) {\n logger.debug(\"append: child is a Component\");\n logger.debug(`appending the body of ${child.name}`);\n }\n if (typeof this.body !== \"undefined\") {\n logger.debug(\"append element\");\n if (arguments.length > 0) {\n logger.debug(\"append to element\");\n if (typeof this.body !== \"string\") {\n if (typeof (this.body as IQCObjectsElement)?.append !== \"undefined\") {\n (this?.body as IQCObjectsElement)?.append(child);\n } else {\n throw Error(\"body.append is undefined. That means the body is not well formed.\");\n }\n } else {\n this.append(child);\n }\n if (typeof this.childs === \"undefined\") {\n this.childs = [];\n }\n this.childs.push(child);\n } else {\n if (isBrowser) {\n logger.debug(\"append to body\");\n document.body.append(child);\n }\n }\n }\n }\n\n attachIn(tag: any) {\n if (isBrowser) {\n const tags = (document as any).subelements(tag);\n for (let i = 0, j = tags.length; i < j; i++) {\n tags[i].append(this as any);\n }\n } else {\n throw new Error(\"attachIn not yet implemented for non browser platforms\");\n }\n }\n\n };\n\n // remove the keys from definition that exist in the prototype\n\n _QC_CLASSES[name] = _CastProps(definition, _QC_CLASSES[name]);\n _QC_CLASSES[name].__definition = definition;\n _QC_CLASSES[name].__definition.__classType = name;\n\n (_top as any)[name] = _QC_CLASSES[name];\n\n return _QC_CLASSES[name] as InheritClass;\n};\nif (typeof Class.prototype !== \"undefined\") {\n Class.prototype.toString = function () {\n return \"Class(name, type, definition) { [QCObjects native code] }\";\n };\n}\n\n", "/**\n * Returns the QCObjects Class Factory of a given ClassName\n *\n * @param {String} name\n */\n\nimport { __is_raw_class__ } from \"./is_raw_class\";\nimport { _QC_CLASSES, _QC_PACKAGES, get_QC_CLASS } from \"./PrimaryCollections\";\nimport { TClassFactory } from \"@types\";\n\nexport const ClassFactory:TClassFactory = (className:string):any => {\n let _classFactory;\n if (typeof className === \"undefined\" || className === null) {\n throw Error (\"You need to pass a parameter {className}\");\n }\n if (className !== null && className.indexOf(\".\") !== -1) {\n const packageName = className.split(\".\").slice(0, className.split(\".\").length - 1).join(\".\");\n const _className = className.split(\".\").slice(-1).join(\"\");\n const _package = _QC_PACKAGES[packageName] || [];\n const packageClasses = _package.filter((classFactory:any) => {\n return (__is_raw_class__(classFactory));\n }).reverse();\n if (packageClasses.length > 0) {\n _classFactory = packageClasses[0];\n } else {\n throw Error(`Class ${_className} not found. Found classes: ${JSON.stringify(packageClasses)} in package ${packageName}`);\n }\n } else if (className !== null) {\n _classFactory = get_QC_CLASS(className);\n if (typeof _classFactory === \"undefined\"){\n throw new Error (`${className} is undefined.`); \n }\n } else {\n throw Error(`className is null. Unable to retrieve the class factory.\\n Not found in: \\n ${Object.keys(_QC_CLASSES).join(\"\\n\")}`);\n }\n return _classFactory;\n};\n", "export class Base64 {\n static _keyStr: string = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\n static encode(e: string): string {\n let t = \"\";\n let n: number, r: number, i: number, s: number, o: number, u: number, a: number;\n let f = 0;\n e = Base64._utf8_encode(e);\n while (f < e.length) {\n n = e.charCodeAt(f++);\n r = e.charCodeAt(f++);\n i = e.charCodeAt(f++);\n s = n >> 2;\n o = (n & 3) << 4 | r >> 4;\n u = (r & 15) << 2 | i >> 6;\n a = i & 63;\n if (isNaN(r)) {\n u = a = 64;\n } else if (isNaN(i)) {\n a = 64;\n }\n t = t + this._keyStr.charAt(s) + this._keyStr.charAt(o) + this._keyStr.charAt(u) + this._keyStr.charAt(a);\n }\n return t;\n }\n static decode(e: string): string {\n let t = \"\";\n let n: number, r: number, i: number;\n let s: number, o: number, u: number, a: number;\n let f = 0;\n e = e.replace(/[^A-Za-z0-9+/=]/g, \"\");\n while (f < e.length) {\n s = this._keyStr.indexOf(e.charAt(f++));\n o = this._keyStr.indexOf(e.charAt(f++));\n u = this._keyStr.indexOf(e.charAt(f++));\n a = this._keyStr.indexOf(e.charAt(f++));\n n = s << 2 | o >> 4;\n r = (o & 15) << 4 | u >> 2;\n i = (u & 3) << 6 | a;\n t = t + String.fromCharCode(n);\n if (u !== 64) {\n t = t + String.fromCharCode(r);\n }\n if (a !== 64) {\n t = t + String.fromCharCode(i);\n }\n }\n t = Base64._utf8_decode(t);\n return t;\n }\n static _utf8_encode(e: string): string {\n e = e.replace(/rn/g, \"n\");\n let t = \"\";\n for (let n = 0; n < e.length; n++) {\n const r = e.charCodeAt(n);\n if (r < 128) {\n t += String.fromCharCode(r);\n } else if (r > 127 && r < 2048) {\n t += String.fromCharCode(r >> 6 | 192);\n t += String.fromCharCode(r & 63 | 128);\n } else {\n t += String.fromCharCode(r >> 12 | 224);\n t += String.fromCharCode(r >> 6 & 63 | 128);\n t += String.fromCharCode(r & 63 | 128);\n }\n }\n return t;\n }\n static _utf8_decode(e: string): string {\n let t = \"\";\n let n = 0;\n let r = 0;\n let c2 = 0;\n let c3: number;\n while (n < e.length) {\n r = e.charCodeAt(n);\n if (r < 128) {\n t += String.fromCharCode(r);\n n++;\n } else if (r > 191 && r < 224) {\n c2 = e.charCodeAt(n + 1);\n t += String.fromCharCode((r & 31) << 6 | c2 & 63);\n n += 2;\n } else {\n c2 = e.charCodeAt(n + 1);\n c3 = e.charCodeAt(n + 2);\n t += String.fromCharCode((r & 15) << 12 | (c2 & 63) << 6 | c3 & 63);\n n += 3;\n }\n }\n return t;\n }\n};", "import { isBrowser } from \"./platform\";\nimport process from \"node:process\";\n\nexport var _basePath_:string = (\n function ():string {\n let _basePath:string = \"\";\n if (isBrowser) {\n const baseURI:string[] = document.baseURI.split(\"?\")[0].split(\"/\");\n baseURI.pop();\n _basePath = baseURI.join(\"/\") + \"/\";\n } else {\n if (typeof process !== \"undefined\") {\n _basePath = `${(process).cwd()}/`;\n } else {\n _basePath = \"\";\n }\n }\n return _basePath;\n }\n )();\n\nexport const setBasePath = (value:string):void => { _basePath_ = value;};", "import { _LegacyCopy } from \"./LegacyCopy\";\n\nexport const _DataStringify = (data: any): string => {\n const getCircularReplacer = function () {\n const seen = new WeakSet();\n let _level = 0;\n return function (key: string, value: any): any {\n if (typeof value === \"object\" && value !== null) {\n if (seen.has(value)) {\n _level += 1;\n return (_level <= 3) ? (_LegacyCopy(value)) : (null);\n }\n seen.add(value);\n }\n return value;\n };\n };\n return JSON.stringify(data, getCircularReplacer());\n};\n", "export const _domain_:string = (typeof location !== \"undefined\" && location.hostname !== \"\") ? (location.hostname) : (\"localhost\");\n", " /**\n * Creates an object from a Class definition\n *\n * @param {QC_Object} o\n * @param {Object} args\n */\n\n export const New = function (__class__:any, args = {}):any {\n args = (arguments.length > 1) ? (args) : ({});\n return (typeof __class__ === \"undefined\") ? (new Object()) : (new __class__(args));\n };\n \n New.prototype.toString = function () {\n return \"New(QCObjectsClassName, args) { [QCObjects native code] }\";\n };", "import { isBrowser } from \"./platform\";\n\nexport const _secretKey:string = (isBrowser)?(location.host):(\"secret\");", "import { _ICrypt } from \"@types\";\nimport { Base64 } from \"./Base64\";\nimport { _DataStringify } from \"./DataStringify\";\nimport { InheritClass } from \"./InheritClass\";\nimport { Package } from \"./Package\";\nimport { _secretKey } from \"./secretKey\";\n\n\nexport class _Crypt extends InheritClass implements _ICrypt {\n string: string = \"\";\n key: string = \"\";\n // eslint-disable-next-line no-unused-vars\n encrypt(_string_: string, key: string): string {\n throw new Error(\"Method not implemented.\");\n }\n // eslint-disable-next-line no-unused-vars\n decrypt(_string_: string, key: string): string {\n throw new Error(\"Method not implemented.\");\n }\n last_string = \"\";\n last_key = \"\";\n construct = false;\n _new_(o: { string?: string; key: string; }):void {\n const string = o.string;\n let key: string = (Object.hasOwn(o, \"key\")) ? (o.key) : (\"\");\n this.__new__(o);\n key = (key === \"\") ? (this.__instanceID.toString()) : (key);\n this.last_key = key;\n this.last_string = string as string;\n this.construct = true;\n }\n _encrypt(): string {\n const string = this.string;\n const key = this.key;\n let result = \"\";\n let char;\n let keychar;\n for (let i = 0; i < string.length; i++) {\n char = string.substr(i, 1);\n keychar = key.substr((i % key.length) - 1, 1);\n char = String.fromCharCode(char.charCodeAt(0) + keychar.charCodeAt(0));\n result += char;\n }\n this.last_string = Base64.encode(result);\n return this.last_string;\n }\n _decrypt(): string {\n let string = this.string;\n const key = this.key;\n let result = \"\";\n let char;\n let keychar;\n string = Base64.decode(string);\n for (let i = 0; i < string.length; i++) {\n char = string.substr(i, 1);\n keychar = key.substr((i % key.length) - 1, 1);\n char = String.fromCharCode(char.charCodeAt(0) - keychar.charCodeAt(0));\n result += char;\n }\n\n this.last_string = result;\n return this.last_string;\n }\n static encrypt(string: string, key: string): string {\n const crypt = new _Crypt({\n string,\n key: (key !== \"\") ? (key) : (\"12345678ABC\")\n });\n return crypt._encrypt();\n }\n static decrypt(string: string, key: string):string {\n const crypt = new _Crypt({\n string,\n key: (key !== \"\") ? (key) : (\"12345678ABC\")\n });\n return crypt._decrypt();\n }\n}\n\nexport const _CryptObject = function (o: any): string {\n return _Crypt.encrypt(_DataStringify(o), _secretKey);\n};\nexport const _DecryptObject = function (s: string): any {\n return (s === \"\") ? ({}) : (JSON.parse(_Crypt.decrypt(s, _secretKey)));\n};\n\nPackage(\"com.qcobjects\", [_Crypt]);", "import { _basePath_ } from \"./basePath\";\nimport { InheritClass } from \"./InheritClass\";\nimport { Package } from \"./Package\";\n\ntype TConfigSettings = {\n [key: string]: any,\n relativeImportPath:string,\n remoteImportsPath:string,\n remoteSDKPath:string,\n asynchronousImportsLoad:boolean,\n removePackageScriptAfterLoading:boolean,\n componentsBasePath:string,\n delayForReady:number,\n preserveComponentBodyTag:false,\n useConfigService:false,\n routingWay:string,\n useSDK:boolean,\n useLocalSDK:boolean,\n basePath:string\n};\n\n\nexport class ConfigSettings extends InheritClass {\n public _CONFIG: TConfigSettings = {\n \"relativeImportPath\": \"\",\n \"remoteImportsPath\": \"\",\n \"remoteSDKPath\": \"https://sdk.qcobjects.dev/\",\n \"asynchronousImportsLoad\": false,\n \"removePackageScriptAfterLoading\": true,\n \"componentsBasePath\": \"\",\n \"delayForReady\": 0,\n \"preserveComponentBodyTag\": false,\n \"useConfigService\": false,\n \"routingWay\": \"hash\",\n \"useSDK\": true,\n \"useLocalSDK\": false,\n \"basePath\": _basePath_\n };\n protected static _instance: ConfigSettings;\n public _CONFIG_ENC = \"\";\n\n set(name:string, value:any):void {\n this._CONFIG[name] = value;\n }\n\n get(name:string, _defaultValue?:any):any {\n return this._CONFIG[name] || _defaultValue;\n }\n\n static get instance():ConfigSettings {\n\n if (typeof ConfigSettings._instance === \"undefined\") {\n ConfigSettings._instance = new ConfigSettings();\n }\n\n return ConfigSettings._instance;\n }\n\n\n}\n\nPackage(\"com.qcobjects\", [ConfigSettings]);\n", "import { setBasePath } from \"./basePath\";\nimport { _CastProps } from \"./Cast\";\nimport { _Crypt, _CryptObject, _DecryptObject } from \"./Crypt\";\nimport { _DataStringify } from \"./DataStringify\";\nimport { logger } from \"./Logger\";\nimport { GlobalProcessor as Processor } from \"./Processor\";\nimport { _secretKey } from \"./secretKey\";\nimport { Package } from \"./Package\";\nimport { InheritClass } from \"./InheritClass\";\nimport { ICONFIG } from \"@types\";\nimport { ConfigSettings } from \"./ConfigSettings\";\n\n\nexport class CONFIG extends InheritClass implements ICONFIG {\n\n get _CONFIG_ENC(): string {\n return ConfigSettings.instance._CONFIG_ENC;\n }\n\n get _CONFIG(): unknown {\n return ConfigSettings.instance._CONFIG as unknown;\n }\n\n set(name: string, value: unknown):void {\n logger.debug(`CONFIG.set ${name}: ${value as string}`);\n // hack to force update basePath from CONFIG\n if (name === \"basePath\") {\n setBasePath(value as string);\n }\n let _conf;\n try {\n _conf = (\n function (config): any {\n if (config._CONFIG_ENC === null) {\n config._CONFIG_ENC = _Crypt.encrypt(_DataStringify({}), _secretKey);\n }\n const _protectedEnc = config._CONFIG_ENC.valueOf();\n const _protectedConf = config._CONFIG?.valueOf();\n return _CastProps(_protectedConf, _DecryptObject(_protectedEnc));\n }\n )(ConfigSettings.instance);\n } catch (e) {\n _conf = {};\n console.error(e);\n logger.debug(\"failed to encrypt config\");\n }\n\n _conf[name] = value;\n ConfigSettings.instance._CONFIG_ENC = _CryptObject(_conf);\n ConfigSettings.instance.set(name, value);\n }\n\n get(name: string, _default?: unknown): any {\n let _value;\n try {\n const _conf = (\n function (config): any {\n if (config._CONFIG_ENC === null) {\n config._CONFIG_ENC = _Crypt.encrypt(_DataStringify({}), _secretKey);\n }\n const _protectedEnc = config._CONFIG_ENC.valueOf();\n const _protectedConf = config._CONFIG.valueOf();\n return _CastProps(_protectedConf, _DecryptObject(_protectedEnc));\n }\n )(ConfigSettings.instance);\n if (typeof _conf[name] !== \"undefined\") {\n _value = _conf[name];\n }\n } catch (e) {\n console.error(e);\n logger.debug(\"Something wrong when trying to get CONFIG values\");\n logger.debug(\"No config value for: \" + name);\n _value = _default;\n }\n return Processor.processObject(_value) || _default;\n }\n\n private static _instance:CONFIG;\n static get instance ():CONFIG {\n if (typeof CONFIG._instance === \"undefined\") {\n CONFIG._instance = new CONFIG();\n }\n return CONFIG._instance;\n }\n\n static set(name: string, value: unknown):void {\n (CONFIG.instance.set(name, value));\n }\n static get(name: string, value?: unknown): any {\n return (CONFIG.instance.get(name, value));\n }\n\n}\n\n\nPackage(\"com.qcobjects\", [CONFIG]);", "import { type IComponent, type IProcessor } from \"@types\";\nimport { CONFIG } from \"./CONFIG\";\nimport { InheritClass } from \"./InheritClass\";\nimport { New } from \"./New\";\nimport { _top } from \"./top\";\nimport { Component } from \"./Component\";\nimport { Package } from \"./Package\";\n\nexport class Processor extends InheritClass implements IProcessor {\n protected static _instance: IProcessor | undefined;\n constructor({ component, processors }: { component: IComponent | null, processors?: any }) {\n super({ component });\n if (typeof processors !== \"undefined\") {\n this.processors = Object.assign(processors, Processor.instance.processors);\n }\n }\n\n processors: any = {\n \"config\"(component: Component, arg: string): string {\n return CONFIG.get(arg, \"\") as string;\n },\n \"ENV\"(component: Component, arg: string): string {\n return (typeof process !== \"undefined\") ? (process.env[arg] as string) : (\"\");\n },\n \"global\"(component: Component, arg: string): string {\n return (typeof _top !== \"undefined\") ? ((_top as any)[arg] as string) : (\"\");\n }\n };\n\n static get instance(): IProcessor {\n if (typeof Processor._instance === \"undefined\") {\n Processor._instance = new Processor({ component: null });\n }\n return Processor._instance;\n }\n\n setProcessor(_proc_: Function):void {\n if (typeof _proc_ === \"function\" && _proc_.name !== \"\") {\n this.processors[_proc_.name] = _proc_;\n }\n }\n\n component!: IComponent | null;\n\n\n execute(component: IComponent, processorName: string, args: string): string {\n const processorHandler = (typeof component !== \"undefined\" && component !== null) ? (component.processorHandler) : (this);\n return processorHandler?.processors[processorName].bind(processorHandler).apply(processorHandler, [component, args?.split(\",\")]) as string;\n }\n\n process(template: string, component: IComponent | null = null):string {\n const processorHandler = (component !== null) ? (component.processorHandler) : (New(Processor, { component: null }));\n if (typeof template === \"string\") {\n Object.keys(processorHandler.processors).map((funcName) => {\n return [...template.matchAll(new RegExp(\"\\\\$\" + funcName + \"\\\\((.*)\\\\).*\", \"g\"))].map(\n function (procesorMatch) {\n const match0 = `$${funcName}(${procesorMatch[1]})`;\n template = template.replace(match0, processorHandler.execute.bind(processorHandler).call(processorHandler, component, funcName, procesorMatch[1]));\n return procesorMatch;\n }\n );\n });\n }\n return template;\n }\n\n processObject(obj: any, component: IComponent | null = null): any {\n let __instance__: IProcessor | undefined = (component === null) ? (this) : (component.processorHandler);\n if (typeof __instance__ === \"undefined\") {\n __instance__ = new Processor({ component });\n }\n if (typeof obj === \"object\") {\n Object.keys(obj).map(\n (_k) => {\n if (typeof obj[_k] === \"object\" && !Object.hasOwn(obj[_k], \"call\")) {\n obj[_k] = __instance__?.processObject.bind(__instance__)(obj[_k], component as IComponent);\n } else if (typeof obj[_k] === \"string\") {\n obj[_k] = __instance__?.process.bind(__instance__)(obj[_k], component as IComponent);\n }\n return _k;\n }\n );\n } else if (typeof obj === \"string\") {\n obj = __instance__.process.bind(__instance__)(obj, component as IComponent);\n }\n return obj;\n }\n\n}\n\nexport const GlobalProcessor: IProcessor = Processor.instance;\n\nPackage(\"com.qcobjects\", [Processor]);", "import { TComponentRouting } from \"@types\";\n\nexport const __routing_params__ = (routing:TComponentRouting, routingPath:string):object => {\n const standardRoutingPath = routing.path.replace(/{(.*?)}/g, \"(?<$1>.*)\"); // allowing {param}\n return {\n ...[...routingPath.matchAll((new RegExp(standardRoutingPath, \"g\")))][0].groups\n };\n};\n\nexport const __valid_routings__ = function (routings:TComponentRouting[], routingPath:string):TComponentRouting[] {\n return routings.filter(function (routing) {\n const standardRoutingPath = routing.path.replace(/{(.*?)}/g, \"(?<$1>.*)\");\n return (new RegExp(standardRoutingPath, \"g\")).test(routingPath);\n }).reverse();\n};\nexport const __valid_routing_way__ = (validRoutingWays:string[], routingWay:string):boolean => {\n return validRoutingWays.includes(routingWay);\n};\n", "import { TAsyncLoadCallback } from \"@types\";\nimport { Export } from \"./Export\";\nimport { isBrowser } from \"./platform\";\nimport { _top } from \"./top\";\n\nexport const _asyncLoad:any[] = [];\nexport function asyncLoad(callback: TAsyncLoadCallback, args?: any[]): any {\n\n class AsyncCallback {\n func:TAsyncLoadCallback;\n args?:any[];\n constructor(callback: TAsyncLoadCallback, args: any[] = []) {\n this.func = callback;\n this.args = args;\n } \n dispatch() {\n ((this as AsyncCallback).func as Function).apply(this, ...args as [], this);\n }\n }\n _asyncLoad.push((new AsyncCallback(callback, args)) as unknown as never);\n return AsyncCallback;\n}\n\nexport const _fireAsyncLoad = ():void => {\n if (isBrowser){\n document.addEventListener(\"readystatechange\", () => {\n if (document.readyState === \"complete\") {\n // eslint-disable-next-line array-callback-return\n _asyncLoad.map(function (fc) {\n (fc).dispatch.call(fc);\n });\n }\n });\n } else if (typeof _top.global !== \"undefined\") {\n // eslint-disable-next-line array-callback-return\n _asyncLoad.map(function (fc) {\n (fc).dispatch.call(fc);\n });\n }\n };\n\nExport(asyncLoad);", "import { Base64 } from \"./Base64\";\nimport { _DataStringify } from \"./DataStringify\";\nimport { logger } from \"./Logger\";\n\nexport class ComplexStorageCache {\n\n constructor(params: { index: any; load: any; alternate: any; }) {\n let load, alternate;\n const object = params.index;\n if (typeof object !== \"undefined\") {\n load = params.load;\n alternate = params.alternate;\n const cachedObjectID = this.getID(object);\n const cachedResponse = localStorage.getItem(cachedObjectID as string);\n if (this.isEmpty(cachedResponse)) {\n const cachedNewResponse = load.call(null, {\n cachedObjectID,\n cachedResponse,\n \"cache\": this\n });\n this.save(object, cachedNewResponse);\n logger.debug(\"RESPONSE OF {{cachedObjectID}} CACHED\".replace(\"{{cachedObjectID}}\", cachedObjectID as string));\n } else {\n alternate.call(null, {\n cachedObjectID,\n cachedResponse,\n \"cache\": this\n });\n logger.debug(\"RESPONSE OF {{cachedObjectID}} IS ALREADY CACHED \".replace(\"{{cachedObjectID}}\", cachedObjectID as string));\n }\n\n } else {\n throw new Error(\"ComplexStorageCache: index is undefined\");\n }\n return this;\n }\n\n getItem(cachedObjectID: string):any {\n const retrievedObject = localStorage.getItem(cachedObjectID);\n if (!this.isEmpty(retrievedObject)) {\n return JSON.parse(retrievedObject as string);\n } else {\n return null;\n }\n }\n\n\n setItem(cachedObjectID: string, value: any):void {\n localStorage.setItem(cachedObjectID, _DataStringify(value));\n }\n\n isEmpty(object: string | number | null):boolean {\n let r = false;\n switch (true) {\n case (typeof object === \"undefined\"):\n case (typeof object === \"string\" && object === \"\"):\n case (typeof object === \"string\" && object === \"undefined\"):\n case (typeof object === \"number\" && object === 0):\n case (object === null):\n r = true;\n break;\n default:\n r = false;\n }\n return r;\n }\n\n\n getID(object: any):string|undefined {\n let cachedObjectID;\n if (typeof object !== \"undefined\") {\n cachedObjectID = \"cachedObject_\" + Base64.encode(_DataStringify(object).replace(/\\{|\\}|,/g, \"_\"));\n }\n return cachedObjectID;\n }\n\n save(object: any, cachedNewResponse: any):void {\n const cachedObjectID = this.getID(object);\n logger.debug(\"CACHING THE RESPONSE OF {{cachedObjectID}} \".replace(\"{{cachedObjectID}}\", cachedObjectID as string));\n this.setItem(cachedObjectID as string, cachedNewResponse);\n }\n\n getCached(object: any):any {\n const cachedObjectID = this.getID(object);\n return this.getItem(cachedObjectID as string);\n }\n\n clear():void {\n Object.keys(localStorage).filter(function (k) {\n return k.startsWith(\"cachedObject_\");\n }).map(function (c):any {\n localStorage.removeItem(c);\n return c;\n });\n }\n\n}\n", "import { IService, TCacheController } from \"@types\";\nimport { asyncLoad } from \"./asyncLoad\";\nimport { ComplexStorageCache } from \"./ComplexStorageCache\";\nimport { _DataStringify } from \"./DataStringify\";\nimport { logger } from \"./Logger\";\nimport { _require_, isBrowser } from \"./platform\";\nimport { _top } from \"./top\";\n\n/**\n * Loads a simple component from a template\n *\n * @author: Jean Machuca \n * @param service a Service object\n */\nexport const serviceLoader = function (service:IService, _async = false):Promise|undefined {\n const _serviceLoaderInBrowser = function (service:IService):Promise {\n var _promise = new Promise(\n function (resolve, reject) {\n\n logger.debug(\"LOADING SERVICE DATA {{DATA}} FROM {{URL}}\".replace(\"{{DATA}}\", _DataStringify(service.data)).replace(\"{{URL}}\", service.url));\n const xhr = new XMLHttpRequest();\n xhr.withCredentials = service.withCredentials;\n const xhrasync = true; // always async because xhr sync is deprecated\n xhr.open(service.method, service.url, xhrasync);\n for (const header in service.headers) {\n try {\n if (typeof service.headers[header] !== \"function\") {\n xhr.setRequestHeader(header, service.headers[header]);\n }\n } catch (e:any) {\n logger.debug(\"Something went wrong when assign the header \" + header);\n logger.debug(`An error ocurred: ${e}`);\n }\n }\n xhr.onload = function () {\n if (xhr.status === 200) {\n const response = xhr.responseText;\n logger.debug(\"Data received {{DATA}}\".replace(\"{{DATA}}\", _DataStringify(response)));\n logger.debug(\"CREATING SERVICE {{NAME}}\".replace(\"{{NAME}}\", service.name));\n service.template = response;\n if (service.cached && (typeof cache !== \"undefined\")) {\n cache.save(service.name, service.template);\n }\n if (typeof service.done === \"function\") {\n var standardResponse = {\n \"request\": xhr,\n service\n };\n service.done.call(service, standardResponse);\n resolve.call(_promise, standardResponse);\n }\n } else {\n if (typeof service.fail === \"function\") {\n var standardResponse = {\n \"request\": xhr,\n service\n };\n service.fail.call(service, standardResponse);\n reject.call(_promise, standardResponse);\n }\n }\n };\n\n const _directLoad = function () {\n logger.debug(\"SENDING THE NORMAL REQUEST \");\n try {\n xhr.send(_DataStringify(service.data));\n } catch (e:any) {\n logger.debug(\"SOMETHING WRONG WITH REQUEST \");\n logger.debug(`An error ocurred: ${e}`);\n reject.call(_promise, {\n request: xhr,\n service\n });\n }\n };\n\n if (service.cached) {\n var cache = new ComplexStorageCache({\n index: service.data,\n load() {\n _directLoad.call(this);\n },\n alternate(cacheController:TCacheController) {\n if (service.method === \"GET\") {\n service.template = cacheController.cache.getCached(service.name);\n if (typeof service.done === \"function\") {\n const standardResponse = {\n \"request\": xhr,\n service\n };\n service.done.call(service, standardResponse);\n resolve.call(_promise, standardResponse);\n }\n } else {\n _directLoad();\n }\n \n }\n });\n (_top as any).lastCache = cache;\n } else {\n _directLoad();\n }\n\n return xhr;\n }\n );\n return _promise;\n };\n\n const _serviceLoaderInNode = function (service:IService) {\n var _promise = new Promise(\n function (resolve, reject) {\n if (typeof URL === \"undefined\") {\n global.URL = (_require_(\"url\")).URL;\n // eslint-disable-next-line no-unused-vars\n const URL = global.URL;\n }\n const serviceURL = new URL(service.url);\n var req;\n service.useHTTP2 = Object.hasOwn(service, \"useHTTP2\") && service.useHTTP2;\n\n\n const captureEvents = function (req:any) {\n logger.debug(\"LOADING SERVICE DATA (non-browser) {{DATA}} FROM {{URL}}\".replace(\"{{DATA}}\", _DataStringify(service.data)).replace(\"{{URL}}\", service.url));\n let dataXML:any;\n const standardResponse = {\n \"http2Client\": client,\n \"request\": req,\n service,\n \"responseHeaders\": null\n };\n\n if (typeof service.data === \"object\" && service.data !== null) {\n if (service.useHTTP2) {\n try {\n logger.debug(\"Sending data...\");\n const buffer = new Buffer(_DataStringify(service.data));\n req.write(buffer);\n } catch (e:any) {\n logger.debug(\"It was not possible to send any data\");\n logger.debug(`An error ocurred: ${e}`);\n }\n }\n }\n\n dataXML = \"\";\n req.on(\"response\", (responseHeaders:any) => {\n logger.debug(\"receiving response...\");\n standardResponse.responseHeaders = responseHeaders;\n /*\n for (const name in responseHeaders) {\n logger.debug(`${name}: ${responseHeaders[name]}`);\n }\n */\n dataXML = \"\";\n });\n req.on(\"data\", (chunk:any) => {\n logger.debug(\"receiving data...\");\n // do something with the data\n dataXML += \"\" + chunk.toString();\n service.template = dataXML;\n });\n if (service.useHTTP2) {\n req.resume();\n }\n req.on(\"end\", () => {\n logger.debug(\"ending call...\");\n service.template = dataXML;\n if (Object.hasOwn(service, \"useHTTP2\") && service.useHTTP2) {\n client.destroy();\n } else {\n req.destroy();\n }\n service.done.call(service, standardResponse);\n resolve.call(_promise, standardResponse);\n });\n if (service.useHTTP2) {\n req.end();\n }\n\n };\n\n try {\n let requestOptions;\n if (service.useHTTP2) {\n logger.debug(\"using http2\");\n const http2 = _require_(\"http2\");\n var client = (http2).connect(serviceURL.origin);\n requestOptions = Object.assign({\n \":method\": service.method,\n \":path\": serviceURL.pathname\n }, service.options);\n requestOptions = Object.assign(requestOptions, service.headers);\n req = client.request(requestOptions);\n req.setEncoding(\"utf8\");\n captureEvents(req);\n } else {\n if (serviceURL.protocol === \"http:\") {\n const http = _require_(\"http\");\n const request = (http).request;\n requestOptions = Object.assign({\n \"url\": service.url,\n headers: service.headers\n }, service.options);\n req = request(service.url);\n captureEvents(req);\n } else if (serviceURL.protocol === \"https:\") {\n const https = _require_(\"https\");\n requestOptions = Object.assign({\n hostname: serviceURL.hostname,\n port: serviceURL.port,\n path: serviceURL.pathname,\n method: service.method,\n headers: service.headers\n }, service.options);\n const _req_ = (https).request(requestOptions, function (req:any) {\n captureEvents(req);\n });\n _req_.end();\n } else {\n const e = \"Protocol not supported: \" + serviceURL.protocol;\n logger.debug(e);\n throw new Error(e);\n }\n }\n\n\n } catch (e:any) {\n logger.debug(e);\n service.fail.call(service, e);\n reject.call(_promise, e);\n\n }\n }).catch( (e:any) => {\n logger.debug(`Something happened when trying to call the service: ${service.name}. Error: ${e}`);\n service.fail.call(service, e);\n });\n return _promise;\n\n };\n\n const _serviceLoaderMockup = function (service:IService) {\n var _promise = new Promise(\n function (resolve) {\n logger.debug(`Calling mockup service ${service.name} ...`);\n const standardResponse = {\n \"request\": null,\n service,\n \"responseHeaders\": service.responseHeaders\n };\n if (typeof service.mockup === \"function\") {\n service.mockup.call(service, standardResponse);\n } else {\n service.done.call(service, standardResponse);\n }\n resolve.call(_promise, standardResponse);\n });\n return _promise;\n };\n const _serviceLoaderLocal = function (service:IService) {\n var _promise = new Promise(\n function (resolve) {\n logger.debug(`Calling local service ${service.name} ...`);\n const standardResponse = {\n \"request\": null,\n service,\n \"responseHeaders\": service.responseHeaders\n };\n if (typeof service.local === \"function\") {\n service.local.call(service, standardResponse);\n } else {\n service.done.call(service, standardResponse);\n }\n resolve.call(_promise, standardResponse);\n });\n return _promise;\n };\n\n let _ret_: Promise;\n switch (service.kind) {\n case \"rest\":\n if (isBrowser) {\n if (typeof _async !== \"undefined\" && _async) {\n _ret_ = asyncLoad(_serviceLoaderInBrowser, [service, _async]);\n } else {\n _ret_ = _serviceLoaderInBrowser(service);\n }\n } else {\n _ret_ = _serviceLoaderInNode(service);\n }\n break;\n case \"mockup\":\n _ret_ = _serviceLoaderMockup(service);\n break;\n case \"local\":\n _ret_ = _serviceLoaderLocal(service);\n break;\n default:\n logger.debug(`The value of the kind property of the service ${service.name} is not valid`);\n _ret_ = Promise.resolve();\n break;\n }\n return _ret_;\n};\n", "export const _tag_filter_ = \"quick-component:not([loaded]),component:not([loaded])\";\n", "import { IComponent, TCacheController } from \"@types\";\nimport { asyncLoad } from \"./asyncLoad\";\nimport { ComplexStorageCache } from \"./ComplexStorageCache\";\nimport { _DataStringify } from \"./DataStringify\";\nimport { logger } from \"./Logger\";\nimport { is_phonegap, isBrowser } from \"./platform\";\nimport { _top } from \"./top\";\n\n/**\n * Loads a simple component from a template\n *\n * @author: Jean Machuca \n * @param component a Component object\n */\nexport const componentLoader = function (component: IComponent, _async: boolean):Promise {\n let __promise__: Promise;\n const _componentLoaderInBrowser = function (component: IComponent) {\n __promise__ = new Promise(function (resolve, reject) {\n const _promise = component.__promise__;\n const container = (Object.hasOwn(component, \"container\") && typeof component.container !== \"undefined\" && component.container !== null) ? (component.container) : (component.body);\n if (container !== null) {\n const _feedComponent_ = function (component: { feedComponent: () => void; }) {\n component.feedComponent();\n const standardResponse = {\n \"request\": xhr,\n component\n };\n resolve.call(_promise, standardResponse);\n };\n logger.debug(\"LOADING COMPONENT DATA {{DATA}} FROM {{URL}}\".replace(\"{{DATA}}\", _DataStringify(component.data)).replace(\"{{URL}}\", component.url));\n\n const _componentLoaded = function () {\n const successStatus = (is_file) ? (0) : (200);\n if (xhr.status === successStatus) {\n const response = xhr.responseText;\n logger.debug(\"Data received {{DATA}}\".replace(\"{{DATA}}\", _DataStringify(response)));\n logger.debug(\"CREATING COMPONENT {{NAME}}\".replace(\"{{NAME}}\", component.name));\n component.template = response;\n if (component.cached && (typeof cache !== \"undefined\")) {\n cache.save(component.name, component.template);\n }\n _feedComponent_(component);\n } else {\n const standardResponse = {\n \"request\": xhr,\n component\n };\n reject.call(_promise, standardResponse);\n\n }\n };\n if (typeof component.template === \"string\" && component.template !== \"\") {\n // component already has a template it does not need to be reloaded\n _feedComponent_(component);\n } else {\n var is_file = !!(component.url.startsWith(\"file:\"));\n var xhr = new XMLHttpRequest();\n if (!is_file) {\n try {\n logger.debug(\"Calling the url of component in async mode.\");\n xhr.open(component.method, component.url, true);\n } catch (e:any) {\n logger.debug(`An error ocurred: ${e}.`);\n logger.debug(\"Last try has failed... The component cannot be loaded.\");\n }\n } else {\n if (\"fetch\" in _top) {\n logger.debug(\"I can use fetch...\");\n logger.debug(\"It is a file to be loaded, so I will try to use fetch\");\n fetch(component.url).then(response => {\n logger.debug(\"I got a response from fetch, so I'll feed the component\");\n response.text().then(text => {\n component.template = text;\n _feedComponent_(component);\n })\n .catch((e:any) => {throw new Error (`An error ocurred: ${e}`);});\n }).catch ((e:any) => {throw new Error (`An error ocurred: ${e}`);});\n }\n }\n if (!is_phonegap && !is_file) {\n xhr.setRequestHeader(\"Content-Type\", \"text/html\");\n }\n if (!is_file) {\n xhr.onload = _componentLoaded;\n }\n const _directLoad = function (is_file: boolean) {\n is_file = !((typeof is_file === \"undefined\" || !is_file));\n logger.debug(\"SENDING THE NORMAL REQUEST \");\n if (is_file) {\n if (!(\"fetch\" in _top)) {\n logger.debug(\"I have to try to load the file using xhr... \");\n xhr.send(null);\n if (xhr.status === XMLHttpRequest.DONE) {\n _componentLoaded();\n }\n }\n } else {\n logger.debug(\"Trying to send the data to the component... \");\n xhr.send(_DataStringify(component.data));\n }\n };\n\n if (component.cached && (!is_file)) {\n logger.debug(\"USING CACHE FOR COMPONENT: \" + component.name);\n var cache = new ComplexStorageCache({\n index: component.cacheIndex,\n load() {\n _directLoad.call(this, is_file);\n },\n alternate(cacheController: TCacheController) {\n if (component.method === \"GET\") {\n component.template = cacheController.cache.getCached(component.cacheIndex);\n _feedComponent_.call(this, component);\n } else {\n _directLoad.call(this, is_file);\n }\n \n }\n });\n (_top as any).lastCache = cache;\n } else {\n logger.debug(\"NOT USING CACHE FOR COMPONENT: \" + component.name);\n _directLoad(is_file);\n }\n\n }\n } else {\n logger.debug(\"CONTAINER DOESNT EXIST\");\n }\n });\n __promise__.then(function (standardResponse) {\n return component.__done__().then(function () {\n let _ret_;\n if (typeof component.done === \"function\") {\n _ret_ = component.done.call(component, standardResponse);\n }\n return Promise.resolve(_ret_);\n });\n }, function (standardResponse) {\n if (typeof component.fail === \"function\") {\n component.fail.call(component, standardResponse)\n .catch ((e:any)=> {throw new Error (`${e}`);});\n }\n return Promise.reject(new Error (\"An error ocurred\"));\n }).catch(function (e:any) {\n logger.debug(\"Something wrong loading the component\");\n throw new Error (`An error ocurred: ${e}`);\n });\n return __promise__;\n };\n const _componentLoaderInNode = function (component: IComponent) {\n __promise__ = new Promise(function (resolve, reject) {\n const _promise = __promise__;\n const _feedComponent_ = function (component: IComponent) {\n component.feedComponent()\n .catch ((e:any) => {\n throw new Error (`An error ocurred trying to feed the component: ${component.name}. Error: ${e}`);\n });\n const standardResponse = {\n \"request\": null,\n component\n };\n resolve.call(_promise, standardResponse);\n };\n logger.debug(\"LOADING COMPONENT DATA {{DATA}} FROM {{URL}}\".replace(\"{{DATA}}\", _DataStringify(component.data)).replace(\"{{URL}}\", component.url));\n\n const _componentLoaded = function (err: any, responseText: { toString: () => any; }) {\n if (!err) {\n const response = responseText.toString();\n logger.debug(\"Data received {{DATA}}\".replace(\"{{DATA}}\", _DataStringify(response)));\n logger.debug(\"CREATING COMPONENT {{NAME}}\".replace(\"{{NAME}}\", component.name));\n component.template = response;\n if (component.cached && (typeof cache !== \"undefined\")) {\n cache.save(component.name, component.template);\n }\n _feedComponent_(component);\n } else {\n const standardResponse = {\n \"request\": null,\n component\n };\n reject.call(_promise, standardResponse);\n }\n };\n if (typeof component.template === \"string\" && component.template !== \"\") {\n // component already has a template it does not need to be reloaded\n _feedComponent_(component);\n } else {\n logger.debug(\"Loading the component as a local file in server...\");\n const _directLoad = function () {\n // eslint-disable-next-line @typescript-eslint/no-require-imports\n const {readFile} = require(\"node:fs\");\n logger.debug(\"SENDING THE NORMAL REQUEST \");\n readFile(component.url, _componentLoaded);\n };\n\n if (component.cached) {\n logger.debug(\"USING CACHE FOR COMPONENT: \" + component.name);\n var cache = new ComplexStorageCache({\n index: component.cacheIndex,\n load() {\n _directLoad();\n },\n alternate(cacheController: TCacheController) {\n if (component.method === \"GET\") {\n component.template = cacheController.cache.getCached(component.cacheIndex);\n _feedComponent_.call(this, component);\n } else {\n _directLoad.call(this);\n }\n \n }\n });\n (_top as any).lastCache = cache;\n } else {\n logger.debug(\"NOT USING CACHE FOR COMPONENT: \" + component.name);\n _directLoad();\n }\n\n }\n });\n __promise__.then(function (standardResponse) {\n return component.__done__().then(function () {\n let _ret_;\n if (typeof component.done === \"function\") {\n _ret_ = component.done.call(component, standardResponse);\n }\n return Promise.resolve(_ret_);\n });\n }, function (standardResponse) {\n if (typeof component.fail === \"function\") {\n component.fail.call(component, standardResponse)\n .catch((e:any) => {throw new Error (`An error ocurred: ${e}`);});\n }\n return Promise.reject(new Error (\"An error ocurred.\"));\n }).catch(function (e) {\n logger.debug(`Something wrong loading the component: ${e}`);\n });\n return __promise__;\n };\n\n let _ret_;\n if (isBrowser) {\n if (typeof _async !== \"undefined\" && _async) {\n _ret_ = asyncLoad(_componentLoaderInBrowser, [component, _async]);\n } else {\n _ret_ = _componentLoaderInBrowser(component);\n }\n } else {\n _ret_ = _componentLoaderInNode(component);\n }\n return _ret_ as Promise;\n};", "import { Base64 } from \"./Base64\";\nimport { _basePath_ } from \"./basePath\";\nimport { _Cast } from \"./Cast\";\nimport { ClassFactory } from \"./ClassFactory\";\nimport { _buildComponentsFromElements_, ComponentURI } from \"./ComponentFactory\";\nimport { _DataStringify } from \"./DataStringify\";\nimport { _domain_ } from \"./domain\";\nimport { _DOMCreateElement } from \"./DOMCreateElement\";\nimport { __getType__ } from \"./getType\";\nimport { InheritClass } from \"./InheritClass\";\nimport { _methods_, _protected_code_ } from \"./introspection\";\nimport { is_a } from \"./is_a\";\nimport { isQCObjects_Object } from \"./isQCObjects\";\nimport { logger } from \"./Logger\";\nimport { New } from \"./New\";\nimport { Package } from \"./Package\";\nimport { isBrowser } from \"./platform\";\nimport { Processor } from \"./Processor\";\nimport { __routing_params__, __valid_routing_way__, __valid_routings__ } from \"./routings\";\nimport { _top, componentsStack } from \"./top\";\nimport { CONFIG } from \"./CONFIG\";\nimport { serviceLoader } from \"./serviceLoader\";\nimport { _tag_filter_ } from \"./tag_filter\";\nimport { componentLoader } from \"./componentLoader\";\nimport { IComponent, IController, IEffect, IProcessor, IQCObjectsElement, IQCObjectsShadowedElement, IView, TBody, TComponentDoneResponse, TComponentParams, TComponentRouting, TComponentRoutings } from \"@types\";\n\nexport class Component extends InheritClass implements IComponent {\n static shadowed: boolean | undefined = false;\n static cached: any = true;\n [key: string]: any;\n name!: string;\n templateURI!: string;\n url!: string;\n tplsource!: string;\n tplextension!: string;\n template!: string;\n validRoutingWays: string[] = [\"pathname\", \"hash\", \"search\"];\n basePath:string = _basePath_;\n domain:string = _domain_;\n templateHandler = \"DefaultTemplateHandler\";\n processorHandler?: IProcessor;\n routingWay: string | null = null;\n routingNodes: (IQCObjectsElement | HTMLElement)[] = [];\n routings: TComponentRoutings = [];\n routingPath = \"\";\n routingPaths: string[] = [];\n _componentHelpers: any[] = [];\n subcomponents: any[] = [];\n splashScreenComponent?: IComponent = undefined;\n controller?: IController = undefined;\n routingController?: IController = undefined;\n\n view?: IView = undefined;\n effect?: IEffect = undefined;\n effectClass!: string;\n method = \"GET\";\n cached?: boolean = true;\n __promise__?: Promise | null = null;\n data!: any;\n __namespace?: string = undefined;\n protected _parsedAssignmentText!: string;\n protected __shadowRoot: any;\n protected _serviceClassName: string | null = null;\n enableServiceClass?: boolean | undefined = true;\n serviceInstance: any;\n serviceData: any;\n shadowed?: boolean = false;\n container: any;\n innerHTML: any;\n reload: any;\n static subcomponents: any;\n assignRoutingParams?: boolean = true;\n responseTo?: string | undefined;\n static responseTo?: string | undefined;\n\n constructor({\n __parent__,\n templateURI = \"\",\n template,\n tplsource = \"default\",\n tplextension,\n url = \"\",\n name = \"\",\n method = \"GET\",\n data = {},\n reload = false,\n shadowed = false,\n cached = true,\n enableServiceClass,\n assignRoutingParams = true,\n _body = _DOMCreateElement(\"div\"),\n __promise__ = null,\n __shadowRoot,\n body,\n shadowRoot,\n splashScreenComponent,\n controller,\n view\n }: TComponentParams) {\n if (arguments.length < 1) {\n throw Error(\"No arguments in component. You must at least give one argument.\");\n }\n super({\n __parent__,\n templateURI,\n template,\n tplsource,\n tplextension,\n url,\n name,\n method,\n data,\n reload,\n shadowed,\n cached,\n enableServiceClass,\n assignRoutingParams,\n _body,\n __promise__,\n __shadowRoot,\n body,\n shadowRoot,\n splashScreenComponent,\n controller,\n view\n });\n const self = this;\n\n if (typeof name !== \"undefined\") {\n self.name = name;\n }\n\n if (typeof self.name === \"undefined\" && typeof name === \"undefined\") {\n logger.warn(\"A name is not defined for \" + __getType__(self));\n }\n\n self.routingWay = CONFIG.get(\"routingWay\");\n\n self.processorHandler = new Processor({\n component: self\n });\n\n /* assign body data attributes to data */\n self.data = (typeof self.data === \"undefined\" || self.data === null) ? ({}) : (self.data);\n self.data = Object.assign(self.data, self.dataAttributes);\n\n self.createServiceInstance()\n .then(() => {\n if (typeof self.__new__ === \"function\") {\n self.__new__(self);\n }\n\n self._generateRoutingPaths(self.body)\n .then(function () {\n self._reroute_()\n .then(function () {\n return self.rebuild()\n .then(function () {\n logger.info(`Component._new_ The component ${self.name} was built successfully!`);\n }).catch(function (standardResponse) {\n logger.warn(`Component._new_ Something went wrong building the component ${self.name}`);\n console.error(`Component._new_ Something went wrong building the component ${self.name}`, standardResponse);\n });\n }).catch((e: any) => {\n throw Error(`Unexpected error ${e}`);\n });\n }).catch((e: any) => {\n throw Error(`Unexpected error ${e}`);\n });\n\n }).catch((e: any) => {\n throw Error(`Unexpected error. ${e}`);\n });\n\n }\n\n set cacheIndex(value) {\n // readonly\n logger.debug(\"[cacheIndex] This property is readonly\");\n }\n\n get cacheIndex():string {\n const self = this;\n const __routing_path__ = _DataStringify(self.routingPath);\n return Base64.encode(self.name + __routing_path__);\n }\n\n set parsedAssignmentText(value: string) {\n // readonly\n logger.debug(\"[parsedAssignmentText] This property is readonly\");\n }\n\n get parsedAssignmentText(): string {\n const self = this;\n self._parsedAssignmentText = self.parseTemplate(self.template);\n if (typeof self._parsedAssignmentText === \"undefined\") {\n throw Error(`[Component][${this.name}][parsedAssignmentText] Could not generate content!`);\n }\n return self._parsedAssignmentText;\n }\n\n\n set shadowRoot(value: IQCObjectsShadowedElement) {\n const self = this;\n if (typeof self.__shadowRoot === \"undefined\") {\n self.__shadowRoot = value;\n } else {\n logger.debug(\"[shadowRoot] This property can only be assigned once!\");\n }\n }\n\n get shadowRoot(): IQCObjectsShadowedElement {\n const self = this;\n return self.__shadowRoot as IQCObjectsShadowedElement;\n }\n\n\n set routingSelected(value: TComponentRouting[]) {\n logger.debug(\"[routingSelected] This is a read-only property of the component\");\n }\n\n get routingSelected(): TComponentRouting[] {\n const self = this;\n return __valid_routings__(self.routings, self.routingPath);\n }\n\n set routingParams(value) {\n logger.debug(\"[routingParams] This is a read-only property of the component\");\n }\n\n get routingParams(): object {\n const component = this;\n return [{}].concat(component.routingSelected.map(function (routing: any) {\n return __routing_params__(routing, component.routingPath);\n })).reduce(function (accumulator, colData) {\n return Object.assign(accumulator, colData);\n });\n }\n\n\n set serviceClassName(_serviceClassName: string) {\n this._serviceClassName = _serviceClassName;\n }\n\n get serviceClassName(): string | null {\n let _serviceClassName: string | null = \"\";\n if (isBrowser) {\n _serviceClassName = ((this.body as HTMLElement).getAttribute(\"serviceClass\") !== null) ? ((this.body as HTMLElement).getAttribute(\"serviceClass\")) : (\n this._serviceClassName\n );\n } else {\n _serviceClassName = this._serviceClassName;\n }\n return _serviceClassName;\n }\n\n protected get responseToData(): boolean {\n let _response_to_data_: boolean = false;\n if (isBrowser) {\n const responseToAttr = (this.body as HTMLElement).getAttribute(\"response-to\");\n _response_to_data_ = responseToAttr === \"data\" || this.responseTo === \"data\";\n } else {\n _response_to_data_ = this.responseTo === \"data\";\n }\n return _response_to_data_;\n }\n\n protected get responseToTemplate(): boolean {\n let _response_to_template_: boolean = false;\n if (isBrowser) {\n const responseToAttr = (this.body as HTMLElement).getAttribute(\"response-to\");\n _response_to_template_ = responseToAttr === \"template\" || this.responseTo === \"template\";\n } else {\n _response_to_template_ = this.responseTo === \"template\";\n }\n return _response_to_template_;\n }\n\n createServiceInstance(): Promise {\n const component = this;\n let data = this.data;\n let __serviceClass: any;\n const __classDefinition = component.getClass().__definition;\n const _serviceClassName = component.serviceClassName;\n\n return new Promise(function (resolve, reject) {\n /* __enable_service_class__ = true by default */\n const __enable_service_class__ = component.enableServiceClass;\n let _response_to_data_ = component.responseToData;\n let _response_to_template_ = component.responseToTemplate;\n\n if (__enable_service_class__ && _serviceClassName !== null) {\n __serviceClass = ClassFactory(_serviceClassName);\n }\n if (!_response_to_data_ && __classDefinition && Object.hasOwn(__classDefinition, \"responseTo\")) {\n _response_to_data_ = (__classDefinition.responseTo === \"data\");\n } else if (!_response_to_data_ && Object.hasOwn(ClassFactory(\"Component\"), \"responseTo\")) {\n _response_to_data_ = ((ClassFactory(\"Component\") as Component).responseTo === \"data\");\n }\n if (!_response_to_template_ && __classDefinition && Object.hasOwn(__classDefinition, \"responseTo\")) {\n _response_to_template_ = (__classDefinition.responseTo === \"template\");\n } else if (!_response_to_template_ && Object.hasOwn(ClassFactory(\"Component\"), \"responseTo\")) {\n _response_to_template_ = ((ClassFactory(\"Component\") as Component).responseTo === \"template\");\n }\n\n if (typeof __serviceClass !== \"undefined\" &&\n (typeof __enable_service_class__ !== \"undefined\" &&\n __enable_service_class__ === true) &&\n (_response_to_data_ || _response_to_template_)\n ) {\n logger.info(\"Loading service \" + _serviceClassName);\n const serviceInstance = New(__serviceClass, {\n data\n });\n (serviceLoader(serviceInstance) as Promise)?.then(function ({\n service\n }: { request: any, service: any }) {\n let serviceResponse;\n if (typeof service.JSONresponse !== \"undefined\" && service.JSONresponse !== null) {\n serviceResponse = service.JSONresponse;\n } else {\n serviceResponse = service.template;\n }\n if (_response_to_data_) {\n if (typeof data === \"object\" && typeof serviceResponse === \"object\") {\n data = Object.assign(data, serviceResponse);\n } else {\n data = serviceResponse;\n }\n component.data = data;\n }\n component.serviceInstance = serviceInstance;\n component.serviceData = data;\n\n if (_response_to_template_) {\n component.template = serviceResponse;\n }\n resolve(serviceResponse);\n }, function (rejectedResponse: Error) {\n logger.debug(`Service loading rejected for ${_serviceClassName} in ${component.name}`);\n reject(rejectedResponse);\n }).catch(function (e: any) {\n logger.debug(\"Something went wroing while trying to load the service \" + _serviceClassName);\n throw Error(`Error loading ${_serviceClassName} for ${component.name}. Detail: ${e}`);\n });\n } else {\n resolve(null);\n }\n });\n }\n\n _bindroute_():void {\n const _component_ = this;\n if (!(_component_ as any)._bindroute_.loaded) {\n if (isBrowser) {\n\n (_component_.hostElements(\"a\") as unknown as HTMLAnchorElement[]).map(function (a: HTMLAnchorElement) {\n (a as any).oldclick = a.onclick;\n a.onclick = function (e) {\n let _ret_ = true;\n if (!_top.global.get(\"routingPaths\")) {\n _top.global.set(\"routingPaths\", []);\n }\n const routingWay = CONFIG.get(\"routingWay\");\n const routingPath = (e.target as any)[routingWay];\n if (_top.global.get(\"routingPaths\").includes(routingPath) &&\n (e.target as any)[routingWay] !== (location as any)[routingWay] &&\n (e.target as HTMLAnchorElement).href !== document.location.href\n ) {\n logger.debug(\"A ROUTING WAS FOUND: \" + routingPath);\n window.history.pushState({\n href: (e.target as HTMLAnchorElement).href\n }, (e?.target as HTMLAnchorElement)?.href, (e.target as HTMLAnchorElement).href);\n Component.route().catch((e) => { throw Error(`Unexpected error: ${e}`); });\n _ret_ = false;\n } else {\n logger.debug(\"NO ROUTING FOUND FOR: \" + routingPath);\n }\n if (typeof (e.target as any).oldclick !== \"undefined\" && typeof (e.target as any).oldclick === \"function\") {\n (e.target as any).oldclick.call(e.target, e);\n }\n return _ret_;\n };\n return null;\n });\n\n } else {\n // not yet implemented.\n }\n (_component_ as any)._bindroute_.loaded = true;\n } else {\n logger.debug(`Routes already bound to popstate events for ${_component_.name}`);\n }\n\n }\n\n done(standardResponse?: TComponentDoneResponse): Promise {\n const _ret_ = new Promise((resolve) => {\n if (typeof standardResponse !== \"undefined\") {\n const { request, component } = standardResponse;\n resolve({ request, component });\n } else {\n resolve({ request: undefined, component: undefined });\n }\n });\n return _ret_;\n }\n\n createControllerInstance(): Promise<{ component: IComponent, controller: IController }> {\n let _Controller: any;\n if (isBrowser) {\n if (typeof this.body === \"undefined\") {\n throw new Error(\"The component has no body\");\n }\n var controllerName = (this.body as HTMLElement).getAttribute(\"controllerClass\");\n if (!controllerName) {\n controllerName = \"Controller\";\n }\n _Controller = ClassFactory(controllerName);\n if (typeof _Controller !== \"undefined\") {\n this.controller = New(_Controller, {\n component: this\n });\n }\n\n }\n\n return new Promise((resolve, reject) => {\n if (isBrowser) {\n if (typeof _Controller !== \"undefined\" && typeof this.controller !== \"undefined\") {\n if (typeof (this.controller).done === \"function\") {\n try {\n this.controller.done.call(this.controller);\n } catch (e: any) {\n throw Error(e);\n }\n } else {\n logger.debug(`${controllerName} does not have a done() method.`);\n reject(new Error(`${controllerName} does not have a done() method.`));\n }\n if (typeof this.controller.createRoutingController === \"function\") {\n this.controller.createRoutingController.call(this.controller);\n } else {\n logger.debug(`${controllerName} does not have a createRoutingController() method.`);\n }\n }\n }\n resolve({ component: this, controller: this.controller as IController });\n });\n }\n\n createEffectInstance(): Promise<{ component: Component, effect: IEffect }> {\n const _component_ = this;\n return new Promise(function (resolve) {\n if (isBrowser) {\n const effectClassName = (_component_.body as HTMLElement)?.getAttribute(\"effectClass\");\n let applyEffectTo = (_component_.body as HTMLElement)?.getAttribute(\"apply-effect-to\");\n applyEffectTo = (applyEffectTo !== null) ? (applyEffectTo) : (\"load\");\n if (effectClassName !== null && applyEffectTo === \"observe\") {\n _component_.applyObserveTransitionEffect(effectClassName);\n } else if (effectClassName !== null && applyEffectTo === \"load\") {\n _component_.applyTransitionEffect(effectClassName);\n }\n }\n resolve({ component: _component_, effect: _component_.effect as IEffect });\n });\n }\n\n createViewInstance(): Promise<{ component: Component, view: IView }> {\n const _component_ = this;\n return new Promise(function (resolve) {\n const viewName = (isBrowser) ? ((_component_.body as HTMLElement).getAttribute(\"viewClass\")) : (null);\n if (viewName !== null) {\n const _View = ClassFactory(viewName);\n if (typeof _View !== \"undefined\") {\n _component_.view = New(_View, {\n component: _component_\n }); // Initializes the main view for the component\n if (Object.hasOwn(_component_.view as object, \"done\") && typeof _component_.view?.done === \"function\") {\n _component_.view?.done.call(_component_.view);\n }\n }\n\n }\n resolve({ component: _component_, view: _component_.view as IView });\n\n });\n }\n\n __done__(): Promise {\n const _component_ = this;\n const componentDone = function () {\n if (typeof _component_ === \"undefined\") {\n throw new Error(\"componentDone() has lost its context\");\n }\n if (typeof _component_.body === \"undefined\") {\n throw new Error(\"The component has no body\");\n }\n\n (async () => {\n await _component_.createViewInstance();\n await _component_.createControllerInstance();\n await _component_.createEffectInstance();\n })()\n .catch((e: any) => {\n throw new Error(`Unknown error ${e}.`);\n });\n\n logger.debug(`Trying to run component helpers for ${_component_.name}...`);\n try {\n _component_.runComponentHelpers();\n logger.debug(`Component helpers for ${_component_.name} executed.`);\n } catch (e: any) {\n logger.debug(`Component helpers for ${_component_.name} could not be executed.`);\n throw Error(e);\n }\n\n _component_.subcomponents = _component_.__buildSubComponents__();\n\n _component_._bindroute_();\n if (isBrowser) {\n (_component_.body as HTMLElement).setAttribute(\"loaded\", \"true\");\n }\n };\n\n return new Promise(function (resolve, reject) {\n try {\n resolve(componentDone.call(_component_));\n } catch (e: any) {\n reject(new Error(e));\n }\n });\n\n }\n\n hostElements(tagFilter: string): (IQCObjectsElement | HTMLElement | IQCObjectsShadowedElement)[] {\n const _component_ = this;\n let elementList: (IQCObjectsElement | HTMLElement | IQCObjectsShadowedElement)[] = [];\n if (isBrowser) {\n elementList = (_component_.shadowed && (typeof _component_.shadowRoot !== \"undefined\")) ? (\n _component_.shadowRoot.subelements(tagFilter) as IQCObjectsShadowedElement[]\n ) : (\n (_component_.body as IQCObjectsElement).subelements(tagFilter)\n );\n\n }\n return elementList;\n }\n\n get subtags(): (HTMLElement | IQCObjectsElement | IQCObjectsShadowedElement)[] {\n const _component_ = this;\n const tagFilter = _tag_filter_;\n return _component_.hostElements(tagFilter);\n }\n\n get bodyAttributes():any {\n const _component_ = this;\n const c = _component_.body;\n return (isBrowser) ? ([...(c as HTMLElement).getAttributeNames()].map(a => { return { [a]: (c as HTMLElement).getAttribute(a) }; }).reduce((accumulator, colData) => { return Object.assign(accumulator, colData); })) : ({});\n }\n\n get dataAttributes():any {\n const _component_ = this;\n const c = _component_.body;\n return (isBrowser) ? ([{}].concat([...(c as HTMLElement).getAttributeNames()].filter(n => n.startsWith(\"data-\")).map(a => { return { [a.split(\"-\")[1]]: (c as HTMLElement).getAttribute(a) }; })).reduce((accumulator, colData) => { return Object.assign(accumulator, colData); })) : ({});\n }\n\n __buildSubComponents__(rebuildObjects = false): any {\n const _component_: Component = this as Component;\n let elementList = _component_.subtags;\n if (!rebuildObjects) {\n elementList = (elementList as HTMLElement[]).filter((t: HTMLElement) => t.getAttribute(\"loaded\") !== \"true\") as unknown[] as IQCObjectsElement[];\n }\n if ((typeof _component_ !== \"undefined\") || (_component_ as Component).subcomponents.length < 1) {\n _component_.subcomponents = _buildComponentsFromElements_(elementList as HTMLElement[], _component_);\n }\n return _component_.subcomponents;\n }\n\n fail(standardResponse: { error: any; component: Component; }): Promise<{ error: any; component: Component; }> {\n const _ret_ = new Promise<{ error: any; component: Component; }>((resolve, reject) => {\n if (typeof standardResponse !== \"undefined\") {\n const { error, component } = standardResponse;\n resolve({ error, component });\n } else {\n reject(new Error(\" Unknown error.\"));\n }\n });\n return _ret_;\n }\n\n set(key: string, value: any):void {\n this[key] = value;\n }\n\n get(key: string, _defaultValue?: string): any {\n return this[key] || _defaultValue;\n }\n\n feedComponent(): Promise {\n const _component_ = this;\n logger.debug(`[Component][${this.name}][feedComponent] start feeding component...`);\n const _feedComponent_InBrowser = function (_component_: Component): any {\n if (typeof _component_.container === \"undefined\" && typeof _component_.body === \"undefined\") {\n logger.warn(\"COMPONENT {{NAME}} has an undefined container and body\".replace(\"{{NAME}}\", _component_.name));\n return;\n }\n const container = (typeof _component_.container === \"undefined\" || _component_.container === null) ? (_component_.body) : (_component_.container);\n const parsedAssignmentText = _component_.parsedAssignmentText;\n _component_.innerHTML = parsedAssignmentText;\n if (_component_.shadowed) {\n logger.debug(\"COMPONENT {{NAME}} is shadowed\".replace(\"{{NAME}}\", _component_.name));\n logger.debug(\"Preparing slots for Shadowed COMPONENT {{NAME}}\".replace(\"{{NAME}}\", _component_.name));\n const tmp_shadowContainer = _DOMCreateElement(\"div\");\n container.subelements(\"[slot]\").map(\n (c: { parentElement: any; }): any => {\n if (c.parentElement === container) {\n tmp_shadowContainer.appendChild(c as any);\n }\n return c;\n });\n logger.debug(\"Creating shadowedContainer for COMPONENT {{NAME}}\".replace(\"{{NAME}}\", _component_.name));\n const shadowContainer = _DOMCreateElement(\"div\");\n shadowContainer.classList.add(\"shadowHost\");\n try {\n _component_.shadowRoot = shadowContainer.attachShadow({\n mode: \"open\"\n }) as IQCObjectsShadowedElement;\n } catch (e: any) {\n logger.debug(`An error ocurred: ${e}.`);\n try {\n logger.debug(\"Shadowed COMPONENT {{NAME}} is repeated\".replace(\"{{NAME}}\", _component_.name));\n _component_.shadowRoot = shadowContainer.shadowRoot as IQCObjectsShadowedElement;\n } catch (e: any) {\n logger.debug(`An error ocurred: ${e}.`);\n logger.warn(\"Shadowed COMPONENT {{NAME}} is not allowed on this browser\".replace(\"{{NAME}}\", _component_.name));\n }\n }\n if (typeof _component_.shadowRoot !== \"undefined\" && _component_.shadowRoot !== null) {\n if (_component_.reload) {\n logger.debug(\"FORCED RELOADING OF CONTAINER FOR Shadowed COMPONENT {{NAME}}\".replace(\"{{NAME}}\", _component_.name));\n if (shadowContainer !== null && shadowContainer.shadowRoot !== null) {\n shadowContainer.shadowRoot.innerHTML = _component_.innerHTML;\n }\n } else {\n tmp_shadowContainer.innerHTML = _component_.parseTemplate(tmp_shadowContainer.innerHTML);\n logger.debug(\"ADDING Shadowed COMPONENT {{NAME}} \".replace(\"{{NAME}}\", _component_.name));\n if (shadowContainer !== null && shadowContainer.shadowRoot !== null) {\n shadowContainer.shadowRoot.innerHTML += _component_.innerHTML;\n }\n }\n logger.debug(\"ADDING Slots to Shadowed COMPONENT {{NAME}} \".replace(\"{{NAME}}\", _component_.name));\n shadowContainer.innerHTML += tmp_shadowContainer.innerHTML;\n logger.debug(\"APPENDING Shadowed COMPONENT {{NAME}} to Container \".replace(\"{{NAME}}\", _component_.name));\n const qs = container.querySelector(\".shadowHost\");\n if (!(typeof qs !== \"undefined\" && qs !== null)) {\n container.appendChild(shadowContainer);\n } else {\n logger.debug(\"Shadowed Container for COMPONENT {{NAME}} is already present in the tree \".replace(\"{{NAME}}\", _component_.name));\n if (_component_.shadowRoot !== null && shadowContainer.shadowRoot !== null) {\n _component_.shadowRoot.innerHTML = shadowContainer.shadowRoot.innerHTML;\n }\n }\n } else {\n logger.warn(\"Shadowed COMPONENT {{NAME}} is bad configured\".replace(\"{{NAME}}\", _component_.name));\n }\n } else {\n if (_component_.reload) {\n logger.debug(\"FORCED RELOADING OF CONTAINER FOR COMPONENT {{NAME}}\".replace(\"{{NAME}}\", _component_.name));\n container.innerHTML = _component_.innerHTML;\n } else if (container && _component_) {\n logger.debug(\"ADDING COMPONENT {{NAME}} \".replace(\"{{NAME}}\", _component_.name));\n container.innerHTML += _component_.innerHTML;\n } else {\n logger.warn(\"COMPONENT {{NAME}} is not added to the DOM\".replace(\"{{NAME}}\", _component_.name));\n }\n }\n\n };\n\n const _feedComponent_InNode = function (_component_: Component): any {\n const parsedAssignmentText = _component_.parsedAssignmentText;\n _component_.innerHTML = parsedAssignmentText;\n };\n\n let _ret_;\n if (!is_a(_component_, \"Component\")) {\n logger.warn(\"Trying to feed a non component object\");\n return Promise.reject(new Error(`Trying to feed a non component object ${typeof _component_}`));\n }\n return new Promise((resolve, reject) => {\n if (isBrowser) {\n try {\n _ret_ = _feedComponent_InBrowser(_component_);\n resolve(_ret_);\n } catch (e: any) {\n reject(new Error(e));\n }\n } else {\n try {\n _ret_ = _feedComponent_InNode(_component_);\n resolve(_ret_);\n } catch (e: any) {\n reject(new Error(e));\n }\n\n }\n\n });\n }\n\n rebuild(): Promise<{ request?: XMLHttpRequest, component: Component }> {\n const _component = this as Component;\n var _promise = new Promise<{ request?: XMLHttpRequest, component: Component }>(function (resolve, reject) {\n if (typeof _component === \"undefined\" || _component === null) {\n reject(new Error(\"Component is undefined\"));\n }\n if (isQCObjects_Object(_component) && is_a(_component, \"Component\")) {\n switch (true) {\n case (_component.get(\"tplsource\") === \"none\"):\n logger.debug(\"Component \" + _component.name + \" has specified template-source=none, so no template load was done\");\n var standardResponse = {\n request: undefined,\n component: _component\n };\n _component.__done__().then(function () {\n if (typeof _component.done === \"function\") {\n _component.done.call(_component, standardResponse)\n .catch((e: any) => {\n logger.debug(`It was an error while calling done() in ${_component.name}: ${e}`);\n });\n }\n resolve.call(_promise, standardResponse);\n }, function () {\n reject.call(_promise, standardResponse);\n });\n break;\n case (_component.get(\"tplsource\") === \"inline\"):\n logger.debug(\"Component \" + _component.name + \" has specified template-source=inline, so it is assumed that template is already declared\");\n (async (_component) => {\n await _component.feedComponent.bind(_component)();\n })(_component)\n .catch((e: any) => {\n logger.debug(`It was not possible to feed the component ${_component.name}: ${e}`);\n });\n var standardResponse = {\n request: undefined,\n component: _component\n };\n _component.__done__().then(async () => {\n if (typeof _component.done === \"function\") {\n await _component.done(standardResponse);\n }\n resolve.call(_promise, standardResponse);\n }, function () {\n reject.call(_promise, standardResponse);\n });\n break;\n case (_component.get(\"tplsource\") === \"default\" &&\n _component.get(\"templateURI\") !== \"\"):\n _component.set(\"url\", _component.get(\"basePath\") + _component.get(\"templateURI\"));\n (componentLoader(_component, false))?.then(\n function (standardResponse: any) {\n resolve.call(_promise, standardResponse);\n },\n function (standardResponse: any) {\n reject.call(_promise, standardResponse);\n });\n break;\n case (_component.get(\"tplsource\") === \"external\" &&\n _component.get(\"templateURI\") !== \"\"):\n _component.set(\"url\", _component.get(\"templateURI\"));\n (componentLoader(_component, false)).then(\n function (standardResponse: any) {\n resolve.call(_promise, standardResponse);\n },\n function (standardResponse: any) {\n reject.call(_promise, standardResponse);\n });\n break;\n case _component.get(\"tplsource\") === \"default\" && _component.get(\"templateURI\", \"\") === \"\":\n logger.debug(`Component ${_component.name} template-source is ${_component.get(\"tplsource\")} and no templateURI is present`);\n reject.call(_promise, `Component ${_component.name} template-source is ${_component.get(\"tplsource\")} and no templateURI is present`);\n break;\n default:\n logger.debug(\"Component \" + _component.name + \" will not be rebuilt because no templateURI is present\");\n reject.call(_promise, {\n request: null,\n component: _component\n });\n break;\n }\n\n }\n });\n return _promise;\n }\n\n Cast(oClass: any): any {\n /* Cast method for components has been deprecated. Don't use this method, it is available only for compatibility purposes */\n const o = _methods_(oClass).map((m): any => (m as Function).name.replace(/bound /g, \"\")).map(m => {\n return {\n [m]: oClass[m].bind(this)\n };\n }).reduce((c, p) => Object.assign(c, p), {});\n return _Cast(this, o);\n }\n\n route():Promise {\n return (this.constructor as typeof Component).route();\n }\n\n static route():Promise {\n const componentClass = this; /* is can be class or object */\n let _route_promise_;\n const isValidInstance = !!((isQCObjects_Object(componentClass) && is_a(componentClass, \"Component\")));\n const __route__ = function (componentList: any[]) {\n const _componentNames_: any[] = [];\n const _promises_ = componentList.filter(function (rc: any) {\n return typeof rc !== \"undefined\";\n }).map(function (rc: Component): Promise {\n if (typeof rc.name !== \"undefined\") {\n _componentNames_.push(rc.name);\n } else {\n throw new Error(__getType__(rc) + \" does not have a name\");\n }\n return new Promise(function (resolve, reject) {\n if (typeof rc !== \"undefined\" && !!rc._reroute_) {\n rc._reroute_()\n .then(function () {\n rc.reload = true;\n rc.rebuild()\n .then(() => {\n resolve();\n })\n .catch((e: any) => {\n logger.debug(`Error ${e}`);\n });\n return;\n })\n .then(function () {\n if (Object.hasOwn(rc, \"subcomponents\") &&\n typeof rc.subcomponents !== \"undefined\" &&\n rc.subcomponents.length > 0\n ) {\n logger.debug(\"LOOKING FOR ROUTINGS IN SUBCOMPONENTS FOR: \" + rc.name);\n return __route__.call(rc, rc.subcomponents);\n } else {\n logger.debug(\"No subcomponents to look for routings in: \" + rc.name);\n if (rc.subtags.length > 0) {\n rc.subcomponents = rc.__buildSubComponents__(true);\n }\n resolve();\n }\n }).catch((e: any) => {\n logger.debug(`Error: ${e}`);\n });\n } else if (typeof rc !== \"undefined\") {\n reject(new Error(\"Component \" + rc.name + \" is not an instance of Component\"));\n }\n return;\n });\n });\n return Promise.all(_promises_)\n .then(function () {\n logger.debug(\"ROUTING COMPLETED FOR \" + _componentNames_.join(\", \"));\n }).catch(function (err) {\n logger.warn(\"ROUTING FAILED FOR \" + _componentNames_.join(\", \") + \": \" + err);\n });\n };\n if (isValidInstance || !!componentsStack) {\n if (isValidInstance) {\n logger.debug(\"loading routings for instance \" + componentClass.name);\n }\n _route_promise_ = __route__.call(componentClass, (isValidInstance) ? (componentClass.subcomponents) : (componentsStack));\n } else {\n logger.debug(\"An undetermined result expected if load routings. So will not be loaded this time.\");\n throw Error(\"There is no valid instance and no components stack available to apply rountings\");\n }\n return _route_promise_;\n }\n\n fullscreen():void {\n if (isBrowser) {\n const elem: HTMLElement = this.body as HTMLElement;\n if (elem.requestFullscreen) {\n elem.requestFullscreen()\n .catch((e: any) => {\n throw new Error(`An error ocurred when requesting fullscreen: ${e}`);\n });\n } else if ((elem as any).mozRequestFullScreen) {\n /* Firefox */\n (elem as any).mozRequestFullScreen();\n } else if ((elem as any).webkitRequestFullscreen) {\n /* Chrome, Safari & Opera */\n (elem as any).webkitRequestFullscreen();\n } else if ((elem as any).msRequestFullscreen) {\n /* IE/Edge */\n (elem as any).msRequestFullscreen();\n }\n } else {\n // not yet implemented.\n }\n }\n\n closefullscreen():void {\n if (isBrowser) {\n if (document.exitFullscreen) {\n document.exitFullscreen()\n .catch((e: any) => { throw new Error(`An error ocurred when trying to exit fullscrenn ${e}.`); });\n } else if ((document as any).mozCancelFullScreen) {\n (document as any).mozCancelFullScreen();\n } else if ((document as any).webkitExitFullscreen) {\n (document as any).webkitExitFullscreen();\n } else if ((document as any).msExitFullscreen) {\n (document as any).msExitFullscreen();\n }\n } else {\n // noy yet implemented.\n }\n }\n\n _generateRoutingPaths(componentBody: TBody):Promise {\n const component = this;\n return new Promise(function (resolve) {\n if (isBrowser) {\n if (__valid_routing_way__(component.validRoutingWays, component.routingWay || \"\")) {\n if (typeof componentBody !== \"undefined\") {\n component.innerHTML = (componentBody as HTMLElement)?.innerHTML;\n component.routingNodes = (componentBody as IQCObjectsElement)?.subelements(\"routing\");\n component.routings = [];\n component.routingNodes.map((routingNode): any => {\n const attributeNames = (routingNode as HTMLElement).getAttributeNames();\n const routing = {} as TComponentRouting;\n attributeNames.map((attributeName: any, a: string | number): any => {\n (routing as any)[attributeNames[a as any]] = (routingNode as HTMLElement).getAttribute(attributeNames[a as any]);\n return attributeName;\n });\n component.routings.push(routing as never);\n if (!component.routingPaths) {\n component.routingPaths = [];\n }\n if (!component.routingPaths.includes(routing.path as never)) {\n component.routingPaths.push(routing.path as never);\n }\n if (!_top.global.get(\"routingPaths\")) {\n _top.global.set(\"routingPaths\", []);\n }\n if (!_top.global.get(\"routingPaths\").includes(routing.path)) {\n _top.global.get(\"routingPaths\").push(routing.path);\n }\n return routingNode;\n });\n }\n }\n } else {\n // not yet implemented.\n }\n resolve();\n\n });\n }\n\n parseTemplate(template: any): string {\n const _self = this;\n let _parsedAssignmentText: string;\n const value = template;\n if (Object.hasOwn(_self, \"templateHandler\")) {\n const templateHandlerName = _self.templateHandler;\n logger.debug(`[Component][${this.name}][parseTemplate] Attempting to use ${templateHandlerName} ...`);\n const templateHandlerClass = ClassFactory(templateHandlerName);\n const templateInstance = New(templateHandlerClass, {\n component: _self,\n template: value\n });\n templateInstance.component = _self;\n let selfData = _self.data;\n if (Object.hasOwn(_self, \"assignRoutingParams\") && _self.assignRoutingParams) {\n try {\n selfData = Object.assign(selfData, _self.routingParams);\n } catch (e: any) {\n logger.debug(`An error ocurred: ${e}.`);\n logger.debug(\"[parseTemplate] it was not possible to assign the routing params to the template\");\n }\n }\n _parsedAssignmentText = templateInstance.assign(selfData);\n } else {\n logger.debug(`[Component][${this.name}][parseTemplate] No value for templateHandler. Using raw content...`);\n _parsedAssignmentText = value;\n }\n return _parsedAssignmentText;\n }\n\n _reroute_(): Promise {\n /* This method set the selected routing and makes the switch to the templateURI */\n const rc = this;\n return new Promise(function (resolve) {\n if (isBrowser) {\n if (__valid_routing_way__(rc.validRoutingWays, rc.routingWay || \"\")) {\n rc.routingPath = (location as any)[rc.routingWay as string];\n rc.routingSelected.map((routing: TComponentRouting,): TComponentRouting => {\n const componentURI = ComponentURI({\n \"COMPONENTS_BASE_PATH\": CONFIG.get(\"componentsBasePath\"),\n \"COMPONENT_NAME\": routing.name.toString(),\n \"TPLEXTENSION\": (Object.hasOwn(routing, \"tplextension\")) ? (routing.tplextension || \"\") : (rc.tplextension),\n \"TPL_SOURCE\": \"default\" /* here is always default in order to get the right uri */\n });\n rc.templateURI = componentURI;\n return routing;\n });\n if (rc.routingSelected.length > 0) {\n rc.template = \"\";\n if (typeof rc.body !== \"undefined\" && rc.body !== null) {\n (rc.body as HTMLElement).innerHTML = \"\";\n }\n }\n }\n }\n resolve(rc);\n\n });\n }\n\n lazyLoadImages() {\n if (isBrowser) {\n const component = this;\n const _componentRoot = component.componentRoot as IQCObjectsShadowedElement;\n if (typeof _componentRoot !== \"undefined\" && _componentRoot !== null) {\n const _imgLazyLoaded = [..._componentRoot.subelements(\"img[lazy-src]\")];\n const _lazyLoadImages = function (image: Element | HTMLElement) {\n image.setAttribute(\"src\", image.getAttribute(\"lazy-src\")?.toString() as string);\n (image as HTMLImageElement).onload = () => {\n image.removeAttribute(\"lazy-src\");\n };\n };\n if (\"IntersectionObserver\" in window) {\n const observer = new IntersectionObserver((items, observer) => {\n items.forEach((item) => {\n if (item.isIntersecting) {\n _lazyLoadImages(item.target);\n observer.unobserve(item.target);\n }\n });\n });\n _imgLazyLoaded.map(function (img) {\n return observer.observe(img as unknown as HTMLImageElement);\n });\n } else {\n (_imgLazyLoaded as (HTMLElement | Element)[]).map(_lazyLoadImages);\n }\n }\n } else {\n // not yet implemented\n }\n return null;\n }\n\n applyTransitionEffect(effectClassName: string):void {\n const _Effect = ClassFactory(effectClassName);\n if (typeof _Effect === \"undefined\") {\n throw Error(`${effectClassName} not found.`);\n }\n if (typeof _Effect !== \"undefined\" && is_a(_Effect, \"TransitionEffect\")) {\n this.effect = New(_Effect, {\n component: this\n });\n (this.effect as any)?.apply((this.effect as any)?.defaultParams);\n } else {\n logger.debug(`${effectClassName} is ${__getType__(_Effect)} but is not a TransitionEffect`);\n }\n }\n\n applyObserveTransitionEffect(effectClassName: any):void {\n if (isBrowser) {\n const component = this;\n const _componentRoot = component.componentRoot;\n const _applyEffect_ = function () {\n component.applyTransitionEffect(effectClassName);\n };\n if (\"IntersectionObserver\" in window) {\n const observer = new IntersectionObserver((items, observer) => {\n items.forEach((item) => {\n if (item.isIntersecting) {\n _applyEffect_();\n observer.unobserve(item.target);\n }\n });\n });\n observer.observe(_componentRoot as Element);\n } else {\n _applyEffect_();\n }\n } else {\n // not yet implemented\n }\n\n }\n\n get componentRoot(): TBody {\n return (this.shadowed) ? (this.shadowRoot) : (this.body);\n }\n\n scrollIntoHash():void {\n if (isBrowser) {\n const component = this;\n if (document.location.hash !== \"\") {\n const _componentRoot = component.componentRoot;\n ((_componentRoot as IQCObjectsShadowedElement)?.subelements(document.location.hash) as unknown as Element[]).map(\n (element: Element): any => {\n if (typeof element.scrollIntoView === \"function\") {\n element.scrollIntoView(\n CONFIG.get(\"scrollIntoHash\", {\n behavior: \"auto\",\n block: \"top\",\n inline: \"top\"\n })\n );\n }\n return element;\n }\n );\n }\n } else {\n // not yet implemented\n }\n }\n\n i18n_translate():void {\n if (isBrowser) {\n if (CONFIG.get(\"use_i18n\")) {\n const component = this;\n const _componentRoot = component.componentRoot as IQCObjectsShadowedElement;\n const lang1 = CONFIG.get(\"lang\", \"en\");\n const lang2 = navigator.language.slice(0, 2);\n const i18n = _top.global.get(\"i18n\");\n if ((lang1 !== lang2) && (typeof i18n === \"object\" && Object.hasOwn(i18n, \"messages\"))) {\n const callback_i18n = () => {\n return new Promise(function (resolve) {\n const messages = i18n.messages.filter(function (message: any) {\n return Object.hasOwn(message, lang1) && Object.hasOwn(message, lang2);\n });\n (_componentRoot?.subelements(\"ul,li,h1,h2,h3,a,b,p,input,textarea,summary,details,option,component\") as HTMLElement[])\n .map((element: HTMLElement): HTMLElement => {\n messages.map(function (message: { [x: string]: any; }) {\n let _innerHTML = element.innerHTML;\n _innerHTML = _innerHTML?.replace(new RegExp(`${message[lang1]}`, \"g\"), message[lang2]);\n element.innerHTML = _innerHTML;\n return null;\n });\n return element;\n });\n resolve();\n });\n };\n callback_i18n.call(component).then(function () {\n logger.debug(\"i18n loaded for component: \" + component.name);\n }).catch((e: any) => { throw new Error(`An error ocurred when parsing i18n: ${e}.`); });\n\n }\n }\n } else {\n // not yet implemented\n }\n }\n\n addComponentHelper(componentHelper: any):void {\n const component = this;\n component._componentHelpers.push(componentHelper as never);\n }\n\n runComponentHelpers():void {\n if (isBrowser) {\n const component = this;\n let __component_helpers__ = [];\n /*\n * BEGIN use i18n translation\n */\n __component_helpers__.push(component.i18n_translate.bind(component));\n /*\n * END use i18n translation\n */\n\n /*\n * BEGIN component scrollIntoHash\n */\n __component_helpers__.push(component.scrollIntoHash.bind(component));\n /*\n * END component scrollIntoHash\n */\n\n /*\n * BEGIN component images lazy-load\n */\n\n __component_helpers__.push(component.lazyLoadImages.bind(component));\n\n /*\n * END component images lazy-load\n */\n\n __component_helpers__ = __component_helpers__.concat(component._componentHelpers);\n\n __component_helpers__.map(\n (_component_helper_): any => {\n logger.debug(`Executing ${_component_helper_.name} as component helper for ${component.name}...`);\n _component_helper_();\n return _component_helper_;\n }\n );\n\n } else {\n // not yet implemented\n }\n\n }\n\n}\n\nPackage(\"com.qcobjects\", [\n Component\n]);\n\n(_methods_)(ClassFactory(\"Component\")).map((__c__): any => {\n (_protected_code_)(__c__);\n return __c__;\n});\n", "import { IQCObjectsElement, TComponentURIParams } from \"@types\";\nimport { Class } from \"./Class\";\nimport { ClassFactory } from \"./ClassFactory\";\nimport { Component } from \"./Component\";\nimport { CONFIG } from \"./CONFIG\";\nimport { _DOMCreateElement } from \"./DOMCreateElement\";\nimport { __getType__ } from \"./getType\";\nimport { logger } from \"./Logger\";\nimport { New } from \"./New\";\nimport { Package } from \"./Package\";\nimport { isBrowser } from \"./platform\";\nimport { _tag_filter_ } from \"./tag_filter\";\n\n/**\n * Returns a standarized uri for a component\n * @example\n * templateURI = ComponentURI({'COMPONENTS_BASE_PATH':'','COMPONENT_NAME':'','TPLEXTENSION':'','TPL_SOURCE':''})\n * @author: Jean Machuca \n * @param params an object with the params to build the uri path\n */\nexport const ComponentURI = ({ TPL_SOURCE, COMPONENTS_BASE_PATH, COMPONENT_NAME, TPLEXTENSION }:TComponentURIParams):string => {\n const templateURI = (TPL_SOURCE === \"default\") ? (`${COMPONENTS_BASE_PATH}${COMPONENT_NAME}.${TPLEXTENSION}`) : (\"\");\n return templateURI;\n};\n\nexport const _buildComponentFromElement_ = (element: Element, __parent__: any):Component => {\n const __shadowed_not_set = (element.getAttribute(\"shadowed\") === null);\n const __tplsource_attr_not_set = (element.getAttribute(\"template-source\") === null);\n const shadowed = (element.getAttribute(\"shadowed\") === \"true\");\n const __cached_not_set = (element.getAttribute(\"cached\") === null);\n const cached = (element.getAttribute(\"cached\") === \"true\");\n let tplextension = (typeof CONFIG.get(\"tplextension\") !== \"undefined\") ? (CONFIG.get(\"tplextension\")) : (\"html\");\n tplextension = (element.getAttribute(\"tplextension\") !== null) ? (element.getAttribute(\"tplextension\")) : (tplextension);\n let _componentName = element.getAttribute(\"name\");\n const _componentClassName = (element.getAttribute(\"componentClass\") !== null) ? (element.getAttribute(\"componentClass\")) : (\"Component\");\n const __componentClassName = (CONFIG.get(\"preserveComponentBodyTag\")) ? (\n (_componentName !== null) ? (\"com.qcobjects.components.\" + _componentName + \".ComponentBody\") : (\"com.qcobjects.components.ComponentBody\")\n ) : (_componentClassName);\n _componentName = (_componentName !== null) ? (_componentName) : (\n (ClassFactory(__componentClassName as string) &&\n typeof (ClassFactory(__componentClassName as string) as unknown as typeof Component).name !== \"undefined\"\n ) ? (\n (ClassFactory(__componentClassName as string) as unknown as Component).name\n ) : (\"\")\n );\n const __classDefinition = ClassFactory(__componentClassName as string) as Component;\n const __tplsource_prop_set = !!((__componentClassName !== \"Component\" && ((typeof __classDefinition !== \"undefined\" && typeof __classDefinition.tplsource === \"string\") && __classDefinition.tplsource !== \"\")));\n const tplsource = (__tplsource_attr_not_set && __tplsource_prop_set) ? (__classDefinition.tplsource) : ((__tplsource_attr_not_set) ? (\"default\") : (element.getAttribute(\"template-source\")));\n logger.debug(`template source for ${_componentName} is ${tplsource} `);\n logger.debug(`type for ${_componentName} is ${__getType__(__classDefinition)} `);\n\n const componentURI: string = ComponentURI({\n \"COMPONENTS_BASE_PATH\": CONFIG.get(\"componentsBasePath\"),\n \"COMPONENT_NAME\": _componentName ,\n \"TPLEXTENSION\": tplextension,\n \"TPL_SOURCE\": tplsource as string\n });\n if (CONFIG.get(\"preserveComponentBodyTag\")) {\n Package((_componentName !== \"\") ? (\"com.qcobjects.components.\" + _componentName + \"\") : (\"com.qcobjects.components\"), [\n Class(\"ComponentBody\", Component, {\n name: _componentName,\n tplsource,\n tplextension,\n reload: true\n })\n ]);\n }\n\n const __create_component_instance_ = function ():Component {\n const __shadowed = (__shadowed_not_set) ? ((__classDefinition && __classDefinition.shadowed) || Component.shadowed) : (shadowed);\n const __definition = {\n __parent__,\n name: _componentName,\n cached: (__cached_not_set) ? (Component.cached) : (cached),\n shadowed: __shadowed,\n tplextension,\n body: (CONFIG.get(\"preserveComponentBodyTag\")) ? (_DOMCreateElement(\"componentBody\")) : (element),\n templateURI: componentURI,\n tplsource\n };\n if (typeof _componentName === \"undefined\" || _componentName === \"\" || _componentName === null) {\n /* this allows to use the original property defined\n in the component definition if it is not present in the tag */\n delete (__definition as any).name;\n }\n if (componentURI === \"\") {\n /* this allows to use the original property defined\n in the component definition if it is not present in the tag */\n delete (__definition as any).templateURI;\n }\n const newComponent = New(__classDefinition, __definition) as Component;\n\n if (CONFIG.get(\"preserveComponentBodyTag\")) {\n if (typeof newComponent !== \"undefined\") {\n element.append(newComponent.body as string | Node);\n }\n }\n return newComponent;\n };\n const newComponent = __create_component_instance_();\n return newComponent;\n};\n\nexport const _buildComponentsFromElements_ = (elements: HTMLElement[], __parent__: Component | null):Component[] => {\n let componentsBuiltWith:Component[] = [];\n if (isBrowser) {\n componentsBuiltWith = elements.map(\n function (element: any) {\n return _buildComponentFromElement_(element, __parent__);\n }\n );\n } else {\n logger.debug(\"[_buildComponentsFromElements_] not implemented for Non-Browser environments\");\n }\n return componentsBuiltWith;\n};\n\nexport const buildComponents = (element:HTMLElement):Component[] => {\n const tagFilter = _tag_filter_;\n const elements = (element as unknown as IQCObjectsElement).subelements(tagFilter) as HTMLElement[];\n return _buildComponentsFromElements_(elements, null);\n};", "import { _basePath_ } from \"./basePath\";\nimport { _Crypt } from \"./Crypt\";\nimport { _domain_ } from \"./domain\";\nimport { InheritClass } from \"./InheritClass\";\nimport { logger } from \"./Logger\";\nimport { Package } from \"./Package\";\nimport { _secretKey } from \"./secretKey\";\nimport { CONFIG } from \"./CONFIG\";\nimport { IJSONService, IService, TServiceDoneResponse, TServiceStandardResponse } from \"@types\";\n\nexport class Service extends InheritClass implements IService{\n options!: object;\n withCredentials!: boolean;\n useHTTP2: any;\n // eslint-disable-next-line no-unused-vars\n mockup({ request, service }: TServiceStandardResponse): void {\n throw new Error(\"Method not implemented.\");\n }\n name!: string;\n responseHeaders: any;\n // eslint-disable-next-line no-unused-vars\n local({ request, service }: TServiceStandardResponse): void {\n throw new Error(\"Method not implemented.\");\n }\n kind = \"rest\";\n /* it can be rest, mockup, local */\n domain:string = _domain_;\n basePath:string = _basePath_;\n url = \"\";\n method = \"GET\";\n data = {};\n reload = false;\n cached = false;\n\n headers: any;\n template: unknown;\n \n // eslint-disable-next-line no-unused-vars\n done({ request, service }: TServiceDoneResponse): void {\n throw new Error(\"Method not implemented.\");\n }\n // eslint-disable-next-line no-unused-vars\n fail(...args: any[]): void {\n throw new Error(\"Method not implemented.\");\n }\n\n set(name:string, value:never):void {\n this[name] = value;\n }\n\n get(name:string, _default?:never):any {\n return this[name] as never || _default;\n }\n\n}\n\nexport class JSONService extends Service implements IJSONService{\n method = \"GET\";\n cached = false;\n headers = {\n \"Content-Type\": \"application/json\",\n \"charset\": \"utf-8\"\n };\n\n JSONresponse?:JSON = undefined;\n done(result:TServiceDoneResponse):void {\n logger.debug(\"***** RECEIVED RESPONSE:\");\n logger.debug(result.service.template as string);\n this.JSONresponse = JSON.parse(result.service.template as string);\n }\n\n\n\n}\n\nexport class ConfigService extends JSONService {\n method = \"GET\";\n cached = false;\n configFileName = \"config.json\";\n headers = {\n \"Content-Type\": \"application/json\",\n \"charset\": \"utf-8\"\n };\n\n configLoaded():Promise{\n throw Error (\"Method not implemented.\");\n }\n\n JSONresponse?:JSON = undefined;\n done(result:TServiceDoneResponse):void {\n logger.debug(\"***** CONFIG LOADED:\");\n logger.debug(result.service.template as string);\n this.JSONresponse = JSON.parse(result.service.template as string);\n if (Object.hasOwn(this.JSONresponse as object, \"__encoded__\")) {\n const decodedValue:string = _Crypt.decrypt((this.JSONresponse as any)?.__encoded__, _secretKey);\n this.JSONresponse = JSON.parse(decodedValue);\n }\n const jsonResponse:any = this.JSONresponse;\n Object.keys(jsonResponse as object).map((k:string) => {\n CONFIG.set(k, (jsonResponse as never)[k]);\n return k;\n });\n this.configLoaded().catch((e:any)=>{throw new Error (`An error ocurred: ${e}`);});\n }\n\n fail():void {\n this.configLoaded().catch((e:any)=>{throw new Error (`An error ocurred: ${e}`);});\n }\n\n constructor() {\n super();\n this.set(\"url\", `${this.get(\"basePath\") as string}${this.get(\"configFileName\") as string}` as never);\n }\n}\n\n\nPackage(\"com.qcobjects.api\", [\n Service\n]);\n\nPackage(\"com.qcobjects.api.services\", [\n JSONService\n]);\n\nPackage(\"com.qcobjects.api.config\", [\n ConfigService\n]);\n", "import { IGlobalSettings } from \"@types\";\nimport { CONFIG } from \"./CONFIG\";\nimport { InheritClass } from \"./InheritClass\";\nimport { Logger, logger } from \"./Logger\";\nimport { Package } from \"./Package\";\nimport { isBrowser } from \"./platform\";\nimport { serviceLoader } from \"./serviceLoader\";\nimport { _top, buildComponentsStack, configService, setConfigService } from \"./top\";\nimport { ConfigService } from \"./Service\";\n\nexport class GlobalSettings extends InheritClass implements IGlobalSettings {\n static __start__(): Promise {\n return GlobalSettings.instance.__start__();\n }\n [key: string]: any;\n\n _GLOBAL: any = {};\n private static _instance: GlobalSettings;\n static get instance(): GlobalSettings {\n if (typeof GlobalSettings._instance === \"undefined\") {\n GlobalSettings._instance = new GlobalSettings();\n }\n return GlobalSettings._instance;\n }\n\n protected _logger: Logger = new Logger();\n get logger(): Logger {\n return this._logger;\n }\n\n set logger(value: Logger) {\n this._logger = value;\n }\n\n set(name: string, value: any): void {\n this._GLOBAL[name] = value;\n }\n\n get(name: string, _default?: any): any {\n let _value: any;\n if (typeof this._GLOBAL[name] !== \"undefined\") {\n _value = this._GLOBAL[name];\n } else if (typeof _default !== \"undefined\") {\n _value = _default;\n }\n return _value;\n }\n\n __start__(): Promise {\n const __load__serviceWorker = function () {\n let _promise: Promise | Promise;\n if (isBrowser) {\n _promise = new Promise(function (resolve, reject) {\n if ((\"serviceWorker\" in navigator) &&\n (typeof CONFIG.get(\"serviceWorkerURI\") !== \"undefined\")) {\n CONFIG.set(\"serviceWorkerScope\", CONFIG.get(\"serviceWorkerScope\") ? (CONFIG.get(\"serviceWorkerScope\")) : (\"/\"));\n navigator.serviceWorker.register(CONFIG.get(\"serviceWorkerURI\"), {\n scope: CONFIG.get(\"serviceWorkerScope\")\n })\n .then(function (registration) {\n logger.debug(\"Service Worker Registered\");\n resolve.call(_promise, registration);\n }, function (registration) {\n logger.debug(\"Error registering Service Worker\");\n reject.call(_promise, registration);\n });\n navigator.serviceWorker.ready.then(function (registration) {\n logger.debug(\"Service Worker Ready\");\n resolve.call(_promise, registration);\n }, function (registration) {\n logger.debug(\"Error loading Service Worker\");\n reject.call(_promise, registration);\n });\n }\n });\n } else {\n _promise = Promise.resolve();\n }\n return _promise;\n };\n const _buildComponents = function () {\n return new Promise((resolve) => {\n if (isBrowser) {\n logger.debug(\"Starting to building components\");\n try {\n buildComponentsStack();\n } catch (e: any) {\n throw Error(`Something went wrong trying to start components tree: ${e.message}`);\n }\n logger.debug(\"Initializing the service worker\");\n __load__serviceWorker.call(_top)\n .catch(function (e) {\n logger.debug(`error loading the service worker ${e}`);\n });\n }\n resolve();\n });\n };\n\n return new Promise((resolve) => {\n logger.debug(\"Starting to load the config settings...\");\n if (CONFIG.get(\"useConfigService\", false)) {\n logger.debug(\"Loading settings using local configuration file...\");\n setConfigService(new ConfigService());\n configService.configLoaded = _buildComponents;\n serviceLoader(configService)\n ?.then((standardResponse: any) => {\n resolve(standardResponse);\n })\n ?.catch((e: any) => { throw new Error(`An error ocurred while trying to load ${configService.url}: ${e}`); });\n } else {\n logger.debug(\"Starting to load the components...\");\n _buildComponents.call(this)\n .then(() => {\n resolve({});\n })\n .catch((e: any) => { throw new Error(`An error ocurred while trying to build the components stack. ${e}`); });\n }\n\n });\n }\n\n}\n\nPackage(\"com.qcobjects\", [\n GlobalSettings\n]);\n", "import { IComplexStorageCache, IComponent, IConfigService, IQCObjectsElement } from \"@types\";\nimport { buildComponents } from \"./ComponentFactory\";\nimport { _CastProps } from \"./Cast\";\nimport { GlobalSettings } from \"./globalSettings\";\nimport { Class } from \"./Class\";\nimport { ClassFactory } from \"./ClassFactory\";\nimport { Export } from \"./Export\";\nimport { isBrowser } from \"./platform\";\nimport { _QC_CLASSES, getPackagesNamesList, getPackagesList, getClassesList, getClassesNamesList } from \"./PrimaryCollections\";\nimport { logger } from \"./Logger\";\n\ntype QCObjects = {\n lastCache?:IComplexStorageCache,\n componentsStack:IComponent[],\n Microservice:any,\n Route:any,\n BackendMicroservice:any,\n QCObjectsElement:any,\n QCObjectsShadowedElement:any,\n Logger:any,\n Class:any, \n _Crypt:any, \n TagElements:any, \n DefaultTemplateHandler:any, \n SourceJS:any, \n SourceCSS:any, \n ArrayList:any, \n ArrayCollection:any, \n GlobalSettings:any, \n GLOBAL:any, \n DDO:any, \n CacheController:any, \n ComplexCacheParams:any, \n ComplexStorageCache:any, \n ComponentWidget:any, \n asyncLoad:any, \n RegisterClass:any, \n ComponentURI:any, \n waitUntil:any, \n super:any, \n _DOMCreateElement:any, \n shortCode:any, \n getType:any, \n is_a:any, \n _DataStringify:any, \n serviceLoader:any, \n componentLoader:any, \n ObjectName:any, \n isQCObjects_Class:any, \n isQCObjects_Object:any, \n NamespaceRef:any, \n RegisterWidget:any, \n RegisterWidgets:any, \n range:any, \n getDocumentLayout:any, \n Export:any, \n New:any, \n Tag:any, \n Ready:any, \n methods:any, \n // eslint-disable-next-line no-unused-vars\n set:(name:string, value:any) => void, \n // eslint-disable-next-line no-unused-vars\n get:(name:string, _default?:any) => any, \n start:any, \n InheritClass:any, \n Processor:any, \n ComponentParams:any, \n ComponentDoneResponse:any, \n Component:any, \n CONFIG:any, \n ControllerParams:any, \n Controller:any, \n ViewParams:any, \n View:any, \n Service:any, \n JSONService:any, \n ConfigService:any, \n VO:any, \n EffectParams:any, \n Effect:any, \n TransitionEffect:any, \n TimerParams:any, \n Timer:any, \n Toggle:any, \n logger:any, \n sdk:any, \n global:any, \n ClassFactory:any, \n Package:any, \n Import:any,\n _sdk_:any,\n ClassesList:any[], \n PackagesList:any[],\n PackagesNameList:any[],\n ClassesNameList:any[]\n} & typeof self & typeof global ;\n\nexport var _top: QCObjects = (\n (typeof module !== \"undefined\" && typeof module.exports !== \"undefined\" && module.exports) ||\n (typeof global !== \"undefined\" && global) ||\n (typeof globalThis !== \"undefined\" && globalThis) ||\n (typeof window !== \"undefined\" && window) ||\n (typeof self !== \"undefined\" && self !== null && self) ||\n this\n) as QCObjects;\n(_top as any).lastCache = undefined;\nexport let componentsStack:IComponent[] = [];\n\nexport const resetTop = ():void => {\n const globalSettings = GlobalSettings.instance;\n _top = _CastProps(globalSettings, _top, true);\n};\n\nexport const buildComponentsStack = ():void => {\n componentsStack = buildComponents(document as unknown as IQCObjectsElement);\n};\nexport let configService:IConfigService;\nexport const setConfigService = (_configService:IConfigService):void => {\n _top.global.configService = _configService;\n configService = _configService;\n};\n\nexport const set = (name:string, value:any):void => {\n _top[name as never] = value;\n};\n\nexport const get = (name:string, _defaultValue?:any):any => {\n return _top[name as never] || _defaultValue;\n};\n\nresetTop();\n\nconst _define_props = function (_top: any) {\n if (!Object.hasOwn(_top, \"PackagesList\")) {\n Object.defineProperty(_top, \"PackagesList\", {\n // eslint-disable-next-line no-unused-vars\n set:(value) => {\n logger.debug(\"PackagesList is readonly\");\n \n },\n get:():any => {\n return getPackagesList();\n }\n });\n \n }\n \n \n if (!Object.hasOwn(_top, \"PackagesNameList\")) {\n Object.defineProperty(_top, \"PackagesNameList\", {\n // eslint-disable-next-line no-unused-vars\n set:(val) => {\n logger.debug(\"PackagesNameList is readonly\");\n\n },\n get:():any =>{\n return getPackagesNamesList();\n }\n });\n\n }\n\n if (!Object.hasOwn(_top, \"ClassesList\")) {\n Object.defineProperty(_top, \"ClassesList\", {\n // eslint-disable-next-line no-unused-vars\n set:(value) => {\n logger.debug(\"ClassesList is readonly\");\n\n },\n get:(): any => {\n return getClassesList();\n }\n });\n }\n\n if (!Object.hasOwn(_top, \"ClassesNameList\")) {\n Object.defineProperty(_top, \"ClassesNameList\", {\n // eslint-disable-next-line no-unused-vars\n set(value):any {\n logger.debug(\"ClassesNameList is readonly\");\n\n },\n get:(): any => {\n return getClassesNamesList();\n }\n });\n\n }\n\n\n };\n\n\n if (isBrowser) {\n // use of GLOBAL word is deprecated in node.js\n // this is only for compatibility purpose with old versions of QCObjects in browsers\n Class(\"GLOBAL\", (_QC_CLASSES as any).global); // case insensitive for compatibility con old versions;\n Export(ClassFactory(\"GLOBAL\"));\n }\n\n if (isBrowser && typeof window !== \"undefined\") {\n set(\"global\", window);\n } else if (isBrowser && typeof globalThis !== \"undefined\") {\n set(\"global\", globalThis);\n }\n\n _define_props(_top);\n", "import { logger } from \"./Logger\";\nimport { isBrowser } from \"./platform\";\n\nexport let supportsPassive = false;\nexport const captureFalseTouch = ():boolean | { passive: boolean; } => {\n return (supportsPassive) ? ({\n passive: true\n }) : (false);\n};\n\n// Test via a getter in the options object to see if the passive property is accessed\nif (isBrowser) {\n try {\n const opts = Object.defineProperty({}, \"passive\", {\n get() {\n supportsPassive = true;\n return supportsPassive;\n }\n });\n (window as any).addEventListener(\"testPassive\", null, opts);\n (window as any).removeEventListener(\"testPassive\", null, opts);\n } catch (e:any) {\n logger.debug(`An error ocurred: ${e}.`);\n supportsPassive = false;\n }\n\n} else {\n supportsPassive = false;\n}", "import { _protected_code_ } from \"./introspection\";\n\nexport const range = (start: number, stop = 0, step = 1): number[] => {\n if (stop === 0 || typeof stop === \"undefined\") {\n stop = start;\n start = 0;\n }\n return Array.from({\n length: (stop - start) / step + 1\n }, function (_, i) {\n return start + (i * step);\n });\n};\n(_protected_code_)(range);\n\n", "import { logger } from \"./Logger\";\nimport { GlobalProcessor as Processor } from \"./Processor\";\nimport { _top } from \"./top\";\nimport { range } from \"./range\";\nimport { IComponent } from \"@types\";\n\n// Set Processors\nexport const setDefaultProcessors = ():void => {\n (function (_top):void {\n\n const mapper = (componentInstance:IComponent, componentName:string, valueName:string):string => {\n /*\n * Mapper processor\n * @usage\n * $mapper(,)\n *\n * Where componentName is the name of the component (same value as in attribute tag name) without quotes\n * and valueName is the name of the variable that contains the value to map, it can be either a property of\n * the component instance, the data object or a global value\n */\n \n if (typeof componentInstance === \"undefined\" || componentInstance === null) {\n throw Error(`mapper.${componentName}.${valueName} does not have a component instance or it is null.`);\n }\n const globalValue = _top.global.get(valueName);\n const componentValue = componentInstance.get(valueName);\n const dataValue = componentInstance.data[valueName];\n const list = (typeof dataValue !== \"undefined\") ? (dataValue) : ((typeof componentValue !== \"undefined\") ? (componentValue) : (globalValue));\n let listItems = \"\";\n if (typeof list !== \"undefined\" && typeof list.map !== \"undefined\") {\n listItems = list.map(function (element:HTMLElement) {\n const dataItems = [...Object.keys(element)].map(k => ` data-${k}=\"${(typeof (element as any)[k] !== \"undefined\" && (element as any)[k] !== null) ? ((element as any)[k].toString()) : (\"\")}\"`).join(\"\");\n return ``;\n }).join(\"\");\n } else {\n logger.debug(`${componentName}.${valueName} does not have a map property`);\n }\n return listItems;\n };\n Processor.setProcessor(mapper);\n \n const layout = function (componentInstance:IComponent, layoutname:string, cssfile:string):string {\n /*\n * Layout processor\n * @usage\n * $layout(, )\n * Where layoutname can be \"portrait\" or \"landscape\" without quotes\n * cssfile is the uri for the css file to import\n */\n \n const layout_portrait = `\n /* CSS Document for Mobile Imports */\n @import url(\"${cssfile}\") (orientation:portrait);\n @import url(\"${cssfile}\") (max-width:460px);\n @import url(\"${cssfile}\") (aspect-ratio: 9/16);\n @import url(\"${cssfile}\") (aspect-ratio: 10/16);\n @import url(\"${cssfile}\") (aspect-ratio: 5/8);\n @import url(\"${cssfile}\") (aspect-ratio: 3/4);\n @import url(\"${cssfile}\") (aspect-ratio: 2/3);\n `;\n const layout_landscape = `\n @import url(\"${cssfile}\") (orientation:landscape) and (min-width:460px);\n @import url(\"${cssfile}\") (aspect-ratio: 16/9) and (min-width:460px);\n @import url(\"${cssfile}\") (aspect-ratio: 16/10) and (min-width:460px);\n @import url(\"${cssfile}\") (aspect-ratio: 8/5) and (min-width:460px);\n @import url(\"${cssfile}\") (aspect-ratio: 4/3) and (min-width:460px);\n @import url(\"${cssfile}\") (aspect-ratio: 3/2) and (min-width:460px);\n `;\n const layout_code = {\n \"landscape\": layout_landscape,\n \"portrait\": layout_portrait\n };\n \n return (Object.hasOwn(layout_code, layoutname)) ? ((layout_code as any)[layoutname] as string) : (\"\");\n };\n \n Processor.setProcessor(layout);\n \n const component = (componentInstance:IComponent ,name:string, componentClass:string, ...args:string[]):string => {\n /*\n * component processor\n * @usage\n * $component(name=, componentClass=, ...)\n * Returns a component tag declaration like:\n * ...>\n */\n const arg = [...args].map(function (a) {\n return {\n [a.split(\"=\")[0]]: a.split(\"=\")[1]\n };\n }).reduce(function (k1, k2) {\n return Object.assign(k1, k2);\n });\n const attrs = [...Object.keys(arg)].map(function (a) {\n return `${a}=${arg[a as any]}`;\n }).join(\" \");\n return ``;\n };\n \n Processor.setProcessor(component);\n \n const quick_component = (componentInstance: IComponent,name:string, componentClass:string, ...args:string[]):string => {\n /*\n * component processor\n * @usage\n * $quick_component(name=, componentClass=, ...)\n * Returns a component tag declaration like:\n * ...>\n */\n const arg = [...args].map(function (a) {\n return {\n [a.split(\"=\")[0]]: a.split(\"=\")[1]\n };\n }).reduce(function (k1, k2) {\n return Object.assign(k1, k2);\n });\n const attrs = [...Object.keys(arg)].map(function (a) {\n return `${a}=${arg[a as any]}`;\n }).join(\" \");\n return ``;\n };\n \n Processor.setProcessor(quick_component);\n \n \n const repeat = (componentInstance:IComponent, length:number, text:string):string => {\n /*\n * Repeat processor\n * @usage\n * $repeat(, )\n * Where length is the number of occurrences of text\n */\n return range(length).map(\n function (index) {\n return text.replace(\"{{index}}\", index.toString());\n }\n ).join(\"\");\n };\n \n Processor.setProcessor(repeat);\n \n })(_top);\n \n};\n\n", "import { CONFIG } from \"./CONFIG\";\nimport { Export } from \"./Export\";\nimport { logger } from \"./Logger\";\nimport { isBrowser } from \"./platform\";\n\nexport const findPackageNodePath = function (packagename:string):string|null {\n let sdkPath = null;\n if (!isBrowser) {\n // eslint-disable-next-line @typescript-eslint/no-require-imports\n const fs = require(\"fs\");\n try {\n let sdkPaths = [\n `${CONFIG.get(\"projectPath\")}${CONFIG.get(\"relativeImportPath\")}`,\n `${CONFIG.get(\"basePath\")}${CONFIG.get(\"relativeImportPath\")}`,\n `${CONFIG.get(\"projectPath\")}`,\n `${CONFIG.get(\"basePath\")}`,\n `${CONFIG.get(\"relativeImportPath\")}`,\n `${process.cwd()}${CONFIG.get(\"relativeImportPath\")}`,\n `${process.cwd()}/node_modules/` + packagename,\n `${process.cwd()}/node_modules`,\n `${process.cwd()}`,\n \"node_modules\",\n \"./\",\n \"\"\n ].concat(module.paths);\n sdkPaths = sdkPaths.filter(p => {\n return (fs).existsSync(p + \"/\" + packagename);\n });\n if (sdkPaths.length > 0) {\n sdkPath = sdkPaths[0];\n logger.info(packagename + \" is Installed.\");\n } else {\n sdkPath = \"\";\n logger.info(`${packagename} is not in a standard path.`);\n }\n } catch (e) {\n // do nothing\n console.log(e);\n }\n\n }\n return sdkPath;\n};\nExport(findPackageNodePath);\n", "import { _basePath_ } from \"./basePath\";\nimport { CONFIG } from \"./CONFIG\";\nimport { _DataStringify } from \"./DataStringify\";\nimport { _DOMCreateElement } from \"./DOMCreateElement\";\nimport { findPackageNodePath } from \"./findPackageNodePath\";\nimport { logger } from \"./Logger\";\nimport { _require_, isBrowser } from \"./platform\";\nimport { _QC_PACKAGES, _QC_PACKAGES_IMPORTED, _QC_READY_LISTENERS } from \"./PrimaryCollections\";\n\n/**\n * Imports a script with the package nomenclature\n *\n * @param {Object} packagename\n * @param {Object} ready\n * @param {Boolean} external\n */\nexport const Import = function (packagename:string, ready?:Function, external?:boolean):Promise<{_imported_?:any, _package_name_?:string}> | undefined {\n\n if (external !== undefined){\n logger.debug(`[Import] Setting external=${external.toString()} resource to import: ${packagename}`);\n } \n if (external) {\n logger.debug(`[Import] Registering external resource to import: ${packagename}`);\n } else {\n logger.debug(`[Import] Registering local resource to import: ${packagename}`);\n }\n let _promise_import_: Promise;\n if (isBrowser) {\n _promise_import_ = new Promise(function (resolve, reject) {\n\n const allPackagesImported = function () {\n let ret = false;\n let cp = 0;\n // eslint-disable-next-line no-unused-vars\n for (const p in _QC_PACKAGES) {\n cp++;\n }\n if (cp < _QC_PACKAGES_IMPORTED.length) {\n ret = false;\n } else {\n ret = true;\n }\n return ret;\n };\n\n const readyImported = function (e: { target: { remove: () => void; }; }) {\n _QC_PACKAGES_IMPORTED.push(ready as never);\n if (allPackagesImported()) {\n _QC_PACKAGES_IMPORTED.map( (_imported_) => {\n return _QC_READY_LISTENERS.push(_imported_);\n });\n }\n if (isBrowser && CONFIG.get(\"removePackageScriptAfterLoading\")) {\n e.target.remove();\n }\n resolve.call(_promise_import_, {\n \"_imported_\": e.target,\n \"_package_name_\": packagename\n });\n };\n\n if (!Object.hasOwn(_QC_PACKAGES, packagename)) {\n const s1:HTMLScriptElement = _DOMCreateElement(\"script\") as unknown as HTMLScriptElement;\n s1.type = CONFIG.get(\"sourceType\", \"text/javascript\");\n s1.async = !!(CONFIG.get(\"asynchronousImportsLoad\"));\n (s1 as any).onreadystatechange = function () {\n if ((s1 as any).readyState === \"complete\") {\n readyImported(s1 as any);\n }\n };\n (s1 as any).onload = readyImported;\n s1.onerror = function (e: any) {\n logger.debug(`An error ocurred: ${e}.`);\n reject.call(_promise_import_, {\n \"_imported_\": s1,\n \"_package_name_\": packagename\n });\n };\n s1.src = (external) ? (CONFIG.get(\"remoteImportsPath\") + packagename + \".js\") : (_basePath_ + CONFIG.get(\"relativeImportPath\") + packagename + \".js\");\n document.getElementsByTagName(\"head\")[0].appendChild(s1);\n }\n });\n _promise_import_.catch(function () {\n logger.debug(\"Import: Error loading a package \");\n });\n\n } else {\n // support to be used in a nodejs environment\n _promise_import_ = new Promise(function (resolve, reject) {\n try {\n const standardNodePath = findPackageNodePath(packagename);\n let packageAbsoluteName = \"\";\n if (standardNodePath !== null) {\n packageAbsoluteName = standardNodePath + \"/\" + packagename;\n } else {\n const jsNodePath = findPackageNodePath(packagename + \".js\");\n if (jsNodePath !== null) {\n packageAbsoluteName = jsNodePath + \"/\" + packagename + \".js\";\n } else {\n packageAbsoluteName = _basePath_ + CONFIG.get(\"relativeImportPath\") + packagename;\n }\n }\n try {\n resolve.call(_promise_import_, {\n \"_imported_\": _require_(`${packageAbsoluteName}`),\n \"_package_name_\": packagename\n });\n } catch (e) {\n reject.call(_promise_import_, {\n \"_imported_\": null,\n \"_package_name_\": packagename,\n \"error\": e\n });\n }\n } catch (e) {\n reject.call(_promise_import_, {\n \"_imported_\": null,\n \"_package_name_\": packagename,\n \"error\": e\n });\n }\n }).catch(function (e) {\n // something wrong importing a package\n logger.debug(\"Something happened when importing \" + packagename);\n console.warn(e);\n });\n }\n _promise_import_.catch(function (e) {\n logger.warn(_DataStringify(e));\n });\n return _promise_import_;\n};\nImport.prototype.toString = function () {\n return \"Import(packagename,ready,external) { [QCObjects native code] }\";\n};\n", "export const __to_number = function (value:any): number {\n return ((isNaN(value)) ? (new Number(0) as number) : (new Number(value) as number));\n};", "import { isQCObjects_Class } from \"./isQCObjects\";\nimport { Package } from \"./Package\";\n\n/**\n * Declare Namespace\n *\n * @param {String} packageName\n * @param {Object} package\n */\nexport const NamespaceRef = function (namespace:string):any {\n const packageInstance = Package(namespace) || [];\n const classes = packageInstance.filter((c:any) => isQCObjects_Class(c)).map((c:any) => {\n return {\n [c.__definition.__classType]: c\n };\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n }).reduce((a:any, b:any):any => {return Object.assign(a, b);});\n return namespace.split(\".\").map(c => {\n return {\n [c]: classes\n };\n }).reverse().reduce((a, b) => {\n b[Object.keys(b).join(\".\")] = a;\n return b;\n });\n};\n", "import { CONFIG } from \"./CONFIG\";\nimport { isBrowser } from \"./platform\";\nimport { _QC_READY_LISTENERS } from \"./PrimaryCollections\";\nimport { _top } from \"./top\";\n\n/**\n * Defines a Custom Ready listener\n */\nexport const Ready = (e:any):void => {\n if (isBrowser) {\n _QC_READY_LISTENERS.push(e.bind(window) as never);\n } else if (typeof global !== \"undefined\") {\n _QC_READY_LISTENERS.push(e.bind(global) as never);\n }\n};\n\nexport const ready:Function = Ready; // case insensitive ready option\n\n/**\n * Default Ready event function for window. Executes all micro ready events of Import calls\n *\n * @param {Object} e\n */\n// eslint-disable-next-line no-unused-vars\nexport const _Ready = (e:any):void => {\n const _execReady = ():void => {\n // eslint-disable-next-line array-callback-return\n _QC_READY_LISTENERS.map(function (_ready_listener_, _r):any {\n if (typeof _ready_listener_ === \"function\") {\n (_ready_listener_ as Function)();\n _QC_READY_LISTENERS.splice(_r, 1);\n }\n });\n };\n if (CONFIG.get(\"delayForReady\") > 0) {\n if (isBrowser) {\n setTimeout(_execReady.bind(window), CONFIG.get(\"delayForReady\"));\n } else if (typeof global !== \"undefined\") {\n setTimeout(_execReady.bind(global), CONFIG.get(\"delayForReady\"));\n }\n } else {\n _execReady.call(_top);\n }\n};\n", "import { IArrayCollection, IArrayList } from \"@types\";\nimport { ClassFactory } from \"./ClassFactory\";\nimport { logger } from \"./Logger\";\nimport { New } from \"./New\";\nimport { __to_number } from \"./mathFunctions\";\n\n\nexport class ArrayList extends Array implements IArrayList {\n prototype: any;\n\n unique ():any[] {\n return this.filter(function (value:any, index:any, self:any) {\n return self.indexOf(value) === index;\n });\n };\n\n table(): void {\n console.table(this);\n };\n sum(): number {\n return this.reduce( (prev:any, current:any):number => {\n return (__to_number(prev)) + (__to_number(current));\n }, 0) as number;\n }\n avg(): number {\n return (this.length < 1) ? (0) : (this.reduce( (prev:any, current:any):number => {\n return (((__to_number(prev)) + (__to_number(current))) / 2);\n })) as number;\n }\n min(): number {\n return this.reduce( (prev:any, current:any):number => {\n return (__to_number(prev) <= __to_number(current)) ? (prev) : (current);\n }, Infinity) as number;\n }\n max(): number {\n return this.reduce( (prev:any, current:any):number => {\n return (__to_number(prev) >= __to_number(current)) ? (prev) : (current);\n }, 0) as number;\n }\n sortBy(propName: string, sortAsc?: boolean): any[] {\n const sort_function = (sortAsc) ? (\n function (prev:any, current:any) {\n return current[propName] < prev[propName] ? 1 : -1;\n }\n ) : (\n function (prev:any, current:any) {\n return current[propName] > prev[propName] ? 1 : -1;\n }\n );\n return this.sort(sort_function);\n }\n matrix(length: number, fillValue?: number): any[] {\n const x_func = () => {\n return fillValue;\n };\n return Array.from({\n length: length\n }, x_func);\n }\n matrix2d(length: number, fillValue?: number): any[][] {\n const y_func = function () {\n return fillValue;\n };\n const x_func = function () {\n return Array.from({\n length\n }, y_func);\n };\n return Array.from({\n length\n }, x_func);\n }\n matrix3d(length: number, fillValue?: number): any[][][] {\n const y_func = function () {\n return Array.from({\n length\n }, function () {\n return fillValue;\n });\n };\n const x_func = function () {\n return Array.from({\n length\n }, y_func);\n };\n return Array.from({\n length\n }, x_func);\n }\n\n\n}\n\nexport class ArrayCollection implements IArrayCollection {\n source :ArrayList = New(ArrayList, []);\n changed(prop: string, value: any):void {\n logger.debug(\"VALUE CHANGED\");\n logger.debug(prop);\n logger.debug(value);\n }\n push(value: any):number {\n const self = this;\n logger.debug(\"VALUE ADDED\");\n logger.debug(value);\n return self.source.push(value);\n }\n pop():any {\n const self = this;\n logger.debug(\"VALUE POPPED\");\n return self.source.pop();\n }\n _new_(source: ArrayList):void {\n const self = this;\n let _index = 0;\n self.source = New(ClassFactory(\"ArrayList\"), source);\n for (const _k in self.source) {\n if (!isNaN(_k as any)) {\n logger.debug(\"binding \" + _k.toString());\n (function (_pname:any) {\n Object.defineProperty(self, _pname, {\n set(value) {\n logger.debug(\"setting \" + _pname + \"=\" + value);\n self.source[_pname] = value;\n self.changed(_pname, value);\n },\n get():unknown {\n return self.source[_pname];\n }\n });\n })(_k);\n _index++;\n }\n\n }\n self.source.length = _index;\n Object.defineProperty(self, \"length\", {\n get() {\n return self.source.length;\n }\n });\n }\n}\n\n", "import { IQCObjectsElement, ITagElements } from \"@types\";\nimport { ClassFactory } from \"./ClassFactory\";\nimport { New } from \"./New\";\nimport { Package } from \"./Package\";\nimport { isBrowser } from \"./platform\";\nimport { Effect } from \"./Effect\";\nimport { ArrayList } from \"./ArrayCollection\";\n\nexport class TagElements extends ArrayList implements ITagElements {\n show():void {\n this.map(function (element:any) {\n return element.style.opacity = 1;\n });\n }\n hide():void {\n this.map(function (element:any) {\n return element.style.opacity = 0;\n });\n }\n effect(...args:T[]):void {\n const effectArguments = [...args].slice(1);\n const effectClassName = args[0] as string;\n let effectClass = undefined;\n if ((typeof effectClassName).toLowerCase() === \"string\") {\n effectClass = ClassFactory(effectClassName);\n }\n this.map(function (element:any):T {\n return ((effectClass as Effect).apply as Function).apply(effectClass, [element].concat(effectArguments)) as T;\n });\n }\n findElements(elementName:any):any {\n const _o = New(ClassFactory(\"TagElements\"));\n if (isBrowser) {\n for (const _k in this) {\n if (typeof _k === \"number\" && typeof this[_k] !== \"function\" && Object.hasOwn(this[_k], \"subelements\")) {\n _o.push(this[_k].subelements(elementName));\n }\n }\n } else {\n // not yet implemented.\n }\n return _o;\n }\n }\n\n /**\n * Gets the element of DOM found by tag name\n *\n * @param {Object} tagname\n * @param {Object} innerHTML\n */\n export const Tag = function (tagname:string, innerHTML?:string): T[] {\n const _o = New(TagElements);\n if (isBrowser) {\n const o = (document as unknown as IQCObjectsElement).subelements(tagname);\n const addedKeys = [];\n for (let _i = 0; _i < o.length; _i++) {\n if (typeof innerHTML !== \"undefined\" && Object.hasOwn(o[_i], \"innerHTML\")) {\n o[_i].innerHTML = innerHTML;\n }\n if (addedKeys.indexOf(_i) < 0) {\n _o.push(o[_i]);\n addedKeys.push(_i);\n }\n }\n } else {\n // not yet implemented.\n }\n return _o as T[];\n };\n\n\n Package(\"com.qcobjects\",[\n TagElements,\n Tag\n ]);", "import { _Crypt } from \"./Crypt\";\n\nexport const shortCode = (): string => {\n const length = 1000;\n const code1 = _Crypt.encrypt((Math.random() * length).toString().replace(\".\", \"\"), (new Date()).getTime().toString());\n const code2 = _Crypt.encrypt((Math.random() * length).toString().replace(\".\", \"\"), (new Date((new Date()).getTime() - 1000 * 1000)).getTime().toString());\n const shortCode = [...code2].map((o1: any, index: any): any => {\n return [...code1][index] === o1 ? null : o1;\n }).filter((c: any) => c !== null).join(\"\");\n return shortCode;\n};\n", "import { ClassFactory } from \"./ClassFactory\";\n\n/**\n * Returns a method from a superior QCObjects Class\n * It is useful for Class Inheritance in the _new_ and __new__ method constructors\n * @example _super_('MySuperClass','MySuperMethod').call(this,params) #where this is the current instance and params are method parameters\n *\n * @param {String} className\n * @param {String} classMethodName\n * @param {Object} params\n */\nexport const _super_ = function (className: string, classMethodName: string):T {\n return (ClassFactory(className))[classMethodName] as T;\n};\n_super_.prototype.toString = function () {\n return \"_super_(className,classMethodName,params) { [QCObjects native code] }\";\n};\n", "import { logger } from \"./Logger\";\n\nexport const waitUntil = (func:()=>void, exp:()=>any):void => {\n const _waitUntil = (func:()=>void, exp:()=>any):void => {\n const maxWaitCycles = 2000;\n let _w = 0;\n var _t = setInterval(function () {\n if (exp()) {\n clearInterval(_t);\n func();\n logger.debug(\"Ejecuting \" + func.name + \" after wait\");\n } else {\n if (_w < maxWaitCycles) {\n _w += 1;\n logger.debug(\"WAIT UNTIL \" + func.name + \" is true, \" + _w.toString() + \" cycles\");\n } else {\n logger.debug(\"Max execution time for \" + func.name + \" expression until true\");\n clearInterval(_t);\n }\n }\n }, 1);\n };\n setTimeout(function () {\n _waitUntil(func, exp);\n }, 1);\n };\n", "export const subelements = function subelements(this: any, query: string): T[] {\n const _self = this;\n return [..._self.querySelectorAll(query)] as T[];\n};", "import { CONFIG } from \"./CONFIG\";\nimport { findPackageNodePath } from \"./findPackageNodePath\";\nimport { Import } from \"./Import\";\nimport { logger } from \"./Logger\";\nimport { _require_, isBrowser, isNodeCommonJS } from \"./platform\";\n\nconst loadSDK = ():void => {\n if (CONFIG.get(\"useSDK\")) {\n (function () {\n const remoteImportsPath = CONFIG.get(\"remoteImportsPath\");\n const external = (!CONFIG.get(\"useLocalSDK\"));\n CONFIG.set(\"remoteImportsPath\", CONFIG.get(\"remoteSDKPath\"));\n\n let tryImportingSDK = false;\n let sdkName = \"QCObjects-SDK\";\n if (isBrowser) {\n tryImportingSDK = true;\n } else {\n const sdkPath = findPackageNodePath(\"qcobjects-sdk\");\n if (sdkPath !== null) {\n sdkName = \"qcobjects-sdk\";\n tryImportingSDK = true;\n } else if (sdkPath !== \"\"){\n sdkName = \"node_modules/qcobjects-sdk/QCObjects-SDK\";\n tryImportingSDK = true;\n } else {\n tryImportingSDK = false;\n }\n }\n\n if (tryImportingSDK) {\n logger.info(\"Importing SDK... \" + sdkName);\n if (isNodeCommonJS && typeof require !== \"undefined\") {\n const sdk = _require_(\"qcobjects-sdk\");\n if (sdk) {\n logger.debug(\"QCObjects SDK was loaded OK.\");\n } else {\n logger.debug(\"QCObjects SDK could not be imported.\");\n }\n } else {\n Import(sdkName, function () {\n if (external) {\n logger.debug(\"QCObjects-SDK.js loaded from remote location\");\n } else {\n logger.debug(\"QCObjects-SDK.js loaded from local\");\n }\n CONFIG.set(\"remoteImportsPath\", remoteImportsPath);\n }, external)\n ?.catch((e: any) => { throw new Error(`An error ocurred when trying to import: ${e}`); });\n }\n } else {\n logger.debug(\"SDK has not been imported as it is not available at the moment\");\n }\n })();\n }\n\n};\n\nexport default loadSDK;\n", "import { IQCObjectsElement, IQCObjectsShadowedElement } from \"@types\";\nimport { _top } from \"./top\";\nimport { _fireAsyncLoad, asyncLoad } from \"./asyncLoad\";\nimport { captureFalseTouch } from \"./captureFalseTouch\";\nimport { _Cast } from \"./Cast\";\nimport { Class } from \"./Class\";\nimport { ClassFactory } from \"./ClassFactory\";\nimport { Component } from \"./Component\";\nimport { ComponentURI } from \"./ComponentFactory\";\nimport { componentLoader } from \"./componentLoader\";\nimport { CONFIG } from \"./CONFIG\";\nimport { _DataStringify } from \"./DataStringify\";\nimport { setDefaultProcessors } from \"./defaultProcessors\";\nimport { Export } from \"./Export\";\nimport { Import } from \"./Import\";\nimport { _methods_, _protected_code_ } from \"./introspection\";\nimport { isQCObjects_Class, isQCObjects_Object } from \"./isQCObjects\";\nimport { logger } from \"./Logger\";\nimport { __to_number } from \"./mathFunctions\";\nimport { NamespaceRef } from \"./NamespaceRef\";\nimport { New } from \"./New\";\nimport { ObjectName } from \"./ObjectName\";\nimport { Package } from \"./Package\";\nimport { is_phonegap, isBrowser } from \"./platform\";\nimport { _Ready, ready, Ready } from \"./Ready\";\nimport { serviceLoader } from \"./serviceLoader\";\nimport { Tag } from \"./Tag\";\nimport { Processor } from \"./Processor\";\nimport { is_a } from \"./is_a\";\nimport { __getType__ } from \"./getType\";\nimport { shortCode } from \"./shortCode\";\nimport { _DOMCreateElement } from \"./DOMCreateElement\";\nimport { ComplexStorageCache } from \"./ComplexStorageCache\";\nimport { _super_ } from \"./super\";\nimport { waitUntil } from \"./waitUntil\";\nimport { subelements } from \"./subelements\";\nimport { GlobalSettings } from \"./globalSettings\";\nimport loadSDK from \"./loadSDK\";\nimport { range } from \"./range\";\n\n(function __qcobjects__(_top: any) {\n if (typeof Object.defineProperty !== \"undefined\" && typeof _top !== \"undefined\") {\n try {\n Object.defineProperty(_top, \"__qcobjects__\", {\n enumerable: true,\n configurable: false,\n writable: false,\n value: __qcobjects__,\n });\n } catch (e: any) {\n logger.debug(`An error ocurred: ${e}`);\n if (typeof _top.__qcobjects__ !== \"undefined\") {\n _top.__qcobjects__.loaded = true;\n }\n }\n }\n if (typeof _top.__qcobjects__.loaded === \"undefined\") {\n _top.__qcobjects__.loaded = true;\n\n if (isBrowser) {\n (Element as unknown as IQCObjectsElement).prototype.subelements = subelements;\n (Document as unknown as IQCObjectsElement).prototype.subelements = subelements;\n (HTMLElement as unknown as IQCObjectsElement).prototype.subelements = subelements;\n if (typeof ShadowRoot !== \"undefined\") {\n (ShadowRoot as unknown as IQCObjectsShadowedElement).prototype.subelements = subelements;\n }\n }\n\n\n logger.debugEnabled = false;\n logger.infoEnabled = true;\n\n /**\n * Basic Type of all elements\n */\n if (isBrowser) {\n (Element as unknown as IQCObjectsElement).prototype.find = function (tag: string): IQCObjectsElement[] {\n const _self = this;\n const _oo: IQCObjectsElement[] = [];\n const _tags = (document as unknown as IQCObjectsElement).subelements(tag);\n _tags.map((_tt, _t) => {\n if ((typeof _tags[_t] !== \"undefined\") && (_tags[_t].parentNode as Element).tagName === _self.parentNode.tagName) {\n _oo.push(_Cast(_tt, (new Object())));\n }\n return _tt;\n });\n return _oo;\n };\n }\n\n if (isBrowser) {\n Element.prototype.append = function QC_Append(child) {\n if (isQCObjects_Object(child) || typeof (child as any).body !== \"undefined\") {\n this.appendChild((child as any).body);\n } else {\n this.appendChild(child as any);\n }\n };\n\n /**\n * A replacement for direct using of innerHTML\n * use: [element].render('content') where 'content' is the string corresponding\n * to the DOM to insert in the element\n **/\n (Element as unknown as IQCObjectsElement).prototype.render = function QC_Render(content: string) {\n const _self = this;\n const _appendVDOM = (_self: any, content: string): any => {\n if (typeof document.implementation.createHTMLDocument !== \"undefined\") {\n const doc = document.implementation.createHTMLDocument(\"\");\n doc.body.innerHTML = content;\n (doc.body as unknown as IQCObjectsElement).subelements(\"*\").map((element): any => {\n return _self.append(element);\n });\n }\n };\n if (typeof this.innerHTML !== \"undefined\") {\n try {\n this.innerHTML += content;\n } catch (e: any) {\n logger.debug(`An error ocurred: ${e}`);\n _appendVDOM(_self, content);\n }\n } else {\n _appendVDOM(_self, content);\n }\n };\n }\n\n\n\n Export(waitUntil);\n Export(_super_);\n Export(ComplexStorageCache);\n Export(ClassFactory);\n Export(_DOMCreateElement);\n Export(shortCode);\n Export(__getType__);\n Export(is_a);\n Package(\"com.qcobjects\", [Processor]);\n\n\n\n\n if (isBrowser) {\n /**\n * Adds a Cast functionality to every Element of DOM\n */\n (Element as unknown as IQCObjectsElement).prototype.Cast = function QC_Cast(_o: T): T {\n const _self: any = this;\n return _Cast(_self, _o) as T;\n };\n }\n\n\n\n if (isBrowser) {\n window.onload = _Ready;\n if (is_phonegap) {\n document.addEventListener(\"deviceready\", _Ready, captureFalseTouch as any);\n }\n } else {\n global.onload = _Ready;\n }\n\n if (isBrowser) {\n window.addEventListener(\"popstate\", function (popStateEvent) {\n popStateEvent.stopImmediatePropagation();\n popStateEvent.stopPropagation();\n Component.route()\n .catch((e: any) => { throw new Error(`An error ocurred when trying to load initial routes. ${e}`); });\n });\n }\n\n\n\n Export(serviceLoader);\n Export(componentLoader);\n Export(ComponentURI);\n Export(ObjectName);\n Export(_DataStringify);\n Export(isQCObjects_Class);\n Export(isQCObjects_Object);\n Export(NamespaceRef);\n\n /**\n * Array math functions\n */\n // eslint-disable-next-line no-unused-vars\n (Array as any).prototype.unique = function (this: T[]): T[] {\n return this.filter(function (value: any, index: any, self: any) {\n return self.indexOf(value) === index;\n });\n };\n (Array as any).unique = function (a: Array): T[] {\n return (a as any).unique() as T[];\n };\n (_protected_code_)((Array as any).unique);\n (_protected_code_)((Array as any).prototype.unique);\n (Array as any).prototype.table = function (): void {\n console.table(this);\n };\n (Array as any).table = function (a: any): void {\n a.table();\n return;\n };\n (_protected_code_)((Array as any).table);\n (_protected_code_)((Array as any).prototype.table);\n (Array as any).prototype.sum = function (): number {\n return this.reduce(function (prev: any, current: any) {\n return (__to_number(prev)) + (__to_number(current));\n }, 0) as number;\n };\n (Array as any).sum = function (a: any): number {\n return a.sum() as number;\n };\n (_protected_code_)((Array as any).sum);\n (_protected_code_)((Array as any).prototype.sum);\n (Array as any).prototype.avg = function (): number {\n return (this.length < 1) ? (0) : (this.reduce(function (prev: any, current: any) {\n return (((__to_number(prev)) + (__to_number(current))) / 2);\n })) as number;\n };\n (Array as any).avg = function (a: any): number {\n return a.avg() as number;\n };\n (_protected_code_)((Array as any).avg);\n (_protected_code_)((Array as any).prototype.avg);\n (Array as any).prototype.min = function (): number {\n return this.reduce(function (prev: number, current: number) {\n return (__to_number(prev) <= __to_number(current)) ? (prev) : (current);\n }, Infinity) as number;\n };\n (Array as any).min = function (a: any): number {\n return a.min() as number;\n };\n (_protected_code_)((Array as any).min);\n (_protected_code_)((Array as any).prototype.min);\n (Array as any).prototype.max = function (): number {\n return this.reduce(function (prev: number, current: number) {\n return (__to_number(prev) >= __to_number(current)) ? (prev) : (current);\n }, 0) as number;\n };\n (Array as any).max = function (a: any): number {\n return a.max() as number;\n };\n (_protected_code_)((Array as any).max);\n (_protected_code_)((Array as any).prototype.max);\n (Array as any).prototype.sortBy = function (propName: string, sortAsc = true): Array[] {\n const sort_function = (sortAsc) ? (\n function (prev: any, current: any) {\n return current[propName] < prev[propName] ? 1 : -1;\n }\n ) : (\n function (prev: any, current: any) {\n return current[propName] > prev[propName] ? 1 : -1;\n }\n );\n return this.sort(sort_function) as Array[];\n };\n (Array as any).sortBy = function (a: any, propName: string, sortAsc = true): Array[] {\n return a.sortBy(propName, sortAsc) as Array[];\n };\n (_protected_code_)((Array as any).sortBy);\n (_protected_code_)((Array as any).prototype.sortBy);\n\n /**\n * Extends the Array prototype to include a method that creates a matrix (2D array)\n * with specified dimensions and fill value.\n *\n * @param {number} _length - The number of rows in the matrix.\n * @param {any} [_fillValue=0] - The value to fill the matrix with (default is 0).\n * @returns {Array>} A 2D array (matrix) filled with the specified value.\n *\n * @example\n * // Create a 3x3 matrix filled with zeros\n * const matrix = [].matrix(3);\n * console.log(matrix);\n * // Output: [0, 0, 0]\n *\n * @example\n * // Create a 2x4 matrix filled with a specific value\n * const matrix = [].matrix(2, 5);\n * console.log(matrix);\n * // Output: [5, 5]\n *\n * @example\n * // Create a 4x2 matrix filled with null values\n * const matrix = [].matrix(4, null);\n * console.log(matrix);\n * // Output: [null, null, null, null]\n */\n (Array as any).prototype.matrix = function (_length: number, _fillValue = 0) {\n // eslint-disable-next-line no-unused-vars\n const x_func = function (x = undefined) {\n return _fillValue;\n };\n return Array.from({\n length: _length\n }, x_func);\n };\n\n /**\n * Creates a matrix (2D array) from a given array.\n * \n * This function extends the Array constructor by adding a static method\n * that generates a matrix with specified dimensions and fill value.\n * \n * @function\n * @param {Array} a - The input array used to generate the matrix.\n * @param {number} _length - The length of the matrix (number of rows).\n * @param {number} [_fillValue=0] - The value to fill the matrix with (default is 0).\n * @returns {Array} A 2D array (matrix) created from the input parameters.\n * \n * @example\n * const myMatrix = Array.matrix(2, 5);\n * // myMatrix will be [5, 5, 5]\n */\n (Array as any).matrix = function (a: any, _length: number, _fillValue = 0): T[] {\n return a.matrix(_length, _fillValue) as T[];\n };\n\n (_protected_code_)((Array as any).matrix);\n (_protected_code_)((Array as any).prototype.matrix);\n\n\n (Array as any).prototype.matrix2d = function (_length: number, _fillValue = 0) {\n // eslint-disable-next-line no-unused-vars\n const y_func = function (y: any) {\n return _fillValue;\n };\n // eslint-disable-next-line no-unused-vars\n const x_func = function (x: any) {\n return Array.from({\n length: _length\n }, y_func);\n };\n return Array.from({\n length: _length\n }, x_func);\n };\n (Array as any).matrix2d = function (a: any, _length: number, _fillValue = 0): T[][] {\n return a.matrix2d(_length, _fillValue) as T[][];\n };\n\n (_protected_code_)((Array as any).matrix2d);\n (_protected_code_)((Array as any).prototype.matrix2d);\n\n (Array as any).prototype.matrix3d = function (_length: number, _fillValue = 0) {\n // eslint-disable-next-line no-unused-vars\n const y_func = function (y: any) {\n return Array.from({\n length: _length\n }, function () {\n return _fillValue;\n });\n };\n // eslint-disable-next-line no-unused-vars\n const x_func = function (x: any) {\n return Array.from({\n length: _length\n }, y_func);\n };\n return Array.from({\n length: _length\n }, x_func);\n };\n\n (Array as any).matrix3d = function (a: any, _length: number, _fillValue = 0): T[][][] {\n return a.matrix3d(_length, _fillValue) as T[][][];\n };\n\n\n (_protected_code_)((Array as any).matrix3d);\n (_protected_code_)((Array as any).prototype.matrix3d);\n\n\n\n (String as unknown as any).prototype.list = function (): string[] {\n const __instance = this;\n return range(0, __instance.length - 1).map(function (i: any): T {\n return __instance[i] as T;\n }) as string[];\n };\n (_protected_code_)((String as unknown as any).prototype.list);\n\n\n\n /**\n * End of array math functions\n */\n\n\n\n setDefaultProcessors();\n\n\n /**\n * Load every component tag declared in the body\n **/\n Ready(function () {\n if (!CONFIG.get(\"useSDK\")) {\n GlobalSettings.__start__()\n .catch((e: any) => {\n throw Error(e);\n });\n }\n });\n\n /*\n Public variables and functions\n */\n Export(Export); /* exports the same Export function once */\n Export(Import);\n Export(Package);\n Export(Class);\n Export(New);\n Export(Tag);\n Export(Ready);\n Export(ready);\n Export(isBrowser);\n Export(_methods_);\n Export(GlobalSettings);\n\n\n (loadSDK)();\n\n if (isBrowser) {\n asyncLoad(function (): any {\n Ready(function () {\n\n /*\n * scroll management custom events\n * usage: document.addEventListener('percentY90',function(e){console.log(e.detail.percentY)});\n * possible events: scrollpercent, defaultscroll, percentY0, percentY25, percentY50, percentY75, percentY90\n */\n\n (function (_top) {\n let ticking = false;\n const scrollHeight = Math.max(\n document.body.scrollHeight, document.documentElement.scrollHeight,\n document.body.offsetHeight, document.documentElement.offsetHeight,\n document.body.clientHeight, document.documentElement.clientHeight\n );\n\n const scrollWidth = Math.max(\n document.body.scrollWidth, document.documentElement.scrollWidth,\n document.body.offsetWidth, document.documentElement.offsetWidth,\n document.body.clientWidth, document.documentElement.clientWidth\n );\n\n function scrollDispatcher(event: any) {\n const percentY = Math.round(_top.scrollY * 100 / scrollHeight);\n const percentX = Math.round(_top.scrollX * 100 / scrollWidth);\n const scrollPercentEventEvent = new CustomEvent(\"scrollpercent\", {\n detail: {\n percentX,\n percentY\n }\n });\n event.target.dispatchEvent(scrollPercentEventEvent);\n let secondaryEventName = \"defaultscroll\";\n const __valid_scrolls__ = [0, 5, 10, 25, 50, 75, 90, 95, 100];\n __valid_scrolls__.filter(function (p) {\n return p === percentY;\n }).map(function (pY: T): T {\n secondaryEventName = \"percentY\" + percentY.toString();\n const secondaryCustomEvent = new CustomEvent(secondaryEventName, {\n detail: {\n percentX,\n percentY\n }\n });\n event.target.dispatchEvent(secondaryCustomEvent);\n return pY;\n });\n\n }\n\n document.addEventListener(\"scroll\", function (event) {\n\n if (!ticking) {\n requestAnimationFrame(function () {\n scrollDispatcher(event);\n ticking = false;\n });\n\n ticking = true;\n }\n });\n\n })(_top);\n\n });\n }, []);\n }\n\n if (!isBrowser) {\n if (typeof _top.global !== \"undefined\" && Object.hasOwn(_top.global, \"_fireAsyncLoad\")) {\n _fireAsyncLoad.call(_top);\n }\n if (typeof _top.global !== \"undefined\" && Object.hasOwn(_top.global, \"onload\")) {\n _top.global.onload.call(_top);\n }\n }\n\n\n /* Freezing Object && Object.prototype to prevent prototype pollution risks */\n (function (isBrowser) {\n const __freeze__ = function () {\n Object.freeze(Object.prototype);\n Object.freeze(Object);\n };\n if (isBrowser && CONFIG.get(\"secureObjects\", false)) {\n Ready(function () {\n __freeze__();\n });\n } else if (CONFIG.get(\"secureObjects\", false)) {\n __freeze__();\n }\n })(isBrowser);\n }\n\n})(_top);\n", "/**\n * QCObjects 2.4\n * ________________\n *\n * Author: Jean Machuca \n *\n * Cross Browser Javascript Framework for MVC Patterns\n * QuickCorp/QCObjects is licensed under the\n * GNU Lesser General Public License v3.0\n * [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)\n *\n * Permissions of this copyleft license are conditioned on making available\n * complete source code of licensed works and modifications under the same\n * license or the GNU GPLv3. Copyright and license notices must be preserved.\n * Contributors provide an express grant of patent rights. However, a larger\n * work using the licensed work through interfaces provided by the licensed\n * work may be distributed under different terms and without source code for\n * the larger work.\n *\n * Copyright (C) 2015 Jean Machuca,\n *\n * Everyone is permitted to copy and distribute verbatim copies of this\n * license document, but changing it is not allowed.\n */\n/* eslint no-unused-vars: \"off\" */\n/* eslint no-redeclare: \"off\" */\n/* eslint no-empty: \"off\" */\n/* eslint strict: \"off\" */\n\n/* eslint no-mixed-operators: \"off\" */\n\n\"use strict\";\n\nexport * as AssignPolyfill from \"./assign\";\nexport * as __top__ from \"./top\";\nexport * as qcobjects from \"./MainProcess\";\nexport {_top, resetTop} from \"./top\";\nexport { _QC_CLASSES, _QC_PACKAGES, _QC_PACKAGES_IMPORTED, _QC_READY_LISTENERS } from \"./PrimaryCollections\";\nexport { _DataStringify } from \"./DataStringify\";\nexport { _DOMCreateElement } from \"./DOMCreateElement\";\nexport { _methods_, _protected_code_ } from \"./introspection\";\nexport { logger, Logger } from \"./Logger\";\nexport { _require_, is_phonegap, isBrowser, isNodeCommonJS } from \"./platform\";\nexport { subelements } from \"./subelements\";\nexport { __is_raw_class__ } from \"./is_raw_class\";\nexport { _LegacyCopy } from \"./LegacyCopy\";\nexport { _fireAsyncLoad, asyncLoad } from \"./asyncLoad\";\nexport { __instanceID } from \"./IncrementInstanceID\";\nexport { ObjectName } from \"./ObjectName\";\nexport { __getType__ } from \"./getType\";\nexport { is_a } from \"./is_a\";\nexport { ComplexStorageCache } from \"./ComplexStorageCache\";\nexport { waitUntil } from \"./waitUntil\";\nexport { _Cast, _CastProps } from \"./Cast\";\nexport { isQCObjects_Class, isQCObjects_Object } from \"./isQCObjects\";\nexport { Package } from \"./Package\";\nexport { ClassFactory } from \"./ClassFactory\";\nexport { Export } from \"./Export\";\nexport { Class } from \"./Class\";\nexport { InheritClass } from \"./InheritClass\";\nexport { _super_ } from \"./super\";\nexport { shortCode } from \"./shortCode\";\nexport { Processor } from \"./Processor\";\nexport { New } from \"./New\";\nexport { _Ready, ready, Ready } from \"./Ready\";\nexport { captureFalseTouch } from \"./captureFalseTouch\";\nexport { serviceLoader } from \"./serviceLoader\";\nexport { componentLoader } from \"./componentLoader\";\nexport { _buildComponentsFromElements_, ComponentURI } from \"./ComponentFactory\";\nexport { NamespaceRef } from \"./NamespaceRef\";\nexport { setDefaultProcessors } from \"./defaultProcessors\";\nexport { Tag, TagElements } from \"./Tag\";\nexport { Import } from \"./Import\";\nexport { BackendMicroservice } from \"./BackendMicroservice\";\nexport { Component } from \"./Component\";\nexport { _Crypt } from \"./Crypt\";\nexport { DefaultTemplateHandler } from \"./DefaultTemplateHandler\";\nexport { SourceJS } from \"./SourceJS\";\nexport { SourceCSS } from \"./SourceCSS\";\nexport { GlobalSettings } from \"./globalSettings\";\nexport { RegisterClass } from \"./RegisterClass\";\nexport { _ComponentWidget_, RegisterWidget, RegisterWidgets } from \"./WidgetsFactory\";\nexport { CONFIG } from \"./CONFIG\";\nexport { Controller } from \"./Controller\";\nexport { View } from \"./View\";\nexport { ConfigService, JSONService, Service } from \"./Service\";\nexport { VO } from \"./VO\";\nexport { Effect } from \"./Effect\";\nexport { TransitionEffect } from \"./TransitionEffect\";\nexport { Timer } from \"./Timer\";\nexport { _tag_filter_ } from \"./tag_filter\";\nexport { range } from \"./range\";\nexport { ArrayCollection, ArrayList } from \"./ArrayCollection\";\nexport { DDO } from \"./DDO\";\nexport { Toggle } from \"./Toggle\";\nexport { findPackageNodePath } from \"./findPackageNodePath\";\nexport { getDocumentLayout } from \"./DocumentLayout\";\nexport { IQCObjectsElement, IQCObjectsShadowedElement } from \"@types\";\nexport { __to_number } from \"./mathFunctions\";\nexport {_top as global} from \"./top\";\nexport {__make_global__} from \"./make_global\";\nexport {get, set} from \"./top\";\n", " // Object.assign Polyfilling\n // Reference: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign#Polyfill\n if (typeof Object.assign !== \"function\") {\n // Must be writable: true, enumerable: false, configurable: true\n Object.defineProperty(Object, \"assign\", {\n // eslint-disable-next-line no-unused-vars\n value: function assign(target: null, varArgs: any):any { // .length of function is 2\n \"use strict\";\n if (target === null) { // TypeError if undefined or null\n throw new TypeError(\"Cannot convert undefined or null to object\");\n }\n \n const to = Object(target);\n \n for (let index = 1; index < arguments.length; index++) {\n // eslint-disable-next-line prefer-rest-params\n const nextSource = arguments[index];\n \n if (nextSource !== null) { // Skip over if undefined or null\n for (const nextKey in nextSource) {\n // Avoid bugs when hasOwnProperty is shadowed\n if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {\n to[nextKey] = nextSource[nextKey];\n }\n }\n }\n }\n return to;\n },\n writable: true,\n configurable: true\n });\n }\nexport {};", "import { Http2Stream } from \"http2\";\nimport { Stream } from \"stream\";\nimport { _basePath_ } from \"./basePath\";\nimport { _DataStringify } from \"./DataStringify\";\nimport { _domain_ } from \"./domain\";\nimport { InheritClass } from \"./InheritClass\";\nimport { logger } from \"./Logger\";\nimport { Package } from \"./Package\";\nimport { IMicroservice } from \"@types\";\n\nexport class BackendMicroservice extends InheritClass {\n stream: any;\n route: any;\n headers: any;\n request: any;\n\n constructor({\n domain = _domain_,\n basePath = _basePath_,\n body = null,\n stream = null,\n request = null\n }:IMicroservice) {\n super({\n domain,\n basePath,\n body,\n stream,\n request\n });\n logger.debug(\"Initializing BackendMicroservice...\");\n const microservice = this;\n if (typeof this.body === \"undefined\") {\n this.body = null;\n }\n if (typeof body !== \"undefined\") {\n this.body = body;\n }\n this.cors();\n microservice.stream = stream;\n (stream as any)?.on(\"data\", (data: any) => {\n // data from POST, GET\n const requestMethod = (request as any)?.method.toLowerCase();\n const supportedMethods = {\n \"post\": microservice.post.bind(microservice),\n };\n if (Object.hasOwn(supportedMethods, requestMethod)) {\n (supportedMethods as any)[requestMethod].call(microservice, data);\n }\n });\n\n // data from POST, GET\n const requestMethod = (request as any)?.method.toLowerCase();\n const supportedMethods = {\n \"get\": microservice.get.bind(microservice),\n \"head\": microservice.head.bind(microservice),\n \"put\": microservice.put.bind(microservice),\n \"delete\": microservice.delete.bind(microservice),\n \"connect\": microservice.connect.bind(microservice),\n \"options\": microservice.options.bind(microservice),\n \"trace\": microservice.trace.bind(microservice),\n \"patch\": microservice.patch.bind(microservice)\n };\n if (Object.hasOwn(supportedMethods, requestMethod)) {\n (supportedMethods as any)[requestMethod].call(microservice);\n }\n\n\n }\n\n cors():void {\n if (this.route.cors) {\n logger.debug(\"Validating CORS...\");\n const {\n allow_origins,\n allow_credentials,\n allow_methods,\n allow_headers\n } = this.route.cors;\n const microservice = this;\n if (typeof microservice.headers !== \"object\") {\n microservice.headers = {};\n }\n if (typeof microservice.route.responseHeaders !== \"object\") {\n microservice.route.responseHeaders = {};\n }\n if (typeof allow_origins !== \"undefined\") {\n logger.debug(\"CORS: allow_origins available. Validating origins...\");\n // an example of allow_origins is ['https://example.com','http://www.example.com']\n if (allow_origins === \"*\" || (typeof microservice.request.headers.origin === \"undefined\") || [...allow_origins].indexOf(microservice.request.headers.origin) !== -1) {\n // for compatibility with all browsers allways return a wildcard when the origin is allowed\n logger.debug(\"CORS: Adding header Access-Control-Allow-Origin=*\");\n microservice.route.responseHeaders[\"Access-Control-Allow-Origin\"] = \"*\";\n } else {\n logger.debug(\"CORS: Origin is not allowed: \" + microservice.request.headers.origin);\n logger.debug(\"CORS: Forcing to finish the response...\");\n this.body = {};\n try {\n this.done();\n } catch (e:any) {\n logger.debug(`It was not possible to finish the call to the microservice: ${e}`);\n }\n }\n } else {\n logger.debug(\"CORS: no allow_origins available. Allowing all origins...\");\n logger.debug(\"CORS: Adding header Access-Control-Allow-Origin=*\");\n microservice.route.responseHeaders[\"Access-Control-Allow-Origin\"] = \"*\";\n }\n if (typeof allow_credentials !== \"undefined\") {\n logger.debug(`CORS: allow_credentials present. Allowing ${allow_credentials}...`);\n microservice.route.responseHeaders[\"Access-Control-Allow-Credentials\"] = allow_credentials.toString();\n } else {\n logger.debug(\"CORS: No allow_credentials present. Allowing all credentials.\");\n microservice.route.responseHeaders[\"Access-Control-Allow-Credentials\"] = \"true\";\n }\n if (typeof allow_methods !== \"undefined\") {\n logger.debug(`CORS: allow_methods present. Allowing ${allow_methods}...`);\n microservice.route.responseHeaders[\"Access-Control-Allow-Methods\"] = [...allow_methods].join(\",\");\n } else {\n logger.debug(\"CORS: No allow_methods present. Allowing only GET, OPTIONS and POST\");\n microservice.route.responseHeaders[\"Access-Control-Allow-Methods\"] = \"GET, OPTIONS, POST\";\n }\n if (typeof allow_headers !== \"undefined\") {\n logger.debug(`CORS: allow_headers present. Allowing ${allow_headers}...`);\n microservice.route.responseHeaders[\"Access-Control-Allow-Headers\"] = [...allow_headers].join(\",\");\n } else {\n logger.debug(\"CORS: No allow_headers present. Allowing all headers...\");\n microservice.route.responseHeaders[\"Access-Control-Allow-Headers\"] = \"*\";\n }\n } else {\n logger.debug(\"No CORS validation available. You can specify cors in CONFIG.backend.routes[].cors\");\n }\n }\n\n\n head(formData: any):void {\n logger.debug(`[BackendMicroservice.head] Data received: ${_DataStringify(formData)}`);\n this.done();\n }\n\n get(formData: any):void {\n logger.debug(`[BackendMicroservice.get] Data received: ${_DataStringify(formData)}`);\n this.done();\n }\n\n post(formData: any):void {\n logger.debug(`[BackendMicroservice.post] Data received: ${_DataStringify(formData)}`);\n this.done();\n }\n\n put(formData: any):void {\n logger.debug(`[BackendMicroservice.put] Data received: ${_DataStringify(formData)}`);\n this.done();\n }\n\n delete(formData: any):void {\n logger.debug(`[BackendMicroservice.delete] Data received: ${_DataStringify(formData)}`);\n this.done();\n }\n\n connect(formData: any):void {\n logger.debug(`[BackendMicroservice.connect] Data received: ${_DataStringify(formData)}`);\n this.done();\n }\n\n options(formData: any):void {\n logger.debug(`[BackendMicroservice.options] Data received: ${_DataStringify(formData)}`);\n this.done();\n }\n\n trace(formData: any):void {\n logger.debug(`[BackendMicroservice.trace] Data received: ${_DataStringify(formData)}`);\n this.done();\n }\n\n patch(formData: any):void {\n logger.debug(`[BackendMicroservice.patch] Data received: ${_DataStringify(formData)}`);\n this.done();\n }\n\n finishWithBody(stream?: Http2Stream | Stream):void {\n try {\n logger.debug(\"[BackendMicroservice.finishWithBody] Ending the stream...\");\n logger.debug(`[BackendMicroservice.finishWithBody] type of body is: ${typeof this.body}`);\n if (typeof this.body !== \"string\") {\n this.body = _DataStringify(this.body);\n }\n logger.debug(`[BackendMicroservice.finishWithBody] \\n body: ${this.body} `);\n (stream as any)?.write(this.body);\n (stream as any)?.end();\n logger.debug(\"[BackendMicroservice.finishWithBody] Stream ended.\");\n } catch (e:any) {\n logger.debug(`[BackendMicroservice.finishWithBody] Something went wrong ending the stream: ${e}`);\n }\n }\n\n done():void {\n logger.debug(\"[BackendMicroservice.done] Finalizing the response...\");\n const microservice = this;\n const stream = microservice.stream;\n try {\n logger.debug(\"[BackendMicroservice.done] Sending response headers...\");\n if (microservice.route.responseHeaders) {\n logger.debug(`[BackendMicroservice.done] Response headers present: ${Object.keys(microservice.route.responseHeaders).join(\",\")}`);\n stream.respond(microservice.route.responseHeaders);\n } else {\n throw Error(\"[BackendMicroservice.done] No headers present.\");\n }\n } catch (e:any) {\n logger.debug(`[BackendMicroservice.done] Something went wrong sending response headers: ${e}`);\n }\n if (microservice.body !== null) {\n try {\n logger.debug(\"[BackendMicroservice.done] A body of message is present. Finalizing the response...\");\n microservice.finishWithBody.call(microservice, stream);\n } catch (e:any) {\n logger.debug(`[BackendMicroservice.done] Something went wrong finalizing the response: ${e}`);\n }\n } else {\n logger.debug(\"[BackendMicroservice.done] No body present. Ending stream...\");\n stream.end();\n }\n }\n\n\n}\n\nPackage(\"com.qcobjects.api\", [\n BackendMicroservice\n]);\n", "import { DefaultTemplateHandlerParams, IComponent } from \"@types\";\nimport { logger } from \"./Logger\";\nimport { GlobalProcessor as Processor } from \"./Processor\";\nimport { RegisterClass } from \"./RegisterClass\";\n\nexport class DefaultTemplateHandler {\n template = \"\";\n __definition = {};\n static __definition = {};\n component?: IComponent;\n\n constructor({ component, template }: DefaultTemplateHandlerParams) {\n this.component = component;\n this.template = template;\n }\n\n assign(data: any): string {\n const templateInstance = this;\n if (typeof templateInstance.component === \"undefined\") {\n throw new Error(\"DefaultTemplateHandler.assign: component is undefined\");\n }\n if (typeof templateInstance.component.processorHandler === \"undefined\") {\n throw new Error(\"DefaultTemplateHandler.assign: component.processorHandler is undefined\");\n }\n const processorHandler = templateInstance.component.processorHandler;\n processorHandler.component = templateInstance.component;\n let parsedAssignmentText = (typeof templateInstance.template !== \"undefined\") ? (templateInstance.template) : (\"\");\n if (typeof data === \"object\") {\n [...Object.keys(data)].map((k): any => {\n let _value = data[k];\n if (typeof _value === \"string\" || typeof _value === \"number\" || (!isNaN(_value))) {\n try {\n _value = Processor.processObject.bind(processorHandler).call(processorHandler, _value, templateInstance.component);\n parsedAssignmentText = parsedAssignmentText.replace((new RegExp(`{{${k}}}`, \"g\")), _value);\n } catch (e: any) {\n logger.warn(`${templateInstance.component?.name} could not parse processors.`);\n throw Error(`${templateInstance.component?.name} could not parse processors. Reason: ${e.message}`);\n }\n }\n return k;\n });\n } else {\n logger.debug(`${templateInstance.component?.name}.data is not an object`);\n }\n try {\n parsedAssignmentText = Processor.processObject.call(processorHandler, parsedAssignmentText, templateInstance.component);\n } catch (e: any) {\n logger.warn(`${templateInstance.component?.name} could not parse processors.`);\n throw Error(`${templateInstance.component?.name} could not parse processors. Reason: ${e.message}`);\n }\n return parsedAssignmentText;\n }\n\n}\nRegisterClass(DefaultTemplateHandler, \"com.qcobjects\");\n", "import { __make_global__ } from \"./make_global\";\nimport { __register_class__ } from \"./PrimaryCollections\";\n\n\n\nexport const RegisterClass = function (_class_:any, __namespace?:string):any {\n return __register_class__(_class_, __namespace);\n};\n__make_global__(RegisterClass);", "import { ISourceJS } from \"@types\";\nimport { _basePath_ } from \"./basePath\";\nimport { _Cast } from \"./Cast\";\nimport { _domain_ } from \"./domain\";\nimport { _DOMCreateElement } from \"./DOMCreateElement\";\nimport { InheritClass } from \"./InheritClass\";\nimport { Package } from \"./Package\";\nimport { logger } from \"./Logger\";\n\nexport class SourceJS extends InheritClass implements ISourceJS {\n domain:string= _domain_;\n basePath:string= _basePath_;\n type= \"text/javascript\";\n containerTag= \"body\";\n url= \"\";\n data= {};\n async= false;\n external= false;\n\n constructor(o:any){\n super(o);\n this.body= _DOMCreateElement(\"script\");\n\n }\n set(name:string, value:any):void {\n this[name] = value;\n }\n get(name:string, _default?:any):any {\n return this[name] || _default;\n }\n status= false;\n done():void { }\n fail():void { }\n rebuild():void {\n const context = this;\n try {\n document.getElementsByTagName(context.containerTag)[0].appendChild(\n (function (s:any, url:string, context:any):any {\n s.type = context.type;\n s.src = url;\n s.crossOrigin = (Object.hasOwn(context, \"crossOrigin\")) ? (context.crossOrigin) : (\"anonymous\");\n s.async = context.async;\n s.onreadystatechange = function () {\n if (this.readyState === \"complete\") {\n context.done.call(context);\n }\n };\n s.onload = function (e:any) {\n context.status = true;\n context.done.call(context, e);\n };\n s.onerror = function (e:any) {\n context.status = false;\n context.fail.call(context, e);\n };\n context.body = s;\n return s;\n }).call(this,\n _DOMCreateElement(\"script\"),\n (this.external) ? (this.url) : (this.basePath + this.url), context));\n } catch (e:any) {\n context.status = false;\n logger.debug(`An error ocurred: ${e}`);\n context.fail();\n }\n }\n Cast(o:any):any {\n return _Cast(this, o);\n }\n _new_(properties:any):void {\n this.__new__(properties);\n this.rebuild();\n }\n }\n\n Package(\"com.qcobjects\", [SourceJS]);\n", "import { ISourceCSS, TBody } from \"@types\";\nimport { _basePath_ } from \"./basePath\";\nimport { _Cast } from \"./Cast\";\nimport { _domain_ } from \"./domain\";\nimport { _DOMCreateElement } from \"./DOMCreateElement\";\nimport { InheritClass } from \"./InheritClass\";\nimport { isBrowser } from \"./platform\";\nimport { Package } from \"./Package\";\n\nexport class SourceCSS extends InheritClass implements ISourceCSS {\n domain: string = _domain_;\n basePath: string = _basePath_;\n url = \"\";\n data = {};\n async = false;\n external = false;\n\n constructor(o: any) {\n super(o);\n this.body = _DOMCreateElement(\"link\") as TBody;\n }\n fail(): void {\n throw new Error(\"Method not implemented.\");\n }\n Cast(o: any): any {\n return _Cast(this, o);\n }\n set(name: string, value: any): void {\n this[name] = value;\n }\n get(name: string, _default?: any): any {\n return this[name] || _default;\n }\n done(): void { }\n rebuild(): void {\n const context = this;\n if (isBrowser) {\n window.document.getElementsByTagName(\"head\")[0].appendChild(\n (function (s: any, url: string, context: any): any {\n s.type = \"text/css\";\n s.rel = \"stylesheet\";\n s.href = url;\n s.crossOrigin = \"anonymous\";\n s.onreadystatechange = function () {\n if (this.readyState === \"complete\") {\n context.done.call(context);\n }\n };\n s.onload = context.done;\n context.body = s;\n return s;\n }).call(this,\n _DOMCreateElement(\"link\"),\n (this.external) ? (this.url) : (this.basePath + this.url), context));\n }\n }\n}\n\nPackage(\"com.qcobjects\", [SourceCSS]);", " \n/* eslint-disable no-unused-vars */\nimport { _DOMCreateElement } from \"./DOMCreateElement\";\nimport { Export } from \"./Export\";\nimport { _protected_code_ } from \"./introspection\";\nimport { isBrowser } from \"./platform\";\nimport { I_ComponentWidget_ } from \"@types\";\n\nclass QCObjectsWidgetNode implements I_ComponentWidget_ {\n writingSuggestions!: string;\n currentCSSZoom!: number;\n ariaColIndexText!: string | null;\n ariaRowIndexText!: string | null;\n accessKey!: string;\n accessKeyLabel!: string;\n autocapitalize!: string;\n dir!: string;\n draggable!: boolean;\n hidden!: boolean;\n inert!: boolean;\n innerText!: string;\n lang!: string;\n offsetHeight!: number;\n offsetLeft!: number;\n offsetParent!: Element | null;\n offsetTop!: number;\n offsetWidth!: number;\n outerText!: string;\n popover!: string | null;\n spellcheck!: boolean;\n title!: string;\n translate!: boolean;\n attachInternals(): ElementInternals {\n throw new Error(\"Method not implemented.\");\n }\n click(): void {\n throw new Error(\"Method not implemented.\");\n }\n hidePopover(): void {\n throw new Error(\"Method not implemented.\");\n }\n showPopover(): void {\n throw new Error(\"Method not implemented.\");\n }\n togglePopover(force?: boolean): boolean {\n throw new Error(\"Method not implemented.\");\n }\n addEventListener(type: unknown, listener: unknown, options?: unknown): void {\n throw new Error(\"Method not implemented.\");\n }\n removeEventListener(type: unknown, listener: unknown, options?: unknown): void {\n throw new Error(\"Method not implemented.\");\n }\n attributes!: NamedNodeMap;\n classList!: DOMTokenList;\n className!: string;\n clientHeight!: number;\n clientLeft!: number;\n clientTop!: number;\n clientWidth!: number;\n id!: string;\n innerHTML!: string;\n localName!: string;\n namespaceURI!: string | null;\n onfullscreenchange!: ((this: Element, ev: Event) => any) | null;\n onfullscreenerror!: ((this: Element, ev: Event) => any) | null;\n outerHTML!: string;\n ownerDocument!: Document;\n part!: DOMTokenList;\n prefix!: string | null;\n scrollHeight!: number;\n scrollLeft!: number;\n scrollTop!: number;\n scrollWidth!: number;\n shadowRoot!: ShadowRoot | null;\n slot!: string;\n tagName!: string;\n attachShadow(init: ShadowRootInit): ShadowRoot {\n throw new Error(\"Method not implemented.\");\n }\n checkVisibility(options?: CheckVisibilityOptions): boolean {\n throw new Error(\"Method not implemented.\");\n }\n closest(selectors: unknown): any {\n throw new Error(\"Method not implemented.\");\n }\n computedStyleMap(): StylePropertyMapReadOnly {\n throw new Error(\"Method not implemented.\");\n }\n getAttribute(qualifiedName: string): string | null {\n throw new Error(\"Method not implemented.\");\n }\n getAttributeNS(namespace: string | null, localName: string): string | null {\n throw new Error(\"Method not implemented.\");\n }\n getAttributeNames(): string[] {\n throw new Error(\"Method not implemented.\");\n }\n getAttributeNode(qualifiedName: string): Attr | null {\n throw new Error(\"Method not implemented.\");\n }\n getAttributeNodeNS(namespace: string | null, localName: string): Attr | null {\n throw new Error(\"Method not implemented.\");\n }\n getBoundingClientRect(): DOMRect {\n throw new Error(\"Method not implemented.\");\n }\n getClientRects(): DOMRectList {\n throw new Error(\"Method not implemented.\");\n }\n getElementsByClassName(classNames: string): HTMLCollectionOf {\n throw new Error(\"Method not implemented.\");\n }\n getElementsByTagName(qualifiedName: unknown): HTMLCollectionOf | HTMLCollectionOf {\n throw new Error(\"Method not implemented.\");\n }\n getElementsByTagNameNS(namespace: unknown, localName: unknown): HTMLCollectionOf {\n throw new Error(\"Method not implemented.\");\n }\n getHTML(options?: GetHTMLOptions): string {\n throw new Error(\"Method not implemented.\");\n }\n hasAttribute(qualifiedName: string): boolean {\n throw new Error(\"Method not implemented.\");\n }\n hasAttributeNS(namespace: string | null, localName: string): boolean {\n throw new Error(\"Method not implemented.\");\n }\n hasAttributes(): boolean {\n throw new Error(\"Method not implemented.\");\n }\n hasPointerCapture(pointerId: number): boolean {\n throw new Error(\"Method not implemented.\");\n }\n insertAdjacentElement(where: InsertPosition, element: Element): Element | null {\n throw new Error(\"Method not implemented.\");\n }\n insertAdjacentHTML(position: InsertPosition, string: string): void {\n throw new Error(\"Method not implemented.\");\n }\n insertAdjacentText(where: InsertPosition, data: string): void {\n throw new Error(\"Method not implemented.\");\n }\n matches(selectors: string): boolean {\n throw new Error(\"Method not implemented.\");\n }\n releasePointerCapture(pointerId: number): void {\n throw new Error(\"Method not implemented.\");\n }\n removeAttribute(qualifiedName: string): void {\n throw new Error(\"Method not implemented.\");\n }\n removeAttributeNS(namespace: string | null, localName: string): void {\n throw new Error(\"Method not implemented.\");\n }\n removeAttributeNode(attr: Attr): Attr {\n throw new Error(\"Method not implemented.\");\n }\n requestFullscreen(options?: FullscreenOptions): Promise {\n throw new Error(\"Method not implemented.\");\n }\n requestPointerLock(options?: PointerLockOptions): Promise {\n throw new Error(\"Method not implemented.\");\n }\n scroll(x?: unknown, y?: unknown): void {\n throw new Error(\"Method not implemented.\");\n }\n scrollBy(x?: unknown, y?: unknown): void {\n throw new Error(\"Method not implemented.\");\n }\n scrollIntoView(arg?: boolean | ScrollIntoViewOptions): void {\n throw new Error(\"Method not implemented.\");\n }\n scrollTo(x?: unknown, y?: unknown): void {\n throw new Error(\"Method not implemented.\");\n }\n setAttribute(qualifiedName: string, value: string): void {\n throw new Error(\"Method not implemented.\");\n }\n setAttributeNS(namespace: string | null, qualifiedName: string, value: string): void {\n throw new Error(\"Method not implemented.\");\n }\n setAttributeNode(attr: Attr): Attr | null {\n throw new Error(\"Method not implemented.\");\n }\n setAttributeNodeNS(attr: Attr): Attr | null {\n throw new Error(\"Method not implemented.\");\n }\n setHTMLUnsafe(html: string): void {\n throw new Error(\"Method not implemented.\");\n }\n setPointerCapture(pointerId: number): void {\n throw new Error(\"Method not implemented.\");\n }\n toggleAttribute(qualifiedName: string, force?: boolean): boolean {\n throw new Error(\"Method not implemented.\");\n }\n webkitMatchesSelector(selectors: string): boolean {\n throw new Error(\"Method not implemented.\");\n }\n baseURI!: string;\n childNodes!: NodeListOf;\n firstChild!: ChildNode | null;\n isConnected!: boolean;\n lastChild!: ChildNode | null;\n nextSibling!: ChildNode | null;\n nodeName!: string;\n nodeType!: number;\n nodeValue!: string | null;\n parentElement!: HTMLElement | null;\n parentNode!: ParentNode | null;\n previousSibling!: ChildNode | null;\n textContent!: string | null;\n appendChild(node: T): T {\n throw new Error(\"Method not implemented.\");\n }\n cloneNode(deep?: boolean): Node {\n throw new Error(\"Method not implemented.\");\n }\n compareDocumentPosition(other: Node): number {\n throw new Error(\"Method not implemented.\");\n }\n contains(other: Node | null): boolean {\n throw new Error(\"Method not implemented.\");\n }\n getRootNode(options?: GetRootNodeOptions): Node {\n throw new Error(\"Method not implemented.\");\n }\n hasChildNodes(): boolean {\n throw new Error(\"Method not implemented.\");\n }\n insertBefore(node: T, child: Node | null): T {\n throw new Error(\"Method not implemented.\");\n }\n isDefaultNamespace(namespace: string | null): boolean {\n throw new Error(\"Method not implemented.\");\n }\n isEqualNode(otherNode: Node | null): boolean {\n throw new Error(\"Method not implemented.\");\n }\n isSameNode(otherNode: Node | null): boolean {\n throw new Error(\"Method not implemented.\");\n }\n lookupNamespaceURI(prefix: string | null): string | null {\n throw new Error(\"Method not implemented.\");\n }\n lookupPrefix(namespace: string | null): string | null {\n throw new Error(\"Method not implemented.\");\n }\n normalize(): void {\n throw new Error(\"Method not implemented.\");\n }\n removeChild(child: T): T {\n throw new Error(\"Method not implemented.\");\n }\n replaceChild(node: Node, child: T): T {\n throw new Error(\"Method not implemented.\");\n }\n ELEMENT_NODE!: 1;\n ATTRIBUTE_NODE!: 2;\n TEXT_NODE!: 3;\n CDATA_SECTION_NODE!: 4;\n ENTITY_REFERENCE_NODE!: 5;\n ENTITY_NODE!: 6;\n PROCESSING_INSTRUCTION_NODE!: 7;\n COMMENT_NODE!: 8;\n DOCUMENT_NODE!: 9;\n DOCUMENT_TYPE_NODE!: 10;\n DOCUMENT_FRAGMENT_NODE!: 11;\n NOTATION_NODE!: 12;\n DOCUMENT_POSITION_DISCONNECTED!: 1;\n DOCUMENT_POSITION_PRECEDING!: 2;\n DOCUMENT_POSITION_FOLLOWING!: 4;\n DOCUMENT_POSITION_CONTAINS!: 8;\n DOCUMENT_POSITION_CONTAINED_BY!: 16;\n DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC!: 32;\n dispatchEvent(event: Event): boolean {\n throw new Error(\"Method not implemented.\");\n }\n ariaAtomic!: string | null;\n ariaAutoComplete!: string | null;\n ariaBrailleLabel!: string | null;\n ariaBrailleRoleDescription!: string | null;\n ariaBusy!: string | null;\n ariaChecked!: string | null;\n ariaColCount!: string | null;\n ariaColIndex!: string | null;\n ariaColSpan!: string | null;\n ariaCurrent!: string | null;\n ariaDescription!: string | null;\n ariaDisabled!: string | null;\n ariaExpanded!: string | null;\n ariaHasPopup!: string | null;\n ariaHidden!: string | null;\n ariaInvalid!: string | null;\n ariaKeyShortcuts!: string | null;\n ariaLabel!: string | null;\n ariaLevel!: string | null;\n ariaLive!: string | null;\n ariaModal!: string | null;\n ariaMultiLine!: string | null;\n ariaMultiSelectable!: string | null;\n ariaOrientation!: string | null;\n ariaPlaceholder!: string | null;\n ariaPosInSet!: string | null;\n ariaPressed!: string | null;\n ariaReadOnly!: string | null;\n ariaRequired!: string | null;\n ariaRoleDescription!: string | null;\n ariaRowCount!: string | null;\n ariaRowIndex!: string | null;\n ariaRowSpan!: string | null;\n ariaSelected!: string | null;\n ariaSetSize!: string | null;\n ariaSort!: string | null;\n ariaValueMax!: string | null;\n ariaValueMin!: string | null;\n ariaValueNow!: string | null;\n ariaValueText!: string | null;\n role!: string | null;\n animate(keyframes: Keyframe[] | PropertyIndexedKeyframes | null, options?: number | KeyframeAnimationOptions): Animation {\n throw new Error(\"Method not implemented.\");\n }\n getAnimations(options?: GetAnimationsOptions): Animation[] {\n throw new Error(\"Method not implemented.\");\n }\n after(...nodes: (Node | string)[]): void {\n throw new Error(\"Method not implemented.\");\n }\n before(...nodes: (Node | string)[]): void {\n throw new Error(\"Method not implemented.\");\n }\n remove(): void {\n throw new Error(\"Method not implemented.\");\n }\n replaceWith(...nodes: (Node | string)[]): void {\n throw new Error(\"Method not implemented.\");\n }\n nextElementSibling!: Element | null;\n previousElementSibling!: Element | null;\n childElementCount!: number;\n children!: HTMLCollection;\n firstElementChild!: Element | null;\n lastElementChild!: Element | null;\n \n append(...nodes: (Node | string)[]): void {\n throw new Error(\"Method not implemented.\");\n }\n \n prepend(...nodes: (Node | string)[]): void {\n throw new Error(\"Method not implemented.\");\n }\n \n querySelector(selectors: unknown): any {\n throw new Error(\"Method not implemented.\");\n }\n \n querySelectorAll(selectors: unknown): NodeListOf {\n throw new Error(\"Method not implemented.\");\n }\n replaceChildren(...nodes: (Node | string)[]): void {\n throw new Error(\"Method not implemented.\");\n }\n assignedSlot!: HTMLSlotElement | null;\n attributeStyleMap!: StylePropertyMap;\n style!: CSSStyleDeclaration;\n contentEditable!: string;\n enterKeyHint!: string;\n inputMode!: string;\n isContentEditable!: boolean;\n onabort!: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;\n onanimationcancel!: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;\n onanimationend!: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;\n onanimationiteration!: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;\n onanimationstart!: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;\n onauxclick!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n onbeforeinput!: ((this: GlobalEventHandlers, ev: InputEvent) => any) | null;\n onbeforetoggle!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onblur!: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;\n oncancel!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n oncanplay!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n oncanplaythrough!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onchange!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onclick!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n onclose!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n oncontextlost!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n oncontextmenu!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n oncontextrestored!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n oncopy!: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;\n oncuechange!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n oncut!: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;\n ondblclick!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n ondrag!: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;\n ondragend!: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;\n ondragenter!: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;\n ondragleave!: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;\n ondragover!: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;\n ondragstart!: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;\n ondrop!: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;\n ondurationchange!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onemptied!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onended!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onerror!: OnErrorEventHandler;\n onfocus!: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;\n onformdata!: ((this: GlobalEventHandlers, ev: FormDataEvent) => any) | null;\n ongotpointercapture!: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;\n oninput!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n oninvalid!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onkeydown!: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;\n onkeypress!: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;\n onkeyup!: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;\n onload!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onloadeddata!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onloadedmetadata!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onloadstart!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onlostpointercapture!: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;\n onmousedown!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n onmouseenter!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n onmouseleave!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n onmousemove!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n onmouseout!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n onmouseover!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n onmouseup!: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;\n onpaste!: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;\n onpause!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onplay!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onplaying!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onpointercancel!: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;\n onpointerdown!: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;\n onpointerenter!: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;\n onpointerleave!: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;\n onpointermove!: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;\n onpointerout!: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;\n onpointerover!: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;\n onpointerup!: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;\n onprogress!: ((this: GlobalEventHandlers, ev: ProgressEvent) => any) | null;\n onratechange!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onreset!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onresize!: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;\n onscroll!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onscrollend!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onsecuritypolicyviolation!: ((this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any) | null;\n onseeked!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onseeking!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onselect!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onselectionchange!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onselectstart!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onslotchange!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onstalled!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onsubmit!: ((this: GlobalEventHandlers, ev: SubmitEvent) => any) | null;\n onsuspend!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n ontimeupdate!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n ontoggle!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n ontouchcancel?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;\n ontouchend?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;\n ontouchmove?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;\n ontouchstart?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;\n ontransitioncancel!: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;\n ontransitionend!: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;\n ontransitionrun!: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;\n ontransitionstart!: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;\n onvolumechange!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onwaiting!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onwebkitanimationend!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onwebkitanimationiteration!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onwebkitanimationstart!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onwebkittransitionend!: ((this: GlobalEventHandlers, ev: Event) => any) | null;\n onwheel!: ((this: GlobalEventHandlers, ev: WheelEvent) => any) | null;\n autofocus!: boolean;\n dataset!: DOMStringMap;\n nonce?: string | undefined;\n tabIndex!: number;\n blur(): void {\n throw new Error(\"Method not implemented.\");\n }\n focus(options?: FocusOptions): void {\n throw new Error(\"Method not implemented.\");\n }\n\n}\n\nexport let _ComponentWidget_:CustomElementConstructor;\nif (isBrowser) {\n _ComponentWidget_ = class _ComponentWidget_ extends HTMLElement implements I_ComponentWidget_ {\n constructor() {\n super();\n const componentWidget = this;\n const componentName = componentWidget.nodeName.toLowerCase();\n const componentBody = _DOMCreateElement(\"quick-component\");\n const __enabled__atributes__ = componentWidget.getAttributeNames();\n componentBody.setAttribute(\"name\", componentName);\n \n if (!componentWidget.hasAttribute(\"shadowed\")) {\n componentBody.setAttribute(\"shadowed\", \"true\");\n }\n __enabled__atributes__.forEach( (attributeName) => {\n if (componentWidget.hasAttribute(attributeName)) {\n componentBody.setAttribute(attributeName, componentWidget?.getAttribute(attributeName) as any);\n componentWidget.removeAttribute(attributeName);\n }\n });\n const data_attributenames = componentWidget.getAttributeNames().filter(function (a) {\n return a.startsWith(\"data-\");\n }).map(function (a) {\n return a.split(\"-\")[1];\n });\n data_attributenames.forEach(function (_attribute_name_) {\n componentBody.setAttribute(\"data-\" + _attribute_name_, componentWidget?.getAttribute(\"data-\" + _attribute_name_) as any);\n componentWidget.removeAttribute(\"data-\" + _attribute_name_);\n });\n [...(componentWidget as any).children].forEach( (element) => {\n componentBody.appendChild(element.cloneNode(true));\n element.remove();\n });\n \n componentWidget.append(componentBody);\n }\n };\n \n} else {\n _ComponentWidget_ = class _ComponentWidget_ extends QCObjectsWidgetNode {\n constructor (){\n super();\n throw new Error (\"Class not implemented.\");\n }\n };\n}\nExport(_ComponentWidget_);\nexport const RegisterWidget = (widgetName: string):void => {\n if (isBrowser){\n customElements.define(widgetName, class extends _ComponentWidget_ { });\n } else {\n throw new Error (\"RegisterWidget is not implemented for non browser ecosystems yet.\");\n }\n};\nexport const RegisterWidgets = (...args: string[]):void =>{\n const widgetList = [...args];\n widgetList.filter(function (widgetName) {\n return typeof widgetName === \"string\";\n }).map(function (widgetName) {\n return RegisterWidget(widgetName);\n });\n};\n(_protected_code_)(RegisterWidget);\n(_protected_code_)(RegisterWidgets);\nExport(RegisterWidget);\nExport(RegisterWidgets);\n", "import { IController, IComponent, TControllerParams, IQCObjectsElement, IQCObjectsShadowedElement } from \"@types\";\nimport { ClassFactory } from \"./ClassFactory\";\nimport { __getType__ } from \"./getType\";\nimport { InheritClass } from \"./InheritClass\";\nimport { logger } from \"./Logger\";\nimport { New } from \"./New\";\nimport { Package } from \"./Package\";\nimport { isBrowser } from \"./platform\";\n\nexport class Controller extends InheritClass implements IController{\n\n component!: IComponent ;\n dependencies?: any[] = [];\n constructor({\n component,\n dependencies\n }: TControllerParams) {\n super({ component, dependencies });\n this.component = component;\n this.dependencies = dependencies;\n if (typeof this.component === \"undefined\" || this.component === null) {\n throw Error(`${__getType__(this)} must be called with a component`);\n }\n }\n\n // eslint-disable-next-line no-unused-vars\n fail?(...args: [...args: any[]] ): void {\n throw new Error(\"Method not implemented.\");\n }\n\n\n routingSelectedAttr(attrName: string):any {\n return this.component?.routingSelected.map( (r: any):any => {\n return r[attrName];\n }).filter(function (v: any) {\n return v;\n }).pop();\n }\n\n isTouchable():boolean {\n return (\"ontouchstart\" in window) ||\n ((navigator as any).MaxTouchPoints > 0) ||\n ((navigator as any).msMaxTouchPoints > 0);\n }\n\n onpress(subelementSelector: string, handler: Function):void {\n if (isBrowser){\n try {\n if (this.isTouchable()) {\n ((this.component?.componentRoot as IQCObjectsElement| IQCObjectsShadowedElement)?.subelements(subelementSelector) as any[])[0].addEventListener(\"touchstart\", handler, {\n passive: true\n });\n } else {\n ((this.component?.componentRoot as IQCObjectsElement | IQCObjectsShadowedElement)?.subelements(subelementSelector) as any[])[0].addEventListener(\"click\", handler, {\n passive: true\n });\n }\n } catch (e:any) {\n logger.debug(`An error ocurred: ${e}.`);\n logger.debug(\"No button to assign press event\");\n }\n \n }\n }\n\n createRoutingController():void {\n const controller = this;\n const component = controller.component;\n const controllerName = controller.routingSelectedAttr(\"controllerclass\");\n if (typeof controllerName !== \"undefined\") {\n const _Controller = ClassFactory(controllerName) as unknown as IController;\n if (typeof _Controller !== \"undefined\" && component !== null) {\n component.routingController = New(_Controller, {\n component\n }) as IController; // Initializes the main controller for the component\n if (typeof component.routingController !== \"undefined\" \n && Object.hasOwn(component.routingController, \"done\") \n && typeof component.routingController.done === \"function\") {\n component.routingController.done.call(component.routingController);\n }\n }\n }\n }\n\n done():void { }\n}\n\nPackage(\"com.qcobjects.controllers\", [\n Controller\n]);\n", "import { __getType__ } from \"./getType\";\nimport { InheritClass } from \"./InheritClass\";\nimport { Package } from \"./Package\";\nimport { TViewParams } from \"@types\";\n\nexport class View extends InheritClass {\n constructor({ component = undefined, dependencies = [] }:TViewParams) {\n super({component, dependencies});\n if (typeof this.component === \"undefined\" || this.component === \"null\") {\n throw Error(`${__getType__(this)} must be called with a component`);\n }\n\n }\n }\n\nPackage(\"com.qcobjects.views\", [\n View\n]);", "import { InheritClass } from \"./InheritClass\";\nimport { Package } from \"./Package\";\n\nexport class VO extends InheritClass {}\n\nPackage(\"com.qcobjects.valueObjects\", [\n VO\n ]);", "import { IEffect, TEffectParams } from \"@types\";\nimport { InheritClass } from \"./InheritClass\";\nimport { Package } from \"./Package\";\nimport { _methods_, _protected_code_ } from \"./introspection\";\nimport { ClassFactory } from \"./ClassFactory\";\n\nclass Effect extends InheritClass implements IEffect {\n // eslint-disable-next-line no-unused-vars\n done(...args: any[]): any {\n throw new Error(\"Method not implemented.\");\n };\n // eslint-disable-next-line no-unused-vars\n apply(...args: any[]): void {\n throw new Error(\"Method not implemented.\");\n }\n duration = 1000;\n\n\n animate({\n timing,\n draw,\n duration\n }: TEffectParams): void {\n const _self: this = this;\n\n const start = performance.now();\n\n requestAnimationFrame(function animate(time) {\n // timeFraction goes from 0 to 1\n let timeFraction = (time - start) / duration;\n if (timeFraction > 1) timeFraction = 1;\n\n // calculate the current animation state\n const progress = timing(timeFraction);\n\n draw(Math.round(progress * 100)); // draw it\n\n if (timeFraction < 1) {\n requestAnimationFrame(animate);\n } else {\n // if this is an object with a done method\n if (typeof _self !== \"undefined\" &&\n _self !== null &&\n Object.hasOwn(_self, \"done\") &&\n (typeof _self.done).toLowerCase() === \"function\") {\n _self.done.call(_self);\n }\n }\n\n });\n }\n\n}\n\n\nPackage(\"com.qcobjects.effects.base\", [\n Effect\n]);\n\n(_methods_)(ClassFactory(\"Effect\")).map((__c__): any => {\n (_protected_code_)(__c__);\n return __c__;\n});\n\nexport { Effect };", "import { Effect } from \"./Effect\";\nimport { logger } from \"./Logger\";\nimport { Package } from \"./Package\";\nimport { ClassFactory } from \"./ClassFactory\";\nimport { IQCObjectsElement, IQCObjectsShadowedElement } from \"@types\";\nimport { ITransitionEffect, IComponent, TTransitionEffectParams } from \"@types\";\n\nexport class TransitionEffect extends Effect implements ITransitionEffect{\n duration = 385;\n defaultParams = {\n alphaFrom: 0,\n alphaTo: 1,\n angleFrom: 180,\n angleTo: 0,\n radiusFrom: 0,\n radiusTo: 30,\n scaleFrom: 0,\n scaleTo: 1\n };\n\n fitToHeight = false;\n fitToWidth = false;\n\n component!: IComponent;\n effects!: string[];\n\n apply({\n alphaFrom,\n alphaTo,\n angleFrom,\n angleTo,\n radiusFrom,\n radiusTo,\n scaleFrom,\n scaleTo\n }: TTransitionEffectParams):void {\n const _transition_ = this;\n logger.info(\"EXECUTING TransitionEffect \");\n const componentRoot =_transition_.component.componentRoot as IQCObjectsElement | IQCObjectsShadowedElement | HTMLElement | ShadowRoot;\n\n if (typeof componentRoot !== \"undefined\" && componentRoot !== null){\n if (_transition_.fitToHeight) {\n (componentRoot as any).height = (typeof (componentRoot as HTMLElement).offsetParent === \"object\" && (componentRoot as HTMLElement).offsetParent !== null) ? ((componentRoot as HTMLElement).offsetParent?.scrollHeight) : ((componentRoot as HTMLElement).getBoundingClientRect().height);\n }\n if (_transition_.fitToWidth) {\n (componentRoot as any).width = (typeof (componentRoot as HTMLElement).offsetParent === \"object\" && (componentRoot as HTMLElement).offsetParent !== null) ? ((componentRoot as HTMLElement).offsetParent?.scrollWidth) : ((componentRoot as HTMLElement).getBoundingClientRect().width);\n }\n if (_transition_.component.shadowed){\n ((componentRoot as ShadowRoot).host as HTMLElement).style.display = \"block\";\n } else {\n (componentRoot as HTMLElement).style.display = \"block\";\n }\n _transition_.effects.map( (effectClassName:string):string => {\n\n const __effectClass__ = ClassFactory(effectClassName) as unknown as typeof Effect;\n const effectObj = new __effectClass__({});\n const effectClassMethod = effectObj.apply.bind(_transition_);\n const componentHost = (_transition_.component.shadowed)? ((componentRoot as ShadowRoot).host) : (componentRoot);\n const effectParams = {\n alphaFrom,\n alphaTo,\n angleFrom,\n angleTo,\n radiusFrom,\n radiusTo,\n scaleFrom,\n scaleTo\n }; \n effectClassMethod(componentHost,...Object.values(effectParams));\n return effectClassName;\n });\n \n }\n\n }\n\n}\n\nPackage(\"com.qcobjects.effects.transitions.base\", [\n TransitionEffect\n]);\n", "import { ITimer, TTimerParams } from \"@types\";\nimport { InheritClass } from \"./InheritClass\";\nimport { Package } from \"./Package\";\n\nexport class Timer extends InheritClass implements ITimer {\n\n\n duration = 1000;\n alive = true;\n thread({\n timing,\n intervalInterceptor,\n duration\n }:TTimerParams):void {\n const timer = this;\n\n const start = performance.now();\n\n requestAnimationFrame(function thread(time) {\n // timeFraction goes from 0 to 1\n const elapsed = (time - start);\n let timeFraction = elapsed / duration;\n if (timeFraction > 1) timeFraction = 1;\n\n // calculate the current progress state\n const progress = timing(timeFraction, elapsed);\n\n intervalInterceptor(Math.round(progress * 100)); // draw it\n\n if ((timeFraction < 1 || duration === -1) && timer.alive) {\n requestAnimationFrame(thread);\n }\n\n });\n }\n\n\n }\n\nPackage(\"com.qcobjects.timing\", [\n Timer\n ]);\n", "import { TDDOParams } from \"@types\";\nimport { Export } from \"./Export\";\nimport { InheritClass } from \"./InheritClass\";\nimport { logger } from \"./Logger\";\nimport { ObjectName } from \"./ObjectName\";\n\n/**\n * Dynamic Data Objects Class\n * Usage:\n * Class('TestDDO',{\n * data: {},\n * _new_ (){\n * this.ddo = New(DDO,{\n * instance:this,\n * name:'data',\n * value:{},\n * fget (value){\n * logger.debug('returned value '+ value );\n * }\n * })\n * }\n * });\n *\n */\nexport class DDO extends InheritClass {\n constructor({\n instance,\n name,\n fget,\n fset,\n value\n }:TDDOParams) {\n super({\n instance,\n name,\n fget,\n fset,\n value\n });\n this._new_({\n instance,\n name,\n fget,\n fset,\n value\n });\n\n }\n\n _new_({\n instance,\n name,\n fget,\n fset\n }:TDDOParams):void {\n const ddoInstance = this;\n var name = (typeof name === \"undefined\") ? (ObjectName(ddoInstance)) : (name);\n\n Object.defineProperty(instance, name, {\n set(val) {\n const _value = val;\n logger.debug(\"value changed \" + name);\n let ret;\n if (typeof fset !== \"undefined\" && typeof fset === \"function\") {\n ret = fset(_value);\n } else {\n ret = _value;\n }\n instance[\"_\" + name] = ret;\n \n },\n get():any {\n const _value = instance[\"_\" + name];\n logger.debug(\"returning value \" + name);\n const is_ddo = (v:any):any => {\n if (typeof v === \"object\" && Object.hasOwn(v, \"value\")) {\n return v.value;\n }\n return v;\n };\n let ret;\n if (typeof fget !== \"undefined\" && typeof fget === \"function\") {\n ret = fget(is_ddo(_value));\n } else {\n ret = is_ddo(_value);\n }\n return ret;\n }\n });\n }\n\n}\nExport(DDO);\n", "import { InheritClass } from \"./InheritClass\";\nimport { logger } from \"./Logger\";\nimport { Package } from \"./Package\";\nexport class Toggle extends InheritClass {\n _toggle = false;\n _inverse = true;\n _positive:Function|null = null;\n _negative:Function|null = null;\n _dispatched:Function|null = null;\n _args = {};\n\n constructor(positive: Function, negative: Function, args: Array) {\n super({positive, negative, args});\n this._new_({positive, negative, args});\n }\n\n changeToggle():void {\n this._toggle = !(this._toggle);\n }\n\n _new_({\n positive,\n negative,\n args\n }:{positive: Function, negative: Function, args: Array}):void {\n this._positive = positive;\n this._negative = negative;\n this._args = args;\n }\n\n fire():Promise {\n const toggle = this;\n var _promise = new Promise(function (resolve, reject) {\n\n if (typeof toggle._positive === \"function\" && typeof toggle._negative === \"function\") {\n if (toggle._inverse) {\n toggle._dispatched = (toggle._toggle) ? (toggle._negative.bind(toggle)) : (toggle._positive.bind(toggle));\n } else {\n toggle._dispatched = (toggle._toggle) ? (toggle._positive.bind(toggle)) : (toggle._negative.bind(toggle));\n }\n toggle._dispatched?.call(toggle, toggle._args);\n resolve.call(_promise, toggle);\n } else {\n logger.debug(\"Toggle functions are not declared\");\n reject.call(_promise, toggle as Toggle);\n }\n return toggle;\n }).then(function (toggle:Toggle) {\n toggle.changeToggle();\n return toggle;\n }).catch(function (e) {\n logger.debug(e.toString());\n return toggle;\n }).finally(()=> {\n return toggle;\n });\n return _promise;\n }\n\n\n}\n\nPackage(\"com.qcobjects.tools.essentials\", [\n Toggle\n]);\n", "export const getDocumentLayout = function ():string|undefined {\n const h = (w:number, h:number) => {\n return w > h ? \"landscape\" : null;\n };\n const v = (w:number, h:number) => {\n return h > w ? \"portrait\" : null;\n };\n const square = (w:number, h:number) => {\n return w === h ? \"square\" : null;\n };\n return [\n h(document.documentElement.clientWidth, document.documentElement.clientHeight),\n v(document.documentElement.clientWidth, document.documentElement.clientHeight),\n square(document.documentElement.clientWidth, document.documentElement.clientHeight)\n ].filter(e => e !== null).pop();\n };\n", "import * as QCObjects from \"./qcobjects.js\";\nexport default QCObjects;\n"], "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAa;AAAb;AAAA;AAAA;AAAO,IAAM,mBAAmB,wBAAC,QAAsB;AACrD,aAAO,CAAC,EAAG,OAAO,QAAQ,cAAc,IAAI,SAAS,EAAE,WAAW,OAAO;AAAA,IAC3E,GAFgC;AAAA;AAAA;;;ACAhC,IAKa;AALb;AAAA;AAAA;AAKO,IAAM,aAAa,wBAAC,MAAkB;AAC3C,UAAI,MAAM;AACV,UAAI,OAAO,MAAM,cAAc,OAAO,OAAO,GAAG,MAAM,KAAK,EAAE,SAAS,IAAI;AACxE,cAAM,EAAE;AAAA,MACV,WAAW,OAAO,MAAM,eAAe,OAAO,EAAE,gBAAgB,cAAc,EAAE,YAAY,SAAS,IAAI;AACvG,cAAM,EAAE,YAAY;AAAA,MACtB,WAAW,OAAO,MAAM,eAAe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D,UAAM,IAAI,MAAM,yBAAyB;AAAA,EAC3C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA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,SAAS,CAAC;AACzB,aAAO;AAAA,IACT,CAAC,EAAE,QAAQ,MAAK;AACd,aAAO;AAAA,IACT,CAAC;AACD,WAAO;AAAA,EACT;AAGF;AAEA,QAAQ,kCAAkC;AAAA,EACxC;AACF,CAAC;;;Af+BD;;;AgB/FO,IAAM,oBAAoB,kCAA6B;AAC1D,QAAM,IAAI,wBAAC,GAAUC,OAAa;AAChC,WAAO,IAAIA,KAAI,cAAc;AAAA,EAC/B,GAFU;AAGV,QAAM,IAAI,wBAAC,GAAUA,OAAa;AAChC,WAAOA,KAAI,IAAI,aAAa;AAAA,EAC9B,GAFU;AAGV,QAAM,SAAS,wBAAC,GAAUA,OAAa;AACrC,WAAO,MAAMA,KAAI,WAAW;AAAA,EAC9B,GAFe;AAGf,SAAO;AAAA,IACL,EAAE,SAAS,gBAAgB,aAAa,SAAS,gBAAgB,YAAY;AAAA,IAC7E,EAAE,SAAS,gBAAgB,aAAa,SAAS,gBAAgB,YAAY;AAAA,IAC7E,OAAO,SAAS,gBAAgB,aAAa,SAAS,gBAAgB,YAAY;AAAA,EACpF,EAAE,OAAO,OAAK,MAAM,IAAI,EAAE,IAAI;AAChC,GAf+B;;;AhBkGjC;AACA;AACA;AACA;;;AiBpGA,IAAO,gBAAQ;", "names": ["__getType__", "name", "name", "self", "self", "process", "callback", "args", "service", "URL", "req", "component", "is_file", "_ret_", "self", "e", "_component_", "_component", "standardResponse", "observer", "newComponent", "_top", "_top", "ready", "self", "shortCode", "func", "exp", "subelements", "_top", "_self", "content", "self", "isBrowser", "requestMethod", "supportedMethods", "context", "context", "_Controller", "toggle", "h"] } diff --git a/public/types/index.d.ts b/public/types/index.d.ts index 25cd60f0..a16ed435 100644 --- a/public/types/index.d.ts +++ b/public/types/index.d.ts @@ -60,7 +60,7 @@ declare module "Cast" { export const _CastProps: (obj_source: any, obj_dest: any, _ignoreError?: boolean) => any; } declare module "DOMCreateElement" { - import { IQCObjectsElement } from "./types/global"; + import { IQCObjectsElement } from "@types"; export const _DOMCreateElement: (elementName: string, props?: any[], children?: any) => IQCObjectsElement; export const _DOMCreateComplexElement: (_type: string | Function, props?: any[], children?: any) => HTMLElement | IQCObjectsElement; } @@ -85,7 +85,7 @@ declare module "Package" { export const Package: (namespace: string, classes?: any[]) => any[]; } declare module "InheritClass" { - import { type IInheritClass, type TBody } from "./types/global"; + import { type IInheritClass, type TBody } from "@types"; export class InheritClass implements IInheritClass { [key: string]: any; __definition: any; @@ -138,7 +138,7 @@ declare module "LegacyCopy" { export const _LegacyCopy: (obj: any, _ignore?: string[]) => any; } declare module "Class" { - import { TClass } from "./types/global"; + import { TClass } from "@types"; /** * Creates new object class of another object * @@ -199,7 +199,7 @@ declare module "secretKey" { export const _secretKey: string; } declare module "Crypt" { - import { _ICrypt } from "./types/global"; + import { _ICrypt } from "@types"; import { InheritClass } from "InheritClass"; export class _Crypt extends InheritClass implements _ICrypt { string: string; @@ -250,7 +250,7 @@ declare module "ConfigSettings" { } declare module "CONFIG" { import { InheritClass } from "InheritClass"; - import { ICONFIG } from "./types/global"; + import { ICONFIG } from "@types"; export class CONFIG extends InheritClass implements ICONFIG { get _CONFIG_ENC(): string; get _CONFIG(): unknown; @@ -263,7 +263,7 @@ declare module "CONFIG" { } } declare module "Processor" { - import { type IComponent, type IProcessor } from "./types/global"; + import { type IComponent, type IProcessor } from "@types"; import { InheritClass } from "InheritClass"; export class Processor extends InheritClass implements IProcessor { protected static _instance: IProcessor | undefined; @@ -282,13 +282,13 @@ declare module "Processor" { export const GlobalProcessor: IProcessor; } declare module "routings" { - import { TComponentRouting } from "./types/global"; + import { TComponentRouting } from "@types"; export const __routing_params__: (routing: TComponentRouting, routingPath: string) => object; export const __valid_routings__: (routings: TComponentRouting[], routingPath: string) => TComponentRouting[]; export const __valid_routing_way__: (validRoutingWays: string[], routingWay: string) => boolean; } declare module "asyncLoad" { - import { TAsyncLoadCallback } from "./types/global"; + import { TAsyncLoadCallback } from "@types"; export const _asyncLoad: any[]; export function asyncLoad(callback: TAsyncLoadCallback, args?: any[]): any; export const _fireAsyncLoad: () => void; @@ -310,7 +310,7 @@ declare module "ComplexStorageCache" { } } declare module "serviceLoader" { - import { IService } from "./types/global"; + import { IService } from "@types"; /** * Loads a simple component from a template * @@ -323,7 +323,7 @@ declare module "tag_filter" { export const _tag_filter_ = "quick-component:not([loaded]),component:not([loaded])"; } declare module "componentLoader" { - import { IComponent } from "./types/global"; + import { IComponent } from "@types"; /** * Loads a simple component from a template * @@ -334,7 +334,7 @@ declare module "componentLoader" { } declare module "Component" { import { InheritClass } from "InheritClass"; - import { IComponent, IController, IEffect, IProcessor, IQCObjectsElement, IQCObjectsShadowedElement, IView, TBody, TComponentDoneResponse, TComponentParams, TComponentRouting, TComponentRoutings } from "./types/global"; + import { IComponent, IController, IEffect, IProcessor, IQCObjectsElement, IQCObjectsShadowedElement, IView, TBody, TComponentDoneResponse, TComponentParams, TComponentRouting, TComponentRoutings } from "@types"; export class Component extends InheritClass implements IComponent { static shadowed: boolean | undefined; static cached: any; @@ -451,7 +451,7 @@ declare module "Component" { } } declare module "ComponentFactory" { - import { TComponentURIParams } from "./types/global"; + import { TComponentURIParams } from "@types"; import { Component } from "Component"; /** * Returns a standarized uri for a component @@ -467,7 +467,7 @@ declare module "ComponentFactory" { } declare module "Service" { import { InheritClass } from "InheritClass"; - import { IJSONService, IService, TServiceDoneResponse, TServiceStandardResponse } from "./types/global"; + import { IJSONService, IService, TServiceDoneResponse, TServiceStandardResponse } from "@types"; export class Service extends InheritClass implements IService { options: object; withCredentials: boolean; @@ -517,7 +517,7 @@ declare module "Service" { } } declare module "globalSettings" { - import { IGlobalSettings } from "./types/global"; + import { IGlobalSettings } from "@types"; import { InheritClass } from "InheritClass"; import { Logger } from "Logger"; export class GlobalSettings extends InheritClass implements IGlobalSettings { @@ -535,7 +535,7 @@ declare module "globalSettings" { } } declare module "top" { - import { IComplexStorageCache, IComponent, IConfigService } from "./types/global"; + import { IComplexStorageCache, IComponent, IConfigService } from "@types"; type QCObjects = { lastCache?: IComplexStorageCache; componentsStack: IComponent[]; @@ -633,7 +633,7 @@ declare module "make_global" { export const __make_global__: (f: any) => void; } declare module "PrimaryCollections" { - import { T_QC_CLASSES, T_QC_PACKAGES } from "./types/global"; + import { T_QC_CLASSES, T_QC_PACKAGES } from "@types"; export var _QC_CLASSES: T_QC_CLASSES; export var _QC_PACKAGES: T_QC_PACKAGES; export var _QC_PACKAGES_IMPORTED: any[]; @@ -647,14 +647,14 @@ declare module "PrimaryCollections" { export const set_QC_PACKAGE: (packageName: string, _qc_packages: any[]) => void; } declare module "ClassFactory" { - import { TClassFactory } from "./types/global"; + import { TClassFactory } from "@types"; export const ClassFactory: TClassFactory; } declare module "mathFunctions" { export const __to_number: (value: any) => number; } declare module "ArrayCollection" { - import { IArrayCollection, IArrayList } from "./types/global"; + import { IArrayCollection, IArrayList } from "@types"; export class ArrayList extends Array implements IArrayList { prototype: any; unique(): any[]; @@ -680,7 +680,7 @@ declare module "BackendMicroservice" { import { Http2Stream } from "http2"; import { Stream } from "stream"; import { InheritClass } from "InheritClass"; - import { IMicroservice } from "./types/global"; + import { IMicroservice } from "@types"; export class BackendMicroservice extends InheritClass { stream: any; route: any; @@ -702,7 +702,7 @@ declare module "BackendMicroservice" { } } declare module "Controller" { - import { IController, IComponent, TControllerParams } from "./types/global"; + import { IController, IComponent, TControllerParams } from "@types"; import { InheritClass } from "InheritClass"; export class Controller extends InheritClass implements IController { component: IComponent; @@ -717,7 +717,7 @@ declare module "Controller" { } } declare module "DDO" { - import { TDDOParams } from "./types/global"; + import { TDDOParams } from "@types"; import { InheritClass } from "InheritClass"; /** * Dynamic Data Objects Class @@ -746,7 +746,7 @@ declare module "RegisterClass" { export const RegisterClass: (_class_: any, __namespace?: string) => any; } declare module "DefaultTemplateHandler" { - import { DefaultTemplateHandlerParams, IComponent } from "./types/global"; + import { DefaultTemplateHandlerParams, IComponent } from "@types"; export class DefaultTemplateHandler { template: string; __definition: {}; @@ -760,7 +760,7 @@ declare module "DocumentLayout" { export const getDocumentLayout: () => string | undefined; } declare module "Effect" { - import { IEffect, TEffectParams } from "./types/global"; + import { IEffect, TEffectParams } from "@types"; import { InheritClass } from "InheritClass"; class Effect extends InheritClass implements IEffect { done(...args: any[]): any; @@ -821,7 +821,7 @@ declare module "Ready" { export const _Ready: (e: any) => void; } declare module "Tag" { - import { ITagElements } from "./types/global"; + import { ITagElements } from "@types"; import { ArrayList } from "ArrayCollection"; export class TagElements extends ArrayList implements ITagElements { show(): void; @@ -864,7 +864,7 @@ declare module "loadSDK" { } declare module "MainProcess" { } declare module "SourceCSS" { - import { ISourceCSS } from "./types/global"; + import { ISourceCSS } from "@types"; import { InheritClass } from "InheritClass"; export class SourceCSS extends InheritClass implements ISourceCSS { domain: string; @@ -883,7 +883,7 @@ declare module "SourceCSS" { } } declare module "SourceJS" { - import { ISourceJS } from "./types/global"; + import { ISourceJS } from "@types"; import { InheritClass } from "InheritClass"; export class SourceJS extends InheritClass implements ISourceJS { domain: string; @@ -906,7 +906,7 @@ declare module "SourceJS" { } } declare module "Timer" { - import { ITimer, TTimerParams } from "./types/global"; + import { ITimer, TTimerParams } from "@types"; import { InheritClass } from "InheritClass"; export class Timer extends InheritClass implements ITimer { duration: number; @@ -935,7 +935,7 @@ declare module "Toggle" { } declare module "TransitionEffect" { import { Effect } from "Effect"; - import { ITransitionEffect, IComponent, TTransitionEffectParams } from "./types/global"; + import { ITransitionEffect, IComponent, TTransitionEffectParams } from "@types"; export class TransitionEffect extends Effect implements ITransitionEffect { duration: number; defaultParams: { @@ -962,7 +962,7 @@ declare module "VO" { } declare module "View" { import { InheritClass } from "InheritClass"; - import { TViewParams } from "./types/global"; + import { TViewParams } from "@types"; export class View extends InheritClass { constructor({ component, dependencies }: TViewParams); } @@ -1040,7 +1040,7 @@ declare module "qcobjects" { export { Toggle } from "Toggle"; export { findPackageNodePath } from "findPackageNodePath"; export { getDocumentLayout } from "DocumentLayout"; - export { IQCObjectsElement, IQCObjectsShadowedElement } from "./types/global"; + export { IQCObjectsElement, IQCObjectsShadowedElement } from "@types"; export { __to_number } from "mathFunctions"; export { _top as global } from "top"; export { __make_global__ } from "make_global"; diff --git a/public/types/index.d.ts.map b/public/types/index.d.ts.map index e1752072..3231bbf0 100644 --- a/public/types/index.d.ts.map +++ b/public/types/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/is_raw_class.ts","../../src/ObjectName.ts","../../src/getType.ts","../../src/Export.ts","../../src/_import_.ts","../../src/platform.ts","../../src/Logger.ts","../../src/Cast.ts","../../src/DOMCreateElement.ts","../../src/IncrementInstanceID.ts","../../src/introspection.ts","../../src/Package.ts","../../src/InheritClass.ts","../../src/isQCObjects.ts","../../src/is_a.ts","../../src/is_forbidden_name.ts","../../src/LegacyCopy.ts","../../src/Class.ts","../../src/Base64.ts","../../src/basePath.ts","../../src/DataStringify.ts","../../src/domain.ts","../../src/New.ts","../../src/secretKey.ts","../../src/Crypt.ts","../../src/ConfigSettings.ts","../../src/CONFIG.ts","../../src/Processor.ts","../../src/routings.ts","../../src/asyncLoad.ts","../../src/ComplexStorageCache.ts","../../src/serviceLoader.ts","../../src/tag_filter.ts","../../src/componentLoader.ts","../../src/Component.ts","../../src/ComponentFactory.ts","../../src/Service.ts","../../src/globalSettings.ts","../../src/top.ts","../../src/make_global.ts","../../src/PrimaryCollections.ts","../../src/ClassFactory.ts","../../src/mathFunctions.ts","../../src/ArrayCollection.ts","../../src/BackendMicroservice.ts","../../src/Controller.ts","../../src/DDO.ts","../../src/RegisterClass.ts","../../src/DefaultTemplateHandler.ts","../../src/DocumentLayout.ts","../../src/Effect.ts","../../src/findPackageNodePath.ts","../../src/Import.ts","../../src/captureFalseTouch.ts","../../src/range.ts","../../src/defaultProcessors.ts","../../src/NamespaceRef.ts","../../src/Ready.ts","../../src/Tag.ts","../../src/shortCode.ts","../../src/super.ts","../../src/waitUntil.ts","../../src/subelements.ts","../../src/loadSDK.ts","../../src/MainProcess.ts","../../src/SourceCSS.ts","../../src/SourceJS.ts","../../src/Timer.ts","../../src/Toggle.ts","../../src/TransitionEffect.ts","../../src/VO.ts","../../src/View.ts","../../src/WidgetsFactory.ts","../../src/assign.ts","../../src/qcobjects.ts","../../src/index.ts","../../src/localStorage.ts","../../src/uniqueID.ts"],"names":[],"mappings":";IAAA,MAAM,CAAC,MAAM,gBAAgB,QAAS,GAAG,KAAG,OAE3C,CAAC;;;ICFF;;;;OAIG;IACH,MAAM,CAAC,MAAM,UAAU,MAAO,GAAG,KAAE,MAUlC,CAAC;;;ICZF;;;;OAIG;IACH,MAAM,CAAC,MAAM,WAAW,QAA6B,GAAG,KAAG,GA0B1D,CAAC;;;IChCF,MAAM,CAAC,MAAM,MAAM,MAAgB,GAAG,KAAE,IAEvC,CAAC;;;ICFF,SAAe,QAAQ,CAAC,IAAI,EAAC,MAAM,GAAE,OAAO,CAAC,GAAG,CAAC,CAsB9C;IAEH,OAAO,EAAC,QAAQ,EAAC,CAAC;;;ICvBlB,MAAM,CAAC,MAAM,MAAM,EAAC,OAA6D,CAAC;IAClF,MAAM,CAAC,MAAM,SAAS,EAAC,OAAoH,CAAC;IAC5I,MAAM,CAAC,MAAM,cAAc,EAAC,OAAyC,CAAC;IAEtE,MAAM,CAAC,MAAM,YAAY,SAAS,MAAM,KAAE,IAAoC,CAAC;IAC/E,MAAM,CAAC,MAAM,SAAS,SAAS,MAAM,KAAE,GAsBtC,CAAC;IAGF,MAAM,CAAC,MAAM,WAAW,EAAC,OAItB,CAAC;;;IClCJ,MAAM,OAAO,MAAM;QACf,YAAY,UAAQ;QACpB,WAAW,UAAQ;QACnB,WAAW,UAAQ;QACnB,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;QAM5B,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;QAY3B,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;KAK9B;IAED,MAAM,CAAC,MAAM,MAAM,EAAE,MAAqB,CAAC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BAAgB,EAAE,yBAA2B;IACtD,OAAO,EAAE,KAAK,EAAE,cAAgB;IAChC,OAAO,EAAE,YAAY,EAAE,mBAAqB;IAC5C,OAAO,EAAE,KAAK,EAAE,cAAgB;IAChC,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,wBAA0B;IAC/D,OAAO,EAAE,GAAG,EAAE,YAAc;IAC5B,OAAO,EAAE,MAAM,EAAE,eAAiB;IAClC,OAAO,EAAE,mBAAmB,EAAE,4BAA8B;IAC5D,OAAO,EAAE,iBAAiB,EAAE,uBAAyB;IACrD,OAAO,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;IAC9E,OAAO,EAAE,WAAW,EAAE,sBAAwB;IAC9C,OAAO,EAAC,IAAI,IAAI,MAAM,EAAC,YAAc;IACrC,OAAO,EAAC,eAAe,EAAC,oBAAsB;IAC9C,OAAO,EAAC,GAAG,EAAE,GAAG,EAAC,YAAc;;;ICrG/B,OAAO,KAAK,SAAS,kBAAoB;IACzC,eAAe,SAAS,CAAC;;;ICDzB,MAAM,CAAC,IAAI,YAAY,EAAC,GAAyB,CAAC;;;ICElD,MAAM,CAAC,MAAM,QAAQ,EAAC,QAAoB,CAAC"} \ No newline at end of file +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/is_raw_class.ts","../../src/ObjectName.ts","../../src/getType.ts","../../src/Export.ts","../../src/_import_.ts","../../src/platform.ts","../../src/Logger.ts","../../src/Cast.ts","../../src/DOMCreateElement.ts","../../src/IncrementInstanceID.ts","../../src/introspection.ts","../../src/Package.ts","../../src/InheritClass.ts","../../src/isQCObjects.ts","../../src/is_a.ts","../../src/is_forbidden_name.ts","../../src/LegacyCopy.ts","../../src/Class.ts","../../src/Base64.ts","../../src/basePath.ts","../../src/DataStringify.ts","../../src/domain.ts","../../src/New.ts","../../src/secretKey.ts","../../src/Crypt.ts","../../src/ConfigSettings.ts","../../src/CONFIG.ts","../../src/Processor.ts","../../src/routings.ts","../../src/asyncLoad.ts","../../src/ComplexStorageCache.ts","../../src/serviceLoader.ts","../../src/tag_filter.ts","../../src/componentLoader.ts","../../src/Component.ts","../../src/ComponentFactory.ts","../../src/Service.ts","../../src/globalSettings.ts","../../src/top.ts","../../src/make_global.ts","../../src/PrimaryCollections.ts","../../src/ClassFactory.ts","../../src/mathFunctions.ts","../../src/ArrayCollection.ts","../../src/BackendMicroservice.ts","../../src/Controller.ts","../../src/DDO.ts","../../src/RegisterClass.ts","../../src/DefaultTemplateHandler.ts","../../src/DocumentLayout.ts","../../src/Effect.ts","../../src/findPackageNodePath.ts","../../src/Import.ts","../../src/captureFalseTouch.ts","../../src/range.ts","../../src/defaultProcessors.ts","../../src/NamespaceRef.ts","../../src/Ready.ts","../../src/Tag.ts","../../src/shortCode.ts","../../src/super.ts","../../src/waitUntil.ts","../../src/subelements.ts","../../src/loadSDK.ts","../../src/MainProcess.ts","../../src/SourceCSS.ts","../../src/SourceJS.ts","../../src/Timer.ts","../../src/Toggle.ts","../../src/TransitionEffect.ts","../../src/VO.ts","../../src/View.ts","../../src/WidgetsFactory.ts","../../src/assign.ts","../../src/qcobjects.ts","../../src/index.ts","../../src/localStorage.ts","../../src/uniqueID.ts"],"names":[],"mappings":";IAAA,MAAM,CAAC,MAAM,gBAAgB,QAAS,GAAG,KAAG,OAE3C,CAAC;;;ICFF;;;;OAIG;IACH,MAAM,CAAC,MAAM,UAAU,MAAO,GAAG,KAAE,MAUlC,CAAC;;;ICZF;;;;OAIG;IACH,MAAM,CAAC,MAAM,WAAW,QAA6B,GAAG,KAAG,GA0B1D,CAAC;;;IChCF,MAAM,CAAC,MAAM,MAAM,MAAgB,GAAG,KAAE,IAEvC,CAAC;;;ICFF,SAAe,QAAQ,CAAC,IAAI,EAAC,MAAM,GAAE,OAAO,CAAC,GAAG,CAAC,CAsB9C;IAEH,OAAO,EAAC,QAAQ,EAAC,CAAC;;;ICvBlB,MAAM,CAAC,MAAM,MAAM,EAAC,OAA6D,CAAC;IAClF,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AM,CAAC,MAAM,QAAQ,EAAC,QAAoB,CAAC"} \ No newline at end of file diff --git a/spec/testsClassFactorySpec.ts b/spec/testsClassFactorySpec.ts index 63d7a97a..7ddc0b41 100644 --- a/spec/testsClassFactorySpec.ts +++ b/spec/testsClassFactorySpec.ts @@ -1,6 +1,6 @@ #!/usr/bin/env node /* eslint-disable no-undef */ -import {Class, ClassFactory, logger, Package, __make_global__, _top, _QC_PACKAGES, _QC_CLASSES, global} from "../src/qcobjects"; +import {Class, ClassFactory, logger, Package, __make_global__, _top, _QC_PACKAGES, _QC_CLASSES, global} from "qcobjects"; describe("qcobjects", function () { logger.debugEnabled=true; diff --git a/spec/testsConfigSpec.ts b/spec/testsConfigSpec.ts index aa7d4825..297350b9 100644 --- a/spec/testsConfigSpec.ts +++ b/spec/testsConfigSpec.ts @@ -1,6 +1,6 @@ #!/usr/bin/env node /* eslint-disable no-undef */ -import {CONFIG, logger} from "../src/qcobjects"; +import {CONFIG, logger} from "qcobjects"; describe("qcobjects", function () { logger.debugEnabled=true; diff --git a/spec/testsGlobalFeaturesSpec.ts b/spec/testsGlobalFeaturesSpec.ts index 9c45e578..ebf9bfdd 100644 --- a/spec/testsGlobalFeaturesSpec.ts +++ b/spec/testsGlobalFeaturesSpec.ts @@ -1,6 +1,6 @@ #!/usr/bin/env node -import { __getType__, logger, global } from "../src/qcobjects"; +import { __getType__, logger, global } from "qcobjects"; /* eslint-disable no-undef */ diff --git a/spec/testsSpec.ts b/spec/testsSpec.ts index bafdaf07..9488a475 100644 --- a/spec/testsSpec.ts +++ b/spec/testsSpec.ts @@ -1,6 +1,6 @@ #!/usr/bin/env node -import { _DataStringify, Class, ClassFactory, Component, CONFIG, Effect, logger, New, global, InheritClass, __getType__, _QC_CLASSES } from "../src/qcobjects"; +import { _DataStringify, Class, ClassFactory, Component, CONFIG, Effect, logger, New, global, InheritClass, __getType__, _QC_CLASSES } from "qcobjects"; /* eslint-disable no-undef */ diff --git a/spec/testsTypeSpec.ts b/spec/testsTypeSpec.ts index 08e9d7ee..29bffe1e 100644 --- a/spec/testsTypeSpec.ts +++ b/spec/testsTypeSpec.ts @@ -1,6 +1,6 @@ #!/usr/bin/env node -import { __getType__, Class, ClassFactory, logger } from "../src/qcobjects"; +import { __getType__, Class, ClassFactory, logger } from "qcobjects"; /* eslint-disable no-undef */ diff --git a/src/ArrayCollection.ts b/src/ArrayCollection.ts index 351732fc..519fbc08 100644 --- a/src/ArrayCollection.ts +++ b/src/ArrayCollection.ts @@ -1,4 +1,4 @@ -import { IArrayCollection, IArrayList } from "./types/global"; +import { IArrayCollection, IArrayList } from "@types"; import { ClassFactory } from "./ClassFactory"; import { logger } from "./Logger"; import { New } from "./New"; diff --git a/src/BackendMicroservice.ts b/src/BackendMicroservice.ts index 5197c5b1..39d60c08 100644 --- a/src/BackendMicroservice.ts +++ b/src/BackendMicroservice.ts @@ -6,7 +6,7 @@ import { _domain_ } from "./domain"; import { InheritClass } from "./InheritClass"; import { logger } from "./Logger"; import { Package } from "./Package"; -import { IMicroservice } from "./types/global"; +import { IMicroservice } from "@types"; export class BackendMicroservice extends InheritClass { stream: any; diff --git a/src/CONFIG.ts b/src/CONFIG.ts index efbaac8e..4283561e 100644 --- a/src/CONFIG.ts +++ b/src/CONFIG.ts @@ -7,7 +7,7 @@ import { GlobalProcessor as Processor } from "./Processor"; import { _secretKey } from "./secretKey"; import { Package } from "./Package"; import { InheritClass } from "./InheritClass"; -import { ICONFIG } from "./types/global"; +import { ICONFIG } from "@types"; import { ConfigSettings } from "./ConfigSettings"; diff --git a/src/Class.ts b/src/Class.ts index 20a53efd..2fd81504 100644 --- a/src/Class.ts +++ b/src/Class.ts @@ -9,7 +9,7 @@ import { __is__forbidden_name__ } from "./is_forbidden_name"; import { _LegacyCopy } from "./LegacyCopy"; import { logger } from "./Logger"; import { isBrowser } from "./platform"; -import { IQCObjectsElement, TBody, TClass } from "./types/global"; +import { IQCObjectsElement, TBody, TClass } from "@types"; import { InheritClass } from "./InheritClass"; import { _top } from "./top"; diff --git a/src/ClassFactory.ts b/src/ClassFactory.ts index 88693d7e..9c929612 100644 --- a/src/ClassFactory.ts +++ b/src/ClassFactory.ts @@ -6,7 +6,7 @@ import { __is_raw_class__ } from "./is_raw_class"; import { _QC_CLASSES, _QC_PACKAGES, get_QC_CLASS } from "./PrimaryCollections"; -import { TClassFactory } from "./types/global"; +import { TClassFactory } from "@types"; export const ClassFactory:TClassFactory = (className:string):any => { let _classFactory; diff --git a/src/Component.ts b/src/Component.ts index 20a63dd5..ad2f61cc 100644 --- a/src/Component.ts +++ b/src/Component.ts @@ -22,7 +22,7 @@ import { CONFIG } from "./CONFIG"; import { serviceLoader } from "./serviceLoader"; import { _tag_filter_ } from "./tag_filter"; import { componentLoader } from "./componentLoader"; -import { IComponent, IController, IEffect, IProcessor, IQCObjectsElement, IQCObjectsShadowedElement, IView, TBody, TComponentDoneResponse, TComponentParams, TComponentRouting, TComponentRoutings } from "./types/global"; +import { IComponent, IController, IEffect, IProcessor, IQCObjectsElement, IQCObjectsShadowedElement, IView, TBody, TComponentDoneResponse, TComponentParams, TComponentRouting, TComponentRoutings } from "@types"; export class Component extends InheritClass implements IComponent { static shadowed: boolean | undefined = false; diff --git a/src/ComponentFactory.ts b/src/ComponentFactory.ts index 44ed12fb..33ab4409 100644 --- a/src/ComponentFactory.ts +++ b/src/ComponentFactory.ts @@ -1,4 +1,4 @@ -import { IQCObjectsElement, TComponentURIParams } from "./types/global"; +import { IQCObjectsElement, TComponentURIParams } from "@types"; import { Class } from "./Class"; import { ClassFactory } from "./ClassFactory"; import { Component } from "./Component"; diff --git a/src/Controller.ts b/src/Controller.ts index 20e02413..36c04d2f 100644 --- a/src/Controller.ts +++ b/src/Controller.ts @@ -1,4 +1,4 @@ -import { IController, IComponent, TControllerParams, IQCObjectsElement, IQCObjectsShadowedElement } from "./types/global"; +import { IController, IComponent, TControllerParams, IQCObjectsElement, IQCObjectsShadowedElement } from "@types"; import { ClassFactory } from "./ClassFactory"; import { __getType__ } from "./getType"; import { InheritClass } from "./InheritClass"; diff --git a/src/Crypt.ts b/src/Crypt.ts index 8399f469..7b8db8fa 100644 --- a/src/Crypt.ts +++ b/src/Crypt.ts @@ -1,4 +1,4 @@ -import { _ICrypt } from "./types/global"; +import { _ICrypt } from "@types"; import { Base64 } from "./Base64"; import { _DataStringify } from "./DataStringify"; import { InheritClass } from "./InheritClass"; diff --git a/src/DDO.ts b/src/DDO.ts index 93f97484..08a36233 100644 --- a/src/DDO.ts +++ b/src/DDO.ts @@ -1,4 +1,4 @@ -import { TDDOParams } from "./types/global"; +import { TDDOParams } from "@types"; import { Export } from "./Export"; import { InheritClass } from "./InheritClass"; import { logger } from "./Logger"; diff --git a/src/DOMCreateElement.ts b/src/DOMCreateElement.ts index 4ffaf855..634019a9 100644 --- a/src/DOMCreateElement.ts +++ b/src/DOMCreateElement.ts @@ -1,4 +1,4 @@ -import { IQCObjectsElement } from "./types/global"; +import { IQCObjectsElement } from "@types"; import { isBrowser } from "./platform"; export const _DOMCreateElement = function (elementName: string, props?: any[], children?: any): IQCObjectsElement { diff --git a/src/DefaultTemplateHandler.ts b/src/DefaultTemplateHandler.ts index 0d950b51..5f8ee218 100644 --- a/src/DefaultTemplateHandler.ts +++ b/src/DefaultTemplateHandler.ts @@ -1,4 +1,4 @@ -import { DefaultTemplateHandlerParams, IComponent } from "./types/global"; +import { DefaultTemplateHandlerParams, IComponent } from "@types"; import { logger } from "./Logger"; import { GlobalProcessor as Processor } from "./Processor"; import { RegisterClass } from "./RegisterClass"; diff --git a/src/Effect.ts b/src/Effect.ts index c8ca2335..a40ed298 100644 --- a/src/Effect.ts +++ b/src/Effect.ts @@ -1,4 +1,4 @@ -import { IEffect, TEffectParams } from "./types/global"; +import { IEffect, TEffectParams } from "@types"; import { InheritClass } from "./InheritClass"; import { Package } from "./Package"; import { _methods_, _protected_code_ } from "./introspection"; diff --git a/src/InheritClass.ts b/src/InheritClass.ts index f7f0b47a..25136bcf 100644 --- a/src/InheritClass.ts +++ b/src/InheritClass.ts @@ -1,4 +1,4 @@ -import { type IInheritClass, type IQCObjectsElement, type TBody } from "./types/global"; +import { type IInheritClass, type IQCObjectsElement, type TBody } from "@types"; import { logger } from "./Logger"; import { __instanceID, IncrementInstanceID } from "./IncrementInstanceID"; import { _CastProps, _Cast } from "./Cast"; diff --git a/src/MainProcess.ts b/src/MainProcess.ts index 4f1d0dcd..90bdfe3e 100644 --- a/src/MainProcess.ts +++ b/src/MainProcess.ts @@ -1,4 +1,4 @@ -import { IQCObjectsElement, IQCObjectsShadowedElement } from "./types/global"; +import { IQCObjectsElement, IQCObjectsShadowedElement } from "@types"; import { _top } from "./top"; import { _fireAsyncLoad, asyncLoad } from "./asyncLoad"; import { captureFalseTouch } from "./captureFalseTouch"; diff --git a/src/PrimaryCollections.ts b/src/PrimaryCollections.ts index 9966b1fd..69758188 100644 --- a/src/PrimaryCollections.ts +++ b/src/PrimaryCollections.ts @@ -1,4 +1,4 @@ -import { T_QC_CLASSES, T_QC_PACKAGES } from "./types/global"; +import { T_QC_CLASSES, T_QC_PACKAGES } from "@types"; import { __getType__ } from "./getType"; import { __make_global__ } from "./make_global"; diff --git a/src/Processor.ts b/src/Processor.ts index f7b21e14..fe0298ed 100644 --- a/src/Processor.ts +++ b/src/Processor.ts @@ -1,4 +1,4 @@ -import { type IComponent, type IProcessor } from "./types/global"; +import { type IComponent, type IProcessor } from "@types"; import { CONFIG } from "./CONFIG"; import { InheritClass } from "./InheritClass"; import { New } from "./New"; diff --git a/src/QCObjects.ts b/src/QCObjects.ts index e2c41efb..54402241 100644 --- a/src/QCObjects.ts +++ b/src/QCObjects.ts @@ -95,7 +95,7 @@ export { DDO } from "./DDO"; export { Toggle } from "./Toggle"; export { findPackageNodePath } from "./findPackageNodePath"; export { getDocumentLayout } from "./DocumentLayout"; -export { IQCObjectsElement, IQCObjectsShadowedElement } from "./types/global"; +export { IQCObjectsElement, IQCObjectsShadowedElement } from "@types"; export { __to_number } from "./mathFunctions"; export {_top as global} from "./top"; export {__make_global__} from "./make_global"; diff --git a/src/Service.ts b/src/Service.ts index f9a60251..5f998be7 100644 --- a/src/Service.ts +++ b/src/Service.ts @@ -6,7 +6,7 @@ import { logger } from "./Logger"; import { Package } from "./Package"; import { _secretKey } from "./secretKey"; import { CONFIG } from "./CONFIG"; -import { IJSONService, IService, TServiceDoneResponse, TServiceStandardResponse } from "./types/global"; +import { IJSONService, IService, TServiceDoneResponse, TServiceStandardResponse } from "@types"; export class Service extends InheritClass implements IService{ options!: object; diff --git a/src/SourceCSS.ts b/src/SourceCSS.ts index 55f3eebf..d8150c0c 100644 --- a/src/SourceCSS.ts +++ b/src/SourceCSS.ts @@ -1,4 +1,4 @@ -import { ISourceCSS, TBody } from "./types/global"; +import { ISourceCSS, TBody } from "@types"; import { _basePath_ } from "./basePath"; import { _Cast } from "./Cast"; import { _domain_ } from "./domain"; diff --git a/src/SourceJS.ts b/src/SourceJS.ts index 6c66f943..fbaabbf1 100644 --- a/src/SourceJS.ts +++ b/src/SourceJS.ts @@ -1,4 +1,4 @@ -import { ISourceJS } from "./types/global"; +import { ISourceJS } from "@types"; import { _basePath_ } from "./basePath"; import { _Cast } from "./Cast"; import { _domain_ } from "./domain"; diff --git a/src/Tag.ts b/src/Tag.ts index 69cc186d..c780adb3 100644 --- a/src/Tag.ts +++ b/src/Tag.ts @@ -1,4 +1,4 @@ -import { IQCObjectsElement, ITagElements } from "./types/global"; +import { IQCObjectsElement, ITagElements } from "@types"; import { ClassFactory } from "./ClassFactory"; import { New } from "./New"; import { Package } from "./Package"; diff --git a/src/Timer.ts b/src/Timer.ts index bcd08b93..b9497620 100644 --- a/src/Timer.ts +++ b/src/Timer.ts @@ -1,4 +1,4 @@ -import { ITimer, TTimerParams } from "./types/global"; +import { ITimer, TTimerParams } from "@types"; import { InheritClass } from "./InheritClass"; import { Package } from "./Package"; diff --git a/src/TransitionEffect.ts b/src/TransitionEffect.ts index 7d653f7e..396be6c2 100644 --- a/src/TransitionEffect.ts +++ b/src/TransitionEffect.ts @@ -2,8 +2,8 @@ import { Effect } from "./Effect"; import { logger } from "./Logger"; import { Package } from "./Package"; import { ClassFactory } from "./ClassFactory"; -import { IQCObjectsElement, IQCObjectsShadowedElement } from "./types/global"; -import { ITransitionEffect, IComponent, TTransitionEffectParams } from "./types/global"; +import { IQCObjectsElement, IQCObjectsShadowedElement } from "@types"; +import { ITransitionEffect, IComponent, TTransitionEffectParams } from "@types"; export class TransitionEffect extends Effect implements ITransitionEffect{ duration = 385; diff --git a/src/View.ts b/src/View.ts index 0b540c9c..9f04476c 100644 --- a/src/View.ts +++ b/src/View.ts @@ -1,7 +1,7 @@ import { __getType__ } from "./getType"; import { InheritClass } from "./InheritClass"; import { Package } from "./Package"; -import { TViewParams } from "./types/global"; +import { TViewParams } from "@types"; export class View extends InheritClass { constructor({ component = undefined, dependencies = [] }:TViewParams) { diff --git a/src/WidgetsFactory.ts b/src/WidgetsFactory.ts index 88287322..62fbadbd 100644 --- a/src/WidgetsFactory.ts +++ b/src/WidgetsFactory.ts @@ -4,7 +4,7 @@ import { _DOMCreateElement } from "./DOMCreateElement"; import { Export } from "./Export"; import { _protected_code_ } from "./introspection"; import { isBrowser } from "./platform"; -import { I_ComponentWidget_ } from "./types/global"; +import { I_ComponentWidget_ } from "@types"; class QCObjectsWidgetNode implements I_ComponentWidget_ { writingSuggestions!: string; diff --git a/src/asyncLoad.ts b/src/asyncLoad.ts index eb04fe91..92a6e964 100644 --- a/src/asyncLoad.ts +++ b/src/asyncLoad.ts @@ -1,4 +1,4 @@ -import { TAsyncLoadCallback } from "./types/global"; +import { TAsyncLoadCallback } from "@types"; import { Export } from "./Export"; import { isBrowser } from "./platform"; import { _top } from "./top"; diff --git a/src/componentLoader.ts b/src/componentLoader.ts index 53fd2b11..753bf244 100644 --- a/src/componentLoader.ts +++ b/src/componentLoader.ts @@ -1,4 +1,4 @@ -import { IComponent, TCacheController } from "./types/global"; +import { IComponent, TCacheController } from "@types"; import { asyncLoad } from "./asyncLoad"; import { ComplexStorageCache } from "./ComplexStorageCache"; import { _DataStringify } from "./DataStringify"; diff --git a/src/defaultProcessors.ts b/src/defaultProcessors.ts index 1eb8e401..32237ccf 100644 --- a/src/defaultProcessors.ts +++ b/src/defaultProcessors.ts @@ -2,7 +2,7 @@ import { logger } from "./Logger"; import { GlobalProcessor as Processor } from "./Processor"; import { _top } from "./top"; import { range } from "./range"; -import { IComponent } from "./types/global"; +import { IComponent } from "@types"; // Set Processors export const setDefaultProcessors = ():void => { diff --git a/src/globalSettings.ts b/src/globalSettings.ts index 6e6912d0..9d4b9199 100644 --- a/src/globalSettings.ts +++ b/src/globalSettings.ts @@ -1,4 +1,4 @@ -import { IGlobalSettings } from "./types/global"; +import { IGlobalSettings } from "@types"; import { CONFIG } from "./CONFIG"; import { InheritClass } from "./InheritClass"; import { Logger, logger } from "./Logger"; diff --git a/src/routings.ts b/src/routings.ts index f4295689..feb9d2af 100644 --- a/src/routings.ts +++ b/src/routings.ts @@ -1,4 +1,4 @@ -import { TComponentRouting } from "./types/global"; +import { TComponentRouting } from "@types"; export const __routing_params__ = (routing:TComponentRouting, routingPath:string):object => { const standardRoutingPath = routing.path.replace(/{(.*?)}/g, "(?<$1>.*)"); // allowing {param} diff --git a/src/serviceLoader.ts b/src/serviceLoader.ts index b73e0158..1929ab40 100644 --- a/src/serviceLoader.ts +++ b/src/serviceLoader.ts @@ -1,4 +1,4 @@ -import { IService, TCacheController } from "./types/global"; +import { IService, TCacheController } from "@types"; import { asyncLoad } from "./asyncLoad"; import { ComplexStorageCache } from "./ComplexStorageCache"; import { _DataStringify } from "./DataStringify"; diff --git a/src/top.ts b/src/top.ts index 65ff93cb..3799524f 100644 --- a/src/top.ts +++ b/src/top.ts @@ -1,4 +1,4 @@ -import { IComplexStorageCache, IComponent, IConfigService, IQCObjectsElement } from "./types/global"; +import { IComplexStorageCache, IComponent, IConfigService, IQCObjectsElement } from "@types"; import { buildComponents } from "./ComponentFactory"; import { _CastProps } from "./Cast"; import { GlobalSettings } from "./globalSettings"; diff --git a/tsconfig.d.json b/tsconfig.d.json index f3437f6b..35626fa8 100644 --- a/tsconfig.d.json +++ b/tsconfig.d.json @@ -26,7 +26,9 @@ "types": ["node"], "paths": { "*": ["src/*"], - "types": ["types/global"] + "@types": [ + "src/types/global/index.d.ts" + ] } }, "include": [ diff --git a/tsconfig.jasmine.json b/tsconfig.jasmine.json index 6d40c658..a126c2ae 100644 --- a/tsconfig.jasmine.json +++ b/tsconfig.jasmine.json @@ -32,17 +32,17 @@ "types": ["node", "jasmine"], "paths": { "./*": ["./src/*.ts"], - "types": [ - "src/types/global" + "@types": [ + "src/types/global/index.d.ts" ], - "../src/qcobjects":["src/qcobjects.ts"], "qcobjects":["src/qcobjects.ts"], "qcobjects-sdk": ["spec/mocks/qcobjects-sdk.mock.ts"] } }, "include": [ "spec/**/*", - "src/**/*" + "src/**/*", + "src/*" ] } \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index 66891a3c..26a5b0dc 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -26,8 +26,8 @@ "types": ["node"], "paths": { "*": ["src/*"], - "types": [ - "types/global" + "@types": [ + "src/types/global/index.d.ts" ], } },