qcobjectsnewapp 2.5.23-ts → 2.5.24-ts
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/VERSION +1 -1
- package/package.json +1 -1
- package/public/js/init.js +20 -20
- package/public/js/init.js.map +3 -3
- package/public/js/packages/com.qcobjects.installer.js +15 -15
- package/public/js/packages/com.qcobjects.installer.js.map +3 -3
- package/public/js/packages/com.qcobjects.services.newapp.js +4 -4
- package/public/js/packages/com.qcobjects.services.newapp.js.map +3 -3
- package/public/js/packages/org.quickcorp.custom.components.js +8 -8
- package/public/js/packages/org.quickcorp.custom.components.js.map +2 -2
- package/public/js/packages/org.quickcorp.custom.controllers.js +16 -16
- package/public/js/packages/org.quickcorp.custom.controllers.js.map +3 -3
- package/public/js/packages/org.quickcorp.custom.effects.js +4 -4
- package/public/js/packages/org.quickcorp.custom.effects.js.map +3 -3
- package/public/js/packages/org.quickcorp.custom.js +20 -20
- package/public/js/packages/org.quickcorp.custom.js.map +3 -3
- package/public/js/packages/org.quickcorp.custom.models.js +4 -4
- package/public/js/packages/org.quickcorp.custom.models.js.map +3 -3
- package/public/js/packages/org.quickcorp.custom.views.js +4 -4
- package/public/js/packages/org.quickcorp.custom.views.js.map +3 -3
- package/src/js/packages/com.qcobjects.installer.ts +83 -81
- package/src/js/packages/com.qcobjects.services.newapp.ts +20 -18
- package/src/js/packages/org.quickcorp.custom.components.ts +5 -7
- package/src/js/packages/org.quickcorp.custom.controllers.ts +115 -111
- package/src/js/packages/org.quickcorp.custom.effects.ts +23 -21
- package/src/js/packages/org.quickcorp.custom.models.ts +12 -11
- package/src/js/packages/org.quickcorp.custom.views.ts +13 -12
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";var global=(()=>{var Ys=Object.defineProperty;var c=(r,t)=>Ys(r,"name",{value:t,configurable:!0}),Cn=(r=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(r,{get:(t,e)=>(typeof require<"u"?require:t)[e]}):r)(function(r){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+r+'" is not supported')});var _o=(r,t)=>()=>{try{return t||r((t={exports:{}}).exports,t),t.exports}catch(e){throw t=0,e}};var k=_o((Ai,sn)=>{"use strict";var ei=Object.create,Rn=Object.defineProperty,ti=Object.getOwnPropertyDescriptor,No=Object.getOwnPropertyNames,ni=Object.getPrototypeOf,oi=Object.prototype.hasOwnProperty,p=c((r,t)=>Rn(r,"name",{value:t,configurable:!0}),"__name"),w=c((r,t)=>c(function(){return r&&(t=(0,r[No(r)[0]])(r=0)),t},"__init"),"__esm"),ri=c((r,t)=>c(function(){return t||(0,r[No(r)[0]])((t={exports:{}}).exports,t),t.exports},"__require"),"__commonJS"),br=c((r,t)=>{for(var e in t)Rn(r,e,{get:t[e],enumerable:!0})},"__export"),_r=c((r,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of No(t))!oi.call(r,o)&&o!==e&&Rn(r,o,{get:c(()=>t[o],"get"),enumerable:!(n=ti(t,o))||n.enumerable});return r},"__copyProps"),si=c((r,t,e)=>(e=r!=null?ei(ni(r)):{},_r(t||!r||!r.__esModule?Rn(e,"default",{value:r,enumerable:!0}):e,r)),"__toESM"),ii=c(r=>_r(Rn({},"__esModule",{value:!0}),r),"__toCommonJS"),fn,kn=w({"src/is_raw_class.ts"(){"use strict";fn=p(r=>!!(typeof r=="function"&&r.toString().startsWith("class")),"__is_raw_class__")}}),gn,Ln=w({"src/ObjectName.ts"(){"use strict";gn=p(r=>{let t="";return typeof r=="function"&&Object.hasOwn(r,"name")&&r.name!==""?t=r.name:typeof r<"u"&&typeof r.constructor=="function"&&r.constructor.name!==""?t=r.constructor.name:typeof r<"u"&&typeof r.constructor=="object"&&(t=r.constructor.toString().replace(/\[(.*?)\]/g,"$1").split(" ").slice(1).join("")),t},"ObjectName")}}),J,pe=w({"src/getType.ts"(){"use strict";kn(),Ln(),J=p(c(function(t){let e="";switch(!0){case(typeof t=="object"&&!!t.constructor&&!!t.constructor.name&&t.constructor.name!==""):e=t.constructor.name;break;case(typeof t=="function"&&!!t.name):e=t.name;break;case(fn(t)&&!!t.name):e=t.name;break;case(!!t&&!!t.__classType&&t.__classType!==""):e=t.__classType;break;case(!!t&&!!t.__definition&&!!t.__definition.__classType&&t.__definition.__classType!==""):e=t.__definition.__classType;break;default:e=gn(t);break}return e},"__getType__2"),"__getType__")}}),Dn,no=w({"src/make_global.ts"(){"use strict";X(),Dn=p(r=>{r&&r.name&&(typeof M<"u"&&typeof r<"u"&&M!==null&&!Object.hasOwn(M,r.name)?pn(r.name,r):typeof global<"u"?global[r.name]=r:typeof globalThis<"u"&&(globalThis[r.name]=r))},"__make_global__")}}),Y,Q,vn,je,On,yr,yo,Co,vo,Oo,wr,Bn,we=w({"src/PrimaryCollections.ts"(){"use strict";pe(),no(),Y={},Q={},vn=[],je=[],On=p(function(r,t){let e=J(r),n=r.name||e;return n.toLowerCase()==="function"&&(n=e),(!Object.hasOwn(r,"__definition")||typeof r.__definition>"u")&&Object.defineProperty(r,"__definition",{value:{},writable:!0,enumerable:!0,configurable:!0}),r.__definition.__classType=e,typeof t<"u"&&(r.__definition.__namespace=t),Y[n]=r,Dn(r),Y[n]},"__register_class__"),yr=p(r=>Y[r],"get_QC_CLASS"),yo=p(function(r){let t=[];for(let e of Object.keys(r))typeof r[e]<"u"&&typeof r[e]!="function"&&Object.hasOwn(r[e],"length")&&r[e].length>0&&(t.push(e),t=t.concat(yo(r[e])));return t},"_get_packages_names"),Co=p(()=>yo(Q),"getPackagesNamesList"),vo=p(()=>[...Co()].map(r=>{let t=Q[r],e;return t&&(e={packageName:r,classesList:t.filter(function(){return!0})}),e}).filter(function(r){return typeof r<"u"}),"getPackagesList"),Oo=p(()=>{let r=[];return[...vo()].forEach(function(t){return r=r.concat(t.classesList.map(e=>({packageName:t.packageName,className:`${t.packageName}.${J(e)}`,classFactory:e}))),t}),r},"getClassesList"),wr=p(()=>[...Oo()].map(r=>r.className),"getClassesNamesList"),Bn=p((r,t)=>{Q[r]=t},"set_QC_PACKAGE")}}),S,et=w({"src/Export.ts"(){"use strict";no(),S=p(function(r){return Dn(r)},"Export"),S.prototype.toString=function(){return"Export(function or symbol) { [QCObjects native code] }"}}});async function Cr(r){d.debug(`Importing ${r}...`);function t(e){return d.debug(`Validating if ${e} is a package name...`),!e.startsWith(".")&&!e.startsWith("/")&&!e.includes("/")}c(t,"isPackage"),p(t,"isPackage");try{return!/\.[^/\\]+$/.test(r)&&!t(r)&&(d.debug(`${r} does not have an extension and is not a package. Adding js extension.`),r+=".js"),await import(r)}catch(e){d.warn(`Failed to load module: ${e}`)}}c(Cr,"_import_");var ai=w({"src/_import_.ts"(){"use strict";T(),p(Cr,"_import_")}}),wo,y,xo,ur,xe,oo,$=w({"src/platform.ts"(){"use strict";ai(),T(),wo=typeof window<"u"&&"Deno"in window,y=typeof window<"u"&&typeof window.self<"u"&&window===window.self&&!wo,xo=typeof sn<"u"&&typeof window>"u",ur=p(r=>{},"deno_require"),xe=p(r=>wo?ur(r):(t=>{let e;try{(async()=>{e=await Cr(t)})().then(n=>{e=n&&n.default||n}).catch(n=>{d.warn(`An error ocurred: ${n}`)})}catch(n){d.debug(`An error ocurred importing module. ${n}`),e={export:{}}}return e})(r),"_require_"),oo=(function(){return typeof cordova<"u"})()}}),Zn,d,T=w({"src/Logger.ts"(){"use strict";var r;et(),$(),Zn=(r=class{constructor(){this.debugEnabled=!0,this.infoEnabled=!0,this.warnEnabled=!0,this.errorEnabled=!0}debug(e){this.debugEnabled&&console.log("\x1B[35m%s\x1B[0m",`[DEBUG][${performance.now().toLocaleString()}] ${e}`)}info(e){let n;this.infoEnabled&&(y?n="\x1B[103m%s\x1B[0m":n="\x1B[33m%s\x1B[0m",console.info(n,`[INFO][${performance.now().toLocaleString()}] ${e}`))}warn(e){this.warnEnabled&&console.warn("\x1B[31m%s\x1B[0m",`[WARN][${performance.now().toLocaleString()}] ${e}`)}error(e){this.errorEnabled&&console.error("\x1B[31m%s\x1B[0m",`[ERROR][${performance.now().toLocaleString()}] ${e}`)}},c(r,"Logger"),p(r,"Logger"),r),d=new Zn,S(d)}}),ye,Te,Ce=w({"src/Cast.ts"(){"use strict";T(),ye=p(function(r,t){for(let e in r)if(typeof r[e]<"u")try{t[e]=r[e]}catch(n){d.debug(`An error ocurred: ${n}.`),d.warn(`Unable to cast ${(typeof r).toString()}.${typeof e.toString()} to ${(typeof t).toString()}.${typeof e.toString()}`)}return t},"_Cast"),Te=p(function(r,t,e=!0){for(let n in r)if(typeof r[n]<"u"&&typeof r[n]!="function")try{t[n]=r[n]}catch(o){e||d.debug(`An error ocurred: ${o}.`)}else if(typeof r[n]=="function")try{t[n]=r[n].bind(t)}catch(o){d.warn(o)}return t},"_CastProps")}}),ee,pr,hr,he=w({"src/DOMCreateElement.ts"(){"use strict";$(),ee=p(function(r,t,e){let n;return y?n=hr(r,t,e):n={},n},"_DOMCreateElement"),pr=p((r,{props:t,children:e})=>r({props:t,children:e}),"ComplexTypeCall"),hr=p((r,t,e)=>{if(typeof r!="string")return pr(r,{props:t,children:e});let n=document.createElement(r);return t&&Object.entries(t).forEach(([o,i])=>{typeof i=="string"||typeof i=="number"?n.setAttribute(o,i.toString()):typeof i=="function"&&o.toLowerCase().startsWith("on")&&n.addEventListener(o.slice(2).toLowerCase(),i.bind(n))}),Array.isArray(e)?e.filter((o=>o instanceof Node)).forEach(o=>{n.appendChild(o)}):e instanceof Node?n.appendChild(e):typeof e=="string"&&(n.innerHTML=e),n},"_DOMCreateComplexElement")}}),Ne,Ao,Io=w({"src/IncrementInstanceID.ts"(){"use strict";Ne=0,Ao=p(()=>{Ne=typeof Ne>"u"||Ne===null?0:Ne+1},"IncrementInstanceID")}}),P,le,Pe=w({"src/introspection.ts"(){"use strict";P=p(r=>{let t=typeof r.prototype<"u"?r.prototype.toString:(function(){return""});typeof r.prototype<"u"&&(r.prototype.toString=function(){let e=["__qcobjects__","__qcobjects_sdk__","__loaded__","ComplexStorageCache","css","append","attachIn","debug","info","warn","QC_Append","set","get","done","componentDone","_new_","__new__","Class","ClassFactory","New","Export","Package","Import","subelements","componentLoader","buildComponents","Controller","View","VO","Service","serviceLoader","JSONService","ConfigService","SourceJS","SourceCSS","ArrayList","ArrayCollection","Effect","Timer","sum","avg","table","max","min","range","matrix","matrix2d","matrix3d","unique","uniqueId","shortCode","NamespaceRef"],n;return e.includes(this.name)?n=this.name+"{ [QCObjects native code] }":n=t.call(this),n})},"_protected_code_"),P(Function),le=p(function(r){let t=[];for(let e in r)(typeof r[e]).toLowerCase()==="function"&&t.push(r[e]);return t},"_methods_")}}),R,q=w({"src/Package.ts"(){"use strict";kn(),we(),R=p((r,t=[])=>{if(Object.hasOwn(Q,r)&&typeof Q[r]<"u"&&typeof Q[r]!="string"&&Object.hasOwn(Q[r],"length")&&Q[r].length>0&&typeof t<"u"&&Object.hasOwn(t,"length")&&t.length>0)t.forEach(e=>{On(e,r)}),Bn(r,Q[r].concat(t));else if(typeof t<"u"&&typeof t<"u"&&Object.hasOwn(t,"length")&&t.length>0)t.forEach(e=>{On(e,r)}),Bn(r,t);else if(fn(t))typeof t.__definition>"u"&&(t.__definition={}),t.__definition.__namespace=r,t.__namespace=r,On(t,r),Bn(r,[t]);else throw new Error(`An error ocurred. It was not possible to add classes to ${r}.`);return Object.hasOwn(Q,r)?Q[r]:[]},"Package")}}),G,U=w({"src/InheritClass.ts"(){"use strict";var r;T(),Io(),Ce(),he(),pe(),Pe(),qn(),$(),we(),q(),G=(r=class{get body(){return this._body}set body(e){this._body=e}constructor(e){typeof e<"u"&&typeof e.__definition<"u"&&(this.__definition={...e.__definition});let n=this;if(typeof e<"u"&&e!==null&&Object.keys(e).filter(function(o){return isNaN(o)&&!["__instanceID","__classType","__definition"].includes(o)}).forEach(function(o){typeof n[o]=="function"?n[o]=e[o].bind(n):n[o]=e[o]}),Ao(),n.__instanceID||Object.defineProperty(n,"__instanceID",{value:Ne,writable:!1}),typeof n.__definition<"u"&&Object.keys(n.__definition).filter(function(o){return isNaN(o)&&!["name","__instanceID","__classType","__definition"].includes(o)}).forEach(function(o){typeof n.__definition[o]=="function"?n[o]=n.__definition[o].bind(n):n[o]=n.__definition[o]}),le(Y[n.__classType]).map(function(o){return n[o.name]=o.bind(n),o}),le(n.__definition).map(function(o){return n[o.name]=o.bind(n),o}),typeof n._body>"u"||n._body===null){let o=J(n)||"div";try{y?n.body=ee(o):n.body={}}catch(i){d.debug(`An error ocurred: ${i}.`),n.body={}}}try{if(n.__new__.call(n,e),typeof n=="object"&&Object.hasOwn(n,"_new_")&&typeof n._new_.isCalled>"u")try{n._new_(e),n._new_.isCalled=!0}catch(o){d.warn(`${n.__classType}._new_() failed with error: ${o}`)}}catch(o){d.warn(o)}}static get __classType(){return Object.getPrototypeOf(this.constructor).name}get __classType(){return this.constructor.name}static hierarchy(e){let n=p(function(s){return Object.hasOwn(s,"__classType")?s.__classType:J.call(e,s)},"__classType"),o=p(s=>typeof s<"u"&&typeof s.__proto__<"u"&&s.__proto__!==null?(n(s)!==""?[n(s)]:[]).concat(o(s.__proto__)):[],"__hierarchy__proto__");(typeof e>"u"||e===null)&&(e=this);let i=[];return i.push(n(e)),i=i.concat(o(e.__proto__)),i}__new__(e){Te(e,this)}_new_(e){}static getParentClass(){return Object.getPrototypeOf(this.prototype.constructor)}getParentClass(){return this.constructor.getParentClass()}static getClass(){return Object.getPrototypeOf(this.constructor)}getClass(){return this.constructor.getClass()}css(e){return typeof this.body<"u"&&typeof this?.body!="string"&&typeof this?.body?.style<"u"&&(d.debug("body style"),this.body&&(this.body.style=ye(e,this?.body?.style))),typeof this.body!="string"?this?.body?.style:{}}hierarchy(){let e=this;return this.constructor.hierarchy(e)}append(e){let n=e||this.body;if(d.debug("append: start"),_e(n,"Component")&&(d.debug("append: child is a Component"),d.debug(`appending the body of ${n.name}`)),typeof this.body<"u")if(d.debug("append element"),arguments.length>0){if(d.debug("append to element"),typeof this.body!="string")if(typeof this.body?.append<"u")this?.body?.append(n);else throw Error("body.append is undefined. That means the body is not well formed.");else this.append(n);typeof this.childs>"u"&&(this.childs=[]),this.childs.push(n)}else y&&(d.debug("append to body"),document.body.append(n))}attachIn(e){if(y){let n=document.subelements(e);for(let o=0,i=n.length;o<i;o++)n[o].append(this)}else throw new Error("attachIn not yet implemented for non browser platforms")}},c(r,"InheritClass"),p(r,"InheritClass"),r),R("com.qcobjects",[G])}}),Ye,jn,$n=w({"src/isQCObjects.ts"(){"use strict";U(),Ye=p(function(r){return!!(typeof r=="object"&&Object.hasOwn(r,"__classType")&&r.__instanceID&&Object.hasOwn(r,"__definition")&&typeof r.__definition<"u")||r instanceof G},"isQCObjects_Object"),jn=p(function(r){return!!(typeof r=="function"&&!r.__instanceID&&r.__definition&&typeof r.__definition<"u"&&r.__definition.__classType)||r.prototype instanceof G},"isQCObjects_Class")}}),_e,qn=w({"src/is_a.ts"(){"use strict";pe(),$n(),Ln(),_e=p((r,t)=>!!(typeof r<"u"&&r!==null&&((jn(r)||Ye(r))&&r.hierarchy().includes(t)||J(r)===t||gn(r)===t||typeof r===t)),"is_a")}}),vr,ci=w({"src/is_forbidden_name.ts"(){"use strict";vr=p(r=>["__proto__","prototype","Object","Map","defineProperty","indexOf","toString","__instanceID","function","Function"].indexOf(r)!==-1,"__is__forbidden_name__")}}),ro,To=w({"src/LegacyCopy.ts"(){"use strict";kn(),ro=p(function(r,t){var n;let e;switch(!0){case typeof r=="string":e=r;break;case typeof r=="number":e=r;break;case typeof r=="object":e=[{...Object.keys(r).filter(o=>!t?.includes(o))}].map(o=>({[o]:r[o]})).reduce((o,i)=>Object.assign(o,i));break;case typeof r=="function":e=r.bind({});break;case fn(r):e=(n=class extends r{},c(n,"_value_"),p(n,"_value_"),n);break;default:break}return e},"_LegacyCopy")}}),on,Po=w({"src/Class.ts"(){"use strict";we(),Ce(),he(),pe(),Io(),Pe(),qn(),ci(),To(),T(),$(),X(),on=p((r,t,e)=>{var s,a;let n={},o,i;switch(!0){case(!r&&!t&&!e):return class{};case(!!r&&!t&&!e):o=(s=class{},c(s,"type"),p(s,"type"),s),i={};break;case(!!r&&!t&&!!e):o=(a=class{},c(a,"type"),p(a,"type"),a),i=e;break;case(!!r&&!!t&&!!e):o=t,i=e;break;default:return class{}}if(typeof r!="string")throw new Error("Class name must be a string");if(typeof o!="function")throw new Error("Class type must be a function or class");if(vr(r))throw new Error(`${r} is not an allowed word in the name of a class`);return typeof o.__definition=="object"&&o.__definition&&Object.keys(o.__definition).length!==0&&(i.__definition=Object.assign(ro(o.__definition,["name"]),o)),n[o.name]=o,typeof i>"u"||i===null?i={}:i={...i},typeof i.__instanceID<"u"&&delete i.__instanceID,Y[r]=class extends n[o.name]{constructor(l){super(l||{}),this.__definition={...i};let u=this;if(Ao(),u.__instanceID||Object.defineProperty(u,"__instanceID",{value:Ne,writable:!1}),typeof u.__definition<"u"&&Object.keys(u.__definition).filter(function(h){return isNaN(h)&&!["name","__instanceID","__classType","__definition"].includes(h)}).forEach(function(h){typeof u.__definition[h]=="function"?u[h]=u.__definition[h].bind(u):u[h]=u.__definition[h]}),le(Y[u.__classType]).map(function(h){return u[h.name]=h.bind(u),h}),le(u.__definition).map(function(h){return u[h.name]=h.bind(u),h}),typeof u._body>"u"||u._body===null){let h=J(u)||"div";try{y?u.body=ee(h):u.body={}}catch(f){d.debug(`An error ocurred: ${f}.`),u.body={}}}try{if(typeof u.__new__=="function"?u.__new__.call(u,l):typeof super.__new__=="function"&&(u.__new__=super.__new__.bind(u),u.__new__.call(u,l)),typeof u=="object"&&Object.hasOwn(u,"_new_")&&typeof u._new_.isCalled>"u")try{u._new_(l),u._new_.isCalled=!0}catch(h){d.warn(`${u.__classType}._new_() failed with error: ${h}`)}}catch(h){d.warn(h)}}get body(){return this._body}set body(l){this._body=l}static get __classType(){return Object.getPrototypeOf(this.constructor).name}get __classType(){return this.constructor.name}static hierarchy(l){let u=p(function(g){return Object.hasOwn(g,"__classType")?g.__classType:J.call(l,g)},"__classType"),h=p(g=>typeof g<"u"&&typeof g.__proto__<"u"&&g.__proto__!==null?(u(g)!==""?[u(g)]:[]).concat(h(g.__proto__)):[],"__hierarchy__proto__");(typeof l>"u"||l===null)&&(l=this);let f=[];return f.push(u(l)),f=f.concat(h(l.__proto__)),f}static getParentClass(){return Object.getPrototypeOf(this.prototype.constructor)}__new__(l){Te(l,this)}_new_(l){}getClass(){return Object.getPrototypeOf(this.constructor)}css(l){return typeof this.body<"u"&&typeof this?.body!="string"&&typeof this?.body?.style<"u"&&(d.debug("body style"),this.body&&(this.body.style=ye(l,this?.body?.style))),typeof this.body!="string"?this?.body?.style:{}}hierarchy(){let l=this;return this.getClass()?.hierarchy(l)}append(l){let u=l||this.body;if(d.debug("append: start"),_e(u,"Component")&&(d.debug("append: child is a Component"),d.debug(`appending the body of ${u.name}`)),typeof this.body<"u")if(d.debug("append element"),arguments.length>0){if(d.debug("append to element"),typeof this.body!="string")if(typeof this.body?.append<"u")this?.body?.append(u);else throw Error("body.append is undefined. That means the body is not well formed.");else this.append(u);typeof this.childs>"u"&&(this.childs=[]),this.childs.push(u)}else y&&(d.debug("append to body"),document.body.append(u))}attachIn(l){if(y){let u=document.subelements(l);for(let h=0,f=u.length;h<f;h++)u[h].append(this)}else throw new Error("attachIn not yet implemented for non browser platforms")}},Y[r]=Te(i,Y[r]),Y[r].__definition=i,Y[r].__definition.__classType=r,M[r]=Y[r],Y[r]},"Class"),typeof on.prototype<"u"&&(on.prototype.toString=function(){return"Class(name, type, definition) { [QCObjects native code] }"})}}),j,fe=w({"src/ClassFactory.ts"(){"use strict";kn(),we(),j=p(r=>{let t;if(typeof r>"u"||r===null)throw Error("You need to pass a parameter {className}");if(r!==null&&r.indexOf(".")!==-1){let e=r.split(".").slice(0,r.split(".").length-1).join("."),n=r.split(".").slice(-1).join(""),i=(Q[e]||[]).filter(s=>fn(s)).reverse();if(i.length>0)t=i[0];else throw Error(`Class ${n} not found. Found classes: ${JSON.stringify(i)} in package ${e}`)}else if(r!==null){if(t=yr(r),typeof t>"u")throw new Error(`${r} is undefined.`)}else throw Error(`className is null. Unable to retrieve the class factory.
|
|
1
|
+
"use strict";var global=(()=>{var ni=Object.defineProperty;var c=(r,t)=>ni(r,"name",{value:t,configurable:!0}),yn=(r=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(r,{get:(t,e)=>(typeof require<"u"?require:t)[e]}):r)(function(r){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+r+'" is not supported')});var wo=(r,t)=>()=>{try{return t||r((t={exports:{}}).exports,t),t.exports}catch(e){throw t=0,e}};var k=wo((Pi,sn)=>{"use strict";var oi=Object.create,Pn=Object.defineProperty,ri=Object.getOwnPropertyDescriptor,Ao=Object.getOwnPropertyNames,si=Object.getPrototypeOf,ii=Object.prototype.hasOwnProperty,p=c((r,t)=>Pn(r,"name",{value:t,configurable:!0}),"__name"),w=c((r,t)=>c(function(){return r&&(t=(0,r[Ao(r)[0]])(r=0)),t},"__init"),"__esm"),ai=c((r,t)=>c(function(){return t||(0,r[Ao(r)[0]])((t={exports:{}}).exports,t),t.exports},"__require"),"__commonJS"),Cr=c((r,t)=>{for(var e in t)Pn(r,e,{get:t[e],enumerable:!0})},"__export"),vr=c((r,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Ao(t))!ii.call(r,o)&&o!==e&&Pn(r,o,{get:c(()=>t[o],"get"),enumerable:!(n=ri(t,o))||n.enumerable});return r},"__copyProps"),ci=c((r,t,e)=>(e=r!=null?oi(si(r)):{},vr(t||!r||!r.__esModule?Pn(e,"default",{value:r,enumerable:!0}):e,r)),"__toESM"),di=c(r=>vr(Pn({},"__esModule",{value:!0}),r),"__toCommonJS"),fn,Mn=w({"src/is_raw_class.ts"(){"use strict";fn=p(r=>!!(typeof r=="function"&&r.toString().startsWith("class")),"__is_raw_class__")}}),gn,Rn=w({"src/ObjectName.ts"(){"use strict";gn=p(r=>{let t="";return typeof r=="function"&&Object.hasOwn(r,"name")&&r.name!==""?t=r.name:typeof r<"u"&&typeof r.constructor=="function"&&r.constructor.name!==""?t=r.constructor.name:typeof r<"u"&&typeof r.constructor=="object"&&(t=r.constructor.toString().replace(/\[(.*?)\]/g,"$1").split(" ").slice(1).join("")),t},"ObjectName")}}),J,pe=w({"src/getType.ts"(){"use strict";Mn(),Rn(),J=p(c(function(t){let e="";switch(!0){case(typeof t=="object"&&!!t.constructor&&!!t.constructor.name&&t.constructor.name!==""):e=t.constructor.name;break;case(typeof t=="function"&&!!t.name):e=t.name;break;case(fn(t)&&!!t.name):e=t.name;break;case(!!t&&!!t.__classType&&t.__classType!==""):e=t.__classType;break;case(!!t&&!!t.__definition&&!!t.__definition.__classType&&t.__definition.__classType!==""):e=t.__definition.__classType;break;default:e=gn(t);break}return e},"__getType__2"),"__getType__")}}),kn,to=w({"src/make_global.ts"(){"use strict";X(),kn=p(r=>{r&&r.name&&(typeof M<"u"&&typeof r<"u"&&M!==null&&!Object.hasOwn(M,r.name)?pn(r.name,r):typeof global<"u"?global[r.name]=r:typeof globalThis<"u"&&(globalThis[r.name]=r))},"__make_global__")}}),Y,Q,wn,je,Cn,Or,Co,Oo,So,Eo,Sr,Hn,we=w({"src/PrimaryCollections.ts"(){"use strict";pe(),to(),Y={},Q={},wn=[],je=[],Cn=p(function(r,t){let e=J(r),n=r.name||e;return n.toLowerCase()==="function"&&(n=e),(!Object.hasOwn(r,"__definition")||typeof r.__definition>"u")&&Object.defineProperty(r,"__definition",{value:{},writable:!0,enumerable:!0,configurable:!0}),r.__definition.__classType=e,typeof t<"u"&&(r.__definition.__namespace=t),Y[n]=r,kn(r),Y[n]},"__register_class__"),Or=p(r=>Y[r],"get_QC_CLASS"),Co=p(function(r){let t=[];for(let e of Object.keys(r))typeof r[e]<"u"&&typeof r[e]!="function"&&Object.hasOwn(r[e],"length")&&r[e].length>0&&(t.push(e),t=t.concat(Co(r[e])));return t},"_get_packages_names"),Oo=p(()=>Co(Q),"getPackagesNamesList"),So=p(()=>[...Oo()].map(r=>{let t=Q[r],e;return t&&(e={packageName:r,classesList:t.filter(function(){return!0})}),e}).filter(function(r){return typeof r<"u"}),"getPackagesList"),Eo=p(()=>{let r=[];return[...So()].forEach(function(t){return r=r.concat(t.classesList.map(e=>({packageName:t.packageName,className:`${t.packageName}.${J(e)}`,classFactory:e}))),t}),r},"getClassesList"),Sr=p(()=>[...Eo()].map(r=>r.className),"getClassesNamesList"),Hn=p((r,t)=>{Q[r]=t},"set_QC_PACKAGE")}}),S,et=w({"src/Export.ts"(){"use strict";to(),S=p(function(r){return kn(r)},"Export"),S.prototype.toString=function(){return"Export(function or symbol) { [QCObjects native code] }"}}});async function Er(r){d.debug(`Importing ${r}...`);function t(e){return d.debug(`Validating if ${e} is a package name...`),!e.startsWith(".")&&!e.startsWith("/")&&!e.includes("/")}c(t,"isPackage"),p(t,"isPackage");try{return!/\.[^/\\]+$/.test(r)&&!t(r)&&(d.debug(`${r} does not have an extension and is not a package. Adding js extension.`),r+=".js"),await import(r)}catch(e){d.warn(`Failed to load module: ${e}`)}}c(Er,"_import_");var li=w({"src/_import_.ts"(){"use strict";T(),p(Er,"_import_")}}),vo,y,Io,gr,xe,no,$=w({"src/platform.ts"(){"use strict";li(),T(),vo=typeof window<"u"&&"Deno"in window,y=typeof window<"u"&&typeof window.self<"u"&&window===window.self&&!vo,Io=typeof sn<"u"&&typeof window>"u",gr=p(r=>{},"deno_require"),xe=p(r=>vo?gr(r):(t=>{let e;try{(async()=>{e=await Er(t)})().then(n=>{e=n&&n.default||n}).catch(n=>{d.warn(`An error ocurred: ${n}`)})}catch(n){d.debug(`An error ocurred importing module. ${n}`),e={export:{}}}return e})(r),"_require_"),no=(function(){return typeof cordova<"u"})()}}),Qn,d,T=w({"src/Logger.ts"(){"use strict";var r;et(),$(),Qn=(r=class{constructor(){this.debugEnabled=!0,this.infoEnabled=!0,this.warnEnabled=!0,this.errorEnabled=!0}debug(e){this.debugEnabled&&console.log("\x1B[35m%s\x1B[0m",`[DEBUG][${performance.now().toLocaleString()}] ${e}`)}info(e){let n;this.infoEnabled&&(y?n="\x1B[103m%s\x1B[0m":n="\x1B[33m%s\x1B[0m",console.info(n,`[INFO][${performance.now().toLocaleString()}] ${e}`))}warn(e){this.warnEnabled&&console.warn("\x1B[31m%s\x1B[0m",`[WARN][${performance.now().toLocaleString()}] ${e}`)}error(e){this.errorEnabled&&console.error("\x1B[31m%s\x1B[0m",`[ERROR][${performance.now().toLocaleString()}] ${e}`)}},c(r,"Logger"),p(r,"Logger"),r),d=new Qn,S(d)}}),ye,Te,Ce=w({"src/Cast.ts"(){"use strict";T(),ye=p(function(r,t){for(let e in r)if(typeof r[e]<"u")try{t[e]=r[e]}catch(n){d.debug(`An error ocurred: ${n}.`),d.warn(`Unable to cast ${(typeof r).toString()}.${typeof e.toString()} to ${(typeof t).toString()}.${typeof e.toString()}`)}return t},"_Cast"),Te=p(function(r,t,e=!0){for(let n in r)if(typeof r[n]<"u"&&typeof r[n]!="function")try{t[n]=r[n]}catch(o){e||d.debug(`An error ocurred: ${o}.`)}else if(typeof r[n]=="function")try{t[n]=r[n].bind(t)}catch(o){d.warn(o)}return t},"_CastProps")}}),ee,mr,br,he=w({"src/DOMCreateElement.ts"(){"use strict";$(),ee=p(function(r,t,e){let n;return y?n=br(r,t,e):n={},n},"_DOMCreateElement"),mr=p((r,{props:t,children:e})=>r({props:t,children:e}),"ComplexTypeCall"),br=p((r,t,e)=>{if(typeof r!="string")return mr(r,{props:t,children:e});let n=document.createElement(r);return t&&Object.entries(t).forEach(([o,i])=>{typeof i=="string"||typeof i=="number"?n.setAttribute(o,i.toString()):typeof i=="function"&&o.toLowerCase().startsWith("on")&&n.addEventListener(o.slice(2).toLowerCase(),i.bind(n))}),Array.isArray(e)?e.filter((o=>o instanceof Node)).forEach(o=>{n.appendChild(o)}):e instanceof Node?n.appendChild(e):typeof e=="string"&&(n.innerHTML=e),n},"_DOMCreateComplexElement")}}),Ne,To,Po=w({"src/IncrementInstanceID.ts"(){"use strict";Ne=0,To=p(()=>{Ne=typeof Ne>"u"||Ne===null?0:Ne+1},"IncrementInstanceID")}}),P,le,Pe=w({"src/introspection.ts"(){"use strict";P=p(r=>{let t=typeof r.prototype<"u"?r.prototype.toString:(function(){return""});typeof r.prototype<"u"&&(r.prototype.toString=function(){let e=["__qcobjects__","__qcobjects_sdk__","__loaded__","ComplexStorageCache","css","append","attachIn","debug","info","warn","QC_Append","set","get","done","componentDone","_new_","__new__","Class","ClassFactory","New","Export","Package","Import","subelements","componentLoader","buildComponents","Controller","View","VO","Service","serviceLoader","JSONService","ConfigService","SourceJS","SourceCSS","ArrayList","ArrayCollection","Effect","Timer","sum","avg","table","max","min","range","matrix","matrix2d","matrix3d","unique","uniqueId","shortCode","NamespaceRef"],n;return e.includes(this.name)?n=this.name+"{ [QCObjects native code] }":n=t.call(this),n})},"_protected_code_"),P(Function),le=p(function(r){let t=[];for(let e in r)(typeof r[e]).toLowerCase()==="function"&&t.push(r[e]);return t},"_methods_")}}),R,q=w({"src/Package.ts"(){"use strict";Mn(),we(),R=p((r,t=[])=>{if(Object.hasOwn(Q,r)&&typeof Q[r]<"u"&&typeof Q[r]!="string"&&Object.hasOwn(Q[r],"length")&&Q[r].length>0&&typeof t<"u"&&Object.hasOwn(t,"length")&&t.length>0)t.forEach(e=>{Cn(e,r)}),Hn(r,Q[r].concat(t));else if(typeof t<"u"&&typeof t<"u"&&Object.hasOwn(t,"length")&&t.length>0)t.forEach(e=>{Cn(e,r)}),Hn(r,t);else if(fn(t))typeof t.__definition>"u"&&(t.__definition={}),t.__definition.__namespace=r,t.__namespace=r,Cn(t,r),Hn(r,[t]);else throw new Error(`An error ocurred. It was not possible to add classes to ${r}.`);return Object.hasOwn(Q,r)?Q[r]:[]},"Package")}}),G,U=w({"src/InheritClass.ts"(){"use strict";var r;T(),Po(),Ce(),he(),pe(),Pe(),jn(),$(),we(),q(),G=(r=class{get body(){return this._body}set body(e){this._body=e}constructor(e){typeof e<"u"&&typeof e.__definition<"u"&&(this.__definition={...e.__definition});let n=this;if(typeof e<"u"&&e!==null&&Object.keys(e).filter(function(o){return isNaN(o)&&!["__instanceID","__classType","__definition"].includes(o)}).forEach(function(o){typeof n[o]=="function"?n[o]=e[o].bind(n):n[o]=e[o]}),To(),n.__instanceID||Object.defineProperty(n,"__instanceID",{value:Ne,writable:!1}),typeof n.__definition<"u"&&Object.keys(n.__definition).filter(function(o){return isNaN(o)&&!["name","__instanceID","__classType","__definition"].includes(o)}).forEach(function(o){typeof n.__definition[o]=="function"?n[o]=n.__definition[o].bind(n):n[o]=n.__definition[o]}),le(Y[n.__classType]).map(function(o){return n[o.name]=o.bind(n),o}),le(n.__definition).map(function(o){return n[o.name]=o.bind(n),o}),typeof n._body>"u"||n._body===null){let o=J(n)||"div";try{y?n.body=ee(o):n.body={}}catch(i){d.debug(`An error ocurred: ${i}.`),n.body={}}}try{if(n.__new__.call(n,e),typeof n=="object"&&Object.hasOwn(n,"_new_")&&typeof n._new_.isCalled>"u")try{n._new_(e),n._new_.isCalled=!0}catch(o){d.warn(`${n.__classType}._new_() failed with error: ${o}`)}}catch(o){d.warn(o)}}static get __classType(){return Object.getPrototypeOf(this.constructor).name}get __classType(){return this.constructor.name}static hierarchy(e){let n=p(function(s){return Object.hasOwn(s,"__classType")?s.__classType:J.call(e,s)},"__classType"),o=p(s=>typeof s<"u"&&typeof s.__proto__<"u"&&s.__proto__!==null?(n(s)!==""?[n(s)]:[]).concat(o(s.__proto__)):[],"__hierarchy__proto__");(typeof e>"u"||e===null)&&(e=this);let i=[];return i.push(n(e)),i=i.concat(o(e.__proto__)),i}__new__(e){Te(e,this)}_new_(e){}static getParentClass(){return Object.getPrototypeOf(this.prototype.constructor)}getParentClass(){return this.constructor.getParentClass()}static getClass(){return Object.getPrototypeOf(this.constructor)}getClass(){return this.constructor.getClass()}css(e){return typeof this.body<"u"&&typeof this?.body!="string"&&typeof this?.body?.style<"u"&&(d.debug("body style"),this.body&&(this.body.style=ye(e,this?.body?.style))),typeof this.body!="string"?this?.body?.style:{}}hierarchy(){let e=this;return this.constructor.hierarchy(e)}append(e){let n=e||this.body;if(d.debug("append: start"),_e(n,"Component")&&(d.debug("append: child is a Component"),d.debug(`appending the body of ${n.name}`)),typeof this.body<"u")if(d.debug("append element"),arguments.length>0){if(d.debug("append to element"),typeof this.body!="string")if(typeof this.body?.append<"u")this?.body?.append(n);else throw Error("body.append is undefined. That means the body is not well formed.");else this.append(n);typeof this.childs>"u"&&(this.childs=[]),this.childs.push(n)}else y&&(d.debug("append to body"),document.body.append(n))}attachIn(e){if(y){let n=document.subelements(e);for(let o=0,i=n.length;o<i;o++)n[o].append(this)}else throw new Error("attachIn not yet implemented for non browser platforms")}},c(r,"InheritClass"),p(r,"InheritClass"),r),R("com.qcobjects",[G])}}),Ye,Ln,Dn=w({"src/isQCObjects.ts"(){"use strict";U(),Ye=p(function(r){return!!(typeof r=="object"&&Object.hasOwn(r,"__classType")&&r.__instanceID&&Object.hasOwn(r,"__definition")&&typeof r.__definition<"u")||r instanceof G},"isQCObjects_Object"),Ln=p(function(r){return!!(typeof r=="function"&&!r.__instanceID&&r.__definition&&typeof r.__definition<"u"&&r.__definition.__classType)||r.prototype instanceof G},"isQCObjects_Class")}}),_e,jn=w({"src/is_a.ts"(){"use strict";pe(),Dn(),Rn(),_e=p((r,t)=>!!(typeof r<"u"&&r!==null&&((Ln(r)||Ye(r))&&r.hierarchy().includes(t)||J(r)===t||gn(r)===t||typeof r===t)),"is_a")}}),Nr,ui=w({"src/is_forbidden_name.ts"(){"use strict";Nr=p(r=>["__proto__","prototype","Object","Map","defineProperty","indexOf","toString","__instanceID","function","Function"].indexOf(r)!==-1,"__is__forbidden_name__")}}),oo,Mo=w({"src/LegacyCopy.ts"(){"use strict";Mn(),oo=p(function(r,t){var n;let e;switch(!0){case typeof r=="string":e=r;break;case typeof r=="number":e=r;break;case typeof r=="object":e=[{...Object.keys(r).filter(o=>!t?.includes(o))}].map(o=>({[o]:r[o]})).reduce((o,i)=>Object.assign(o,i));break;case typeof r=="function":e=r.bind({});break;case fn(r):e=(n=class extends r{},c(n,"_value_"),p(n,"_value_"),n);break;default:break}return e},"_LegacyCopy")}}),on,Ro=w({"src/Class.ts"(){"use strict";we(),Ce(),he(),pe(),Po(),Pe(),jn(),ui(),Mo(),T(),$(),X(),on=p((r,t,e)=>{var s,a;let n={},o,i;switch(!0){case(!r&&!t&&!e):return class{};case(!!r&&!t&&!e):o=(s=class{},c(s,"type"),p(s,"type"),s),i={};break;case(!!r&&!t&&!!e):o=(a=class{},c(a,"type"),p(a,"type"),a),i=e;break;case(!!r&&!!t&&!!e):o=t,i=e;break;default:return class{}}if(typeof r!="string")throw new Error("Class name must be a string");if(typeof o!="function")throw new Error("Class type must be a function or class");if(Nr(r))throw new Error(`${r} is not an allowed word in the name of a class`);return typeof o.__definition=="object"&&o.__definition&&Object.keys(o.__definition).length!==0&&(i.__definition=Object.assign(oo(o.__definition,["name"]),o)),n[o.name]=o,typeof i>"u"||i===null?i={}:i={...i},typeof i.__instanceID<"u"&&delete i.__instanceID,Y[r]=class extends n[o.name]{constructor(l){super(l||{}),this.__definition={...i};let u=this;if(To(),u.__instanceID||Object.defineProperty(u,"__instanceID",{value:Ne,writable:!1}),typeof u.__definition<"u"&&Object.keys(u.__definition).filter(function(h){return isNaN(h)&&!["name","__instanceID","__classType","__definition"].includes(h)}).forEach(function(h){typeof u.__definition[h]=="function"?u[h]=u.__definition[h].bind(u):u[h]=u.__definition[h]}),le(Y[u.__classType]).map(function(h){return u[h.name]=h.bind(u),h}),le(u.__definition).map(function(h){return u[h.name]=h.bind(u),h}),typeof u._body>"u"||u._body===null){let h=J(u)||"div";try{y?u.body=ee(h):u.body={}}catch(f){d.debug(`An error ocurred: ${f}.`),u.body={}}}try{if(typeof u.__new__=="function"?u.__new__.call(u,l):typeof super.__new__=="function"&&(u.__new__=super.__new__.bind(u),u.__new__.call(u,l)),typeof u=="object"&&Object.hasOwn(u,"_new_")&&typeof u._new_.isCalled>"u")try{u._new_(l),u._new_.isCalled=!0}catch(h){d.warn(`${u.__classType}._new_() failed with error: ${h}`)}}catch(h){d.warn(h)}}get body(){return this._body}set body(l){this._body=l}static get __classType(){return Object.getPrototypeOf(this.constructor).name}get __classType(){return this.constructor.name}static hierarchy(l){let u=p(function(g){return Object.hasOwn(g,"__classType")?g.__classType:J.call(l,g)},"__classType"),h=p(g=>typeof g<"u"&&typeof g.__proto__<"u"&&g.__proto__!==null?(u(g)!==""?[u(g)]:[]).concat(h(g.__proto__)):[],"__hierarchy__proto__");(typeof l>"u"||l===null)&&(l=this);let f=[];return f.push(u(l)),f=f.concat(h(l.__proto__)),f}static getParentClass(){return Object.getPrototypeOf(this.prototype.constructor)}__new__(l){Te(l,this)}_new_(l){}getClass(){return Object.getPrototypeOf(this.constructor)}css(l){return typeof this.body<"u"&&typeof this?.body!="string"&&typeof this?.body?.style<"u"&&(d.debug("body style"),this.body&&(this.body.style=ye(l,this?.body?.style))),typeof this.body!="string"?this?.body?.style:{}}hierarchy(){let l=this;return this.getClass()?.hierarchy(l)}append(l){let u=l||this.body;if(d.debug("append: start"),_e(u,"Component")&&(d.debug("append: child is a Component"),d.debug(`appending the body of ${u.name}`)),typeof this.body<"u")if(d.debug("append element"),arguments.length>0){if(d.debug("append to element"),typeof this.body!="string")if(typeof this.body?.append<"u")this?.body?.append(u);else throw Error("body.append is undefined. That means the body is not well formed.");else this.append(u);typeof this.childs>"u"&&(this.childs=[]),this.childs.push(u)}else y&&(d.debug("append to body"),document.body.append(u))}attachIn(l){if(y){let u=document.subelements(l);for(let h=0,f=u.length;h<f;h++)u[h].append(this)}else throw new Error("attachIn not yet implemented for non browser platforms")}},Y[r]=Te(i,Y[r]),Y[r].__definition=i,Y[r].__definition.__classType=r,M[r]=Y[r],Y[r]},"Class"),typeof on.prototype<"u"&&(on.prototype.toString=function(){return"Class(name, type, definition) { [QCObjects native code] }"})}}),j,fe=w({"src/ClassFactory.ts"(){"use strict";Mn(),we(),j=p(r=>{let t;if(typeof r>"u"||r===null)throw Error("You need to pass a parameter {className}");if(r!==null&&r.indexOf(".")!==-1){let e=r.split(".").slice(0,r.split(".").length-1).join("."),n=r.split(".").slice(-1).join(""),i=(Q[e]||[]).filter(s=>fn(s)).reverse();if(i.length>0)t=i[0];else throw Error(`Class ${n} not found. Found classes: ${JSON.stringify(i)} in package ${e}`)}else if(r!==null){if(t=Or(r),typeof t>"u")throw new Error(`${r} is undefined.`)}else throw Error(`className is null. Unable to retrieve the class factory.
|
|
2
2
|
Not found in:
|
|
3
3
|
${Object.keys(Y).join(`
|
|
4
|
-
`)}`);return t},"ClassFactory")}}),xn,Mo=w({"src/Base64.ts"(){"use strict";var r;xn=(r=class{static encode(e){let n="",o,i,s,a,l,u,h,f=0;for(e=r._utf8_encode(e);f<e.length;)o=e.charCodeAt(f++),i=e.charCodeAt(f++),s=e.charCodeAt(f++),a=o>>2,l=(o&3)<<4|i>>4,u=(i&15)<<2|s>>6,h=s&63,isNaN(i)?u=h=64:isNaN(s)&&(h=64),n=n+this._keyStr.charAt(a)+this._keyStr.charAt(l)+this._keyStr.charAt(u)+this._keyStr.charAt(h);return n}static decode(e){let n="",o,i,s,a,l,u,h,f=0;for(e=e.replace(/[^A-Za-z0-9+/=]/g,"");f<e.length;)a=this._keyStr.indexOf(e.charAt(f++)),l=this._keyStr.indexOf(e.charAt(f++)),u=this._keyStr.indexOf(e.charAt(f++)),h=this._keyStr.indexOf(e.charAt(f++)),o=a<<2|l>>4,i=(l&15)<<4|u>>2,s=(u&3)<<6|h,n=n+String.fromCharCode(o),u!==64&&(n=n+String.fromCharCode(i)),h!==64&&(n=n+String.fromCharCode(s));return n=r._utf8_decode(n),n}static _utf8_encode(e){e=e.replace(/rn/g,"n");let n="";for(let o=0;o<e.length;o++){let i=e.charCodeAt(o);i<128?n+=String.fromCharCode(i):i>127&&i<2048?(n+=String.fromCharCode(i>>6|192),n+=String.fromCharCode(i&63|128)):(n+=String.fromCharCode(i>>12|224),n+=String.fromCharCode(i>>6&63|128),n+=String.fromCharCode(i&63|128))}return n}static _utf8_decode(e){let n="",o=0,i=0,s=0,a;for(;o<e.length;)i=e.charCodeAt(o),i<128?(n+=String.fromCharCode(i),o++):i>191&&i<224?(s=e.charCodeAt(o+1),n+=String.fromCharCode((i&31)<<6|s&63),o+=2):(s=e.charCodeAt(o+1),a=e.charCodeAt(o+2),n+=String.fromCharCode((i&15)<<12|(s&63)<<6|a&63),o+=3);return n}},c(r,"_Base64"),p(r,"Base64"),r._keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",r)}}),ue,Or,Me=w({"src/basePath.ts"(){"use strict";$(),ue=(function(){let r="";if(y){let t=document.baseURI.split("?")[0].split("/");t.pop(),r=t.join("/")+"/"}else try{let t=Cn("node:process");typeof t<"u"?r=`${t.cwd()}/`:r=""}catch{r=""}return r})(),Or=p(r=>{ue=r},"setBasePath")}}),I,ge=w({"src/DataStringify.ts"(){"use strict";To(),I=p(r=>JSON.stringify(r,p(function(){let e=new WeakSet,n=0;return function(o,i){if(typeof i=="object"&&i!==null){if(e.has(i))return n+=1,n<=3?ro(i):null;e.add(i)}return i}},"getCircularReplacer")()),"_DataStringify")}}),mn,Fn=w({"src/domain.ts"(){"use strict";mn=typeof location<"u"&&location.hostname!==""?location.hostname:"localhost"}}),Z,Re=w({"src/New.ts"(){"use strict";Z=p(function(r,t={}){if(t=arguments.length>1?t:{},typeof r>"u")return new Object;let e=new r(t);typeof t=="object"&&t!==null&&Object.keys(t).filter(o=>isNaN(o)&&!["__instanceID","__classType","__definition"].includes(o)).forEach(o=>{typeof t[o]=="function"?e[o]=t[o].bind(e):e[o]=t[o]});let n=typeof r.__definition=="object"&&r.__definition!==null?r.__definition:{};return e.__definition=Object.assign({},n),typeof e.__classType=="string"&&e.__classType!==""&&(e.__definition.__classType=e.__classType),e},"New"),Z.prototype.toString=function(){return"New(QCObjectsClassName, args) { [QCObjects native code] }"}}}),an,Ro=w({"src/secretKey.ts"(){"use strict";$(),an=y?location.host:"secret"}}),de,Sr,So,so=w({"src/Crypt.ts"(){"use strict";var r;Mo(),ge(),U(),q(),Ro(),de=(r=class extends G{constructor(){super(...arguments),this.string="",this.key="",this.last_string="",this.last_key="",this.construct=!1}encrypt(e,n){throw new Error("Method not implemented.")}decrypt(e,n){throw new Error("Method not implemented.")}_new_(e){let n=e.string,o=Object.hasOwn(e,"key")?e.key:"";this.__new__(e),o=o===""?this.__instanceID.toString():o,this.last_key=o,this.last_string=n,this.construct=!0}_encrypt(){let e=this.string,n=this.key,o="",i,s;for(let a=0;a<e.length;a++)i=e.substr(a,1),s=n.substr(a%n.length-1,1),i=String.fromCharCode(i.charCodeAt(0)+s.charCodeAt(0)),o+=i;return this.last_string=xn.encode(o),this.last_string}_decrypt(){let e=this.string,n=this.key,o="",i,s;e=xn.decode(e);for(let a=0;a<e.length;a++)i=e.substr(a,1),s=n.substr(a%n.length-1,1),i=String.fromCharCode(i.charCodeAt(0)-s.charCodeAt(0)),o+=i;return this.last_string=o,this.last_string}static encrypt(e,n){return new r({string:e,key:n!==""?n:"12345678ABC"})._encrypt()}static decrypt(e,n){return new r({string:e,key:n!==""?n:"12345678ABC"})._decrypt()}},c(r,"__Crypt"),p(r,"_Crypt"),r),Sr=p(function(t){return de.encrypt(I(t),an)},"_CryptObject"),So=p(function(t){return t===""?{}:JSON.parse(de.decrypt(t,an))},"_DecryptObject"),R("com.qcobjects",[de])}}),Ee,di=w({"src/ConfigSettings.ts"(){"use strict";var r;Me(),U(),q(),Ee=(r=class extends G{constructor(){super(...arguments),this._CONFIG={relativeImportPath:"",remoteImportsPath:"",remoteSDKPath:"https://sdk.qcobjects.dev/",asynchronousImportsLoad:!1,removePackageScriptAfterLoading:!0,componentsBasePath:"",delayForReady:0,preserveComponentBodyTag:!1,useConfigService:!1,routingWay:"hash",useSDK:!0,useLocalSDK:!1,basePath:ue},this._CONFIG_ENC=""}set(e,n){this._CONFIG[e]=n}get(e,n){return this._CONFIG[e]||n}static get instance(){return typeof r._instance>"u"&&(r._instance=new r),r._instance}},c(r,"_ConfigSettings"),p(r,"ConfigSettings"),r),R("com.qcobjects",[Ee])}}),v,ie=w({"src/CONFIG.ts"(){"use strict";var r;Me(),Ce(),so(),ge(),T(),bn(),Ro(),q(),U(),di(),v=(r=class extends G{get _CONFIG_ENC(){return Ee.instance._CONFIG_ENC}get _CONFIG(){return Ee.instance._CONFIG}set(e,n){d.debug(`CONFIG.set ${e}: ${n}`),e==="basePath"&&Or(n);let o;try{o=(function(i){i._CONFIG_ENC===null&&(i._CONFIG_ENC=de.encrypt(I({}),an));let s=i._CONFIG_ENC.valueOf(),a=i._CONFIG?.valueOf();return Te(a,So(s))})(Ee.instance)}catch(i){o={},console.error(i),d.debug("failed to encrypt config")}o[e]=n,Ee.instance._CONFIG_ENC=Sr(o),Ee.instance.set(e,n)}get(e,n){let o;try{let s=(function(a){a._CONFIG_ENC===null&&(a._CONFIG_ENC=de.encrypt(I({}),an));let l=a._CONFIG_ENC.valueOf(),u=a._CONFIG.valueOf();return Te(u,So(l))})(Ee.instance);typeof s[e]<"u"&&(o=s[e])}catch(s){console.error(s),d.debug("Something wrong when trying to get CONFIG values"),d.debug("No config value for: "+e),o=n}let i=be.processObject(o);return o===null&&i===null?null:i||n}static get instance(){return typeof r._instance>"u"&&(r._instance=new r),r._instance}static set(e,n){r.instance.set(e,n)}static get(e,n){return r.instance.get(e,n)}},c(r,"_CONFIG"),p(r,"CONFIG"),r),R("com.qcobjects",[v])}}),rn,be,bn=w({"src/Processor.ts"(){"use strict";var r;ie(),U(),Re(),X(),q(),rn=(r=class extends G{constructor({component:e,processors:n}){super({component:e}),this.processors={config(o,i){return v.get(i,"")},ENV(o,i){return typeof process<"u"?process.env[i]:""},global(o,i){return typeof M<"u"?M[i]:""}},this.processors=Object.assign({},this.processors,r._instance?.processors,n)}static get instance(){return typeof r._instance>"u"&&(r._instance=new r({component:null})),r._instance}static setProcessor(e){typeof e=="function"&&e.name!==""&&(r.instance.processors[e.name]=e)}setProcessor(e){typeof e=="function"&&e.name!==""&&(this.processors[e.name]=e)}static getProcessor(e){return r.instance.processors[e]}static getProcessorNames(){return Object.keys(r.instance.processors)}execute(e,n,o){let i=typeof e<"u"&&e!==null?e.processorHandler:this,s=typeof o=="string"?o.split(",").map(a=>a.trim()):[];return i?.processors[n].apply(i,[e,...s])}static process(e,n=null){return r.instance.process(e,n)}process(e,n=null){let o=n!==null?n.processorHandler:Z(r,{component:null});return typeof e=="string"&&Object.keys(o.processors).map(i=>[...e.matchAll(new RegExp("\\$"+i+"\\((.*)\\).*","g"))].map(function(s){let a=`$${i}(${s[1]})`;return e=e.replace(a,o.execute.bind(o).call(o,n,i,s[1])),s})),e}static processObject(e,n){return e==null?e:r.instance.processObject(e,n)}processObject(e,n=null){if(e==null)return e;let o=n===null?this:n.processorHandler;return typeof o>"u"&&(o=new r({component:n})),typeof e=="object"?Object.keys(e).map(i=>(typeof e[i]=="object"&&!Object.hasOwn(e[i],"call")?e[i]=o?.processObject.bind(o)(e[i],n):typeof e[i]=="string"&&(e[i]=o?.process.bind(o)(e[i],n)),i)):typeof e=="string"&&(e=o.process.bind(o)(e,n)),e}},c(r,"_Processor"),p(r,"Processor"),r),be=rn.instance,R("com.qcobjects",[rn])}}),Er,Nr,Eo,li=w({"src/routings.ts"(){"use strict";Er=p((r,t)=>{let e=r.path.replace(/{(.*?)}/g,"(?<$1>.*)");return{...[...t.matchAll(new RegExp(e,"g"))][0].groups}},"__routing_params__"),Nr=p(function(r,t){return r.filter(function(e){let n=e.path.replace(/{(.*?)}/g,"(?<$1>.*)");return new RegExp(n,"g").test(t)}).reverse()},"__valid_routings__"),Eo=p((r,t)=>r.includes(t),"__valid_routing_way__")}});function cn(r,t){let n=class n{constructor(i,s=[]){this.func=i,this.args=s}dispatch(){this.func.apply(this,...t,this)}};c(n,"AsyncCallback"),p(n,"AsyncCallback");let e=n;return Un.push(new e(r,t)),e}c(cn,"asyncLoad");var Un,ko,io=w({"src/asyncLoad.ts"(){"use strict";et(),$(),X(),Un=[],p(cn,"asyncLoad"),ko=p(()=>{y?document.addEventListener("readystatechange",()=>{document.readyState==="complete"&&Un.map(function(r){r.dispatch.call(r)})}):typeof M<"u"&&Un.map(function(r){r.dispatch.call(r)})},"_fireAsyncLoad"),S(cn)}}),dn,ao=w({"src/ComplexStorageCache.ts"(){"use strict";var r;Mo(),ge(),T(),dn=(r=class{constructor(e){let n,o,i=e.index;if(typeof i<"u"){n=e.load,o=e.alternate;let s=this.getID(i),a=localStorage.getItem(s);if(this.isEmpty(a)){let l=n.call(null,{cachedObjectID:s,cachedResponse:a,cache:this});this.save(i,l),d.debug("RESPONSE OF {{cachedObjectID}} CACHED".replace("{{cachedObjectID}}",s))}else o.call(null,{cachedObjectID:s,cachedResponse:a,cache:this}),d.debug("RESPONSE OF {{cachedObjectID}} IS ALREADY CACHED ".replace("{{cachedObjectID}}",s))}else throw new Error("ComplexStorageCache: index is undefined");return this}getItem(e){let n=localStorage.getItem(e);return this.isEmpty(n)?null:JSON.parse(n)}setItem(e,n){localStorage.setItem(e,I(n))}isEmpty(e){let n=!1;switch(!0){case typeof e>"u":case(typeof e=="string"&&e===""):case(typeof e=="string"&&e==="undefined"):case(typeof e=="number"&&e===0):case e===null:n=!0;break;default:n=!1}return n}getID(e){let n;return typeof e<"u"&&(n="cachedObject_"+xn.encode(I(e).replace(/\{|\}|,/g,"_"))),n}save(e,n){let o=this.getID(e);d.debug("CACHING THE RESPONSE OF {{cachedObjectID}} ".replace("{{cachedObjectID}}",o)),this.setItem(o,n)}getCached(e){let n=this.getID(e);return this.getItem(n)}clear(){Object.keys(localStorage).filter(function(e){return e.startsWith("cachedObject_")}).map(function(e){return localStorage.removeItem(e),e})}},c(r,"ComplexStorageCache"),p(r,"ComplexStorageCache"),r)}}),Gn,co=w({"src/serviceLoader.ts"(){"use strict";io(),ao(),ge(),T(),$(),X(),Gn=p(function(r,t=!1){let e=p(function(a){var l=new Promise(function(u,h){d.debug("LOADING SERVICE DATA {{DATA}} FROM {{URL}}".replace("{{DATA}}",I(a.data)).replace("{{URL}}",a.url));let f=new XMLHttpRequest;f.withCredentials=a.withCredentials,f.open(a.method,a.url,!0);for(let b in a.headers)try{typeof a.headers[b]!="function"&&f.setRequestHeader(b,a.headers[b])}catch(O){d.debug("Something went wrong when assign the header "+b),d.debug(`An error ocurred: ${O}`)}f.onload=function(){if(f.status===200){let O=f.responseText;if(d.debug("Data received {{DATA}}".replace("{{DATA}}",I(O))),d.debug("CREATING SERVICE {{NAME}}".replace("{{NAME}}",a.name)),a.template=O,a.cached&&typeof C<"u"&&C.save(a.name,a.template),typeof a.done=="function"){var b={request:f,service:a};a.done.call(a,b),u.call(l,b)}}else if(typeof a.fail=="function"){var b={request:f,service:a};a.fail.call(a,b),h.call(l,b)}};let m=p(function(){d.debug("SENDING THE NORMAL REQUEST ");try{f.send(I(a.data))}catch(b){d.debug("SOMETHING WRONG WITH REQUEST "),d.debug(`An error ocurred: ${b}`),h.call(l,{request:f,service:a})}},"_directLoad");if(a.cached){var C=new dn({index:a.data,load(){m.call(this)},alternate(b){if(a.method==="GET"){if(a.template=b.cache.getCached(a.name),typeof a.done=="function"){let O={request:f,service:a};a.done.call(a,O),u.call(l,O)}}else m()}});M.lastCache=C}else m();return f});return l},"_serviceLoaderInBrowser"),n=p(function(a){var l=new Promise(function(u,h){if(typeof URL>"u"){global.URL=xe("url").URL;let b=global.URL}let f=new URL(a.url);var g;a.useHTTP2=Object.hasOwn(a,"useHTTP2")&&a.useHTTP2;let m=p(function(b){d.debug("LOADING SERVICE DATA (non-browser) {{DATA}} FROM {{URL}}".replace("{{DATA}}",I(a.data)).replace("{{URL}}",a.url));let O,x={http2Client:C,request:b,service:a,responseHeaders:null};if(typeof a.data=="object"&&a.data!==null&&a.useHTTP2)try{d.debug("Sending data...");let B=new Buffer(I(a.data));b.write(B)}catch(B){d.debug("It was not possible to send any data"),d.debug(`An error ocurred: ${B}`)}O="",b.on("response",B=>{d.debug("receiving response..."),x.responseHeaders=B,O=""}),b.on("data",B=>{d.debug("receiving data..."),O+=""+B.toString(),a.template=O}),a.useHTTP2&&b.resume(),b.on("end",()=>{d.debug("ending call..."),a.template=O,Object.hasOwn(a,"useHTTP2")&&a.useHTTP2?C.destroy():b.destroy(),a.done.call(a,x),u.call(l,x)}),a.useHTTP2&&b.end()},"captureEvents");try{let b;if(a.useHTTP2){d.debug("using http2");var C=xe("http2").connect(f.origin);b=Object.assign({":method":a.method,":path":f.pathname},a.options),b=Object.assign(b,a.headers),g=C.request(b),g.setEncoding("utf8"),m(g)}else if(f.protocol==="http:"){let x=xe("http").request;b=Object.assign({url:a.url,headers:a.headers},a.options),g=x(a.url),m(g)}else if(f.protocol==="https:"){let O=xe("https");b=Object.assign({hostname:f.hostname,port:f.port,path:f.pathname,method:a.method,headers:a.headers},a.options),O.request(b,function(B){m(B)}).end()}else{let O="Protocol not supported: "+f.protocol;throw d.debug(O),new Error(O)}}catch(b){d.debug(b),a.fail.call(a,b),h.call(l,b)}}).catch(u=>{d.debug(`Something happened when trying to call the service: ${a.name}. Error: ${u}`),a.fail.call(a,u)});return l},"_serviceLoaderInNode"),o=p(function(a){var l=new Promise(function(u){d.debug(`Calling mockup service ${a.name} ...`);let h={request:null,service:a,responseHeaders:a.responseHeaders};typeof a.mockup=="function"?a.mockup.call(a,h):a.done.call(a,h),u.call(l,h)});return l},"_serviceLoaderMockup"),i=p(function(a){var l=new Promise(function(u){d.debug(`Calling local service ${a.name} ...`);let h={request:null,service:a,responseHeaders:a.responseHeaders};typeof a.local=="function"?a.local.call(a,h):a.done.call(a,h),u.call(l,h)});return l},"_serviceLoaderLocal"),s;switch(r.kind){case"rest":y?typeof t<"u"&&t?s=cn(e,[r,t]):s=e(r):s=n(r);break;case"mockup":s=o(r);break;case"local":s=i(r);break;default:d.debug(`The value of the kind property of the service ${r.name} is not valid`),s=Promise.resolve();break}return s},"serviceLoader")}}),lo,Lo=w({"src/tag_filter.ts"(){"use strict";lo="quick-component:not([loaded]),component:not([loaded])"}}),An,Do=w({"src/componentLoader.ts"(){"use strict";io(),ao(),ge(),T(),$(),X(),An=p(function(r,t){let e,n=p(function(s){return e=new Promise(function(a,l){let u=s.__promise__;if((Object.hasOwn(s,"container")&&typeof s.container<"u"&&s.container!==null?s.container:s.body)!==null){let C=p(function(O){O.feedComponent();let x={request:g,component:O};a.call(u,x)},"_feedComponent_");d.debug("LOADING COMPONENT DATA {{DATA}} FROM {{URL}}".replace("{{DATA}}",I(s.data)).replace("{{URL}}",s.url));let b=p(function(){let O=f?0:200;if(g.status===O){let x=g.responseText;d.debug("Data received {{DATA}}".replace("{{DATA}}",I(x))),d.debug("CREATING COMPONENT {{NAME}}".replace("{{NAME}}",s.name)),s.template=x,s.cached&&typeof m<"u"&&m.save(s.cacheIndex,s.template),C(s)}else{let x={request:g,component:s};l.call(u,x)}},"_componentLoaded");if(typeof s.template=="string"&&s.template!=="")C(s);else{var f=!!s.url.startsWith("file:"),g=new XMLHttpRequest;if(f)"fetch"in M&&(d.debug("I can use fetch..."),d.debug("It is a file to be loaded, so I will try to use fetch"),fetch(s.url).then(x=>{d.debug("I got a response from fetch, so I'll feed the component"),x.text().then(B=>{s.template=B,C(s)}).catch(B=>{throw new Error(`An error ocurred: ${B}`)})}).catch(x=>{throw new Error(`An error ocurred: ${x}`)}));else try{d.debug("Calling the url of component in async mode."),g.open(s.method,s.url,!0)}catch(x){d.debug(`An error ocurred: ${x}.`),d.debug("Last try has failed... The component cannot be loaded.")}!oo&&!f&&g.setRequestHeader("Content-Type","text/html"),f||(g.onload=b);let O=p(function(x){x=!(typeof x>"u"||!x),d.debug("SENDING THE NORMAL REQUEST "),x?"fetch"in M||(d.debug("I have to try to load the file using xhr... "),g.send(null),g.status===XMLHttpRequest.DONE&&b()):(d.debug("Trying to send the data to the component... "),g.send(I(s.data)))},"_directLoad");if(s.cached&&!f){d.debug("USING CACHE FOR COMPONENT: "+s.name);var m=new dn({index:s.cacheIndex,load(){O.call(this,f)},alternate(x){s.method==="GET"?(s.template=x.cache.getCached(s.cacheIndex),C.call(this,s)):O.call(this,f)}});M.lastCache=m}else d.debug("NOT USING CACHE FOR COMPONENT: "+s.name),O(f)}}else d.debug("CONTAINER DOESNT EXIST")}),e.then(function(a){return s.__done__().then(function(){let l;return typeof s.done=="function"&&(l=s.done.call(s,a)),Promise.resolve(l)})},function(a){return typeof s.fail=="function"&&s.fail.call(s,a).catch(l=>{throw new Error(`${l}`)}),Promise.reject(new Error("An error ocurred"))}).catch(function(a){throw d.debug("Something wrong loading the component"),new Error(`An error ocurred: ${a}`)}),e},"_componentLoaderInBrowser"),o=p(function(s){return e=new Promise(function(a,l){let u=e,h=p(function(m){m.feedComponent().catch(b=>{throw new Error(`An error ocurred trying to feed the component: ${m.name}. Error: ${b}`)});let C={request:null,component:m};a.call(u,C)},"_feedComponent_");d.debug("LOADING COMPONENT DATA {{DATA}} FROM {{URL}}".replace("{{DATA}}",I(s.data)).replace("{{URL}}",s.url));let f=p(function(m,C){if(m){let b={request:null,component:s};l.call(u,b)}else{let b=C.toString();d.debug("Data received {{DATA}}".replace("{{DATA}}",I(b))),d.debug("CREATING COMPONENT {{NAME}}".replace("{{NAME}}",s.name)),s.template=b,s.cached&&typeof g<"u"&&g.save(s.cacheIndex,s.template),h(s)}},"_componentLoaded");if(typeof s.template=="string"&&s.template!=="")h(s);else{d.debug("Loading the component as a local file in server...");let m=p(function(){let{readFile:C}=Cn("node:fs");d.debug("SENDING THE NORMAL REQUEST "),C(s.url,f)},"_directLoad");if(s.cached){d.debug("USING CACHE FOR COMPONENT: "+s.name);var g=new dn({index:s.cacheIndex,load(){m()},alternate(C){s.method==="GET"?(s.template=C.cache.getCached(s.cacheIndex),h.call(this,s)):m.call(this)}});M.lastCache=g}else d.debug("NOT USING CACHE FOR COMPONENT: "+s.name),m()}}),e.then(function(a){return s.__done__().then(function(){let l;return typeof s.done=="function"&&(l=s.done.call(s,a)),Promise.resolve(l)})},function(a){return typeof s.fail=="function"&&s.fail.call(s,a).catch(l=>{throw new Error(`An error ocurred: ${l}`)}),Promise.reject(new Error("An error ocurred."))}).catch(function(a){d.debug(`Something wrong loading the component: ${a}`)}),e},"_componentLoaderInNode"),i;return y?typeof t<"u"&&t?i=cn(n,[r,t]):i=n(r):i=o(r),i},"componentLoader")}}),qe,jo=w({"src/Component.ts"(){"use strict";var r;Mo(),Me(),Ce(),fe(),uo(),ge(),Fn(),he(),pe(),U(),Pe(),qn(),$n(),T(),Re(),q(),$(),bn(),li(),X(),ie(),co(),Lo(),Do(),qe=(r=class extends G{constructor({__parent__:e,templateURI:n="",template:o,tplsource:i="default",tplextension:s,url:a="",name:l="",method:u="GET",data:h={},reload:f=!1,shadowed:g=!1,cached:m=!0,enableServiceClass:C,assignRoutingParams:b=!0,_body:O=ee("div"),__promise__:x=null,__shadowRoot:B,body:se,shadowRoot:wn,splashScreenComponent:Js,controller:Xs,view:Ks}){if(arguments.length<1)throw Error("No arguments in component. You must at least give one argument.");super({__parent__:e,templateURI:n,template:o,tplsource:i,tplextension:s,url:a,name:l,method:u,data:h,reload:f,shadowed:g,cached:m,enableServiceClass:C,assignRoutingParams:b,_body:O,__promise__:x,__shadowRoot:B,body:se,shadowRoot:wn,splashScreenComponent:Js,controller:Xs,view:Ks}),this.validRoutingWays=["pathname","hash","search"],this.basePath=ue,this.domain=mn,this.templateHandler="DefaultTemplateHandler",this.routingWay=null,this.routingNodes=[],this.routings=[],this.routingPath="",this.routingPaths=[],this._componentHelpers=[],this.subcomponents=[],this.splashScreenComponent=void 0,this.controller=void 0,this.routingController=void 0,this.view=void 0,this.effect=void 0,this.method="GET",this.cached=!0,this.__promise__=null,this.__namespace=void 0,this._serviceClassName=null,this.enableServiceClass=!0,this.shadowed=!1,this.assignRoutingParams=!0;let D=this;typeof l<"u"&&(D.name=l),typeof D.name>"u"&&typeof l>"u"&&d.warn("A name is not defined for "+J(D)),D.routingWay=v.get("routingWay"),D.processorHandler=new rn({component:D}),D.data=typeof D.data>"u"||D.data===null?{}:D.data,D.data=Object.assign(D.data,D.dataAttributes),D.createServiceInstance().then(()=>{typeof D.__new__=="function"&&D.__new__(D),D._generateRoutingPaths(D.body).then(function(){D._reroute_().then(function(){return D.rebuild().then(function(){d.info(`Component._new_ The component ${D.name} was built successfully!`)}).catch(function(De){d.warn(`Component._new_ Something went wrong building the component ${D.name}`),console.error(`Component._new_ Something went wrong building the component ${D.name}`,De)})}).catch(De=>{throw Error(`Unexpected error ${De}`)})}).catch(De=>{throw Error(`Unexpected error ${De}`)})}).catch(De=>{throw Error(`Unexpected error. ${De}`)})}set cacheIndex(e){d.debug("[cacheIndex] This property is readonly")}get cacheIndex(){let e=this,n=I(e.routingPath);return xn.encode(e.name+n)}set parsedAssignmentText(e){d.debug("[parsedAssignmentText] This property is readonly")}get parsedAssignmentText(){let e=this;if(e._parsedAssignmentText=e.parseTemplate(e.template),typeof e._parsedAssignmentText>"u")throw Error(`[Component][${this.name}][parsedAssignmentText] Could not generate content!`);return e._parsedAssignmentText}set shadowRoot(e){let n=this;typeof n.__shadowRoot>"u"?n.__shadowRoot=e:d.debug("[shadowRoot] This property can only be assigned once!")}get shadowRoot(){return this.__shadowRoot}set routingSelected(e){d.debug("[routingSelected] This is a read-only property of the component")}get routingSelected(){let e=this;return Nr(e.routings,e.routingPath)}set routingParams(e){d.debug("[routingParams] This is a read-only property of the component")}get routingParams(){let e=this;return[{}].concat(e.routingSelected.map(function(n){return Er(n,e.routingPath)})).reduce(function(n,o){return Object.assign(n,o)})}set serviceClassName(e){this._serviceClassName=e}get serviceClassName(){let e="";return y?e=this.body.getAttribute("serviceClass")!==null?this.body.getAttribute("serviceClass"):this._serviceClassName:e=this._serviceClassName,e}get responseToData(){let e=!1;return y?e=this.body.getAttribute("response-to")==="data"||this.responseTo==="data":e=this.responseTo==="data",e}get responseToTemplate(){let e=!1;return y?e=this.body.getAttribute("response-to")==="template"||this.responseTo==="template":e=this.responseTo==="template",e}createServiceInstance(){let e=this,n=this.data,o,i=e.getClass().__definition,s=e.serviceClassName;return new Promise(function(a,l){let u=e.enableServiceClass,h=e.responseToData,f=e.responseToTemplate;if(u&&s!==null&&(o=j(s)),!h&&i&&Object.hasOwn(i,"responseTo")?h=i.responseTo==="data":!h&&Object.hasOwn(j("Component"),"responseTo")&&(h=j("Component").responseTo==="data"),!f&&i&&Object.hasOwn(i,"responseTo")?f=i.responseTo==="template":!f&&Object.hasOwn(j("Component"),"responseTo")&&(f=j("Component").responseTo==="template"),typeof o<"u"&&typeof u<"u"&&u===!0&&(h||f)){d.info("Loading service "+s);let g=Z(o,{data:n});Gn(g)?.then(function({service:m}){let C;typeof m.JSONresponse<"u"&&m.JSONresponse!==null?C=m.JSONresponse:C=m.template,h&&(typeof n=="object"&&typeof C=="object"?n=Object.assign(n,C):n=C,e.data=n),e.serviceInstance=g,e.serviceData=n,f&&(e.template=C),a(C)},function(m){d.debug(`Service loading rejected for ${s} in ${e.name}`),l(m)}).catch(function(m){throw d.debug("Something went wroing while trying to load the service "+s),Error(`Error loading ${s} for ${e.name}. Detail: ${m}`)})}else a(null)})}_bindroute_(){let e=this;e._bindroute_.loaded?d.debug(`Routes already bound to popstate events for ${e.name}`):(y&&e.hostElements("a").map(function(n){return n.oldclick=n.onclick,n.onclick=function(o){let i=!0;ce("routingPaths")||pn("routingPaths",[]);let s=v.get("routingWay"),a=o.target[s];return ce("routingPaths").includes(a)&&o.target[s]!==location[s]&&o.target.href!==document.location.href?(d.debug("A ROUTING WAS FOUND: "+a),window.history.pushState({href:o.target.href},o?.target?.href,o.target.href),r.route().catch(l=>{throw Error(`Unexpected error: ${l}`)}),i=!1):d.debug("NO ROUTING FOUND FOR: "+a),typeof o.target.oldclick<"u"&&typeof o.target.oldclick=="function"&&o.target.oldclick.call(o.target,o),i},null}),e._bindroute_.loaded=!0)}done(e){return new Promise(o=>{if(typeof e<"u"){let{request:i,component:s}=e;o({request:i,component:s})}else o({request:void 0,component:void 0})})}createControllerInstance(){let e;if(y){if(typeof this.body>"u")throw new Error("The component has no body");var n=this.body.getAttribute("controllerClass");n||(n="Controller"),e=j(n),typeof e<"u"&&(this.controller=Z(e,{component:this}))}return new Promise((o,i)=>{if(y&&typeof e<"u"&&typeof this.controller<"u"){if(typeof this.controller.done=="function")try{this.controller.done.call(this.controller)}catch(s){throw Error(s)}else d.debug(`${n} does not have a done() method.`),i(new Error(`${n} does not have a done() method.`));typeof this.controller.createRoutingController=="function"?this.controller.createRoutingController.call(this.controller):d.debug(`${n} does not have a createRoutingController() method.`)}o({component:this,controller:this.controller})})}createEffectInstance(){let e=this;return new Promise(function(n){if(y){let o=e.body?.getAttribute("effectClass"),i=e.body?.getAttribute("apply-effect-to");i=i!==null?i:"load",o!==null&&i==="observe"?e.applyObserveTransitionEffect(o):o!==null&&i==="load"&&e.applyTransitionEffect(o)}n({component:e,effect:e.effect})})}createViewInstance(){let e=this;return new Promise(function(n){let o=y?e.body.getAttribute("viewClass"):null;if(o!==null){let i=j(o);typeof i<"u"&&(e.view=Z(i,{component:e}),Object.hasOwn(e.view,"done")&&typeof e.view?.done=="function"&&e.view?.done.call(e.view))}n({component:e,view:e.view})})}__done__(){let e=this,n=p(function(){if(typeof e>"u")throw new Error("componentDone() has lost its context");if(typeof e.body>"u")throw new Error("The component has no body");(async()=>{await e.createViewInstance(),await e.createControllerInstance(),await e.createEffectInstance()})().catch(o=>{throw new Error(`Unknown error ${o}.`)}),d.debug(`Trying to run component helpers for ${e.name}...`);try{e.runComponentHelpers(),d.debug(`Component helpers for ${e.name} executed.`)}catch(o){throw d.debug(`Component helpers for ${e.name} could not be executed.`),Error(o)}e.subcomponents=e.__buildSubComponents__(),e._bindroute_(),y&&e.body.setAttribute("loaded","true")},"componentDone");return new Promise(function(o,i){try{o(n.call(e))}catch(s){i(new Error(s))}})}hostElements(e){let n=this,o=[];if(y)if(n.shadowed&&typeof n.shadowRoot<"u"&&n.shadowRoot!==null){o=n.shadowRoot.subelements(e);let s=n.container??n.body,a=typeof s<"u"&&s!==null?s.querySelector(".shadowHost"):null;a!==null&&typeof a<"u"&&a.subelements(e).forEach(u=>{o.includes(u)||o.push(u)})}else o=n.body.subelements(e);return o}get subtags(){let e=this,n=lo;return e.hostElements(n)}get bodyAttributes(){let n=this.body;return y?[...n.getAttributeNames()].map(o=>({[o]:n.getAttribute(o)})).reduce((o,i)=>Object.assign(o,i)):{}}get dataAttributes(){let n=this.body;return y?[{}].concat([...n.getAttributeNames()].filter(o=>o.startsWith("data-")).map(o=>({[o.split("-")[1]]:n.getAttribute(o)}))).reduce((o,i)=>Object.assign(o,i)):{}}__buildSubComponents__(e=!1){let n=this,o=n.subtags;return e||(o=o.filter(i=>!Sn(i,"loaded"))),(typeof n<"u"||n.subcomponents.length<1)&&(n.subcomponents=Jn(o,n)),n.subcomponents}fail(e){return new Promise((o,i)=>{if(typeof e<"u"){let{error:s,component:a}=e;o({error:s,component:a})}else i(new Error(" Unknown error."))})}set(e,n){this[e]=n}get(e,n){return this[e]||n}feedComponent(){let e=this;d.debug(`[Component][${this.name}][feedComponent] start feeding component...`);let n=p(function(s){if(typeof s.container>"u"&&typeof s.body>"u"){d.warn("COMPONENT {{NAME}} has an undefined container and body".replace("{{NAME}}",s.name));return}let a=typeof s.container>"u"||s.container===null?s.body:s.container,l=s.parsedAssignmentText;if(s.innerHTML=l,s.shadowed){d.debug("COMPONENT {{NAME}} is shadowed".replace("{{NAME}}",s.name)),d.debug("Preparing slots for Shadowed COMPONENT {{NAME}}".replace("{{NAME}}",s.name));let u=ee("div");a.subelements("[slot]").map(f=>(f.parentElement===a&&u.appendChild(f),f)),d.debug("Creating shadowedContainer for COMPONENT {{NAME}}".replace("{{NAME}}",s.name));let h=ee("div");h.classList.add("shadowHost");try{s.shadowRoot=h.attachShadow({mode:"open"})}catch(f){d.debug(`An error ocurred: ${f}.`);try{d.debug("Shadowed COMPONENT {{NAME}} is repeated".replace("{{NAME}}",s.name)),s.shadowRoot=h.shadowRoot}catch(g){d.debug(`An error ocurred: ${g}.`),d.warn("Shadowed COMPONENT {{NAME}} is not allowed on this browser".replace("{{NAME}}",s.name))}}if(typeof s.shadowRoot<"u"&&s.shadowRoot!==null){s.reload?(d.debug("FORCED RELOADING OF CONTAINER FOR Shadowed COMPONENT {{NAME}}".replace("{{NAME}}",s.name)),h!==null&&h.shadowRoot!==null&&(h.shadowRoot.innerHTML=s.innerHTML)):(u.innerHTML=s.parseTemplate(u.innerHTML),d.debug("ADDING Shadowed COMPONENT {{NAME}} ".replace("{{NAME}}",s.name)),h!==null&&h.shadowRoot!==null&&(h.shadowRoot.innerHTML+=s.innerHTML)),d.debug("ADDING Slots to Shadowed COMPONENT {{NAME}} ".replace("{{NAME}}",s.name)),h.innerHTML+=u.innerHTML,d.debug("APPENDING Shadowed COMPONENT {{NAME}} to Container ".replace("{{NAME}}",s.name));let f=a.querySelector(".shadowHost");typeof f<"u"&&f!==null?(d.debug("Shadowed Container for COMPONENT {{NAME}} is already present in the tree ".replace("{{NAME}}",s.name)),s.shadowRoot!==null&&h.shadowRoot!==null&&(s.shadowRoot.innerHTML=h.shadowRoot.innerHTML)):a.appendChild(h)}else d.warn("Shadowed COMPONENT {{NAME}} is bad configured".replace("{{NAME}}",s.name))}else s.reload?(d.debug("FORCED RELOADING OF CONTAINER FOR COMPONENT {{NAME}}".replace("{{NAME}}",s.name)),a.innerHTML=s.innerHTML):a&&s?(d.debug("ADDING COMPONENT {{NAME}} ".replace("{{NAME}}",s.name)),a.innerHTML+=s.innerHTML):d.warn("COMPONENT {{NAME}} is not added to the DOM".replace("{{NAME}}",s.name))},"_feedComponent_InBrowser"),o=p(function(s){let a=s.parsedAssignmentText;s.innerHTML=a},"_feedComponent_InNode"),i;return _e(e,"Component")?new Promise((s,a)=>{if(y)try{i=n(e),s(i)}catch(l){a(new Error(l))}else try{i=o(e),s(i)}catch(l){a(new Error(l))}}):(d.warn("Trying to feed a non component object"),Promise.reject(new Error(`Trying to feed a non component object ${typeof e}`)))}rebuild(){let e=this;var n=new Promise(function(o,i){if((typeof e>"u"||e===null)&&i(new Error("Component is undefined")),Ye(e)&&_e(e,"Component"))switch(!0){case e.get("tplsource")==="none":d.debug("Component "+e.name+" has specified template-source=none, so no template load was done");var s={request:void 0,component:e};e.__done__().then(function(){typeof e.done=="function"&&e.done.call(e,s).catch(a=>{d.debug(`It was an error while calling done() in ${e.name}: ${a}`)}),o.call(n,s)},function(){i.call(n,s)});break;case e.get("tplsource")==="inline":d.debug("Component "+e.name+" has specified template-source=inline, so it is assumed that template is already declared"),(async a=>{await a.feedComponent.bind(a)()})(e).catch(a=>{d.debug(`It was not possible to feed the component ${e.name}: ${a}`)});var s={request:void 0,component:e};e.__done__().then(async()=>{typeof e.done=="function"&&await e.done(s),o.call(n,s)},function(){i.call(n,s)});break;case(e.get("tplsource")==="default"&&e.get("templateURI")!==""):e.set("url",e.get("basePath")+e.get("templateURI")),An(e,!1)?.then(function(a){o.call(n,a)},function(a){i.call(n,a)});break;case(e.get("tplsource")==="external"&&e.get("templateURI")!==""):e.set("url",e.get("templateURI")),An(e,!1).then(function(a){o.call(n,a)},function(a){i.call(n,a)});break;case(e.get("tplsource")==="default"&&e.get("templateURI","")===""):d.debug(`Component ${e.name} template-source is ${e.get("tplsource")} and no templateURI is present`),i.call(n,`Component ${e.name} template-source is ${e.get("tplsource")} and no templateURI is present`);break;default:d.debug("Component "+e.name+" will not be rebuilt because no templateURI is present"),i.call(n,{request:null,component:e});break}});return n}Cast(e){let n=le(e).map(o=>o.name.replace(/bound /g,"")).map(o=>({[o]:e[o].bind(this)})).reduce((o,i)=>Object.assign(o,i),{});return ye(this,n)}route(){return this.constructor.route()}static route(){let e=this,n,o=!!(Ye(e)&&_e(e,"Component")),i=p(function(s){let a=[],l=s.filter(function(u){return typeof u<"u"}).map(function(u){if(typeof u.name<"u")a.push(u.name);else throw new Error(J(u)+" does not have a name");return new Promise(function(h,f){typeof u<"u"&&u._reroute_?u._reroute_().then(function(){u.reload=!0,u.rebuild().then(()=>{h()}).catch(g=>{d.debug(`Error ${g}`)})}).then(function(){if(Object.hasOwn(u,"subcomponents")&&typeof u.subcomponents<"u"&&u.subcomponents.length>0)return d.debug("LOOKING FOR ROUTINGS IN SUBCOMPONENTS FOR: "+u.name),i.call(u,u.subcomponents);d.debug("No subcomponents to look for routings in: "+u.name),u.subtags.length>0&&(u.subcomponents=u.__buildSubComponents__(!0)),h()}).catch(g=>{d.debug(`Error: ${g}`)}):typeof u<"u"&&f(new Error("Component "+u.name+" is not an instance of Component"))})});return Promise.all(l).then(function(){d.debug("ROUTING COMPLETED FOR "+a.join(", "))}).catch(function(u){d.warn("ROUTING FAILED FOR "+a.join(", ")+": "+u)})},"__route__");if(o||un)o&&d.debug("loading routings for instance "+e.name),n=i.call(e,o?e.subcomponents:un);else throw d.debug("An undetermined result expected if load routings. So will not be loaded this time."),Error("There is no valid instance and no components stack available to apply rountings");return n}fullscreen(){if(y){let e=this.body;e.requestFullscreen?e.requestFullscreen().catch(n=>{throw new Error(`An error ocurred when requesting fullscreen: ${n}`)}):e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.msRequestFullscreen&&e.msRequestFullscreen()}}closefullscreen(){y&&(document.exitFullscreen?document.exitFullscreen().catch(e=>{throw new Error(`An error ocurred when trying to exit fullscrenn ${e}.`)}):document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen())}_generateRoutingPaths(e){let n=this;return new Promise(function(o){y&&Eo(n.validRoutingWays,n.routingWay||"")&&typeof e<"u"&&(n.innerHTML=e?.innerHTML,n.routingNodes=e?.subelements("routing"),n.routings=[],n.routingNodes.map(i=>{let s=i.getAttributeNames(),a={};return s.map((l,u)=>(a[s[u]]=i.getAttribute(s[u]),l)),n.routings.push(a),n.routingPaths||(n.routingPaths=[]),n.routingPaths.includes(a.path)||n.routingPaths.push(a.path),ce("routingPaths")||pn("routingPaths",[]),ce("routingPaths").includes(a.path)||ce("routingPaths").push(a.path),i})),o()})}parseTemplate(e){let n=this,o,i=e;if(Object.hasOwn(n,"templateHandler")){let s=n.templateHandler;d.debug(`[Component][${this.name}][parseTemplate] Attempting to use ${s} ...`);let a=j(s),l=Z(a,{component:n,template:i});l.component=n;let u=n.data;if(Object.hasOwn(n,"assignRoutingParams")&&n.assignRoutingParams)try{u=Object.assign(u,n.routingParams)}catch(h){d.debug(`An error ocurred: ${h}.`),d.debug("[parseTemplate] it was not possible to assign the routing params to the template")}o=l.assign(u)}else d.debug(`[Component][${this.name}][parseTemplate] No value for templateHandler. Using raw content...`),o=i;return o}_reroute_(){let e=this;return new Promise(function(n){y&&Eo(e.validRoutingWays,e.routingWay||"")&&(e.routingPath=location[e.routingWay],e.routingSelected.map(o=>{let i=In({COMPONENTS_BASE_PATH:v.get("componentsBasePath"),COMPONENT_NAME:o.name.toString(),TPLEXTENSION:Object.hasOwn(o,"tplextension")?o.tplextension||"":e.tplextension,TPL_SOURCE:"default"});return e.templateURI=i,o}),e.routingSelected.length>0&&(e.template="",typeof e.body<"u"&&e.body!==null&&(e.body.innerHTML=""))),n(e)})}lazyLoadImages(){if(y){let n=this.componentRoot;if(typeof n<"u"&&n!==null){let o=[...n.subelements("img[lazy-src]")],i=p(function(s){s.setAttribute("src",s.getAttribute("lazy-src")?.toString()),s.onload=()=>{s.removeAttribute("lazy-src")}},"_lazyLoadImages");if("IntersectionObserver"in window){let s=new IntersectionObserver((a,l)=>{a.forEach(u=>{u.isIntersecting&&(i(u.target),l.unobserve(u.target))})});o.map(function(a){return s.observe(a)})}else o.map(i)}}return null}applyTransitionEffect(e){let n=j(e);if(typeof n>"u")throw Error(`${e} not found.`);typeof n<"u"&&_e(n,"TransitionEffect")?(this.effect=Z(n,{component:this}),this.effect?.apply(this.effect?.defaultParams)):d.debug(`${e} is ${J(n)} but is not a TransitionEffect`)}applyObserveTransitionEffect(e){if(y){let n=this,o=n.componentRoot,i=p(function(){n.applyTransitionEffect(e)},"_applyEffect_");if("IntersectionObserver"in window){let s=new IntersectionObserver((l,u)=>{l.forEach(h=>{h.isIntersecting&&(i(),u.unobserve(h.target))})}),a=typeof o<"u"&&o!==null&&typeof o.getBoundingClientRect!="function"?o.host??o:o;s.observe(a)}else i()}}get componentRoot(){return this.shadowed?this.shadowRoot:this.body}scrollIntoHash(){if(y){let e=this;document.location.hash!==""&&(e.componentRoot?.subelements(document.location.hash)).map(o=>(typeof o.scrollIntoView=="function"&&o.scrollIntoView(v.get("scrollIntoHash",{behavior:"auto",block:"top",inline:"top"})),o))}}i18n_translate(){if(y&&v.get("use_i18n")){let e=this,n=e.componentRoot,o=v.get("lang","en"),i=navigator.language.slice(0,2),s=ce("i18n");o!==i&&typeof s=="object"&&Object.hasOwn(s,"messages")&&p(()=>new Promise(function(l){let u=s.messages.filter(function(h){return Object.hasOwn(h,o)&&Object.hasOwn(h,i)});(n?.subelements("ul,li,h1,h2,h3,a,b,p,input,textarea,summary,details,option,component")).map(h=>(u.map(function(f){let g=h.innerHTML;return g=g?.replace(new RegExp(`${f[o]}`,"g"),f[i]),h.innerHTML=g,null}),h)),l()}),"callback_i18n").call(e).then(function(){d.debug("i18n loaded for component: "+e.name)}).catch(l=>{throw new Error(`An error ocurred when parsing i18n: ${l}.`)})}}addComponentHelper(e){this._componentHelpers.push(e)}runComponentHelpers(){if(y){let e=this,n=[];n.push(e.i18n_translate.bind(e)),n.push(e.scrollIntoHash.bind(e)),n.push(e.lazyLoadImages.bind(e)),n=n.concat(e._componentHelpers),n.map(o=>(d.debug(`Executing ${o.name} as component helper for ${e.name}...`),o(),o))}}},c(r,"_Component"),p(r,"Component"),r.shadowed=!1,r.cached=!0,r),R("com.qcobjects",[qe]),le(j("Component")).map(t=>(P(t),t))}}),In,Sn,Wn,fr,Jn,xr,uo=w({"src/ComponentFactory.ts"(){"use strict";Po(),fe(),jo(),ie(),he(),pe(),T(),Re(),q(),$(),Lo(),In=p(({TPL_SOURCE:r,COMPONENTS_BASE_PATH:t,COMPONENT_NAME:e,TPLEXTENSION:n})=>r==="default"?`${t}${e}.${n}`:"","ComponentURI"),Sn=p((r,t)=>{let e=r.getAttribute(t);if(e===null)return!1;let n=e.trim().toLowerCase();return n!=="false"&&n!=="0"},"__booleanAttribute_"),Wn=p((r,t)=>r.getAttribute(t)===null,"__attributeNotSet_"),fr=p((r,t)=>{let e=Wn(r,"shadowed"),n=r.getAttribute("template-source")===null,o=Sn(r,"shadowed"),i=Wn(r,"cached"),s=Sn(r,"cached"),a=typeof v.get("tplextension")<"u"?v.get("tplextension"):"html";a=r.getAttribute("tplextension")!==null?r.getAttribute("tplextension"):a;let l=r.getAttribute("name"),u=r.getAttribute("componentClass")!==null?r.getAttribute("componentClass"):"Component",h=v.get("preserveComponentBodyTag")?l!==null?"com.qcobjects.components."+l+".ComponentBody":"com.qcobjects.components.ComponentBody":u;l=l!==null?l:j(h)&&typeof j(h).name<"u"?j(h).name:"";let f=j(h),g=h!=="Component"&&typeof f<"u"&&typeof f.tplsource=="string"&&f.tplsource!=="",m=n&&g?f.tplsource:n?"default":r.getAttribute("template-source");d.debug(`template source for ${l} is ${m} `),d.debug(`type for ${l} is ${J(f)} `);let C=In({COMPONENTS_BASE_PATH:v.get("componentsBasePath"),COMPONENT_NAME:l,TPLEXTENSION:a,TPL_SOURCE:m});return v.get("preserveComponentBodyTag")&&R(l!==""?"com.qcobjects.components."+l:"com.qcobjects.components",[on("ComponentBody",qe,{name:l,tplsource:m,tplextension:a,reload:!0})]),p(function(){let x=e?f&&f.shadowed||qe.shadowed:o,B=i?(f&&f.cached)??qe.cached:s,se={__parent__:t,name:l,cached:B,shadowed:x,tplextension:a,body:v.get("preserveComponentBodyTag")?ee("componentBody"):r,templateURI:C,tplsource:m};(typeof l>"u"||l===""||l===null)&&delete se.name,C===""&&delete se.templateURI;let wn=Z(f,se);return v.get("preserveComponentBodyTag")&&typeof wn<"u"&&r.append(wn.body),wn},"__create_component_instance_")()},"_buildComponentFromElement_"),Jn=p((r,t)=>{let e=[];return y?e=r.map(function(n){return fr(n,t)}):d.debug("[_buildComponentsFromElements_] not implemented for Non-Browser environments"),e},"_buildComponentsFromElements_"),xr=p(r=>{let t=lo,e=r.subelements(t);return Jn(e,null)},"buildComponents")}}),Vn,zn,Xn,Ar=w({"src/Service.ts"(){"use strict";var r,t,e;Me(),so(),Fn(),U(),T(),q(),Ro(),ie(),Vn=(r=class extends G{constructor(){super(...arguments),this.kind="rest",this.domain=mn,this.basePath=ue,this.url="",this.method="GET",this.data={},this.reload=!1,this.cached=!1}mockup({request:o,service:i}){throw new Error("Method not implemented.")}local({request:o,service:i}){throw new Error("Method not implemented.")}done({request:o,service:i}){throw new Error("Method not implemented.")}fail(...o){throw new Error("Method not implemented.")}set(o,i){this[o]=i}get(o,i){return this[o]||i}},c(r,"Service"),p(r,"Service"),r),zn=(t=class extends Vn{constructor(){super(...arguments),this.method="GET",this.cached=!1,this.headers={"Content-Type":"application/json",charset:"utf-8"},this.JSONresponse=void 0}done(o){d.debug("***** RECEIVED RESPONSE:"),d.debug(o.service.template),this.JSONresponse=JSON.parse(o.service.template)}},c(t,"JSONService"),p(t,"JSONService"),t),Xn=(e=class extends zn{constructor(){super(),this.method="GET",this.cached=!1,this.configFileName="config.json",this.headers={"Content-Type":"application/json",charset:"utf-8"},this.JSONresponse=void 0,this.set("url",`${this.get("basePath")}${this.get("configFileName")}`)}configLoaded(){throw Error("Method not implemented.")}done(o){if(d.debug("***** CONFIG LOADED:"),d.debug(o.service.template),this.JSONresponse=JSON.parse(o.service.template),Object.hasOwn(this.JSONresponse,"__encoded__")){let s=de.decrypt(this.JSONresponse?.__encoded__,an);this.JSONresponse=JSON.parse(s)}let i=this.JSONresponse;Object.keys(i).map(s=>(v.set(s,i[s]),s)),this.configLoaded().catch(s=>{throw new Error(`An error ocurred: ${s}`)})}fail(){this.configLoaded().catch(o=>{throw new Error(`An error ocurred: ${o}`)})}},c(e,"ConfigService"),p(e,"ConfigService"),e),R("com.qcobjects.api",[Vn]),R("com.qcobjects.api.services",[zn]),R("com.qcobjects.api.config",[Xn])}}),ln,$o=w({"src/globalSettings.ts"(){"use strict";var r;ie(),U(),T(),q(),$(),co(),X(),Ar(),ln=(r=class extends G{constructor(){super(...arguments),this._GLOBAL={},this._logger=new Zn}static __start__(){return r.instance.__start__()}static get instance(){return typeof r._instance>"u"&&(r._instance=new r),r._instance}get logger(){return this._logger}set logger(e){this._logger=e}set(e,n){this._GLOBAL[e]=n}get(e,n){let o;return typeof this._GLOBAL[e]<"u"?o=this._GLOBAL[e]:typeof n<"u"&&(o=n),o}__start__(){let e=p(function(){let o;return y?o=new Promise(function(i,s){"serviceWorker"in navigator&&typeof v.get("serviceWorkerURI")<"u"&&(v.set("serviceWorkerScope",v.get("serviceWorkerScope")?v.get("serviceWorkerScope"):"/"),navigator.serviceWorker.register(v.get("serviceWorkerURI"),{scope:v.get("serviceWorkerScope")}).then(function(a){d.debug("Service Worker Registered"),i.call(o,a)},function(a){d.debug("Error registering Service Worker"),s.call(o,a)}),navigator.serviceWorker.ready.then(function(a){d.debug("Service Worker Ready"),i.call(o,a)},function(a){d.debug("Error loading Service Worker"),s.call(o,a)}))}):o=Promise.resolve(),o},"__load__serviceWorker"),n=p(function(){return new Promise(o=>{if(y){d.debug("Starting to building components");try{qo()}catch(i){throw Error(`Something went wrong trying to start components tree: ${i.message}`)}d.debug("Initializing the service worker"),e.call(M).catch(function(i){d.debug(`error loading the service worker ${i}`)})}o()})},"_buildComponents");return new Promise(o=>{d.debug("Starting to load the config settings..."),v.get("useConfigService",!1)?(d.debug("Loading settings using local configuration file..."),Fo(new Xn),En.configLoaded=n,Gn(En)?.then(i=>{o(i)})?.catch(i=>{throw new Error(`An error ocurred while trying to load ${En.url}: ${i}`)})):(d.debug("Starting to load the components..."),n.call(this).then(()=>{o({})}).catch(i=>{throw new Error(`An error ocurred while trying to build the components stack. ${i}`)}))})}},c(r,"_GlobalSettings"),p(r,"GlobalSettings"),r),R("com.qcobjects",[ln])}}),Ir={};br(Ir,{_top:c(()=>M,"_top"),buildComponentsStack:c(()=>qo,"buildComponentsStack"),componentsStack:c(()=>un,"componentsStack"),configService:c(()=>En,"configService"),get:c(()=>ce,"get"),resetTop:c(()=>Kn,"resetTop"),set:c(()=>pn,"set"),setConfigService:c(()=>Fo,"setConfigService")});var M,un,Kn,qo,En,Fo,pn,ce,gr,X=w({"src/top.ts"(){"use strict";uo(),Ce(),$o(),we(),T(),M={},M.lastCache=void 0,un=[],Kn=p(()=>{let r=ln.instance;M=Te(r,M,!0)},"resetTop"),qo=p(()=>{un=xr(document)},"buildComponentsStack"),Fo=p(r=>{M.configService=r,En=r},"setConfigService"),pn=p((r,t)=>{M[r]=t},"set"),ce=p((r,t)=>M[r]||t,"get"),Kn(),gr=p(function(r){Object.hasOwn(r,"PackagesList")||Object.defineProperty(r,"PackagesList",{set:p(t=>{d.debug("PackagesList is readonly")},"set"),get:p(()=>vo(),"get")}),Object.hasOwn(r,"PackagesNameList")||Object.defineProperty(r,"PackagesNameList",{set:p(t=>{d.debug("PackagesNameList is readonly")},"set"),get:p(()=>Co(),"get")}),Object.hasOwn(r,"ClassesList")||Object.defineProperty(r,"ClassesList",{set:p(t=>{d.debug("ClassesList is readonly")},"set"),get:p(()=>Oo(),"get")}),Object.hasOwn(r,"ClassesNameList")||Object.defineProperty(r,"ClassesNameList",{set(t){d.debug("ClassesNameList is readonly")},get:p(()=>wr(),"get")})},"_define_props"),gr(M)}}),tn,Go,Tr=w({"src/captureFalseTouch.ts"(){"use strict";if(T(),$(),tn=!1,Go=p(()=>tn?{passive:!0}:!1,"captureFalseTouch"),y)try{let r=Object.defineProperty({},"passive",{get(){return tn=!0,tn}});window.addEventListener("testPassive",null,r),window.removeEventListener("testPassive",null,r)}catch(r){d.debug(`An error ocurred: ${r}.`),tn=!1}else tn=!1}}),Tn,Ho=w({"src/range.ts"(){"use strict";Pe(),Tn=p((r,t=0,e=1)=>((t===0||typeof t>"u")&&(t=r,r=0),Array.from({length:(t-r)/e+1},function(n,o){return r+o*e})),"range"),P(Tn)}}),Bo,Pr=w({"src/defaultProcessors.ts"(){"use strict";T(),bn(),X(),Ho(),Bo=p(()=>{(function(){let r=p((i,s,a)=>{if(typeof i>"u"||i===null)throw Error(`mapper.${s}.${a} does not have a component instance or it is null.`);let l=ce(a),u=i.get(a),h=i.data[a],f=typeof h<"u"?h:typeof u<"u"?u:l,g="";return typeof f<"u"&&typeof f.map<"u"?g=f.map(function(m){let C=[...Object.keys(m)].map(b=>` data-${b}="${typeof m[b]<"u"&&m[b]!==null?m[b].toString():""}"`).join("");return`<quick-component name="${s}" ${C} ></quick-component>`}).join(""):d.debug(`${s}.${a} does not have a map property`),g},"mapper");be.setProcessor(r);let t=p(function(i,s,a){let l=`
|
|
4
|
+
`)}`);return t},"ClassFactory")}}),En,ko=w({"src/Base64.ts"(){"use strict";var r;En=(r=class{static encode(e){let n="",o,i,s,a,l,u,h,f=0;for(e=r._utf8_encode(e);f<e.length;)o=e.charCodeAt(f++),i=e.charCodeAt(f++),s=e.charCodeAt(f++),a=o>>2,l=(o&3)<<4|i>>4,u=(i&15)<<2|s>>6,h=s&63,isNaN(i)?u=h=64:isNaN(s)&&(h=64),n=n+this._keyStr.charAt(a)+this._keyStr.charAt(l)+this._keyStr.charAt(u)+this._keyStr.charAt(h);return n}static decode(e){let n="",o,i,s,a,l,u,h,f=0;for(e=e.replace(/[^A-Za-z0-9+/=]/g,"");f<e.length;)a=this._keyStr.indexOf(e.charAt(f++)),l=this._keyStr.indexOf(e.charAt(f++)),u=this._keyStr.indexOf(e.charAt(f++)),h=this._keyStr.indexOf(e.charAt(f++)),o=a<<2|l>>4,i=(l&15)<<4|u>>2,s=(u&3)<<6|h,n=n+String.fromCharCode(o),u!==64&&(n=n+String.fromCharCode(i)),h!==64&&(n=n+String.fromCharCode(s));return n=r._utf8_decode(n),n}static _utf8_encode(e){e=e.replace(/rn/g,"n");let n="";for(let o=0;o<e.length;o++){let i=e.charCodeAt(o);i<128?n+=String.fromCharCode(i):i>127&&i<2048?(n+=String.fromCharCode(i>>6|192),n+=String.fromCharCode(i&63|128)):(n+=String.fromCharCode(i>>12|224),n+=String.fromCharCode(i>>6&63|128),n+=String.fromCharCode(i&63|128))}return n}static _utf8_decode(e){let n="",o=0,i=0,s=0,a;for(;o<e.length;)i=e.charCodeAt(o),i<128?(n+=String.fromCharCode(i),o++):i>191&&i<224?(s=e.charCodeAt(o+1),n+=String.fromCharCode((i&31)<<6|s&63),o+=2):(s=e.charCodeAt(o+1),a=e.charCodeAt(o+2),n+=String.fromCharCode((i&15)<<12|(s&63)<<6|a&63),o+=3);return n}},c(r,"_Base64"),p(r,"Base64"),r._keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",r)}}),ue,xr,Me=w({"src/basePath.ts"(){"use strict";$(),ue=(function(){let r="";if(y){let t=document.baseURI.split("?")[0].split("/");t.pop(),r=t.join("/")+"/"}else try{let t=yn("node:process");typeof t<"u"?r=`${t.cwd()}/`:r=""}catch{r=""}return r})(),xr=p(r=>{ue=r},"setBasePath")}}),I,ge=w({"src/DataStringify.ts"(){"use strict";Mo(),I=p(r=>JSON.stringify(r,p(function(){let e=new WeakSet,n=0;return function(o,i){if(typeof i=="object"&&i!==null){if(e.has(i))return n+=1,n<=3?oo(i):null;e.add(i)}return i}},"getCircularReplacer")()),"_DataStringify")}}),mn,$n=w({"src/domain.ts"(){"use strict";mn=typeof location<"u"&&location.hostname!==""?location.hostname:"localhost"}}),Z,Re=w({"src/New.ts"(){"use strict";Z=p(function(r,t={}){if(t=arguments.length>1?t:{},typeof r>"u")return new Object;let e=new r(t);typeof t=="object"&&t!==null&&Object.keys(t).filter(o=>isNaN(o)&&!["__instanceID","__classType","__definition"].includes(o)).forEach(o=>{typeof t[o]=="function"?e[o]=t[o].bind(e):e[o]=t[o]});let n=typeof r.__definition=="object"&&r.__definition!==null?r.__definition:{};return e.__definition=Object.assign({},n),typeof e.__classType=="string"&&e.__classType!==""&&(e.__definition.__classType=e.__classType),e},"New"),Z.prototype.toString=function(){return"New(QCObjectsClassName, args) { [QCObjects native code] }"}}}),an,Lo=w({"src/secretKey.ts"(){"use strict";$(),an=y?location.host:"secret"}}),de,Ar,No,ro=w({"src/Crypt.ts"(){"use strict";var r;ko(),ge(),U(),q(),Lo(),de=(r=class extends G{constructor(){super(...arguments),this.string="",this.key="",this.last_string="",this.last_key="",this.construct=!1}encrypt(e,n){throw new Error("Method not implemented.")}decrypt(e,n){throw new Error("Method not implemented.")}_new_(e){let n=e.string,o=Object.hasOwn(e,"key")?e.key:"";this.__new__(e),o=o===""?this.__instanceID.toString():o,this.last_key=o,this.last_string=n,this.construct=!0}_encrypt(){let e=this.string,n=this.key,o="",i,s;for(let a=0;a<e.length;a++)i=e.substr(a,1),s=n.substr(a%n.length-1,1),i=String.fromCharCode(i.charCodeAt(0)+s.charCodeAt(0)),o+=i;return this.last_string=En.encode(o),this.last_string}_decrypt(){let e=this.string,n=this.key,o="",i,s;e=En.decode(e);for(let a=0;a<e.length;a++)i=e.substr(a,1),s=n.substr(a%n.length-1,1),i=String.fromCharCode(i.charCodeAt(0)-s.charCodeAt(0)),o+=i;return this.last_string=o,this.last_string}static encrypt(e,n){return new r({string:e,key:n!==""?n:"12345678ABC"})._encrypt()}static decrypt(e,n){return new r({string:e,key:n!==""?n:"12345678ABC"})._decrypt()}},c(r,"__Crypt"),p(r,"_Crypt"),r),Ar=p(function(t){return de.encrypt(I(t),an)},"_CryptObject"),No=p(function(t){return t===""?{}:JSON.parse(de.decrypt(t,an))},"_DecryptObject"),R("com.qcobjects",[de])}}),Ee,pi=w({"src/ConfigSettings.ts"(){"use strict";var r;Me(),U(),q(),Ee=(r=class extends G{constructor(){super(...arguments),this._CONFIG={relativeImportPath:"",remoteImportsPath:"",remoteSDKPath:"https://sdk.qcobjects.dev/",asynchronousImportsLoad:!1,removePackageScriptAfterLoading:!0,componentsBasePath:"",delayForReady:0,preserveComponentBodyTag:!1,useConfigService:!1,routingWay:"hash",useSDK:!0,useLocalSDK:!1,basePath:ue},this._CONFIG_ENC=""}set(e,n){this._CONFIG[e]=n}get(e,n){return this._CONFIG[e]||n}static get instance(){return typeof r._instance>"u"&&(r._instance=new r),r._instance}},c(r,"_ConfigSettings"),p(r,"ConfigSettings"),r),R("com.qcobjects",[Ee])}}),v,ie=w({"src/CONFIG.ts"(){"use strict";var r;Me(),Ce(),ro(),ge(),T(),bn(),Lo(),q(),U(),pi(),v=(r=class extends G{get _CONFIG_ENC(){return Ee.instance._CONFIG_ENC}get _CONFIG(){return Ee.instance._CONFIG}set(e,n){d.debug(`CONFIG.set ${e}: ${n}`),e==="basePath"&&xr(n);let o;try{o=(function(i){i._CONFIG_ENC===null&&(i._CONFIG_ENC=de.encrypt(I({}),an));let s=i._CONFIG_ENC.valueOf(),a=i._CONFIG?.valueOf();return Te(a,No(s))})(Ee.instance)}catch(i){o={},console.error(i),d.debug("failed to encrypt config")}o[e]=n,Ee.instance._CONFIG_ENC=Ar(o),Ee.instance.set(e,n)}get(e,n){let o;try{let s=(function(a){a._CONFIG_ENC===null&&(a._CONFIG_ENC=de.encrypt(I({}),an));let l=a._CONFIG_ENC.valueOf(),u=a._CONFIG.valueOf();return Te(u,No(l))})(Ee.instance);typeof s[e]<"u"&&(o=s[e])}catch(s){console.error(s),d.debug("Something wrong when trying to get CONFIG values"),d.debug("No config value for: "+e),o=n}let i=be.processObject(o);return o===null&&i===null?null:i||n}static get instance(){return typeof r._instance>"u"&&(r._instance=new r),r._instance}static set(e,n){r.instance.set(e,n)}static get(e,n){return r.instance.get(e,n)}},c(r,"_CONFIG"),p(r,"CONFIG"),r),R("com.qcobjects",[v])}}),rn,be,bn=w({"src/Processor.ts"(){"use strict";var r;ie(),U(),Re(),X(),q(),rn=(r=class extends G{constructor({component:e,processors:n}){super({component:e}),this.processors={config(o,i){return v.get(i,"")},ENV(o,i){return typeof process<"u"?process.env[i]:""},global(o,i){return typeof M<"u"?M[i]:""}},this.processors=Object.assign({},this.processors,r._instance?.processors,n)}static get instance(){return typeof r._instance>"u"&&(r._instance=new r({component:null})),r._instance}static setProcessor(e){typeof e=="function"&&e.name!==""&&(r.instance.processors[e.name]=e)}setProcessor(e){typeof e=="function"&&e.name!==""&&(this.processors[e.name]=e)}static getProcessor(e){return r.instance.processors[e]}static getProcessorNames(){return Object.keys(r.instance.processors)}execute(e,n,o){let i=typeof e<"u"&&e!==null?e.processorHandler:this,s=typeof o=="string"?o.split(",").map(a=>a.trim()):[];return i?.processors[n].apply(i,[e,...s])}static process(e,n=null){return r.instance.process(e,n)}process(e,n=null){let o=n!==null?n.processorHandler:Z(r,{component:null});return typeof e=="string"&&Object.keys(o.processors).map(i=>[...e.matchAll(new RegExp("\\$"+i+"\\((.*)\\).*","g"))].map(function(s){let a=`$${i}(${s[1]})`;return e=e.replace(a,o.execute.bind(o).call(o,n,i,s[1])),s})),e}static processObject(e,n){return e==null?e:r.instance.processObject(e,n)}processObject(e,n=null){if(e==null)return e;let o=n===null?this:n.processorHandler;return typeof o>"u"&&(o=new r({component:n})),typeof e=="object"?Object.keys(e).map(i=>(typeof e[i]=="object"&&!Object.hasOwn(e[i],"call")?e[i]=o?.processObject.bind(o)(e[i],n):typeof e[i]=="string"&&(e[i]=o?.process.bind(o)(e[i],n)),i)):typeof e=="string"&&(e=o.process.bind(o)(e,n)),e}},c(r,"_Processor"),p(r,"Processor"),r),be=rn.instance,R("com.qcobjects",[rn])}}),Ir,Tr,xo,hi=w({"src/routings.ts"(){"use strict";Ir=p((r,t)=>{let e=r.path.replace(/{(.*?)}/g,"(?<$1>.*)");return{...[...t.matchAll(new RegExp(e,"g"))][0].groups}},"__routing_params__"),Tr=p(function(r,t){return r.filter(function(e){let n=e.path.replace(/{(.*?)}/g,"(?<$1>.*)");return new RegExp(n,"g").test(t)}).reverse()},"__valid_routings__"),xo=p((r,t)=>r.includes(t),"__valid_routing_way__")}});function cn(r,t){let n=class n{constructor(i,s=[]){this.func=i,this.args=s}dispatch(){this.func.apply(this,...t,this)}};c(n,"AsyncCallback"),p(n,"AsyncCallback");let e=n;return Bn.push(new e(r,t)),e}c(cn,"asyncLoad");var Bn,Do,so=w({"src/asyncLoad.ts"(){"use strict";et(),$(),X(),Bn=[],p(cn,"asyncLoad"),Do=p(()=>{y?document.addEventListener("readystatechange",()=>{document.readyState==="complete"&&Bn.map(function(r){r.dispatch.call(r)})}):typeof M<"u"&&Bn.map(function(r){r.dispatch.call(r)})},"_fireAsyncLoad"),S(cn)}}),dn,io=w({"src/ComplexStorageCache.ts"(){"use strict";var r;ko(),ge(),T(),dn=(r=class{constructor(e){let n,o,i=e.index;if(typeof i<"u"){n=e.load,o=e.alternate;let s=this.getID(i),a=localStorage.getItem(s);if(this.isEmpty(a)){let l=n.call(null,{cachedObjectID:s,cachedResponse:a,cache:this});this.save(i,l),d.debug("RESPONSE OF {{cachedObjectID}} CACHED".replace("{{cachedObjectID}}",s))}else o.call(null,{cachedObjectID:s,cachedResponse:a,cache:this}),d.debug("RESPONSE OF {{cachedObjectID}} IS ALREADY CACHED ".replace("{{cachedObjectID}}",s))}else throw new Error("ComplexStorageCache: index is undefined");return this}getItem(e){let n=localStorage.getItem(e);return this.isEmpty(n)?null:JSON.parse(n)}setItem(e,n){localStorage.setItem(e,I(n))}isEmpty(e){let n=!1;switch(!0){case typeof e>"u":case(typeof e=="string"&&e===""):case(typeof e=="string"&&e==="undefined"):case(typeof e=="number"&&e===0):case e===null:n=!0;break;default:n=!1}return n}getID(e){let n;return typeof e<"u"&&(n="cachedObject_"+En.encode(I(e).replace(/\{|\}|,/g,"_"))),n}save(e,n){let o=this.getID(e);d.debug("CACHING THE RESPONSE OF {{cachedObjectID}} ".replace("{{cachedObjectID}}",o)),this.setItem(o,n)}getCached(e){let n=this.getID(e);return this.getItem(n)}clear(){Object.keys(localStorage).filter(function(e){return e.startsWith("cachedObject_")}).map(function(e){return localStorage.removeItem(e),e})}},c(r,"ComplexStorageCache"),p(r,"ComplexStorageCache"),r)}}),qn,ao=w({"src/serviceLoader.ts"(){"use strict";so(),io(),ge(),T(),$(),X(),qn=p(function(r,t=!1){let e=p(function(a){var l=new Promise(function(u,h){d.debug("LOADING SERVICE DATA {{DATA}} FROM {{URL}}".replace("{{DATA}}",I(a.data)).replace("{{URL}}",a.url));let f=new XMLHttpRequest;f.withCredentials=a.withCredentials,f.open(a.method,a.url,!0);for(let b in a.headers)try{typeof a.headers[b]!="function"&&f.setRequestHeader(b,a.headers[b])}catch(O){d.debug("Something went wrong when assign the header "+b),d.debug(`An error ocurred: ${O}`)}f.onload=function(){if(f.status===200){let O=f.responseText;if(d.debug("Data received {{DATA}}".replace("{{DATA}}",I(O))),d.debug("CREATING SERVICE {{NAME}}".replace("{{NAME}}",a.name)),a.template=O,a.cached&&typeof C<"u"&&C.save(a.name,a.template),typeof a.done=="function"){var b={request:f,service:a};a.done.call(a,b),u.call(l,b)}}else if(typeof a.fail=="function"){var b={request:f,service:a};a.fail.call(a,b),h.call(l,b)}};let m=p(function(){d.debug("SENDING THE NORMAL REQUEST ");try{f.send(I(a.data))}catch(b){d.debug("SOMETHING WRONG WITH REQUEST "),d.debug(`An error ocurred: ${b}`),h.call(l,{request:f,service:a})}},"_directLoad");if(a.cached){var C=new dn({index:a.data,load(){m.call(this)},alternate(b){if(a.method==="GET"){if(a.template=b.cache.getCached(a.name),typeof a.done=="function"){let O={request:f,service:a};a.done.call(a,O),u.call(l,O)}}else m()}});M.lastCache=C}else m();return f});return l},"_serviceLoaderInBrowser"),n=p(function(a){var l=new Promise(function(u,h){if(typeof URL>"u"){global.URL=xe("url").URL;let b=global.URL}let f=new URL(a.url);var g;a.useHTTP2=Object.hasOwn(a,"useHTTP2")&&a.useHTTP2;let m=p(function(b){d.debug("LOADING SERVICE DATA (non-browser) {{DATA}} FROM {{URL}}".replace("{{DATA}}",I(a.data)).replace("{{URL}}",a.url));let O,x={http2Client:C,request:b,service:a,responseHeaders:null};if(typeof a.data=="object"&&a.data!==null&&a.useHTTP2)try{d.debug("Sending data...");let B=new Buffer(I(a.data));b.write(B)}catch(B){d.debug("It was not possible to send any data"),d.debug(`An error ocurred: ${B}`)}O="",b.on("response",B=>{d.debug("receiving response..."),x.responseHeaders=B,O=""}),b.on("data",B=>{d.debug("receiving data..."),O+=""+B.toString(),a.template=O}),a.useHTTP2&&b.resume(),b.on("end",()=>{d.debug("ending call..."),a.template=O,Object.hasOwn(a,"useHTTP2")&&a.useHTTP2?C.destroy():b.destroy(),a.done.call(a,x),u.call(l,x)}),a.useHTTP2&&b.end()},"captureEvents");try{let b;if(a.useHTTP2){d.debug("using http2");var C=xe("http2").connect(f.origin);b=Object.assign({":method":a.method,":path":f.pathname},a.options),b=Object.assign(b,a.headers),g=C.request(b),g.setEncoding("utf8"),m(g)}else if(f.protocol==="http:"){let x=xe("http").request;b=Object.assign({url:a.url,headers:a.headers},a.options),g=x(a.url),m(g)}else if(f.protocol==="https:"){let O=xe("https");b=Object.assign({hostname:f.hostname,port:f.port,path:f.pathname,method:a.method,headers:a.headers},a.options),O.request(b,function(B){m(B)}).end()}else{let O="Protocol not supported: "+f.protocol;throw d.debug(O),new Error(O)}}catch(b){d.debug(b),a.fail.call(a,b),h.call(l,b)}}).catch(u=>{d.debug(`Something happened when trying to call the service: ${a.name}. Error: ${u}`),a.fail.call(a,u)});return l},"_serviceLoaderInNode"),o=p(function(a){var l=new Promise(function(u){d.debug(`Calling mockup service ${a.name} ...`);let h={request:null,service:a,responseHeaders:a.responseHeaders};typeof a.mockup=="function"?a.mockup.call(a,h):a.done.call(a,h),u.call(l,h)});return l},"_serviceLoaderMockup"),i=p(function(a){var l=new Promise(function(u){d.debug(`Calling local service ${a.name} ...`);let h={request:null,service:a,responseHeaders:a.responseHeaders};typeof a.local=="function"?a.local.call(a,h):a.done.call(a,h),u.call(l,h)});return l},"_serviceLoaderLocal"),s;switch(r.kind){case"rest":y?typeof t<"u"&&t?s=cn(e,[r,t]):s=e(r):s=n(r);break;case"mockup":s=o(r);break;case"local":s=i(r);break;default:d.debug(`The value of the kind property of the service ${r.name} is not valid`),s=Promise.resolve();break}return s},"serviceLoader")}}),co,jo=w({"src/tag_filter.ts"(){"use strict";co="quick-component:not([loaded]),component:not([loaded])"}}),Nn,$o=w({"src/componentLoader.ts"(){"use strict";so(),io(),ge(),T(),$(),X(),Nn=p(function(r,t){let e,n=p(function(s){return e=new Promise(function(a,l){let u=s.__promise__;if((Object.hasOwn(s,"container")&&typeof s.container<"u"&&s.container!==null?s.container:s.body)!==null){let C=p(function(O){O.feedComponent();let x={request:g,component:O};a.call(u,x)},"_feedComponent_");d.debug("LOADING COMPONENT DATA {{DATA}} FROM {{URL}}".replace("{{DATA}}",I(s.data)).replace("{{URL}}",s.url));let b=p(function(){let O=f?0:200;if(g.status===O){let x=g.responseText;d.debug("Data received {{DATA}}".replace("{{DATA}}",I(x))),d.debug("CREATING COMPONENT {{NAME}}".replace("{{NAME}}",s.name)),s.template=x,s.cached&&typeof m<"u"&&m.save(s.cacheIndex,s.template),C(s)}else{let x={request:g,component:s};l.call(u,x)}},"_componentLoaded");if(typeof s.template=="string"&&s.template!=="")C(s);else{var f=!!s.url.startsWith("file:"),g=new XMLHttpRequest;if(f)"fetch"in M&&(d.debug("I can use fetch..."),d.debug("It is a file to be loaded, so I will try to use fetch"),fetch(s.url).then(x=>{d.debug("I got a response from fetch, so I'll feed the component"),x.text().then(B=>{s.template=B,C(s)}).catch(B=>{throw new Error(`An error ocurred: ${B}`)})}).catch(x=>{throw new Error(`An error ocurred: ${x}`)}));else try{d.debug("Calling the url of component in async mode."),g.open(s.method,s.url,!0)}catch(x){d.debug(`An error ocurred: ${x}.`),d.debug("Last try has failed... The component cannot be loaded.")}!no&&!f&&g.setRequestHeader("Content-Type","text/html"),f||(g.onload=b);let O=p(function(x){x=!(typeof x>"u"||!x),d.debug("SENDING THE NORMAL REQUEST "),x?"fetch"in M||(d.debug("I have to try to load the file using xhr... "),g.send(null),g.status===XMLHttpRequest.DONE&&b()):(d.debug("Trying to send the data to the component... "),g.send(I(s.data)))},"_directLoad");if(s.cached&&!f){d.debug("USING CACHE FOR COMPONENT: "+s.name);var m=new dn({index:s.cacheIndex,load(){O.call(this,f)},alternate(x){s.method==="GET"?(s.template=x.cache.getCached(s.cacheIndex),C.call(this,s)):O.call(this,f)}});M.lastCache=m}else d.debug("NOT USING CACHE FOR COMPONENT: "+s.name),O(f)}}else d.debug("CONTAINER DOESNT EXIST")}),e.then(function(a){return s.__done__().then(function(){let l;return typeof s.done=="function"&&(l=s.done.call(s,a)),Promise.resolve(l)})},function(a){return typeof s.fail=="function"&&s.fail.call(s,a).catch(l=>{throw new Error(`${l}`)}),Promise.reject(new Error("An error ocurred"))}).catch(function(a){throw d.debug("Something wrong loading the component"),new Error(`An error ocurred: ${a}`)}),e},"_componentLoaderInBrowser"),o=p(function(s){return e=new Promise(function(a,l){let u=e,h=p(function(m){m.feedComponent().catch(b=>{throw new Error(`An error ocurred trying to feed the component: ${m.name}. Error: ${b}`)});let C={request:null,component:m};a.call(u,C)},"_feedComponent_");d.debug("LOADING COMPONENT DATA {{DATA}} FROM {{URL}}".replace("{{DATA}}",I(s.data)).replace("{{URL}}",s.url));let f=p(function(m,C){if(m){let b={request:null,component:s};l.call(u,b)}else{let b=C.toString();d.debug("Data received {{DATA}}".replace("{{DATA}}",I(b))),d.debug("CREATING COMPONENT {{NAME}}".replace("{{NAME}}",s.name)),s.template=b,s.cached&&typeof g<"u"&&g.save(s.cacheIndex,s.template),h(s)}},"_componentLoaded");if(typeof s.template=="string"&&s.template!=="")h(s);else{d.debug("Loading the component as a local file in server...");let m=p(function(){let{readFile:C}=yn("node:fs");d.debug("SENDING THE NORMAL REQUEST "),C(s.url,f)},"_directLoad");if(s.cached){d.debug("USING CACHE FOR COMPONENT: "+s.name);var g=new dn({index:s.cacheIndex,load(){m()},alternate(C){s.method==="GET"?(s.template=C.cache.getCached(s.cacheIndex),h.call(this,s)):m.call(this)}});M.lastCache=g}else d.debug("NOT USING CACHE FOR COMPONENT: "+s.name),m()}}),e.then(function(a){return s.__done__().then(function(){let l;return typeof s.done=="function"&&(l=s.done.call(s,a)),Promise.resolve(l)})},function(a){return typeof s.fail=="function"&&s.fail.call(s,a).catch(l=>{throw new Error(`An error ocurred: ${l}`)}),Promise.reject(new Error("An error ocurred."))}).catch(function(a){d.debug(`Something wrong loading the component: ${a}`)}),e},"_componentLoaderInNode"),i;return y?typeof t<"u"&&t?i=cn(n,[r,t]):i=n(r):i=o(r),i},"componentLoader")}}),qe,qo=w({"src/Component.ts"(){"use strict";var r;ko(),Me(),Ce(),fe(),lo(),ge(),$n(),he(),pe(),U(),Pe(),jn(),Dn(),T(),Re(),q(),$(),bn(),hi(),X(),ie(),ao(),jo(),$o(),qe=(r=class extends G{constructor({__parent__:e,templateURI:n="",template:o,tplsource:i="default",tplextension:s,url:a="",name:l="",method:u="GET",data:h={},reload:f=!1,shadowed:g=!1,cached:m=!0,enableServiceClass:C,assignRoutingParams:b=!0,_body:O=ee("div"),__promise__:x=null,__shadowRoot:B,body:se,shadowRoot:_n,splashScreenComponent:Ys,controller:ei,view:ti}){if(arguments.length<1)throw Error("No arguments in component. You must at least give one argument.");super({__parent__:e,templateURI:n,template:o,tplsource:i,tplextension:s,url:a,name:l,method:u,data:h,reload:f,shadowed:g,cached:m,enableServiceClass:C,assignRoutingParams:b,_body:O,__promise__:x,__shadowRoot:B,body:se,shadowRoot:_n,splashScreenComponent:Ys,controller:ei,view:ti}),this.validRoutingWays=["pathname","hash","search"],this.basePath=ue,this.domain=mn,this.templateHandler="DefaultTemplateHandler",this.routingWay=null,this.routingNodes=[],this.routings=[],this.routingPath="",this.routingPaths=[],this._componentHelpers=[],this.subcomponents=[],this.splashScreenComponent=void 0,this.controller=void 0,this.routingController=void 0,this.view=void 0,this.effect=void 0,this.method="GET",this.cached=!0,this.__promise__=null,this.__namespace=void 0,this._serviceClassName=null,this.enableServiceClass=!0,this.shadowed=!1,this.assignRoutingParams=!0;let D=this;typeof l<"u"&&(D.name=l),typeof D.name>"u"&&typeof l>"u"&&d.warn("A name is not defined for "+J(D)),D.routingWay=v.get("routingWay"),D.processorHandler=new rn({component:D}),D.data=typeof D.data>"u"||D.data===null?{}:D.data,D.data=Object.assign(D.data,D.dataAttributes),D.createServiceInstance().then(()=>{typeof D.__new__=="function"&&D.__new__(D),D._generateRoutingPaths(D.body).then(function(){D._reroute_().then(function(){return D.rebuild().then(function(){d.info(`Component._new_ The component ${D.name} was built successfully!`)}).catch(function(De){d.warn(`Component._new_ Something went wrong building the component ${D.name}`),console.error(`Component._new_ Something went wrong building the component ${D.name}`,De)})}).catch(De=>{throw Error(`Unexpected error ${De}`)})}).catch(De=>{throw Error(`Unexpected error ${De}`)})}).catch(De=>{throw Error(`Unexpected error. ${De}`)})}set cacheIndex(e){d.debug("[cacheIndex] This property is readonly")}get cacheIndex(){let e=this,n=I(e.routingPath);return En.encode(e.name+n)}set parsedAssignmentText(e){d.debug("[parsedAssignmentText] This property is readonly")}get parsedAssignmentText(){let e=this;if(e._parsedAssignmentText=e.parseTemplate(e.template),typeof e._parsedAssignmentText>"u")throw Error(`[Component][${this.name}][parsedAssignmentText] Could not generate content!`);return e._parsedAssignmentText}set shadowRoot(e){let n=this;typeof n.__shadowRoot>"u"?n.__shadowRoot=e:d.debug("[shadowRoot] This property can only be assigned once!")}get shadowRoot(){return this.__shadowRoot}set routingSelected(e){d.debug("[routingSelected] This is a read-only property of the component")}get routingSelected(){let e=this;return Tr(e.routings,e.routingPath)}set routingParams(e){d.debug("[routingParams] This is a read-only property of the component")}get routingParams(){let e=this;return[{}].concat(e.routingSelected.map(function(n){return Ir(n,e.routingPath)})).reduce(function(n,o){return Object.assign(n,o)})}set serviceClassName(e){this._serviceClassName=e}get serviceClassName(){let e="";return y?e=this.body.getAttribute("serviceClass")!==null?this.body.getAttribute("serviceClass"):this._serviceClassName:e=this._serviceClassName,e}get responseToData(){let e=!1;return y?e=this.body.getAttribute("response-to")==="data"||this.responseTo==="data":e=this.responseTo==="data",e}get responseToTemplate(){let e=!1;return y?e=this.body.getAttribute("response-to")==="template"||this.responseTo==="template":e=this.responseTo==="template",e}createServiceInstance(){let e=this,n=this.data,o,i=e.getClass().__definition,s=e.serviceClassName;return new Promise(function(a,l){let u=e.enableServiceClass,h=e.responseToData,f=e.responseToTemplate;if(u&&s!==null&&(o=j(s)),!h&&i&&Object.hasOwn(i,"responseTo")?h=i.responseTo==="data":!h&&Object.hasOwn(j("Component"),"responseTo")&&(h=j("Component").responseTo==="data"),!f&&i&&Object.hasOwn(i,"responseTo")?f=i.responseTo==="template":!f&&Object.hasOwn(j("Component"),"responseTo")&&(f=j("Component").responseTo==="template"),typeof o<"u"&&typeof u<"u"&&u===!0&&(h||f)){d.info("Loading service "+s);let g=Z(o,{data:n});qn(g)?.then(function({service:m}){let C;typeof m.JSONresponse<"u"&&m.JSONresponse!==null?C=m.JSONresponse:C=m.template,h&&(typeof n=="object"&&typeof C=="object"?n=Object.assign(n,C):n=C,e.data=n),e.serviceInstance=g,e.serviceData=n,f&&(e.template=C),a(C)},function(m){d.debug(`Service loading rejected for ${s} in ${e.name}`),l(m)}).catch(function(m){throw d.debug("Something went wroing while trying to load the service "+s),Error(`Error loading ${s} for ${e.name}. Detail: ${m}`)})}else a(null)})}_bindroute_(){let e=this;e._bindroute_.loaded?d.debug(`Routes already bound to popstate events for ${e.name}`):(y&&e.hostElements("a").map(function(n){return n.oldclick=n.onclick,n.onclick=function(o){let i=!0;ce("routingPaths")||pn("routingPaths",[]);let s=v.get("routingWay"),a=o.target[s];return ce("routingPaths").includes(a)&&o.target[s]!==location[s]&&o.target.href!==document.location.href?(d.debug("A ROUTING WAS FOUND: "+a),window.history.pushState({href:o.target.href},o?.target?.href,o.target.href),r.route().catch(l=>{throw Error(`Unexpected error: ${l}`)}),i=!1):d.debug("NO ROUTING FOUND FOR: "+a),typeof o.target.oldclick<"u"&&typeof o.target.oldclick=="function"&&o.target.oldclick.call(o.target,o),i},null}),e._bindroute_.loaded=!0)}done(e){return new Promise(o=>{if(typeof e<"u"){let{request:i,component:s}=e;o({request:i,component:s})}else o({request:void 0,component:void 0})})}createControllerInstance(){let e;if(y){if(typeof this.body>"u")throw new Error("The component has no body");var n=this.body.getAttribute("controllerClass");n||(n="Controller"),e=j(n),typeof e<"u"&&(this.controller=Z(e,{component:this}))}return new Promise((o,i)=>{if(y&&typeof e<"u"&&typeof this.controller<"u"){if(typeof this.controller.done=="function")try{this.controller.done.call(this.controller)}catch(s){throw Error(s)}else d.debug(`${n} does not have a done() method.`),i(new Error(`${n} does not have a done() method.`));typeof this.controller.createRoutingController=="function"?this.controller.createRoutingController.call(this.controller):d.debug(`${n} does not have a createRoutingController() method.`)}o({component:this,controller:this.controller})})}createEffectInstance(){let e=this;return new Promise(function(n){if(y){let o=e.body?.getAttribute("effectClass"),i=e.body?.getAttribute("apply-effect-to");i=i!==null?i:"load",o!==null&&i==="observe"?e.applyObserveTransitionEffect(o):o!==null&&i==="load"&&e.applyTransitionEffect(o)}n({component:e,effect:e.effect})})}createViewInstance(){let e=this;return new Promise(function(n){let o=y?e.body.getAttribute("viewClass"):null;if(o!==null){let i=j(o);typeof i<"u"&&(e.view=Z(i,{component:e}),Object.hasOwn(e.view,"done")&&typeof e.view?.done=="function"&&e.view?.done.call(e.view))}n({component:e,view:e.view})})}__done__(){let e=this,n=p(function(){if(typeof e>"u")throw new Error("componentDone() has lost its context");if(typeof e.body>"u")throw new Error("The component has no body");(async()=>{await e.createViewInstance(),await e.createControllerInstance(),await e.createEffectInstance()})().catch(o=>{throw new Error(`Unknown error ${o}.`)}),d.debug(`Trying to run component helpers for ${e.name}...`);try{e.runComponentHelpers(),d.debug(`Component helpers for ${e.name} executed.`)}catch(o){throw d.debug(`Component helpers for ${e.name} could not be executed.`),Error(o)}e.subcomponents=e.__buildSubComponents__(),e._bindroute_(),y&&e.body.setAttribute("loaded","true")},"componentDone");return new Promise(function(o,i){try{o(n.call(e))}catch(s){i(new Error(s))}})}hostElements(e){let n=this,o=[];if(y)if(n.shadowed&&typeof n.shadowRoot<"u"&&n.shadowRoot!==null){o=n.shadowRoot.subelements(e);let s=n.container??n.body,a=typeof s<"u"&&s!==null?s.querySelector(".shadowHost"):null;a!==null&&typeof a<"u"&&a.subelements(e).forEach(u=>{o.includes(u)||o.push(u)})}else o=n.body.subelements(e);return o}get subtags(){let e=this,n=co;return e.hostElements(n)}get bodyAttributes(){let n=this.body;return y?[...n.getAttributeNames()].map(o=>({[o]:n.getAttribute(o)})).reduce((o,i)=>Object.assign(o,i)):{}}get dataAttributes(){let n=this.body;return y?[{}].concat([...n.getAttributeNames()].filter(o=>o.startsWith("data-")).map(o=>({[o.split("-")[1]]:n.getAttribute(o)}))).reduce((o,i)=>Object.assign(o,i)):{}}__buildSubComponents__(e=!1){let n=this,o=n.subtags;return e||(o=o.filter(i=>!vn(i,"loaded"))),(typeof n<"u"||n.subcomponents.length<1)&&(n.subcomponents=Zn(o,n)),n.subcomponents}fail(e){return new Promise((o,i)=>{if(typeof e<"u"){let{error:s,component:a}=e;o({error:s,component:a})}else i(new Error(" Unknown error."))})}set(e,n){this[e]=n}get(e,n){return this[e]||n}feedComponent(){let e=this;d.debug(`[Component][${this.name}][feedComponent] start feeding component...`);let n=p(function(s){if(typeof s.container>"u"&&typeof s.body>"u"){d.warn("COMPONENT {{NAME}} has an undefined container and body".replace("{{NAME}}",s.name));return}let a=typeof s.container>"u"||s.container===null?s.body:s.container,l=s.parsedAssignmentText;if(s.innerHTML=l,s.shadowed){d.debug("COMPONENT {{NAME}} is shadowed".replace("{{NAME}}",s.name)),d.debug("Preparing slots for Shadowed COMPONENT {{NAME}}".replace("{{NAME}}",s.name));let u=ee("div");a.subelements("[slot]").map(f=>(f.parentElement===a&&u.appendChild(f),f)),d.debug("Creating shadowedContainer for COMPONENT {{NAME}}".replace("{{NAME}}",s.name));let h=ee("div");h.classList.add("shadowHost");try{s.shadowRoot=h.attachShadow({mode:"open"})}catch(f){d.debug(`An error ocurred: ${f}.`);try{d.debug("Shadowed COMPONENT {{NAME}} is repeated".replace("{{NAME}}",s.name)),s.shadowRoot=h.shadowRoot}catch(g){d.debug(`An error ocurred: ${g}.`),d.warn("Shadowed COMPONENT {{NAME}} is not allowed on this browser".replace("{{NAME}}",s.name))}}if(typeof s.shadowRoot<"u"&&s.shadowRoot!==null){s.reload?(d.debug("FORCED RELOADING OF CONTAINER FOR Shadowed COMPONENT {{NAME}}".replace("{{NAME}}",s.name)),h!==null&&h.shadowRoot!==null&&(h.shadowRoot.innerHTML=s.innerHTML)):(u.innerHTML=s.parseTemplate(u.innerHTML),d.debug("ADDING Shadowed COMPONENT {{NAME}} ".replace("{{NAME}}",s.name)),h!==null&&h.shadowRoot!==null&&(h.shadowRoot.innerHTML+=s.innerHTML)),d.debug("ADDING Slots to Shadowed COMPONENT {{NAME}} ".replace("{{NAME}}",s.name)),h.innerHTML+=u.innerHTML,d.debug("APPENDING Shadowed COMPONENT {{NAME}} to Container ".replace("{{NAME}}",s.name));let f=a.querySelector(".shadowHost");typeof f<"u"&&f!==null?(d.debug("Shadowed Container for COMPONENT {{NAME}} is already present in the tree ".replace("{{NAME}}",s.name)),s.shadowRoot!==null&&h.shadowRoot!==null&&(s.shadowRoot.innerHTML=h.shadowRoot.innerHTML)):a.appendChild(h)}else d.warn("Shadowed COMPONENT {{NAME}} is bad configured".replace("{{NAME}}",s.name))}else s.reload?(d.debug("FORCED RELOADING OF CONTAINER FOR COMPONENT {{NAME}}".replace("{{NAME}}",s.name)),a.innerHTML=s.innerHTML):a&&s?(d.debug("ADDING COMPONENT {{NAME}} ".replace("{{NAME}}",s.name)),a.innerHTML+=s.innerHTML):d.warn("COMPONENT {{NAME}} is not added to the DOM".replace("{{NAME}}",s.name))},"_feedComponent_InBrowser"),o=p(function(s){let a=s.parsedAssignmentText;s.innerHTML=a},"_feedComponent_InNode"),i;return _e(e,"Component")?new Promise((s,a)=>{if(y)try{i=n(e),s(i)}catch(l){a(new Error(l))}else try{i=o(e),s(i)}catch(l){a(new Error(l))}}):(d.warn("Trying to feed a non component object"),Promise.reject(new Error(`Trying to feed a non component object ${typeof e}`)))}rebuild(){let e=this;var n=new Promise(function(o,i){if((typeof e>"u"||e===null)&&i(new Error("Component is undefined")),Ye(e)&&_e(e,"Component"))switch(!0){case e.get("tplsource")==="none":d.debug("Component "+e.name+" has specified template-source=none, so no template load was done");var s={request:void 0,component:e};e.__done__().then(function(){typeof e.done=="function"&&e.done.call(e,s).catch(a=>{d.debug(`It was an error while calling done() in ${e.name}: ${a}`)}),o.call(n,s)},function(){i.call(n,s)});break;case e.get("tplsource")==="inline":d.debug("Component "+e.name+" has specified template-source=inline, so it is assumed that template is already declared"),(async a=>{await a.feedComponent.bind(a)()})(e).catch(a=>{d.debug(`It was not possible to feed the component ${e.name}: ${a}`)});var s={request:void 0,component:e};e.__done__().then(async()=>{typeof e.done=="function"&&await e.done(s),o.call(n,s)},function(){i.call(n,s)});break;case(e.get("tplsource")==="default"&&e.get("templateURI")!==""):e.set("url",e.get("basePath")+e.get("templateURI")),Nn(e,!1)?.then(function(a){o.call(n,a)},function(a){i.call(n,a)});break;case(e.get("tplsource")==="external"&&e.get("templateURI")!==""):e.set("url",e.get("templateURI")),Nn(e,!1).then(function(a){o.call(n,a)},function(a){i.call(n,a)});break;case(e.get("tplsource")==="default"&&e.get("templateURI","")===""):d.debug(`Component ${e.name} template-source is ${e.get("tplsource")} and no templateURI is present`),i.call(n,`Component ${e.name} template-source is ${e.get("tplsource")} and no templateURI is present`);break;default:d.debug("Component "+e.name+" will not be rebuilt because no templateURI is present"),i.call(n,{request:null,component:e});break}});return n}Cast(e){let n=le(e).map(o=>o.name.replace(/bound /g,"")).map(o=>({[o]:e[o].bind(this)})).reduce((o,i)=>Object.assign(o,i),{});return ye(this,n)}route(){return this.constructor.route()}static route(){let e=this,n,o=!!(Ye(e)&&_e(e,"Component")),i=p(function(s){let a=[],l=s.filter(function(u){return typeof u<"u"}).map(function(u){if(typeof u.name<"u")a.push(u.name);else throw new Error(J(u)+" does not have a name");return new Promise(function(h,f){typeof u<"u"&&u._reroute_?u._reroute_().then(function(){u.reload=!0,u.rebuild().then(()=>{h()}).catch(g=>{d.debug(`Error ${g}`)})}).then(function(){if(Object.hasOwn(u,"subcomponents")&&typeof u.subcomponents<"u"&&u.subcomponents.length>0)return d.debug("LOOKING FOR ROUTINGS IN SUBCOMPONENTS FOR: "+u.name),i.call(u,u.subcomponents);d.debug("No subcomponents to look for routings in: "+u.name),u.subtags.length>0&&(u.subcomponents=u.__buildSubComponents__(!0)),h()}).catch(g=>{d.debug(`Error: ${g}`)}):typeof u<"u"&&f(new Error("Component "+u.name+" is not an instance of Component"))})});return Promise.all(l).then(function(){d.debug("ROUTING COMPLETED FOR "+a.join(", "))}).catch(function(u){d.warn("ROUTING FAILED FOR "+a.join(", ")+": "+u)})},"__route__");if(o||un)o&&d.debug("loading routings for instance "+e.name),n=i.call(e,o?e.subcomponents:un);else throw d.debug("An undetermined result expected if load routings. So will not be loaded this time."),Error("There is no valid instance and no components stack available to apply rountings");return n}fullscreen(){if(y){let e=this.body;e.requestFullscreen?e.requestFullscreen().catch(n=>{throw new Error(`An error ocurred when requesting fullscreen: ${n}`)}):e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.msRequestFullscreen&&e.msRequestFullscreen()}}closefullscreen(){y&&(document.exitFullscreen?document.exitFullscreen().catch(e=>{throw new Error(`An error ocurred when trying to exit fullscrenn ${e}.`)}):document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen())}_generateRoutingPaths(e){let n=this;return new Promise(function(o){y&&xo(n.validRoutingWays,n.routingWay||"")&&typeof e<"u"&&(n.innerHTML=e?.innerHTML,n.routingNodes=e?.subelements("routing"),n.routings=[],n.routingNodes.map(i=>{let s=i.getAttributeNames(),a={};return s.map((l,u)=>(a[s[u]]=i.getAttribute(s[u]),l)),n.routings.push(a),n.routingPaths||(n.routingPaths=[]),n.routingPaths.includes(a.path)||n.routingPaths.push(a.path),ce("routingPaths")||pn("routingPaths",[]),ce("routingPaths").includes(a.path)||ce("routingPaths").push(a.path),i})),o()})}parseTemplate(e){let n=this,o,i=e;if(Object.hasOwn(n,"templateHandler")){let s=n.templateHandler;d.debug(`[Component][${this.name}][parseTemplate] Attempting to use ${s} ...`);let a=j(s),l=Z(a,{component:n,template:i});l.component=n;let u=n.data;if(Object.hasOwn(n,"assignRoutingParams")&&n.assignRoutingParams)try{u=Object.assign(u,n.routingParams)}catch(h){d.debug(`An error ocurred: ${h}.`),d.debug("[parseTemplate] it was not possible to assign the routing params to the template")}o=l.assign(u)}else d.debug(`[Component][${this.name}][parseTemplate] No value for templateHandler. Using raw content...`),o=i;return o}_reroute_(){let e=this;return new Promise(function(n){y&&xo(e.validRoutingWays,e.routingWay||"")&&(e.routingPath=location[e.routingWay],e.routingSelected.map(o=>{let i=xn({COMPONENTS_BASE_PATH:v.get("componentsBasePath"),COMPONENT_NAME:o.name.toString(),TPLEXTENSION:Object.hasOwn(o,"tplextension")?o.tplextension||"":e.tplextension,TPL_SOURCE:"default"});return e.templateURI=i,o}),e.routingSelected.length>0&&(e.template="",typeof e.body<"u"&&e.body!==null&&(e.body.innerHTML=""))),n(e)})}lazyLoadImages(){if(y){let n=this.componentRoot;if(typeof n<"u"&&n!==null){let o=[...n.subelements("img[lazy-src]")],i=p(function(s){s.setAttribute("src",s.getAttribute("lazy-src")?.toString()),s.onload=()=>{s.removeAttribute("lazy-src")}},"_lazyLoadImages");if("IntersectionObserver"in window){let s=new IntersectionObserver((a,l)=>{a.forEach(u=>{u.isIntersecting&&(i(u.target),l.unobserve(u.target))})});o.map(function(a){return s.observe(a)})}else o.map(i)}}return null}applyTransitionEffect(e){let n=j(e);if(typeof n>"u")throw Error(`${e} not found.`);typeof n<"u"&&_e(n,"TransitionEffect")?(this.effect=Z(n,{component:this}),this.effect?.apply(this.effect?.defaultParams)):d.debug(`${e} is ${J(n)} but is not a TransitionEffect`)}applyObserveTransitionEffect(e){if(y){let n=this,o=n.componentRoot,i=p(function(){n.applyTransitionEffect(e)},"_applyEffect_");if("IntersectionObserver"in window){let s=new IntersectionObserver((l,u)=>{l.forEach(h=>{h.isIntersecting&&(i(),u.unobserve(h.target))})}),a=typeof o<"u"&&o!==null&&typeof o.getBoundingClientRect!="function"?o.host??o:o;s.observe(a)}else i()}}get componentRoot(){return this.shadowed?this.shadowRoot:this.body}scrollIntoHash(){if(y){let e=this;document.location.hash!==""&&(e.componentRoot?.subelements(document.location.hash)).map(o=>(typeof o.scrollIntoView=="function"&&o.scrollIntoView(v.get("scrollIntoHash",{behavior:"auto",block:"top",inline:"top"})),o))}}i18n_translate(){if(y&&v.get("use_i18n")){let e=this,n=e.componentRoot,o=v.get("lang","en"),i=navigator.language.slice(0,2),s=ce("i18n");o!==i&&typeof s=="object"&&Object.hasOwn(s,"messages")&&p(()=>new Promise(function(l){let u=s.messages.filter(function(h){return Object.hasOwn(h,o)&&Object.hasOwn(h,i)});(n?.subelements("ul,li,h1,h2,h3,a,b,p,input,textarea,summary,details,option,component")).map(h=>(u.map(function(f){let g=h.innerHTML;return g=g?.replace(new RegExp(`${f[o]}`,"g"),f[i]),h.innerHTML=g,null}),h)),l()}),"callback_i18n").call(e).then(function(){d.debug("i18n loaded for component: "+e.name)}).catch(l=>{throw new Error(`An error ocurred when parsing i18n: ${l}.`)})}}addComponentHelper(e){this._componentHelpers.push(e)}runComponentHelpers(){if(y){let e=this,n=[];n.push(e.i18n_translate.bind(e)),n.push(e.scrollIntoHash.bind(e)),n.push(e.lazyLoadImages.bind(e)),n=n.concat(e._componentHelpers),n.map(o=>(d.debug(`Executing ${o.name} as component helper for ${e.name}...`),o(),o))}}},c(r,"_Component"),p(r,"Component"),r.shadowed=!1,r.cached=!0,r),R("com.qcobjects",[qe]),le(j("Component")).map(t=>(P(t),t))}}),xn,vn,Un,_r,Zn,Pr,lo=w({"src/ComponentFactory.ts"(){"use strict";Ro(),fe(),qo(),ie(),he(),pe(),T(),Re(),q(),$(),jo(),xn=p(({TPL_SOURCE:r,COMPONENTS_BASE_PATH:t,COMPONENT_NAME:e,TPLEXTENSION:n})=>r==="default"?`${t}${e}.${n}`:"","ComponentURI"),vn=p((r,t)=>{let e=r.getAttribute(t);if(e===null)return!1;let n=e.trim().toLowerCase();return n!=="false"&&n!=="0"},"__booleanAttribute_"),Un=p((r,t)=>r.getAttribute(t)===null,"__attributeNotSet_"),_r=p((r,t)=>{let e=Un(r,"shadowed"),n=r.getAttribute("template-source")===null,o=vn(r,"shadowed"),i=Un(r,"cached"),s=vn(r,"cached"),a=typeof v.get("tplextension")<"u"?v.get("tplextension"):"html";a=r.getAttribute("tplextension")!==null?r.getAttribute("tplextension"):a;let l=r.getAttribute("name"),u=r.getAttribute("componentClass")!==null?r.getAttribute("componentClass"):"Component",h=v.get("preserveComponentBodyTag")?l!==null?"com.qcobjects.components."+l+".ComponentBody":"com.qcobjects.components.ComponentBody":u;l=l!==null?l:j(h)&&typeof j(h).name<"u"?j(h).name:"";let f=j(h),g=h!=="Component"&&typeof f<"u"&&typeof f.tplsource=="string"&&f.tplsource!=="",m=n&&g?f.tplsource:n?"default":r.getAttribute("template-source");d.debug(`template source for ${l} is ${m} `),d.debug(`type for ${l} is ${J(f)} `);let C=xn({COMPONENTS_BASE_PATH:v.get("componentsBasePath"),COMPONENT_NAME:l,TPLEXTENSION:a,TPL_SOURCE:m});return v.get("preserveComponentBodyTag")&&R(l!==""?"com.qcobjects.components."+l:"com.qcobjects.components",[on("ComponentBody",qe,{name:l,tplsource:m,tplextension:a,reload:!0})]),p(function(){let x=e?f&&f.shadowed||qe.shadowed:o,B=i?(f&&f.cached)??qe.cached:s,se={__parent__:t,name:l,cached:B,shadowed:x,tplextension:a,body:v.get("preserveComponentBodyTag")?ee("componentBody"):r,templateURI:C,tplsource:m};(typeof l>"u"||l===""||l===null)&&delete se.name,C===""&&delete se.templateURI;let _n=Z(f,se);return v.get("preserveComponentBodyTag")&&typeof _n<"u"&&r.append(_n.body),_n},"__create_component_instance_")()},"_buildComponentFromElement_"),Zn=p((r,t)=>{let e=[];return y?e=r.map(function(n){return _r(n,t)}):d.debug("[_buildComponentsFromElements_] not implemented for Non-Browser environments"),e},"_buildComponentsFromElements_"),Pr=p(r=>{let t=co,e=r.subelements(t);return Zn(e,null)},"buildComponents")}}),Wn,Vn,Jn,Mr=w({"src/Service.ts"(){"use strict";var r,t,e;Me(),ro(),$n(),U(),T(),q(),Lo(),ie(),Wn=(r=class extends G{constructor(){super(...arguments),this.kind="rest",this.domain=mn,this.basePath=ue,this.url="",this.method="GET",this.data={},this.reload=!1,this.cached=!1}mockup({request:o,service:i}){throw new Error("Method not implemented.")}local({request:o,service:i}){throw new Error("Method not implemented.")}done({request:o,service:i}){throw new Error("Method not implemented.")}fail(...o){throw new Error("Method not implemented.")}set(o,i){this[o]=i}get(o,i){return this[o]||i}},c(r,"Service"),p(r,"Service"),r),Vn=(t=class extends Wn{constructor(){super(...arguments),this.method="GET",this.cached=!1,this.headers={"Content-Type":"application/json",charset:"utf-8"},this.JSONresponse=void 0}done(o){d.debug("***** RECEIVED RESPONSE:"),d.debug(o.service.template),this.JSONresponse=JSON.parse(o.service.template)}},c(t,"JSONService"),p(t,"JSONService"),t),Jn=(e=class extends Vn{constructor(){super(),this.method="GET",this.cached=!1,this.configFileName="config.json",this.headers={"Content-Type":"application/json",charset:"utf-8"},this.JSONresponse=void 0,this.set("url",`${this.get("basePath")}${this.get("configFileName")}`)}configLoaded(){throw Error("Method not implemented.")}done(o){if(d.debug("***** CONFIG LOADED:"),d.debug(o.service.template),this.JSONresponse=JSON.parse(o.service.template),Object.hasOwn(this.JSONresponse,"__encoded__")){let s=de.decrypt(this.JSONresponse?.__encoded__,an);this.JSONresponse=JSON.parse(s)}let i=this.JSONresponse;Object.keys(i).map(s=>(v.set(s,i[s]),s)),this.configLoaded().catch(s=>{throw new Error(`An error ocurred: ${s}`)})}fail(){this.configLoaded().catch(o=>{throw new Error(`An error ocurred: ${o}`)})}},c(e,"ConfigService"),p(e,"ConfigService"),e),R("com.qcobjects.api",[Wn]),R("com.qcobjects.api.services",[Vn]),R("com.qcobjects.api.config",[Jn])}}),ln,Fo=w({"src/globalSettings.ts"(){"use strict";var r;ie(),U(),T(),q(),$(),ao(),X(),Mr(),ln=(r=class extends G{constructor(){super(...arguments),this._GLOBAL={},this._logger=new Qn}static __start__(){return r.instance.__start__()}static get instance(){return typeof r._instance>"u"&&(r._instance=new r),r._instance}get logger(){return this._logger}set logger(e){this._logger=e}set(e,n){this._GLOBAL[e]=n}get(e,n){let o;return typeof this._GLOBAL[e]<"u"?o=this._GLOBAL[e]:typeof n<"u"&&(o=n),o}__start__(){let e=p(function(){let o;return y?o=new Promise(function(i,s){"serviceWorker"in navigator&&typeof v.get("serviceWorkerURI")<"u"&&(v.set("serviceWorkerScope",v.get("serviceWorkerScope")?v.get("serviceWorkerScope"):"/"),navigator.serviceWorker.register(v.get("serviceWorkerURI"),{scope:v.get("serviceWorkerScope")}).then(function(a){d.debug("Service Worker Registered"),i.call(o,a)},function(a){d.debug("Error registering Service Worker"),s.call(o,a)}),navigator.serviceWorker.ready.then(function(a){d.debug("Service Worker Ready"),i.call(o,a)},function(a){d.debug("Error loading Service Worker"),s.call(o,a)}))}):o=Promise.resolve(),o},"__load__serviceWorker"),n=p(function(){return new Promise(o=>{if(y){d.debug("Starting to building components");try{Go()}catch(i){throw Error(`Something went wrong trying to start components tree: ${i.message}`)}d.debug("Initializing the service worker"),e.call(M).catch(function(i){d.debug(`error loading the service worker ${i}`)})}o()})},"_buildComponents");return new Promise(o=>{d.debug("Starting to load the config settings..."),v.get("useConfigService",!1)?(d.debug("Loading settings using local configuration file..."),Ho(new Jn),On.configLoaded=n,qn(On)?.then(i=>{o(i)})?.catch(i=>{throw new Error(`An error ocurred while trying to load ${On.url}: ${i}`)})):(d.debug("Starting to load the components..."),n.call(this).then(()=>{o({})}).catch(i=>{throw new Error(`An error ocurred while trying to build the components stack. ${i}`)}))})}},c(r,"_GlobalSettings"),p(r,"GlobalSettings"),r),R("com.qcobjects",[ln])}}),Rr={};Cr(Rr,{_top:c(()=>M,"_top"),buildComponentsStack:c(()=>Go,"buildComponentsStack"),componentsStack:c(()=>un,"componentsStack"),configService:c(()=>On,"configService"),get:c(()=>ce,"get"),resetTop:c(()=>Xn,"resetTop"),set:c(()=>pn,"set"),setConfigService:c(()=>Ho,"setConfigService")});var M,un,Xn,Go,On,Ho,pn,ce,yr,X=w({"src/top.ts"(){"use strict";lo(),Ce(),Fo(),we(),T(),M={},M.lastCache=void 0,un=[],Xn=p(()=>{let r=ln.instance;M=Te(r,M,!0)},"resetTop"),Go=p(()=>{un=Pr(document)},"buildComponentsStack"),Ho=p(r=>{M.configService=r,On=r},"setConfigService"),pn=p((r,t)=>{M[r]=t},"set"),ce=p((r,t)=>M[r]||t,"get"),Xn(),yr=p(function(r){Object.hasOwn(r,"PackagesList")||Object.defineProperty(r,"PackagesList",{set:p(t=>{d.debug("PackagesList is readonly")},"set"),get:p(()=>So(),"get")}),Object.hasOwn(r,"PackagesNameList")||Object.defineProperty(r,"PackagesNameList",{set:p(t=>{d.debug("PackagesNameList is readonly")},"set"),get:p(()=>Oo(),"get")}),Object.hasOwn(r,"ClassesList")||Object.defineProperty(r,"ClassesList",{set:p(t=>{d.debug("ClassesList is readonly")},"set"),get:p(()=>Eo(),"get")}),Object.hasOwn(r,"ClassesNameList")||Object.defineProperty(r,"ClassesNameList",{set(t){d.debug("ClassesNameList is readonly")},get:p(()=>Sr(),"get")})},"_define_props"),yr(M)}}),tn,Bo,kr=w({"src/captureFalseTouch.ts"(){"use strict";if(T(),$(),tn=!1,Bo=p(()=>tn?{passive:!0}:!1,"captureFalseTouch"),y)try{let r=Object.defineProperty({},"passive",{get(){return tn=!0,tn}});window.addEventListener("testPassive",null,r),window.removeEventListener("testPassive",null,r)}catch(r){d.debug(`An error ocurred: ${r}.`),tn=!1}else tn=!1}}),An,Uo=w({"src/range.ts"(){"use strict";Pe(),An=p((r,t=0,e=1)=>((t===0||typeof t>"u")&&(t=r,r=0),Array.from({length:(t-r)/e+1},function(n,o){return r+o*e})),"range"),P(An)}}),Wo,Lr=w({"src/defaultProcessors.ts"(){"use strict";T(),bn(),X(),Uo(),Wo=p(()=>{(function(){let r=p((i,s,a)=>{if(typeof i>"u"||i===null)throw Error(`mapper.${s}.${a} does not have a component instance or it is null.`);let l=ce(a),u=i.get(a),h=i.data[a],f=typeof h<"u"?h:typeof u<"u"?u:l,g="";return typeof f<"u"&&typeof f.map<"u"?g=f.map(function(m){let C=[...Object.keys(m)].map(b=>` data-${b}="${typeof m[b]<"u"&&m[b]!==null?m[b].toString():""}"`).join("");return`<quick-component name="${s}" ${C} ></quick-component>`}).join(""):d.debug(`${s}.${a} does not have a map property`),g},"mapper");be.setProcessor(r);let t=p(function(i,s,a){let l=`
|
|
5
5
|
/* CSS Document for Mobile Imports */
|
|
6
6
|
@import url("${a}") (orientation:portrait);
|
|
7
7
|
@import url("${a}") (max-width:460px);
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
@import url("${a}") (aspect-ratio: 8/5) and (min-width:460px);
|
|
18
18
|
@import url("${a}") (aspect-ratio: 4/3) and (min-width:460px);
|
|
19
19
|
@import url("${a}") (aspect-ratio: 3/2) and (min-width:460px);
|
|
20
|
-
`,portrait:l};return Object.hasOwn(h,s)?h[s]:""},"layout");be.setProcessor(t);let e=p((i,s,a,...l)=>{let u=[...l].map(function(f){return{[f.split("=")[0]]:f.split("=")[1]}}).reduce(function(f,g){return Object.assign(f,g)}),h=[...Object.keys(u)].map(function(f){return`${f}=${u[f]}`}).join(" ");return`<component name="${s}" componentClass="${a}" ${h}></component>`},"component");be.setProcessor(e);let n=p((i,s,a,...l)=>{let u=[...l].map(function(f){return{[f.split("=")[0]]:f.split("=")[1]}}).reduce(function(f,g){return Object.assign(f,g)}),h=[...Object.keys(u)].map(function(f){return`${f}=${u[f]}`}).join(" ");return`<quick-component name="${s}" componentClass="${a}" ${h}></quick-component>`},"quick_component");be.setProcessor(n);let o=p((i,s,a)=>Tn(s).map(function(l){return a.replace("{{index}}",l.toString())}).join(""),"repeat");be.setProcessor(o)})()},"setDefaultProcessors")}}),hn,Uo=w({"src/findPackageNodePath.ts"(){"use strict";ie(),et(),T(),$(),hn=p(function(r){let t=null;if(!y){let e=null;try{let s=Cn("node:fs");s&&typeof s.existsSync=="function"&&(e=s)}catch(s){d.debug(`findPackageNodePath could not load node:fs: ${s}`)}let n=typeof sn<"u"&&Array.isArray(sn.paths)?sn.paths:[],o=typeof process<"u"&&typeof process.cwd=="function"?process.cwd():"",i=[`${v.get("projectPath")}${v.get("relativeImportPath")}`,`${v.get("basePath")}${v.get("relativeImportPath")}`,`${v.get("projectPath")}`,`${v.get("basePath")}`,`${v.get("relativeImportPath")}`,`${o}${v.get("relativeImportPath")}`,`${o}/node_modules/`,`${o}/node_modules`,`${o}`,"node_modules","./",""].concat(n).filter(s=>typeof s=="string"&&s!=="undefined");e!==null?(i=i.filter(s=>e.existsSync(s+"/"+r)),i.length>0?(t=i[0],d.info(r+" is Installed.")):(t="",d.info(`${r} is not in a standard path.`))):(t=`${o}/node_modules`,d.debug(`findPackageNodePath could not verify ${r}, assuming ${t}`))}return t},"findPackageNodePath"),S(hn)}}),Pn,Wo=w({"src/Import.ts"(){"use strict";Me(),ie(),ge(),he(),Uo(),T(),$(),we(),Pn=p(function(r,t,e){e!==void 0&&d.debug(`[Import] Setting external=${e.toString()} resource to import: ${r}`),e?d.debug(`[Import] Registering external resource to import: ${r}`):d.debug(`[Import] Registering local resource to import: ${r}`);let n;return y?(n=new Promise(function(o,i){let s=p(function(){let l=!1,u=0;for(let h in Q)u++;return u<vn.length?l=!1:l=!0,l},"allPackagesImported"),a=p(function(l){vn.push(t),s()&&vn.map(u=>je.push(u)),y&&v.get("removePackageScriptAfterLoading")&&l.target.remove(),o.call(n,{_imported_:l.target,_package_name_:r})},"readyImported");if(!Object.hasOwn(Q,r)){let l=ee("script");l.type=v.get("sourceType","text/javascript"),l.async=!!v.get("asynchronousImportsLoad"),l.onreadystatechange=function(){l.readyState==="complete"&&a(l)},l.onload=a,l.onerror=function(u){d.debug(`An error ocurred: ${u}.`),i.call(n,{_imported_:l,_package_name_:r})},l.src=e?v.get("remoteImportsPath")+r+".js":ue+v.get("relativeImportPath")+r+".js",document.getElementsByTagName("head")[0].appendChild(l)}}),n.catch(function(){d.debug("Import: Error loading a package ")})):n=new Promise(function(o,i){try{let s=hn(r),a="";if(s!==null)a=s+"/"+r;else{let l=hn(r+".js");l!==null?a=l+"/"+r+".js":a=ue+v.get("relativeImportPath")+r}try{o.call(n,{_imported_:xe(`${a}`),_package_name_:r})}catch(l){i.call(n,{_imported_:null,_package_name_:r,error:l})}}catch(s){i.call(n,{_imported_:null,_package_name_:r,error:s})}}).catch(function(o){d.debug("Something happened when importing "+r),console.warn(o)}),n.catch(function(o){d.warn(I(o))}),n},"Import"),Pn.prototype.toString=function(){return"Import(packagename,ready,external) { [QCObjects native code] }"}}}),W,Vo=w({"src/mathFunctions.ts"(){"use strict";W=p(function(r){return isNaN(r)?new Number(0):new Number(r)},"__to_number")}}),zo,Mr=w({"src/NamespaceRef.ts"(){"use strict";$n(),q(),zo=p(function(r){let e=(R(r)||[]).filter(n=>jn(n)).map(n=>({[n.__definition.__classType]:n})).reduce((n,o)=>Object.assign(n,o));return r.split(".").map(n=>({[n]:e})).reverse().reduce((n,o)=>(o[Object.keys(o).join(".")]=n,o))},"NamespaceRef")}}),$e,Qo,Nn,Rr=w({"src/Ready.ts"(){"use strict";ie(),$(),we(),X(),$e=p(r=>{y?je.push(r.bind(window)):typeof global<"u"&&je.push(r.bind(global))},"Ready"),Qo=$e,Nn=p(r=>{let t=p(()=>{je.map(function(e,n){typeof e=="function"&&(e(),je.splice(n,1))})},"_execReady");v.get("delayForReady")>0?y?setTimeout(t.bind(window),v.get("delayForReady")):typeof global<"u"&&setTimeout(t.bind(global),v.get("delayForReady")):t.call(M)},"_Ready")}}),Yn,kr,Lr=w({"src/ArrayCollection.ts"(){"use strict";var r,t;fe(),T(),Re(),Vo(),Yn=(r=class extends Array{unique(){return this.filter(function(n,o,i){return i.indexOf(n)===o})}table(){console.table(this)}sum(){return this.reduce((n,o)=>W(n)+W(o),0)}avg(){return this.length<1?0:this.reduce((n,o)=>(W(n)+W(o))/2)}min(){return this.reduce((n,o)=>W(n)<=W(o)?n:o,1/0)}max(){return this.reduce((n,o)=>W(n)>=W(o)?n:o,0)}sortBy(n,o){let i=o?(function(s,a){return a[n]<s[n]?1:-1}):(function(s,a){return a[n]>s[n]?1:-1});return this.sort(i)}matrix(n,o){return Array.from({length:n},p(()=>o,"x_func"))}matrix2d(n,o){let i=p(function(){return o},"y_func");return Array.from({length:n},p(function(){return Array.from({length:n},i)},"x_func"))}matrix3d(n,o){let i=p(function(){return Array.from({length:n},function(){return o})},"y_func");return Array.from({length:n},p(function(){return Array.from({length:n},i)},"x_func"))}},c(r,"ArrayList"),p(r,"ArrayList"),r),kr=(t=class{constructor(){this.source=Z(Yn,[])}changed(n,o){d.debug("VALUE CHANGED"),d.debug(n),d.debug(o)}push(n){let o=this;return d.debug("VALUE ADDED"),d.debug(n),o.source.push(n)}pop(){let n=this;return d.debug("VALUE POPPED"),n.source.pop()}_new_(n){let o=this,i=0;o.source=Z(j("ArrayList"),n);for(let s of Object.keys(o.source))isNaN(s)||(d.debug("binding "+s.toString()),(function(a){Object.defineProperty(o,a,{set(l){d.debug("setting "+a+"="+l),o.source[a]=l,o.changed(a,l)},get(){return o.source[a]}})})(s),i++);o.source.length=i,Object.defineProperty(o,"length",{get(){return o.source.length}})}},c(t,"ArrayCollection"),p(t,"ArrayCollection"),t)}}),Qn,eo,Dr=w({"src/Tag.ts"(){"use strict";var r;fe(),Re(),q(),$(),Lr(),Qn=(r=class extends Yn{show(){this.map(function(e){return e.style.opacity=1})}hide(){this.map(function(e){return e.style.opacity=0})}effect(...e){let n=[...e].slice(1),o=e[0],i;(typeof o).toLowerCase()==="string"&&(i=j(o)),this.map(function(s){return i.apply.apply(i,[s].concat(n))})}findElements(e){let n=Z(j("TagElements"));if(y)for(let o of Object.keys(this))typeof o=="number"&&typeof this[o]!="function"&&Object.hasOwn(this[o],"subelements")&&n.push(this[o].subelements(e));return n}},c(r,"TagElements"),p(r,"TagElements"),r),eo=p(function(t,e){let n=Z(Qn);if(y){let o=document.subelements(t),i=[];for(let s=0;s<o.length;s++)typeof e<"u"&&Object.hasOwn(o[s],"innerHTML")&&(o[s].innerHTML=e),i.indexOf(s)<0&&(n.push(o[s]),i.push(s))}return n},"Tag"),R("com.qcobjects",[Qn,eo])}}),Zo,jr=w({"src/shortCode.ts"(){"use strict";so(),Zo=p(()=>{let t=de.encrypt((Math.random()*1e3).toString().replace(".",""),new Date().getTime().toString());return[...de.encrypt((Math.random()*1e3).toString().replace(".",""),new Date(new Date().getTime()-1e3*1e3).getTime().toString())].map((o,i)=>[...t][i]===o?null:o).filter(o=>o!==null).join("")},"shortCode")}}),to,$r=w({"src/super.ts"(){"use strict";fe(),to=p(function(r,t){return j(r)[t]},"_super_"),to.prototype.toString=function(){return"_super_(className,classMethodName,params) { [QCObjects native code] }"}}}),Jo,qr=w({"src/waitUntil.ts"(){"use strict";T(),Jo=p((r,t)=>{let e=p((n,o)=>{let s=0;var a=setInterval(function(){o()?(clearInterval(a),n(),d.debug("Ejecuting "+n.name+" after wait")):s<2e3?(s+=1,d.debug("WAIT UNTIL "+n.name+" is true, "+s.toString()+" cycles")):(d.debug("Max execution time for "+n.name+" expression until true"),clearInterval(a))},1)},"_waitUntil");setTimeout(function(){e(r,t)},1)},"waitUntil")}}),nn,Fr=w({"src/subelements.ts"(){"use strict";nn=p(c(function(t){return[...this.querySelectorAll(t)]},"subelements2"),"subelements")}}),mr,Gr,ui=w({"src/loadSDK.ts"(){"use strict";ie(),Uo(),Wo(),T(),$(),X(),mr=p(()=>{if(typeof M._sdk_<"u"){d.debug("The SDK is already present in this bundle, skipping the dynamic import");return}v.get("useSDK")&&(function(){let r=v.get("remoteImportsPath"),t=!v.get("useLocalSDK");v.set("remoteImportsPath",v.get("remoteSDKPath"));let e=!1,n="QCObjects-SDK";if(y)e=!0;else{let o=hn("qcobjects-sdk");o!==null?(n="qcobjects-sdk",e=!0):o!==""?(n="node_modules/qcobjects-sdk/QCObjects-SDK",e=!0):e=!1}e?(d.info("Importing SDK... "+n),xo&&typeof Cn<"u"?xe("qcobjects-sdk")?d.debug("QCObjects SDK was loaded OK."):d.debug("QCObjects SDK could not be imported."):Pn(n,function(){t?d.debug("QCObjects-SDK.js loaded from remote location"):d.debug("QCObjects-SDK.js loaded from local"),v.set("remoteImportsPath",r)},t)?.catch(o=>{throw new Error(`An error ocurred when trying to import: ${o}`)})):d.debug("SDK has not been imported as it is not available at the moment")})()},"loadSDK"),Gr=mr}}),pi=ri({"src/MainProcess.ts"(){"use strict";X(),io(),Tr(),Ce(),Po(),fe(),jo(),uo(),Do(),ie(),ge(),Pr(),et(),Wo(),Pe(),$n(),T(),Vo(),Mr(),Re(),Ln(),q(),$(),Rr(),co(),Dr(),bn(),qn(),pe(),jr(),he(),ao(),$r(),qr(),Fr(),$o(),ui(),Ho(),p(c((function r(t){if(typeof Object.defineProperty<"u"&&typeof t<"u")try{Object.defineProperty(t,"__qcobjects__",{enumerable:!0,configurable:!1,writable:!1,value:r})}catch(e){d.debug(`An error ocurred: ${e}`),typeof t.__qcobjects__<"u"&&(t.__qcobjects__.loaded=!0)}typeof t.__qcobjects__.loaded>"u"&&(t.__qcobjects__.loaded=!0,y&&(Element.prototype.subelements=nn,Document.prototype.subelements=nn,HTMLElement.prototype.subelements=nn,typeof ShadowRoot<"u"&&(ShadowRoot.prototype.subelements=nn)),d.debugEnabled=!1,d.infoEnabled=!0,y&&(Element.prototype.find=function(e){let n=this,o=[],i=document.subelements(e);return i.map((s,a)=>(typeof i[a]<"u"&&i[a].parentNode.tagName===n.parentNode.tagName&&o.push(ye(s,new Object)),s)),o}),y&&(Element.prototype.append=p(c(function(n){Ye(n)||typeof n.body<"u"?this.appendChild(n.body):this.appendChild(n)},"QC_Append"),"QC_Append"),Element.prototype.render=p(c(function(n){let o=this,i=p((s,a)=>{if(typeof document.implementation.createHTMLDocument<"u"){let l=document.implementation.createHTMLDocument("");l.body.innerHTML=a,l.body.subelements("*").map(u=>s.append(u))}},"_appendVDOM");if(typeof this.innerHTML<"u")try{this.innerHTML+=n}catch(s){d.debug(`An error ocurred: ${s}`),i(o,n)}else i(o,n)},"QC_Render"),"QC_Render")),S(Jo),S(to),S(dn),S(j),S(ee),S(Zo),S(J),S(_e),R("com.qcobjects",[rn]),y&&(Element.prototype.Cast=p(c(function(n){return ye(this,n)},"QC_Cast"),"QC_Cast")),y?(window.onload=Nn,oo&&document.addEventListener("deviceready",Nn,Go)):global.onload=Nn,y&&window.addEventListener("popstate",function(e){e.stopImmediatePropagation(),e.stopPropagation(),qe.route().catch(n=>{throw new Error(`An error ocurred when trying to load initial routes. ${n}`)})}),S(Gn),S(An),S(In),S(gn),S(I),S(jn),S(Ye),S(zo),Array.prototype.unique=function(){return this.filter(function(e,n,o){return o.indexOf(e)===n})},Array.unique=function(e){return e.unique()},P(Array.unique),P(Array.prototype.unique),Array.prototype.table=function(){console.table(this)},Array.table=function(e){e.table()},P(Array.table),P(Array.prototype.table),Array.prototype.sum=function(){return this.reduce(function(e,n){return W(e)+W(n)},0)},Array.sum=function(e){return e.sum()},P(Array.sum),P(Array.prototype.sum),Array.prototype.avg=function(){return this.length<1?0:this.reduce(function(e,n){return(W(e)+W(n))/2})},Array.avg=function(e){return e.avg()},P(Array.avg),P(Array.prototype.avg),Array.prototype.min=function(){return this.reduce(function(e,n){return W(e)<=W(n)?e:n},1/0)},Array.min=function(e){return e.min()},P(Array.min),P(Array.prototype.min),Array.prototype.max=function(){return this.reduce(function(e,n){return W(e)>=W(n)?e:n},0)},Array.max=function(e){return e.max()},P(Array.max),P(Array.prototype.max),Array.prototype.sortBy=function(e,n=!0){let o=n?(function(i,s){return s[e]<i[e]?1:-1}):(function(i,s){return s[e]>i[e]?1:-1});return this.sort(o)},Array.sortBy=function(e,n,o=!0){return e.sortBy(n,o)},P(Array.sortBy),P(Array.prototype.sortBy),Array.prototype.matrix=function(e,n=0){return Array.from({length:e},p(function(i=void 0){return n},"x_func"))},Array.matrix=function(e,n,o=0){return e.matrix(n,o)},P(Array.matrix),P(Array.prototype.matrix),Array.prototype.matrix2d=function(e,n=0){let o=p(function(s){return n},"y_func");return Array.from({length:e},p(function(s){return Array.from({length:e},o)},"x_func"))},Array.matrix2d=function(e,n,o=0){return e.matrix2d(n,o)},P(Array.matrix2d),P(Array.prototype.matrix2d),Array.prototype.matrix3d=function(e,n=0){let o=p(function(s){return Array.from({length:e},function(){return n})},"y_func");return Array.from({length:e},p(function(s){return Array.from({length:e},o)},"x_func"))},Array.matrix3d=function(e,n,o=0){return e.matrix3d(n,o)},P(Array.matrix3d),P(Array.prototype.matrix3d),String.prototype.list=function(){let e=this;return Tn(0,e.length-1).map(function(n){return e[n]})},P(String.prototype.list),Bo(),$e(function(){typeof t._sdk_<"u"?d.debug("The SDK is already present in this bundle, skipping the dynamic import"):Gr(),v.get("useSDK")||ln.__start__().catch(e=>{throw Error(e)})}),S(S),S(Pn),S(R),S(on),S(Z),S(eo),S($e),S(Qo),S(y),S(le),S(ln),y&&cn(function(){$e(function(){(function(e){let n=!1,o=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight),i=Math.max(document.body.scrollWidth,document.documentElement.scrollWidth,document.body.offsetWidth,document.documentElement.offsetWidth,document.body.clientWidth,document.documentElement.clientWidth);function s(a){let l=Math.round(e.scrollY*100/o),u=Math.round(e.scrollX*100/i),h=new CustomEvent("scrollpercent",{detail:{percentX:u,percentY:l}});a.target.dispatchEvent(h);let f="defaultscroll";[0,5,10,25,50,75,90,95,100].filter(function(m){return m===l}).map(function(m){f="percentY"+l.toString();let C=new CustomEvent(f,{detail:{percentX:u,percentY:l}});return a.target.dispatchEvent(C),m})}c(s,"scrollDispatcher"),p(s,"scrollDispatcher"),document.addEventListener("scroll",function(a){n||(requestAnimationFrame(function(){s(a),n=!1}),n=!0)})})(t)})},[]),y||(typeof t._fireAsyncLoad<"u"&&ko.call(t),typeof t.onload<"u"&&t.onload.call(t)),(function(e){let n=p(function(){Object.freeze(Object.prototype),Object.freeze(Object)},"__freeze__");e&&v.get("secureObjects",!1)?$e(function(){n()}):v.get("secureObjects",!1)&&n()})(y))}),"__qcobjects__"),"__qcobjects__")(M)}}),Hr={};br(Hr,{ArrayCollection:c(()=>kr,"ArrayCollection"),ArrayList:c(()=>Yn,"ArrayList"),AssignPolyfill:c(()=>hi,"AssignPolyfill"),BackendMicroservice:c(()=>Br,"BackendMicroservice"),CONFIG:c(()=>v,"CONFIG"),Class:c(()=>on,"Class"),ClassFactory:c(()=>j,"ClassFactory"),ComplexStorageCache:c(()=>dn,"ComplexStorageCache"),Component:c(()=>qe,"Component"),ComponentURI:c(()=>In,"ComponentURI"),ConfigService:c(()=>Xn,"ConfigService"),Controller:c(()=>zr,"Controller"),DDO:c(()=>Kr,"DDO"),DefaultTemplateHandler:c(()=>Ur,"DefaultTemplateHandler"),Effect:c(()=>Yo,"Effect"),Export:c(()=>S,"Export"),GlobalSettings:c(()=>ln,"GlobalSettings"),Import:c(()=>Pn,"Import"),InheritClass:c(()=>G,"InheritClass"),JSONService:c(()=>zn,"JSONService"),Logger:c(()=>Zn,"Logger"),NamespaceRef:c(()=>zo,"NamespaceRef"),New:c(()=>Z,"New"),ObjectName:c(()=>gn,"ObjectName"),Package:c(()=>R,"Package"),Processor:c(()=>rn,"Processor"),Ready:c(()=>$e,"Ready"),RegisterClass:c(()=>Xo,"RegisterClass"),RegisterWidget:c(()=>po,"RegisterWidget"),RegisterWidgets:c(()=>Ko,"RegisterWidgets"),Service:c(()=>Vn,"Service"),SourceCSS:c(()=>Vr,"SourceCSS"),SourceJS:c(()=>Wr,"SourceJS"),Tag:c(()=>eo,"Tag"),TagElements:c(()=>Qn,"TagElements"),Timer:c(()=>Xr,"Timer"),Toggle:c(()=>Yr,"Toggle"),TransitionEffect:c(()=>Jr,"TransitionEffect"),VO:c(()=>Zr,"VO"),View:c(()=>Qr,"View"),_Cast:c(()=>ye,"_Cast"),_CastProps:c(()=>Te,"_CastProps"),_ComponentWidget_:c(()=>Mn,"_ComponentWidget_"),_Crypt:c(()=>de,"_Crypt"),_DOMCreateElement:c(()=>ee,"_DOMCreateElement"),_DataStringify:c(()=>I,"_DataStringify"),_LegacyCopy:c(()=>ro,"_LegacyCopy"),_QC_CLASSES:c(()=>Y,"_QC_CLASSES"),_QC_PACKAGES:c(()=>Q,"_QC_PACKAGES"),_QC_PACKAGES_IMPORTED:c(()=>vn,"_QC_PACKAGES_IMPORTED"),_QC_READY_LISTENERS:c(()=>je,"_QC_READY_LISTENERS"),_Ready:c(()=>Nn,"_Ready"),__attributeNotSet_:c(()=>Wn,"__attributeNotSet_"),__booleanAttribute_:c(()=>Sn,"__booleanAttribute_"),__getType__:c(()=>J,"__getType__"),__instanceID:c(()=>Ne,"__instanceID"),__is_raw_class__:c(()=>fn,"__is_raw_class__"),__make_global__:c(()=>Dn,"__make_global__"),__to_number:c(()=>W,"__to_number"),__top__:c(()=>Ir,"__top__"),_buildComponentsFromElements_:c(()=>Jn,"_buildComponentsFromElements_"),_fireAsyncLoad:c(()=>ko,"_fireAsyncLoad"),_methods_:c(()=>le,"_methods_"),_protected_code_:c(()=>P,"_protected_code_"),_require_:c(()=>xe,"_require_"),_super_:c(()=>to,"_super_"),_tag_filter_:c(()=>lo,"_tag_filter_"),_top:c(()=>M,"_top"),asyncLoad:c(()=>cn,"asyncLoad"),captureFalseTouch:c(()=>Go,"captureFalseTouch"),componentLoader:c(()=>An,"componentLoader"),componentsStack:c(()=>un,"componentsStack"),findPackageNodePath:c(()=>hn,"findPackageNodePath"),get:c(()=>ce,"get"),getDocumentLayout:c(()=>mi,"getDocumentLayout"),global:c(()=>M,"global"),isBrowser:c(()=>y,"isBrowser"),isNodeCommonJS:c(()=>xo,"isNodeCommonJS"),isQCObjects_Class:c(()=>jn,"isQCObjects_Class"),isQCObjects_Object:c(()=>Ye,"isQCObjects_Object"),is_a:c(()=>_e,"is_a"),is_phonegap:c(()=>oo,"is_phonegap"),logger:c(()=>d,"logger"),qcobjects:c(()=>fi,"qcobjects"),range:c(()=>Tn,"range"),ready:c(()=>Qo,"ready"),resetTop:c(()=>Kn,"resetTop"),serviceLoader:c(()=>Gn,"serviceLoader"),set:c(()=>pn,"set"),setDefaultProcessors:c(()=>Bo,"setDefaultProcessors"),shortCode:c(()=>Zo,"shortCode"),subelements:c(()=>nn,"subelements"),waitUntil:c(()=>Jo,"waitUntil")});sn.exports=ii(Hr);var hi={};typeof Object.assign!="function"&&Object.defineProperty(Object,"assign",{value:p(c(function(t,e){"use strict";if(t===null)throw new TypeError("Cannot convert undefined or null to object");let n=Object(t);for(let o=1;o<arguments.length;o++){let i=arguments[o];if(i!==null)for(let s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])}return n},"assign"),"assign"),writable:!0,configurable:!0});X();var fi=si(pi());X();we();ge();he();Pe();T();$();Fr();kn();To();io();Io();Ln();pe();qn();ao();qr();Ce();$n();q();fe();et();Po();U();$r();jr();bn();Re();Rr();Tr();co();Do();uo();Mr();Pr();Dr();Wo();Me();ge();Fn();U();T();q();var Fe,Br=(Fe=class extends G{constructor({domain:t=mn,basePath:e=ue,body:n=null,stream:o=null,request:i=null}){super({domain:t,basePath:e,body:n,stream:o,request:i}),d.debug("Initializing BackendMicroservice...");let s=this;typeof this.body>"u"&&(this.body=null),typeof n<"u"&&(this.body=n),this.cors(),s.stream=o,o?.on("data",u=>{let h=i?.method.toLowerCase(),f={post:s.post.bind(s)};Object.hasOwn(f,h)&&f[h].call(s,u)});let a=i?.method.toLowerCase(),l={get:s.get.bind(s),head:s.head.bind(s),put:s.put.bind(s),delete:s.delete.bind(s),connect:s.connect.bind(s),options:s.options.bind(s),trace:s.trace.bind(s),patch:s.patch.bind(s)};Object.hasOwn(l,a)&&l[a].call(s)}cors(){if(this.route.cors){d.debug("Validating CORS...");let{allow_origins:t,allow_credentials:e,allow_methods:n,allow_headers:o}=this.route.cors,i=this;if(typeof i.headers!="object"&&(i.headers={}),typeof i.route.responseHeaders!="object"&&(i.route.responseHeaders={}),typeof t<"u")if(d.debug("CORS: allow_origins available. Validating origins..."),t==="*"||typeof i.request.headers.origin>"u"||[...t].indexOf(i.request.headers.origin)!==-1)d.debug("CORS: Adding header Access-Control-Allow-Origin=*"),i.route.responseHeaders["Access-Control-Allow-Origin"]="*";else{d.debug("CORS: Origin is not allowed: "+i.request.headers.origin),d.debug("CORS: Forcing to finish the response..."),this.body={};try{this.done()}catch(s){d.debug(`It was not possible to finish the call to the microservice: ${s}`)}}else d.debug("CORS: no allow_origins available. Allowing all origins..."),d.debug("CORS: Adding header Access-Control-Allow-Origin=*"),i.route.responseHeaders["Access-Control-Allow-Origin"]="*";typeof e<"u"?(d.debug(`CORS: allow_credentials present. Allowing ${e}...`),i.route.responseHeaders["Access-Control-Allow-Credentials"]=e.toString()):(d.debug("CORS: No allow_credentials present. Allowing all credentials."),i.route.responseHeaders["Access-Control-Allow-Credentials"]="true"),typeof n<"u"?(d.debug(`CORS: allow_methods present. Allowing ${n}...`),i.route.responseHeaders["Access-Control-Allow-Methods"]=[...n].join(",")):(d.debug("CORS: No allow_methods present. Allowing only GET, OPTIONS and POST"),i.route.responseHeaders["Access-Control-Allow-Methods"]="GET, OPTIONS, POST"),typeof o<"u"?(d.debug(`CORS: allow_headers present. Allowing ${o}...`),i.route.responseHeaders["Access-Control-Allow-Headers"]=[...o].join(",")):(d.debug("CORS: No allow_headers present. Allowing all headers..."),i.route.responseHeaders["Access-Control-Allow-Headers"]="*")}else d.debug("No CORS validation available. You can specify cors in CONFIG.backend.routes[].cors")}head(t){d.debug(`[BackendMicroservice.head] Data received: ${I(t)}`),this.done()}get(t){d.debug(`[BackendMicroservice.get] Data received: ${I(t)}`),this.done()}post(t){d.debug(`[BackendMicroservice.post] Data received: ${I(t)}`),this.done()}put(t){d.debug(`[BackendMicroservice.put] Data received: ${I(t)}`),this.done()}delete(t){d.debug(`[BackendMicroservice.delete] Data received: ${I(t)}`),this.done()}connect(t){d.debug(`[BackendMicroservice.connect] Data received: ${I(t)}`),this.done()}options(t){d.debug(`[BackendMicroservice.options] Data received: ${I(t)}`),this.done()}trace(t){d.debug(`[BackendMicroservice.trace] Data received: ${I(t)}`),this.done()}patch(t){d.debug(`[BackendMicroservice.patch] Data received: ${I(t)}`),this.done()}finishWithBody(t){try{d.debug("[BackendMicroservice.finishWithBody] Ending the stream..."),d.debug(`[BackendMicroservice.finishWithBody] type of body is: ${typeof this.body}`),typeof this.body!="string"&&(this.body=I(this.body)),d.debug(`[BackendMicroservice.finishWithBody]
|
|
21
|
-
body: ${this.body} `),t?.write(this.body),t?.end(),d.debug("[BackendMicroservice.finishWithBody] Stream ended.")}catch(e){d.debug(`[BackendMicroservice.finishWithBody] Something went wrong ending the stream: ${e}`)}}done(){d.debug("[BackendMicroservice.done] Finalizing the response...");let t=this,e=t.stream;try{if(d.debug("[BackendMicroservice.done] Sending response headers..."),t.route.responseHeaders)d.debug(`[BackendMicroservice.done] Response headers present: ${Object.keys(t.route.responseHeaders).join(",")}`),e.respond(t.route.responseHeaders);else throw Error("[BackendMicroservice.done] No headers present.")}catch(n){d.debug(`[BackendMicroservice.done] Something went wrong sending response headers: ${n}`)}if(t.body!==null)try{d.debug("[BackendMicroservice.done] A body of message is present. Finalizing the response..."),t.finishWithBody.call(t,e)}catch(n){d.debug(`[BackendMicroservice.done] Something went wrong finalizing the response: ${n}`)}else d.debug("[BackendMicroservice.done] No body present. Ending stream..."),e.end()}},c(Fe,"BackendMicroservice"),p(Fe,"BackendMicroservice"),Fe);R("com.qcobjects.api",[Br]);jo();so();T();bn();no();we();var Xo=p(function(r,t){return On(r,t)},"RegisterClass");Dn(Xo);var Ae,Ur=(Ae=class{constructor({component:t,template:e}){this.template="",this.__definition={},this.component=t,this.template=e}assign(t){let e=this;if(typeof e.component>"u")throw new Error("DefaultTemplateHandler.assign: component is undefined");if(typeof e.component.processorHandler>"u")throw new Error("DefaultTemplateHandler.assign: component.processorHandler is undefined");let n=e.component.processorHandler;n.component=e.component;let o=typeof e.template<"u"?e.template:"";typeof t=="object"?[...Object.keys(t)].map(i=>{let s=t[i];if(typeof s=="string"||typeof s=="number"||!isNaN(s))try{s=be.processObject.bind(n).call(n,s,e.component),o=o.replace(new RegExp(`{{${i}}}`,"g"),s)}catch(a){throw d.warn(`${e.component?.name} could not parse processors.`),Error(`${e.component?.name} could not parse processors. Reason: ${a.message}`)}return i}):d.debug(`${e.component?.name}.data is not an object`);try{o=be.processObject.call(n,o,e.component)}catch(i){throw d.warn(`${e.component?.name} could not parse processors.`),Error(`${e.component?.name} could not parse processors. Reason: ${i.message}`)}return o}},c(Ae,"DefaultTemplateHandler"),p(Ae,"DefaultTemplateHandler"),Ae.__definition={},Ae);Xo(Ur,"com.qcobjects");Me();Ce();Fn();he();U();q();T();var Ge,Wr=(Ge=class extends G{constructor(t){super(t),this.domain=mn,this.basePath=ue,this.type="text/javascript",this.containerTag="body",this.url="",this.data={},this.async=!1,this.external=!1,this.status=!1,this.body=ee("script")}set(t,e){this[t]=e}get(t,e){return this[t]||e}done(){}fail(){}rebuild(){let t=this;try{document.getElementsByTagName(t.containerTag)[0].appendChild((function(e,n,o){return e.type=o.type,e.src=n,e.crossOrigin=Object.hasOwn(o,"crossOrigin")?o.crossOrigin:"anonymous",e.async=o.async,e.onreadystatechange=function(){this.readyState==="complete"&&o.done.call(o)},e.onload=function(i){o.status=!0,o.done.call(o,i)},e.onerror=function(i){o.status=!1,o.fail.call(o,i)},o.body=e,e}).call(this,ee("script"),this.external?this.url:this.basePath+this.url,t))}catch(e){t.status=!1,d.debug(`An error ocurred: ${e}`),t.fail()}}Cast(t){return ye(this,t)}_new_(t){this.__new__(t),this.rebuild()}},c(Ge,"SourceJS"),p(Ge,"SourceJS"),Ge);R("com.qcobjects",[Wr]);Me();Ce();Fn();he();U();$();q();var He,Vr=(He=class extends G{constructor(t){super(t),this.domain=mn,this.basePath=ue,this.url="",this.data={},this.async=!1,this.external=!1,this.body=ee("link")}fail(){throw new Error("Method not implemented.")}Cast(t){return ye(this,t)}set(t,e){this[t]=e}get(t,e){return this[t]||e}done(){}rebuild(){let t=this;y&&window.document.getElementsByTagName("head")[0].appendChild((function(e,n,o){return e.type="text/css",e.rel="stylesheet",e.href=n,e.crossOrigin="anonymous",e.onreadystatechange=function(){this.readyState==="complete"&&o.done.call(o)},e.onload=o.done,o.body=e,e}).call(this,ee("link"),this.external?this.url:this.basePath+this.url,t))}},c(He,"SourceCSS"),p(He,"SourceCSS"),He);R("com.qcobjects",[Vr]);$o();he();et();Pe();$();var Be,gi=(Be=class{attachInternals(){throw new Error("Method not implemented.")}click(){throw new Error("Method not implemented.")}hidePopover(){throw new Error("Method not implemented.")}showPopover(){throw new Error("Method not implemented.")}togglePopover(t){throw new Error("Method not implemented.")}addEventListener(t,e,n){throw new Error("Method not implemented.")}removeEventListener(t,e,n){throw new Error("Method not implemented.")}attachShadow(t){throw new Error("Method not implemented.")}checkVisibility(t){throw new Error("Method not implemented.")}closest(t){throw new Error("Method not implemented.")}computedStyleMap(){throw new Error("Method not implemented.")}getAttribute(t){throw new Error("Method not implemented.")}getAttributeNS(t,e){throw new Error("Method not implemented.")}getAttributeNames(){throw new Error("Method not implemented.")}getAttributeNode(t){throw new Error("Method not implemented.")}getAttributeNodeNS(t,e){throw new Error("Method not implemented.")}getBoundingClientRect(){throw new Error("Method not implemented.")}getClientRects(){throw new Error("Method not implemented.")}getElementsByClassName(t){throw new Error("Method not implemented.")}getElementsByTagName(t){throw new Error("Method not implemented.")}getElementsByTagNameNS(t,e){throw new Error("Method not implemented.")}getHTML(t){throw new Error("Method not implemented.")}hasAttribute(t){throw new Error("Method not implemented.")}hasAttributeNS(t,e){throw new Error("Method not implemented.")}hasAttributes(){throw new Error("Method not implemented.")}hasPointerCapture(t){throw new Error("Method not implemented.")}insertAdjacentElement(t,e){throw new Error("Method not implemented.")}insertAdjacentHTML(t,e){throw new Error("Method not implemented.")}insertAdjacentText(t,e){throw new Error("Method not implemented.")}matches(t){throw new Error("Method not implemented.")}releasePointerCapture(t){throw new Error("Method not implemented.")}removeAttribute(t){throw new Error("Method not implemented.")}removeAttributeNS(t,e){throw new Error("Method not implemented.")}removeAttributeNode(t){throw new Error("Method not implemented.")}requestFullscreen(t){throw new Error("Method not implemented.")}requestPointerLock(t){throw new Error("Method not implemented.")}scroll(t,e){throw new Error("Method not implemented.")}scrollBy(t,e){throw new Error("Method not implemented.")}scrollIntoView(t){throw new Error("Method not implemented.")}scrollTo(t,e){throw new Error("Method not implemented.")}setAttribute(t,e){throw new Error("Method not implemented.")}setAttributeNS(t,e,n){throw new Error("Method not implemented.")}setAttributeNode(t){throw new Error("Method not implemented.")}setAttributeNodeNS(t){throw new Error("Method not implemented.")}setHTMLUnsafe(t){throw new Error("Method not implemented.")}setPointerCapture(t){throw new Error("Method not implemented.")}toggleAttribute(t,e){throw new Error("Method not implemented.")}webkitMatchesSelector(t){throw new Error("Method not implemented.")}appendChild(t){throw new Error("Method not implemented.")}cloneNode(t){throw new Error("Method not implemented.")}compareDocumentPosition(t){throw new Error("Method not implemented.")}contains(t){throw new Error("Method not implemented.")}getRootNode(t){throw new Error("Method not implemented.")}hasChildNodes(){throw new Error("Method not implemented.")}insertBefore(t,e){throw new Error("Method not implemented.")}isDefaultNamespace(t){throw new Error("Method not implemented.")}isEqualNode(t){throw new Error("Method not implemented.")}isSameNode(t){throw new Error("Method not implemented.")}lookupNamespaceURI(t){throw new Error("Method not implemented.")}lookupPrefix(t){throw new Error("Method not implemented.")}normalize(){throw new Error("Method not implemented.")}removeChild(t){throw new Error("Method not implemented.")}replaceChild(t,e){throw new Error("Method not implemented.")}dispatchEvent(t){throw new Error("Method not implemented.")}animate(t,e){throw new Error("Method not implemented.")}getAnimations(t){throw new Error("Method not implemented.")}after(...t){throw new Error("Method not implemented.")}before(...t){throw new Error("Method not implemented.")}remove(){throw new Error("Method not implemented.")}replaceWith(...t){throw new Error("Method not implemented.")}append(...t){throw new Error("Method not implemented.")}prepend(...t){throw new Error("Method not implemented.")}querySelector(t){throw new Error("Method not implemented.")}querySelectorAll(t){throw new Error("Method not implemented.")}replaceChildren(...t){throw new Error("Method not implemented.")}blur(){throw new Error("Method not implemented.")}focus(t){throw new Error("Method not implemented.")}},c(Be,"QCObjectsWidgetNode"),p(Be,"QCObjectsWidgetNode"),Be),Mn,Ue,We;y?Mn=(Ue=class extends HTMLElement{constructor(){super();let t=this,e=t.nodeName.toLowerCase(),n=ee("quick-component"),o=t.getAttributeNames();n.setAttribute("name",e),t.hasAttribute("shadowed")||n.setAttribute("shadowed","true"),o.forEach(s=>{t.hasAttribute(s)&&(n.setAttribute(s,t?.getAttribute(s)),t.removeAttribute(s))}),t.getAttributeNames().filter(function(s){return s.startsWith("data-")}).map(function(s){return s.split("-")[1]}).forEach(function(s){n.setAttribute("data-"+s,t?.getAttribute("data-"+s)),t.removeAttribute("data-"+s)}),[...t.children].forEach(s=>{n.appendChild(s.cloneNode(!0)),s.remove()}),t.parentElement?(t.parentElement?.append(n),t.remove()):t.append(n)}},c(Ue,"_ComponentWidget_"),p(Ue,"_ComponentWidget_"),Ue):Mn=(We=class extends gi{constructor(){throw super(),new Error("Class not implemented.")}},c(We,"_ComponentWidget_"),p(We,"_ComponentWidget_"),We);S(Mn);var po=p(r=>{if(y)customElements.define(r,class extends Mn{});else throw new Error("RegisterWidget is not implemented for non browser ecosystems yet.")},"RegisterWidget"),Ko=p((...r)=>{[...r].filter(function(e){return typeof e=="string"}).map(function(e){return po(e)})},"RegisterWidgets");P(po);P(Ko);S(po);S(Ko);ie();fe();pe();U();T();Re();q();$();var Ve,zr=(Ve=class extends G{constructor({component:t,dependencies:e}){if(super({component:t,dependencies:e}),this.dependencies=[],this.component=t,this.dependencies=e,typeof this.component>"u"||this.component===null)throw Error(`${J(this)} must be called with a component`)}fail(...t){throw new Error("Method not implemented.")}routingSelectedAttr(t){return this.component?.routingSelected.map(e=>e[t]).filter(function(e){return e}).pop()}isTouchable(){return"ontouchstart"in window||navigator.MaxTouchPoints>0||navigator.msMaxTouchPoints>0}onpress(t,e){if(y)try{this.isTouchable()?(this.component?.componentRoot?.subelements(t))[0].addEventListener("touchstart",e,{passive:!0}):(this.component?.componentRoot?.subelements(t))[0].addEventListener("click",e,{passive:!0})}catch(n){d.debug(`An error ocurred: ${n}.`),d.debug("No button to assign press event")}}createRoutingController(){let t=this,e=t.component,n=t.routingSelectedAttr("controllerclass");if(typeof n<"u"){let o=j(n);typeof o<"u"&&e!==null&&(e.routingController=Z(o,{component:e}),typeof e.routingController<"u"&&Object.hasOwn(e.routingController,"done")&&typeof e.routingController.done=="function"&&e.routingController.done.call(e.routingController))}}done(){}},c(Ve,"Controller"),p(Ve,"Controller"),Ve);R("com.qcobjects.controllers",[zr]);pe();U();q();var ze,Qr=(ze=class extends G{constructor({component:t=void 0,dependencies:e=[]}){if(super({component:t,dependencies:e}),typeof this.component>"u"||this.component==="null")throw Error(`${J(this)} must be called with a component`)}},c(ze,"View"),p(ze,"View"),ze);R("com.qcobjects.views",[Qr]);Ar();U();q();var Qe,Zr=(Qe=class extends G{},c(Qe,"VO"),p(Qe,"VO"),Qe);R("com.qcobjects.valueObjects",[Zr]);U();q();Pe();fe();var Ie,Yo=(Ie=class extends G{constructor(){super(...arguments),this.duration=1e3}done(...t){throw new Error("Method not implemented.")}apply(...t){throw new Error("Method not implemented.")}static animate(t){Ie.prototype.animate.call({},t)}animate({timing:t,draw:e,duration:n}){let o=this,i=performance.now();requestAnimationFrame(p(c(function s(a){let l=(a-i)/n;l>1&&(l=1);let u=t(l);e(Math.round(u*100)),l<1?requestAnimationFrame(s):typeof o<"u"&&o!==null&&Object.hasOwn(o,"done")&&(typeof o.done).toLowerCase()==="function"&&o.done.call(o)},"animate"),"animate"))}},c(Ie,"_Effect"),p(Ie,"Effect"),Ie);R("com.qcobjects.effects.base",[Yo]);le(j("Effect")).map(r=>(P(r),r));T();q();fe();var Ze,Jr=(Ze=class extends Yo{constructor(){super(...arguments),this.duration=385,this.defaultParams={alphaFrom:0,alphaTo:1,angleFrom:180,angleTo:0,radiusFrom:0,radiusTo:30,scaleFrom:0,scaleTo:1},this.fitToHeight=!1,this.fitToWidth=!1}apply({alphaFrom:t,alphaTo:e,angleFrom:n,angleTo:o,radiusFrom:i,radiusTo:s,scaleFrom:a,scaleTo:l}){let u=this;d.info("EXECUTING TransitionEffect ");let h=u.component.componentRoot,f=typeof h<"u"&&h!==null&&typeof h.getBoundingClientRect!="function"?h.host??h:h;typeof h<"u"&&h!==null&&(u.fitToHeight&&(f.height=typeof f.offsetParent=="object"&&f.offsetParent!==null?f.offsetParent?.scrollHeight:f.getBoundingClientRect().height),u.fitToWidth&&(f.width=typeof f.offsetParent=="object"&&f.offsetParent!==null?f.offsetParent?.scrollWidth:f.getBoundingClientRect().width),u.component.shadowed?h.host.style.display="block":h.style.display="block",u.effects.map(g=>{let m=j(g);if(typeof m>"u")return d.debug(`Transition effect ${g} was not found`),g;let C=m.apply,b,O=u;if(typeof C=="function")b=C;else try{let se=new m({});typeof se.apply=="function"&&(b=se.apply.bind(se),O=se)}catch(se){d.debug(`Transition effect ${g} could not be instantiated: ${se}`)}if(typeof b!="function")return d.debug(`Transition effect ${g} does not declare an apply() method`),g;let x=u.component.shadowed?h.host:h,B={alphaFrom:t,alphaTo:e,angleFrom:n,angleTo:o,radiusFrom:i,radiusTo:s,scaleFrom:a,scaleTo:l};return b.call(O,x,...Object.values(B)),g}))}},c(Ze,"TransitionEffect"),p(Ze,"TransitionEffect"),Ze);R("com.qcobjects.effects.transitions.base",[Jr]);U();q();var Je,Xr=(Je=class extends G{constructor(){super(...arguments),this.duration=1e3,this.alive=!0}thread({timing:t,intervalInterceptor:e,duration:n}){let o=this,i=performance.now();requestAnimationFrame(p(c(function s(a){let l=a-i,u=l/n;u>1&&(u=1);let h=t(u,l);e(Math.round(h*100)),(u<1||n===-1)&&o.alive&&requestAnimationFrame(s)},"thread"),"thread"))}},c(Je,"Timer"),p(Je,"Timer"),Je);R("com.qcobjects.timing",[Xr]);Lo();Ho();Lr();et();U();T();Ln();var Xe,Kr=(Xe=class extends G{constructor({instance:t,name:e,fget:n,fset:o,value:i}){super({instance:t,name:e,fget:n,fset:o,value:i}),this._new_({instance:t,name:e,fget:n,fset:o,value:i})}_new_({instance:t,name:s,fget:n,fset:o}){var s=typeof s>"u"?gn(this):s;Object.defineProperty(t,s,{set(a){let l=a;d.debug("value changed "+s);let u;typeof o<"u"&&typeof o=="function"?u=o(l):u=l,t["_"+s]=u},get(){let a=t["_"+s];d.debug("returning value "+s);let l=p(h=>typeof h=="object"&&Object.hasOwn(h,"value")?h.value:h,"is_ddo"),u;return typeof n<"u"&&typeof n=="function"?u=n(l(a)):u=l(a),u}})}},c(Xe,"DDO"),p(Xe,"DDO"),Xe);S(Kr);U();T();q();var Ke,Yr=(Ke=class extends G{constructor(t,e,n){super({positive:t,negative:e,args:n}),this._toggle=!1,this._inverse=!0,this._positive=null,this._negative=null,this._dispatched=null,this._args={},this._new_({positive:t,negative:e,args:n})}changeToggle(){this._toggle=!this._toggle}_new_({positive:t,negative:e,args:n}){this._positive=t,this._negative=e,this._args=n}fire(){let t=this;var e=new Promise(function(n,o){return typeof t._positive=="function"&&typeof t._negative=="function"?(t._inverse?t._dispatched=t._toggle?t._negative.bind(t):t._positive.bind(t):t._dispatched=t._toggle?t._positive.bind(t):t._negative.bind(t),t._dispatched?.call(t,t._args),n.call(e,t)):(d.debug("Toggle functions are not declared"),o.call(e,t)),t}).then(function(n){return n.changeToggle(),n}).catch(function(n){return d.debug(n.toString()),t}).finally(()=>t);return e}},c(Ke,"Toggle"),p(Ke,"Toggle"),Ke);R("com.qcobjects.tools.essentials",[Yr]);Uo();var mi=p(function(){let r=p((n,o)=>n>o?"landscape":null,"h"),t=p((n,o)=>o>n?"portrait":null,"v"),e=p((n,o)=>n===o?"square":null,"square");return[r(document.documentElement.clientWidth,document.documentElement.clientHeight),t(document.documentElement.clientWidth,document.documentElement.clientHeight),e(document.documentElement.clientWidth,document.documentElement.clientHeight)].filter(n=>n!==null).pop()},"getDocumentLayout");Vo();X();no();X()});var Qs=_o((ki,zs)=>{"use strict";var mo=Object.defineProperty,bi=Object.getOwnPropertyDescriptor,_i=Object.getOwnPropertyNames,yi=Object.prototype.hasOwnProperty,_=c((r,t)=>mo(r,"name",{value:t,configurable:!0}),"__name"),wi=c((r,t)=>{for(var e in t)mo(r,e,{get:t[e],enumerable:!0})},"__export"),Ci=c((r,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of _i(t))!yi.call(r,o)&&o!==e&&mo(r,o,{get:c(()=>t[o],"get"),enumerable:!(n=bi(t,o))||n.enumerable});return r},"__copyProps"),vi=c(r=>Ci(mo({},"__esModule",{value:!0}),r),"__toCommonJS"),es={};wi(es,{BasicLayout:c(()=>Ws,"BasicLayout"),ButtonField:c(()=>fs,"ButtonField"),CanvasTool:c(()=>Us,"CanvasTool"),Contact:c(()=>ns,"Contact"),CubeSplashScreenComponent:c(()=>Is,"CubeSplashScreenComponent"),DataGridController:c(()=>ks,"DataGridController"),EmailField:c(()=>bs,"EmailField"),Fade:c(()=>Se,"Fade"),FormController:c(()=>js,"FormController"),FormField:c(()=>en,"FormField"),FormValidations:c(()=>Ds,"FormValidations"),GenericController:c(()=>Ps,"GenericController"),GridComponent:c(()=>Cs,"GridComponent"),GridController:c(()=>Rs,"GridController"),GridItemComponent:c(()=>ws,"GridItemComponent"),GridView:c(()=>Hs,"GridView"),InputField:c(()=>gs,"InputField"),ListComponent:c(()=>Os,"ListComponent"),ListController:c(()=>Ms,"ListController"),ListItemComponent:c(()=>vs,"ListItemComponent"),ModalComponent:c(()=>cr,"ModalComponent"),ModalController:c(()=>Fs,"ModalController"),ModalEnclosureComponent:c(()=>_s,"ModalEnclosureComponent"),ModalFade:c(()=>fo,"ModalFade"),ModalMoveDown:c(()=>ar,"ModalMoveDown"),ModalMoveUp:c(()=>ir,"ModalMoveUp"),Move:c(()=>oe,"Move"),MoveXInFromLeft:c(()=>or,"MoveXInFromLeft"),MoveXInFromRight:c(()=>nr,"MoveXInFromRight"),MoveYInFromBottom:c(()=>rr,"MoveYInFromBottom"),MoveYInFromTop:c(()=>os,"MoveYInFromTop"),NotificationComponent:c(()=>xs,"NotificationComponent"),Radius:c(()=>cs,"Radius"),Resize:c(()=>sr,"Resize"),Rotate:c(()=>as,"Rotate"),RotateX:c(()=>rs,"RotateX"),RotateY:c(()=>ss,"RotateY"),RotateZ:c(()=>is,"RotateZ"),SessionData:c(()=>Vs,"SessionData"),SessionUserToken:c(()=>go,"SessionUserToken"),ShadowedComponent:c(()=>hs,"ShadowedComponent"),SlideItemComponent:c(()=>Es,"SlideItemComponent"),SlideListComponent:c(()=>Ss,"SlideListComponent"),SliderComponent:c(()=>Ns,"SliderComponent"),SliderController:c(()=>Ls,"SliderController"),SplashScreenComponent:c(()=>Hn,"SplashScreenComponent"),SwaggerUIComponent:c(()=>ys,"SwaggerUIComponent"),SwaggerUIController:c(()=>$s,"SwaggerUIController"),TextField:c(()=>ms,"TextField"),VideoSplashScreenComponent:c(()=>As,"VideoSplashScreenComponent"),WipeDown:c(()=>ps,"WipeDown"),WipeLeft:c(()=>ds,"WipeLeft"),WipeRight:c(()=>ls,"WipeRight"),WipeUp:c(()=>us,"WipeUp"),default:c(()=>Si,"default"),i18n_messages:c(()=>tr,"i18n_messages")});zs.exports=vi(es);var ho=k(),me=k(),tt,tr=(tt=class extends me.InheritClass{constructor({messages:t=[]}){super({messages:t}),me.CONFIG.get("use_i18n",!1)&&(me.CONFIG.set("lang","en"),(0,me.get)("i18n")?(0,me.set)("i18n",{messages:(0,me.get)("i18n").messages.concat(t)}):(0,me.set)("i18n",{messages:t}))}_load_i18n_packages_(){return me.CONFIG.get("i18n_languages",[]).map(t=>{(0,me.Import)(`org.quickcorp.i18n_messages.${t}`)})}},c(tt,"i18n_messages"),_(tt,"i18n_messages"),tt);(0,me.Package)("org.qcobjects.i18n_messages",[tr]);new tr({})._load_i18n_packages_();var ts=k(),nt,ns=(nt=class extends ts.VO{},c(nt,"Contact"),_(nt,"Contact"),nt);(0,ts.Package)("org.qcobjects.models",[ns]);var F=k(),Oe=k(),ot,Se=(ot=class extends Oe.Effect{constructor(t){super(t),this.duration=1e3,this.duration=t?.duration}apply(t,e,n){let o=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){Oe.logger.debug("animation progress: "+i.toString());let s=e+i*o/100;Oe.logger.debug("alpha: "+s.toString()),t.style.opacity=s.toString()}})}static apply(t,e,n){let o=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){Oe.logger.debug("animation progress: "+i.toString());let s=e+i*o/100;Oe.logger.debug("alpha: "+s.toString()),t.style.opacity=s.toString()}})}},c(ot,"Fade"),_(ot,"Fade"),ot),rt,oe=(rt=class extends Oe.Effect{constructor(){super(...arguments),this.duration=1e3}static apply(t,e,n,o,i){let s=o-e,a=i-n;t.style.transform="translate("+e+"px,"+n+"px)",super.animate({duration:this.duration,timing(l){return l},draw(l){Oe.logger.debug("animation progress: "+l.toString());let u=n+l*a/100,h=e+l*s/100;Oe.logger.debug("x: "+h.toString()+" y:"+u.toString()),t.style.transform="translate("+h+"px,"+u+"px)"}})}},c(rt,"Move"),_(rt,"Move"),rt);(0,Oe.Package)("org.qcobjects.effects.base",[Se,oe]);var A=k(),st,nr=(st=class extends oe{constructor(){super(...arguments),this.duration=1e3}static apply(t){oe.apply.call(this,t,t.width,0,0,0)}},c(st,"MoveXInFromRight"),_(st,"MoveXInFromRight"),st),it,or=(it=class extends oe{constructor(){super(...arguments),this.duration=1e3}static apply(t){oe.apply.call(this,t,-t.width,0,0,0)}},c(it,"MoveXInFromLeft"),_(it,"MoveXInFromLeft"),it),at,rr=(at=class extends oe{constructor(){super(...arguments),this.duration=1e3}static apply(t){oe.apply.call(this,t,0,t.height,0,0)}},c(at,"MoveYInFromBottom"),_(at,"MoveYInFromBottom"),at),ct,os=(ct=class extends oe{constructor(){super(...arguments),this.duration=1e3}static apply(t){oe.apply.call(this,t,0,-t.height,0,0)}},c(ct,"MoveYInFromTop"),_(ct,"MoveYInFromTop"),ct),dt,rs=(dt=class extends A.Effect{constructor(){super(...arguments),this.duration=1e3}static apply(t,e,n){let o=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){A.logger.debug("animation progress: "+i.toString());let s=Math.round(e+i*o/100);A.logger.debug("angle: "+s.toString()),t.style.transform="rotate3d(1,0,0,"+s.toString()+"deg)"}})}},c(dt,"RotateX"),_(dt,"RotateX"),dt),lt,ss=(lt=class extends A.Effect{constructor(){super(...arguments),this.duration=1e3}static apply(t,e,n){let o=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){A.logger.debug("animation progress: "+i.toString());let s=Math.round(e+i*o/100);A.logger.debug("angle: "+s.toString()),t.style.transform="rotate3d(0,1,0,"+s.toString()+"deg)"}})}},c(lt,"RotateY"),_(lt,"RotateY"),lt),ut,is=(ut=class extends A.Effect{constructor(){super(...arguments),this.duration=1e3}apply(t,e,n){let o=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){A.logger.debug("animation progress: "+i.toString());let s=Math.round(e+i*o/100);A.logger.debug("angle: "+s.toString()),t.style.transform="rotate3d(0,0,1,"+s.toString()+"deg)"}})}},c(ut,"RotateZ"),_(ut,"RotateZ"),ut),pt,as=(pt=class extends A.Effect{constructor(){super(...arguments),this.duration=1e3}apply(t,e,n){let o=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){A.logger.debug("animation progress: "+i.toString());let s=Math.round(e+i*o/100);A.logger.debug("angle: "+s.toString()),t.style.transform="rotate3d(1,1,1,"+s.toString()+"deg)"}})}},c(pt,"Rotate"),_(pt,"Rotate"),pt),ht,cs=(ht=class extends A.Effect{constructor(){super(...arguments),this.duration=1e3}apply(t,e,n){let o=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){A.logger.debug("animation progress: "+i.toString());let s=e+i*o/100;A.logger.debug("radius: "+s.toString()),t.style.borderRadius=s.toString()+"px"}})}},c(ht,"Radius"),_(ht,"Radius"),ht),ft,sr=(ft=class extends A.Effect{constructor(){super(...arguments),this.duration=1e3}apply(t,e,n){let o=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){A.logger.debug("animation progress: "+i.toString());let s=e+i*o/100;A.logger.debug("resize: "+s.toString()),t.style.transformOrigin="center",t.style.transform="scale("+s+","+s+")"}})}},c(ft,"Resize"),_(ft,"Resize"),ft),gt,ds=(gt=class extends A.Effect{constructor(){super(...arguments),this.duration=1e3}apply(t,e,n){let o=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){A.logger.debug("animation progress: "+i.toString());let s=e+i*o/100;A.logger.debug("wipe: "+s.toString()),t.style.transformOrigin="right",t.style.transform="scaleX("+s+")"}})}},c(gt,"WipeLeft"),_(gt,"WipeLeft"),gt),mt,ls=(mt=class extends A.Effect{constructor(){super(...arguments),this.duration=1e3}apply(t,e,n){let o=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){A.logger.debug("animation progress: "+i.toString());let s=e+i*o/100;A.logger.debug("wipe: "+s.toString()),t.style.transformOrigin="left",t.style.transform="scaleX("+s+")"}})}},c(mt,"WipeRight"),_(mt,"WipeRight"),mt),bt,us=(bt=class extends A.Effect{constructor(){super(...arguments),this.duration=1e3}apply(t,e,n){let o=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){A.logger.debug("animation progress: "+i.toString());let s=e+i*o/100;A.logger.debug("wipe: "+s.toString()),t.style.transformOrigin="bottom",t.style.transform="scaleY("+s+")"}})}},c(bt,"WipeUp"),_(bt,"WipeUp"),bt),_t,ps=(_t=class extends A.Effect{constructor(){super(...arguments),this.duration=1e3}apply(t,e,n){let o=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){A.logger.debug("animation progress: "+i.toString());let s=e+i*o/100;A.logger.debug("wipe: "+s.toString()),t.style.transformOrigin="top",t.style.transform="scaleY("+s+")"}})}},c(_t,"WipeDown"),_(_t,"WipeDown"),_t);(0,A.Package)("org.qcobjects.effects.extended",[nr,or,rr,os,rs,ss,is,as,cs,sr,ds,ls,us,ps]);var Oi=k(),yt,fo=(yt=class extends Se{constructor(){super(...arguments),this.duration=500}},c(yt,"ModalFade"),_(yt,"ModalFade"),yt),wt,ir=(wt=class extends oe{constructor(){super(...arguments),this.duration=800}},c(wt,"ModalMoveUp"),_(wt,"ModalMoveUp"),wt),Ct,ar=(Ct=class extends oe{constructor(){super(...arguments),this.duration=300}},c(Ct,"ModalMoveDown"),_(Ct,"ModalMoveDown"),Ct);(0,Oi.Package)("org.qcobjects.modal.effects",[fo,ar,ir]);var ve=k(),vt,en=(vt=class extends ve.Component{constructor(t){t.name=typeof t.name<"u"?t.name:"form-field",super(t),this.cached=!1,this.reload=!0}createBindingEvents(){let t;typeof this.fieldType>"u"||this.fieldType==null?t=this.body.subelements("*[data-field]"):t=this.body.subelements(this.fieldType+"[data-field]");for(let e=0;e<t.length;e++){let n=t[e];n.addEventListener("change",()=>{ve.logger.debug("Executing change event binding"),this.executeBindings()}),n.addEventListener("blur",()=>{ve.logger.debug("Executing change event binding"),this.executeBindings()}),n.addEventListener("focus",()=>{ve.logger.debug("Executing change event binding"),this.executeBindings()}),n.addEventListener("keydown",()=>{ve.logger.debug("Executing keydown event binding"),this.executeBindings()})}}executeBinding(t){let e=t.getAttribute("data-field");ve.logger.debug("Binding "+e+" for "+this.name),this.data[e]=t.value}executeBindings(){let t;typeof this.fieldType>"u"||this.fieldType==null?t=this.body.subelements("*[data-field]"):t=this.body.subelements(this.fieldType+"[data-field]");for(let e=0;e<t.length;e++){let n=t[e],o=n.getAttribute("data-field");ve.logger.debug("Binding "+o+" for "+this.name),this.data[o]=n.value}}done(t){let e=super.done(t);return this.executeBindings(),this.createBindingEvents(),ve.logger.debug("Field loaded: "+this.fieldType+"[name="+this.name+"]"),e}},c(vt,"FormField"),_(vt,"FormField"),vt);(0,ve.Package)("org.qcobjects.base.components",[en]);var Ot,hs=(Ot=class extends F.Component{constructor(t){t.body=(0,F._DOMCreateElement)("div"),super(t),this.container=null,this.shadowed=!0,this.cached=!1,this.controller=null,this.view=null,this.data={}}},c(Ot,"ShadowedComponent"),_(Ot,"ShadowedComponent"),Ot),St,fs=(St=class extends en{constructor(t){t.fieldType="button",super(t)}},c(St,"ButtonField"),_(St,"ButtonField"),St),Et,gs=(Et=class extends en{constructor(t){t.fieldType="input",super(t)}},c(Et,"InputField"),_(Et,"InputField"),Et),Nt,ms=(Nt=class extends en{constructor(t){t.fieldType="textarea",super(t)}},c(Nt,"TextField"),_(Nt,"TextField"),Nt),xt,bs=(xt=class extends en{constructor(t){t.fieldType="input",super(t)}},c(xt,"EmailField"),_(xt,"EmailField"),xt),At,_s=(At=class extends F.Component{constructor(t){t.body=(0,F._DOMCreateElement)("div"),super(t),this.name="modalenclosure",this.tplsource="inline",this.cached=!1,this.basePath=F.CONFIG.get("modalBasePath",F.CONFIG.get("remoteSDKPath","")),this.template=`
|
|
20
|
+
`,portrait:l};return Object.hasOwn(h,s)?h[s]:""},"layout");be.setProcessor(t);let e=p((i,s,a,...l)=>{let u=[...l].map(function(f){return{[f.split("=")[0]]:f.split("=")[1]}}).reduce(function(f,g){return Object.assign(f,g)}),h=[...Object.keys(u)].map(function(f){return`${f}=${u[f]}`}).join(" ");return`<component name="${s}" componentClass="${a}" ${h}></component>`},"component");be.setProcessor(e);let n=p((i,s,a,...l)=>{let u=[...l].map(function(f){return{[f.split("=")[0]]:f.split("=")[1]}}).reduce(function(f,g){return Object.assign(f,g)}),h=[...Object.keys(u)].map(function(f){return`${f}=${u[f]}`}).join(" ");return`<quick-component name="${s}" componentClass="${a}" ${h}></quick-component>`},"quick_component");be.setProcessor(n);let o=p((i,s,a)=>An(s).map(function(l){return a.replace("{{index}}",l.toString())}).join(""),"repeat");be.setProcessor(o)})()},"setDefaultProcessors")}}),hn,Vo=w({"src/findPackageNodePath.ts"(){"use strict";ie(),et(),T(),$(),hn=p(function(r){let t=null;if(!y){let e=null;try{let s=yn("node:fs");s&&typeof s.existsSync=="function"&&(e=s)}catch(s){d.debug(`findPackageNodePath could not load node:fs: ${s}`)}let n=typeof sn<"u"&&Array.isArray(sn.paths)?sn.paths:[],o=typeof process<"u"&&typeof process.cwd=="function"?process.cwd():"",i=[`${v.get("projectPath")}${v.get("relativeImportPath")}`,`${v.get("basePath")}${v.get("relativeImportPath")}`,`${v.get("projectPath")}`,`${v.get("basePath")}`,`${v.get("relativeImportPath")}`,`${o}${v.get("relativeImportPath")}`,`${o}/node_modules/`,`${o}/node_modules`,`${o}`,"node_modules","./",""].concat(n).filter(s=>typeof s=="string"&&s!=="undefined");e!==null?(i=i.filter(s=>e.existsSync(s+"/"+r)),i.length>0?(t=i[0],d.info(r+" is Installed.")):(t="",d.info(`${r} is not in a standard path.`))):(t=`${o}/node_modules`,d.debug(`findPackageNodePath could not verify ${r}, assuming ${t}`))}return t},"findPackageNodePath"),S(hn)}}),In,zo=w({"src/Import.ts"(){"use strict";Me(),ie(),ge(),he(),Vo(),T(),$(),we(),In=p(function(r,t,e){e!==void 0&&d.debug(`[Import] Setting external=${e.toString()} resource to import: ${r}`),e?d.debug(`[Import] Registering external resource to import: ${r}`):d.debug(`[Import] Registering local resource to import: ${r}`);let n;return y?(n=new Promise(function(o,i){let s=p(function(){let l=!1,u=0;for(let h in Q)u++;return u<wn.length?l=!1:l=!0,l},"allPackagesImported"),a=p(function(l){wn.push(t),s()&&wn.map(u=>je.push(u)),y&&v.get("removePackageScriptAfterLoading")&&l.target.remove(),o.call(n,{_imported_:l.target,_package_name_:r})},"readyImported");if(!Object.hasOwn(Q,r)){let l=ee("script");l.type=v.get("sourceType","text/javascript"),l.async=!!v.get("asynchronousImportsLoad"),l.onreadystatechange=function(){l.readyState==="complete"&&a(l)},l.onload=a,l.onerror=function(u){d.debug(`An error ocurred: ${u}.`),i.call(n,{_imported_:l,_package_name_:r})},l.src=e?v.get("remoteImportsPath")+r+".js":ue+v.get("relativeImportPath")+r+".js",document.getElementsByTagName("head")[0].appendChild(l)}}),n.catch(function(){d.debug("Import: Error loading a package ")})):n=new Promise(function(o,i){try{let s=hn(r),a="";if(s!==null)a=s+"/"+r;else{let l=hn(r+".js");l!==null?a=l+"/"+r+".js":a=ue+v.get("relativeImportPath")+r}try{o.call(n,{_imported_:xe(`${a}`),_package_name_:r})}catch(l){i.call(n,{_imported_:null,_package_name_:r,error:l})}}catch(s){i.call(n,{_imported_:null,_package_name_:r,error:s})}}).catch(function(o){d.debug("Something happened when importing "+r),console.warn(o)}),n.catch(function(o){d.warn(I(o))}),n},"Import"),In.prototype.toString=function(){return"Import(packagename,ready,external) { [QCObjects native code] }"}}}),W,Qo=w({"src/mathFunctions.ts"(){"use strict";W=p(function(r){return isNaN(r)?new Number(0):new Number(r)},"__to_number")}}),Zo,Dr=w({"src/NamespaceRef.ts"(){"use strict";Dn(),q(),Zo=p(function(r){let e=(R(r)||[]).filter(n=>Ln(n)).map(n=>({[n.__definition.__classType]:n})).reduce((n,o)=>Object.assign(n,o));return r.split(".").map(n=>({[n]:e})).reverse().reduce((n,o)=>(o[Object.keys(o).join(".")]=n,o))},"NamespaceRef")}}),$e,Jo,Sn,jr=w({"src/Ready.ts"(){"use strict";ie(),$(),we(),X(),$e=p(r=>{y?je.push(r.bind(window)):typeof global<"u"&&je.push(r.bind(global))},"Ready"),Jo=$e,Sn=p(r=>{let t=p(()=>{je.map(function(e,n){typeof e=="function"&&(e(),je.splice(n,1))})},"_execReady");v.get("delayForReady")>0?y?setTimeout(t.bind(window),v.get("delayForReady")):typeof global<"u"&&setTimeout(t.bind(global),v.get("delayForReady")):t.call(M)},"_Ready")}}),Kn,$r,qr=w({"src/ArrayCollection.ts"(){"use strict";var r,t;fe(),T(),Re(),Qo(),Kn=(r=class extends Array{unique(){return this.filter(function(n,o,i){return i.indexOf(n)===o})}table(){console.table(this)}sum(){return this.reduce((n,o)=>W(n)+W(o),0)}avg(){return this.length<1?0:this.reduce((n,o)=>(W(n)+W(o))/2)}min(){return this.reduce((n,o)=>W(n)<=W(o)?n:o,1/0)}max(){return this.reduce((n,o)=>W(n)>=W(o)?n:o,0)}sortBy(n,o){let i=o?(function(s,a){return a[n]<s[n]?1:-1}):(function(s,a){return a[n]>s[n]?1:-1});return this.sort(i)}matrix(n,o){return Array.from({length:n},p(()=>o,"x_func"))}matrix2d(n,o){let i=p(function(){return o},"y_func");return Array.from({length:n},p(function(){return Array.from({length:n},i)},"x_func"))}matrix3d(n,o){let i=p(function(){return Array.from({length:n},function(){return o})},"y_func");return Array.from({length:n},p(function(){return Array.from({length:n},i)},"x_func"))}},c(r,"ArrayList"),p(r,"ArrayList"),r),$r=(t=class{constructor(){this.source=Z(Kn,[])}changed(n,o){d.debug("VALUE CHANGED"),d.debug(n),d.debug(o)}push(n){let o=this;return d.debug("VALUE ADDED"),d.debug(n),o.source.push(n)}pop(){let n=this;return d.debug("VALUE POPPED"),n.source.pop()}_new_(n){let o=this,i=0;o.source=Z(j("ArrayList"),n);for(let s of Object.keys(o.source))isNaN(s)||(d.debug("binding "+s.toString()),(function(a){Object.defineProperty(o,a,{set(l){d.debug("setting "+a+"="+l),o.source[a]=l,o.changed(a,l)},get(){return o.source[a]}})})(s),i++);o.source.length=i,Object.defineProperty(o,"length",{get(){return o.source.length}})}},c(t,"ArrayCollection"),p(t,"ArrayCollection"),t)}}),zn,Yn,Fr=w({"src/Tag.ts"(){"use strict";var r;fe(),Re(),q(),$(),qr(),zn=(r=class extends Kn{show(){this.map(function(e){return e.style.opacity=1})}hide(){this.map(function(e){return e.style.opacity=0})}effect(...e){let n=[...e].slice(1),o=e[0],i;(typeof o).toLowerCase()==="string"&&(i=j(o)),this.map(function(s){return i.apply.apply(i,[s].concat(n))})}findElements(e){let n=Z(j("TagElements"));if(y)for(let o of Object.keys(this))typeof o=="number"&&typeof this[o]!="function"&&Object.hasOwn(this[o],"subelements")&&n.push(this[o].subelements(e));return n}},c(r,"TagElements"),p(r,"TagElements"),r),Yn=p(function(t,e){let n=Z(zn);if(y){let o=document.subelements(t),i=[];for(let s=0;s<o.length;s++)typeof e<"u"&&Object.hasOwn(o[s],"innerHTML")&&(o[s].innerHTML=e),i.indexOf(s)<0&&(n.push(o[s]),i.push(s))}return n},"Tag"),R("com.qcobjects",[zn,Yn])}}),Xo,Gr=w({"src/shortCode.ts"(){"use strict";ro(),Xo=p(()=>{let t=de.encrypt((Math.random()*1e3).toString().replace(".",""),new Date().getTime().toString());return[...de.encrypt((Math.random()*1e3).toString().replace(".",""),new Date(new Date().getTime()-1e3*1e3).getTime().toString())].map((o,i)=>[...t][i]===o?null:o).filter(o=>o!==null).join("")},"shortCode")}}),eo,Hr=w({"src/super.ts"(){"use strict";fe(),eo=p(function(r,t){return j(r)[t]},"_super_"),eo.prototype.toString=function(){return"_super_(className,classMethodName,params) { [QCObjects native code] }"}}}),Ko,Br=w({"src/waitUntil.ts"(){"use strict";T(),Ko=p((r,t)=>{let e=p((n,o)=>{let s=0;var a=setInterval(function(){o()?(clearInterval(a),n(),d.debug("Ejecuting "+n.name+" after wait")):s<2e3?(s+=1,d.debug("WAIT UNTIL "+n.name+" is true, "+s.toString()+" cycles")):(d.debug("Max execution time for "+n.name+" expression until true"),clearInterval(a))},1)},"_waitUntil");setTimeout(function(){e(r,t)},1)},"waitUntil")}}),nn,Ur=w({"src/subelements.ts"(){"use strict";nn=p(c(function(t){return[...this.querySelectorAll(t)]},"subelements2"),"subelements")}}),wr,Wr,fi=w({"src/loadSDK.ts"(){"use strict";ie(),Vo(),zo(),T(),$(),X(),wr=p(()=>{if(typeof M._sdk_<"u"){d.debug("The SDK is already present in this bundle, skipping the dynamic import");return}v.get("useSDK")&&(function(){let r=v.get("remoteImportsPath"),t=!v.get("useLocalSDK");v.set("remoteImportsPath",v.get("remoteSDKPath"));let e=!1,n="QCObjects-SDK";if(y)e=!0;else{let o=hn("qcobjects-sdk");o!==null?(n="qcobjects-sdk",e=!0):o!==""?(n="node_modules/qcobjects-sdk/QCObjects-SDK",e=!0):e=!1}e?(d.info("Importing SDK... "+n),Io&&typeof yn<"u"?xe("qcobjects-sdk")?d.debug("QCObjects SDK was loaded OK."):d.debug("QCObjects SDK could not be imported."):In(n,function(){t?d.debug("QCObjects-SDK.js loaded from remote location"):d.debug("QCObjects-SDK.js loaded from local"),v.set("remoteImportsPath",r)},t)?.catch(o=>{throw new Error(`An error ocurred when trying to import: ${o}`)})):d.debug("SDK has not been imported as it is not available at the moment")})()},"loadSDK"),Wr=wr}}),gi=ai({"src/MainProcess.ts"(){"use strict";X(),so(),kr(),Ce(),Ro(),fe(),qo(),lo(),$o(),ie(),ge(),Lr(),et(),zo(),Pe(),Dn(),T(),Qo(),Dr(),Re(),Rn(),q(),$(),jr(),ao(),Fr(),bn(),jn(),pe(),Gr(),he(),io(),Hr(),Br(),Ur(),Fo(),fi(),Uo(),p(c((function r(t){if(typeof Object.defineProperty<"u"&&typeof t<"u")try{Object.defineProperty(t,"__qcobjects__",{enumerable:!0,configurable:!1,writable:!1,value:r})}catch(e){d.debug(`An error ocurred: ${e}`),typeof t.__qcobjects__<"u"&&(t.__qcobjects__.loaded=!0)}typeof t.__qcobjects__.loaded>"u"&&(t.__qcobjects__.loaded=!0,y&&(Element.prototype.subelements=nn,Document.prototype.subelements=nn,HTMLElement.prototype.subelements=nn,typeof ShadowRoot<"u"&&(ShadowRoot.prototype.subelements=nn)),d.debugEnabled=!1,d.infoEnabled=!0,y&&(Element.prototype.find=function(e){let n=this,o=[],i=document.subelements(e);return i.map((s,a)=>(typeof i[a]<"u"&&i[a].parentNode.tagName===n.parentNode.tagName&&o.push(ye(s,new Object)),s)),o}),y&&(Element.prototype.append=p(c(function(n){Ye(n)||typeof n.body<"u"?this.appendChild(n.body):this.appendChild(n)},"QC_Append"),"QC_Append"),Element.prototype.render=p(c(function(n){let o=this,i=p((s,a)=>{if(typeof document.implementation.createHTMLDocument<"u"){let l=document.implementation.createHTMLDocument("");l.body.innerHTML=a,l.body.subelements("*").map(u=>s.append(u))}},"_appendVDOM");if(typeof this.innerHTML<"u")try{this.innerHTML+=n}catch(s){d.debug(`An error ocurred: ${s}`),i(o,n)}else i(o,n)},"QC_Render"),"QC_Render")),S(Ko),S(eo),S(dn),S(j),S(ee),S(Xo),S(J),S(_e),R("com.qcobjects",[rn]),y&&(Element.prototype.Cast=p(c(function(n){return ye(this,n)},"QC_Cast"),"QC_Cast")),y?(window.onload=Sn,no&&document.addEventListener("deviceready",Sn,Bo)):global.onload=Sn,y&&window.addEventListener("popstate",function(e){e.stopImmediatePropagation(),e.stopPropagation(),qe.route().catch(n=>{throw new Error(`An error ocurred when trying to load initial routes. ${n}`)})}),S(qn),S(Nn),S(xn),S(gn),S(I),S(Ln),S(Ye),S(Zo),Array.prototype.unique=function(){return this.filter(function(e,n,o){return o.indexOf(e)===n})},Array.unique=function(e){return e.unique()},P(Array.unique),P(Array.prototype.unique),Array.prototype.table=function(){console.table(this)},Array.table=function(e){e.table()},P(Array.table),P(Array.prototype.table),Array.prototype.sum=function(){return this.reduce(function(e,n){return W(e)+W(n)},0)},Array.sum=function(e){return e.sum()},P(Array.sum),P(Array.prototype.sum),Array.prototype.avg=function(){return this.length<1?0:this.reduce(function(e,n){return(W(e)+W(n))/2})},Array.avg=function(e){return e.avg()},P(Array.avg),P(Array.prototype.avg),Array.prototype.min=function(){return this.reduce(function(e,n){return W(e)<=W(n)?e:n},1/0)},Array.min=function(e){return e.min()},P(Array.min),P(Array.prototype.min),Array.prototype.max=function(){return this.reduce(function(e,n){return W(e)>=W(n)?e:n},0)},Array.max=function(e){return e.max()},P(Array.max),P(Array.prototype.max),Array.prototype.sortBy=function(e,n=!0){let o=n?(function(i,s){return s[e]<i[e]?1:-1}):(function(i,s){return s[e]>i[e]?1:-1});return this.sort(o)},Array.sortBy=function(e,n,o=!0){return e.sortBy(n,o)},P(Array.sortBy),P(Array.prototype.sortBy),Array.prototype.matrix=function(e,n=0){return Array.from({length:e},p(function(i=void 0){return n},"x_func"))},Array.matrix=function(e,n,o=0){return e.matrix(n,o)},P(Array.matrix),P(Array.prototype.matrix),Array.prototype.matrix2d=function(e,n=0){let o=p(function(s){return n},"y_func");return Array.from({length:e},p(function(s){return Array.from({length:e},o)},"x_func"))},Array.matrix2d=function(e,n,o=0){return e.matrix2d(n,o)},P(Array.matrix2d),P(Array.prototype.matrix2d),Array.prototype.matrix3d=function(e,n=0){let o=p(function(s){return Array.from({length:e},function(){return n})},"y_func");return Array.from({length:e},p(function(s){return Array.from({length:e},o)},"x_func"))},Array.matrix3d=function(e,n,o=0){return e.matrix3d(n,o)},P(Array.matrix3d),P(Array.prototype.matrix3d),String.prototype.list=function(){let e=this;return An(0,e.length-1).map(function(n){return e[n]})},P(String.prototype.list),Wo(),$e(function(){typeof t._sdk_<"u"?d.debug("The SDK is already present in this bundle, skipping the dynamic import"):Wr(),v.get("useSDK")||ln.__start__().catch(e=>{throw Error(e)})}),S(S),S(In),S(R),S(on),S(Z),S(Yn),S($e),S(Jo),S(y),S(le),S(ln),y&&cn(function(){$e(function(){(function(e){let n=!1,o=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight),i=Math.max(document.body.scrollWidth,document.documentElement.scrollWidth,document.body.offsetWidth,document.documentElement.offsetWidth,document.body.clientWidth,document.documentElement.clientWidth);function s(a){let l=Math.round(e.scrollY*100/o),u=Math.round(e.scrollX*100/i),h=new CustomEvent("scrollpercent",{detail:{percentX:u,percentY:l}});a.target.dispatchEvent(h);let f="defaultscroll";[0,5,10,25,50,75,90,95,100].filter(function(m){return m===l}).map(function(m){f="percentY"+l.toString();let C=new CustomEvent(f,{detail:{percentX:u,percentY:l}});return a.target.dispatchEvent(C),m})}c(s,"scrollDispatcher"),p(s,"scrollDispatcher"),document.addEventListener("scroll",function(a){n||(requestAnimationFrame(function(){s(a),n=!1}),n=!0)})})(t)})},[]),y||(typeof t._fireAsyncLoad<"u"&&Do.call(t),typeof t.onload<"u"&&t.onload.call(t)),(function(e){let n=p(function(){Object.freeze(Object.prototype),Object.freeze(Object)},"__freeze__");e&&v.get("secureObjects",!1)?$e(function(){n()}):v.get("secureObjects",!1)&&n()})(y))}),"__qcobjects__"),"__qcobjects__")(M)}}),Vr={};Cr(Vr,{ArrayCollection:c(()=>$r,"ArrayCollection"),ArrayList:c(()=>Kn,"ArrayList"),AssignPolyfill:c(()=>mi,"AssignPolyfill"),BackendMicroservice:c(()=>zr,"BackendMicroservice"),CONFIG:c(()=>v,"CONFIG"),Class:c(()=>on,"Class"),ClassFactory:c(()=>j,"ClassFactory"),ComplexStorageCache:c(()=>dn,"ComplexStorageCache"),Component:c(()=>qe,"Component"),ComponentURI:c(()=>xn,"ComponentURI"),ConfigService:c(()=>Jn,"ConfigService"),Controller:c(()=>Xr,"Controller"),DDO:c(()=>ns,"DDO"),DefaultTemplateHandler:c(()=>Qr,"DefaultTemplateHandler"),Effect:c(()=>tr,"Effect"),Export:c(()=>S,"Export"),GlobalSettings:c(()=>ln,"GlobalSettings"),Import:c(()=>In,"Import"),InheritClass:c(()=>G,"InheritClass"),JSONService:c(()=>Vn,"JSONService"),Logger:c(()=>Qn,"Logger"),NamespaceRef:c(()=>Zo,"NamespaceRef"),New:c(()=>Z,"New"),ObjectName:c(()=>gn,"ObjectName"),Package:c(()=>R,"Package"),Processor:c(()=>rn,"Processor"),Ready:c(()=>$e,"Ready"),RegisterClass:c(()=>Yo,"RegisterClass"),RegisterWidget:c(()=>uo,"RegisterWidget"),RegisterWidgets:c(()=>er,"RegisterWidgets"),Service:c(()=>Wn,"Service"),SourceCSS:c(()=>Jr,"SourceCSS"),SourceJS:c(()=>Zr,"SourceJS"),Tag:c(()=>Yn,"Tag"),TagElements:c(()=>zn,"TagElements"),Timer:c(()=>ts,"Timer"),Toggle:c(()=>os,"Toggle"),TransitionEffect:c(()=>es,"TransitionEffect"),VO:c(()=>Yr,"VO"),View:c(()=>Kr,"View"),_Cast:c(()=>ye,"_Cast"),_CastProps:c(()=>Te,"_CastProps"),_ComponentWidget_:c(()=>Tn,"_ComponentWidget_"),_Crypt:c(()=>de,"_Crypt"),_DOMCreateElement:c(()=>ee,"_DOMCreateElement"),_DataStringify:c(()=>I,"_DataStringify"),_LegacyCopy:c(()=>oo,"_LegacyCopy"),_QC_CLASSES:c(()=>Y,"_QC_CLASSES"),_QC_PACKAGES:c(()=>Q,"_QC_PACKAGES"),_QC_PACKAGES_IMPORTED:c(()=>wn,"_QC_PACKAGES_IMPORTED"),_QC_READY_LISTENERS:c(()=>je,"_QC_READY_LISTENERS"),_Ready:c(()=>Sn,"_Ready"),__attributeNotSet_:c(()=>Un,"__attributeNotSet_"),__booleanAttribute_:c(()=>vn,"__booleanAttribute_"),__getType__:c(()=>J,"__getType__"),__instanceID:c(()=>Ne,"__instanceID"),__is_raw_class__:c(()=>fn,"__is_raw_class__"),__make_global__:c(()=>kn,"__make_global__"),__to_number:c(()=>W,"__to_number"),__top__:c(()=>Rr,"__top__"),_buildComponentsFromElements_:c(()=>Zn,"_buildComponentsFromElements_"),_fireAsyncLoad:c(()=>Do,"_fireAsyncLoad"),_methods_:c(()=>le,"_methods_"),_protected_code_:c(()=>P,"_protected_code_"),_require_:c(()=>xe,"_require_"),_super_:c(()=>eo,"_super_"),_tag_filter_:c(()=>co,"_tag_filter_"),_top:c(()=>M,"_top"),asyncLoad:c(()=>cn,"asyncLoad"),captureFalseTouch:c(()=>Bo,"captureFalseTouch"),componentLoader:c(()=>Nn,"componentLoader"),componentsStack:c(()=>un,"componentsStack"),findPackageNodePath:c(()=>hn,"findPackageNodePath"),get:c(()=>ce,"get"),getDocumentLayout:c(()=>yi,"getDocumentLayout"),global:c(()=>M,"global"),isBrowser:c(()=>y,"isBrowser"),isNodeCommonJS:c(()=>Io,"isNodeCommonJS"),isQCObjects_Class:c(()=>Ln,"isQCObjects_Class"),isQCObjects_Object:c(()=>Ye,"isQCObjects_Object"),is_a:c(()=>_e,"is_a"),is_phonegap:c(()=>no,"is_phonegap"),logger:c(()=>d,"logger"),qcobjects:c(()=>bi,"qcobjects"),range:c(()=>An,"range"),ready:c(()=>Jo,"ready"),resetTop:c(()=>Xn,"resetTop"),serviceLoader:c(()=>qn,"serviceLoader"),set:c(()=>pn,"set"),setDefaultProcessors:c(()=>Wo,"setDefaultProcessors"),shortCode:c(()=>Xo,"shortCode"),subelements:c(()=>nn,"subelements"),waitUntil:c(()=>Ko,"waitUntil")});sn.exports=di(Vr);var mi={};typeof Object.assign!="function"&&Object.defineProperty(Object,"assign",{value:p(c(function(t,e){"use strict";if(t===null)throw new TypeError("Cannot convert undefined or null to object");let n=Object(t);for(let o=1;o<arguments.length;o++){let i=arguments[o];if(i!==null)for(let s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])}return n},"assign"),"assign"),writable:!0,configurable:!0});X();var bi=ci(gi());X();we();ge();he();Pe();T();$();Ur();Mn();Mo();so();Po();Rn();pe();jn();io();Br();Ce();Dn();q();fe();et();Ro();U();Hr();Gr();bn();Re();jr();kr();ao();$o();lo();Dr();Lr();Fr();zo();Me();ge();$n();U();T();q();var Fe,zr=(Fe=class extends G{constructor({domain:t=mn,basePath:e=ue,body:n=null,stream:o=null,request:i=null}){super({domain:t,basePath:e,body:n,stream:o,request:i}),d.debug("Initializing BackendMicroservice...");let s=this;typeof this.body>"u"&&(this.body=null),typeof n<"u"&&(this.body=n),this.cors(),s.stream=o,o?.on("data",u=>{let h=i?.method.toLowerCase(),f={post:s.post.bind(s)};Object.hasOwn(f,h)&&f[h].call(s,u)});let a=i?.method.toLowerCase(),l={get:s.get.bind(s),head:s.head.bind(s),put:s.put.bind(s),delete:s.delete.bind(s),connect:s.connect.bind(s),options:s.options.bind(s),trace:s.trace.bind(s),patch:s.patch.bind(s)};Object.hasOwn(l,a)&&l[a].call(s)}cors(){if(this.route.cors){d.debug("Validating CORS...");let{allow_origins:t,allow_credentials:e,allow_methods:n,allow_headers:o}=this.route.cors,i=this;if(typeof i.headers!="object"&&(i.headers={}),typeof i.route.responseHeaders!="object"&&(i.route.responseHeaders={}),typeof t<"u")if(d.debug("CORS: allow_origins available. Validating origins..."),t==="*"||typeof i.request.headers.origin>"u"||[...t].indexOf(i.request.headers.origin)!==-1)d.debug("CORS: Adding header Access-Control-Allow-Origin=*"),i.route.responseHeaders["Access-Control-Allow-Origin"]="*";else{d.debug("CORS: Origin is not allowed: "+i.request.headers.origin),d.debug("CORS: Forcing to finish the response..."),this.body={};try{this.done()}catch(s){d.debug(`It was not possible to finish the call to the microservice: ${s}`)}}else d.debug("CORS: no allow_origins available. Allowing all origins..."),d.debug("CORS: Adding header Access-Control-Allow-Origin=*"),i.route.responseHeaders["Access-Control-Allow-Origin"]="*";typeof e<"u"?(d.debug(`CORS: allow_credentials present. Allowing ${e}...`),i.route.responseHeaders["Access-Control-Allow-Credentials"]=e.toString()):(d.debug("CORS: No allow_credentials present. Allowing all credentials."),i.route.responseHeaders["Access-Control-Allow-Credentials"]="true"),typeof n<"u"?(d.debug(`CORS: allow_methods present. Allowing ${n}...`),i.route.responseHeaders["Access-Control-Allow-Methods"]=[...n].join(",")):(d.debug("CORS: No allow_methods present. Allowing only GET, OPTIONS and POST"),i.route.responseHeaders["Access-Control-Allow-Methods"]="GET, OPTIONS, POST"),typeof o<"u"?(d.debug(`CORS: allow_headers present. Allowing ${o}...`),i.route.responseHeaders["Access-Control-Allow-Headers"]=[...o].join(",")):(d.debug("CORS: No allow_headers present. Allowing all headers..."),i.route.responseHeaders["Access-Control-Allow-Headers"]="*")}else d.debug("No CORS validation available. You can specify cors in CONFIG.backend.routes[].cors")}head(t){d.debug(`[BackendMicroservice.head] Data received: ${I(t)}`),this.done()}get(t){d.debug(`[BackendMicroservice.get] Data received: ${I(t)}`),this.done()}post(t){d.debug(`[BackendMicroservice.post] Data received: ${I(t)}`),this.done()}put(t){d.debug(`[BackendMicroservice.put] Data received: ${I(t)}`),this.done()}delete(t){d.debug(`[BackendMicroservice.delete] Data received: ${I(t)}`),this.done()}connect(t){d.debug(`[BackendMicroservice.connect] Data received: ${I(t)}`),this.done()}options(t){d.debug(`[BackendMicroservice.options] Data received: ${I(t)}`),this.done()}trace(t){d.debug(`[BackendMicroservice.trace] Data received: ${I(t)}`),this.done()}patch(t){d.debug(`[BackendMicroservice.patch] Data received: ${I(t)}`),this.done()}finishWithBody(t){try{d.debug("[BackendMicroservice.finishWithBody] Ending the stream..."),d.debug(`[BackendMicroservice.finishWithBody] type of body is: ${typeof this.body}`),typeof this.body!="string"&&(this.body=I(this.body)),d.debug(`[BackendMicroservice.finishWithBody]
|
|
21
|
+
body: ${this.body} `),t?.write(this.body),t?.end(),d.debug("[BackendMicroservice.finishWithBody] Stream ended.")}catch(e){d.debug(`[BackendMicroservice.finishWithBody] Something went wrong ending the stream: ${e}`)}}done(){d.debug("[BackendMicroservice.done] Finalizing the response...");let t=this,e=t.stream;try{if(d.debug("[BackendMicroservice.done] Sending response headers..."),t.route.responseHeaders)d.debug(`[BackendMicroservice.done] Response headers present: ${Object.keys(t.route.responseHeaders).join(",")}`),e.respond(t.route.responseHeaders);else throw Error("[BackendMicroservice.done] No headers present.")}catch(n){d.debug(`[BackendMicroservice.done] Something went wrong sending response headers: ${n}`)}if(t.body!==null)try{d.debug("[BackendMicroservice.done] A body of message is present. Finalizing the response..."),t.finishWithBody.call(t,e)}catch(n){d.debug(`[BackendMicroservice.done] Something went wrong finalizing the response: ${n}`)}else d.debug("[BackendMicroservice.done] No body present. Ending stream..."),e.end()}},c(Fe,"BackendMicroservice"),p(Fe,"BackendMicroservice"),Fe);R("com.qcobjects.api",[zr]);qo();ro();T();bn();to();we();var Yo=p(function(r,t){return Cn(r,t)},"RegisterClass");kn(Yo);var Ae,Qr=(Ae=class{constructor({component:t,template:e}){this.template="",this.__definition={},this.component=t,this.template=e}assign(t){let e=this;if(typeof e.component>"u")throw new Error("DefaultTemplateHandler.assign: component is undefined");if(typeof e.component.processorHandler>"u")throw new Error("DefaultTemplateHandler.assign: component.processorHandler is undefined");let n=e.component.processorHandler;n.component=e.component;let o=typeof e.template<"u"?e.template:"";typeof t=="object"?[...Object.keys(t)].map(i=>{let s=t[i];if(typeof s=="string"||typeof s=="number"||!isNaN(s))try{s=be.processObject.bind(n).call(n,s,e.component),o=o.replace(new RegExp(`{{${i}}}`,"g"),s)}catch(a){throw d.warn(`${e.component?.name} could not parse processors.`),Error(`${e.component?.name} could not parse processors. Reason: ${a.message}`)}return i}):d.debug(`${e.component?.name}.data is not an object`);try{o=be.processObject.call(n,o,e.component)}catch(i){throw d.warn(`${e.component?.name} could not parse processors.`),Error(`${e.component?.name} could not parse processors. Reason: ${i.message}`)}return o}},c(Ae,"DefaultTemplateHandler"),p(Ae,"DefaultTemplateHandler"),Ae.__definition={},Ae);Yo(Qr,"com.qcobjects");Me();Ce();$n();he();U();q();T();var Ge,Zr=(Ge=class extends G{constructor(t){super(t),this.domain=mn,this.basePath=ue,this.type="text/javascript",this.containerTag="body",this.url="",this.data={},this.async=!1,this.external=!1,this.status=!1,this.body=ee("script")}set(t,e){this[t]=e}get(t,e){return this[t]||e}done(){}fail(){}rebuild(){let t=this;try{document.getElementsByTagName(t.containerTag)[0].appendChild((function(e,n,o){return e.type=o.type,e.src=n,e.crossOrigin=Object.hasOwn(o,"crossOrigin")?o.crossOrigin:"anonymous",e.async=o.async,e.onreadystatechange=function(){this.readyState==="complete"&&o.done.call(o)},e.onload=function(i){o.status=!0,o.done.call(o,i)},e.onerror=function(i){o.status=!1,o.fail.call(o,i)},o.body=e,e}).call(this,ee("script"),this.external?this.url:this.basePath+this.url,t))}catch(e){t.status=!1,d.debug(`An error ocurred: ${e}`),t.fail()}}Cast(t){return ye(this,t)}_new_(t){this.__new__(t),this.rebuild()}},c(Ge,"SourceJS"),p(Ge,"SourceJS"),Ge);R("com.qcobjects",[Zr]);Me();Ce();$n();he();U();$();q();var He,Jr=(He=class extends G{constructor(t){super(t),this.domain=mn,this.basePath=ue,this.url="",this.data={},this.async=!1,this.external=!1,this.body=ee("link")}fail(){throw new Error("Method not implemented.")}Cast(t){return ye(this,t)}set(t,e){this[t]=e}get(t,e){return this[t]||e}done(){}rebuild(){let t=this;y&&window.document.getElementsByTagName("head")[0].appendChild((function(e,n,o){return e.type="text/css",e.rel="stylesheet",e.href=n,e.crossOrigin="anonymous",e.onreadystatechange=function(){this.readyState==="complete"&&o.done.call(o)},e.onload=o.done,o.body=e,e}).call(this,ee("link"),this.external?this.url:this.basePath+this.url,t))}},c(He,"SourceCSS"),p(He,"SourceCSS"),He);R("com.qcobjects",[Jr]);Fo();he();et();Pe();$();var Be,_i=(Be=class{attachInternals(){throw new Error("Method not implemented.")}click(){throw new Error("Method not implemented.")}hidePopover(){throw new Error("Method not implemented.")}showPopover(){throw new Error("Method not implemented.")}togglePopover(t){throw new Error("Method not implemented.")}addEventListener(t,e,n){throw new Error("Method not implemented.")}removeEventListener(t,e,n){throw new Error("Method not implemented.")}attachShadow(t){throw new Error("Method not implemented.")}checkVisibility(t){throw new Error("Method not implemented.")}closest(t){throw new Error("Method not implemented.")}computedStyleMap(){throw new Error("Method not implemented.")}getAttribute(t){throw new Error("Method not implemented.")}getAttributeNS(t,e){throw new Error("Method not implemented.")}getAttributeNames(){throw new Error("Method not implemented.")}getAttributeNode(t){throw new Error("Method not implemented.")}getAttributeNodeNS(t,e){throw new Error("Method not implemented.")}getBoundingClientRect(){throw new Error("Method not implemented.")}getClientRects(){throw new Error("Method not implemented.")}getElementsByClassName(t){throw new Error("Method not implemented.")}getElementsByTagName(t){throw new Error("Method not implemented.")}getElementsByTagNameNS(t,e){throw new Error("Method not implemented.")}getHTML(t){throw new Error("Method not implemented.")}hasAttribute(t){throw new Error("Method not implemented.")}hasAttributeNS(t,e){throw new Error("Method not implemented.")}hasAttributes(){throw new Error("Method not implemented.")}hasPointerCapture(t){throw new Error("Method not implemented.")}insertAdjacentElement(t,e){throw new Error("Method not implemented.")}insertAdjacentHTML(t,e){throw new Error("Method not implemented.")}insertAdjacentText(t,e){throw new Error("Method not implemented.")}matches(t){throw new Error("Method not implemented.")}releasePointerCapture(t){throw new Error("Method not implemented.")}removeAttribute(t){throw new Error("Method not implemented.")}removeAttributeNS(t,e){throw new Error("Method not implemented.")}removeAttributeNode(t){throw new Error("Method not implemented.")}requestFullscreen(t){throw new Error("Method not implemented.")}requestPointerLock(t){throw new Error("Method not implemented.")}scroll(t,e){throw new Error("Method not implemented.")}scrollBy(t,e){throw new Error("Method not implemented.")}scrollIntoView(t){throw new Error("Method not implemented.")}scrollTo(t,e){throw new Error("Method not implemented.")}setAttribute(t,e){throw new Error("Method not implemented.")}setAttributeNS(t,e,n){throw new Error("Method not implemented.")}setAttributeNode(t){throw new Error("Method not implemented.")}setAttributeNodeNS(t){throw new Error("Method not implemented.")}setHTMLUnsafe(t){throw new Error("Method not implemented.")}setPointerCapture(t){throw new Error("Method not implemented.")}toggleAttribute(t,e){throw new Error("Method not implemented.")}webkitMatchesSelector(t){throw new Error("Method not implemented.")}appendChild(t){throw new Error("Method not implemented.")}cloneNode(t){throw new Error("Method not implemented.")}compareDocumentPosition(t){throw new Error("Method not implemented.")}contains(t){throw new Error("Method not implemented.")}getRootNode(t){throw new Error("Method not implemented.")}hasChildNodes(){throw new Error("Method not implemented.")}insertBefore(t,e){throw new Error("Method not implemented.")}isDefaultNamespace(t){throw new Error("Method not implemented.")}isEqualNode(t){throw new Error("Method not implemented.")}isSameNode(t){throw new Error("Method not implemented.")}lookupNamespaceURI(t){throw new Error("Method not implemented.")}lookupPrefix(t){throw new Error("Method not implemented.")}normalize(){throw new Error("Method not implemented.")}removeChild(t){throw new Error("Method not implemented.")}replaceChild(t,e){throw new Error("Method not implemented.")}dispatchEvent(t){throw new Error("Method not implemented.")}animate(t,e){throw new Error("Method not implemented.")}getAnimations(t){throw new Error("Method not implemented.")}after(...t){throw new Error("Method not implemented.")}before(...t){throw new Error("Method not implemented.")}remove(){throw new Error("Method not implemented.")}replaceWith(...t){throw new Error("Method not implemented.")}append(...t){throw new Error("Method not implemented.")}prepend(...t){throw new Error("Method not implemented.")}querySelector(t){throw new Error("Method not implemented.")}querySelectorAll(t){throw new Error("Method not implemented.")}replaceChildren(...t){throw new Error("Method not implemented.")}blur(){throw new Error("Method not implemented.")}focus(t){throw new Error("Method not implemented.")}},c(Be,"QCObjectsWidgetNode"),p(Be,"QCObjectsWidgetNode"),Be),Tn,Ue,We;y?Tn=(Ue=class extends HTMLElement{constructor(){super();let t=this,e=t.nodeName.toLowerCase(),n=ee("quick-component"),o=t.getAttributeNames();n.setAttribute("name",e),t.hasAttribute("shadowed")||n.setAttribute("shadowed","true"),o.forEach(s=>{t.hasAttribute(s)&&(n.setAttribute(s,t?.getAttribute(s)),t.removeAttribute(s))}),t.getAttributeNames().filter(function(s){return s.startsWith("data-")}).map(function(s){return s.split("-")[1]}).forEach(function(s){n.setAttribute("data-"+s,t?.getAttribute("data-"+s)),t.removeAttribute("data-"+s)}),[...t.children].forEach(s=>{n.appendChild(s.cloneNode(!0)),s.remove()}),t.parentElement?(t.parentElement?.append(n),t.remove()):t.append(n)}},c(Ue,"_ComponentWidget_"),p(Ue,"_ComponentWidget_"),Ue):Tn=(We=class extends _i{constructor(){throw super(),new Error("Class not implemented.")}},c(We,"_ComponentWidget_"),p(We,"_ComponentWidget_"),We);S(Tn);var uo=p(r=>{if(y)customElements.define(r,class extends Tn{});else throw new Error("RegisterWidget is not implemented for non browser ecosystems yet.")},"RegisterWidget"),er=p((...r)=>{[...r].filter(function(e){return typeof e=="string"}).map(function(e){return uo(e)})},"RegisterWidgets");P(uo);P(er);S(uo);S(er);ie();fe();pe();U();T();Re();q();$();var Ve,Xr=(Ve=class extends G{constructor({component:t,dependencies:e}){if(super({component:t,dependencies:e}),this.dependencies=[],this.component=t,this.dependencies=e,typeof this.component>"u"||this.component===null)throw Error(`${J(this)} must be called with a component`)}fail(...t){throw new Error("Method not implemented.")}routingSelectedAttr(t){return this.component?.routingSelected.map(e=>e[t]).filter(function(e){return e}).pop()}isTouchable(){return"ontouchstart"in window||navigator.MaxTouchPoints>0||navigator.msMaxTouchPoints>0}onpress(t,e){if(y)try{this.isTouchable()?(this.component?.componentRoot?.subelements(t))[0].addEventListener("touchstart",e,{passive:!0}):(this.component?.componentRoot?.subelements(t))[0].addEventListener("click",e,{passive:!0})}catch(n){d.debug(`An error ocurred: ${n}.`),d.debug("No button to assign press event")}}createRoutingController(){let t=this,e=t.component,n=t.routingSelectedAttr("controllerclass");if(typeof n<"u"){let o=j(n);typeof o<"u"&&e!==null&&(e.routingController=Z(o,{component:e}),typeof e.routingController<"u"&&Object.hasOwn(e.routingController,"done")&&typeof e.routingController.done=="function"&&e.routingController.done.call(e.routingController))}}done(){}},c(Ve,"Controller"),p(Ve,"Controller"),Ve);R("com.qcobjects.controllers",[Xr]);pe();U();q();var ze,Kr=(ze=class extends G{constructor({component:t=void 0,dependencies:e=[]}){if(super({component:t,dependencies:e}),typeof this.component>"u"||this.component==="null")throw Error(`${J(this)} must be called with a component`)}},c(ze,"View"),p(ze,"View"),ze);R("com.qcobjects.views",[Kr]);Mr();U();q();var Qe,Yr=(Qe=class extends G{},c(Qe,"VO"),p(Qe,"VO"),Qe);R("com.qcobjects.valueObjects",[Yr]);U();q();Pe();fe();var Ie,tr=(Ie=class extends G{constructor(){super(...arguments),this.duration=1e3}done(...t){throw new Error("Method not implemented.")}apply(...t){throw new Error("Method not implemented.")}static animate(t){Ie.prototype.animate.call({},t)}animate({timing:t,draw:e,duration:n}){let o=this,i=performance.now();requestAnimationFrame(p(c(function s(a){let l=(a-i)/n;l>1&&(l=1);let u=t(l);e(Math.round(u*100)),l<1?requestAnimationFrame(s):typeof o<"u"&&o!==null&&Object.hasOwn(o,"done")&&(typeof o.done).toLowerCase()==="function"&&o.done.call(o)},"animate"),"animate"))}},c(Ie,"_Effect"),p(Ie,"Effect"),Ie);R("com.qcobjects.effects.base",[tr]);le(j("Effect")).map(r=>(P(r),r));T();q();fe();var Ze,es=(Ze=class extends tr{constructor(){super(...arguments),this.duration=385,this.defaultParams={alphaFrom:0,alphaTo:1,angleFrom:180,angleTo:0,radiusFrom:0,radiusTo:30,scaleFrom:0,scaleTo:1},this.fitToHeight=!1,this.fitToWidth=!1}apply({alphaFrom:t,alphaTo:e,angleFrom:n,angleTo:o,radiusFrom:i,radiusTo:s,scaleFrom:a,scaleTo:l}){let u=this;d.info("EXECUTING TransitionEffect ");let h=u.component.componentRoot,f=typeof h<"u"&&h!==null&&typeof h.getBoundingClientRect!="function"?h.host??h:h;typeof h<"u"&&h!==null&&(u.fitToHeight&&(f.height=typeof f.offsetParent=="object"&&f.offsetParent!==null?f.offsetParent?.scrollHeight:f.getBoundingClientRect().height),u.fitToWidth&&(f.width=typeof f.offsetParent=="object"&&f.offsetParent!==null?f.offsetParent?.scrollWidth:f.getBoundingClientRect().width),u.component.shadowed?h.host.style.display="block":h.style.display="block",u.effects.map(g=>{let m=j(g);if(typeof m>"u")return d.debug(`Transition effect ${g} was not found`),g;let C=m.apply,b,O=u;if(typeof C=="function")b=C;else try{let se=new m({});typeof se.apply=="function"&&(b=se.apply.bind(se),O=se)}catch(se){d.debug(`Transition effect ${g} could not be instantiated: ${se}`)}if(typeof b!="function")return d.debug(`Transition effect ${g} does not declare an apply() method`),g;let x=u.component.shadowed?h.host:h,B={alphaFrom:t,alphaTo:e,angleFrom:n,angleTo:o,radiusFrom:i,radiusTo:s,scaleFrom:a,scaleTo:l};return b.call(O,x,...Object.values(B)),g}))}},c(Ze,"TransitionEffect"),p(Ze,"TransitionEffect"),Ze);R("com.qcobjects.effects.transitions.base",[es]);U();q();var Je,ts=(Je=class extends G{constructor(){super(...arguments),this.duration=1e3,this.alive=!0}thread({timing:t,intervalInterceptor:e,duration:n}){let o=this,i=performance.now();requestAnimationFrame(p(c(function s(a){let l=a-i,u=l/n;u>1&&(u=1);let h=t(u,l);e(Math.round(h*100)),(u<1||n===-1)&&o.alive&&requestAnimationFrame(s)},"thread"),"thread"))}},c(Je,"Timer"),p(Je,"Timer"),Je);R("com.qcobjects.timing",[ts]);jo();Uo();qr();et();U();T();Rn();var Xe,ns=(Xe=class extends G{constructor({instance:t,name:e,fget:n,fset:o,value:i}){super({instance:t,name:e,fget:n,fset:o,value:i}),this._new_({instance:t,name:e,fget:n,fset:o,value:i})}_new_({instance:t,name:s,fget:n,fset:o}){var s=typeof s>"u"?gn(this):s;Object.defineProperty(t,s,{set(a){let l=a;d.debug("value changed "+s);let u;typeof o<"u"&&typeof o=="function"?u=o(l):u=l,t["_"+s]=u},get(){let a=t["_"+s];d.debug("returning value "+s);let l=p(h=>typeof h=="object"&&Object.hasOwn(h,"value")?h.value:h,"is_ddo"),u;return typeof n<"u"&&typeof n=="function"?u=n(l(a)):u=l(a),u}})}},c(Xe,"DDO"),p(Xe,"DDO"),Xe);S(ns);U();T();q();var Ke,os=(Ke=class extends G{constructor(t,e,n){super({positive:t,negative:e,args:n}),this._toggle=!1,this._inverse=!0,this._positive=null,this._negative=null,this._dispatched=null,this._args={},this._new_({positive:t,negative:e,args:n})}changeToggle(){this._toggle=!this._toggle}_new_({positive:t,negative:e,args:n}){this._positive=t,this._negative=e,this._args=n}fire(){let t=this;var e=new Promise(function(n,o){return typeof t._positive=="function"&&typeof t._negative=="function"?(t._inverse?t._dispatched=t._toggle?t._negative.bind(t):t._positive.bind(t):t._dispatched=t._toggle?t._positive.bind(t):t._negative.bind(t),t._dispatched?.call(t,t._args),n.call(e,t)):(d.debug("Toggle functions are not declared"),o.call(e,t)),t}).then(function(n){return n.changeToggle(),n}).catch(function(n){return d.debug(n.toString()),t}).finally(()=>t);return e}},c(Ke,"Toggle"),p(Ke,"Toggle"),Ke);R("com.qcobjects.tools.essentials",[os]);Vo();var yi=p(function(){let r=p((n,o)=>n>o?"landscape":null,"h"),t=p((n,o)=>o>n?"portrait":null,"v"),e=p((n,o)=>n===o?"square":null,"square");return[r(document.documentElement.clientWidth,document.documentElement.clientHeight),t(document.documentElement.clientWidth,document.documentElement.clientHeight),e(document.documentElement.clientWidth,document.documentElement.clientHeight)].filter(n=>n!==null).pop()},"getDocumentLayout");Qo();X();to();X()});var Ks=wo((ji,Xs)=>{"use strict";var go=Object.defineProperty,wi=Object.getOwnPropertyDescriptor,Ci=Object.getOwnPropertyNames,vi=Object.prototype.hasOwnProperty,_=c((r,t)=>go(r,"name",{value:t,configurable:!0}),"__name"),Oi=c((r,t)=>{for(var e in t)go(r,e,{get:t[e],enumerable:!0})},"__export"),Si=c((r,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Ci(t))!vi.call(r,o)&&o!==e&&go(r,o,{get:c(()=>t[o],"get"),enumerable:!(n=wi(t,o))||n.enumerable});return r},"__copyProps"),Ei=c(r=>Si(go({},"__esModule",{value:!0}),r),"__toCommonJS"),rs={};Oi(rs,{BasicLayout:c(()=>Zs,"BasicLayout"),ButtonField:c(()=>_s,"ButtonField"),CanvasTool:c(()=>Qs,"CanvasTool"),Contact:c(()=>is,"Contact"),CubeSplashScreenComponent:c(()=>Rs,"CubeSplashScreenComponent"),DataGridController:c(()=>$s,"DataGridController"),EmailField:c(()=>Cs,"EmailField"),Fade:c(()=>Se,"Fade"),FormController:c(()=>Gs,"FormController"),FormField:c(()=>en,"FormField"),FormValidations:c(()=>Fs,"FormValidations"),GenericController:c(()=>Ls,"GenericController"),GridComponent:c(()=>Es,"GridComponent"),GridController:c(()=>js,"GridController"),GridItemComponent:c(()=>Ss,"GridItemComponent"),GridView:c(()=>Vs,"GridView"),InputField:c(()=>ys,"InputField"),ListComponent:c(()=>xs,"ListComponent"),ListController:c(()=>Ds,"ListController"),ListItemComponent:c(()=>Ns,"ListItemComponent"),ModalComponent:c(()=>lr,"ModalComponent"),ModalController:c(()=>Us,"ModalController"),ModalEnclosureComponent:c(()=>vs,"ModalEnclosureComponent"),ModalFade:c(()=>ho,"ModalFade"),ModalMoveDown:c(()=>dr,"ModalMoveDown"),ModalMoveUp:c(()=>cr,"ModalMoveUp"),Move:c(()=>oe,"Move"),MoveXInFromLeft:c(()=>sr,"MoveXInFromLeft"),MoveXInFromRight:c(()=>rr,"MoveXInFromRight"),MoveYInFromBottom:c(()=>ir,"MoveYInFromBottom"),MoveYInFromTop:c(()=>as,"MoveYInFromTop"),NotificationComponent:c(()=>Ps,"NotificationComponent"),Radius:c(()=>ps,"Radius"),Resize:c(()=>ar,"Resize"),Rotate:c(()=>us,"Rotate"),RotateX:c(()=>cs,"RotateX"),RotateY:c(()=>ds,"RotateY"),RotateZ:c(()=>ls,"RotateZ"),SessionData:c(()=>Js,"SessionData"),SessionUserToken:c(()=>fo,"SessionUserToken"),ShadowedComponent:c(()=>bs,"ShadowedComponent"),SlideItemComponent:c(()=>Is,"SlideItemComponent"),SlideListComponent:c(()=>As,"SlideListComponent"),SliderComponent:c(()=>Ts,"SliderComponent"),SliderController:c(()=>qs,"SliderController"),SplashScreenComponent:c(()=>Fn,"SplashScreenComponent"),SwaggerUIComponent:c(()=>Os,"SwaggerUIComponent"),SwaggerUIController:c(()=>Hs,"SwaggerUIController"),TextField:c(()=>ws,"TextField"),VideoSplashScreenComponent:c(()=>Ms,"VideoSplashScreenComponent"),WipeDown:c(()=>ms,"WipeDown"),WipeLeft:c(()=>hs,"WipeLeft"),WipeRight:c(()=>fs,"WipeRight"),WipeUp:c(()=>gs,"WipeUp"),default:c(()=>xi,"default"),i18n_messages:c(()=>or,"i18n_messages")});Xs.exports=Ei(rs);var po=k(),me=k(),tt,or=(tt=class extends me.InheritClass{constructor({messages:t=[]}){super({messages:t}),me.CONFIG.get("use_i18n",!1)&&(me.CONFIG.set("lang","en"),(0,me.get)("i18n")?(0,me.set)("i18n",{messages:(0,me.get)("i18n").messages.concat(t)}):(0,me.set)("i18n",{messages:t}))}_load_i18n_packages_(){return me.CONFIG.get("i18n_languages",[]).map(t=>{(0,me.Import)(`org.quickcorp.i18n_messages.${t}`)})}},c(tt,"i18n_messages"),_(tt,"i18n_messages"),tt);(0,me.Package)("org.qcobjects.i18n_messages",[or]);new or({})._load_i18n_packages_();var ss=k(),nt,is=(nt=class extends ss.VO{},c(nt,"Contact"),_(nt,"Contact"),nt);(0,ss.Package)("org.qcobjects.models",[is]);var F=k(),Oe=k(),ot,Se=(ot=class extends Oe.Effect{constructor(t){super(t),this.duration=1e3,this.duration=t?.duration}apply(t,e,n){let o=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){Oe.logger.debug("animation progress: "+i.toString());let s=e+i*o/100;Oe.logger.debug("alpha: "+s.toString()),t.style.opacity=s.toString()}})}static apply(t,e,n){let o=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){Oe.logger.debug("animation progress: "+i.toString());let s=e+i*o/100;Oe.logger.debug("alpha: "+s.toString()),t.style.opacity=s.toString()}})}},c(ot,"Fade"),_(ot,"Fade"),ot),rt,oe=(rt=class extends Oe.Effect{constructor(){super(...arguments),this.duration=1e3}static apply(t,e,n,o,i){let s=o-e,a=i-n;t.style.transform="translate("+e+"px,"+n+"px)",super.animate({duration:this.duration,timing(l){return l},draw(l){Oe.logger.debug("animation progress: "+l.toString());let u=n+l*a/100,h=e+l*s/100;Oe.logger.debug("x: "+h.toString()+" y:"+u.toString()),t.style.transform="translate("+h+"px,"+u+"px)"}})}},c(rt,"Move"),_(rt,"Move"),rt);(0,Oe.Package)("org.qcobjects.effects.base",[Se,oe]);var A=k(),st,rr=(st=class extends oe{constructor(){super(...arguments),this.duration=1e3}static apply(t){oe.apply.call(this,t,t.width,0,0,0)}},c(st,"MoveXInFromRight"),_(st,"MoveXInFromRight"),st),it,sr=(it=class extends oe{constructor(){super(...arguments),this.duration=1e3}static apply(t){oe.apply.call(this,t,-t.width,0,0,0)}},c(it,"MoveXInFromLeft"),_(it,"MoveXInFromLeft"),it),at,ir=(at=class extends oe{constructor(){super(...arguments),this.duration=1e3}static apply(t){oe.apply.call(this,t,0,t.height,0,0)}},c(at,"MoveYInFromBottom"),_(at,"MoveYInFromBottom"),at),ct,as=(ct=class extends oe{constructor(){super(...arguments),this.duration=1e3}static apply(t){oe.apply.call(this,t,0,-t.height,0,0)}},c(ct,"MoveYInFromTop"),_(ct,"MoveYInFromTop"),ct),dt,cs=(dt=class extends A.Effect{constructor(){super(...arguments),this.duration=1e3}static apply(t,e,n){let o=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){A.logger.debug("animation progress: "+i.toString());let s=Math.round(e+i*o/100);A.logger.debug("angle: "+s.toString()),t.style.transform="rotate3d(1,0,0,"+s.toString()+"deg)"}})}},c(dt,"RotateX"),_(dt,"RotateX"),dt),lt,ds=(lt=class extends A.Effect{constructor(){super(...arguments),this.duration=1e3}static apply(t,e,n){let o=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){A.logger.debug("animation progress: "+i.toString());let s=Math.round(e+i*o/100);A.logger.debug("angle: "+s.toString()),t.style.transform="rotate3d(0,1,0,"+s.toString()+"deg)"}})}},c(lt,"RotateY"),_(lt,"RotateY"),lt),ut,ls=(ut=class extends A.Effect{constructor(){super(...arguments),this.duration=1e3}apply(t,e,n){let o=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){A.logger.debug("animation progress: "+i.toString());let s=Math.round(e+i*o/100);A.logger.debug("angle: "+s.toString()),t.style.transform="rotate3d(0,0,1,"+s.toString()+"deg)"}})}},c(ut,"RotateZ"),_(ut,"RotateZ"),ut),pt,us=(pt=class extends A.Effect{constructor(){super(...arguments),this.duration=1e3}apply(t,e,n){let o=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){A.logger.debug("animation progress: "+i.toString());let s=Math.round(e+i*o/100);A.logger.debug("angle: "+s.toString()),t.style.transform="rotate3d(1,1,1,"+s.toString()+"deg)"}})}},c(pt,"Rotate"),_(pt,"Rotate"),pt),ht,ps=(ht=class extends A.Effect{constructor(){super(...arguments),this.duration=1e3}apply(t,e,n){let o=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){A.logger.debug("animation progress: "+i.toString());let s=e+i*o/100;A.logger.debug("radius: "+s.toString()),t.style.borderRadius=s.toString()+"px"}})}},c(ht,"Radius"),_(ht,"Radius"),ht),ft,ar=(ft=class extends A.Effect{constructor(){super(...arguments),this.duration=1e3}apply(t,e,n){let o=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){A.logger.debug("animation progress: "+i.toString());let s=e+i*o/100;A.logger.debug("resize: "+s.toString()),t.style.transformOrigin="center",t.style.transform="scale("+s+","+s+")"}})}},c(ft,"Resize"),_(ft,"Resize"),ft),gt,hs=(gt=class extends A.Effect{constructor(){super(...arguments),this.duration=1e3}apply(t,e,n){let o=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){A.logger.debug("animation progress: "+i.toString());let s=e+i*o/100;A.logger.debug("wipe: "+s.toString()),t.style.transformOrigin="right",t.style.transform="scaleX("+s+")"}})}},c(gt,"WipeLeft"),_(gt,"WipeLeft"),gt),mt,fs=(mt=class extends A.Effect{constructor(){super(...arguments),this.duration=1e3}apply(t,e,n){let o=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){A.logger.debug("animation progress: "+i.toString());let s=e+i*o/100;A.logger.debug("wipe: "+s.toString()),t.style.transformOrigin="left",t.style.transform="scaleX("+s+")"}})}},c(mt,"WipeRight"),_(mt,"WipeRight"),mt),bt,gs=(bt=class extends A.Effect{constructor(){super(...arguments),this.duration=1e3}apply(t,e,n){let o=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){A.logger.debug("animation progress: "+i.toString());let s=e+i*o/100;A.logger.debug("wipe: "+s.toString()),t.style.transformOrigin="bottom",t.style.transform="scaleY("+s+")"}})}},c(bt,"WipeUp"),_(bt,"WipeUp"),bt),_t,ms=(_t=class extends A.Effect{constructor(){super(...arguments),this.duration=1e3}apply(t,e,n){let o=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){A.logger.debug("animation progress: "+i.toString());let s=e+i*o/100;A.logger.debug("wipe: "+s.toString()),t.style.transformOrigin="top",t.style.transform="scaleY("+s+")"}})}},c(_t,"WipeDown"),_(_t,"WipeDown"),_t);(0,A.Package)("org.qcobjects.effects.extended",[rr,sr,ir,as,cs,ds,ls,us,ps,ar,hs,fs,gs,ms]);var Ni=k(),yt,ho=(yt=class extends Se{constructor(){super(...arguments),this.duration=500}},c(yt,"ModalFade"),_(yt,"ModalFade"),yt),wt,cr=(wt=class extends oe{constructor(){super(...arguments),this.duration=800}},c(wt,"ModalMoveUp"),_(wt,"ModalMoveUp"),wt),Ct,dr=(Ct=class extends oe{constructor(){super(...arguments),this.duration=300}},c(Ct,"ModalMoveDown"),_(Ct,"ModalMoveDown"),Ct);(0,Ni.Package)("org.qcobjects.modal.effects",[ho,dr,cr]);var ve=k(),vt,en=(vt=class extends ve.Component{constructor(t){t.name=typeof t.name<"u"?t.name:"form-field",super(t),this.cached=!1,this.reload=!0}createBindingEvents(){let t;typeof this.fieldType>"u"||this.fieldType==null?t=this.body.subelements("*[data-field]"):t=this.body.subelements(this.fieldType+"[data-field]");for(let e=0;e<t.length;e++){let n=t[e];n.addEventListener("change",()=>{ve.logger.debug("Executing change event binding"),this.executeBindings()}),n.addEventListener("blur",()=>{ve.logger.debug("Executing change event binding"),this.executeBindings()}),n.addEventListener("focus",()=>{ve.logger.debug("Executing change event binding"),this.executeBindings()}),n.addEventListener("keydown",()=>{ve.logger.debug("Executing keydown event binding"),this.executeBindings()})}}executeBinding(t){let e=t.getAttribute("data-field");ve.logger.debug("Binding "+e+" for "+this.name),this.data[e]=t.value}executeBindings(){let t;typeof this.fieldType>"u"||this.fieldType==null?t=this.body.subelements("*[data-field]"):t=this.body.subelements(this.fieldType+"[data-field]");for(let e=0;e<t.length;e++){let n=t[e],o=n.getAttribute("data-field");ve.logger.debug("Binding "+o+" for "+this.name),this.data[o]=n.value}}done(t){let e=super.done(t);return this.executeBindings(),this.createBindingEvents(),ve.logger.debug("Field loaded: "+this.fieldType+"[name="+this.name+"]"),e}},c(vt,"FormField"),_(vt,"FormField"),vt);(0,ve.Package)("org.qcobjects.base.components",[en]);var Ot,bs=(Ot=class extends F.Component{constructor(t){t.body=(0,F._DOMCreateElement)("div"),super(t),this.container=null,this.shadowed=!0,this.cached=!1,this.controller=null,this.view=null,this.data={}}},c(Ot,"ShadowedComponent"),_(Ot,"ShadowedComponent"),Ot),St,_s=(St=class extends en{constructor(t){t.fieldType="button",super(t)}},c(St,"ButtonField"),_(St,"ButtonField"),St),Et,ys=(Et=class extends en{constructor(t){t.fieldType="input",super(t)}},c(Et,"InputField"),_(Et,"InputField"),Et),Nt,ws=(Nt=class extends en{constructor(t){t.fieldType="textarea",super(t)}},c(Nt,"TextField"),_(Nt,"TextField"),Nt),xt,Cs=(xt=class extends en{constructor(t){t.fieldType="input",super(t)}},c(xt,"EmailField"),_(xt,"EmailField"),xt),At,vs=(At=class extends F.Component{constructor(t){t.body=(0,F._DOMCreateElement)("div"),super(t),this.name="modalenclosure",this.tplsource="inline",this.cached=!1,this.basePath=F.CONFIG.get("modalBasePath",F.CONFIG.get("remoteSDKPath","")),this.template=`
|
|
22
22
|
<!-- The Modal -->
|
|
23
23
|
<style>
|
|
24
24
|
@import url('https://sdk.qcobjects.dev/css/modal.css');
|
|
@@ -32,10 +32,10 @@
|
|
|
32
32
|
</div>
|
|
33
33
|
|
|
34
34
|
</div>
|
|
35
|
-
`,this.data={}}},c(At,"ModalEnclosureComponent"),_(At,"ModalEnclosureComponent"),At),It,
|
|
35
|
+
`,this.data={}}},c(At,"ModalEnclosureComponent"),_(At,"ModalEnclosureComponent"),At),It,lr=(It=class extends F.Component{constructor(t){t.basePath=F.CONFIG.get("modalBasePath",F.CONFIG.get("remoteSDKPath","")),super(t),this.name="modal",this.cached=!1,this.modalEnclosureComponentClass="ModalEnclosureComponent",this.controller=null,this.view=null,this.tplsource="none",this.closeOnClickOutside=!1,this.data={content:"",modalId:0},this.submodal=null,this.data.modalId=this.__instanceID;let e=(0,F.New)((0,F.ClassFactory)(this.modalEnclosureComponentClass),{name:this.name,basePath:this.basePath,data:this.data});this.subcomponents.push(e),this.submodal=e,e.tplsource==="none"?this.body.innerHTML=e.parsedAssignmentText:this.body.append(e.body)}modal(){let t=this.data.modalId;(0,F.Tag)("#modalInstance_"+t+".modal").map(e=>(e.style.display="block",new ho().apply(e,0,1))),(0,F.Tag)("#modalInstance_"+t+".modal .modal-content").map(e=>dr.apply(e,0,-document.body.clientHeight,0,0)),(0,F.Tag)("#modalInstance_"+t+".modal .modal-content .close").map(e=>e.addEventListener("click",()=>{this.close()},!1)),this.closeOnClickOutside&&window.addEventListener("click",()=>{this.close()},!1)}close(){let t=this.data.modalId;(0,F.Tag)("#modalInstance_"+t+".modal").map(e=>(e.style.display="block",new ho({duration:3e3}).apply(e,1,0))),(0,F.Tag)("#modalInstance_"+t+".modal .modal-content").map(function(e){return cr.apply(e,0,0,0,-document.body.clientHeight)}),setTimeout(function(){(0,F.Tag)("#modalInstance_"+t+".modal").map(e=>(e.style.display="none",!0))},900)}rebuild(){let t=super.rebuild();return this.templateURI=(0,F.ComponentURI)({COMPONENTS_BASE_PATH:F.CONFIG.get("componentsBasePath",""),COMPONENT_NAME:"modal",TPLEXTENSION:F.CONFIG.get("tplextension",""),TPL_SOURCE:"default"}),t}},c(It,"ModalComponent"),_(It,"ModalComponent"),It),Tt,Os=(Tt=class extends F.Component{constructor(){super(...arguments),this.cached=!1,this.basePath=F.CONFIG.get("remoteSDKPath",""),this.tplextension="tpl.html",this.name="swagger-ui"}},c(Tt,"SwaggerUIComponent"),_(Tt,"SwaggerUIComponent"),Tt);(0,F.Package)("org.qcobjects.form.components",[bs,_s,ys,ws,Cs,vs,lr,Os]);var ur=k(),Pt,Ss=(Pt=class extends ur.Component{constructor(){super(...arguments),this.name="grid-item",this.shadowed=!0,this.tplsource="inline",this.template=`
|
|
36
36
|
<img src="{{image}}" />
|
|
37
37
|
<p>{{description}}</p>
|
|
38
|
-
`,this.cached=!1}},c(Pt,"GridItemComponent"),_(Pt,"GridItemComponent"),Pt),Mt,
|
|
38
|
+
`,this.cached=!1}},c(Pt,"GridItemComponent"),_(Pt,"GridItemComponent"),Pt),Mt,Es=(Mt=class extends ur.Component{constructor(t){super(t),this.name="grid",this.cached=!1,this.view=null,this.shadowed=!0,this.rows=3,this.cols=3,this.templateURI="",this.data={},this.tplsource="inline",this.template="<p>Loading...</p>",this.body.setAttribute("controllerClass","DataGridController");let e=this.body.getAttribute("subcomponentClass")!==null?this.body.getAttribute("subcomponentClass"):"GridItemComponent";this.body.setAttribute("subcomponentClass",e)}},c(Mt,"GridComponent"),_(Mt,"GridComponent"),Mt);(0,ur.Package)("org.qcobjects.components.grid",[Es,Ss]);var pr=k(),Rt,Ns=(Rt=class extends pr.Component{constructor(t){t.name="list-item",super(t),this.shadowed=!1,this.tplsource="inline",this.template='<a href="{{value}}">{{label}}</a>',this.cached=!1}},c(Rt,"ListItemComponent"),_(Rt,"ListItemComponent"),Rt),kt,xs=(kt=class extends pr.Component{constructor(t){t.name="list",super(t),this.shadowed=!0,this.tplsource="inline",this.template="<p>Loading...</p>",this.body.setAttribute("controllerClass","ListController"),this.body.setAttribute("subcomponentClass","ListItemComponent")}},c(kt,"ListComponent"),_(kt,"ListComponent"),kt);(0,pr.Package)("org.qcobjects.components.list",[Ns,xs]);var mo=k(),Lt,As=(Lt=class extends mo.Component{constructor(t){super(t),this.tplsource="inline",this.template="<p>Loading...</p>",this.name="slidelist",this.body.setAttribute("controllerClass","DataGridController");let e=this.body.getAttribute("subcomponentClass")!==null?this.body.getAttribute("subcomponentClass"):"GridItemComponent";this.body.setAttribute("subcomponentClass",e)}},c(Lt,"SlideListComponent"),_(Lt,"SlideListComponent"),Lt),Dt,Is=(Dt=class extends mo.Component{constructor(t){super(t),this.effectClass="Fade",this.name="slider_item",this.data.slideNumber=this.data.__dataIndex+1,this.template=`
|
|
39
39
|
<div class="qcoSlides" style="display:none">
|
|
40
40
|
<div class="qco-slider__numbertext">{{slideNumber}} / {{__dataLength}}</div>
|
|
41
41
|
<img src="{{image}}" alt="{{title}}"/>
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
<p>{{label}} <a href="{{link}}">{{category}}</a></p>
|
|
44
44
|
</div>
|
|
45
45
|
</div>
|
|
46
|
-
`,this.tplsource="inline"}},c(Dt,"SlideItemComponent"),_(Dt,"SlideItemComponent"),Dt),jt,
|
|
46
|
+
`,this.tplsource="inline"}},c(Dt,"SlideItemComponent"),_(Dt,"SlideItemComponent"),Dt),jt,Ts=(jt=class extends mo.Component{constructor(t){super(t),this.name="slider",this.template=`
|
|
47
47
|
<style>
|
|
48
48
|
/* Slideshow container */
|
|
49
49
|
|
|
@@ -163,7 +163,7 @@
|
|
|
163
163
|
<div class="qcoSlider__dots" style="text-align:center">
|
|
164
164
|
</div>
|
|
165
165
|
|
|
166
|
-
`,this.tplsource="inline",this.shadowed=!0,this.data.SERVICE_CLASS=this.body.getAttribute("serviceClass"),this.body.setAttribute("controllerClass","SliderController")}},c(jt,"SliderComponent"),_(jt,"SliderComponent"),jt);(0,
|
|
166
|
+
`,this.tplsource="inline",this.shadowed=!0,this.data.SERVICE_CLASS=this.body.getAttribute("serviceClass"),this.body.setAttribute("controllerClass","SliderController")}},c(jt,"SliderComponent"),_(jt,"SliderComponent"),jt);(0,mo.Package)("org.qcobjects.components.slider",[As,Is,Ts]);var V=k(),ae,Ps=(ae=class extends V.Component{constructor(t){t.name="notification",t.body=(0,V._DOMCreateElement)("div"),super(t),this.cached=!1,this.tplsource="inline",this.shadowed=!1,this.template=`
|
|
167
167
|
<style>
|
|
168
168
|
div.notification_background {
|
|
169
169
|
display: block; /* Hidden by default */
|
|
@@ -208,7 +208,7 @@
|
|
|
208
208
|
<p><strong>{{title}}</strong> {{message}}</p>
|
|
209
209
|
</div>
|
|
210
210
|
</div>
|
|
211
|
-
`,this.kinds=["danger","success","info","warning"]}display(t){let e=_(function(n){n.style.display="block";let o=(0,V.New)(oe,{duration:900,apply(s){(0,V._super_)("Fade","apply").call(this,s,0,1),(0,V._super_)("Move","apply").call(this,s,0,-document.body.clientHeight,0,0)}}),i=(0,V.New)(oe,{duration:650,apply(s){(0,V._super_)("Fade","apply").call(this,s,1,0),(0,V._super_)("Move","apply").call(this,s,0,0,0,-document.body.clientHeight)}});o.apply(n),setTimeout(function(){i.apply(n)},2e3)},"_display_");t.subelements("div.notification_background").map(n=>new Se({duration:500}).apply(n,0,1)),t.subelements("div.notification").map(n=>e(n)),setTimeout(function(){t.remove()},2200)}static success(t){let e=(0,V.New)(ae,{name:"notification",shadowed:!0,body:(0,V._DOMCreateElement)("div"),data:{kind:"success",title:"Success!",message:`${t}...`}});document.body.append(e);let n=e.shadowed?e.shadowRoot.host:e.body;e.display(n)}static danger(t){let e=(0,V.New)(ae,{name:"notification",shadowed:!0,body:(0,V._DOMCreateElement)("div"),data:{kind:"danger",title:"Danger!",message:`${t}...`}});document.body.append(e);let n=e.shadowed?e.shadowRoot.host:e.body;e.display(n)}static info(t){let e=(0,V.New)(ae,{name:"notification",shadowed:!0,body:(0,V._DOMCreateElement)("div"),data:{kind:"info",title:"Info!",message:`${t}...`}});document.body.append(e);let n=e.shadowed?e.shadowRoot.host:e.body;e.display(n)}static warning(t){let e=(0,V.New)(ae,{name:"notification",shadowed:!0,body:(0,V._DOMCreateElement)("div"),data:{kind:"warning",title:"Warning!",message:`${t}...`}});document.body.append(e);let n=e.shadowed?e.shadowRoot.host:e.body;e.display(n)}},c(ae,"_NotificationComponent"),_(ae,"NotificationComponent"),ae);(0,V.Package)("org.quickcorp.components.notifications",[
|
|
211
|
+
`,this.kinds=["danger","success","info","warning"]}display(t){let e=_(function(n){n.style.display="block";let o=(0,V.New)(oe,{duration:900,apply(s){(0,V._super_)("Fade","apply").call(this,s,0,1),(0,V._super_)("Move","apply").call(this,s,0,-document.body.clientHeight,0,0)}}),i=(0,V.New)(oe,{duration:650,apply(s){(0,V._super_)("Fade","apply").call(this,s,1,0),(0,V._super_)("Move","apply").call(this,s,0,0,0,-document.body.clientHeight)}});o.apply(n),setTimeout(function(){i.apply(n)},2e3)},"_display_");t.subelements("div.notification_background").map(n=>new Se({duration:500}).apply(n,0,1)),t.subelements("div.notification").map(n=>e(n)),setTimeout(function(){t.remove()},2200)}static success(t){let e=(0,V.New)(ae,{name:"notification",shadowed:!0,body:(0,V._DOMCreateElement)("div"),data:{kind:"success",title:"Success!",message:`${t}...`}});document.body.append(e);let n=e.shadowed?e.shadowRoot.host:e.body;e.display(n)}static danger(t){let e=(0,V.New)(ae,{name:"notification",shadowed:!0,body:(0,V._DOMCreateElement)("div"),data:{kind:"danger",title:"Danger!",message:`${t}...`}});document.body.append(e);let n=e.shadowed?e.shadowRoot.host:e.body;e.display(n)}static info(t){let e=(0,V.New)(ae,{name:"notification",shadowed:!0,body:(0,V._DOMCreateElement)("div"),data:{kind:"info",title:"Info!",message:`${t}...`}});document.body.append(e);let n=e.shadowed?e.shadowRoot.host:e.body;e.display(n)}static warning(t){let e=(0,V.New)(ae,{name:"notification",shadowed:!0,body:(0,V._DOMCreateElement)("div"),data:{kind:"warning",title:"Warning!",message:`${t}...`}});document.body.append(e);let n=e.shadowed?e.shadowRoot.host:e.body;e.display(n)}},c(ae,"_NotificationComponent"),_(ae,"NotificationComponent"),ae);(0,V.Package)("org.quickcorp.components.notifications",[Ps]);var ne=k(),$t,Fn=($t=class extends ne.Component{constructor(t){t.name=typeof t.name>"u"?"splashscreen":t.name;let e=typeof window<"u"&&typeof window.self<"u"&&window===window.self,n=location.hash===""&&location.pathname==="/"&&location.search===""||ne.CONFIG.get("routingWay","pathname")==="hash"&&ne.CONFIG.get("start_url","/")===location.hash||ne.CONFIG.get("routingWay","pathname")==="pathname"&&ne.CONFIG.get("start_url","/")===location.pathname||ne.CONFIG.get("routingWay","pathname")==="search"&&ne.CONFIG.get("start_url","/")===location.search,o=e&&n;if(o?(t.basePath=ne.CONFIG.get("splashscreenBasePath",ne.CONFIG.get("remoteSDKPath","")),typeof t.data>"u"&&(t.data={}),t.data.basePath=t.basePath):typeof t<"u"&&typeof t.body<"u"&&(t.body.style.display="none"),super(t),this.cached=!1,this.shadowed=!0,this._bgcolor="",this._enabled_=o,this._enabled_){let s=this.body?.getAttribute("duration"),a=s==null?1e3:parseInt(s.toString());this._bgcolor=this.body?.style?.backgroundColor??"";let l=_(()=>{setTimeout(()=>{if(!l.executed){let u=this.shadowed?this.shadowRoot?.host:this.body;typeof ne.componentsStack<"u"&&ne.componentsStack.filter(h=>h.body.hasAttribute("splashscreen")).map(h=>{ne.logger.debug(`Splash Screen of Main Component: ${h.name}`),h.splashScreenComponent=this;let f=_(()=>{if(!f.executed){let g=h.splashScreenComponent,m=h.shadowed?h.shadowRoot?.host:h.body;h._mainPosition=m.style.position,typeof m<"u"&&(m.style.position="fixed"),h._mainOpacity=m.style.opacity,u.style.width="100%",u.style.height="100%",document.body.style.backgroundColor="#111111",m.style.opacity="0",setTimeout(function(){typeof u<"u"&&(document.body.style.backgroundColor=g?._bgcolor,u.subelements("#slot-logo").map(C=>(C.style.display="block",C.style.transformOrigin="center",new ar().apply(C,1,0))),new Se().apply(u,1,0))},a-1e3),setTimeout(function(){new Se().apply(m,0,1),m.style.position=h._mainPosition,document.body.style.backgroundColor=g._bgcolor,u.parentElement!==null&&u.parentElement.remove()},a)}f.executed=!0},"SplashScreenHandler");return h.addComponentHelper(f.bind(h))}),l.executed=!0}})},"_helper_");l.executed=!1,this.addComponentHelper(l.bind(t))}}},c($t,"SplashScreenComponent"),_($t,"SplashScreenComponent"),$t);(0,ne.Package)("org.qcobjects.components.base",[Fn]);var qt,Ms=(qt=class extends Fn{constructor(t){t.name="videosplashscreen",super(t),this.cached=!1,this.shadowed=!0,this.tplsource="inline",this.template=`
|
|
212
212
|
<style>
|
|
213
213
|
:host * {
|
|
214
214
|
box-sizing: border-box;
|
|
@@ -371,7 +371,7 @@
|
|
|
371
371
|
</div>
|
|
372
372
|
</div>
|
|
373
373
|
|
|
374
|
-
`}},c(qt,"VideoSplashScreenComponent"),_(qt,"VideoSplashScreenComponent"),qt),Ft,
|
|
374
|
+
`}},c(qt,"VideoSplashScreenComponent"),_(qt,"VideoSplashScreenComponent"),qt),Ft,Rs=(Ft=class extends Fn{constructor(t){t.name="cubesplashscreen",super(t),this.cached=!1,this.shadowed=!0,this.tplsource="inline",this.template=`
|
|
375
375
|
<style>
|
|
376
376
|
@keyframes spin {
|
|
377
377
|
0% {
|
|
@@ -683,10 +683,10 @@
|
|
|
683
683
|
</div>
|
|
684
684
|
</div>
|
|
685
685
|
|
|
686
|
-
`}},c(Ft,"CubeSplashScreenComponent"),_(Ft,"CubeSplashScreenComponent"),Ft);(0,ne.Package)("org.qcobjects.components.splashscreen",[
|
|
687
|
-
display: grid; grid-template-rows: ${o}; grid-template-columns: ${i}; margin:0 auto; }`,e.append(n),e.classList.add(s)}}done(){this.cssGrid();let t=this.component;N.logger.debug("ListController DONE");let e=this.component.body.getAttribute("serviceClass");if(e!=null){let n,o,i=t.body.getAttribute("paginate-in");if(i=i!==null?i:"client",i==="server"){let s=t.body.getAttribute("page-number");s=isNaN(s)||s===null?-1:s;let a;if(s!==-1){let l=this.component.body.getAttribute("server-data-count")!==null?this.component.body.getAttribute("server-data-count"):1;a=this.component.body.getAttribute("total-pages"),a=isNaN(a)?1:a,n=this.getPageIndex(s,a,l)[0],o=this.getPageIndex(s,a,l)[1],t.serviceData=typeof t.serviceData<"u"?t.serviceData:{},t.serviceData.params=typeof t.serviceData.params<"u"?t.serviceData.params:{},t.serviceData.params.offset=n,t.serviceData.params.limit=o}}(0,N.serviceLoader)((0,N.New)((0,N.ClassFactory)(e),{data:t.serviceData}),!1).then(s=>{N.logger.debug("DONE SERVICE COMPONENT"),s.service.JSONresponse=JSON.parse(s.service.template),typeof s.service.JSONresponse.result<"u"?(N.logger.debug((0,N._DataStringify)(s.service.JSONresponse.result)),t.data=s.service.JSONresponse.result):t.data=s.service.JSONresponse,this.addSubcomponents()},s=>{N.logger.debug(s)}).catch(s=>{N.logger.debug("Something went wrong when calling the service from: "+e),N.logger.debug(s.message)})}}},c(Ht,"ListController"),_(Ht,"ListController"),Ht);(0,N.Package)("org.qcobjects.controllers.list",[
|
|
688
|
-
display: grid; grid-template-rows: ${o}; grid-template-columns: ${i}; margin:0 auto; }`,e?.append(n),t.shadowed?e?.host.classList.add(s):e.classList.add(s)}}done(){this.cssGrid(),E.logger.debug("GridComponent built")}},c(Bt,"GridController"),_(Bt,"GridController"),Bt),Ut
|
|
689
|
-
display: grid; grid-template-rows: ${o}; grid-template-columns: ${i}; margin:0 auto; }`,t.shadowed?(t.body.append(n),e.host.classList.add(s)):(e?.append(n),e.classList.add(s))}}done(){let t=this.component;E.logger.debug("DataGridController DONE");let e=this.component.body.getAttribute("serviceClass");if(e!=null){let n,o,i=t.body.getAttribute("paginate-in");if(i=i!==null?i:"client",i==="server"){let s=t.body.getAttribute("page-number");s=isNaN(s)||s===null?-1:s;let a;if(s!==-1){let l=this.component.body.getAttribute("server-data-count")!==null?this.component.body.getAttribute("server-data-count"):1;a=this.component.body.getAttribute("total-pages"),a=isNaN(a)?1:a,n=this.getPageIndex(s,a,l)[0],o=this.getPageIndex(s,a,l)[1],t.serviceData=typeof t.serviceData<"u"?t.serviceData:{},t.serviceData.params=typeof t.serviceData.params<"u"?t.serviceData.params:{},t.serviceData.params.offset=n,t.serviceData.params.limit=o}}(0,E.serviceLoader)((0,E.New)((0,E.ClassFactory)(e),{data:t.serviceData}),!1).then(s=>{E.logger.debug("DONE SERVICE COMPONENT"),s.service.JSONresponse=JSON.parse(s.service.template),typeof s.service.JSONresponse.result<"u"?(E.logger.debug((0,E._DataStringify)(s.service.JSONresponse.result)),t.data=s.service.JSONresponse.result):t.data=s.service.JSONresponse,this.addSubcomponents()},s=>{E.logger.debug(s)}).catch(s=>{E.logger.debug("Something went wrong when calling the service from: "+e),E.logger.debug(s.message)})}}},c(Ut,"DataGridController"),_(Ut,"DataGridController"),Ut);(0,E.Package)("org.qcobjects.controllers.grid",[
|
|
686
|
+
`}},c(Ft,"CubeSplashScreenComponent"),_(Ft,"CubeSplashScreenComponent"),Ft);(0,ne.Package)("org.qcobjects.components.splashscreen",[Fn,Ms,Rs]);var ks=k(),Gt,Ls=(Gt=class extends ks.Controller{},c(Gt,"GenericController"),_(Gt,"GenericController"),Gt);(0,ks.Package)("org.qcobjects.controllers",[Ls]);var N=k(),Ht,Ds=(Ht=class extends N.Controller{constructor({component:t,dependencies:e=[],valueField:n=void 0,labelField:o=void 0}){super({component:t,dependencies:e,valueField:n,labelField:o}),this.component=t,this._componentRoot=this.component.shadowed?this.component.shadowRoot:this.component.body,this.labelField=this.component.body.getAttribute("label-field"),this.valueField=this.component.body.getAttribute("value-field"),this.rows=this.component.body.getAttribute("rows"),this.rows=this.rows!==null?this.rows:this.component.rows,this.cols=1,N.logger.debug("ListController INIT")}getPageIndex(t,e,n){return t=t>0?t-1:0,[n*t/e,n*t/e+n/e]}addSubcomponents(){this.component.subcomponents=[];let t=this.component.body.getAttribute("layout"),e=N.CONFIG.get("listBasePath",N.CONFIG.get("remoteSDKPath","")),n="";this.labelField=this.component.body.getAttribute("label-field"),this.valueField=this.component.body.getAttribute("value-field"),t==="horizontal"?n=`@import url("${e}css/components/horizontal-list.css");`:n=`@import url("${e}css/components/list.css");`,typeof this._componentRoot<"u"&&(this._componentRoot.innerHTML=`<style>${n}</style><ul></ul>`),N.logger.debug((0,N._DataStringify)(this.component.data));try{let o=this.component.body.getAttribute("subcomponentClass");if(o!=null){let i,s,a,l=[...this.component.data],u=this.component.body.getAttribute("paginate-in");u=u!==null?u:"client";let h;u==="client"?(h=this.component.body.getAttribute("page-number"),h=isNaN(h)||h===null?-1:h,h!==-1?(a=this.component.body.getAttribute("total-pages"),a=isNaN(a)?1:a,i=this.getPageIndex(h,a,l.length)[0],s=this.getPageIndex(h,a,l.length)[1]):(i=0,s=l.length,a=1),l=l.slice(i,s)):(i=0,s=l.length,a=1),l.map((f,g)=>{try{let C=(0,N._DOMCreateElement)("li");f.label=f[this.labelField],f.value=f[this.valueField];let b=(0,N.New)((0,N.ClassFactory)(o),{name:"list-item",data:{label:f[this.labelField],value:f[this.valueField],__dataIndex:g,__page:h,__totalPages:a,__limit:s,__offset:i},templateURI:(0,N.ComponentURI)({COMPONENTS_BASE_PATH:N.CONFIG.get("componentsBasePath",""),COMPONENT_NAME:(0,N.ClassFactory)(o).name,TPLEXTENSION:N.CONFIG.get("tplextension",""),TPL_SOURCE:(0,N.ClassFactory)(o).tplsource}),body:C,template:(0,N.ClassFactory)(o).template});b.done=this.component.done.bind(b);try{if(b){b.data.__dataIndex=g,Object.hasOwnProperty.call(this.component.data,"length")&&(b.data.__dataLength=this.component.data.length),N.logger.debug("adding subcomponent to body"),this._componentRoot.subelements("ul").map(O=>O.append(b));try{this.component.subcomponents.push(b)}catch(O){N.logger.debug(`ERROR LOADING SUBCOMPONENT IN DATAGRID: ${O}`)}}else N.logger.debug("ERROR LOADING SUBCOMPONENT IN DATAGRID")}catch(O){N.logger.debug(`ERROR LOADING SUBCOMPONENT IN DATAGRID: ${O}`)}}catch(C){N.logger.debug(`ERROR LOADING SUBCOMPONENT IN DATAGRID: ${C}`)}})}else N.logger.debug("NO SUBCOMPONENT CLASS IN COMPONENT")}catch(o){N.logger.debug(`No data for component: ${o}`)}}cssGrid(){let t=this.component,e=t.shadowed?t.shadowRoot:t.body;if(typeof this.rows<"u"&&typeof this.cols<"u"){let n=(0,N._DOMCreateElement)("style"),o="auto ".repeat(this.rows),i="auto ".repeat(this.cols),s="grid"+this.__instanceID.toString();n.innerHTML=`.${s}{
|
|
687
|
+
display: grid; grid-template-rows: ${o}; grid-template-columns: ${i}; margin:0 auto; }`,e.append(n),e.classList.add(s)}}done(){this.cssGrid();let t=this.component;N.logger.debug("ListController DONE");let e=this.component.body.getAttribute("serviceClass");if(e!=null){let n,o,i=t.body.getAttribute("paginate-in");if(i=i!==null?i:"client",i==="server"){let s=t.body.getAttribute("page-number");s=isNaN(s)||s===null?-1:s;let a;if(s!==-1){let l=this.component.body.getAttribute("server-data-count")!==null?this.component.body.getAttribute("server-data-count"):1;a=this.component.body.getAttribute("total-pages"),a=isNaN(a)?1:a,n=this.getPageIndex(s,a,l)[0],o=this.getPageIndex(s,a,l)[1],t.serviceData=typeof t.serviceData<"u"?t.serviceData:{},t.serviceData.params=typeof t.serviceData.params<"u"?t.serviceData.params:{},t.serviceData.params.offset=n,t.serviceData.params.limit=o}}(0,N.serviceLoader)((0,N.New)((0,N.ClassFactory)(e),{data:t.serviceData}),!1).then(s=>{N.logger.debug("DONE SERVICE COMPONENT"),s.service.JSONresponse=JSON.parse(s.service.template),typeof s.service.JSONresponse.result<"u"?(N.logger.debug((0,N._DataStringify)(s.service.JSONresponse.result)),t.data=s.service.JSONresponse.result):t.data=s.service.JSONresponse,this.addSubcomponents()},s=>{N.logger.debug(s)}).catch(s=>{N.logger.debug("Something went wrong when calling the service from: "+e),N.logger.debug(s.message)})}}},c(Ht,"ListController"),_(Ht,"ListController"),Ht);(0,N.Package)("org.qcobjects.controllers.list",[Ds]);var E=k(),Bt,js=(Bt=class extends E.Controller{constructor(t){super(t),this.rows=this.component.body.getAttribute("rows"),this.rows=this.rows!==null?this.rows:this.component.rows,this.cols=this.component.body.getAttribute("cols"),this.cols=this.cols!==null?this.cols:this.component.cols}cssGrid(){let t=this.component,e=t.shadowed?t.shadowRoot:t.body;if(typeof this.rows<"u"&&typeof this.cols<"u"){let n=(0,E._DOMCreateElement)("style"),o="auto ".repeat(this.rows),i="auto ".repeat(this.cols),s="grid"+this.__instanceID.toString();n.innerHTML=`.${s}{
|
|
688
|
+
display: grid; grid-template-rows: ${o}; grid-template-columns: ${i}; margin:0 auto; }`,e?.append(n),t.shadowed?e?.host.classList.add(s):e.classList.add(s)}}done(){this.cssGrid(),E.logger.debug("GridComponent built")}},c(Bt,"GridController"),_(Bt,"GridController"),Bt),Ut,$s=(Ut=class extends E.Controller{constructor(t){super(t),this._componentRoot=t.component.shadowed?t.component.shadowRoot:t.component.body,this.rows=t.component.body.getAttribute("rows"),this.rows=t.rows!==null?t.rows:t.component.rows,this.cols=t.component.body.getAttribute("cols"),this.cols=t.cols!==null?t.cols:t.component.cols,E.logger.debug("DataGridController INIT")}getPageIndex(t,e,n){return t=t>0?t-1:0,[n*t/e,n*t/e+n/e]}addSubcomponents(){this.component.subcomponents=[],typeof this._componentRoot<"u"&&(this._componentRoot.innerHTML=""),this.cssGrid(),E.logger.debug((0,E._DataStringify)(this.component.data));try{let t=this.component.body.getAttribute("subcomponentClass");if(t!=null){let e,n,o,i=[...this.component.data],s=this.component.body.getAttribute("paginate-in"),a;s=s!==null?s:"client",s==="client"?(a=this.component.body.getAttribute("page-number"),a=isNaN(a)||a===null?-1:a,a!==-1?(o=this.component.body.getAttribute("total-pages"),o=isNaN(o)?1:o,e=this.getPageIndex(a,o,i.length)[0],n=this.getPageIndex(a,o,i.length)[1]):(e=0,n=i.length,o=1),i=i.slice(e,n)):(e=0,n=i.length,o=1),i.map((l,u,h)=>{try{let g=(0,E._DOMCreateElement)("component");g.setAttribute("name",(0,E.ClassFactory)(t).name),g.setAttribute("shadowed",(0,E.ClassFactory)(t).shadowed),g.setAttribute("cached",(0,E.ClassFactory)(t).cached),l=Object.assign(l,{__dataIndex:u,__dataLength:h.length,__page:a,__totalPages:o,__limit:n,__offset:e});let m=(0,E.New)((0,E.ClassFactory)(t),{name:"item",data:l,templateURI:(0,E.ComponentURI)({COMPONENTS_BASE_PATH:E.CONFIG.get("componentsBasePath",""),COMPONENT_NAME:(0,E.ClassFactory)(t).name,TPLEXTENSION:E.CONFIG.get("tplextension",""),TPL_SOURCE:(0,E.ClassFactory)(t).tplsource}),body:g,template:(0,E.ClassFactory)(t).template});m.done=this.component.done.bind(m);try{if(m){m.data.__dataIndex=u,Object.hasOwnProperty.call(this.component.data,"length")&&(m.data.__dataLength=this.component.data.length),E.logger.debug("adding subcomponent to body"),this._componentRoot?.append(m.body);try{this.component.subcomponents.push(m)}catch(C){E.logger.debug(`ERROR LOADING SUBCOMPONENT IN DATAGRID: ${C}`)}}else E.logger.debug("ERROR LOADING SUBCOMPONENT IN DATAGRID")}catch(C){E.logger.debug(`ERROR LOADING SUBCOMPONENT IN DATAGRID: ${C}`)}}catch(g){E.logger.debug(`ERROR LOADING SUBCOMPONENT IN DATAGRID: ${g}`)}})}else E.logger.debug("NO SUBCOMPONENT CLASS IN COMPONENT")}catch(t){E.logger.debug(`No data for component: ${t}`)}}cssGrid(){let t=this.component,e=t.shadowed?t.shadowRoot:t.body;if(typeof this.rows<"u"&&typeof this.cols<"u"){let n=(0,E._DOMCreateElement)("style"),o="auto ".repeat(this.rows),i="auto ".repeat(this.cols),s="grid"+this.__instanceID.toString();n.innerHTML=`.${s}{
|
|
689
|
+
display: grid; grid-template-rows: ${o}; grid-template-columns: ${i}; margin:0 auto; }`,t.shadowed?(t.body.append(n),e.host.classList.add(s)):(e?.append(n),e.classList.add(s))}}done(){let t=this.component;E.logger.debug("DataGridController DONE");let e=this.component.body.getAttribute("serviceClass");if(e!=null){let n,o,i=t.body.getAttribute("paginate-in");if(i=i!==null?i:"client",i==="server"){let s=t.body.getAttribute("page-number");s=isNaN(s)||s===null?-1:s;let a;if(s!==-1){let l=this.component.body.getAttribute("server-data-count")!==null?this.component.body.getAttribute("server-data-count"):1;a=this.component.body.getAttribute("total-pages"),a=isNaN(a)?1:a,n=this.getPageIndex(s,a,l)[0],o=this.getPageIndex(s,a,l)[1],t.serviceData=typeof t.serviceData<"u"?t.serviceData:{},t.serviceData.params=typeof t.serviceData.params<"u"?t.serviceData.params:{},t.serviceData.params.offset=n,t.serviceData.params.limit=o}}(0,E.serviceLoader)((0,E.New)((0,E.ClassFactory)(e),{data:t.serviceData}),!1).then(s=>{E.logger.debug("DONE SERVICE COMPONENT"),s.service.JSONresponse=JSON.parse(s.service.template),typeof s.service.JSONresponse.result<"u"?(E.logger.debug((0,E._DataStringify)(s.service.JSONresponse.result)),t.data=s.service.JSONresponse.result):t.data=s.service.JSONresponse,this.addSubcomponents()},s=>{E.logger.debug(s)}).catch(s=>{E.logger.debug("Something went wrong when calling the service from: "+e),E.logger.debug(s.message)})}}},c(Ut,"DataGridController"),_(Ut,"DataGridController"),Ut);(0,E.Package)("org.qcobjects.controllers.grid",[js,$s]);var ke=k(),Wt,qs=(Wt=class extends ke.Controller{constructor({component:t,dependencies:e=[],duration:n=7100,slideIndex:o=0,interval:i=null,sliderHandlerName:s=null}){super({component:t,dependencies:e,duration:n,slideIndex:o,interval:i,sliderHandlerName:s}),this.slideIndex=0,this.duration=7100,this.interval=null,this.sliderHandlerName="",this.component=t,this._componentRoot=t.shadowed?t.shadowRoot:t.body,this.sliderHandlerName="slider_"+this.component.__instanceID.toString()}stop(){this.interval!=null&&clearInterval(this.interval)}plusSlidesAndStop(t){this.stop(),this.plusSlides(t)}plusSlides(t){this.showSlides(this.slideIndex+=t)}currentSlide(t){this.stop(),this.showSlides(this.slideIndex=t)}automate(){this.interval=setInterval(()=>{this.plusSlides(1)},this.duration)}showSlides(t){let e=this._componentRoot?.subelements(".qcoSlides"),n=this._componentRoot?.subelements(".qcoSlider__dots--dot");t>e.length-1&&(this.slideIndex=0),t<0&&(this.slideIndex=0),e.filter((o,i)=>i!==this.slideIndex).map(o=>(0,ke.New)((0,ke.ClassFactory)("Fade"),{}).apply(o,1,0)),n.filter((o,i)=>i!==this.slideIndex).map(o=>o.classList.remove("active"));try{n[this.slideIndex].classList.add("active")}catch(o){ke.logger.debug(`Something went wrong when trying to activate a slide: ${this.slideIndex} - ${o.message}`)}setTimeout(()=>{e.filter((o,i)=>i!==this.slideIndex).map(o=>(o.style.display="none",o.style.display));try{e[this.slideIndex].style.display="block",(0,ke.New)((0,ke.ClassFactory)("Fade"),{}).apply(e[this.slideIndex],0,1)}catch(o){ke.logger.debug(`Something went wrong when trying to show a slide: ${this.slideIndex} - ${o.message}`)}},700)}fillDots(){(this._componentRoot?.subelements(".qcoSlides")).map((e,n)=>{let o=document.createElement("span");return o.className="qcoSlider__dots--dot",o.addEventListener("click",()=>this.currentSlide(n)),this._componentRoot?.subelements(".qcoSlider__dots")[0].append(o)})}bindControls(){let t=this._componentRoot?.subelements(".prev"),e=this._componentRoot?.subelements(".next");t?.map(n=>n.addEventListener("click",()=>this.plusSlidesAndStop(-1))),e?.map(n=>n.addEventListener("click",()=>this.plusSlidesAndStop(1)))}done(){(this._componentRoot?.subelements(".qcoSlides")).filter((e,n)=>n!==this.slideIndex).map(e=>(e.style.display="none",e.style.display)),setTimeout(()=>{this.fillDots(),this.bindControls(),this.slideIndex=0,this.showSlides(this.slideIndex),this.automate()},3e3)}},c(Wt,"SliderController"),_(Wt,"SliderController"),Wt);(0,ke.Package)("org.qcobjects.controllers.slider",[qs]);var z=k(),Vt,Fs=(Vt=class extends z.Controller{getDefault(){return function(t,e,n){let o={name:"^[a-zA-Z]+(([',. -][a-zA-Z ])?[a-zA-Z]*)*$",email:"^([A-Za-z0-9]+)@([A-Za-z0-9]+).([A-Za-z0-9]+)$"},i=n.getAttribute("pattern")||o[t];return new RegExp(i).test(e)}}},c(Vt,"FormValidations"),_(Vt,"FormValidations"),Vt),zt,Gs=(zt=class extends z.Controller{constructor(t){super(t),this.validations=[],this.serviceClass="",this.formSettings={backRouting:"#",loadingRouting:"#loading",nextRouting:"#signupsuccessful"},this.component=t.component,this.component=this.component.Cast(en)}hasValidation(t){let e=t.getAttribute("data-field"),n=!1;return typeof this.validations<"u"&&Object.hasOwnProperty.call(this.validations,e)&&(n=!0),n}isInvalid(t){let e=!1,n=t.getAttribute("data-field"),o=this.component.data[n],i=_((s,a,l)=>typeof this.validations<"u"&&Object.hasOwnProperty.call(this.validations,s)&&this.validations[s].call(null,s,a,l),"_execValidation");return typeof this.validations<"u"&&!i(n,o,t)&&(e=!0),e}isValid(t){return!this.isInvalid(t)}save(){this.serviceClass!==""?(location.href=this.formSettings.loadingRouting,(0,z.serviceLoader)((0,z.New)((0,z.ClassFactory)(this.serviceClass),{data:this.component.data}),!1).then(()=>{z.logger.info("DONE SERVICE COMPONENT"),location.href=this.formSettings.nextRouting},t=>{z.logger.debug(t),location.href=this.formSettings.backRouting})):z.logger.debug("No service name declared on serviceClass property")}formSaveTouchHandler(){z.logger.debug("Saving data...");let t=this.component.shadowed?(this.component?.shadowRoot).host:this.component.body;if(this.component.executeBindings(),this.formValidatorModal!=null){let n=t.subelements("*[data-field]").filter(a=>this.hasValidation(a)),o=_(function(a,l){return _((h,f)=>f.getAttribute("aria-labelledby")!==null?(f.getAttribute("aria-labelledby")||"").split(" ").map(g=>h.subelements(`#${g}`).map(m=>m.innerHTML)).join(" "):null,"_arialabelledby")(a,l)||l.getAttribute("aria-label")||l.getAttribute("placeholder")||l.getAttribute("name")||l.getAttribute("data-field")},"_labelledby"),i=_(function(a){return a.getAttribute("title")||a.getAttribute("aria-title")||""},"_ariatitle"),s=n.filter(a=>this.isInvalid(a));if(s.length>0){let a=`
|
|
690
690
|
<details>
|
|
691
691
|
<summary>Please verify the following incorrect fields:</summary>
|
|
692
692
|
<ul>
|
|
@@ -695,7 +695,7 @@
|
|
|
695
695
|
</div>
|
|
696
696
|
</ul>
|
|
697
697
|
</details>
|
|
698
|
-
`;this.formValidatorModal.body.subelements(".validationMessage")[0].innerHTML=a,this.formValidatorModal.modal()}else this.save()}else z.logger.debug("Unable to find the modal validator..."),z.logger.debug("Saving data..."),this.save()}done(){z.logger.debugEnabled=!0;try{this.component.createBindingEvents();let t=(0,z._DOMCreateElement)("div");t.className="modal_body",this.formValidatorModal=(0,z.New)(
|
|
698
|
+
`;this.formValidatorModal.body.subelements(".validationMessage")[0].innerHTML=a,this.formValidatorModal.modal()}else this.save()}else z.logger.debug("Unable to find the modal validator..."),z.logger.debug("Saving data..."),this.save()}done(){z.logger.debugEnabled=!0;try{this.component.createBindingEvents();let t=(0,z._DOMCreateElement)("div");t.className="modal_body",this.formValidatorModal=(0,z.New)(lr,{body:t,subcomponents:[],data:{content:'<div class="validationMessage"></div>'}}),(0,z.Tag)(".modal_body").map(e=>document.body.removeChild(e)),document.body.append(this.formValidatorModal.body)}catch(t){z.logger.debug(`Unable to create the modal: ${t}`)}this.onpress(".submit",()=>{this.formSaveTouchHandler()})}},c(zt,"FormController"),_(zt,"FormController"),zt);(0,z.Package)("org.qcobjects.controllers.form",[Gs,Fs]);var te=k(),Qt,Hs=(Qt=class extends te.Controller{startSwaggerUI(){if(typeof SwaggerUIBundle<"u"){let t=SwaggerUIBundle({url:te.CONFIG.get("swagger-ui-url","https://petstore.swagger.io/v2/swagger.json"),dom_id:"#"+te.CONFIG.get("swagger-ui-dom_id","swagger-ui"),deepLinking:!0,presets:[SwaggerUIBundle.presets.apis,SwaggerUIStandalonePreset],plugins:[SwaggerUIBundle.plugins.DownloadUrl],layout:"StandaloneLayout"});window.ui=t}}done(){this.component.body.innerHTML='<div id="'+te.CONFIG.get("swagger-ui-dom_id","swagger-ui")+'"></div>';let t=te.CONFIG.get("swagger-ui-package-path","node_modules/swagger-ui-dist/");this.dependencies?.push((0,te.New)(te.SourceJS,{url:t+"swagger-ui-standalone-preset.js",external:te.CONFIG.get("swagger-ui-external",!1)})),this.dependencies?.push((0,te.New)(te.SourceCSS,{url:t+"swagger-ui.css",external:te.CONFIG.get("swagger-ui-external",!1)})),this.dependencies?.push((0,te.New)(te.SourceJS,{url:t+"swagger-ui-bundle.js",external:te.CONFIG.get("swagger-ui-external",!1),done:_(()=>{this.startSwaggerUI()},"done")}))}},c(Qt,"SwaggerUIController"),_(Qt,"SwaggerUIController"),Qt);(0,te.Package)("org.qcobjects.controllers.swagger",[Hs]);var Bs=k(),Zt,Us=(Zt=class extends Bs.Controller{done(){let t=this.component;t.body.innerHTML=t.body.innerHTML.replace("/{{content}}/g",t.submodal.template)}},c(Zt,"ModalController"),_(Zt,"ModalController"),Zt);(0,Bs.Package)("org.qcobjects.modal.controllers",[Us]);var Ws=k(),Jt,Vs=(Jt=class extends Ws.View{},c(Jt,"GridView"),_(Jt,"GridView"),Jt);(0,Ws.Package)("org.qcobjects.views",[Vs]);var zs=k(),Xt,Qs=(Xt=class extends zs.InheritClass{drawImageFilled(t,e,n=1,o=0,i=0){let s=Math.max(e.width/t.width,e.height/t.height);s=s*n;let a=e.width/2-t.width/2*s,l=e.height/2-t.height/2*s;e.getContext("2d")?.drawImage(t,o+a,i+l,t.width*s,t.height*s)}getImageResized(t,e,n,o,i=1,s=0,a=0){let l=document.createElement("canvas");return l.width=e,l.height=n,l.style.width=e.toString(),l.style.height=n.toString(),this.drawImageFilled(t,l,i,s,a),o.src=l.toDataURL("image/png"),l}},c(Xt,"CanvasTool"),_(Xt,"CanvasTool"),Xt);(0,zs.Package)("org.qcobjects.tools.canvas",[Qs]);var L=k(),Kt,Zs=(Kt=class extends L.InheritClass{constructor({component:t=null,dependencies:e=[]}){super({component:t,dependencies:e}),this.dependencies=[]}load(){this.dependencies.push((0,L.New)(L.SourceCSS,{external:!L.CONFIG.get("useLocalSDK",!1),url:L.CONFIG.get("useLocalSDK",!1)?"css/basic-layout.css":L.CONFIG.get("remoteSDKPath",!1)+"css/basic-layout.css"}))}coloredBorder(){setTimeout(function(){(0,L.Tag)("nav").map(t=>{t.style.border="20px solid #3333"}),(0,L.Tag)("nav").map(t=>{t.style.backgroundColor="#129999"}),(0,L.Tag)("component>footer").map(t=>{t.style.background="#876"}),(0,L.Tag)("component>div").map(t=>{t.style.border="3px dashed #fff"}),(0,L.Tag)("component>section").map(t=>{t.style.border="3px solid #000"}),(0,L.Tag)("component>section").map(t=>{t.style.backgroundColor="#fffaaa"}),(0,L.Tag)("component>article").map(t=>{t.style.border="3px dotted #000"}),(0,L.Tag)("component>header").map(t=>{t.style.background="#789"}),(0,L.Tag)("component>footer").map(t=>{t.style.background="#876"}),(0,L.Tag)("component>article:nth-child(1)").map(t=>{t.style.border="1px solid #444"}),(0,L.Tag)("component>article:nth-child(1)").map(t=>{t.style.backgroundColor="#555aaa"}),(0,L.Tag)("component>article:nth-child(2)").map(t=>{t.style.backgroundColor="#aaa333"}),(0,L.Tag)("component>article:nth-child(3)").map(t=>{t.style.backgroundColor="#54da82"}),(0,L.Tag)("*").map(t=>{t.style.color="#fff"}),(0,L.Tag)("component>article").map(t=>Se.apply(t,0,1)),(0,L.Tag)("component>footer").map(t=>Se.apply(t,0,1)),(0,L.Tag)("component>header").map(t=>Se.apply(t,0,1)),(0,L.Tag)("nav").map(t=>{t.style.display="block",t.style.width=t.offsetParent?.scrollWidth.toString()||t.clientWidth.toString(),sr.apply(t)}),(0,L.Tag)("component>article").map(t=>{t.style.display="block",t.style.height=t.offsetParent?.scrollHeight.toString()||t.clientHeight.toString(),ir.apply(t)}),(0,L.Tag)("component>article:nth-child(2)").map(t=>{t.style.display="block",t.style.width=t.offsetParent?.scrollWidth.toString()||t.clientWidth.toString(),rr.apply(t)})},300)}},c(Kt,"BasicLayout"),_(Kt,"BasicLayout"),Kt);(0,L.Package)("org.qcobjects.tools.layouts",[Zs]);var K=k(),H,fo=(H=class extends K.InheritClass{constructor(t){super(t);let e=this;this.__cache__=new K.ComplexStorageCache({index:e.__instanceID.toString(),load(){let n;return typeof navigator<"u"&&typeof origin<"u"?n=K._Crypt.encrypt(`${navigator.userAgent}|${t.username}|${(+new Date).toString()}`,origin):n=K._Crypt.encrypt(`${t.username}|${(+new Date).toString()}`,K.CONFIG.get("domain","localhost")),H.user={priority:e.__instanceID.toString(),token:n},H.user},alternate(n){H.user=n?.cache.getCached(e.__instanceID.toString())}})}static generateIndex(t){return typeof Buffer<"u"?Buffer.from(t,"ascii").toString("base64"):btoa(t)}static getGlobalUser(...t){let e=[t].join("|"),n="userToken_"+H.generateIndex(e);return(typeof(0,K.get)(n)>"u"||(0,K.get)(n)===null)&&(0,K.set)(n,(0,K.New)(H,{username:e})),H.user=(0,K.get)(n).user,(0,K.get)(n).user}static getGlobalUserToken(...t){return H.getGlobalUser(t).token}static getGlobalUserId(...t){return H.getGlobalUser(t).id}static getGlobalUserPriority(...t){return H.getGlobalUser(t).priority}static getLoginCredentialsToken(t,e){return K._Crypt.encrypt(`${t}${e}`,H.getGlobalUserToken(t))}static closeGlobalSession(...t){H.getGlobalUser(t);let e=[t].join("|"),n="userToken_"+H.generateIndex(e);typeof(0,K.get)(n)<"u"&&((0,K.get)(n).__cache__.clear(),(0,K.set)(n,null),H.user={})}},c(H,"_SessionUserToken"),_(H,"SessionUserToken"),H.user={},H);(0,K.Package)("org.qcobjects.cloud.auth.session.usertoken",[fo]);var nr=k(),Yt,Js=(Yt=class extends nr.InheritClass{constructor(){super(...arguments),this.__session_container__=null}setSessionContainer(){this.__session_container__=[...arguments]}getSessionContainer(){if(typeof this.__session_container__>"u"||this.__session_container__===null)throw new Error("You need to set a session container first: sessionData.setSessionContainer(...arguments)");return this.__session_container__}getSessionData(...t){let e=sessionStorage.getItem(`${this.index(t)}`),n;return e!==null&&(n=JSON.parse(e)),(typeof n>"u"||n===null)&&(n={}),n}index(...t){if(typeof fo>"u")throw new Error('You need to import SessionUserToken first: Import ("org.qcobjects.cloud.auth.session.usertoken")');return`session_${btoa(fo.getGlobalUserToken(t))}`}save(...t){let e=(0,nr._DataStringify)(this.sessionData);sessionStorage.setItem(`${this.index(t)}`,e)}get(t,e){let n=this.getSessionData(this.getSessionContainer());return typeof n[t]<"u"?n[t]:e}set(t,e){let n=this.getSessionContainer(),o=this.getSessionData(n);this.sessionData=o,this.sessionData[t]=e,this.save(n)}},c(Yt,"SessionData"),_(Yt,"SessionData"),Yt);(0,nr.Package)("org.qcobjects.cloud.auth.session.data",[Js]);_(c((function r(t){"use strict";if(typeof Object.defineProperty<"u"&&typeof t<"u")try{Object.defineProperty(t,"__qcobjects_sdk__",{enumerable:!0,configurable:!1,writable:!1,value:r})}catch{typeof t.__qcobjects_sdk__<"u"&&(t.__qcobjects_sdk__.__loaded__=!0)}if(typeof t.__qcobjects_sdk__.__loaded__>"u"){if(t.__qcobjects_sdk__.__loaded__=!0,typeof t>"u")throw Error("Top context empty: It should either global, module or window");let e=po.GlobalSettings.__start__.bind(t);t._sdk_=Promise.resolve().then(()=>{po.CONFIG.set("useSDK",!0),e()})}}),"__qcobjects_sdk__"),"__qcobjects_sdk__")(po._top);var xi=po._top});var Ii=wo(Le=>{Object.defineProperty(Le,"__esModule",{value:!0});Le.HeaderController=Le.SideNavController=Le.MainController=void 0;var re=k(),Ai=Ks(),Gn=class Gn extends re.Controller{constructor(t){re.logger.debug("Initializing MainController..."),super(t)}done(...t){let e=super.done();if(!Gn.loaded){let n=(0,re._DOMCreateElement)("style");n.innerHTML=`
|
|
699
699
|
@import url(css/body-layout.css);
|
|
700
|
-
|
|
700
|
+
`,document.body.append(n),re.logger.debug("MainController loaded"),Gn.loaded=!0}return e}};c(Gn,"MainController");var bo=Gn;Le.MainController=bo;var hr=class hr extends re.Controller{constructor(t){re.logger.debug("Initializing SideNavController..."),super(t),this.component=t.component,this.component.shadowed?this.componentRoot=this.component.shadowRoot:this.componentRoot=this.component.body,(0,re.set)("sideNavController",this),this.effect=new Ai.Fade({duration:300})}done(...t){let e=super.done();return this.bindControls(),this.close(),e}bindControls(){this.componentRoot&&this.componentRoot?.subelements("a[href]")?.map(e=>(e.addEventListener("click",()=>this.close()),e))}open(){return this.componentRoot!==null&&(this.effect!=null&&this.effect.apply(this.componentRoot,0,1),this.componentRoot?.classList.add("open"),this.componentRoot?.parentElement&&this.componentRoot.parentElement!==null&&(this.componentRoot.parentElement.subelements(".navbtn")[0].style.display="none",this.componentRoot.parentElement.subelements(".closebtn")[0].style.display="block")),this.visibility=!0,this.visibility}close(){return typeof this.componentRoot<"u"&&this.componentRoot!==null&&(this.effect!=null&&this.effect.apply(this.componentRoot,1,0),this.componentRoot?.classList.remove("open"),this.componentRoot?.parentElement&&(this.componentRoot.parentElement.subelements(".navbtn")[0].style.display="block",this.componentRoot.parentElement.subelements(".closebtn")[0].style.display="none")),this.visibility=!1,this.visibility}toggle(){this.visibility?this.close():this.open()}};c(hr,"SideNavController");var _o=hr;Le.SideNavController=_o;var fr=class fr extends re.Controller{constructor(t){super(t),re.logger.debug("Header controller initialized")}loadInstallerButton(){let t=this.component.shadowed?this.component.shadowRoot:this.component.body;if(typeof t>"u"||t===null){re.logger.debug("HeaderController has no component root yet, skipping installer button");return}t.subelements("#installerbutton").map(e=>(this.installer=(0,re.New)((0,re.ClassFactory)("Installer"),e),e))}done(...t){let e=super.done();return this.loadInstallerButton(),e}};c(fr,"HeaderController");var yo=fr;Le.HeaderController=yo;(0,re.Package)("org.quickcorp.custom.controllers",[bo,_o,yo])});return Ii();})();
|
|
701
701
|
//# sourceMappingURL=org.quickcorp.custom.controllers.js.map
|