qcobjectsnewapp 2.5.22-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.
Files changed (30) hide show
  1. package/VERSION +1 -1
  2. package/package.json +1 -1
  3. package/public/js/init.js +20 -20
  4. package/public/js/init.js.map +3 -3
  5. package/public/js/packages/com.qcobjects.installer.js +15 -15
  6. package/public/js/packages/com.qcobjects.installer.js.map +3 -3
  7. package/public/js/packages/com.qcobjects.services.github.js +4 -4
  8. package/public/js/packages/com.qcobjects.services.github.js.map +3 -3
  9. package/public/js/packages/com.qcobjects.services.newapp.js +4 -4
  10. package/public/js/packages/com.qcobjects.services.newapp.js.map +3 -3
  11. package/public/js/packages/org.quickcorp.custom.components.js +8 -8
  12. package/public/js/packages/org.quickcorp.custom.components.js.map +2 -2
  13. package/public/js/packages/org.quickcorp.custom.controllers.js +16 -16
  14. package/public/js/packages/org.quickcorp.custom.controllers.js.map +3 -3
  15. package/public/js/packages/org.quickcorp.custom.effects.js +4 -4
  16. package/public/js/packages/org.quickcorp.custom.effects.js.map +3 -3
  17. package/public/js/packages/org.quickcorp.custom.js +20 -20
  18. package/public/js/packages/org.quickcorp.custom.js.map +3 -3
  19. package/public/js/packages/org.quickcorp.custom.models.js +4 -4
  20. package/public/js/packages/org.quickcorp.custom.models.js.map +3 -3
  21. package/public/js/packages/org.quickcorp.custom.views.js +4 -4
  22. package/public/js/packages/org.quickcorp.custom.views.js.map +3 -3
  23. package/src/js/packages/com.qcobjects.installer.ts +83 -81
  24. package/src/js/packages/com.qcobjects.services.github.ts +173 -148
  25. package/src/js/packages/com.qcobjects.services.newapp.ts +20 -18
  26. package/src/js/packages/org.quickcorp.custom.components.ts +5 -7
  27. package/src/js/packages/org.quickcorp.custom.controllers.ts +115 -111
  28. package/src/js/packages/org.quickcorp.custom.effects.ts +23 -21
  29. package/src/js/packages/org.quickcorp.custom.models.ts +12 -11
  30. package/src/js/packages/org.quickcorp.custom.views.ts +13 -12
package/public/js/init.js CHANGED
@@ -1,7 +1,7 @@
1
- "use strict";var global=(()=>{var Xi=Object.defineProperty;var c=(s,t)=>Xi(s,"name",{value:t,configurable:!0}),Dn=(s=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(s,{get:(t,e)=>(typeof require<"u"?require:t)[e]}):s)(function(s){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+s+'" is not supported')});var ne=(s,t)=>()=>{try{return t||s((t={exports:{}}).exports,t),t.exports}catch(e){throw t=0,e}};var x=ne((Na,ln)=>{"use strict";var Ki=Object.create,Qn=Object.defineProperty,Yi=Object.getOwnPropertyDescriptor,Uo=Object.getOwnPropertyNames,ea=Object.getPrototypeOf,ta=Object.prototype.hasOwnProperty,p=c((s,t)=>Qn(s,"name",{value:t,configurable:!0}),"__name"),w=c((s,t)=>c(function(){return s&&(t=(0,s[Uo(s)[0]])(s=0)),t},"__init"),"__esm"),na=c((s,t)=>c(function(){return t||(0,s[Uo(s)[0]])((t={exports:{}}).exports,t),t.exports},"__require"),"__commonJS"),Ws=c((s,t)=>{for(var e in t)Qn(s,e,{get:t[e],enumerable:!0})},"__export"),zs=c((s,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Uo(t))!ta.call(s,o)&&o!==e&&Qn(s,o,{get:c(()=>t[o],"get"),enumerable:!(n=Yi(t,o))||n.enumerable});return s},"__copyProps"),oa=c((s,t,e)=>(e=s!=null?Ki(ea(s)):{},zs(t||!s||!s.__esModule?Qn(e,"default",{value:s,enumerable:!0}):e,s)),"__toESM"),sa=c(s=>zs(Qn({},"__esModule",{value:!0}),s),"__toCommonJS"),_n,Zn=w({"src/is_raw_class.ts"(){"use strict";_n=p(s=>!!(typeof s=="function"&&s.toString().startsWith("class")),"__is_raw_class__")}}),yn,Xn=w({"src/ObjectName.ts"(){"use strict";yn=p(s=>{let t="";return typeof s=="function"&&Object.hasOwn(s,"name")&&s.name!==""?t=s.name:typeof s<"u"&&typeof s.constructor=="function"&&s.constructor.name!==""?t=s.constructor.name:typeof s<"u"&&typeof s.constructor=="object"&&(t=s.constructor.toString().replace(/\[(.*?)\]/g,"$1").split(" ").slice(1).join("")),t},"ObjectName")}}),Z,ge=w({"src/getType.ts"(){"use strict";Zn(),Xn(),Z=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(_n(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=yn(t);break}return e},"__getType__2"),"__getType__")}}),Kn,yo=w({"src/make_global.ts"(){"use strict";X(),Kn=p(s=>{s&&s.name&&(typeof R<"u"&&typeof s<"u"&&R!==null&&!Object.hasOwn(R,s.name)?mn(s.name,s):typeof global<"u"?global[s.name]=s:typeof globalThis<"u"&&(globalThis[s.name]=s))},"__make_global__")}}),Y,J,qn,Ge,$n,Vs,Do,$o,Fo,Go,Js,ro,Se=w({"src/PrimaryCollections.ts"(){"use strict";ge(),yo(),Y={},J={},qn=[],Ge=[],$n=p(function(s,t){let e=Z(s),n=s.name||e;return n.toLowerCase()==="function"&&(n=e),(!Object.hasOwn(s,"__definition")||typeof s.__definition>"u")&&Object.defineProperty(s,"__definition",{value:{},writable:!0,enumerable:!0,configurable:!0}),s.__definition.__classType=e,typeof t<"u"&&(s.__definition.__namespace=t),Y[n]=s,Kn(s),Y[n]},"__register_class__"),Vs=p(s=>Y[s],"get_QC_CLASS"),Do=p(function(s){let t=[];for(let e of Object.keys(s))typeof s[e]<"u"&&typeof s[e]!="function"&&Object.hasOwn(s[e],"length")&&s[e].length>0&&(t.push(e),t=t.concat(Do(s[e])));return t},"_get_packages_names"),$o=p(()=>Do(J),"getPackagesNamesList"),Fo=p(()=>[...$o()].map(s=>{let t=J[s],e;return t&&(e={packageName:s,classesList:t.filter(function(){return!0})}),e}).filter(function(s){return typeof s<"u"}),"getPackagesList"),Go=p(()=>{let s=[];return[...Fo()].forEach(function(t){return s=s.concat(t.classesList.map(e=>({packageName:t.packageName,className:`${t.packageName}.${Z(e)}`,classFactory:e}))),t}),s},"getClassesList"),Js=p(()=>[...Go()].map(s=>s.className),"getClassesNamesList"),ro=p((s,t)=>{J[s]=t},"set_QC_PACKAGE")}}),S,st=w({"src/Export.ts"(){"use strict";yo(),S=p(function(s){return Kn(s)},"Export"),S.prototype.toString=function(){return"Export(function or symbol) { [QCObjects native code] }"}}});async function Qs(s){d.debug(`Importing ${s}...`);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(s)&&!t(s)&&(d.debug(`${s} does not have an extension and is not a package. Adding js extension.`),s+=".js"),await import(s)}catch(e){d.warn(`Failed to load module: ${e}`)}}c(Qs,"_import_");var ra=w({"src/_import_.ts"(){"use strict";P(),p(Qs,"_import_")}}),qo,y,Wo,$s,Pe,wo,q=w({"src/platform.ts"(){"use strict";ra(),P(),qo=typeof window<"u"&&"Deno"in window,y=typeof window<"u"&&typeof window.self<"u"&&window===window.self&&!qo,Wo=typeof ln<"u"&&typeof window>"u",$s=p(s=>{},"deno_require"),Pe=p(s=>qo?$s(s):(t=>{let e;try{(async()=>{e=await Qs(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})(s),"_require_"),wo=(function(){return typeof cordova<"u"})()}}),po,d,P=w({"src/Logger.ts"(){"use strict";var s;st(),q(),po=(s=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(s,"Logger"),p(s,"Logger"),s),d=new po,S(d)}}),Oe,ke,Ee=w({"src/Cast.ts"(){"use strict";P(),Oe=p(function(s,t){for(let e in s)if(typeof s[e]<"u")try{t[e]=s[e]}catch(n){d.debug(`An error ocurred: ${n}.`),d.warn(`Unable to cast ${(typeof s).toString()}.${typeof e.toString()} to ${(typeof t).toString()}.${typeof e.toString()}`)}return t},"_Cast"),ke=p(function(s,t,e=!0){for(let n in s)if(typeof s[n]<"u"&&typeof s[n]!="function")try{t[n]=s[n]}catch(o){e||d.debug(`An error ocurred: ${o}.`)}else if(typeof s[n]=="function")try{t[n]=s[n].bind(t)}catch(o){d.warn(o)}return t},"_CastProps")}}),ee,Fs,Gs,me=w({"src/DOMCreateElement.ts"(){"use strict";q(),ee=p(function(s,t,e){let n;return y?n=Gs(s,t,e):n={},n},"_DOMCreateElement"),Fs=p((s,{props:t,children:e})=>s({props:t,children:e}),"ComplexTypeCall"),Gs=p((s,t,e)=>{if(typeof s!="string")return Fs(s,{props:t,children:e});let n=document.createElement(s);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")}}),Te,zo,Vo=w({"src/IncrementInstanceID.ts"(){"use strict";Te=0,zo=p(()=>{Te=typeof Te>"u"||Te===null?0:Te+1},"IncrementInstanceID")}}),M,he,Le=w({"src/introspection.ts"(){"use strict";M=p(s=>{let t=typeof s.prototype<"u"?s.prototype.toString:(function(){return""});typeof s.prototype<"u"&&(s.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_"),M(Function),he=p(function(s){let t=[];for(let e in s)(typeof s[e]).toLowerCase()==="function"&&t.push(s[e]);return t},"_methods_")}}),k,$=w({"src/Package.ts"(){"use strict";Zn(),Se(),k=p((s,t=[])=>{if(Object.hasOwn(J,s)&&typeof J[s]<"u"&&typeof J[s]!="string"&&Object.hasOwn(J[s],"length")&&J[s].length>0&&typeof t<"u"&&Object.hasOwn(t,"length")&&t.length>0)t.forEach(e=>{$n(e,s)}),ro(s,J[s].concat(t));else if(typeof t<"u"&&typeof t<"u"&&Object.hasOwn(t,"length")&&t.length>0)t.forEach(e=>{$n(e,s)}),ro(s,t);else if(_n(t))typeof t.__definition>"u"&&(t.__definition={}),t.__definition.__namespace=s,t.__namespace=s,$n(t,s),ro(s,[t]);else throw new Error(`An error ocurred. It was not possible to add classes to ${s}.`);return Object.hasOwn(J,s)?J[s]:[]},"Package")}}),G,U=w({"src/InheritClass.ts"(){"use strict";var s;P(),Vo(),Ee(),me(),ge(),Le(),to(),q(),Se(),$(),G=(s=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]}),zo(),n.__instanceID||Object.defineProperty(n,"__instanceID",{value:Te,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]}),he(Y[n.__classType]).map(function(o){return n[o.name]=o.bind(n),o}),he(n.__definition).map(function(o){return n[o.name]=o.bind(n),o}),typeof n._body>"u"||n._body===null){let o=Z(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(r){return Object.hasOwn(r,"__classType")?r.__classType:Z.call(e,r)},"__classType"),o=p(r=>typeof r<"u"&&typeof r.__proto__<"u"&&r.__proto__!==null?(n(r)!==""?[n(r)]:[]).concat(o(r.__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){ke(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=Oe(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"),ve(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(s,"InheritClass"),p(s,"InheritClass"),s),k("com.qcobjects",[G])}}),ot,Yn,eo=w({"src/isQCObjects.ts"(){"use strict";U(),ot=p(function(s){return!!(typeof s=="object"&&Object.hasOwn(s,"__classType")&&s.__instanceID&&Object.hasOwn(s,"__definition")&&typeof s.__definition<"u")||s instanceof G},"isQCObjects_Object"),Yn=p(function(s){return!!(typeof s=="function"&&!s.__instanceID&&s.__definition&&typeof s.__definition<"u"&&s.__definition.__classType)||s.prototype instanceof G},"isQCObjects_Class")}}),ve,to=w({"src/is_a.ts"(){"use strict";ge(),eo(),Xn(),ve=p((s,t)=>!!(typeof s<"u"&&s!==null&&((Yn(s)||ot(s))&&s.hierarchy().includes(t)||Z(s)===t||yn(s)===t||typeof s===t)),"is_a")}}),Zs,ia=w({"src/is_forbidden_name.ts"(){"use strict";Zs=p(s=>["__proto__","prototype","Object","Map","defineProperty","indexOf","toString","__instanceID","function","Function"].indexOf(s)!==-1,"__is__forbidden_name__")}}),Co,Jo=w({"src/LegacyCopy.ts"(){"use strict";Zn(),Co=p(function(s,t){var n;let e;switch(!0){case typeof s=="string":e=s;break;case typeof s=="number":e=s;break;case typeof s=="object":e=[{...Object.keys(s).filter(o=>!t?.includes(o))}].map(o=>({[o]:s[o]})).reduce((o,i)=>Object.assign(o,i));break;case typeof s=="function":e=s.bind({});break;case _n(s):e=(n=class extends s{},c(n,"_value_"),p(n,"_value_"),n);break;default:break}return e},"_LegacyCopy")}}),cn,Qo=w({"src/Class.ts"(){"use strict";Se(),Ee(),me(),ge(),Vo(),Le(),to(),ia(),Jo(),P(),q(),X(),cn=p((s,t,e)=>{var r,a;let n={},o,i;switch(!0){case(!s&&!t&&!e):return class{};case(!!s&&!t&&!e):o=(r=class{},c(r,"type"),p(r,"type"),r),i={};break;case(!!s&&!t&&!!e):o=(a=class{},c(a,"type"),p(a,"type"),a),i=e;break;case(!!s&&!!t&&!!e):o=t,i=e;break;default:return class{}}if(typeof s!="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(Zs(s))throw new Error(`${s} 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(Co(o.__definition,["name"]),o)),n[o.name]=o,typeof i>"u"||i===null?i={}:i={...i},typeof i.__instanceID<"u"&&delete i.__instanceID,Y[s]=class extends n[o.name]{constructor(l){super(l||{}),this.__definition={...i};let u=this;if(zo(),u.__instanceID||Object.defineProperty(u,"__instanceID",{value:Te,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]}),he(Y[u.__classType]).map(function(h){return u[h.name]=h.bind(u),h}),he(u.__definition).map(function(h){return u[h.name]=h.bind(u),h}),typeof u._body>"u"||u._body===null){let h=Z(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:Z.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){ke(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=Oe(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"),ve(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[s]=ke(i,Y[s]),Y[s].__definition=i,Y[s].__definition.__classType=s,R[s]=Y[s],Y[s]},"Class"),typeof cn.prototype<"u"&&(cn.prototype.toString=function(){return"Class(name, type, definition) { [QCObjects native code] }"})}}),D,be=w({"src/ClassFactory.ts"(){"use strict";Zn(),Se(),D=p(s=>{let t;if(typeof s>"u"||s===null)throw Error("You need to pass a parameter {className}");if(s!==null&&s.indexOf(".")!==-1){let e=s.split(".").slice(0,s.split(".").length-1).join("."),n=s.split(".").slice(-1).join(""),i=(J[e]||[]).filter(r=>_n(r)).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(s!==null){if(t=Vs(s),typeof t>"u")throw new Error(`${s} is undefined.`)}else throw Error(`className is null. Unable to retrieve the class factory.
1
+ "use strict";var global=(()=>{var ua=Object.defineProperty;var c=(s,t)=>ua(s,"name",{value:t,configurable:!0}),Nn=(s=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(s,{get:(t,e)=>(typeof require<"u"?require:t)[e]}):s)(function(s){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+s+'" is not supported')});var ne=(s,t)=>()=>{try{return t||s((t={exports:{}}).exports,t),t.exports}catch(e){throw t=0,e}};var x=ne((Ga,hn)=>{"use strict";var pa=Object.create,$n=Object.defineProperty,ha=Object.getOwnPropertyDescriptor,os=Object.getOwnPropertyNames,fa=Object.getPrototypeOf,ga=Object.prototype.hasOwnProperty,p=c((s,t)=>$n(s,"name",{value:t,configurable:!0}),"__name"),w=c((s,t)=>c(function(){return s&&(t=(0,s[os(s)[0]])(s=0)),t},"__init"),"__esm"),ma=c((s,t)=>c(function(){return t||(0,s[os(s)[0]])((t={exports:{}}).exports,t),t.exports},"__require"),"__commonJS"),hr=c((s,t)=>{for(var e in t)$n(s,e,{get:t[e],enumerable:!0})},"__export"),fr=c((s,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of os(t))!ga.call(s,o)&&o!==e&&$n(s,o,{get:c(()=>t[o],"get"),enumerable:!(n=ha(t,o))||n.enumerable});return s},"__copyProps"),ba=c((s,t,e)=>(e=s!=null?pa(fa(s)):{},fr(t||!s||!s.__esModule?$n(e,"default",{value:s,enumerable:!0}):e,s)),"__toESM"),_a=c(s=>fr($n({},"__esModule",{value:!0}),s),"__toCommonJS"),Cn,Fn=w({"src/is_raw_class.ts"(){"use strict";Cn=p(s=>!!(typeof s=="function"&&s.toString().startsWith("class")),"__is_raw_class__")}}),vn,Gn=w({"src/ObjectName.ts"(){"use strict";vn=p(s=>{let t="";return typeof s=="function"&&Object.hasOwn(s,"name")&&s.name!==""?t=s.name:typeof s<"u"&&typeof s.constructor=="function"&&s.constructor.name!==""?t=s.constructor.name:typeof s<"u"&&typeof s.constructor=="object"&&(t=s.constructor.toString().replace(/\[(.*?)\]/g,"$1").split(" ").slice(1).join("")),t},"ObjectName")}}),Z,me=w({"src/getType.ts"(){"use strict";Fn(),Gn(),Z=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(Cn(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=vn(t);break}return e},"__getType__2"),"__getType__")}}),Hn,uo=w({"src/make_global.ts"(){"use strict";X(),Hn=p(s=>{s&&s.name&&(typeof R<"u"&&typeof s<"u"&&R!==null&&!Object.hasOwn(R,s.name)?yn(s.name,s):typeof global<"u"?global[s.name]=s:typeof globalThis<"u"&&(globalThis[s.name]=s))},"__make_global__")}}),Y,J,An,Ue,In,gr,Zo,Ko,Yo,es,mr,Xn,xe=w({"src/PrimaryCollections.ts"(){"use strict";me(),uo(),Y={},J={},An=[],Ue=[],In=p(function(s,t){let e=Z(s),n=s.name||e;return n.toLowerCase()==="function"&&(n=e),(!Object.hasOwn(s,"__definition")||typeof s.__definition>"u")&&Object.defineProperty(s,"__definition",{value:{},writable:!0,enumerable:!0,configurable:!0}),s.__definition.__classType=e,typeof t<"u"&&(s.__definition.__namespace=t),Y[n]=s,Hn(s),Y[n]},"__register_class__"),gr=p(s=>Y[s],"get_QC_CLASS"),Zo=p(function(s){let t=[];for(let e of Object.keys(s))typeof s[e]<"u"&&typeof s[e]!="function"&&Object.hasOwn(s[e],"length")&&s[e].length>0&&(t.push(e),t=t.concat(Zo(s[e])));return t},"_get_packages_names"),Ko=p(()=>Zo(J),"getPackagesNamesList"),Yo=p(()=>[...Ko()].map(s=>{let t=J[s],e;return t&&(e={packageName:s,classesList:t.filter(function(){return!0})}),e}).filter(function(s){return typeof s<"u"}),"getPackagesList"),es=p(()=>{let s=[];return[...Yo()].forEach(function(t){return s=s.concat(t.classesList.map(e=>({packageName:t.packageName,className:`${t.packageName}.${Z(e)}`,classFactory:e}))),t}),s},"getClassesList"),mr=p(()=>[...es()].map(s=>s.className),"getClassesNamesList"),Xn=p((s,t)=>{J[s]=t},"set_QC_PACKAGE")}}),S,at=w({"src/Export.ts"(){"use strict";uo(),S=p(function(s){return Hn(s)},"Export"),S.prototype.toString=function(){return"Export(function or symbol) { [QCObjects native code] }"}}});async function br(s){d.debug(`Importing ${s}...`);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(s)&&!t(s)&&(d.debug(`${s} does not have an extension and is not a package. Adding js extension.`),s+=".js"),await import(s)}catch(e){d.warn(`Failed to load module: ${e}`)}}c(br,"_import_");var ya=w({"src/_import_.ts"(){"use strict";P(),p(br,"_import_")}}),Xo,y,ss,ar,Re,po,q=w({"src/platform.ts"(){"use strict";ya(),P(),Xo=typeof window<"u"&&"Deno"in window,y=typeof window<"u"&&typeof window.self<"u"&&window===window.self&&!Xo,ss=typeof hn<"u"&&typeof window>"u",ar=p(s=>{},"deno_require"),Re=p(s=>Xo?ar(s):(t=>{let e;try{(async()=>{e=await br(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})(s),"_require_"),po=(function(){return typeof cordova<"u"})()}}),oo,d,P=w({"src/Logger.ts"(){"use strict";var s;at(),q(),oo=(s=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(s,"Logger"),p(s,"Logger"),s),d=new oo,S(d)}}),Ee,je,Ne=w({"src/Cast.ts"(){"use strict";P(),Ee=p(function(s,t){for(let e in s)if(typeof s[e]<"u")try{t[e]=s[e]}catch(n){d.debug(`An error ocurred: ${n}.`),d.warn(`Unable to cast ${(typeof s).toString()}.${typeof e.toString()} to ${(typeof t).toString()}.${typeof e.toString()}`)}return t},"_Cast"),je=p(function(s,t,e=!0){for(let n in s)if(typeof s[n]<"u"&&typeof s[n]!="function")try{t[n]=s[n]}catch(o){e||d.debug(`An error ocurred: ${o}.`)}else if(typeof s[n]=="function")try{t[n]=s[n].bind(t)}catch(o){d.warn(o)}return t},"_CastProps")}}),ee,cr,dr,be=w({"src/DOMCreateElement.ts"(){"use strict";q(),ee=p(function(s,t,e){let n;return y?n=dr(s,t,e):n={},n},"_DOMCreateElement"),cr=p((s,{props:t,children:e})=>s({props:t,children:e}),"ComplexTypeCall"),dr=p((s,t,e)=>{if(typeof s!="string")return cr(s,{props:t,children:e});let n=document.createElement(s);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")}}),Me,rs,is=w({"src/IncrementInstanceID.ts"(){"use strict";Me=0,rs=p(()=>{Me=typeof Me>"u"||Me===null?0:Me+1},"IncrementInstanceID")}}),M,fe,De=w({"src/introspection.ts"(){"use strict";M=p(s=>{let t=typeof s.prototype<"u"?s.prototype.toString:(function(){return""});typeof s.prototype<"u"&&(s.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_"),M(Function),fe=p(function(s){let t=[];for(let e in s)(typeof s[e]).toLowerCase()==="function"&&t.push(s[e]);return t},"_methods_")}}),k,$=w({"src/Package.ts"(){"use strict";Fn(),xe(),k=p((s,t=[])=>{if(Object.hasOwn(J,s)&&typeof J[s]<"u"&&typeof J[s]!="string"&&Object.hasOwn(J[s],"length")&&J[s].length>0&&typeof t<"u"&&Object.hasOwn(t,"length")&&t.length>0)t.forEach(e=>{In(e,s)}),Xn(s,J[s].concat(t));else if(typeof t<"u"&&typeof t<"u"&&Object.hasOwn(t,"length")&&t.length>0)t.forEach(e=>{In(e,s)}),Xn(s,t);else if(Cn(t))typeof t.__definition>"u"&&(t.__definition={}),t.__definition.__namespace=s,t.__namespace=s,In(t,s),Xn(s,[t]);else throw new Error(`An error ocurred. It was not possible to add classes to ${s}.`);return Object.hasOwn(J,s)?J[s]:[]},"Package")}}),G,U=w({"src/InheritClass.ts"(){"use strict";var s;P(),is(),Ne(),be(),me(),De(),Wn(),q(),xe(),$(),G=(s=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]}),rs(),n.__instanceID||Object.defineProperty(n,"__instanceID",{value:Me,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]}),fe(Y[n.__classType]).map(function(o){return n[o.name]=o.bind(n),o}),fe(n.__definition).map(function(o){return n[o.name]=o.bind(n),o}),typeof n._body>"u"||n._body===null){let o=Z(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(r){return Object.hasOwn(r,"__classType")?r.__classType:Z.call(e,r)},"__classType"),o=p(r=>typeof r<"u"&&typeof r.__proto__<"u"&&r.__proto__!==null?(n(r)!==""?[n(r)]:[]).concat(o(r.__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){je(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=Ee(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"),Se(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(s,"InheritClass"),p(s,"InheritClass"),s),k("com.qcobjects",[G])}}),it,Bn,Un=w({"src/isQCObjects.ts"(){"use strict";U(),it=p(function(s){return!!(typeof s=="object"&&Object.hasOwn(s,"__classType")&&s.__instanceID&&Object.hasOwn(s,"__definition")&&typeof s.__definition<"u")||s instanceof G},"isQCObjects_Object"),Bn=p(function(s){return!!(typeof s=="function"&&!s.__instanceID&&s.__definition&&typeof s.__definition<"u"&&s.__definition.__classType)||s.prototype instanceof G},"isQCObjects_Class")}}),Se,Wn=w({"src/is_a.ts"(){"use strict";me(),Un(),Gn(),Se=p((s,t)=>!!(typeof s<"u"&&s!==null&&((Bn(s)||it(s))&&s.hierarchy().includes(t)||Z(s)===t||vn(s)===t||typeof s===t)),"is_a")}}),_r,wa=w({"src/is_forbidden_name.ts"(){"use strict";_r=p(s=>["__proto__","prototype","Object","Map","defineProperty","indexOf","toString","__instanceID","function","Function"].indexOf(s)!==-1,"__is__forbidden_name__")}}),ho,as=w({"src/LegacyCopy.ts"(){"use strict";Fn(),ho=p(function(s,t){var n;let e;switch(!0){case typeof s=="string":e=s;break;case typeof s=="number":e=s;break;case typeof s=="object":e=[{...Object.keys(s).filter(o=>!t?.includes(o))}].map(o=>({[o]:s[o]})).reduce((o,i)=>Object.assign(o,i));break;case typeof s=="function":e=s.bind({});break;case Cn(s):e=(n=class extends s{},c(n,"_value_"),p(n,"_value_"),n);break;default:break}return e},"_LegacyCopy")}}),un,cs=w({"src/Class.ts"(){"use strict";xe(),Ne(),be(),me(),is(),De(),Wn(),wa(),as(),P(),q(),X(),un=p((s,t,e)=>{var r,a;let n={},o,i;switch(!0){case(!s&&!t&&!e):return class{};case(!!s&&!t&&!e):o=(r=class{},c(r,"type"),p(r,"type"),r),i={};break;case(!!s&&!t&&!!e):o=(a=class{},c(a,"type"),p(a,"type"),a),i=e;break;case(!!s&&!!t&&!!e):o=t,i=e;break;default:return class{}}if(typeof s!="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(_r(s))throw new Error(`${s} 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(ho(o.__definition,["name"]),o)),n[o.name]=o,typeof i>"u"||i===null?i={}:i={...i},typeof i.__instanceID<"u"&&delete i.__instanceID,Y[s]=class extends n[o.name]{constructor(l){super(l||{}),this.__definition={...i};let u=this;if(rs(),u.__instanceID||Object.defineProperty(u,"__instanceID",{value:Me,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]}),fe(Y[u.__classType]).map(function(h){return u[h.name]=h.bind(u),h}),fe(u.__definition).map(function(h){return u[h.name]=h.bind(u),h}),typeof u._body>"u"||u._body===null){let h=Z(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:Z.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){je(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=Ee(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"),Se(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[s]=je(i,Y[s]),Y[s].__definition=i,Y[s].__definition.__classType=s,R[s]=Y[s],Y[s]},"Class"),typeof un.prototype<"u"&&(un.prototype.toString=function(){return"Class(name, type, definition) { [QCObjects native code] }"})}}),D,_e=w({"src/ClassFactory.ts"(){"use strict";Fn(),xe(),D=p(s=>{let t;if(typeof s>"u"||s===null)throw Error("You need to pass a parameter {className}");if(s!==null&&s.indexOf(".")!==-1){let e=s.split(".").slice(0,s.split(".").length-1).join("."),n=s.split(".").slice(-1).join(""),i=(J[e]||[]).filter(r=>Cn(r)).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(s!==null){if(t=gr(s),typeof t>"u")throw new Error(`${s} 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")}}),Bn,Zo=w({"src/Base64.ts"(){"use strict";var s;Bn=(s=class{static encode(e){let n="",o,i,r,a,l,u,h,f=0;for(e=s._utf8_encode(e);f<e.length;)o=e.charCodeAt(f++),i=e.charCodeAt(f++),r=e.charCodeAt(f++),a=o>>2,l=(o&3)<<4|i>>4,u=(i&15)<<2|r>>6,h=r&63,isNaN(i)?u=h=64:isNaN(r)&&(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,r,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,r=(u&3)<<6|h,n=n+String.fromCharCode(o),u!==64&&(n=n+String.fromCharCode(i)),h!==64&&(n=n+String.fromCharCode(r));return n=s._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,r=0,a;for(;o<e.length;)i=e.charCodeAt(o),i<128?(n+=String.fromCharCode(i),o++):i>191&&i<224?(r=e.charCodeAt(o+1),n+=String.fromCharCode((i&31)<<6|r&63),o+=2):(r=e.charCodeAt(o+1),a=e.charCodeAt(o+2),n+=String.fromCharCode((i&15)<<12|(r&63)<<6|a&63),o+=3);return n}},c(s,"_Base64"),p(s,"Base64"),s._keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",s)}}),fe,Xs,je=w({"src/basePath.ts"(){"use strict";q(),fe=(function(){let s="";if(y){let t=document.baseURI.split("?")[0].split("/");t.pop(),s=t.join("/")+"/"}else try{let t=Dn("node:process");typeof t<"u"?s=`${t.cwd()}/`:s=""}catch{s=""}return s})(),Xs=p(s=>{fe=s},"setBasePath")}}),T,_e=w({"src/DataStringify.ts"(){"use strict";Jo(),T=p(s=>JSON.stringify(s,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?Co(i):null;e.add(i)}return i}},"getCircularReplacer")()),"_DataStringify")}}),wn,no=w({"src/domain.ts"(){"use strict";wn=typeof location<"u"&&location.hostname!==""?location.hostname:"localhost"}}),Q,De=w({"src/New.ts"(){"use strict";Q=p(function(s,t={}){if(t=arguments.length>1?t:{},typeof s>"u")return new Object;let e=new s(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 s.__definition=="object"&&s.__definition!==null?s.__definition:{};return e.__definition=Object.assign({},n),typeof e.__classType=="string"&&e.__classType!==""&&(e.__definition.__classType=e.__classType),e},"New"),Q.prototype.toString=function(){return"New(QCObjectsClassName, args) { [QCObjects native code] }"}}}),un,Xo=w({"src/secretKey.ts"(){"use strict";q(),un=y?location.host:"secret"}}),pe,Ks,Ho,vo=w({"src/Crypt.ts"(){"use strict";var s;Zo(),_e(),U(),$(),Xo(),pe=(s=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,r;for(let a=0;a<e.length;a++)i=e.substr(a,1),r=n.substr(a%n.length-1,1),i=String.fromCharCode(i.charCodeAt(0)+r.charCodeAt(0)),o+=i;return this.last_string=Bn.encode(o),this.last_string}_decrypt(){let e=this.string,n=this.key,o="",i,r;e=Bn.decode(e);for(let a=0;a<e.length;a++)i=e.substr(a,1),r=n.substr(a%n.length-1,1),i=String.fromCharCode(i.charCodeAt(0)-r.charCodeAt(0)),o+=i;return this.last_string=o,this.last_string}static encrypt(e,n){return new s({string:e,key:n!==""?n:"12345678ABC"})._encrypt()}static decrypt(e,n){return new s({string:e,key:n!==""?n:"12345678ABC"})._decrypt()}},c(s,"__Crypt"),p(s,"_Crypt"),s),Ks=p(function(t){return pe.encrypt(T(t),un)},"_CryptObject"),Ho=p(function(t){return t===""?{}:JSON.parse(pe.decrypt(t,un))},"_DecryptObject"),k("com.qcobjects",[pe])}}),Ae,aa=w({"src/ConfigSettings.ts"(){"use strict";var s;je(),U(),$(),Ae=(s=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:fe},this._CONFIG_ENC=""}set(e,n){this._CONFIG[e]=n}get(e,n){return this._CONFIG[e]||n}static get instance(){return typeof s._instance>"u"&&(s._instance=new s),s._instance}},c(s,"_ConfigSettings"),p(s,"ConfigSettings"),s),k("com.qcobjects",[Ae])}}),v,de=w({"src/CONFIG.ts"(){"use strict";var s;je(),Ee(),vo(),_e(),P(),Cn(),Xo(),$(),U(),aa(),v=(s=class extends G{get _CONFIG_ENC(){return Ae.instance._CONFIG_ENC}get _CONFIG(){return Ae.instance._CONFIG}set(e,n){d.debug(`CONFIG.set ${e}: ${n}`),e==="basePath"&&Xs(n);let o;try{o=(function(i){i._CONFIG_ENC===null&&(i._CONFIG_ENC=pe.encrypt(T({}),un));let r=i._CONFIG_ENC.valueOf(),a=i._CONFIG?.valueOf();return ke(a,Ho(r))})(Ae.instance)}catch(i){o={},console.error(i),d.debug("failed to encrypt config")}o[e]=n,Ae.instance._CONFIG_ENC=Ks(o),Ae.instance.set(e,n)}get(e,n){let o;try{let r=(function(a){a._CONFIG_ENC===null&&(a._CONFIG_ENC=pe.encrypt(T({}),un));let l=a._CONFIG_ENC.valueOf(),u=a._CONFIG.valueOf();return ke(u,Ho(l))})(Ae.instance);typeof r[e]<"u"&&(o=r[e])}catch(r){console.error(r),d.debug("Something wrong when trying to get CONFIG values"),d.debug("No config value for: "+e),o=n}let i=Ce.processObject(o);return o===null&&i===null?null:i||n}static get instance(){return typeof s._instance>"u"&&(s._instance=new s),s._instance}static set(e,n){s.instance.set(e,n)}static get(e,n){return s.instance.get(e,n)}},c(s,"_CONFIG"),p(s,"CONFIG"),s),k("com.qcobjects",[v])}}),dn,Ce,Cn=w({"src/Processor.ts"(){"use strict";var s;de(),U(),De(),X(),$(),dn=(s=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 R<"u"?R[i]:""}},this.processors=Object.assign({},this.processors,s._instance?.processors,n)}static get instance(){return typeof s._instance>"u"&&(s._instance=new s({component:null})),s._instance}static setProcessor(e){typeof e=="function"&&e.name!==""&&(s.instance.processors[e.name]=e)}setProcessor(e){typeof e=="function"&&e.name!==""&&(this.processors[e.name]=e)}static getProcessor(e){return s.instance.processors[e]}static getProcessorNames(){return Object.keys(s.instance.processors)}execute(e,n,o){let i=typeof e<"u"&&e!==null?e.processorHandler:this,r=typeof o=="string"?o.split(",").map(a=>a.trim()):[];return i?.processors[n].apply(i,[e,...r])}static process(e,n=null){return s.instance.process(e,n)}process(e,n=null){let o=n!==null?n.processorHandler:Q(s,{component:null});return typeof e=="string"&&Object.keys(o.processors).map(i=>[...e.matchAll(new RegExp("\\$"+i+"\\((.*)\\).*","g"))].map(function(r){let a=`$${i}(${r[1]})`;return e=e.replace(a,o.execute.bind(o).call(o,n,i,r[1])),r})),e}static processObject(e,n){return e==null?e:s.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 s({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(s,"_Processor"),p(s,"Processor"),s),Ce=dn.instance,k("com.qcobjects",[dn])}}),Ys,er,Bo,ca=w({"src/routings.ts"(){"use strict";Ys=p((s,t)=>{let e=s.path.replace(/{(.*?)}/g,"(?<$1>.*)");return{...[...t.matchAll(new RegExp(e,"g"))][0].groups}},"__routing_params__"),er=p(function(s,t){return s.filter(function(e){let n=e.path.replace(/{(.*?)}/g,"(?<$1>.*)");return new RegExp(n,"g").test(t)}).reverse()},"__valid_routings__"),Bo=p((s,t)=>s.includes(t),"__valid_routing_way__")}});function pn(s,t){let n=class n{constructor(i,r=[]){this.func=i,this.args=r}dispatch(){this.func.apply(this,...t,this)}};c(n,"AsyncCallback"),p(n,"AsyncCallback");let e=n;return io.push(new e(s,t)),e}c(pn,"asyncLoad");var io,Ko,Oo=w({"src/asyncLoad.ts"(){"use strict";st(),q(),X(),io=[],p(pn,"asyncLoad"),Ko=p(()=>{y?document.addEventListener("readystatechange",()=>{document.readyState==="complete"&&io.map(function(s){s.dispatch.call(s)})}):typeof R<"u"&&io.map(function(s){s.dispatch.call(s)})},"_fireAsyncLoad"),S(pn)}}),hn,So=w({"src/ComplexStorageCache.ts"(){"use strict";var s;Zo(),_e(),P(),hn=(s=class{constructor(e){let n,o,i=e.index;if(typeof i<"u"){n=e.load,o=e.alternate;let r=this.getID(i),a=localStorage.getItem(r);if(this.isEmpty(a)){let l=n.call(null,{cachedObjectID:r,cachedResponse:a,cache:this});this.save(i,l),d.debug("RESPONSE OF {{cachedObjectID}} CACHED".replace("{{cachedObjectID}}",r))}else o.call(null,{cachedObjectID:r,cachedResponse:a,cache:this}),d.debug("RESPONSE OF {{cachedObjectID}} IS ALREADY CACHED ".replace("{{cachedObjectID}}",r))}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,T(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_"+Bn.encode(T(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(s,"ComplexStorageCache"),p(s,"ComplexStorageCache"),s)}}),oo,Eo=w({"src/serviceLoader.ts"(){"use strict";Oo(),So(),_e(),P(),q(),X(),oo=p(function(s,t=!1){let e=p(function(a){var l=new Promise(function(u,h){d.debug("LOADING SERVICE DATA {{DATA}} FROM {{URL}}".replace("{{DATA}}",T(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}}",T(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(T(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 hn({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()}});R.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=Pe("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}}",T(a.data)).replace("{{URL}}",a.url));let O,I={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(T(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..."),I.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,I),u.call(l,I)}),a.useHTTP2&&b.end()},"captureEvents");try{let b;if(a.useHTTP2){d.debug("using http2");var C=Pe("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 I=Pe("http").request;b=Object.assign({url:a.url,headers:a.headers},a.options),g=I(a.url),m(g)}else if(f.protocol==="https:"){let O=Pe("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"),r;switch(s.kind){case"rest":y?typeof t<"u"&&t?r=pn(e,[s,t]):r=e(s):r=n(s);break;case"mockup":r=o(s);break;case"local":r=i(s);break;default:d.debug(`The value of the kind property of the service ${s.name} is not valid`),r=Promise.resolve();break}return r},"serviceLoader")}}),xo,Yo=w({"src/tag_filter.ts"(){"use strict";xo="quick-component:not([loaded]),component:not([loaded])"}}),Un,es=w({"src/componentLoader.ts"(){"use strict";Oo(),So(),_e(),P(),q(),X(),Un=p(function(s,t){let e,n=p(function(r){return e=new Promise(function(a,l){let u=r.__promise__;if((Object.hasOwn(r,"container")&&typeof r.container<"u"&&r.container!==null?r.container:r.body)!==null){let C=p(function(O){O.feedComponent();let I={request:g,component:O};a.call(u,I)},"_feedComponent_");d.debug("LOADING COMPONENT DATA {{DATA}} FROM {{URL}}".replace("{{DATA}}",T(r.data)).replace("{{URL}}",r.url));let b=p(function(){let O=f?0:200;if(g.status===O){let I=g.responseText;d.debug("Data received {{DATA}}".replace("{{DATA}}",T(I))),d.debug("CREATING COMPONENT {{NAME}}".replace("{{NAME}}",r.name)),r.template=I,r.cached&&typeof m<"u"&&m.save(r.cacheIndex,r.template),C(r)}else{let I={request:g,component:r};l.call(u,I)}},"_componentLoaded");if(typeof r.template=="string"&&r.template!=="")C(r);else{var f=!!r.url.startsWith("file:"),g=new XMLHttpRequest;if(f)"fetch"in R&&(d.debug("I can use fetch..."),d.debug("It is a file to be loaded, so I will try to use fetch"),fetch(r.url).then(I=>{d.debug("I got a response from fetch, so I'll feed the component"),I.text().then(B=>{r.template=B,C(r)}).catch(B=>{throw new Error(`An error ocurred: ${B}`)})}).catch(I=>{throw new Error(`An error ocurred: ${I}`)}));else try{d.debug("Calling the url of component in async mode."),g.open(r.method,r.url,!0)}catch(I){d.debug(`An error ocurred: ${I}.`),d.debug("Last try has failed... The component cannot be loaded.")}!wo&&!f&&g.setRequestHeader("Content-Type","text/html"),f||(g.onload=b);let O=p(function(I){I=!(typeof I>"u"||!I),d.debug("SENDING THE NORMAL REQUEST "),I?"fetch"in R||(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(T(r.data)))},"_directLoad");if(r.cached&&!f){d.debug("USING CACHE FOR COMPONENT: "+r.name);var m=new hn({index:r.cacheIndex,load(){O.call(this,f)},alternate(I){r.method==="GET"?(r.template=I.cache.getCached(r.cacheIndex),C.call(this,r)):O.call(this,f)}});R.lastCache=m}else d.debug("NOT USING CACHE FOR COMPONENT: "+r.name),O(f)}}else d.debug("CONTAINER DOESNT EXIST")}),e.then(function(a){return r.__done__().then(function(){let l;return typeof r.done=="function"&&(l=r.done.call(r,a)),Promise.resolve(l)})},function(a){return typeof r.fail=="function"&&r.fail.call(r,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(r){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}}",T(r.data)).replace("{{URL}}",r.url));let f=p(function(m,C){if(m){let b={request:null,component:r};l.call(u,b)}else{let b=C.toString();d.debug("Data received {{DATA}}".replace("{{DATA}}",T(b))),d.debug("CREATING COMPONENT {{NAME}}".replace("{{NAME}}",r.name)),r.template=b,r.cached&&typeof g<"u"&&g.save(r.cacheIndex,r.template),h(r)}},"_componentLoaded");if(typeof r.template=="string"&&r.template!=="")h(r);else{d.debug("Loading the component as a local file in server...");let m=p(function(){let{readFile:C}=Dn("node:fs");d.debug("SENDING THE NORMAL REQUEST "),C(r.url,f)},"_directLoad");if(r.cached){d.debug("USING CACHE FOR COMPONENT: "+r.name);var g=new hn({index:r.cacheIndex,load(){m()},alternate(C){r.method==="GET"?(r.template=C.cache.getCached(r.cacheIndex),h.call(this,r)):m.call(this)}});R.lastCache=g}else d.debug("NOT USING CACHE FOR COMPONENT: "+r.name),m()}}),e.then(function(a){return r.__done__().then(function(){let l;return typeof r.done=="function"&&(l=r.done.call(r,a)),Promise.resolve(l)})},function(a){return typeof r.fail=="function"&&r.fail.call(r,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=pn(n,[s,t]):i=n(s):i=o(s),i},"componentLoader")}}),Be,ts=w({"src/Component.ts"(){"use strict";var s;Zo(),je(),Ee(),be(),No(),_e(),no(),me(),ge(),U(),Le(),to(),eo(),P(),De(),$(),q(),Cn(),ca(),X(),de(),Eo(),Yo(),es(),Be=(s=class extends G{constructor({__parent__:e,templateURI:n="",template:o,tplsource:i="default",tplextension:r,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__:I=null,__shadowRoot:B,body:ce,shadowRoot:jn,splashScreenComponent:Ji,controller:Qi,view:Zi}){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:r,url:a,name:l,method:u,data:h,reload:f,shadowed:g,cached:m,enableServiceClass:C,assignRoutingParams:b,_body:O,__promise__:I,__shadowRoot:B,body:ce,shadowRoot:jn,splashScreenComponent:Ji,controller:Qi,view:Zi}),this.validRoutingWays=["pathname","hash","search"],this.basePath=fe,this.domain=wn,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 j=this;typeof l<"u"&&(j.name=l),typeof j.name>"u"&&typeof l>"u"&&d.warn("A name is not defined for "+Z(j)),j.routingWay=v.get("routingWay"),j.processorHandler=new dn({component:j}),j.data=typeof j.data>"u"||j.data===null?{}:j.data,j.data=Object.assign(j.data,j.dataAttributes),j.createServiceInstance().then(()=>{typeof j.__new__=="function"&&j.__new__(j),j._generateRoutingPaths(j.body).then(function(){j._reroute_().then(function(){return j.rebuild().then(function(){d.info(`Component._new_ The component ${j.name} was built successfully!`)}).catch(function(Fe){d.warn(`Component._new_ Something went wrong building the component ${j.name}`),console.error(`Component._new_ Something went wrong building the component ${j.name}`,Fe)})}).catch(Fe=>{throw Error(`Unexpected error ${Fe}`)})}).catch(Fe=>{throw Error(`Unexpected error ${Fe}`)})}).catch(Fe=>{throw Error(`Unexpected error. ${Fe}`)})}set cacheIndex(e){d.debug("[cacheIndex] This property is readonly")}get cacheIndex(){let e=this,n=T(e.routingPath);return Bn.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 er(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 Ys(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,r=e.serviceClassName;return new Promise(function(a,l){let u=e.enableServiceClass,h=e.responseToData,f=e.responseToTemplate;if(u&&r!==null&&(o=D(r)),!h&&i&&Object.hasOwn(i,"responseTo")?h=i.responseTo==="data":!h&&Object.hasOwn(D("Component"),"responseTo")&&(h=D("Component").responseTo==="data"),!f&&i&&Object.hasOwn(i,"responseTo")?f=i.responseTo==="template":!f&&Object.hasOwn(D("Component"),"responseTo")&&(f=D("Component").responseTo==="template"),typeof o<"u"&&typeof u<"u"&&u===!0&&(h||f)){d.info("Loading service "+r);let g=Q(o,{data:n});oo(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 ${r} in ${e.name}`),l(m)}).catch(function(m){throw d.debug("Something went wroing while trying to load the service "+r),Error(`Error loading ${r} 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;ue("routingPaths")||mn("routingPaths",[]);let r=v.get("routingWay"),a=o.target[r];return ue("routingPaths").includes(a)&&o.target[r]!==location[r]&&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),s.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:r}=e;o({request:i,component:r})}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=D(n),typeof e<"u"&&(this.controller=Q(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(r){throw Error(r)}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=D(o);typeof i<"u"&&(e.view=Q(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(r){i(new Error(r))}})}hostElements(e){let n=this,o=[];if(y)if(n.shadowed&&typeof n.shadowRoot<"u"&&n.shadowRoot!==null){o=n.shadowRoot.subelements(e);let r=n.container??n.body,a=typeof r<"u"&&r!==null?r.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=xo;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=>!Fn(i,"loaded"))),(typeof n<"u"||n.subcomponents.length<1)&&(n.subcomponents=ho(o,n)),n.subcomponents}fail(e){return new Promise((o,i)=>{if(typeof e<"u"){let{error:r,component:a}=e;o({error:r,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(r){if(typeof r.container>"u"&&typeof r.body>"u"){d.warn("COMPONENT {{NAME}} has an undefined container and body".replace("{{NAME}}",r.name));return}let a=typeof r.container>"u"||r.container===null?r.body:r.container,l=r.parsedAssignmentText;if(r.innerHTML=l,r.shadowed){d.debug("COMPONENT {{NAME}} is shadowed".replace("{{NAME}}",r.name)),d.debug("Preparing slots for Shadowed COMPONENT {{NAME}}".replace("{{NAME}}",r.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}}",r.name));let h=ee("div");h.classList.add("shadowHost");try{r.shadowRoot=h.attachShadow({mode:"open"})}catch(f){d.debug(`An error ocurred: ${f}.`);try{d.debug("Shadowed COMPONENT {{NAME}} is repeated".replace("{{NAME}}",r.name)),r.shadowRoot=h.shadowRoot}catch(g){d.debug(`An error ocurred: ${g}.`),d.warn("Shadowed COMPONENT {{NAME}} is not allowed on this browser".replace("{{NAME}}",r.name))}}if(typeof r.shadowRoot<"u"&&r.shadowRoot!==null){r.reload?(d.debug("FORCED RELOADING OF CONTAINER FOR Shadowed COMPONENT {{NAME}}".replace("{{NAME}}",r.name)),h!==null&&h.shadowRoot!==null&&(h.shadowRoot.innerHTML=r.innerHTML)):(u.innerHTML=r.parseTemplate(u.innerHTML),d.debug("ADDING Shadowed COMPONENT {{NAME}} ".replace("{{NAME}}",r.name)),h!==null&&h.shadowRoot!==null&&(h.shadowRoot.innerHTML+=r.innerHTML)),d.debug("ADDING Slots to Shadowed COMPONENT {{NAME}} ".replace("{{NAME}}",r.name)),h.innerHTML+=u.innerHTML,d.debug("APPENDING Shadowed COMPONENT {{NAME}} to Container ".replace("{{NAME}}",r.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}}",r.name)),r.shadowRoot!==null&&h.shadowRoot!==null&&(r.shadowRoot.innerHTML=h.shadowRoot.innerHTML)):a.appendChild(h)}else d.warn("Shadowed COMPONENT {{NAME}} is bad configured".replace("{{NAME}}",r.name))}else r.reload?(d.debug("FORCED RELOADING OF CONTAINER FOR COMPONENT {{NAME}}".replace("{{NAME}}",r.name)),a.innerHTML=r.innerHTML):a&&r?(d.debug("ADDING COMPONENT {{NAME}} ".replace("{{NAME}}",r.name)),a.innerHTML+=r.innerHTML):d.warn("COMPONENT {{NAME}} is not added to the DOM".replace("{{NAME}}",r.name))},"_feedComponent_InBrowser"),o=p(function(r){let a=r.parsedAssignmentText;r.innerHTML=a},"_feedComponent_InNode"),i;return ve(e,"Component")?new Promise((r,a)=>{if(y)try{i=n(e),r(i)}catch(l){a(new Error(l))}else try{i=o(e),r(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")),ot(e)&&ve(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 r={request:void 0,component:e};e.__done__().then(function(){typeof e.done=="function"&&e.done.call(e,r).catch(a=>{d.debug(`It was an error while calling done() in ${e.name}: ${a}`)}),o.call(n,r)},function(){i.call(n,r)});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 r={request:void 0,component:e};e.__done__().then(async()=>{typeof e.done=="function"&&await e.done(r),o.call(n,r)},function(){i.call(n,r)});break;case(e.get("tplsource")==="default"&&e.get("templateURI")!==""):e.set("url",e.get("basePath")+e.get("templateURI")),Un(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")),Un(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=he(e).map(o=>o.name.replace(/bound /g,"")).map(o=>({[o]:e[o].bind(this)})).reduce((o,i)=>Object.assign(o,i),{});return Oe(this,n)}route(){return this.constructor.route()}static route(){let e=this,n,o=!!(ot(e)&&ve(e,"Component")),i=p(function(r){let a=[],l=r.filter(function(u){return typeof u<"u"}).map(function(u){if(typeof u.name<"u")a.push(u.name);else throw new Error(Z(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||gn)o&&d.debug("loading routings for instance "+e.name),n=i.call(e,o?e.subcomponents:gn);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&&Bo(n.validRoutingWays,n.routingWay||"")&&typeof e<"u"&&(n.innerHTML=e?.innerHTML,n.routingNodes=e?.subelements("routing"),n.routings=[],n.routingNodes.map(i=>{let r=i.getAttributeNames(),a={};return r.map((l,u)=>(a[r[u]]=i.getAttribute(r[u]),l)),n.routings.push(a),n.routingPaths||(n.routingPaths=[]),n.routingPaths.includes(a.path)||n.routingPaths.push(a.path),ue("routingPaths")||mn("routingPaths",[]),ue("routingPaths").includes(a.path)||ue("routingPaths").push(a.path),i})),o()})}parseTemplate(e){let n=this,o,i=e;if(Object.hasOwn(n,"templateHandler")){let r=n.templateHandler;d.debug(`[Component][${this.name}][parseTemplate] Attempting to use ${r} ...`);let a=D(r),l=Q(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&&Bo(e.validRoutingWays,e.routingWay||"")&&(e.routingPath=location[e.routingWay],e.routingSelected.map(o=>{let i=Wn({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(r){r.setAttribute("src",r.getAttribute("lazy-src")?.toString()),r.onload=()=>{r.removeAttribute("lazy-src")}},"_lazyLoadImages");if("IntersectionObserver"in window){let r=new IntersectionObserver((a,l)=>{a.forEach(u=>{u.isIntersecting&&(i(u.target),l.unobserve(u.target))})});o.map(function(a){return r.observe(a)})}else o.map(i)}}return null}applyTransitionEffect(e){let n=D(e);if(typeof n>"u")throw Error(`${e} not found.`);typeof n<"u"&&ve(n,"TransitionEffect")?(this.effect=Q(n,{component:this}),this.effect?.apply(this.effect?.defaultParams)):d.debug(`${e} is ${Z(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 r=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;r.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),r=ue("i18n");o!==i&&typeof r=="object"&&Object.hasOwn(r,"messages")&&p(()=>new Promise(function(l){let u=r.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(s,"_Component"),p(s,"Component"),s.shadowed=!1,s.cached=!0,s),k("com.qcobjects",[Be]),he(D("Component")).map(t=>(M(t),t))}}),Wn,Fn,ao,Hs,ho,tr,No=w({"src/ComponentFactory.ts"(){"use strict";Qo(),be(),ts(),de(),me(),ge(),P(),De(),$(),q(),Yo(),Wn=p(({TPL_SOURCE:s,COMPONENTS_BASE_PATH:t,COMPONENT_NAME:e,TPLEXTENSION:n})=>s==="default"?`${t}${e}.${n}`:"","ComponentURI"),Fn=p((s,t)=>{let e=s.getAttribute(t);if(e===null)return!1;let n=e.trim().toLowerCase();return n!=="false"&&n!=="0"},"__booleanAttribute_"),ao=p((s,t)=>s.getAttribute(t)===null,"__attributeNotSet_"),Hs=p((s,t)=>{let e=ao(s,"shadowed"),n=s.getAttribute("template-source")===null,o=Fn(s,"shadowed"),i=ao(s,"cached"),r=Fn(s,"cached"),a=typeof v.get("tplextension")<"u"?v.get("tplextension"):"html";a=s.getAttribute("tplextension")!==null?s.getAttribute("tplextension"):a;let l=s.getAttribute("name"),u=s.getAttribute("componentClass")!==null?s.getAttribute("componentClass"):"Component",h=v.get("preserveComponentBodyTag")?l!==null?"com.qcobjects.components."+l+".ComponentBody":"com.qcobjects.components.ComponentBody":u;l=l!==null?l:D(h)&&typeof D(h).name<"u"?D(h).name:"";let f=D(h),g=h!=="Component"&&typeof f<"u"&&typeof f.tplsource=="string"&&f.tplsource!=="",m=n&&g?f.tplsource:n?"default":s.getAttribute("template-source");d.debug(`template source for ${l} is ${m} `),d.debug(`type for ${l} is ${Z(f)} `);let C=Wn({COMPONENTS_BASE_PATH:v.get("componentsBasePath"),COMPONENT_NAME:l,TPLEXTENSION:a,TPL_SOURCE:m});return v.get("preserveComponentBodyTag")&&k(l!==""?"com.qcobjects.components."+l:"com.qcobjects.components",[cn("ComponentBody",Be,{name:l,tplsource:m,tplextension:a,reload:!0})]),p(function(){let I=e?f&&f.shadowed||Be.shadowed:o,B=i?(f&&f.cached)??Be.cached:r,ce={__parent__:t,name:l,cached:B,shadowed:I,tplextension:a,body:v.get("preserveComponentBodyTag")?ee("componentBody"):s,templateURI:C,tplsource:m};(typeof l>"u"||l===""||l===null)&&delete ce.name,C===""&&delete ce.templateURI;let jn=Q(f,ce);return v.get("preserveComponentBodyTag")&&typeof jn<"u"&&s.append(jn.body),jn},"__create_component_instance_")()},"_buildComponentFromElement_"),ho=p((s,t)=>{let e=[];return y?e=s.map(function(n){return Hs(n,t)}):d.debug("[_buildComponentsFromElements_] not implemented for Non-Browser environments"),e},"_buildComponentsFromElements_"),tr=p(s=>{let t=xo,e=s.subelements(t);return ho(e,null)},"buildComponents")}}),co,lo,fo,nr=w({"src/Service.ts"(){"use strict";var s,t,e;je(),vo(),no(),U(),P(),$(),Xo(),de(),co=(s=class extends G{constructor(){super(...arguments),this.kind="rest",this.domain=wn,this.basePath=fe,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(s,"Service"),p(s,"Service"),s),lo=(t=class extends co{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),fo=(e=class extends lo{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 r=pe.decrypt(this.JSONresponse?.__encoded__,un);this.JSONresponse=JSON.parse(r)}let i=this.JSONresponse;Object.keys(i).map(r=>(v.set(r,i[r]),r)),this.configLoaded().catch(r=>{throw new Error(`An error ocurred: ${r}`)})}fail(){this.configLoaded().catch(o=>{throw new Error(`An error ocurred: ${o}`)})}},c(e,"ConfigService"),p(e,"ConfigService"),e),k("com.qcobjects.api",[co]),k("com.qcobjects.api.services",[lo]),k("com.qcobjects.api.config",[fo])}}),fn,ns=w({"src/globalSettings.ts"(){"use strict";var s;de(),U(),P(),$(),q(),Eo(),X(),nr(),fn=(s=class extends G{constructor(){super(...arguments),this._GLOBAL={},this._logger=new po}static __start__(){return s.instance.__start__()}static get instance(){return typeof s._instance>"u"&&(s._instance=new s),s._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,r){"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"),r.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"),r.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{os()}catch(i){throw Error(`Something went wrong trying to start components tree: ${i.message}`)}d.debug("Initializing the service worker"),e.call(R).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..."),ss(new fo),Gn.configLoaded=n,oo(Gn)?.then(i=>{o(i)})?.catch(i=>{throw new Error(`An error ocurred while trying to load ${Gn.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(s,"_GlobalSettings"),p(s,"GlobalSettings"),s),k("com.qcobjects",[fn])}}),or={};Ws(or,{_top:c(()=>R,"_top"),buildComponentsStack:c(()=>os,"buildComponentsStack"),componentsStack:c(()=>gn,"componentsStack"),configService:c(()=>Gn,"configService"),get:c(()=>ue,"get"),resetTop:c(()=>go,"resetTop"),set:c(()=>mn,"set"),setConfigService:c(()=>ss,"setConfigService")});var R,gn,go,os,Gn,ss,mn,ue,Bs,X=w({"src/top.ts"(){"use strict";No(),Ee(),ns(),Se(),P(),R={},R.lastCache=void 0,gn=[],go=p(()=>{let s=fn.instance;R=ke(s,R,!0)},"resetTop"),os=p(()=>{gn=tr(document)},"buildComponentsStack"),ss=p(s=>{R.configService=s,Gn=s},"setConfigService"),mn=p((s,t)=>{R[s]=t},"set"),ue=p((s,t)=>R[s]||t,"get"),go(),Bs=p(function(s){Object.hasOwn(s,"PackagesList")||Object.defineProperty(s,"PackagesList",{set:p(t=>{d.debug("PackagesList is readonly")},"set"),get:p(()=>Fo(),"get")}),Object.hasOwn(s,"PackagesNameList")||Object.defineProperty(s,"PackagesNameList",{set:p(t=>{d.debug("PackagesNameList is readonly")},"set"),get:p(()=>$o(),"get")}),Object.hasOwn(s,"ClassesList")||Object.defineProperty(s,"ClassesList",{set:p(t=>{d.debug("ClassesList is readonly")},"set"),get:p(()=>Go(),"get")}),Object.hasOwn(s,"ClassesNameList")||Object.defineProperty(s,"ClassesNameList",{set(t){d.debug("ClassesNameList is readonly")},get:p(()=>Js(),"get")})},"_define_props"),Bs(R)}}),rn,rs,sr=w({"src/captureFalseTouch.ts"(){"use strict";if(P(),q(),rn=!1,rs=p(()=>rn?{passive:!0}:!1,"captureFalseTouch"),y)try{let s=Object.defineProperty({},"passive",{get(){return rn=!0,rn}});window.addEventListener("testPassive",null,s),window.removeEventListener("testPassive",null,s)}catch(s){d.debug(`An error ocurred: ${s}.`),rn=!1}else rn=!1}}),zn,is=w({"src/range.ts"(){"use strict";Le(),zn=p((s,t=0,e=1)=>((t===0||typeof t>"u")&&(t=s,s=0),Array.from({length:(t-s)/e+1},function(n,o){return s+o*e})),"range"),M(zn)}}),as,rr=w({"src/defaultProcessors.ts"(){"use strict";P(),Cn(),X(),is(),as=p(()=>{(function(){let s=p((i,r,a)=>{if(typeof i>"u"||i===null)throw Error(`mapper.${r}.${a} does not have a component instance or it is null.`);let l=ue(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="${r}" ${C} ></quick-component>`}).join(""):d.debug(`${r}.${a} does not have a map property`),g},"mapper");Ce.setProcessor(s);let t=p(function(i,r,a){let l=`
4
+ `)}`);return t},"ClassFactory")}}),Rn,ds=w({"src/Base64.ts"(){"use strict";var s;Rn=(s=class{static encode(e){let n="",o,i,r,a,l,u,h,f=0;for(e=s._utf8_encode(e);f<e.length;)o=e.charCodeAt(f++),i=e.charCodeAt(f++),r=e.charCodeAt(f++),a=o>>2,l=(o&3)<<4|i>>4,u=(i&15)<<2|r>>6,h=r&63,isNaN(i)?u=h=64:isNaN(r)&&(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,r,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,r=(u&3)<<6|h,n=n+String.fromCharCode(o),u!==64&&(n=n+String.fromCharCode(i)),h!==64&&(n=n+String.fromCharCode(r));return n=s._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,r=0,a;for(;o<e.length;)i=e.charCodeAt(o),i<128?(n+=String.fromCharCode(i),o++):i>191&&i<224?(r=e.charCodeAt(o+1),n+=String.fromCharCode((i&31)<<6|r&63),o+=2):(r=e.charCodeAt(o+1),a=e.charCodeAt(o+2),n+=String.fromCharCode((i&15)<<12|(r&63)<<6|a&63),o+=3);return n}},c(s,"_Base64"),p(s,"Base64"),s._keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",s)}}),ge,yr,qe=w({"src/basePath.ts"(){"use strict";q(),ge=(function(){let s="";if(y){let t=document.baseURI.split("?")[0].split("/");t.pop(),s=t.join("/")+"/"}else try{let t=Nn("node:process");typeof t<"u"?s=`${t.cwd()}/`:s=""}catch{s=""}return s})(),yr=p(s=>{ge=s},"setBasePath")}}),T,ye=w({"src/DataStringify.ts"(){"use strict";as(),T=p(s=>JSON.stringify(s,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?ho(i):null;e.add(i)}return i}},"getCircularReplacer")()),"_DataStringify")}}),On,zn=w({"src/domain.ts"(){"use strict";On=typeof location<"u"&&location.hostname!==""?location.hostname:"localhost"}}),Q,$e=w({"src/New.ts"(){"use strict";Q=p(function(s,t={}){if(t=arguments.length>1?t:{},typeof s>"u")return new Object;let e=new s(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 s.__definition=="object"&&s.__definition!==null?s.__definition:{};return e.__definition=Object.assign({},n),typeof e.__classType=="string"&&e.__classType!==""&&(e.__definition.__classType=e.__classType),e},"New"),Q.prototype.toString=function(){return"New(QCObjectsClassName, args) { [QCObjects native code] }"}}}),fn,ls=w({"src/secretKey.ts"(){"use strict";q(),fn=y?location.host:"secret"}}),he,wr,ts,fo=w({"src/Crypt.ts"(){"use strict";var s;ds(),ye(),U(),$(),ls(),he=(s=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,r;for(let a=0;a<e.length;a++)i=e.substr(a,1),r=n.substr(a%n.length-1,1),i=String.fromCharCode(i.charCodeAt(0)+r.charCodeAt(0)),o+=i;return this.last_string=Rn.encode(o),this.last_string}_decrypt(){let e=this.string,n=this.key,o="",i,r;e=Rn.decode(e);for(let a=0;a<e.length;a++)i=e.substr(a,1),r=n.substr(a%n.length-1,1),i=String.fromCharCode(i.charCodeAt(0)-r.charCodeAt(0)),o+=i;return this.last_string=o,this.last_string}static encrypt(e,n){return new s({string:e,key:n!==""?n:"12345678ABC"})._encrypt()}static decrypt(e,n){return new s({string:e,key:n!==""?n:"12345678ABC"})._decrypt()}},c(s,"__Crypt"),p(s,"_Crypt"),s),wr=p(function(t){return he.encrypt(T(t),fn)},"_CryptObject"),ts=p(function(t){return t===""?{}:JSON.parse(he.decrypt(t,fn))},"_DecryptObject"),k("com.qcobjects",[he])}}),Pe,Ca=w({"src/ConfigSettings.ts"(){"use strict";var s;qe(),U(),$(),Pe=(s=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:ge},this._CONFIG_ENC=""}set(e,n){this._CONFIG[e]=n}get(e,n){return this._CONFIG[e]||n}static get instance(){return typeof s._instance>"u"&&(s._instance=new s),s._instance}},c(s,"_ConfigSettings"),p(s,"ConfigSettings"),s),k("com.qcobjects",[Pe])}}),v,le=w({"src/CONFIG.ts"(){"use strict";var s;qe(),Ne(),fo(),ye(),P(),Sn(),ls(),$(),U(),Ca(),v=(s=class extends G{get _CONFIG_ENC(){return Pe.instance._CONFIG_ENC}get _CONFIG(){return Pe.instance._CONFIG}set(e,n){d.debug(`CONFIG.set ${e}: ${n}`),e==="basePath"&&yr(n);let o;try{o=(function(i){i._CONFIG_ENC===null&&(i._CONFIG_ENC=he.encrypt(T({}),fn));let r=i._CONFIG_ENC.valueOf(),a=i._CONFIG?.valueOf();return je(a,ts(r))})(Pe.instance)}catch(i){o={},console.error(i),d.debug("failed to encrypt config")}o[e]=n,Pe.instance._CONFIG_ENC=wr(o),Pe.instance.set(e,n)}get(e,n){let o;try{let r=(function(a){a._CONFIG_ENC===null&&(a._CONFIG_ENC=he.encrypt(T({}),fn));let l=a._CONFIG_ENC.valueOf(),u=a._CONFIG.valueOf();return je(u,ts(l))})(Pe.instance);typeof r[e]<"u"&&(o=r[e])}catch(r){console.error(r),d.debug("Something wrong when trying to get CONFIG values"),d.debug("No config value for: "+e),o=n}let i=Oe.processObject(o);return o===null&&i===null?null:i||n}static get instance(){return typeof s._instance>"u"&&(s._instance=new s),s._instance}static set(e,n){s.instance.set(e,n)}static get(e,n){return s.instance.get(e,n)}},c(s,"_CONFIG"),p(s,"CONFIG"),s),k("com.qcobjects",[v])}}),pn,Oe,Sn=w({"src/Processor.ts"(){"use strict";var s;le(),U(),$e(),X(),$(),pn=(s=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 R<"u"?R[i]:""}},this.processors=Object.assign({},this.processors,s._instance?.processors,n)}static get instance(){return typeof s._instance>"u"&&(s._instance=new s({component:null})),s._instance}static setProcessor(e){typeof e=="function"&&e.name!==""&&(s.instance.processors[e.name]=e)}setProcessor(e){typeof e=="function"&&e.name!==""&&(this.processors[e.name]=e)}static getProcessor(e){return s.instance.processors[e]}static getProcessorNames(){return Object.keys(s.instance.processors)}execute(e,n,o){let i=typeof e<"u"&&e!==null?e.processorHandler:this,r=typeof o=="string"?o.split(",").map(a=>a.trim()):[];return i?.processors[n].apply(i,[e,...r])}static process(e,n=null){return s.instance.process(e,n)}process(e,n=null){let o=n!==null?n.processorHandler:Q(s,{component:null});return typeof e=="string"&&Object.keys(o.processors).map(i=>[...e.matchAll(new RegExp("\\$"+i+"\\((.*)\\).*","g"))].map(function(r){let a=`$${i}(${r[1]})`;return e=e.replace(a,o.execute.bind(o).call(o,n,i,r[1])),r})),e}static processObject(e,n){return e==null?e:s.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 s({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(s,"_Processor"),p(s,"Processor"),s),Oe=pn.instance,k("com.qcobjects",[pn])}}),Cr,vr,ns,va=w({"src/routings.ts"(){"use strict";Cr=p((s,t)=>{let e=s.path.replace(/{(.*?)}/g,"(?<$1>.*)");return{...[...t.matchAll(new RegExp(e,"g"))][0].groups}},"__routing_params__"),vr=p(function(s,t){return s.filter(function(e){let n=e.path.replace(/{(.*?)}/g,"(?<$1>.*)");return new RegExp(n,"g").test(t)}).reverse()},"__valid_routings__"),ns=p((s,t)=>s.includes(t),"__valid_routing_way__")}});function gn(s,t){let n=class n{constructor(i,r=[]){this.func=i,this.args=r}dispatch(){this.func.apply(this,...t,this)}};c(n,"AsyncCallback"),p(n,"AsyncCallback");let e=n;return Kn.push(new e(s,t)),e}c(gn,"asyncLoad");var Kn,us,go=w({"src/asyncLoad.ts"(){"use strict";at(),q(),X(),Kn=[],p(gn,"asyncLoad"),us=p(()=>{y?document.addEventListener("readystatechange",()=>{document.readyState==="complete"&&Kn.map(function(s){s.dispatch.call(s)})}):typeof R<"u"&&Kn.map(function(s){s.dispatch.call(s)})},"_fireAsyncLoad"),S(gn)}}),mn,mo=w({"src/ComplexStorageCache.ts"(){"use strict";var s;ds(),ye(),P(),mn=(s=class{constructor(e){let n,o,i=e.index;if(typeof i<"u"){n=e.load,o=e.alternate;let r=this.getID(i),a=localStorage.getItem(r);if(this.isEmpty(a)){let l=n.call(null,{cachedObjectID:r,cachedResponse:a,cache:this});this.save(i,l),d.debug("RESPONSE OF {{cachedObjectID}} CACHED".replace("{{cachedObjectID}}",r))}else o.call(null,{cachedObjectID:r,cachedResponse:a,cache:this}),d.debug("RESPONSE OF {{cachedObjectID}} IS ALREADY CACHED ".replace("{{cachedObjectID}}",r))}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,T(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_"+Rn.encode(T(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(s,"ComplexStorageCache"),p(s,"ComplexStorageCache"),s)}}),Vn,bo=w({"src/serviceLoader.ts"(){"use strict";go(),mo(),ye(),P(),q(),X(),Vn=p(function(s,t=!1){let e=p(function(a){var l=new Promise(function(u,h){d.debug("LOADING SERVICE DATA {{DATA}} FROM {{URL}}".replace("{{DATA}}",T(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}}",T(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(T(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 mn({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()}});R.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=Re("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}}",T(a.data)).replace("{{URL}}",a.url));let O,A={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(T(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..."),A.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,A),u.call(l,A)}),a.useHTTP2&&b.end()},"captureEvents");try{let b;if(a.useHTTP2){d.debug("using http2");var C=Re("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 A=Re("http").request;b=Object.assign({url:a.url,headers:a.headers},a.options),g=A(a.url),m(g)}else if(f.protocol==="https:"){let O=Re("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"),r;switch(s.kind){case"rest":y?typeof t<"u"&&t?r=gn(e,[s,t]):r=e(s):r=n(s);break;case"mockup":r=o(s);break;case"local":r=i(s);break;default:d.debug(`The value of the kind property of the service ${s.name} is not valid`),r=Promise.resolve();break}return r},"serviceLoader")}}),_o,ps=w({"src/tag_filter.ts"(){"use strict";_o="quick-component:not([loaded]),component:not([loaded])"}}),kn,hs=w({"src/componentLoader.ts"(){"use strict";go(),mo(),ye(),P(),q(),X(),kn=p(function(s,t){let e,n=p(function(r){return e=new Promise(function(a,l){let u=r.__promise__;if((Object.hasOwn(r,"container")&&typeof r.container<"u"&&r.container!==null?r.container:r.body)!==null){let C=p(function(O){O.feedComponent();let A={request:g,component:O};a.call(u,A)},"_feedComponent_");d.debug("LOADING COMPONENT DATA {{DATA}} FROM {{URL}}".replace("{{DATA}}",T(r.data)).replace("{{URL}}",r.url));let b=p(function(){let O=f?0:200;if(g.status===O){let A=g.responseText;d.debug("Data received {{DATA}}".replace("{{DATA}}",T(A))),d.debug("CREATING COMPONENT {{NAME}}".replace("{{NAME}}",r.name)),r.template=A,r.cached&&typeof m<"u"&&m.save(r.cacheIndex,r.template),C(r)}else{let A={request:g,component:r};l.call(u,A)}},"_componentLoaded");if(typeof r.template=="string"&&r.template!=="")C(r);else{var f=!!r.url.startsWith("file:"),g=new XMLHttpRequest;if(f)"fetch"in R&&(d.debug("I can use fetch..."),d.debug("It is a file to be loaded, so I will try to use fetch"),fetch(r.url).then(A=>{d.debug("I got a response from fetch, so I'll feed the component"),A.text().then(B=>{r.template=B,C(r)}).catch(B=>{throw new Error(`An error ocurred: ${B}`)})}).catch(A=>{throw new Error(`An error ocurred: ${A}`)}));else try{d.debug("Calling the url of component in async mode."),g.open(r.method,r.url,!0)}catch(A){d.debug(`An error ocurred: ${A}.`),d.debug("Last try has failed... The component cannot be loaded.")}!po&&!f&&g.setRequestHeader("Content-Type","text/html"),f||(g.onload=b);let O=p(function(A){A=!(typeof A>"u"||!A),d.debug("SENDING THE NORMAL REQUEST "),A?"fetch"in R||(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(T(r.data)))},"_directLoad");if(r.cached&&!f){d.debug("USING CACHE FOR COMPONENT: "+r.name);var m=new mn({index:r.cacheIndex,load(){O.call(this,f)},alternate(A){r.method==="GET"?(r.template=A.cache.getCached(r.cacheIndex),C.call(this,r)):O.call(this,f)}});R.lastCache=m}else d.debug("NOT USING CACHE FOR COMPONENT: "+r.name),O(f)}}else d.debug("CONTAINER DOESNT EXIST")}),e.then(function(a){return r.__done__().then(function(){let l;return typeof r.done=="function"&&(l=r.done.call(r,a)),Promise.resolve(l)})},function(a){return typeof r.fail=="function"&&r.fail.call(r,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(r){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}}",T(r.data)).replace("{{URL}}",r.url));let f=p(function(m,C){if(m){let b={request:null,component:r};l.call(u,b)}else{let b=C.toString();d.debug("Data received {{DATA}}".replace("{{DATA}}",T(b))),d.debug("CREATING COMPONENT {{NAME}}".replace("{{NAME}}",r.name)),r.template=b,r.cached&&typeof g<"u"&&g.save(r.cacheIndex,r.template),h(r)}},"_componentLoaded");if(typeof r.template=="string"&&r.template!=="")h(r);else{d.debug("Loading the component as a local file in server...");let m=p(function(){let{readFile:C}=Nn("node:fs");d.debug("SENDING THE NORMAL REQUEST "),C(r.url,f)},"_directLoad");if(r.cached){d.debug("USING CACHE FOR COMPONENT: "+r.name);var g=new mn({index:r.cacheIndex,load(){m()},alternate(C){r.method==="GET"?(r.template=C.cache.getCached(r.cacheIndex),h.call(this,r)):m.call(this)}});R.lastCache=g}else d.debug("NOT USING CACHE FOR COMPONENT: "+r.name),m()}}),e.then(function(a){return r.__done__().then(function(){let l;return typeof r.done=="function"&&(l=r.done.call(r,a)),Promise.resolve(l)})},function(a){return typeof r.fail=="function"&&r.fail.call(r,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=gn(n,[s,t]):i=n(s):i=o(s),i},"componentLoader")}}),ze,fs=w({"src/Component.ts"(){"use strict";var s;ds(),qe(),Ne(),_e(),yo(),ye(),zn(),be(),me(),U(),De(),Wn(),Un(),P(),$e(),$(),q(),Sn(),va(),X(),le(),bo(),ps(),hs(),ze=(s=class extends G{constructor({__parent__:e,templateURI:n="",template:o,tplsource:i="default",tplextension:r,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__:A=null,__shadowRoot:B,body:ce,shadowRoot:xn,splashScreenComponent:ca,controller:da,view:la}){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:r,url:a,name:l,method:u,data:h,reload:f,shadowed:g,cached:m,enableServiceClass:C,assignRoutingParams:b,_body:O,__promise__:A,__shadowRoot:B,body:ce,shadowRoot:xn,splashScreenComponent:ca,controller:da,view:la}),this.validRoutingWays=["pathname","hash","search"],this.basePath=ge,this.domain=On,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 j=this;typeof l<"u"&&(j.name=l),typeof j.name>"u"&&typeof l>"u"&&d.warn("A name is not defined for "+Z(j)),j.routingWay=v.get("routingWay"),j.processorHandler=new pn({component:j}),j.data=typeof j.data>"u"||j.data===null?{}:j.data,j.data=Object.assign(j.data,j.dataAttributes),j.createServiceInstance().then(()=>{typeof j.__new__=="function"&&j.__new__(j),j._generateRoutingPaths(j.body).then(function(){j._reroute_().then(function(){return j.rebuild().then(function(){d.info(`Component._new_ The component ${j.name} was built successfully!`)}).catch(function(Be){d.warn(`Component._new_ Something went wrong building the component ${j.name}`),console.error(`Component._new_ Something went wrong building the component ${j.name}`,Be)})}).catch(Be=>{throw Error(`Unexpected error ${Be}`)})}).catch(Be=>{throw Error(`Unexpected error ${Be}`)})}).catch(Be=>{throw Error(`Unexpected error. ${Be}`)})}set cacheIndex(e){d.debug("[cacheIndex] This property is readonly")}get cacheIndex(){let e=this,n=T(e.routingPath);return Rn.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 vr(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 Cr(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,r=e.serviceClassName;return new Promise(function(a,l){let u=e.enableServiceClass,h=e.responseToData,f=e.responseToTemplate;if(u&&r!==null&&(o=D(r)),!h&&i&&Object.hasOwn(i,"responseTo")?h=i.responseTo==="data":!h&&Object.hasOwn(D("Component"),"responseTo")&&(h=D("Component").responseTo==="data"),!f&&i&&Object.hasOwn(i,"responseTo")?f=i.responseTo==="template":!f&&Object.hasOwn(D("Component"),"responseTo")&&(f=D("Component").responseTo==="template"),typeof o<"u"&&typeof u<"u"&&u===!0&&(h||f)){d.info("Loading service "+r);let g=Q(o,{data:n});Vn(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 ${r} in ${e.name}`),l(m)}).catch(function(m){throw d.debug("Something went wroing while trying to load the service "+r),Error(`Error loading ${r} 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;pe("routingPaths")||yn("routingPaths",[]);let r=v.get("routingWay"),a=o.target[r];return pe("routingPaths").includes(a)&&o.target[r]!==location[r]&&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),s.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:r}=e;o({request:i,component:r})}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=D(n),typeof e<"u"&&(this.controller=Q(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(r){throw Error(r)}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=D(o);typeof i<"u"&&(e.view=Q(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(r){i(new Error(r))}})}hostElements(e){let n=this,o=[];if(y)if(n.shadowed&&typeof n.shadowRoot<"u"&&n.shadowRoot!==null){o=n.shadowRoot.subelements(e);let r=n.container??n.body,a=typeof r<"u"&&r!==null?r.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=_o;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=>!Tn(i,"loaded"))),(typeof n<"u"||n.subcomponents.length<1)&&(n.subcomponents=so(o,n)),n.subcomponents}fail(e){return new Promise((o,i)=>{if(typeof e<"u"){let{error:r,component:a}=e;o({error:r,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(r){if(typeof r.container>"u"&&typeof r.body>"u"){d.warn("COMPONENT {{NAME}} has an undefined container and body".replace("{{NAME}}",r.name));return}let a=typeof r.container>"u"||r.container===null?r.body:r.container,l=r.parsedAssignmentText;if(r.innerHTML=l,r.shadowed){d.debug("COMPONENT {{NAME}} is shadowed".replace("{{NAME}}",r.name)),d.debug("Preparing slots for Shadowed COMPONENT {{NAME}}".replace("{{NAME}}",r.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}}",r.name));let h=ee("div");h.classList.add("shadowHost");try{r.shadowRoot=h.attachShadow({mode:"open"})}catch(f){d.debug(`An error ocurred: ${f}.`);try{d.debug("Shadowed COMPONENT {{NAME}} is repeated".replace("{{NAME}}",r.name)),r.shadowRoot=h.shadowRoot}catch(g){d.debug(`An error ocurred: ${g}.`),d.warn("Shadowed COMPONENT {{NAME}} is not allowed on this browser".replace("{{NAME}}",r.name))}}if(typeof r.shadowRoot<"u"&&r.shadowRoot!==null){r.reload?(d.debug("FORCED RELOADING OF CONTAINER FOR Shadowed COMPONENT {{NAME}}".replace("{{NAME}}",r.name)),h!==null&&h.shadowRoot!==null&&(h.shadowRoot.innerHTML=r.innerHTML)):(u.innerHTML=r.parseTemplate(u.innerHTML),d.debug("ADDING Shadowed COMPONENT {{NAME}} ".replace("{{NAME}}",r.name)),h!==null&&h.shadowRoot!==null&&(h.shadowRoot.innerHTML+=r.innerHTML)),d.debug("ADDING Slots to Shadowed COMPONENT {{NAME}} ".replace("{{NAME}}",r.name)),h.innerHTML+=u.innerHTML,d.debug("APPENDING Shadowed COMPONENT {{NAME}} to Container ".replace("{{NAME}}",r.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}}",r.name)),r.shadowRoot!==null&&h.shadowRoot!==null&&(r.shadowRoot.innerHTML=h.shadowRoot.innerHTML)):a.appendChild(h)}else d.warn("Shadowed COMPONENT {{NAME}} is bad configured".replace("{{NAME}}",r.name))}else r.reload?(d.debug("FORCED RELOADING OF CONTAINER FOR COMPONENT {{NAME}}".replace("{{NAME}}",r.name)),a.innerHTML=r.innerHTML):a&&r?(d.debug("ADDING COMPONENT {{NAME}} ".replace("{{NAME}}",r.name)),a.innerHTML+=r.innerHTML):d.warn("COMPONENT {{NAME}} is not added to the DOM".replace("{{NAME}}",r.name))},"_feedComponent_InBrowser"),o=p(function(r){let a=r.parsedAssignmentText;r.innerHTML=a},"_feedComponent_InNode"),i;return Se(e,"Component")?new Promise((r,a)=>{if(y)try{i=n(e),r(i)}catch(l){a(new Error(l))}else try{i=o(e),r(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")),it(e)&&Se(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 r={request:void 0,component:e};e.__done__().then(function(){typeof e.done=="function"&&e.done.call(e,r).catch(a=>{d.debug(`It was an error while calling done() in ${e.name}: ${a}`)}),o.call(n,r)},function(){i.call(n,r)});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 r={request:void 0,component:e};e.__done__().then(async()=>{typeof e.done=="function"&&await e.done(r),o.call(n,r)},function(){i.call(n,r)});break;case(e.get("tplsource")==="default"&&e.get("templateURI")!==""):e.set("url",e.get("basePath")+e.get("templateURI")),kn(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")),kn(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=fe(e).map(o=>o.name.replace(/bound /g,"")).map(o=>({[o]:e[o].bind(this)})).reduce((o,i)=>Object.assign(o,i),{});return Ee(this,n)}route(){return this.constructor.route()}static route(){let e=this,n,o=!!(it(e)&&Se(e,"Component")),i=p(function(r){let a=[],l=r.filter(function(u){return typeof u<"u"}).map(function(u){if(typeof u.name<"u")a.push(u.name);else throw new Error(Z(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||_n)o&&d.debug("loading routings for instance "+e.name),n=i.call(e,o?e.subcomponents:_n);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&&ns(n.validRoutingWays,n.routingWay||"")&&typeof e<"u"&&(n.innerHTML=e?.innerHTML,n.routingNodes=e?.subelements("routing"),n.routings=[],n.routingNodes.map(i=>{let r=i.getAttributeNames(),a={};return r.map((l,u)=>(a[r[u]]=i.getAttribute(r[u]),l)),n.routings.push(a),n.routingPaths||(n.routingPaths=[]),n.routingPaths.includes(a.path)||n.routingPaths.push(a.path),pe("routingPaths")||yn("routingPaths",[]),pe("routingPaths").includes(a.path)||pe("routingPaths").push(a.path),i})),o()})}parseTemplate(e){let n=this,o,i=e;if(Object.hasOwn(n,"templateHandler")){let r=n.templateHandler;d.debug(`[Component][${this.name}][parseTemplate] Attempting to use ${r} ...`);let a=D(r),l=Q(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&&ns(e.validRoutingWays,e.routingWay||"")&&(e.routingPath=location[e.routingWay],e.routingSelected.map(o=>{let i=Ln({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(r){r.setAttribute("src",r.getAttribute("lazy-src")?.toString()),r.onload=()=>{r.removeAttribute("lazy-src")}},"_lazyLoadImages");if("IntersectionObserver"in window){let r=new IntersectionObserver((a,l)=>{a.forEach(u=>{u.isIntersecting&&(i(u.target),l.unobserve(u.target))})});o.map(function(a){return r.observe(a)})}else o.map(i)}}return null}applyTransitionEffect(e){let n=D(e);if(typeof n>"u")throw Error(`${e} not found.`);typeof n<"u"&&Se(n,"TransitionEffect")?(this.effect=Q(n,{component:this}),this.effect?.apply(this.effect?.defaultParams)):d.debug(`${e} is ${Z(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 r=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;r.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),r=pe("i18n");o!==i&&typeof r=="object"&&Object.hasOwn(r,"messages")&&p(()=>new Promise(function(l){let u=r.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(s,"_Component"),p(s,"Component"),s.shadowed=!1,s.cached=!0,s),k("com.qcobjects",[ze]),fe(D("Component")).map(t=>(M(t),t))}}),Ln,Tn,Yn,lr,so,Or,yo=w({"src/ComponentFactory.ts"(){"use strict";cs(),_e(),fs(),le(),be(),me(),P(),$e(),$(),q(),ps(),Ln=p(({TPL_SOURCE:s,COMPONENTS_BASE_PATH:t,COMPONENT_NAME:e,TPLEXTENSION:n})=>s==="default"?`${t}${e}.${n}`:"","ComponentURI"),Tn=p((s,t)=>{let e=s.getAttribute(t);if(e===null)return!1;let n=e.trim().toLowerCase();return n!=="false"&&n!=="0"},"__booleanAttribute_"),Yn=p((s,t)=>s.getAttribute(t)===null,"__attributeNotSet_"),lr=p((s,t)=>{let e=Yn(s,"shadowed"),n=s.getAttribute("template-source")===null,o=Tn(s,"shadowed"),i=Yn(s,"cached"),r=Tn(s,"cached"),a=typeof v.get("tplextension")<"u"?v.get("tplextension"):"html";a=s.getAttribute("tplextension")!==null?s.getAttribute("tplextension"):a;let l=s.getAttribute("name"),u=s.getAttribute("componentClass")!==null?s.getAttribute("componentClass"):"Component",h=v.get("preserveComponentBodyTag")?l!==null?"com.qcobjects.components."+l+".ComponentBody":"com.qcobjects.components.ComponentBody":u;l=l!==null?l:D(h)&&typeof D(h).name<"u"?D(h).name:"";let f=D(h),g=h!=="Component"&&typeof f<"u"&&typeof f.tplsource=="string"&&f.tplsource!=="",m=n&&g?f.tplsource:n?"default":s.getAttribute("template-source");d.debug(`template source for ${l} is ${m} `),d.debug(`type for ${l} is ${Z(f)} `);let C=Ln({COMPONENTS_BASE_PATH:v.get("componentsBasePath"),COMPONENT_NAME:l,TPLEXTENSION:a,TPL_SOURCE:m});return v.get("preserveComponentBodyTag")&&k(l!==""?"com.qcobjects.components."+l:"com.qcobjects.components",[un("ComponentBody",ze,{name:l,tplsource:m,tplextension:a,reload:!0})]),p(function(){let A=e?f&&f.shadowed||ze.shadowed:o,B=i?(f&&f.cached)??ze.cached:r,ce={__parent__:t,name:l,cached:B,shadowed:A,tplextension:a,body:v.get("preserveComponentBodyTag")?ee("componentBody"):s,templateURI:C,tplsource:m};(typeof l>"u"||l===""||l===null)&&delete ce.name,C===""&&delete ce.templateURI;let xn=Q(f,ce);return v.get("preserveComponentBodyTag")&&typeof xn<"u"&&s.append(xn.body),xn},"__create_component_instance_")()},"_buildComponentFromElement_"),so=p((s,t)=>{let e=[];return y?e=s.map(function(n){return lr(n,t)}):d.debug("[_buildComponentsFromElements_] not implemented for Non-Browser environments"),e},"_buildComponentsFromElements_"),Or=p(s=>{let t=_o,e=s.subelements(t);return so(e,null)},"buildComponents")}}),eo,to,ro,Sr=w({"src/Service.ts"(){"use strict";var s,t,e;qe(),fo(),zn(),U(),P(),$(),ls(),le(),eo=(s=class extends G{constructor(){super(...arguments),this.kind="rest",this.domain=On,this.basePath=ge,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(s,"Service"),p(s,"Service"),s),to=(t=class extends eo{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),ro=(e=class extends to{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 r=he.decrypt(this.JSONresponse?.__encoded__,fn);this.JSONresponse=JSON.parse(r)}let i=this.JSONresponse;Object.keys(i).map(r=>(v.set(r,i[r]),r)),this.configLoaded().catch(r=>{throw new Error(`An error ocurred: ${r}`)})}fail(){this.configLoaded().catch(o=>{throw new Error(`An error ocurred: ${o}`)})}},c(e,"ConfigService"),p(e,"ConfigService"),e),k("com.qcobjects.api",[eo]),k("com.qcobjects.api.services",[to]),k("com.qcobjects.api.config",[ro])}}),bn,gs=w({"src/globalSettings.ts"(){"use strict";var s;le(),U(),P(),$(),q(),bo(),X(),Sr(),bn=(s=class extends G{constructor(){super(...arguments),this._GLOBAL={},this._logger=new oo}static __start__(){return s.instance.__start__()}static get instance(){return typeof s._instance>"u"&&(s._instance=new s),s._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,r){"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"),r.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"),r.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{ms()}catch(i){throw Error(`Something went wrong trying to start components tree: ${i.message}`)}d.debug("Initializing the service worker"),e.call(R).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..."),bs(new ro),Pn.configLoaded=n,Vn(Pn)?.then(i=>{o(i)})?.catch(i=>{throw new Error(`An error ocurred while trying to load ${Pn.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(s,"_GlobalSettings"),p(s,"GlobalSettings"),s),k("com.qcobjects",[bn])}}),Er={};hr(Er,{_top:c(()=>R,"_top"),buildComponentsStack:c(()=>ms,"buildComponentsStack"),componentsStack:c(()=>_n,"componentsStack"),configService:c(()=>Pn,"configService"),get:c(()=>pe,"get"),resetTop:c(()=>io,"resetTop"),set:c(()=>yn,"set"),setConfigService:c(()=>bs,"setConfigService")});var R,_n,io,ms,Pn,bs,yn,pe,ur,X=w({"src/top.ts"(){"use strict";yo(),Ne(),gs(),xe(),P(),R={},R.lastCache=void 0,_n=[],io=p(()=>{let s=bn.instance;R=je(s,R,!0)},"resetTop"),ms=p(()=>{_n=Or(document)},"buildComponentsStack"),bs=p(s=>{R.configService=s,Pn=s},"setConfigService"),yn=p((s,t)=>{R[s]=t},"set"),pe=p((s,t)=>R[s]||t,"get"),io(),ur=p(function(s){Object.hasOwn(s,"PackagesList")||Object.defineProperty(s,"PackagesList",{set:p(t=>{d.debug("PackagesList is readonly")},"set"),get:p(()=>Yo(),"get")}),Object.hasOwn(s,"PackagesNameList")||Object.defineProperty(s,"PackagesNameList",{set:p(t=>{d.debug("PackagesNameList is readonly")},"set"),get:p(()=>Ko(),"get")}),Object.hasOwn(s,"ClassesList")||Object.defineProperty(s,"ClassesList",{set:p(t=>{d.debug("ClassesList is readonly")},"set"),get:p(()=>es(),"get")}),Object.hasOwn(s,"ClassesNameList")||Object.defineProperty(s,"ClassesNameList",{set(t){d.debug("ClassesNameList is readonly")},get:p(()=>mr(),"get")})},"_define_props"),ur(R)}}),dn,_s,xr=w({"src/captureFalseTouch.ts"(){"use strict";if(P(),q(),dn=!1,_s=p(()=>dn?{passive:!0}:!1,"captureFalseTouch"),y)try{let s=Object.defineProperty({},"passive",{get(){return dn=!0,dn}});window.addEventListener("testPassive",null,s),window.removeEventListener("testPassive",null,s)}catch(s){d.debug(`An error ocurred: ${s}.`),dn=!1}else dn=!1}}),jn,ys=w({"src/range.ts"(){"use strict";De(),jn=p((s,t=0,e=1)=>((t===0||typeof t>"u")&&(t=s,s=0),Array.from({length:(t-s)/e+1},function(n,o){return s+o*e})),"range"),M(jn)}}),ws,Nr=w({"src/defaultProcessors.ts"(){"use strict";P(),Sn(),X(),ys(),ws=p(()=>{(function(){let s=p((i,r,a)=>{if(typeof i>"u"||i===null)throw Error(`mapper.${r}.${a} does not have a component instance or it is null.`);let l=pe(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="${r}" ${C} ></quick-component>`}).join(""):d.debug(`${r}.${a} does not have a map property`),g},"mapper");Oe.setProcessor(s);let t=p(function(i,r,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,r)?h[r]:""},"layout");Ce.setProcessor(t);let e=p((i,r,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="${r}" componentClass="${a}" ${h}></component>`},"component");Ce.setProcessor(e);let n=p((i,r,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="${r}" componentClass="${a}" ${h}></quick-component>`},"quick_component");Ce.setProcessor(n);let o=p((i,r,a)=>zn(r).map(function(l){return a.replace("{{index}}",l.toString())}).join(""),"repeat");Ce.setProcessor(o)})()},"setDefaultProcessors")}}),bn,cs=w({"src/findPackageNodePath.ts"(){"use strict";de(),st(),P(),q(),bn=p(function(s){let t=null;if(!y){let e=null;try{let r=Dn("node:fs");r&&typeof r.existsSync=="function"&&(e=r)}catch(r){d.debug(`findPackageNodePath could not load node:fs: ${r}`)}let n=typeof ln<"u"&&Array.isArray(ln.paths)?ln.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(r=>typeof r=="string"&&r!=="undefined");e!==null?(i=i.filter(r=>e.existsSync(r+"/"+s)),i.length>0?(t=i[0],d.info(s+" is Installed.")):(t="",d.info(`${s} is not in a standard path.`))):(t=`${o}/node_modules`,d.debug(`findPackageNodePath could not verify ${s}, assuming ${t}`))}return t},"findPackageNodePath"),S(bn)}}),Vn,ds=w({"src/Import.ts"(){"use strict";je(),de(),_e(),me(),cs(),P(),q(),Se(),Vn=p(function(s,t,e){e!==void 0&&d.debug(`[Import] Setting external=${e.toString()} resource to import: ${s}`),e?d.debug(`[Import] Registering external resource to import: ${s}`):d.debug(`[Import] Registering local resource to import: ${s}`);let n;return y?(n=new Promise(function(o,i){let r=p(function(){let l=!1,u=0;for(let h in J)u++;return u<qn.length?l=!1:l=!0,l},"allPackagesImported"),a=p(function(l){qn.push(t),r()&&qn.map(u=>Ge.push(u)),y&&v.get("removePackageScriptAfterLoading")&&l.target.remove(),o.call(n,{_imported_:l.target,_package_name_:s})},"readyImported");if(!Object.hasOwn(J,s)){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_:s})},l.src=e?v.get("remoteImportsPath")+s+".js":fe+v.get("relativeImportPath")+s+".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 r=bn(s),a="";if(r!==null)a=r+"/"+s;else{let l=bn(s+".js");l!==null?a=l+"/"+s+".js":a=fe+v.get("relativeImportPath")+s}try{o.call(n,{_imported_:Pe(`${a}`),_package_name_:s})}catch(l){i.call(n,{_imported_:null,_package_name_:s,error:l})}}catch(r){i.call(n,{_imported_:null,_package_name_:s,error:r})}}).catch(function(o){d.debug("Something happened when importing "+s),console.warn(o)}),n.catch(function(o){d.warn(T(o))}),n},"Import"),Vn.prototype.toString=function(){return"Import(packagename,ready,external) { [QCObjects native code] }"}}}),W,ls=w({"src/mathFunctions.ts"(){"use strict";W=p(function(s){return isNaN(s)?new Number(0):new Number(s)},"__to_number")}}),us,ir=w({"src/NamespaceRef.ts"(){"use strict";eo(),$(),us=p(function(s){let e=(k(s)||[]).filter(n=>Yn(n)).map(n=>({[n.__definition.__classType]:n})).reduce((n,o)=>Object.assign(n,o));return s.split(".").map(n=>({[n]:e})).reverse().reduce((n,o)=>(o[Object.keys(o).join(".")]=n,o))},"NamespaceRef")}}),He,ps,Hn,ar=w({"src/Ready.ts"(){"use strict";de(),q(),Se(),X(),He=p(s=>{y?Ge.push(s.bind(window)):typeof global<"u"&&Ge.push(s.bind(global))},"Ready"),ps=He,Hn=p(s=>{let t=p(()=>{Ge.map(function(e,n){typeof e=="function"&&(e(),Ge.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(R)},"_Ready")}}),mo,cr,dr=w({"src/ArrayCollection.ts"(){"use strict";var s,t;be(),P(),De(),ls(),mo=(s=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(r,a){return a[n]<r[n]?1:-1}):(function(r,a){return a[n]>r[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(s,"ArrayList"),p(s,"ArrayList"),s),cr=(t=class{constructor(){this.source=Q(mo,[])}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=Q(D("ArrayList"),n);for(let r of Object.keys(o.source))isNaN(r)||(d.debug("binding "+r.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]}})})(r),i++);o.source.length=i,Object.defineProperty(o,"length",{get(){return o.source.length}})}},c(t,"ArrayCollection"),p(t,"ArrayCollection"),t)}}),uo,bo,lr=w({"src/Tag.ts"(){"use strict";var s;be(),De(),$(),q(),dr(),uo=(s=class extends mo{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=D(o)),this.map(function(r){return i.apply.apply(i,[r].concat(n))})}findElements(e){let n=Q(D("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(s,"TagElements"),p(s,"TagElements"),s),bo=p(function(t,e){let n=Q(uo);if(y){let o=document.subelements(t),i=[];for(let r=0;r<o.length;r++)typeof e<"u"&&Object.hasOwn(o[r],"innerHTML")&&(o[r].innerHTML=e),i.indexOf(r)<0&&(n.push(o[r]),i.push(r))}return n},"Tag"),k("com.qcobjects",[uo,bo])}}),hs,ur=w({"src/shortCode.ts"(){"use strict";vo(),hs=p(()=>{let t=pe.encrypt((Math.random()*1e3).toString().replace(".",""),new Date().getTime().toString());return[...pe.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")}}),_o,pr=w({"src/super.ts"(){"use strict";be(),_o=p(function(s,t){return D(s)[t]},"_super_"),_o.prototype.toString=function(){return"_super_(className,classMethodName,params) { [QCObjects native code] }"}}}),fs,hr=w({"src/waitUntil.ts"(){"use strict";P(),fs=p((s,t)=>{let e=p((n,o)=>{let r=0;var a=setInterval(function(){o()?(clearInterval(a),n(),d.debug("Ejecuting "+n.name+" after wait")):r<2e3?(r+=1,d.debug("WAIT UNTIL "+n.name+" is true, "+r.toString()+" cycles")):(d.debug("Max execution time for "+n.name+" expression until true"),clearInterval(a))},1)},"_waitUntil");setTimeout(function(){e(s,t)},1)},"waitUntil")}}),an,fr=w({"src/subelements.ts"(){"use strict";an=p(c(function(t){return[...this.querySelectorAll(t)]},"subelements2"),"subelements")}}),Us,gr,da=w({"src/loadSDK.ts"(){"use strict";de(),cs(),ds(),P(),q(),X(),Us=p(()=>{if(typeof R._sdk_<"u"){d.debug("The SDK is already present in this bundle, skipping the dynamic import");return}v.get("useSDK")&&(function(){let s=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=bn("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),Wo&&typeof Dn<"u"?Pe("qcobjects-sdk")?d.debug("QCObjects SDK was loaded OK."):d.debug("QCObjects SDK could not be imported."):Vn(n,function(){t?d.debug("QCObjects-SDK.js loaded from remote location"):d.debug("QCObjects-SDK.js loaded from local"),v.set("remoteImportsPath",s)},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=Us}}),la=na({"src/MainProcess.ts"(){"use strict";X(),Oo(),sr(),Ee(),Qo(),be(),ts(),No(),es(),de(),_e(),rr(),st(),ds(),Le(),eo(),P(),ls(),ir(),De(),Xn(),$(),q(),ar(),Eo(),lr(),Cn(),to(),ge(),ur(),me(),So(),pr(),hr(),fr(),ns(),da(),is(),p(c((function s(t){if(typeof Object.defineProperty<"u"&&typeof t<"u")try{Object.defineProperty(t,"__qcobjects__",{enumerable:!0,configurable:!1,writable:!1,value:s})}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=an,Document.prototype.subelements=an,HTMLElement.prototype.subelements=an,typeof ShadowRoot<"u"&&(ShadowRoot.prototype.subelements=an)),d.debugEnabled=!1,d.infoEnabled=!0,y&&(Element.prototype.find=function(e){let n=this,o=[],i=document.subelements(e);return i.map((r,a)=>(typeof i[a]<"u"&&i[a].parentNode.tagName===n.parentNode.tagName&&o.push(Oe(r,new Object)),r)),o}),y&&(Element.prototype.append=p(c(function(n){ot(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((r,a)=>{if(typeof document.implementation.createHTMLDocument<"u"){let l=document.implementation.createHTMLDocument("");l.body.innerHTML=a,l.body.subelements("*").map(u=>r.append(u))}},"_appendVDOM");if(typeof this.innerHTML<"u")try{this.innerHTML+=n}catch(r){d.debug(`An error ocurred: ${r}`),i(o,n)}else i(o,n)},"QC_Render"),"QC_Render")),S(fs),S(_o),S(hn),S(D),S(ee),S(hs),S(Z),S(ve),k("com.qcobjects",[dn]),y&&(Element.prototype.Cast=p(c(function(n){return Oe(this,n)},"QC_Cast"),"QC_Cast")),y?(window.onload=Hn,wo&&document.addEventListener("deviceready",Hn,rs)):global.onload=Hn,y&&window.addEventListener("popstate",function(e){e.stopImmediatePropagation(),e.stopPropagation(),Be.route().catch(n=>{throw new Error(`An error ocurred when trying to load initial routes. ${n}`)})}),S(oo),S(Un),S(Wn),S(yn),S(T),S(Yn),S(ot),S(us),Array.prototype.unique=function(){return this.filter(function(e,n,o){return o.indexOf(e)===n})},Array.unique=function(e){return e.unique()},M(Array.unique),M(Array.prototype.unique),Array.prototype.table=function(){console.table(this)},Array.table=function(e){e.table()},M(Array.table),M(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()},M(Array.sum),M(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()},M(Array.avg),M(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()},M(Array.min),M(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()},M(Array.max),M(Array.prototype.max),Array.prototype.sortBy=function(e,n=!0){let o=n?(function(i,r){return r[e]<i[e]?1:-1}):(function(i,r){return r[e]>i[e]?1:-1});return this.sort(o)},Array.sortBy=function(e,n,o=!0){return e.sortBy(n,o)},M(Array.sortBy),M(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)},M(Array.matrix),M(Array.prototype.matrix),Array.prototype.matrix2d=function(e,n=0){let o=p(function(r){return n},"y_func");return Array.from({length:e},p(function(r){return Array.from({length:e},o)},"x_func"))},Array.matrix2d=function(e,n,o=0){return e.matrix2d(n,o)},M(Array.matrix2d),M(Array.prototype.matrix2d),Array.prototype.matrix3d=function(e,n=0){let o=p(function(r){return Array.from({length:e},function(){return n})},"y_func");return Array.from({length:e},p(function(r){return Array.from({length:e},o)},"x_func"))},Array.matrix3d=function(e,n,o=0){return e.matrix3d(n,o)},M(Array.matrix3d),M(Array.prototype.matrix3d),String.prototype.list=function(){let e=this;return zn(0,e.length-1).map(function(n){return e[n]})},M(String.prototype.list),as(),He(function(){typeof t._sdk_<"u"?d.debug("The SDK is already present in this bundle, skipping the dynamic import"):gr(),v.get("useSDK")||fn.__start__().catch(e=>{throw Error(e)})}),S(S),S(Vn),S(k),S(cn),S(Q),S(bo),S(He),S(ps),S(y),S(he),S(fn),y&&pn(function(){He(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 r(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(r,"scrollDispatcher"),p(r,"scrollDispatcher"),document.addEventListener("scroll",function(a){n||(requestAnimationFrame(function(){r(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)?He(function(){n()}):v.get("secureObjects",!1)&&n()})(y))}),"__qcobjects__"),"__qcobjects__")(R)}}),mr={};Ws(mr,{ArrayCollection:c(()=>cr,"ArrayCollection"),ArrayList:c(()=>mo,"ArrayList"),AssignPolyfill:c(()=>ua,"AssignPolyfill"),BackendMicroservice:c(()=>br,"BackendMicroservice"),CONFIG:c(()=>v,"CONFIG"),Class:c(()=>cn,"Class"),ClassFactory:c(()=>D,"ClassFactory"),ComplexStorageCache:c(()=>hn,"ComplexStorageCache"),Component:c(()=>Be,"Component"),ComponentURI:c(()=>Wn,"ComponentURI"),ConfigService:c(()=>fo,"ConfigService"),Controller:c(()=>Cr,"Controller"),DDO:c(()=>xr,"DDO"),DefaultTemplateHandler:c(()=>_r,"DefaultTemplateHandler"),Effect:c(()=>bs,"Effect"),Export:c(()=>S,"Export"),GlobalSettings:c(()=>fn,"GlobalSettings"),Import:c(()=>Vn,"Import"),InheritClass:c(()=>G,"InheritClass"),JSONService:c(()=>lo,"JSONService"),Logger:c(()=>po,"Logger"),NamespaceRef:c(()=>us,"NamespaceRef"),New:c(()=>Q,"New"),ObjectName:c(()=>yn,"ObjectName"),Package:c(()=>k,"Package"),Processor:c(()=>dn,"Processor"),Ready:c(()=>He,"Ready"),RegisterClass:c(()=>gs,"RegisterClass"),RegisterWidget:c(()=>Io,"RegisterWidget"),RegisterWidgets:c(()=>ms,"RegisterWidgets"),Service:c(()=>co,"Service"),SourceCSS:c(()=>wr,"SourceCSS"),SourceJS:c(()=>yr,"SourceJS"),Tag:c(()=>bo,"Tag"),TagElements:c(()=>uo,"TagElements"),Timer:c(()=>Er,"Timer"),Toggle:c(()=>Nr,"Toggle"),TransitionEffect:c(()=>Sr,"TransitionEffect"),VO:c(()=>Or,"VO"),View:c(()=>vr,"View"),_Cast:c(()=>Oe,"_Cast"),_CastProps:c(()=>ke,"_CastProps"),_ComponentWidget_:c(()=>Jn,"_ComponentWidget_"),_Crypt:c(()=>pe,"_Crypt"),_DOMCreateElement:c(()=>ee,"_DOMCreateElement"),_DataStringify:c(()=>T,"_DataStringify"),_LegacyCopy:c(()=>Co,"_LegacyCopy"),_QC_CLASSES:c(()=>Y,"_QC_CLASSES"),_QC_PACKAGES:c(()=>J,"_QC_PACKAGES"),_QC_PACKAGES_IMPORTED:c(()=>qn,"_QC_PACKAGES_IMPORTED"),_QC_READY_LISTENERS:c(()=>Ge,"_QC_READY_LISTENERS"),_Ready:c(()=>Hn,"_Ready"),__attributeNotSet_:c(()=>ao,"__attributeNotSet_"),__booleanAttribute_:c(()=>Fn,"__booleanAttribute_"),__getType__:c(()=>Z,"__getType__"),__instanceID:c(()=>Te,"__instanceID"),__is_raw_class__:c(()=>_n,"__is_raw_class__"),__make_global__:c(()=>Kn,"__make_global__"),__to_number:c(()=>W,"__to_number"),__top__:c(()=>or,"__top__"),_buildComponentsFromElements_:c(()=>ho,"_buildComponentsFromElements_"),_fireAsyncLoad:c(()=>Ko,"_fireAsyncLoad"),_methods_:c(()=>he,"_methods_"),_protected_code_:c(()=>M,"_protected_code_"),_require_:c(()=>Pe,"_require_"),_super_:c(()=>_o,"_super_"),_tag_filter_:c(()=>xo,"_tag_filter_"),_top:c(()=>R,"_top"),asyncLoad:c(()=>pn,"asyncLoad"),captureFalseTouch:c(()=>rs,"captureFalseTouch"),componentLoader:c(()=>Un,"componentLoader"),componentsStack:c(()=>gn,"componentsStack"),findPackageNodePath:c(()=>bn,"findPackageNodePath"),get:c(()=>ue,"get"),getDocumentLayout:c(()=>fa,"getDocumentLayout"),global:c(()=>R,"global"),isBrowser:c(()=>y,"isBrowser"),isNodeCommonJS:c(()=>Wo,"isNodeCommonJS"),isQCObjects_Class:c(()=>Yn,"isQCObjects_Class"),isQCObjects_Object:c(()=>ot,"isQCObjects_Object"),is_a:c(()=>ve,"is_a"),is_phonegap:c(()=>wo,"is_phonegap"),logger:c(()=>d,"logger"),qcobjects:c(()=>pa,"qcobjects"),range:c(()=>zn,"range"),ready:c(()=>ps,"ready"),resetTop:c(()=>go,"resetTop"),serviceLoader:c(()=>oo,"serviceLoader"),set:c(()=>mn,"set"),setDefaultProcessors:c(()=>as,"setDefaultProcessors"),shortCode:c(()=>hs,"shortCode"),subelements:c(()=>an,"subelements"),waitUntil:c(()=>fs,"waitUntil")});ln.exports=sa(mr);var ua={};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 r in i)Object.prototype.hasOwnProperty.call(i,r)&&(n[r]=i[r])}return n},"assign"),"assign"),writable:!0,configurable:!0});X();var pa=oa(la());X();Se();_e();me();Le();P();q();fr();Zn();Jo();Oo();Vo();Xn();ge();to();So();hr();Ee();eo();$();be();st();Qo();U();pr();ur();Cn();De();ar();sr();Eo();es();No();ir();rr();lr();ds();je();_e();no();U();P();$();var Ue,br=(Ue=class extends G{constructor({domain:t=wn,basePath:e=fe,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 r=this;typeof this.body>"u"&&(this.body=null),typeof n<"u"&&(this.body=n),this.cors(),r.stream=o,o?.on("data",u=>{let h=i?.method.toLowerCase(),f={post:r.post.bind(r)};Object.hasOwn(f,h)&&f[h].call(r,u)});let a=i?.method.toLowerCase(),l={get:r.get.bind(r),head:r.head.bind(r),put:r.put.bind(r),delete:r.delete.bind(r),connect:r.connect.bind(r),options:r.options.bind(r),trace:r.trace.bind(r),patch:r.patch.bind(r)};Object.hasOwn(l,a)&&l[a].call(r)}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(r){d.debug(`It was not possible to finish the call to the microservice: ${r}`)}}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: ${T(t)}`),this.done()}get(t){d.debug(`[BackendMicroservice.get] Data received: ${T(t)}`),this.done()}post(t){d.debug(`[BackendMicroservice.post] Data received: ${T(t)}`),this.done()}put(t){d.debug(`[BackendMicroservice.put] Data received: ${T(t)}`),this.done()}delete(t){d.debug(`[BackendMicroservice.delete] Data received: ${T(t)}`),this.done()}connect(t){d.debug(`[BackendMicroservice.connect] Data received: ${T(t)}`),this.done()}options(t){d.debug(`[BackendMicroservice.options] Data received: ${T(t)}`),this.done()}trace(t){d.debug(`[BackendMicroservice.trace] Data received: ${T(t)}`),this.done()}patch(t){d.debug(`[BackendMicroservice.patch] Data received: ${T(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=T(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(Ue,"BackendMicroservice"),p(Ue,"BackendMicroservice"),Ue);k("com.qcobjects.api",[br]);ts();vo();P();Cn();yo();Se();var gs=p(function(s,t){return $n(s,t)},"RegisterClass");Kn(gs);var Me,_r=(Me=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 r=t[i];if(typeof r=="string"||typeof r=="number"||!isNaN(r))try{r=Ce.processObject.bind(n).call(n,r,e.component),o=o.replace(new RegExp(`{{${i}}}`,"g"),r)}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=Ce.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(Me,"DefaultTemplateHandler"),p(Me,"DefaultTemplateHandler"),Me.__definition={},Me);gs(_r,"com.qcobjects");je();Ee();no();me();U();$();P();var We,yr=(We=class extends G{constructor(t){super(t),this.domain=wn,this.basePath=fe,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 Oe(this,t)}_new_(t){this.__new__(t),this.rebuild()}},c(We,"SourceJS"),p(We,"SourceJS"),We);k("com.qcobjects",[yr]);je();Ee();no();me();U();q();$();var ze,wr=(ze=class extends G{constructor(t){super(t),this.domain=wn,this.basePath=fe,this.url="",this.data={},this.async=!1,this.external=!1,this.body=ee("link")}fail(){throw new Error("Method not implemented.")}Cast(t){return Oe(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(ze,"SourceCSS"),p(ze,"SourceCSS"),ze);k("com.qcobjects",[wr]);ns();me();st();Le();q();var Ve,ha=(Ve=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(Ve,"QCObjectsWidgetNode"),p(Ve,"QCObjectsWidgetNode"),Ve),Jn,Je,Qe;y?Jn=(Je=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(r=>{t.hasAttribute(r)&&(n.setAttribute(r,t?.getAttribute(r)),t.removeAttribute(r))}),t.getAttributeNames().filter(function(r){return r.startsWith("data-")}).map(function(r){return r.split("-")[1]}).forEach(function(r){n.setAttribute("data-"+r,t?.getAttribute("data-"+r)),t.removeAttribute("data-"+r)}),[...t.children].forEach(r=>{n.appendChild(r.cloneNode(!0)),r.remove()}),t.parentElement?(t.parentElement?.append(n),t.remove()):t.append(n)}},c(Je,"_ComponentWidget_"),p(Je,"_ComponentWidget_"),Je):Jn=(Qe=class extends ha{constructor(){throw super(),new Error("Class not implemented.")}},c(Qe,"_ComponentWidget_"),p(Qe,"_ComponentWidget_"),Qe);S(Jn);var Io=p(s=>{if(y)customElements.define(s,class extends Jn{});else throw new Error("RegisterWidget is not implemented for non browser ecosystems yet.")},"RegisterWidget"),ms=p((...s)=>{[...s].filter(function(e){return typeof e=="string"}).map(function(e){return Io(e)})},"RegisterWidgets");M(Io);M(ms);S(Io);S(ms);de();be();ge();U();P();De();$();q();var Ze,Cr=(Ze=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(`${Z(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=D(n);typeof o<"u"&&e!==null&&(e.routingController=Q(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(Ze,"Controller"),p(Ze,"Controller"),Ze);k("com.qcobjects.controllers",[Cr]);ge();U();$();var Xe,vr=(Xe=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(`${Z(this)} must be called with a component`)}},c(Xe,"View"),p(Xe,"View"),Xe);k("com.qcobjects.views",[vr]);nr();U();$();var Ke,Or=(Ke=class extends G{},c(Ke,"VO"),p(Ke,"VO"),Ke);k("com.qcobjects.valueObjects",[Or]);U();$();Le();be();var Re,bs=(Re=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){Re.prototype.animate.call({},t)}animate({timing:t,draw:e,duration:n}){let o=this,i=performance.now();requestAnimationFrame(p(c(function r(a){let l=(a-i)/n;l>1&&(l=1);let u=t(l);e(Math.round(u*100)),l<1?requestAnimationFrame(r):typeof o<"u"&&o!==null&&Object.hasOwn(o,"done")&&(typeof o.done).toLowerCase()==="function"&&o.done.call(o)},"animate"),"animate"))}},c(Re,"_Effect"),p(Re,"Effect"),Re);k("com.qcobjects.effects.base",[bs]);he(D("Effect")).map(s=>(M(s),s));P();$();be();var Ye,Sr=(Ye=class extends bs{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:r,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=D(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 ce=new m({});typeof ce.apply=="function"&&(b=ce.apply.bind(ce),O=ce)}catch(ce){d.debug(`Transition effect ${g} could not be instantiated: ${ce}`)}if(typeof b!="function")return d.debug(`Transition effect ${g} does not declare an apply() method`),g;let I=u.component.shadowed?h.host:h,B={alphaFrom:t,alphaTo:e,angleFrom:n,angleTo:o,radiusFrom:i,radiusTo:r,scaleFrom:a,scaleTo:l};return b.call(O,I,...Object.values(B)),g}))}},c(Ye,"TransitionEffect"),p(Ye,"TransitionEffect"),Ye);k("com.qcobjects.effects.transitions.base",[Sr]);U();$();var et,Er=(et=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 r(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(r)},"thread"),"thread"))}},c(et,"Timer"),p(et,"Timer"),et);k("com.qcobjects.timing",[Er]);Yo();is();dr();st();U();P();Xn();var tt,xr=(tt=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:r,fget:n,fset:o}){var r=typeof r>"u"?yn(this):r;Object.defineProperty(t,r,{set(a){let l=a;d.debug("value changed "+r);let u;typeof o<"u"&&typeof o=="function"?u=o(l):u=l,t["_"+r]=u},get(){let a=t["_"+r];d.debug("returning value "+r);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(tt,"DDO"),p(tt,"DDO"),tt);S(xr);U();P();$();var nt,Nr=(nt=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(nt,"Toggle"),p(nt,"Toggle"),nt);k("com.qcobjects.tools.essentials",[Nr]);cs();var fa=p(function(){let s=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[s(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");ls();X();yo();X()});var Ar=ne(Ir=>{"use strict";Object.defineProperty(Ir,"__esModule",{value:!0});var re=x();re.CONFIG.set("sourceType","module");re.CONFIG.set("relativeImportPath","js/packages/");re.CONFIG.set("componentsBasePath","templates/components/");re.CONFIG.set("delayForReady",1);re.CONFIG.set("preserveComponentBodyTag",!1);re.CONFIG.set("useConfigService",!1);re.CONFIG.set("routingWay","pathname");re.CONFIG.set("useLocalSDK",!0);re.CONFIG.set("tplextension","tpl.html");re.CONFIG.set("asynchronousImportsLoad",!0);re.CONFIG.set("serviceWorkerURI","/sw.js");re.CONFIG.set("overrideComponentTag",!0);re.Component.cached=!0});var As=ne((ka,Oi)=>{"use strict";var Mo=Object.defineProperty,ga=Object.getOwnPropertyDescriptor,ma=Object.getOwnPropertyNames,ba=Object.prototype.hasOwnProperty,_=c((s,t)=>Mo(s,"name",{value:t,configurable:!0}),"__name"),_a=c((s,t)=>{for(var e in t)Mo(s,e,{get:t[e],enumerable:!0})},"__export"),ya=c((s,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of ma(t))!ba.call(s,o)&&o!==e&&Mo(s,o,{get:c(()=>t[o],"get"),enumerable:!(n=ga(t,o))||n.enumerable});return s},"__copyProps"),wa=c(s=>ya(Mo({},"__esModule",{value:!0}),s),"__toCommonJS"),Tr={};_a(Tr,{BasicLayout:c(()=>Ci,"BasicLayout"),ButtonField:c(()=>Ur,"ButtonField"),CanvasTool:c(()=>wi,"CanvasTool"),Contact:c(()=>Mr,"Contact"),CubeSplashScreenComponent:c(()=>ri,"CubeSplashScreenComponent"),DataGridController:c(()=>li,"DataGridController"),EmailField:c(()=>Vr,"EmailField"),Fade:c(()=>Ie,"Fade"),FormController:c(()=>hi,"FormController"),FormField:c(()=>sn,"FormField"),FormValidations:c(()=>pi,"FormValidations"),GenericController:c(()=>ai,"GenericController"),GridComponent:c(()=>Xr,"GridComponent"),GridController:c(()=>di,"GridController"),GridItemComponent:c(()=>Zr,"GridItemComponent"),GridView:c(()=>_i,"GridView"),InputField:c(()=>Wr,"InputField"),ListComponent:c(()=>Yr,"ListComponent"),ListController:c(()=>ci,"ListController"),ListItemComponent:c(()=>Kr,"ListItemComponent"),ModalComponent:c(()=>xs,"ModalComponent"),ModalController:c(()=>mi,"ModalController"),ModalEnclosureComponent:c(()=>Jr,"ModalEnclosureComponent"),ModalFade:c(()=>To,"ModalFade"),ModalMoveDown:c(()=>Es,"ModalMoveDown"),ModalMoveUp:c(()=>Ss,"ModalMoveUp"),Move:c(()=>se,"Move"),MoveXInFromLeft:c(()=>Cs,"MoveXInFromLeft"),MoveXInFromRight:c(()=>ws,"MoveXInFromRight"),MoveYInFromBottom:c(()=>vs,"MoveYInFromBottom"),MoveYInFromTop:c(()=>Rr,"MoveYInFromTop"),NotificationComponent:c(()=>oi,"NotificationComponent"),Radius:c(()=>qr,"Radius"),Resize:c(()=>Os,"Resize"),Rotate:c(()=>Dr,"Rotate"),RotateX:c(()=>kr,"RotateX"),RotateY:c(()=>Lr,"RotateY"),RotateZ:c(()=>jr,"RotateZ"),SessionData:c(()=>vi,"SessionData"),SessionUserToken:c(()=>Po,"SessionUserToken"),ShadowedComponent:c(()=>Br,"ShadowedComponent"),SlideItemComponent:c(()=>ti,"SlideItemComponent"),SlideListComponent:c(()=>ei,"SlideListComponent"),SliderComponent:c(()=>ni,"SliderComponent"),SliderController:c(()=>ui,"SliderController"),SplashScreenComponent:c(()=>so,"SplashScreenComponent"),SwaggerUIComponent:c(()=>Qr,"SwaggerUIComponent"),SwaggerUIController:c(()=>fi,"SwaggerUIController"),TextField:c(()=>zr,"TextField"),VideoSplashScreenComponent:c(()=>si,"VideoSplashScreenComponent"),WipeDown:c(()=>Hr,"WipeDown"),WipeLeft:c(()=>$r,"WipeLeft"),WipeRight:c(()=>Fr,"WipeRight"),WipeUp:c(()=>Gr,"WipeUp"),default:c(()=>va,"default"),i18n_messages:c(()=>ys,"i18n_messages")});Oi.exports=wa(Tr);var Ao=x(),ye=x(),rt,ys=(rt=class extends ye.InheritClass{constructor({messages:t=[]}){super({messages:t}),ye.CONFIG.get("use_i18n",!1)&&(ye.CONFIG.set("lang","en"),(0,ye.get)("i18n")?(0,ye.set)("i18n",{messages:(0,ye.get)("i18n").messages.concat(t)}):(0,ye.set)("i18n",{messages:t}))}_load_i18n_packages_(){return ye.CONFIG.get("i18n_languages",[]).map(t=>{(0,ye.Import)(`org.quickcorp.i18n_messages.${t}`)})}},c(rt,"i18n_messages"),_(rt,"i18n_messages"),rt);(0,ye.Package)("org.qcobjects.i18n_messages",[ys]);new ys({})._load_i18n_packages_();var Pr=x(),it,Mr=(it=class extends Pr.VO{},c(it,"Contact"),_(it,"Contact"),it);(0,Pr.Package)("org.qcobjects.models",[Mr]);var F=x(),Ne=x(),at,Ie=(at=class extends Ne.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){Ne.logger.debug("animation progress: "+i.toString());let r=e+i*o/100;Ne.logger.debug("alpha: "+r.toString()),t.style.opacity=r.toString()}})}static apply(t,e,n){let o=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){Ne.logger.debug("animation progress: "+i.toString());let r=e+i*o/100;Ne.logger.debug("alpha: "+r.toString()),t.style.opacity=r.toString()}})}},c(at,"Fade"),_(at,"Fade"),at),ct,se=(ct=class extends Ne.Effect{constructor(){super(...arguments),this.duration=1e3}static apply(t,e,n,o,i){let r=o-e,a=i-n;t.style.transform="translate("+e+"px,"+n+"px)",super.animate({duration:this.duration,timing(l){return l},draw(l){Ne.logger.debug("animation progress: "+l.toString());let u=n+l*a/100,h=e+l*r/100;Ne.logger.debug("x: "+h.toString()+" y:"+u.toString()),t.style.transform="translate("+h+"px,"+u+"px)"}})}},c(ct,"Move"),_(ct,"Move"),ct);(0,Ne.Package)("org.qcobjects.effects.base",[Ie,se]);var A=x(),dt,ws=(dt=class extends se{constructor(){super(...arguments),this.duration=1e3}static apply(t){se.apply.call(this,t,t.width,0,0,0)}},c(dt,"MoveXInFromRight"),_(dt,"MoveXInFromRight"),dt),lt,Cs=(lt=class extends se{constructor(){super(...arguments),this.duration=1e3}static apply(t){se.apply.call(this,t,-t.width,0,0,0)}},c(lt,"MoveXInFromLeft"),_(lt,"MoveXInFromLeft"),lt),ut,vs=(ut=class extends se{constructor(){super(...arguments),this.duration=1e3}static apply(t){se.apply.call(this,t,0,t.height,0,0)}},c(ut,"MoveYInFromBottom"),_(ut,"MoveYInFromBottom"),ut),pt,Rr=(pt=class extends se{constructor(){super(...arguments),this.duration=1e3}static apply(t){se.apply.call(this,t,0,-t.height,0,0)}},c(pt,"MoveYInFromTop"),_(pt,"MoveYInFromTop"),pt),ht,kr=(ht=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 r=Math.round(e+i*o/100);A.logger.debug("angle: "+r.toString()),t.style.transform="rotate3d(1,0,0,"+r.toString()+"deg)"}})}},c(ht,"RotateX"),_(ht,"RotateX"),ht),ft,Lr=(ft=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 r=Math.round(e+i*o/100);A.logger.debug("angle: "+r.toString()),t.style.transform="rotate3d(0,1,0,"+r.toString()+"deg)"}})}},c(ft,"RotateY"),_(ft,"RotateY"),ft),gt,jr=(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 r=Math.round(e+i*o/100);A.logger.debug("angle: "+r.toString()),t.style.transform="rotate3d(0,0,1,"+r.toString()+"deg)"}})}},c(gt,"RotateZ"),_(gt,"RotateZ"),gt),mt,Dr=(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 r=Math.round(e+i*o/100);A.logger.debug("angle: "+r.toString()),t.style.transform="rotate3d(1,1,1,"+r.toString()+"deg)"}})}},c(mt,"Rotate"),_(mt,"Rotate"),mt),bt,qr=(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 r=e+i*o/100;A.logger.debug("radius: "+r.toString()),t.style.borderRadius=r.toString()+"px"}})}},c(bt,"Radius"),_(bt,"Radius"),bt),_t,Os=(_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 r=e+i*o/100;A.logger.debug("resize: "+r.toString()),t.style.transformOrigin="center",t.style.transform="scale("+r+","+r+")"}})}},c(_t,"Resize"),_(_t,"Resize"),_t),yt,$r=(yt=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 r=e+i*o/100;A.logger.debug("wipe: "+r.toString()),t.style.transformOrigin="right",t.style.transform="scaleX("+r+")"}})}},c(yt,"WipeLeft"),_(yt,"WipeLeft"),yt),wt,Fr=(wt=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 r=e+i*o/100;A.logger.debug("wipe: "+r.toString()),t.style.transformOrigin="left",t.style.transform="scaleX("+r+")"}})}},c(wt,"WipeRight"),_(wt,"WipeRight"),wt),Ct,Gr=(Ct=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 r=e+i*o/100;A.logger.debug("wipe: "+r.toString()),t.style.transformOrigin="bottom",t.style.transform="scaleY("+r+")"}})}},c(Ct,"WipeUp"),_(Ct,"WipeUp"),Ct),vt,Hr=(vt=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 r=e+i*o/100;A.logger.debug("wipe: "+r.toString()),t.style.transformOrigin="top",t.style.transform="scaleY("+r+")"}})}},c(vt,"WipeDown"),_(vt,"WipeDown"),vt);(0,A.Package)("org.qcobjects.effects.extended",[ws,Cs,vs,Rr,kr,Lr,jr,Dr,qr,Os,$r,Fr,Gr,Hr]);var Ca=x(),Ot,To=(Ot=class extends Ie{constructor(){super(...arguments),this.duration=500}},c(Ot,"ModalFade"),_(Ot,"ModalFade"),Ot),St,Ss=(St=class extends se{constructor(){super(...arguments),this.duration=800}},c(St,"ModalMoveUp"),_(St,"ModalMoveUp"),St),Et,Es=(Et=class extends se{constructor(){super(...arguments),this.duration=300}},c(Et,"ModalMoveDown"),_(Et,"ModalMoveDown"),Et);(0,Ca.Package)("org.qcobjects.modal.effects",[To,Es,Ss]);var xe=x(),xt,sn=(xt=class extends xe.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",()=>{xe.logger.debug("Executing change event binding"),this.executeBindings()}),n.addEventListener("blur",()=>{xe.logger.debug("Executing change event binding"),this.executeBindings()}),n.addEventListener("focus",()=>{xe.logger.debug("Executing change event binding"),this.executeBindings()}),n.addEventListener("keydown",()=>{xe.logger.debug("Executing keydown event binding"),this.executeBindings()})}}executeBinding(t){let e=t.getAttribute("data-field");xe.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");xe.logger.debug("Binding "+o+" for "+this.name),this.data[o]=n.value}}done(t){let e=super.done(t);return this.executeBindings(),this.createBindingEvents(),xe.logger.debug("Field loaded: "+this.fieldType+"[name="+this.name+"]"),e}},c(xt,"FormField"),_(xt,"FormField"),xt);(0,xe.Package)("org.qcobjects.base.components",[sn]);var Nt,Br=(Nt=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(Nt,"ShadowedComponent"),_(Nt,"ShadowedComponent"),Nt),It,Ur=(It=class extends sn{constructor(t){t.fieldType="button",super(t)}},c(It,"ButtonField"),_(It,"ButtonField"),It),At,Wr=(At=class extends sn{constructor(t){t.fieldType="input",super(t)}},c(At,"InputField"),_(At,"InputField"),At),Tt,zr=(Tt=class extends sn{constructor(t){t.fieldType="textarea",super(t)}},c(Tt,"TextField"),_(Tt,"TextField"),Tt),Pt,Vr=(Pt=class extends sn{constructor(t){t.fieldType="input",super(t)}},c(Pt,"EmailField"),_(Pt,"EmailField"),Pt),Mt,Jr=(Mt=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,r)?h[r]:""},"layout");Oe.setProcessor(t);let e=p((i,r,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="${r}" componentClass="${a}" ${h}></component>`},"component");Oe.setProcessor(e);let n=p((i,r,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="${r}" componentClass="${a}" ${h}></quick-component>`},"quick_component");Oe.setProcessor(n);let o=p((i,r,a)=>jn(r).map(function(l){return a.replace("{{index}}",l.toString())}).join(""),"repeat");Oe.setProcessor(o)})()},"setDefaultProcessors")}}),wn,Cs=w({"src/findPackageNodePath.ts"(){"use strict";le(),at(),P(),q(),wn=p(function(s){let t=null;if(!y){let e=null;try{let r=Nn("node:fs");r&&typeof r.existsSync=="function"&&(e=r)}catch(r){d.debug(`findPackageNodePath could not load node:fs: ${r}`)}let n=typeof hn<"u"&&Array.isArray(hn.paths)?hn.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(r=>typeof r=="string"&&r!=="undefined");e!==null?(i=i.filter(r=>e.existsSync(r+"/"+s)),i.length>0?(t=i[0],d.info(s+" is Installed.")):(t="",d.info(`${s} is not in a standard path.`))):(t=`${o}/node_modules`,d.debug(`findPackageNodePath could not verify ${s}, assuming ${t}`))}return t},"findPackageNodePath"),S(wn)}}),Dn,vs=w({"src/Import.ts"(){"use strict";qe(),le(),ye(),be(),Cs(),P(),q(),xe(),Dn=p(function(s,t,e){e!==void 0&&d.debug(`[Import] Setting external=${e.toString()} resource to import: ${s}`),e?d.debug(`[Import] Registering external resource to import: ${s}`):d.debug(`[Import] Registering local resource to import: ${s}`);let n;return y?(n=new Promise(function(o,i){let r=p(function(){let l=!1,u=0;for(let h in J)u++;return u<An.length?l=!1:l=!0,l},"allPackagesImported"),a=p(function(l){An.push(t),r()&&An.map(u=>Ue.push(u)),y&&v.get("removePackageScriptAfterLoading")&&l.target.remove(),o.call(n,{_imported_:l.target,_package_name_:s})},"readyImported");if(!Object.hasOwn(J,s)){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_:s})},l.src=e?v.get("remoteImportsPath")+s+".js":ge+v.get("relativeImportPath")+s+".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 r=wn(s),a="";if(r!==null)a=r+"/"+s;else{let l=wn(s+".js");l!==null?a=l+"/"+s+".js":a=ge+v.get("relativeImportPath")+s}try{o.call(n,{_imported_:Re(`${a}`),_package_name_:s})}catch(l){i.call(n,{_imported_:null,_package_name_:s,error:l})}}catch(r){i.call(n,{_imported_:null,_package_name_:s,error:r})}}).catch(function(o){d.debug("Something happened when importing "+s),console.warn(o)}),n.catch(function(o){d.warn(T(o))}),n},"Import"),Dn.prototype.toString=function(){return"Import(packagename,ready,external) { [QCObjects native code] }"}}}),W,Os=w({"src/mathFunctions.ts"(){"use strict";W=p(function(s){return isNaN(s)?new Number(0):new Number(s)},"__to_number")}}),Ss,Ar=w({"src/NamespaceRef.ts"(){"use strict";Un(),$(),Ss=p(function(s){let e=(k(s)||[]).filter(n=>Bn(n)).map(n=>({[n.__definition.__classType]:n})).reduce((n,o)=>Object.assign(n,o));return s.split(".").map(n=>({[n]:e})).reverse().reduce((n,o)=>(o[Object.keys(o).join(".")]=n,o))},"NamespaceRef")}}),We,Es,Mn,Ir=w({"src/Ready.ts"(){"use strict";le(),q(),xe(),X(),We=p(s=>{y?Ue.push(s.bind(window)):typeof global<"u"&&Ue.push(s.bind(global))},"Ready"),Es=We,Mn=p(s=>{let t=p(()=>{Ue.map(function(e,n){typeof e=="function"&&(e(),Ue.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(R)},"_Ready")}}),ao,Tr,Pr=w({"src/ArrayCollection.ts"(){"use strict";var s,t;_e(),P(),$e(),Os(),ao=(s=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(r,a){return a[n]<r[n]?1:-1}):(function(r,a){return a[n]>r[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(s,"ArrayList"),p(s,"ArrayList"),s),Tr=(t=class{constructor(){this.source=Q(ao,[])}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=Q(D("ArrayList"),n);for(let r of Object.keys(o.source))isNaN(r)||(d.debug("binding "+r.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]}})})(r),i++);o.source.length=i,Object.defineProperty(o,"length",{get(){return o.source.length}})}},c(t,"ArrayCollection"),p(t,"ArrayCollection"),t)}}),no,co,Mr=w({"src/Tag.ts"(){"use strict";var s;_e(),$e(),$(),q(),Pr(),no=(s=class extends ao{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=D(o)),this.map(function(r){return i.apply.apply(i,[r].concat(n))})}findElements(e){let n=Q(D("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(s,"TagElements"),p(s,"TagElements"),s),co=p(function(t,e){let n=Q(no);if(y){let o=document.subelements(t),i=[];for(let r=0;r<o.length;r++)typeof e<"u"&&Object.hasOwn(o[r],"innerHTML")&&(o[r].innerHTML=e),i.indexOf(r)<0&&(n.push(o[r]),i.push(r))}return n},"Tag"),k("com.qcobjects",[no,co])}}),xs,Rr=w({"src/shortCode.ts"(){"use strict";fo(),xs=p(()=>{let t=he.encrypt((Math.random()*1e3).toString().replace(".",""),new Date().getTime().toString());return[...he.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")}}),lo,kr=w({"src/super.ts"(){"use strict";_e(),lo=p(function(s,t){return D(s)[t]},"_super_"),lo.prototype.toString=function(){return"_super_(className,classMethodName,params) { [QCObjects native code] }"}}}),Ns,Lr=w({"src/waitUntil.ts"(){"use strict";P(),Ns=p((s,t)=>{let e=p((n,o)=>{let r=0;var a=setInterval(function(){o()?(clearInterval(a),n(),d.debug("Ejecuting "+n.name+" after wait")):r<2e3?(r+=1,d.debug("WAIT UNTIL "+n.name+" is true, "+r.toString()+" cycles")):(d.debug("Max execution time for "+n.name+" expression until true"),clearInterval(a))},1)},"_waitUntil");setTimeout(function(){e(s,t)},1)},"waitUntil")}}),ln,jr=w({"src/subelements.ts"(){"use strict";ln=p(c(function(t){return[...this.querySelectorAll(t)]},"subelements2"),"subelements")}}),pr,Dr,Oa=w({"src/loadSDK.ts"(){"use strict";le(),Cs(),vs(),P(),q(),X(),pr=p(()=>{if(typeof R._sdk_<"u"){d.debug("The SDK is already present in this bundle, skipping the dynamic import");return}v.get("useSDK")&&(function(){let s=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=wn("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),ss&&typeof Nn<"u"?Re("qcobjects-sdk")?d.debug("QCObjects SDK was loaded OK."):d.debug("QCObjects SDK could not be imported."):Dn(n,function(){t?d.debug("QCObjects-SDK.js loaded from remote location"):d.debug("QCObjects-SDK.js loaded from local"),v.set("remoteImportsPath",s)},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"),Dr=pr}}),Sa=ma({"src/MainProcess.ts"(){"use strict";X(),go(),xr(),Ne(),cs(),_e(),fs(),yo(),hs(),le(),ye(),Nr(),at(),vs(),De(),Un(),P(),Os(),Ar(),$e(),Gn(),$(),q(),Ir(),bo(),Mr(),Sn(),Wn(),me(),Rr(),be(),mo(),kr(),Lr(),jr(),gs(),Oa(),ys(),p(c((function s(t){if(typeof Object.defineProperty<"u"&&typeof t<"u")try{Object.defineProperty(t,"__qcobjects__",{enumerable:!0,configurable:!1,writable:!1,value:s})}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=ln,Document.prototype.subelements=ln,HTMLElement.prototype.subelements=ln,typeof ShadowRoot<"u"&&(ShadowRoot.prototype.subelements=ln)),d.debugEnabled=!1,d.infoEnabled=!0,y&&(Element.prototype.find=function(e){let n=this,o=[],i=document.subelements(e);return i.map((r,a)=>(typeof i[a]<"u"&&i[a].parentNode.tagName===n.parentNode.tagName&&o.push(Ee(r,new Object)),r)),o}),y&&(Element.prototype.append=p(c(function(n){it(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((r,a)=>{if(typeof document.implementation.createHTMLDocument<"u"){let l=document.implementation.createHTMLDocument("");l.body.innerHTML=a,l.body.subelements("*").map(u=>r.append(u))}},"_appendVDOM");if(typeof this.innerHTML<"u")try{this.innerHTML+=n}catch(r){d.debug(`An error ocurred: ${r}`),i(o,n)}else i(o,n)},"QC_Render"),"QC_Render")),S(Ns),S(lo),S(mn),S(D),S(ee),S(xs),S(Z),S(Se),k("com.qcobjects",[pn]),y&&(Element.prototype.Cast=p(c(function(n){return Ee(this,n)},"QC_Cast"),"QC_Cast")),y?(window.onload=Mn,po&&document.addEventListener("deviceready",Mn,_s)):global.onload=Mn,y&&window.addEventListener("popstate",function(e){e.stopImmediatePropagation(),e.stopPropagation(),ze.route().catch(n=>{throw new Error(`An error ocurred when trying to load initial routes. ${n}`)})}),S(Vn),S(kn),S(Ln),S(vn),S(T),S(Bn),S(it),S(Ss),Array.prototype.unique=function(){return this.filter(function(e,n,o){return o.indexOf(e)===n})},Array.unique=function(e){return e.unique()},M(Array.unique),M(Array.prototype.unique),Array.prototype.table=function(){console.table(this)},Array.table=function(e){e.table()},M(Array.table),M(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()},M(Array.sum),M(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()},M(Array.avg),M(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()},M(Array.min),M(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()},M(Array.max),M(Array.prototype.max),Array.prototype.sortBy=function(e,n=!0){let o=n?(function(i,r){return r[e]<i[e]?1:-1}):(function(i,r){return r[e]>i[e]?1:-1});return this.sort(o)},Array.sortBy=function(e,n,o=!0){return e.sortBy(n,o)},M(Array.sortBy),M(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)},M(Array.matrix),M(Array.prototype.matrix),Array.prototype.matrix2d=function(e,n=0){let o=p(function(r){return n},"y_func");return Array.from({length:e},p(function(r){return Array.from({length:e},o)},"x_func"))},Array.matrix2d=function(e,n,o=0){return e.matrix2d(n,o)},M(Array.matrix2d),M(Array.prototype.matrix2d),Array.prototype.matrix3d=function(e,n=0){let o=p(function(r){return Array.from({length:e},function(){return n})},"y_func");return Array.from({length:e},p(function(r){return Array.from({length:e},o)},"x_func"))},Array.matrix3d=function(e,n,o=0){return e.matrix3d(n,o)},M(Array.matrix3d),M(Array.prototype.matrix3d),String.prototype.list=function(){let e=this;return jn(0,e.length-1).map(function(n){return e[n]})},M(String.prototype.list),ws(),We(function(){typeof t._sdk_<"u"?d.debug("The SDK is already present in this bundle, skipping the dynamic import"):Dr(),v.get("useSDK")||bn.__start__().catch(e=>{throw Error(e)})}),S(S),S(Dn),S(k),S(un),S(Q),S(co),S(We),S(Es),S(y),S(fe),S(bn),y&&gn(function(){We(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 r(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(r,"scrollDispatcher"),p(r,"scrollDispatcher"),document.addEventListener("scroll",function(a){n||(requestAnimationFrame(function(){r(a),n=!1}),n=!0)})})(t)})},[]),y||(typeof t._fireAsyncLoad<"u"&&us.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)?We(function(){n()}):v.get("secureObjects",!1)&&n()})(y))}),"__qcobjects__"),"__qcobjects__")(R)}}),qr={};hr(qr,{ArrayCollection:c(()=>Tr,"ArrayCollection"),ArrayList:c(()=>ao,"ArrayList"),AssignPolyfill:c(()=>Ea,"AssignPolyfill"),BackendMicroservice:c(()=>$r,"BackendMicroservice"),CONFIG:c(()=>v,"CONFIG"),Class:c(()=>un,"Class"),ClassFactory:c(()=>D,"ClassFactory"),ComplexStorageCache:c(()=>mn,"ComplexStorageCache"),Component:c(()=>ze,"Component"),ComponentURI:c(()=>Ln,"ComponentURI"),ConfigService:c(()=>ro,"ConfigService"),Controller:c(()=>Br,"Controller"),DDO:c(()=>Jr,"DDO"),DefaultTemplateHandler:c(()=>Fr,"DefaultTemplateHandler"),Effect:c(()=>Ts,"Effect"),Export:c(()=>S,"Export"),GlobalSettings:c(()=>bn,"GlobalSettings"),Import:c(()=>Dn,"Import"),InheritClass:c(()=>G,"InheritClass"),JSONService:c(()=>to,"JSONService"),Logger:c(()=>oo,"Logger"),NamespaceRef:c(()=>Ss,"NamespaceRef"),New:c(()=>Q,"New"),ObjectName:c(()=>vn,"ObjectName"),Package:c(()=>k,"Package"),Processor:c(()=>pn,"Processor"),Ready:c(()=>We,"Ready"),RegisterClass:c(()=>As,"RegisterClass"),RegisterWidget:c(()=>wo,"RegisterWidget"),RegisterWidgets:c(()=>Is,"RegisterWidgets"),Service:c(()=>eo,"Service"),SourceCSS:c(()=>Hr,"SourceCSS"),SourceJS:c(()=>Gr,"SourceJS"),Tag:c(()=>co,"Tag"),TagElements:c(()=>no,"TagElements"),Timer:c(()=>Vr,"Timer"),Toggle:c(()=>Qr,"Toggle"),TransitionEffect:c(()=>zr,"TransitionEffect"),VO:c(()=>Wr,"VO"),View:c(()=>Ur,"View"),_Cast:c(()=>Ee,"_Cast"),_CastProps:c(()=>je,"_CastProps"),_ComponentWidget_:c(()=>qn,"_ComponentWidget_"),_Crypt:c(()=>he,"_Crypt"),_DOMCreateElement:c(()=>ee,"_DOMCreateElement"),_DataStringify:c(()=>T,"_DataStringify"),_LegacyCopy:c(()=>ho,"_LegacyCopy"),_QC_CLASSES:c(()=>Y,"_QC_CLASSES"),_QC_PACKAGES:c(()=>J,"_QC_PACKAGES"),_QC_PACKAGES_IMPORTED:c(()=>An,"_QC_PACKAGES_IMPORTED"),_QC_READY_LISTENERS:c(()=>Ue,"_QC_READY_LISTENERS"),_Ready:c(()=>Mn,"_Ready"),__attributeNotSet_:c(()=>Yn,"__attributeNotSet_"),__booleanAttribute_:c(()=>Tn,"__booleanAttribute_"),__getType__:c(()=>Z,"__getType__"),__instanceID:c(()=>Me,"__instanceID"),__is_raw_class__:c(()=>Cn,"__is_raw_class__"),__make_global__:c(()=>Hn,"__make_global__"),__to_number:c(()=>W,"__to_number"),__top__:c(()=>Er,"__top__"),_buildComponentsFromElements_:c(()=>so,"_buildComponentsFromElements_"),_fireAsyncLoad:c(()=>us,"_fireAsyncLoad"),_methods_:c(()=>fe,"_methods_"),_protected_code_:c(()=>M,"_protected_code_"),_require_:c(()=>Re,"_require_"),_super_:c(()=>lo,"_super_"),_tag_filter_:c(()=>_o,"_tag_filter_"),_top:c(()=>R,"_top"),asyncLoad:c(()=>gn,"asyncLoad"),captureFalseTouch:c(()=>_s,"captureFalseTouch"),componentLoader:c(()=>kn,"componentLoader"),componentsStack:c(()=>_n,"componentsStack"),findPackageNodePath:c(()=>wn,"findPackageNodePath"),get:c(()=>pe,"get"),getDocumentLayout:c(()=>Aa,"getDocumentLayout"),global:c(()=>R,"global"),isBrowser:c(()=>y,"isBrowser"),isNodeCommonJS:c(()=>ss,"isNodeCommonJS"),isQCObjects_Class:c(()=>Bn,"isQCObjects_Class"),isQCObjects_Object:c(()=>it,"isQCObjects_Object"),is_a:c(()=>Se,"is_a"),is_phonegap:c(()=>po,"is_phonegap"),logger:c(()=>d,"logger"),qcobjects:c(()=>xa,"qcobjects"),range:c(()=>jn,"range"),ready:c(()=>Es,"ready"),resetTop:c(()=>io,"resetTop"),serviceLoader:c(()=>Vn,"serviceLoader"),set:c(()=>yn,"set"),setDefaultProcessors:c(()=>ws,"setDefaultProcessors"),shortCode:c(()=>xs,"shortCode"),subelements:c(()=>ln,"subelements"),waitUntil:c(()=>Ns,"waitUntil")});hn.exports=_a(qr);var Ea={};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 r in i)Object.prototype.hasOwnProperty.call(i,r)&&(n[r]=i[r])}return n},"assign"),"assign"),writable:!0,configurable:!0});X();var xa=ba(Sa());X();xe();ye();be();De();P();q();jr();Fn();as();go();is();Gn();me();Wn();mo();Lr();Ne();Un();$();_e();at();cs();U();kr();Rr();Sn();$e();Ir();xr();bo();hs();yo();Ar();Nr();Mr();vs();qe();ye();zn();U();P();$();var Ve,$r=(Ve=class extends G{constructor({domain:t=On,basePath:e=ge,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 r=this;typeof this.body>"u"&&(this.body=null),typeof n<"u"&&(this.body=n),this.cors(),r.stream=o,o?.on("data",u=>{let h=i?.method.toLowerCase(),f={post:r.post.bind(r)};Object.hasOwn(f,h)&&f[h].call(r,u)});let a=i?.method.toLowerCase(),l={get:r.get.bind(r),head:r.head.bind(r),put:r.put.bind(r),delete:r.delete.bind(r),connect:r.connect.bind(r),options:r.options.bind(r),trace:r.trace.bind(r),patch:r.patch.bind(r)};Object.hasOwn(l,a)&&l[a].call(r)}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(r){d.debug(`It was not possible to finish the call to the microservice: ${r}`)}}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: ${T(t)}`),this.done()}get(t){d.debug(`[BackendMicroservice.get] Data received: ${T(t)}`),this.done()}post(t){d.debug(`[BackendMicroservice.post] Data received: ${T(t)}`),this.done()}put(t){d.debug(`[BackendMicroservice.put] Data received: ${T(t)}`),this.done()}delete(t){d.debug(`[BackendMicroservice.delete] Data received: ${T(t)}`),this.done()}connect(t){d.debug(`[BackendMicroservice.connect] Data received: ${T(t)}`),this.done()}options(t){d.debug(`[BackendMicroservice.options] Data received: ${T(t)}`),this.done()}trace(t){d.debug(`[BackendMicroservice.trace] Data received: ${T(t)}`),this.done()}patch(t){d.debug(`[BackendMicroservice.patch] Data received: ${T(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=T(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(Ve,"BackendMicroservice"),p(Ve,"BackendMicroservice"),Ve);k("com.qcobjects.api",[$r]);fs();fo();P();Sn();uo();xe();var As=p(function(s,t){return In(s,t)},"RegisterClass");Hn(As);var ke,Fr=(ke=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 r=t[i];if(typeof r=="string"||typeof r=="number"||!isNaN(r))try{r=Oe.processObject.bind(n).call(n,r,e.component),o=o.replace(new RegExp(`{{${i}}}`,"g"),r)}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=Oe.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(ke,"DefaultTemplateHandler"),p(ke,"DefaultTemplateHandler"),ke.__definition={},ke);As(Fr,"com.qcobjects");qe();Ne();zn();be();U();$();P();var Je,Gr=(Je=class extends G{constructor(t){super(t),this.domain=On,this.basePath=ge,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 Ee(this,t)}_new_(t){this.__new__(t),this.rebuild()}},c(Je,"SourceJS"),p(Je,"SourceJS"),Je);k("com.qcobjects",[Gr]);qe();Ne();zn();be();U();q();$();var Qe,Hr=(Qe=class extends G{constructor(t){super(t),this.domain=On,this.basePath=ge,this.url="",this.data={},this.async=!1,this.external=!1,this.body=ee("link")}fail(){throw new Error("Method not implemented.")}Cast(t){return Ee(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(Qe,"SourceCSS"),p(Qe,"SourceCSS"),Qe);k("com.qcobjects",[Hr]);gs();be();at();De();q();var Ze,Na=(Ze=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(Ze,"QCObjectsWidgetNode"),p(Ze,"QCObjectsWidgetNode"),Ze),qn,Xe,Ke;y?qn=(Xe=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(r=>{t.hasAttribute(r)&&(n.setAttribute(r,t?.getAttribute(r)),t.removeAttribute(r))}),t.getAttributeNames().filter(function(r){return r.startsWith("data-")}).map(function(r){return r.split("-")[1]}).forEach(function(r){n.setAttribute("data-"+r,t?.getAttribute("data-"+r)),t.removeAttribute("data-"+r)}),[...t.children].forEach(r=>{n.appendChild(r.cloneNode(!0)),r.remove()}),t.parentElement?(t.parentElement?.append(n),t.remove()):t.append(n)}},c(Xe,"_ComponentWidget_"),p(Xe,"_ComponentWidget_"),Xe):qn=(Ke=class extends Na{constructor(){throw super(),new Error("Class not implemented.")}},c(Ke,"_ComponentWidget_"),p(Ke,"_ComponentWidget_"),Ke);S(qn);var wo=p(s=>{if(y)customElements.define(s,class extends qn{});else throw new Error("RegisterWidget is not implemented for non browser ecosystems yet.")},"RegisterWidget"),Is=p((...s)=>{[...s].filter(function(e){return typeof e=="string"}).map(function(e){return wo(e)})},"RegisterWidgets");M(wo);M(Is);S(wo);S(Is);le();_e();me();U();P();$e();$();q();var Ye,Br=(Ye=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(`${Z(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=D(n);typeof o<"u"&&e!==null&&(e.routingController=Q(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(Ye,"Controller"),p(Ye,"Controller"),Ye);k("com.qcobjects.controllers",[Br]);me();U();$();var et,Ur=(et=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(`${Z(this)} must be called with a component`)}},c(et,"View"),p(et,"View"),et);k("com.qcobjects.views",[Ur]);Sr();U();$();var tt,Wr=(tt=class extends G{},c(tt,"VO"),p(tt,"VO"),tt);k("com.qcobjects.valueObjects",[Wr]);U();$();De();_e();var Le,Ts=(Le=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){Le.prototype.animate.call({},t)}animate({timing:t,draw:e,duration:n}){let o=this,i=performance.now();requestAnimationFrame(p(c(function r(a){let l=(a-i)/n;l>1&&(l=1);let u=t(l);e(Math.round(u*100)),l<1?requestAnimationFrame(r):typeof o<"u"&&o!==null&&Object.hasOwn(o,"done")&&(typeof o.done).toLowerCase()==="function"&&o.done.call(o)},"animate"),"animate"))}},c(Le,"_Effect"),p(Le,"Effect"),Le);k("com.qcobjects.effects.base",[Ts]);fe(D("Effect")).map(s=>(M(s),s));P();$();_e();var nt,zr=(nt=class extends Ts{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:r,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=D(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 ce=new m({});typeof ce.apply=="function"&&(b=ce.apply.bind(ce),O=ce)}catch(ce){d.debug(`Transition effect ${g} could not be instantiated: ${ce}`)}if(typeof b!="function")return d.debug(`Transition effect ${g} does not declare an apply() method`),g;let A=u.component.shadowed?h.host:h,B={alphaFrom:t,alphaTo:e,angleFrom:n,angleTo:o,radiusFrom:i,radiusTo:r,scaleFrom:a,scaleTo:l};return b.call(O,A,...Object.values(B)),g}))}},c(nt,"TransitionEffect"),p(nt,"TransitionEffect"),nt);k("com.qcobjects.effects.transitions.base",[zr]);U();$();var ot,Vr=(ot=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 r(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(r)},"thread"),"thread"))}},c(ot,"Timer"),p(ot,"Timer"),ot);k("com.qcobjects.timing",[Vr]);ps();ys();Pr();at();U();P();Gn();var st,Jr=(st=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:r,fget:n,fset:o}){var r=typeof r>"u"?vn(this):r;Object.defineProperty(t,r,{set(a){let l=a;d.debug("value changed "+r);let u;typeof o<"u"&&typeof o=="function"?u=o(l):u=l,t["_"+r]=u},get(){let a=t["_"+r];d.debug("returning value "+r);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(st,"DDO"),p(st,"DDO"),st);S(Jr);U();P();$();var rt,Qr=(rt=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(rt,"Toggle"),p(rt,"Toggle"),rt);k("com.qcobjects.tools.essentials",[Qr]);Cs();var Aa=p(function(){let s=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[s(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");Os();X();uo();X()});var Xr=ne(Zr=>{"use strict";Object.defineProperty(Zr,"__esModule",{value:!0});var re=x();re.CONFIG.set("sourceType","module");re.CONFIG.set("relativeImportPath","js/packages/");re.CONFIG.set("componentsBasePath","templates/components/");re.CONFIG.set("delayForReady",1);re.CONFIG.set("preserveComponentBodyTag",!1);re.CONFIG.set("useConfigService",!1);re.CONFIG.set("routingWay","pathname");re.CONFIG.set("useLocalSDK",!0);re.CONFIG.set("tplextension","tpl.html");re.CONFIG.set("asynchronousImportsLoad",!0);re.CONFIG.set("serviceWorkerURI","/sw.js");re.CONFIG.set("overrideComponentTag",!0);re.Component.cached=!0});var Hs=ne((Ja,Wi)=>{"use strict";var So=Object.defineProperty,Ia=Object.getOwnPropertyDescriptor,Ta=Object.getOwnPropertyNames,Pa=Object.prototype.hasOwnProperty,_=c((s,t)=>So(s,"name",{value:t,configurable:!0}),"__name"),Ma=c((s,t)=>{for(var e in t)So(s,e,{get:t[e],enumerable:!0})},"__export"),Ra=c((s,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Ta(t))!Pa.call(s,o)&&o!==e&&So(s,o,{get:c(()=>t[o],"get"),enumerable:!(n=Ia(t,o))||n.enumerable});return s},"__copyProps"),ka=c(s=>Ra(So({},"__esModule",{value:!0}),s),"__toCommonJS"),Kr={};Ma(Kr,{BasicLayout:c(()=>Bi,"BasicLayout"),ButtonField:c(()=>pi,"ButtonField"),CanvasTool:c(()=>Hi,"CanvasTool"),Contact:c(()=>ei,"Contact"),CubeSplashScreenComponent:c(()=>Ni,"CubeSplashScreenComponent"),DataGridController:c(()=>Mi,"DataGridController"),EmailField:c(()=>gi,"EmailField"),Fade:c(()=>Te,"Fade"),FormController:c(()=>Li,"FormController"),FormField:c(()=>cn,"FormField"),FormValidations:c(()=>ki,"FormValidations"),GenericController:c(()=>Ii,"GenericController"),GridComponent:c(()=>yi,"GridComponent"),GridController:c(()=>Pi,"GridController"),GridItemComponent:c(()=>_i,"GridItemComponent"),GridView:c(()=>Fi,"GridView"),InputField:c(()=>hi,"InputField"),ListComponent:c(()=>Ci,"ListComponent"),ListController:c(()=>Ti,"ListController"),ListItemComponent:c(()=>wi,"ListItemComponent"),ModalComponent:c(()=>$s,"ModalComponent"),ModalController:c(()=>qi,"ModalController"),ModalEnclosureComponent:c(()=>mi,"ModalEnclosureComponent"),ModalFade:c(()=>vo,"ModalFade"),ModalMoveDown:c(()=>qs,"ModalMoveDown"),ModalMoveUp:c(()=>Ds,"ModalMoveUp"),Move:c(()=>se,"Move"),MoveXInFromLeft:c(()=>ks,"MoveXInFromLeft"),MoveXInFromRight:c(()=>Rs,"MoveXInFromRight"),MoveYInFromBottom:c(()=>Ls,"MoveYInFromBottom"),MoveYInFromTop:c(()=>ti,"MoveYInFromTop"),NotificationComponent:c(()=>Ei,"NotificationComponent"),Radius:c(()=>ii,"Radius"),Resize:c(()=>js,"Resize"),Rotate:c(()=>ri,"Rotate"),RotateX:c(()=>ni,"RotateX"),RotateY:c(()=>oi,"RotateY"),RotateZ:c(()=>si,"RotateZ"),SessionData:c(()=>Ui,"SessionData"),SessionUserToken:c(()=>Oo,"SessionUserToken"),ShadowedComponent:c(()=>ui,"ShadowedComponent"),SlideItemComponent:c(()=>Oi,"SlideItemComponent"),SlideListComponent:c(()=>vi,"SlideListComponent"),SliderComponent:c(()=>Si,"SliderComponent"),SliderController:c(()=>Ri,"SliderController"),SplashScreenComponent:c(()=>Jn,"SplashScreenComponent"),SwaggerUIComponent:c(()=>bi,"SwaggerUIComponent"),SwaggerUIController:c(()=>ji,"SwaggerUIController"),TextField:c(()=>fi,"TextField"),VideoSplashScreenComponent:c(()=>xi,"VideoSplashScreenComponent"),WipeDown:c(()=>li,"WipeDown"),WipeLeft:c(()=>ai,"WipeLeft"),WipeRight:c(()=>ci,"WipeRight"),WipeUp:c(()=>di,"WipeUp"),default:c(()=>ja,"default"),i18n_messages:c(()=>Ms,"i18n_messages")});Wi.exports=ka(Kr);var Co=x(),we=x(),ct,Ms=(ct=class extends we.InheritClass{constructor({messages:t=[]}){super({messages:t}),we.CONFIG.get("use_i18n",!1)&&(we.CONFIG.set("lang","en"),(0,we.get)("i18n")?(0,we.set)("i18n",{messages:(0,we.get)("i18n").messages.concat(t)}):(0,we.set)("i18n",{messages:t}))}_load_i18n_packages_(){return we.CONFIG.get("i18n_languages",[]).map(t=>{(0,we.Import)(`org.quickcorp.i18n_messages.${t}`)})}},c(ct,"i18n_messages"),_(ct,"i18n_messages"),ct);(0,we.Package)("org.qcobjects.i18n_messages",[Ms]);new Ms({})._load_i18n_packages_();var Yr=x(),dt,ei=(dt=class extends Yr.VO{},c(dt,"Contact"),_(dt,"Contact"),dt);(0,Yr.Package)("org.qcobjects.models",[ei]);var F=x(),Ie=x(),lt,Te=(lt=class extends Ie.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){Ie.logger.debug("animation progress: "+i.toString());let r=e+i*o/100;Ie.logger.debug("alpha: "+r.toString()),t.style.opacity=r.toString()}})}static apply(t,e,n){let o=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){Ie.logger.debug("animation progress: "+i.toString());let r=e+i*o/100;Ie.logger.debug("alpha: "+r.toString()),t.style.opacity=r.toString()}})}},c(lt,"Fade"),_(lt,"Fade"),lt),ut,se=(ut=class extends Ie.Effect{constructor(){super(...arguments),this.duration=1e3}static apply(t,e,n,o,i){let r=o-e,a=i-n;t.style.transform="translate("+e+"px,"+n+"px)",super.animate({duration:this.duration,timing(l){return l},draw(l){Ie.logger.debug("animation progress: "+l.toString());let u=n+l*a/100,h=e+l*r/100;Ie.logger.debug("x: "+h.toString()+" y:"+u.toString()),t.style.transform="translate("+h+"px,"+u+"px)"}})}},c(ut,"Move"),_(ut,"Move"),ut);(0,Ie.Package)("org.qcobjects.effects.base",[Te,se]);var I=x(),pt,Rs=(pt=class extends se{constructor(){super(...arguments),this.duration=1e3}static apply(t){se.apply.call(this,t,t.width,0,0,0)}},c(pt,"MoveXInFromRight"),_(pt,"MoveXInFromRight"),pt),ht,ks=(ht=class extends se{constructor(){super(...arguments),this.duration=1e3}static apply(t){se.apply.call(this,t,-t.width,0,0,0)}},c(ht,"MoveXInFromLeft"),_(ht,"MoveXInFromLeft"),ht),ft,Ls=(ft=class extends se{constructor(){super(...arguments),this.duration=1e3}static apply(t){se.apply.call(this,t,0,t.height,0,0)}},c(ft,"MoveYInFromBottom"),_(ft,"MoveYInFromBottom"),ft),gt,ti=(gt=class extends se{constructor(){super(...arguments),this.duration=1e3}static apply(t){se.apply.call(this,t,0,-t.height,0,0)}},c(gt,"MoveYInFromTop"),_(gt,"MoveYInFromTop"),gt),mt,ni=(mt=class extends I.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){I.logger.debug("animation progress: "+i.toString());let r=Math.round(e+i*o/100);I.logger.debug("angle: "+r.toString()),t.style.transform="rotate3d(1,0,0,"+r.toString()+"deg)"}})}},c(mt,"RotateX"),_(mt,"RotateX"),mt),bt,oi=(bt=class extends I.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){I.logger.debug("animation progress: "+i.toString());let r=Math.round(e+i*o/100);I.logger.debug("angle: "+r.toString()),t.style.transform="rotate3d(0,1,0,"+r.toString()+"deg)"}})}},c(bt,"RotateY"),_(bt,"RotateY"),bt),_t,si=(_t=class extends I.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){I.logger.debug("animation progress: "+i.toString());let r=Math.round(e+i*o/100);I.logger.debug("angle: "+r.toString()),t.style.transform="rotate3d(0,0,1,"+r.toString()+"deg)"}})}},c(_t,"RotateZ"),_(_t,"RotateZ"),_t),yt,ri=(yt=class extends I.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){I.logger.debug("animation progress: "+i.toString());let r=Math.round(e+i*o/100);I.logger.debug("angle: "+r.toString()),t.style.transform="rotate3d(1,1,1,"+r.toString()+"deg)"}})}},c(yt,"Rotate"),_(yt,"Rotate"),yt),wt,ii=(wt=class extends I.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){I.logger.debug("animation progress: "+i.toString());let r=e+i*o/100;I.logger.debug("radius: "+r.toString()),t.style.borderRadius=r.toString()+"px"}})}},c(wt,"Radius"),_(wt,"Radius"),wt),Ct,js=(Ct=class extends I.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){I.logger.debug("animation progress: "+i.toString());let r=e+i*o/100;I.logger.debug("resize: "+r.toString()),t.style.transformOrigin="center",t.style.transform="scale("+r+","+r+")"}})}},c(Ct,"Resize"),_(Ct,"Resize"),Ct),vt,ai=(vt=class extends I.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){I.logger.debug("animation progress: "+i.toString());let r=e+i*o/100;I.logger.debug("wipe: "+r.toString()),t.style.transformOrigin="right",t.style.transform="scaleX("+r+")"}})}},c(vt,"WipeLeft"),_(vt,"WipeLeft"),vt),Ot,ci=(Ot=class extends I.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){I.logger.debug("animation progress: "+i.toString());let r=e+i*o/100;I.logger.debug("wipe: "+r.toString()),t.style.transformOrigin="left",t.style.transform="scaleX("+r+")"}})}},c(Ot,"WipeRight"),_(Ot,"WipeRight"),Ot),St,di=(St=class extends I.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){I.logger.debug("animation progress: "+i.toString());let r=e+i*o/100;I.logger.debug("wipe: "+r.toString()),t.style.transformOrigin="bottom",t.style.transform="scaleY("+r+")"}})}},c(St,"WipeUp"),_(St,"WipeUp"),St),Et,li=(Et=class extends I.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){I.logger.debug("animation progress: "+i.toString());let r=e+i*o/100;I.logger.debug("wipe: "+r.toString()),t.style.transformOrigin="top",t.style.transform="scaleY("+r+")"}})}},c(Et,"WipeDown"),_(Et,"WipeDown"),Et);(0,I.Package)("org.qcobjects.effects.extended",[Rs,ks,Ls,ti,ni,oi,si,ri,ii,js,ai,ci,di,li]);var La=x(),xt,vo=(xt=class extends Te{constructor(){super(...arguments),this.duration=500}},c(xt,"ModalFade"),_(xt,"ModalFade"),xt),Nt,Ds=(Nt=class extends se{constructor(){super(...arguments),this.duration=800}},c(Nt,"ModalMoveUp"),_(Nt,"ModalMoveUp"),Nt),At,qs=(At=class extends se{constructor(){super(...arguments),this.duration=300}},c(At,"ModalMoveDown"),_(At,"ModalMoveDown"),At);(0,La.Package)("org.qcobjects.modal.effects",[vo,qs,Ds]);var Ae=x(),It,cn=(It=class extends Ae.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",()=>{Ae.logger.debug("Executing change event binding"),this.executeBindings()}),n.addEventListener("blur",()=>{Ae.logger.debug("Executing change event binding"),this.executeBindings()}),n.addEventListener("focus",()=>{Ae.logger.debug("Executing change event binding"),this.executeBindings()}),n.addEventListener("keydown",()=>{Ae.logger.debug("Executing keydown event binding"),this.executeBindings()})}}executeBinding(t){let e=t.getAttribute("data-field");Ae.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");Ae.logger.debug("Binding "+o+" for "+this.name),this.data[o]=n.value}}done(t){let e=super.done(t);return this.executeBindings(),this.createBindingEvents(),Ae.logger.debug("Field loaded: "+this.fieldType+"[name="+this.name+"]"),e}},c(It,"FormField"),_(It,"FormField"),It);(0,Ae.Package)("org.qcobjects.base.components",[cn]);var Tt,ui=(Tt=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(Tt,"ShadowedComponent"),_(Tt,"ShadowedComponent"),Tt),Pt,pi=(Pt=class extends cn{constructor(t){t.fieldType="button",super(t)}},c(Pt,"ButtonField"),_(Pt,"ButtonField"),Pt),Mt,hi=(Mt=class extends cn{constructor(t){t.fieldType="input",super(t)}},c(Mt,"InputField"),_(Mt,"InputField"),Mt),Rt,fi=(Rt=class extends cn{constructor(t){t.fieldType="textarea",super(t)}},c(Rt,"TextField"),_(Rt,"TextField"),Rt),kt,gi=(kt=class extends cn{constructor(t){t.fieldType="input",super(t)}},c(kt,"EmailField"),_(kt,"EmailField"),kt),Lt,mi=(Lt=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(Mt,"ModalEnclosureComponent"),_(Mt,"ModalEnclosureComponent"),Mt),Rt,xs=(Rt=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 To().apply(e,0,1))),(0,F.Tag)("#modalInstance_"+t+".modal .modal-content").map(e=>Es.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 To({duration:3e3}).apply(e,1,0))),(0,F.Tag)("#modalInstance_"+t+".modal .modal-content").map(function(e){return Ss.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(Rt,"ModalComponent"),_(Rt,"ModalComponent"),Rt),kt,Qr=(kt=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(kt,"SwaggerUIComponent"),_(kt,"SwaggerUIComponent"),kt);(0,F.Package)("org.qcobjects.form.components",[Br,Ur,Wr,zr,Vr,Jr,xs,Qr]);var Ns=x(),Lt,Zr=(Lt=class extends Ns.Component{constructor(){super(...arguments),this.name="grid-item",this.shadowed=!0,this.tplsource="inline",this.template=`
35
+ `,this.data={}}},c(Lt,"ModalEnclosureComponent"),_(Lt,"ModalEnclosureComponent"),Lt),jt,$s=(jt=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 vo().apply(e,0,1))),(0,F.Tag)("#modalInstance_"+t+".modal .modal-content").map(e=>qs.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 vo({duration:3e3}).apply(e,1,0))),(0,F.Tag)("#modalInstance_"+t+".modal .modal-content").map(function(e){return Ds.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(jt,"ModalComponent"),_(jt,"ModalComponent"),jt),Dt,bi=(Dt=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(Dt,"SwaggerUIComponent"),_(Dt,"SwaggerUIComponent"),Dt);(0,F.Package)("org.qcobjects.form.components",[ui,pi,hi,fi,gi,mi,$s,bi]);var Fs=x(),qt,_i=(qt=class extends Fs.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(Lt,"GridItemComponent"),_(Lt,"GridItemComponent"),Lt),jt,Xr=(jt=class extends Ns.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(jt,"GridComponent"),_(jt,"GridComponent"),jt);(0,Ns.Package)("org.qcobjects.components.grid",[Xr,Zr]);var Is=x(),Dt,Kr=(Dt=class extends Is.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(Dt,"ListItemComponent"),_(Dt,"ListItemComponent"),Dt),qt,Yr=(qt=class extends Is.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(qt,"ListComponent"),_(qt,"ListComponent"),qt);(0,Is.Package)("org.qcobjects.components.list",[Kr,Yr]);var Ro=x(),$t,ei=($t=class extends Ro.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($t,"SlideListComponent"),_($t,"SlideListComponent"),$t),Ft,ti=(Ft=class extends Ro.Component{constructor(t){super(t),this.effectClass="Fade",this.name="slider_item",this.data.slideNumber=this.data.__dataIndex+1,this.template=`
38
+ `,this.cached=!1}},c(qt,"GridItemComponent"),_(qt,"GridItemComponent"),qt),$t,yi=($t=class extends Fs.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($t,"GridComponent"),_($t,"GridComponent"),$t);(0,Fs.Package)("org.qcobjects.components.grid",[yi,_i]);var Gs=x(),Ft,wi=(Ft=class extends Gs.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(Ft,"ListItemComponent"),_(Ft,"ListItemComponent"),Ft),Gt,Ci=(Gt=class extends Gs.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(Gt,"ListComponent"),_(Gt,"ListComponent"),Gt);(0,Gs.Package)("org.qcobjects.components.list",[wi,Ci]);var Eo=x(),Ht,vi=(Ht=class extends Eo.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(Ht,"SlideListComponent"),_(Ht,"SlideListComponent"),Ht),Bt,Oi=(Bt=class extends Eo.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(Ft,"SlideItemComponent"),_(Ft,"SlideItemComponent"),Ft),Gt,ni=(Gt=class extends Ro.Component{constructor(t){super(t),this.name="slider",this.template=`
46
+ `,this.tplsource="inline"}},c(Bt,"SlideItemComponent"),_(Bt,"SlideItemComponent"),Bt),Ut,Si=(Ut=class extends Eo.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(Gt,"SliderComponent"),_(Gt,"SliderComponent"),Gt);(0,Ro.Package)("org.qcobjects.components.slider",[ei,ti,ni]);var z=x(),le,oi=(le=class extends z.Component{constructor(t){t.name="notification",t.body=(0,z._DOMCreateElement)("div"),super(t),this.cached=!1,this.tplsource="inline",this.shadowed=!1,this.template=`
166
+ `,this.tplsource="inline",this.shadowed=!0,this.data.SERVICE_CLASS=this.body.getAttribute("serviceClass"),this.body.setAttribute("controllerClass","SliderController")}},c(Ut,"SliderComponent"),_(Ut,"SliderComponent"),Ut);(0,Eo.Package)("org.qcobjects.components.slider",[vi,Oi,Si]);var z=x(),ue,Ei=(ue=class extends z.Component{constructor(t){t.name="notification",t.body=(0,z._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,z.New)(se,{duration:900,apply(r){(0,z._super_)("Fade","apply").call(this,r,0,1),(0,z._super_)("Move","apply").call(this,r,0,-document.body.clientHeight,0,0)}}),i=(0,z.New)(se,{duration:650,apply(r){(0,z._super_)("Fade","apply").call(this,r,1,0),(0,z._super_)("Move","apply").call(this,r,0,0,0,-document.body.clientHeight)}});o.apply(n),setTimeout(function(){i.apply(n)},2e3)},"_display_");t.subelements("div.notification_background").map(n=>new Ie({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,z.New)(le,{name:"notification",shadowed:!0,body:(0,z._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,z.New)(le,{name:"notification",shadowed:!0,body:(0,z._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,z.New)(le,{name:"notification",shadowed:!0,body:(0,z._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,z.New)(le,{name:"notification",shadowed:!0,body:(0,z._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(le,"_NotificationComponent"),_(le,"NotificationComponent"),le);(0,z.Package)("org.quickcorp.components.notifications",[oi]);var oe=x(),Ht,so=(Ht=class extends oe.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===""||oe.CONFIG.get("routingWay","pathname")==="hash"&&oe.CONFIG.get("start_url","/")===location.hash||oe.CONFIG.get("routingWay","pathname")==="pathname"&&oe.CONFIG.get("start_url","/")===location.pathname||oe.CONFIG.get("routingWay","pathname")==="search"&&oe.CONFIG.get("start_url","/")===location.search,o=e&&n;if(o?(t.basePath=oe.CONFIG.get("splashscreenBasePath",oe.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 r=this.body?.getAttribute("duration"),a=r==null?1e3:parseInt(r.toString());this._bgcolor=this.body?.style?.backgroundColor??"";let l=_(()=>{setTimeout(()=>{if(!l.executed){let u=this.shadowed?this.shadowRoot?.host:this.body;typeof oe.componentsStack<"u"&&oe.componentsStack.filter(h=>h.body.hasAttribute("splashscreen")).map(h=>{oe.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 Os().apply(C,1,0))),new Ie().apply(u,1,0))},a-1e3),setTimeout(function(){new Ie().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(Ht,"SplashScreenComponent"),_(Ht,"SplashScreenComponent"),Ht);(0,oe.Package)("org.qcobjects.components.base",[so]);var Bt,si=(Bt=class extends so{constructor(t){t.name="videosplashscreen",super(t),this.cached=!1,this.shadowed=!0,this.tplsource="inline",this.template=`
211
+ `,this.kinds=["danger","success","info","warning"]}display(t){let e=_(function(n){n.style.display="block";let o=(0,z.New)(se,{duration:900,apply(r){(0,z._super_)("Fade","apply").call(this,r,0,1),(0,z._super_)("Move","apply").call(this,r,0,-document.body.clientHeight,0,0)}}),i=(0,z.New)(se,{duration:650,apply(r){(0,z._super_)("Fade","apply").call(this,r,1,0),(0,z._super_)("Move","apply").call(this,r,0,0,0,-document.body.clientHeight)}});o.apply(n),setTimeout(function(){i.apply(n)},2e3)},"_display_");t.subelements("div.notification_background").map(n=>new Te({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,z.New)(ue,{name:"notification",shadowed:!0,body:(0,z._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,z.New)(ue,{name:"notification",shadowed:!0,body:(0,z._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,z.New)(ue,{name:"notification",shadowed:!0,body:(0,z._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,z.New)(ue,{name:"notification",shadowed:!0,body:(0,z._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(ue,"_NotificationComponent"),_(ue,"NotificationComponent"),ue);(0,z.Package)("org.quickcorp.components.notifications",[Ei]);var oe=x(),Wt,Jn=(Wt=class extends oe.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===""||oe.CONFIG.get("routingWay","pathname")==="hash"&&oe.CONFIG.get("start_url","/")===location.hash||oe.CONFIG.get("routingWay","pathname")==="pathname"&&oe.CONFIG.get("start_url","/")===location.pathname||oe.CONFIG.get("routingWay","pathname")==="search"&&oe.CONFIG.get("start_url","/")===location.search,o=e&&n;if(o?(t.basePath=oe.CONFIG.get("splashscreenBasePath",oe.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 r=this.body?.getAttribute("duration"),a=r==null?1e3:parseInt(r.toString());this._bgcolor=this.body?.style?.backgroundColor??"";let l=_(()=>{setTimeout(()=>{if(!l.executed){let u=this.shadowed?this.shadowRoot?.host:this.body;typeof oe.componentsStack<"u"&&oe.componentsStack.filter(h=>h.body.hasAttribute("splashscreen")).map(h=>{oe.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 js().apply(C,1,0))),new Te().apply(u,1,0))},a-1e3),setTimeout(function(){new Te().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(Wt,"SplashScreenComponent"),_(Wt,"SplashScreenComponent"),Wt);(0,oe.Package)("org.qcobjects.components.base",[Jn]);var zt,xi=(zt=class extends Jn{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(Bt,"VideoSplashScreenComponent"),_(Bt,"VideoSplashScreenComponent"),Bt),Ut,ri=(Ut=class extends so{constructor(t){t.name="cubesplashscreen",super(t),this.cached=!1,this.shadowed=!0,this.tplsource="inline",this.template=`
374
+ `}},c(zt,"VideoSplashScreenComponent"),_(zt,"VideoSplashScreenComponent"),zt),Vt,Ni=(Vt=class extends Jn{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(Ut,"CubeSplashScreenComponent"),_(Ut,"CubeSplashScreenComponent"),Ut);(0,oe.Package)("org.qcobjects.components.splashscreen",[so,si,ri]);var ii=x(),Wt,ai=(Wt=class extends ii.Controller{},c(Wt,"GenericController"),_(Wt,"GenericController"),Wt);(0,ii.Package)("org.qcobjects.controllers",[ai]);var N=x(),zt,ci=(zt=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,r,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],r=this.getPageIndex(h,a,l.length)[1]):(i=0,r=l.length,a=1),l=l.slice(i,r)):(i=0,r=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:r,__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),r="grid"+this.__instanceID.toString();n.innerHTML=`.${r}{
687
- display: grid; grid-template-rows: ${o}; grid-template-columns: ${i}; margin:0 auto; }`,e.append(n),e.classList.add(r)}}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 r=t.body.getAttribute("page-number");r=isNaN(r)||r===null?-1:r;let a;if(r!==-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(r,a,l)[0],o=this.getPageIndex(r,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(r=>{N.logger.debug("DONE SERVICE COMPONENT"),r.service.JSONresponse=JSON.parse(r.service.template),typeof r.service.JSONresponse.result<"u"?(N.logger.debug((0,N._DataStringify)(r.service.JSONresponse.result)),t.data=r.service.JSONresponse.result):t.data=r.service.JSONresponse,this.addSubcomponents()},r=>{N.logger.debug(r)}).catch(r=>{N.logger.debug("Something went wrong when calling the service from: "+e),N.logger.debug(r.message)})}}},c(zt,"ListController"),_(zt,"ListController"),zt);(0,N.Package)("org.qcobjects.controllers.list",[ci]);var E=x(),Vt,di=(Vt=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),r="grid"+this.__instanceID.toString();n.innerHTML=`.${r}{
688
- display: grid; grid-template-rows: ${o}; grid-template-columns: ${i}; margin:0 auto; }`,e?.append(n),t.shadowed?e?.host.classList.add(r):e.classList.add(r)}}done(){this.cssGrid(),E.logger.debug("GridComponent built")}},c(Vt,"GridController"),_(Vt,"GridController"),Vt),Jt,li=(Jt=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],r=this.component.body.getAttribute("paginate-in"),a;r=r!==null?r:"client",r==="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),r="grid"+this.__instanceID.toString();n.innerHTML=`.${r}{
689
- display: grid; grid-template-rows: ${o}; grid-template-columns: ${i}; margin:0 auto; }`,t.shadowed?(t.body.append(n),e.host.classList.add(r)):(e?.append(n),e.classList.add(r))}}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 r=t.body.getAttribute("page-number");r=isNaN(r)||r===null?-1:r;let a;if(r!==-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(r,a,l)[0],o=this.getPageIndex(r,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(r=>{E.logger.debug("DONE SERVICE COMPONENT"),r.service.JSONresponse=JSON.parse(r.service.template),typeof r.service.JSONresponse.result<"u"?(E.logger.debug((0,E._DataStringify)(r.service.JSONresponse.result)),t.data=r.service.JSONresponse.result):t.data=r.service.JSONresponse,this.addSubcomponents()},r=>{E.logger.debug(r)}).catch(r=>{E.logger.debug("Something went wrong when calling the service from: "+e),E.logger.debug(r.message)})}}},c(Jt,"DataGridController"),_(Jt,"DataGridController"),Jt);(0,E.Package)("org.qcobjects.controllers.grid",[di,li]);var qe=x(),Qt,ui=(Qt=class extends qe.Controller{constructor({component:t,dependencies:e=[],duration:n=7100,slideIndex:o=0,interval:i=null,sliderHandlerName:r=null}){super({component:t,dependencies:e,duration:n,slideIndex:o,interval:i,sliderHandlerName:r}),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,qe.New)((0,qe.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){qe.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,qe.New)((0,qe.ClassFactory)("Fade"),{}).apply(e[this.slideIndex],0,1)}catch(o){qe.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(Qt,"SliderController"),_(Qt,"SliderController"),Qt);(0,qe.Package)("org.qcobjects.controllers.slider",[ui]);var V=x(),Zt,pi=(Zt=class extends V.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(Zt,"FormValidations"),_(Zt,"FormValidations"),Zt),Xt,hi=(Xt=class extends V.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(sn)}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=_((r,a,l)=>typeof this.validations<"u"&&Object.hasOwnProperty.call(this.validations,r)&&this.validations[r].call(null,r,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,V.serviceLoader)((0,V.New)((0,V.ClassFactory)(this.serviceClass),{data:this.component.data}),!1).then(()=>{V.logger.info("DONE SERVICE COMPONENT"),location.href=this.formSettings.nextRouting},t=>{V.logger.debug(t),location.href=this.formSettings.backRouting})):V.logger.debug("No service name declared on serviceClass property")}formSaveTouchHandler(){V.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"),r=n.filter(a=>this.isInvalid(a));if(r.length>0){let a=`
686
+ `}},c(Vt,"CubeSplashScreenComponent"),_(Vt,"CubeSplashScreenComponent"),Vt);(0,oe.Package)("org.qcobjects.components.splashscreen",[Jn,xi,Ni]);var Ai=x(),Jt,Ii=(Jt=class extends Ai.Controller{},c(Jt,"GenericController"),_(Jt,"GenericController"),Jt);(0,Ai.Package)("org.qcobjects.controllers",[Ii]);var N=x(),Qt,Ti=(Qt=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,r,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],r=this.getPageIndex(h,a,l.length)[1]):(i=0,r=l.length,a=1),l=l.slice(i,r)):(i=0,r=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:r,__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),r="grid"+this.__instanceID.toString();n.innerHTML=`.${r}{
687
+ display: grid; grid-template-rows: ${o}; grid-template-columns: ${i}; margin:0 auto; }`,e.append(n),e.classList.add(r)}}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 r=t.body.getAttribute("page-number");r=isNaN(r)||r===null?-1:r;let a;if(r!==-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(r,a,l)[0],o=this.getPageIndex(r,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(r=>{N.logger.debug("DONE SERVICE COMPONENT"),r.service.JSONresponse=JSON.parse(r.service.template),typeof r.service.JSONresponse.result<"u"?(N.logger.debug((0,N._DataStringify)(r.service.JSONresponse.result)),t.data=r.service.JSONresponse.result):t.data=r.service.JSONresponse,this.addSubcomponents()},r=>{N.logger.debug(r)}).catch(r=>{N.logger.debug("Something went wrong when calling the service from: "+e),N.logger.debug(r.message)})}}},c(Qt,"ListController"),_(Qt,"ListController"),Qt);(0,N.Package)("org.qcobjects.controllers.list",[Ti]);var E=x(),Zt,Pi=(Zt=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),r="grid"+this.__instanceID.toString();n.innerHTML=`.${r}{
688
+ display: grid; grid-template-rows: ${o}; grid-template-columns: ${i}; margin:0 auto; }`,e?.append(n),t.shadowed?e?.host.classList.add(r):e.classList.add(r)}}done(){this.cssGrid(),E.logger.debug("GridComponent built")}},c(Zt,"GridController"),_(Zt,"GridController"),Zt),Xt,Mi=(Xt=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],r=this.component.body.getAttribute("paginate-in"),a;r=r!==null?r:"client",r==="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),r="grid"+this.__instanceID.toString();n.innerHTML=`.${r}{
689
+ display: grid; grid-template-rows: ${o}; grid-template-columns: ${i}; margin:0 auto; }`,t.shadowed?(t.body.append(n),e.host.classList.add(r)):(e?.append(n),e.classList.add(r))}}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 r=t.body.getAttribute("page-number");r=isNaN(r)||r===null?-1:r;let a;if(r!==-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(r,a,l)[0],o=this.getPageIndex(r,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(r=>{E.logger.debug("DONE SERVICE COMPONENT"),r.service.JSONresponse=JSON.parse(r.service.template),typeof r.service.JSONresponse.result<"u"?(E.logger.debug((0,E._DataStringify)(r.service.JSONresponse.result)),t.data=r.service.JSONresponse.result):t.data=r.service.JSONresponse,this.addSubcomponents()},r=>{E.logger.debug(r)}).catch(r=>{E.logger.debug("Something went wrong when calling the service from: "+e),E.logger.debug(r.message)})}}},c(Xt,"DataGridController"),_(Xt,"DataGridController"),Xt);(0,E.Package)("org.qcobjects.controllers.grid",[Pi,Mi]);var Fe=x(),Kt,Ri=(Kt=class extends Fe.Controller{constructor({component:t,dependencies:e=[],duration:n=7100,slideIndex:o=0,interval:i=null,sliderHandlerName:r=null}){super({component:t,dependencies:e,duration:n,slideIndex:o,interval:i,sliderHandlerName:r}),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,Fe.New)((0,Fe.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){Fe.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,Fe.New)((0,Fe.ClassFactory)("Fade"),{}).apply(e[this.slideIndex],0,1)}catch(o){Fe.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(Kt,"SliderController"),_(Kt,"SliderController"),Kt);(0,Fe.Package)("org.qcobjects.controllers.slider",[Ri]);var V=x(),Yt,ki=(Yt=class extends V.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(Yt,"FormValidations"),_(Yt,"FormValidations"),Yt),en,Li=(en=class extends V.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(cn)}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=_((r,a,l)=>typeof this.validations<"u"&&Object.hasOwnProperty.call(this.validations,r)&&this.validations[r].call(null,r,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,V.serviceLoader)((0,V.New)((0,V.ClassFactory)(this.serviceClass),{data:this.component.data}),!1).then(()=>{V.logger.info("DONE SERVICE COMPONENT"),location.href=this.formSettings.nextRouting},t=>{V.logger.debug(t),location.href=this.formSettings.backRouting})):V.logger.debug("No service name declared on serviceClass property")}formSaveTouchHandler(){V.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"),r=n.filter(a=>this.isInvalid(a));if(r.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 V.logger.debug("Unable to find the modal validator..."),V.logger.debug("Saving data..."),this.save()}done(){V.logger.debugEnabled=!0;try{this.component.createBindingEvents();let t=(0,V._DOMCreateElement)("div");t.className="modal_body",this.formValidatorModal=(0,V.New)(xs,{body:t,subcomponents:[],data:{content:'<div class="validationMessage"></div>'}}),(0,V.Tag)(".modal_body").map(e=>document.body.removeChild(e)),document.body.append(this.formValidatorModal.body)}catch(t){V.logger.debug(`Unable to create the modal: ${t}`)}this.onpress(".submit",()=>{this.formSaveTouchHandler()})}},c(Xt,"FormController"),_(Xt,"FormController"),Xt);(0,V.Package)("org.qcobjects.controllers.form",[hi,pi]);var te=x(),Kt,fi=(Kt=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(Kt,"SwaggerUIController"),_(Kt,"SwaggerUIController"),Kt);(0,te.Package)("org.qcobjects.controllers.swagger",[fi]);var gi=x(),Yt,mi=(Yt=class extends gi.Controller{done(){let t=this.component;t.body.innerHTML=t.body.innerHTML.replace("/{{content}}/g",t.submodal.template)}},c(Yt,"ModalController"),_(Yt,"ModalController"),Yt);(0,gi.Package)("org.qcobjects.modal.controllers",[mi]);var bi=x(),en,_i=(en=class extends bi.View{},c(en,"GridView"),_(en,"GridView"),en);(0,bi.Package)("org.qcobjects.views",[_i]);var yi=x(),tn,wi=(tn=class extends yi.InheritClass{drawImageFilled(t,e,n=1,o=0,i=0){let r=Math.max(e.width/t.width,e.height/t.height);r=r*n;let a=e.width/2-t.width/2*r,l=e.height/2-t.height/2*r;e.getContext("2d")?.drawImage(t,o+a,i+l,t.width*r,t.height*r)}getImageResized(t,e,n,o,i=1,r=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,r,a),o.src=l.toDataURL("image/png"),l}},c(tn,"CanvasTool"),_(tn,"CanvasTool"),tn);(0,yi.Package)("org.qcobjects.tools.canvas",[wi]);var L=x(),nn,Ci=(nn=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=>Ie.apply(t,0,1)),(0,L.Tag)("component>footer").map(t=>Ie.apply(t,0,1)),(0,L.Tag)("component>header").map(t=>Ie.apply(t,0,1)),(0,L.Tag)("nav").map(t=>{t.style.display="block",t.style.width=t.offsetParent?.scrollWidth.toString()||t.clientWidth.toString(),Cs.apply(t)}),(0,L.Tag)("component>article").map(t=>{t.style.display="block",t.style.height=t.offsetParent?.scrollHeight.toString()||t.clientHeight.toString(),vs.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(),ws.apply(t)})},300)}},c(nn,"BasicLayout"),_(nn,"BasicLayout"),nn);(0,L.Package)("org.qcobjects.tools.layouts",[Ci]);var K=x(),H,Po=(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",[Po]);var _s=x(),on,vi=(on=class extends _s.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 Po>"u")throw new Error('You need to import SessionUserToken first: Import ("org.qcobjects.cloud.auth.session.usertoken")');return`session_${btoa(Po.getGlobalUserToken(t))}`}save(...t){let e=(0,_s._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(on,"SessionData"),_(on,"SessionData"),on);(0,_s.Package)("org.qcobjects.cloud.auth.session.data",[vi]);_(c((function s(t){"use strict";if(typeof Object.defineProperty<"u"&&typeof t<"u")try{Object.defineProperty(t,"__qcobjects_sdk__",{enumerable:!0,configurable:!1,writable:!1,value:s})}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=Ao.GlobalSettings.__start__.bind(t);t._sdk_=Promise.resolve().then(()=>{Ao.CONFIG.set("useSDK",!0),e()})}}),"__qcobjects_sdk__"),"__qcobjects_sdk__")(Ao._top);var va=Ao._top});var Ei=ne(Si=>{"use strict";Object.defineProperty(Si,"__esModule",{value:!0});var ie=x(),Oa=As(),vn;(0,ie.Package)("com.qcobjects.installer",[(vn=class extends ie.InheritClass{constructor(t){super(),this.root=t,window.addEventListener("beforeinstallprompt",()=>this.beforeinstallprompt.bind(this),!1),window.addEventListener("appinstalled",()=>this.installed.bind(this),!1),t.addEventListener("click",()=>this.install.bind(this)),t.addEventListener("touchend",()=>this.install.bind(this)),window.matchMedia("(display-mode: standalone)").addEventListener("change",e=>{let n="browser";e.matches&&(n="standalone"),Oa.NotificationComponent.success(`TWA in ${n} Mode`)}),(0,ie.set)("installer",this)}beforeinstallprompt(t){return ie.logger.debug("registering installer event"),t.preventDefault(),(0,ie.set)("promptEvent",t),this.root.classList.add("available"),!1}installed(){ie.logger.debug("app is already installed"),(0,ie.set)("promptEvent",null),this.root.classList.remove("available")}install(){let t=this.root;ie.logger.debug("installer actioned");let e=(0,ie.get)("promptEvent",null);e?(ie.logger.debug("prompt event"),e.prompt(),e.userChoice.then(function(n){n.outcome==="accepted"?t.classList.remove("available"):ie.logger.debug("User has chosen not to install the PWA"),e=null}).catch(function(n){e=null,t.classList.remove("available"),ie.logger.warn(`Error during install: ${n.toString()}`)})):ie.logger.debug("It is not possible to get the prompt event for install ")}},c(vn,"Installer"),vn)])});var Ni=ne(xi=>{"use strict";Object.defineProperty(xi,"__esModule",{value:!0});var ko=x(),On,Sn,En;(0,ko.Package)("org.quickcorp.custom.effects",[(On=class extends ko.TransitionEffect{constructor(){super(...arguments),this.duration=780,this.defaultParams={alphaFrom:0,alphaTo:1},this.effects=["Fade","MoveYInFromBottom"],this.fitToHeight=!0}},c(On,"MainTransitionEffect"),On),(Sn=class extends ko.TransitionEffect{constructor(){super(...arguments),this.duration=450,this.effects=["Fade","MoveXInFromLeft"],this.fitToWidth=!0}},c(Sn,"SlideLeftTransitionEffect"),Sn),(En=class extends ko.TransitionEffect{constructor(){super(...arguments),this.duration=450,this.effects=["Fade","MoveXInFromRight"],this.fitToWidth=!0}},c(En,"SlideRightTransitionEffect"),En)])});var Ti=ne(Ai=>{"use strict";Object.defineProperty(Ai,"__esModule",{value:!0});var Ii=x(),xn;(0,Ii.Package)("org.quickcorp.custom.models",[(xn=class extends Ii.VO{constructor(){super(...arguments),this.first_name="",this.last_name="",this.address="",this.postalCode="",this.city="",this.country="",this.email="",this.phone=""}},c(xn,"ContactVO"),xn)])});var Mi=ne(Pi=>{"use strict";Object.defineProperty(Pi,"__esModule",{value:!0});var we=x(),ks=class ks extends we.Component{constructor(){super(...arguments),this.name="github-grid",this.tplsource="inline",this.template=`
698
+ `;this.formValidatorModal.body.subelements(".validationMessage")[0].innerHTML=a,this.formValidatorModal.modal()}else this.save()}else V.logger.debug("Unable to find the modal validator..."),V.logger.debug("Saving data..."),this.save()}done(){V.logger.debugEnabled=!0;try{this.component.createBindingEvents();let t=(0,V._DOMCreateElement)("div");t.className="modal_body",this.formValidatorModal=(0,V.New)($s,{body:t,subcomponents:[],data:{content:'<div class="validationMessage"></div>'}}),(0,V.Tag)(".modal_body").map(e=>document.body.removeChild(e)),document.body.append(this.formValidatorModal.body)}catch(t){V.logger.debug(`Unable to create the modal: ${t}`)}this.onpress(".submit",()=>{this.formSaveTouchHandler()})}},c(en,"FormController"),_(en,"FormController"),en);(0,V.Package)("org.qcobjects.controllers.form",[Li,ki]);var te=x(),tn,ji=(tn=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(tn,"SwaggerUIController"),_(tn,"SwaggerUIController"),tn);(0,te.Package)("org.qcobjects.controllers.swagger",[ji]);var Di=x(),nn,qi=(nn=class extends Di.Controller{done(){let t=this.component;t.body.innerHTML=t.body.innerHTML.replace("/{{content}}/g",t.submodal.template)}},c(nn,"ModalController"),_(nn,"ModalController"),nn);(0,Di.Package)("org.qcobjects.modal.controllers",[qi]);var $i=x(),on,Fi=(on=class extends $i.View{},c(on,"GridView"),_(on,"GridView"),on);(0,$i.Package)("org.qcobjects.views",[Fi]);var Gi=x(),sn,Hi=(sn=class extends Gi.InheritClass{drawImageFilled(t,e,n=1,o=0,i=0){let r=Math.max(e.width/t.width,e.height/t.height);r=r*n;let a=e.width/2-t.width/2*r,l=e.height/2-t.height/2*r;e.getContext("2d")?.drawImage(t,o+a,i+l,t.width*r,t.height*r)}getImageResized(t,e,n,o,i=1,r=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,r,a),o.src=l.toDataURL("image/png"),l}},c(sn,"CanvasTool"),_(sn,"CanvasTool"),sn);(0,Gi.Package)("org.qcobjects.tools.canvas",[Hi]);var L=x(),rn,Bi=(rn=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=>Te.apply(t,0,1)),(0,L.Tag)("component>footer").map(t=>Te.apply(t,0,1)),(0,L.Tag)("component>header").map(t=>Te.apply(t,0,1)),(0,L.Tag)("nav").map(t=>{t.style.display="block",t.style.width=t.offsetParent?.scrollWidth.toString()||t.clientWidth.toString(),ks.apply(t)}),(0,L.Tag)("component>article").map(t=>{t.style.display="block",t.style.height=t.offsetParent?.scrollHeight.toString()||t.clientHeight.toString(),Ls.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(),Rs.apply(t)})},300)}},c(rn,"BasicLayout"),_(rn,"BasicLayout"),rn);(0,L.Package)("org.qcobjects.tools.layouts",[Bi]);var K=x(),H,Oo=(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",[Oo]);var Ps=x(),an,Ui=(an=class extends Ps.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 Oo>"u")throw new Error('You need to import SessionUserToken first: Import ("org.qcobjects.cloud.auth.session.usertoken")');return`session_${btoa(Oo.getGlobalUserToken(t))}`}save(...t){let e=(0,Ps._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(an,"SessionData"),_(an,"SessionData"),an);(0,Ps.Package)("org.qcobjects.cloud.auth.session.data",[Ui]);_(c((function s(t){"use strict";if(typeof Object.defineProperty<"u"&&typeof t<"u")try{Object.defineProperty(t,"__qcobjects_sdk__",{enumerable:!0,configurable:!1,writable:!1,value:s})}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=Co.GlobalSettings.__start__.bind(t);t._sdk_=Promise.resolve().then(()=>{Co.CONFIG.set("useSDK",!0),e()})}}),"__qcobjects_sdk__"),"__qcobjects_sdk__")(Co._top);var ja=Co._top});var zi=ne(No=>{"use strict";Object.defineProperty(No,"__esModule",{value:!0});No.Installer=void 0;var ie=x(),Da=Hs(),Bs=class Bs extends ie.InheritClass{constructor(t){super(),this.root=t,window.addEventListener("beforeinstallprompt",()=>this.beforeinstallprompt.bind(this),!1),window.addEventListener("appinstalled",()=>this.installed.bind(this),!1),t.addEventListener("click",()=>this.install.bind(this)),t.addEventListener("touchend",()=>this.install.bind(this)),window.matchMedia("(display-mode: standalone)").addEventListener("change",e=>{let n="browser";e.matches&&(n="standalone"),Da.NotificationComponent.success(`TWA in ${n} Mode`)}),(0,ie.set)("installer",this)}beforeinstallprompt(t){return ie.logger.debug("registering installer event"),t.preventDefault(),(0,ie.set)("promptEvent",t),this.root.classList.add("available"),!1}installed(){ie.logger.debug("app is already installed"),(0,ie.set)("promptEvent",null),this.root.classList.remove("available")}install(){let t=this.root;ie.logger.debug("installer actioned");let e=(0,ie.get)("promptEvent",null);e?(ie.logger.debug("prompt event"),e.prompt(),e.userChoice.then(function(n){n.outcome==="accepted"?t.classList.remove("available"):ie.logger.debug("User has chosen not to install the PWA"),e=null}).catch(function(n){e=null,t.classList.remove("available"),ie.logger.warn(`Error during install: ${n.toString()}`)})):ie.logger.debug("It is not possible to get the prompt event for install ")}};c(Bs,"Installer");var xo=Bs;No.Installer=xo;(0,ie.Package)("com.qcobjects.installer",[xo])});var Vi=ne(Ge=>{"use strict";Object.defineProperty(Ge,"__esModule",{value:!0});Ge.SlideRightTransitionEffect=Ge.SlideLeftTransitionEffect=Ge.MainTransitionEffect=void 0;var Po=x(),Us=class Us extends Po.TransitionEffect{constructor(){super(...arguments),this.duration=780,this.defaultParams={alphaFrom:0,alphaTo:1},this.effects=["Fade","MoveYInFromBottom"],this.fitToHeight=!0}};c(Us,"MainTransitionEffect");var Ao=Us;Ge.MainTransitionEffect=Ao;var Ws=class Ws extends Po.TransitionEffect{constructor(){super(...arguments),this.duration=450,this.effects=["Fade","MoveXInFromLeft"],this.fitToWidth=!0}};c(Ws,"SlideLeftTransitionEffect");var Io=Ws;Ge.SlideLeftTransitionEffect=Io;var zs=class zs extends Po.TransitionEffect{constructor(){super(...arguments),this.duration=450,this.effects=["Fade","MoveXInFromRight"],this.fitToWidth=!0}};c(zs,"SlideRightTransitionEffect");var To=zs;Ge.SlideRightTransitionEffect=To;(0,Po.Package)("org.quickcorp.custom.effects",[Ao,Io,To])});var Qi=ne(Ro=>{"use strict";Object.defineProperty(Ro,"__esModule",{value:!0});Ro.ContactVO=void 0;var Ji=x(),Vs=class Vs extends Ji.VO{constructor(){super(...arguments),this.first_name="",this.last_name="",this.address="",this.postalCode="",this.city="",this.country="",this.email="",this.phone=""}};c(Vs,"ContactVO");var Mo=Vs;Ro.ContactVO=Mo;(0,Ji.Package)("org.quickcorp.custom.models",[Mo])});var Zi=ne(de=>{"use strict";Object.defineProperty(de,"__esModule",{value:!0});de.AdminButton=de.AdminSidebarOption=de.AdminCheckComponent=de.DeployGrid=de.GitHubGrid=void 0;var Ce=x(),Js=class Js extends Ce.Component{constructor(){super(...arguments),this.name="github-grid",this.tplsource="inline",this.template=`
699
699
  <style>
700
700
  $layout(landscape,css/desktop/components/github-grid.css)
701
701
  $layout(portrait,css/mobile/components/github-grid.css)
@@ -706,7 +706,7 @@
706
706
  }
707
707
  </style>
708
708
  $mapper(github-card,result)
709
- `}};c(ks,"GitHubGrid");var Ts=ks,Ls=class Ls extends we.Component{constructor(){super(...arguments),this.name="deploygrid",this.template=`
709
+ `}};c(Js,"GitHubGrid");var ko=Js;de.GitHubGrid=ko;var Qs=class Qs extends Ce.Component{constructor(){super(...arguments),this.name="deploygrid",this.template=`
710
710
  <style>
711
711
  $layout(landscape,css/desktop/components/deploy-grid.css)
712
712
  $layout(portrait,css/mobile/components/deploy-grid.css)
@@ -724,7 +724,7 @@
724
724
  <netlify-button effectClass=SlideRightTransitionEffect apply-effect-to=observe></netlify-button>
725
725
  <github-button effectClass=SlideLeftTransitionEffect apply-effect-to=observe></github-button>
726
726
  </div>
727
- `}};c(Ls,"DeployGrid");var Ps=Ls,js=class js extends we.Component{constructor(t){t.body?.setAttribute("serviceClass","AdminCheckService"),t.body?.setAttribute("response-to","data"),super(t),this.shadowed=!0,this.tplsource="inline"}};c(js,"AdminCheckComponent");var Lo=js,Ds=class Ds extends Lo{constructor(){super(...arguments),this.name="admin-sidebar-option",this.template=`
727
+ `}};c(Qs,"DeployGrid");var Lo=Qs;de.DeployGrid=Lo;var Zs=class Zs extends Ce.Component{constructor(t){t.body?.setAttribute("serviceClass","AdminCheckService"),t.body?.setAttribute("response-to","data"),super(t),this.shadowed=!0,this.tplsource="inline"}};c(Zs,"AdminCheckComponent");var Qn=Zs;de.AdminCheckComponent=Qn;var Xs=class Xs extends Qn{constructor(){super(...arguments),this.name="admin-sidebar-option",this.template=`
728
728
  <style>
729
729
  .admin_option_container {
730
730
  padding:0;
@@ -783,7 +783,7 @@
783
783
  </details>
784
784
 
785
785
  </div>
786
- `}done(t){let e=t.component;console.log(e.serviceData);try{JSON.parse(e.serviceData)?.hasAdmin?we.logger.debug("Admin module is present"):(we.logger.debug("Admin module is NOT present. Install admin module in a dynamic served application (non-static server)"),this.shadowRoot?.querySelector("style")?.remove(),this.shadowRoot?.querySelector(".admin_option_container")?.remove())}catch(n){we.logger.debug(`It was not possible to check if admin module is present: ${n}`),this.shadowRoot?.querySelector("style")?.remove(),this.shadowRoot?.querySelector(".admin_option_container")?.remove()}return super.done(t)}};c(Ds,"AdminSidebarOption");var Ms=Ds,qs=class qs extends Lo{constructor(){super(...arguments),this.name="admin-button",this.template=`
786
+ `}done(t){let e=t.component;console.log(e.serviceData);try{JSON.parse(e.serviceData)?.hasAdmin?Ce.logger.debug("Admin module is present"):(Ce.logger.debug("Admin module is NOT present. Install admin module in a dynamic served application (non-static server)"),this.shadowRoot?.querySelector("style")?.remove(),this.shadowRoot?.querySelector(".admin_option_container")?.remove())}catch(n){Ce.logger.debug(`It was not possible to check if admin module is present: ${n}`),this.shadowRoot?.querySelector("style")?.remove(),this.shadowRoot?.querySelector(".admin_option_container")?.remove()}return super.done(t)}};c(Xs,"AdminSidebarOption");var jo=Xs;de.AdminSidebarOption=jo;var Ks=class Ks extends Qn{constructor(){super(...arguments),this.name="admin-button",this.template=`
787
787
  <style>
788
788
  .admin_button_container {
789
789
  float: left;
@@ -806,7 +806,7 @@
806
806
  <div class="admin_button_container">
807
807
  <a href="/admin" class="topmenu">Admin</a>
808
808
  </div>
809
- `}done(t){let e=t.component;console.log(e.serviceData);try{JSON.parse(e.serviceData)?.hasAdmin?we.logger.debug("Admin module is present"):(we.logger.debug("Admin module is NOT present. Install admin module in a dynamic served application (non-static server)"),this.shadowRoot?.querySelector("style")?.remove(),this.shadowRoot?.querySelector(".admin_button_container")?.remove())}catch(n){we.logger.debug(`It was not possible to check if admin module is present: ${n}`),this.shadowRoot?.querySelector("style")?.remove(),this.shadowRoot?.querySelector(".admin_button_container")?.remove()}return super.done(t)}};c(qs,"AdminButton");var Rs=qs;(0,we.Package)("org.quickcorp.custom.components",[Rs,Ms,Ps,Ts])});var ki=ne(Ri=>{"use strict";Object.defineProperty(Ri,"__esModule",{value:!0});var ae=x(),Sa=As(),$e,Nn,In;(0,ae.Package)("org.quickcorp.custom.controllers",[($e=class extends ae.Controller{constructor(t){ae.logger.debug("Initializing MainController..."),super(t)}done(...t){let e=super.done();if(!$e.loaded){let n=(0,ae._DOMCreateElement)("style");n.innerHTML=`
809
+ `}done(t){let e=t.component;console.log(e.serviceData);try{JSON.parse(e.serviceData)?.hasAdmin?Ce.logger.debug("Admin module is present"):(Ce.logger.debug("Admin module is NOT present. Install admin module in a dynamic served application (non-static server)"),this.shadowRoot?.querySelector("style")?.remove(),this.shadowRoot?.querySelector(".admin_button_container")?.remove())}catch(n){Ce.logger.debug(`It was not possible to check if admin module is present: ${n}`),this.shadowRoot?.querySelector("style")?.remove(),this.shadowRoot?.querySelector(".admin_button_container")?.remove()}return super.done(t)}};c(Ks,"AdminButton");var Do=Ks;de.AdminButton=Do;(0,Ce.Package)("org.quickcorp.custom.components",[Do,jo,Lo,ko])});var Xi=ne(He=>{"use strict";Object.defineProperty(He,"__esModule",{value:!0});He.HeaderController=He.SideNavController=He.MainController=void 0;var ae=x(),qa=Hs(),Zn=class Zn extends ae.Controller{constructor(t){ae.logger.debug("Initializing MainController..."),super(t)}done(...t){let e=super.done();if(!Zn.loaded){let n=(0,ae._DOMCreateElement)("style");n.innerHTML=`
810
810
  @import url(css/body-layout.css);
811
- `,document.body.append(n),ae.logger.debug("MainController loaded"),$e.loaded=!0}return e}},c($e,"MainController"),$e),(Nn=class extends ae.Controller{constructor(t){ae.logger.debug("Initializing SideNavController..."),super(t),this.component=t.component,this.component.shadowed?this.componentRoot=this.component.shadowRoot:this.componentRoot=this.component.body,(0,ae.set)("sideNavController",this),this.effect=new Sa.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(Nn,"SideNavController"),Nn),(In=class extends ae.Controller{constructor(t){super(t),ae.logger.debug("Header controller initialized")}loadInstallerButton(){let t=this.component.shadowed?this.component.shadowRoot:this.component.body;if(typeof t>"u"||t===null){ae.logger.debug("HeaderController has no component root yet, skipping installer button");return}t.subelements("#installerbutton").map(e=>(this.installer=(0,ae.New)((0,ae.ClassFactory)("Installer"),e),e))}done(...t){let e=super.done();return this.loadInstallerButton(),e}},c(In,"HeaderController"),In)])});var Di=ne(ji=>{"use strict";Object.defineProperty(ji,"__esModule",{value:!0});var Li=x(),An;(0,Li.Package)("org.quickcorp.custom.views",[(An=class extends Li.View{done(...t){let e=super.done(t),n=this.component;return n!==void 0&&n.body!==void 0&&(n.body.style.display="block",n.body.style.width="100px",n.body.style.height="100px"),e}},c(An,"CardView"),An)])});var $i=ne(qi=>{"use strict";Object.defineProperty(qi,"__esModule",{value:!0});var Tn=x(),Pn,Mn,Rn,kn;(0,Tn.Package)("com.qcobjects.services.github",[(Pn=class extends Tn.JSONService{constructor(){super(...arguments),this.name="myservice",this.external=!0,this.cached=!1,this.method="GET",this.headers={"Content-Type":"application/json"},this.url="https://api.github.com/orgs/QuickCorp/repos",this.withCredentials=!1}done({request:t,service:e}){let n=JSON.parse(e.template).reverse().map(function(o){return{id:o.id,description:o.description,title:o.name,url:o.html_url,repo_stargazers_count:o.stargazers_count,repo_watchers_count:o.watchers_count}});return e.template=JSON.stringify({result:n}),super.done({request:t,service:e})}},c(Pn,"GitHubService"),Pn),(Mn=class extends Tn.JSONService{constructor(){super(...arguments),this.name="myservice",this.external=!0,this.cached=!1,this.method="GET",this.headers={"Content-Type":"application/json"},this.url="https://api.github.com/search/repositories?q=qcobjects",this.withCredentials=!1}done({request:t,service:e}){Tn.logger.debug(String(t));let n=JSON.parse(e.template).items.map(function(o){return{id:o.id,description:o.description,title:o.name,url:o.html_url,repo_stargazers_count:o.stargazers_count,repo_watchers_count:o.watchers_count}});return e.template=JSON.stringify({result:n}),super.done({request:t,service:e})}},c(Mn,"GitHubTagService"),Mn),(Rn=class extends Tn.Service{constructor(){super(...arguments),this.name="qcobjects_version_service",this.external=!0,this.cached=!1,this.method="GET",this.headers={"Content-Type":"application/json"},this.url="https://api.github.com/repos/QuickCorp/QCObjects/tags",this.withCredentials=!1}done({service:t}){let e=JSON.parse(t.template)[0];t.template={version:e.name}}},c(Rn,"QCObjectsVersionService"),Rn),(kn=class extends Tn.Service{constructor(){super(...arguments),this.name="qcobjects_stars_forks_service",this.external=!0,this.cached=!1,this.method="GET",this.headers={"Content-Type":"application/json"},this.url="https://api.github.com/repos/QuickCorp/QCObjects",this.withCredentials=!1}done({service:t}){let e=JSON.parse(t.template);t.template={forks:e.forks_count,stars:e.stargazers_count,watchers:e.watchers_count,size:Math.round(e.size/1e3)}}},c(kn,"QCObjectsStarsForksService"),kn)])});var Gi=ne(Fi=>{"use strict";Object.defineProperty(Fi,"__esModule",{value:!0});var jo=x(),Ln;(0,jo.Package)("com.qcobjects.services.newapp",[(Ln=class extends jo.Service{constructor(){super(...arguments),this.url="/admin"}done(t){let e=c(n=>/<base href="\/admin\/" target="_self">/.test(n),"hasAdmin");t.service.template=(0,jo._DataStringify)({hasAdmin:e(t.service.template)})}fail(t){t.service.template=(0,jo._DataStringify)({hasAdmin:!1})}},c(Ln,"AdminCheckService"),Ln)])});var Bi=ne(Hi=>{"use script";"use strict";Object.defineProperty(Hi,"__esModule",{value:!0});Ei();Ni();Ti();Mi();ki();Di();$i();Gi()});var zi=ne(Wi=>{"use strict";Object.defineProperty(Wi,"__esModule",{value:!0});var Ui=x();(0,Ui.RegisterWidgets)("layout-basic","splash-screen","github-grid","octocat-icon","lib-list");(0,Ui.RegisterWidgets)("gitpod-button","netlify-button","aws-button","github-button","codespaces-button","deploy-grid")});var Ea=ne(Vi=>{Object.defineProperty(Vi,"__esModule",{value:!0});Ar();Bi();zi()});return Ea();})();
811
+ `,document.body.append(n),ae.logger.debug("MainController loaded"),Zn.loaded=!0}return e}};c(Zn,"MainController");var qo=Zn;He.MainController=qo;var Ys=class Ys extends ae.Controller{constructor(t){ae.logger.debug("Initializing SideNavController..."),super(t),this.component=t.component,this.component.shadowed?this.componentRoot=this.component.shadowRoot:this.componentRoot=this.component.body,(0,ae.set)("sideNavController",this),this.effect=new qa.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(Ys,"SideNavController");var $o=Ys;He.SideNavController=$o;var er=class er extends ae.Controller{constructor(t){super(t),ae.logger.debug("Header controller initialized")}loadInstallerButton(){let t=this.component.shadowed?this.component.shadowRoot:this.component.body;if(typeof t>"u"||t===null){ae.logger.debug("HeaderController has no component root yet, skipping installer button");return}t.subelements("#installerbutton").map(e=>(this.installer=(0,ae.New)((0,ae.ClassFactory)("Installer"),e),e))}done(...t){let e=super.done();return this.loadInstallerButton(),e}};c(er,"HeaderController");var Fo=er;He.HeaderController=Fo;(0,ae.Package)("org.quickcorp.custom.controllers",[qo,$o,Fo])});var Yi=ne(Ho=>{"use strict";Object.defineProperty(Ho,"__esModule",{value:!0});Ho.CardView=void 0;var Ki=x(),tr=class tr extends Ki.View{done(...t){let e=super.done(t),n=this.component;return n!==void 0&&n.body!==void 0&&(n.body.style.display="block",n.body.style.width="100px",n.body.style.height="100px"),e}};c(tr,"CardView");var Go=tr;Ho.CardView=Go;(0,Ki.Package)("org.quickcorp.custom.views",[Go])});var ea=ne(ve=>{"use strict";Object.defineProperty(ve,"__esModule",{value:!0});ve.QCObjectsStarsForksService=ve.QCObjectsVersionService=ve.GitHubTagService=ve.GitHubService=void 0;var En=x(),nr=class nr extends En.JSONService{constructor(){super(),this.name="myservice",this.external=!0,this.cached=!1,this.method="GET",this.headers={"Content-Type":"application/json",charset:"utf-8"},this.url="https://api.github.com/orgs/QuickCorp/repos",this.withCredentials=!1,delete this.headers.charset}done({request:t,service:e}){let n=JSON.parse(e.template).reverse().map(function(o){return{id:o.id,description:o.description,title:o.name,url:o.html_url,repo_stargazers_count:o.stargazers_count,repo_watchers_count:o.watchers_count}});return e.template=JSON.stringify({result:n}),super.done({request:t,service:e})}};c(nr,"GitHubService");var Bo=nr;ve.GitHubService=Bo;var or=class or extends En.JSONService{constructor(){super(),this.name="myservice",this.external=!0,this.cached=!1,this.method="GET",this.headers={"Content-Type":"application/json",charset:"utf-8"},this.url="https://api.github.com/search/repositories?q=qcobjects",this.withCredentials=!1,delete this.headers.charset}done({request:t,service:e}){En.logger.debug(String(t));let n=JSON.parse(e.template).items.map(function(o){return{id:o.id,description:o.description,title:o.name,url:o.html_url,repo_stargazers_count:o.stargazers_count,repo_watchers_count:o.watchers_count}});return e.template=JSON.stringify({result:n}),super.done({request:t,service:e})}};c(or,"GitHubTagService");var Uo=or;ve.GitHubTagService=Uo;var sr=class sr extends En.Service{constructor(){super(),this.name="qcobjects_version_service",this.external=!0,this.cached=!1,this.method="GET",this.headers={"Content-Type":"application/json",charset:"utf-8"},this.url="https://api.github.com/repos/QuickCorp/QCObjects/tags",this.withCredentials=!1,delete this.headers.charset}done({service:t}){let e=JSON.parse(t.template)[0];t.template={version:e.name}}};c(sr,"QCObjectsVersionService");var Wo=sr;ve.QCObjectsVersionService=Wo;var rr=class rr extends En.Service{constructor(){super(),this.name="qcobjects_stars_forks_service",this.external=!0,this.cached=!1,this.method="GET",this.headers={"Content-Type":"application/json",charset:"utf-8"},this.url="https://api.github.com/repos/QuickCorp/QCObjects",this.withCredentials=!1,delete this.headers.charset}done({service:t}){let e=JSON.parse(t.template);t.template={forks:e.forks_count,stars:e.stargazers_count,watchers:e.watchers_count,size:Math.round(e.size/1e3)}}};c(rr,"QCObjectsStarsForksService");var zo=rr;ve.QCObjectsStarsForksService=zo;(0,En.Package)("com.qcobjects.services.github",[Bo,Uo,Wo,zo])});var ta=ne(Qo=>{"use strict";Object.defineProperty(Qo,"__esModule",{value:!0});Qo.AdminCheckService=void 0;var Vo=x(),ir=class ir extends Vo.Service{constructor(){super(...arguments),this.url="/admin"}done(t){let e=c(n=>/<base href="\/admin\/" target="_self">/.test(n),"hasAdmin");t.service.template=(0,Vo._DataStringify)({hasAdmin:e(t.service.template)})}fail(t){t.service.template=(0,Vo._DataStringify)({hasAdmin:!1})}};c(ir,"AdminCheckService");var Jo=ir;Qo.AdminCheckService=Jo;(0,Vo.Package)("com.qcobjects.services.newapp",[Jo])});var oa=ne(na=>{"use script";"use strict";Object.defineProperty(na,"__esModule",{value:!0});zi();Vi();Qi();Zi();Xi();Yi();ea();ta()});var ia=ne(ra=>{"use strict";Object.defineProperty(ra,"__esModule",{value:!0});var sa=x();(0,sa.RegisterWidgets)("layout-basic","splash-screen","github-grid","octocat-icon","lib-list");(0,sa.RegisterWidgets)("gitpod-button","netlify-button","aws-button","github-button","codespaces-button","deploy-grid")});var $a=ne(aa=>{Object.defineProperty(aa,"__esModule",{value:!0});Xr();oa();ia()});return $a();})();
812
812
  //# sourceMappingURL=init.js.map