qcobjects 2.5.124-beta → 2.5.133-beta

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 (105) hide show
  1. package/Dockerfile +3 -3
  2. package/VERSION +1 -1
  3. package/build/ArrayCollection.js +2 -2
  4. package/build/Base64.js +14 -12
  5. package/build/ComponentFactory.js +2 -2
  6. package/build/DataStringify.js +1 -1
  7. package/build/DefaultTemplateHandler.js +5 -5
  8. package/build/ObjectName.js +1 -1
  9. package/build/QCObjects.js +0 -1
  10. package/build/Ready.js +3 -3
  11. package/build/WidgetsFactory.js +2 -2
  12. package/build/asyncLoad.js +3 -3
  13. package/build/basePath.js +6 -11
  14. package/build/index.js +1 -1
  15. package/build/introspection.js +1 -1
  16. package/build/is_a.js +1 -1
  17. package/build/is_forbidden_name.js +1 -1
  18. package/build/is_raw_class.js +1 -1
  19. package/build/loadSDK.js +2 -2
  20. package/build/make_global.js +1 -1
  21. package/build/range.js +1 -1
  22. package/build/routings.js +2 -2
  23. package/build/shortCode.js +1 -1
  24. package/build/waitUntil.js +2 -2
  25. package/build-esbuild.js +5 -6
  26. package/eslint.config.mjs +1 -1
  27. package/package.json +17 -9
  28. package/public/browser/QCObjects.js +127 -136
  29. package/public/browser/QCObjects.js.map +4 -4
  30. package/public/cjs/{QCObjects.cjs → index.cjs} +141 -242
  31. package/public/cjs/index.cjs.map +7 -0
  32. package/public/esm/{QCObjects.mjs → index.mjs} +229 -231
  33. package/public/esm/index.mjs.map +7 -0
  34. package/public/types/index.d.ts +99 -108
  35. package/public/types/index.d.ts.map +1 -0
  36. package/spec/helpers/mock-sdk.helper.ts +0 -3
  37. package/spec/testsClassFactorySpec.ts +1 -1
  38. package/spec/testsConfigSpec.ts +1 -1
  39. package/src/ArrayCollection.ts +7 -7
  40. package/src/BackendMicroservice.ts +14 -13
  41. package/src/Base64.ts +87 -87
  42. package/src/CONFIG.ts +3 -3
  43. package/src/Class.ts +1 -1
  44. package/src/ClassFactory.ts +1 -1
  45. package/src/ComplexStorageCache.ts +5 -5
  46. package/src/Component.ts +19 -19
  47. package/src/ComponentFactory.ts +4 -4
  48. package/src/Controller.ts +7 -7
  49. package/src/Crypt.ts +16 -16
  50. package/src/DDO.ts +2 -2
  51. package/src/DOMCreateElement.ts +9 -9
  52. package/src/DataStringify.ts +14 -14
  53. package/src/DefaultTemplateHandler.ts +45 -45
  54. package/src/Effect.ts +7 -7
  55. package/src/Export.ts +6 -6
  56. package/src/IncrementInstanceID.ts +1 -1
  57. package/src/InheritClass.ts +26 -26
  58. package/src/Logger.ts +4 -4
  59. package/src/MainProcess.ts +1 -1
  60. package/src/ObjectName.ts +1 -1
  61. package/src/PrimaryCollections.ts +2 -2
  62. package/src/Processor.ts +20 -20
  63. package/src/QCObjects.ts +1 -2
  64. package/src/Ready.ts +4 -4
  65. package/src/Service.ts +8 -8
  66. package/src/SourceCSS.ts +42 -42
  67. package/src/SourceJS.ts +8 -8
  68. package/src/Tag.ts +4 -4
  69. package/src/Timer.ts +2 -2
  70. package/src/Toggle.ts +2 -2
  71. package/src/TransitionEffect.ts +3 -4
  72. package/src/View.ts +2 -1
  73. package/src/WidgetsFactory.ts +3 -3
  74. package/src/assign.ts +1 -0
  75. package/src/asyncLoad.ts +5 -5
  76. package/src/basePath.ts +7 -14
  77. package/src/captureFalseTouch.ts +1 -1
  78. package/src/componentLoader.ts +1 -1
  79. package/src/defaultProcessors.ts +3 -3
  80. package/src/globalSettings.ts +24 -24
  81. package/src/index.cts +1 -1
  82. package/src/index.mts +1 -1
  83. package/src/index.ts +1 -1
  84. package/src/introspection.ts +78 -78
  85. package/src/is_a.ts +12 -12
  86. package/src/is_forbidden_name.ts +11 -12
  87. package/src/is_raw_class.ts +3 -3
  88. package/src/loadSDK.ts +2 -2
  89. package/src/make_global.ts +1 -1
  90. package/src/range.ts +12 -12
  91. package/src/routings.ts +3 -3
  92. package/src/secretKey.ts +1 -1
  93. package/src/serviceLoader.ts +1 -1
  94. package/src/shortCode.ts +9 -9
  95. package/src/top.ts +4 -4
  96. package/src/types/global/index.d.ts +4 -5
  97. package/src/uniqueID.ts +1 -1
  98. package/src/waitUntil.ts +2 -2
  99. package/tsconfig.d.json +30 -4
  100. package/tsconfig.jasmine.json +30 -5
  101. package/tsconfig.json +18 -2
  102. package/build/index.cjs +0 -7
  103. package/build/index.mjs +0 -2
  104. package/public/cjs/QCObjects.cjs.map +0 -7
  105. package/public/esm/QCObjects.mjs.map +0 -7
@@ -41,44 +41,12 @@ var global = (() => {
41
41
  ));
42
42
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
43
43
 
44
- // src/assign.ts
45
- var require_assign = __commonJS({
46
- "src/assign.ts"() {
47
- "use strict";
48
- if (typeof Object.assign !== "function") {
49
- Object.defineProperty(Object, "assign", {
50
- // eslint-disable-next-line no-unused-vars
51
- value: /* @__PURE__ */ __name(function assign(target, varArgs) {
52
- "use strict";
53
- if (target === null) {
54
- throw new TypeError("Cannot convert undefined or null to object");
55
- }
56
- const to = Object(target);
57
- for (let index = 1; index < arguments.length; index++) {
58
- const nextSource = arguments[index];
59
- if (nextSource !== null) {
60
- for (const nextKey in nextSource) {
61
- if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {
62
- to[nextKey] = nextSource[nextKey];
63
- }
64
- }
65
- }
66
- }
67
- return to;
68
- }, "assign"),
69
- writable: true,
70
- configurable: true
71
- });
72
- }
73
- }
74
- });
75
-
76
44
  // src/is_raw_class.ts
77
45
  var __is_raw_class__;
78
46
  var init_is_raw_class = __esm({
79
47
  "src/is_raw_class.ts"() {
80
48
  "use strict";
81
- __is_raw_class__ = /* @__PURE__ */ __name(function(o_c) {
49
+ __is_raw_class__ = /* @__PURE__ */ __name((o_c) => {
82
50
  return !!(typeof o_c === "function" && o_c.toString().startsWith("class"));
83
51
  }, "__is_raw_class__");
84
52
  }
@@ -89,7 +57,7 @@ var global = (() => {
89
57
  var init_ObjectName = __esm({
90
58
  "src/ObjectName.ts"() {
91
59
  "use strict";
92
- ObjectName = /* @__PURE__ */ __name(function(o) {
60
+ ObjectName = /* @__PURE__ */ __name((o) => {
93
61
  let ret = "";
94
62
  if (typeof o === "function" && Object.hasOwn(o, "name") && o.name !== "") {
95
63
  ret = o.name;
@@ -143,7 +111,7 @@ var global = (() => {
143
111
  "src/make_global.ts"() {
144
112
  "use strict";
145
113
  init_top();
146
- __make_global__ = /* @__PURE__ */ __name(function(f) {
114
+ __make_global__ = /* @__PURE__ */ __name((f) => {
147
115
  if (!!f && !!f.name) {
148
116
  if (typeof _top !== "undefined" && typeof f !== "undefined" && _top !== null && !Object.hasOwn(_top, f.name)) {
149
117
  set(f.name, f);
@@ -470,7 +438,7 @@ var global = (() => {
470
438
  var init_introspection = __esm({
471
439
  "src/introspection.ts"() {
472
440
  "use strict";
473
- _protected_code_ = /* @__PURE__ */ __name(function(_) {
441
+ _protected_code_ = /* @__PURE__ */ __name((_) => {
474
442
  const __oldtoString = typeof _.prototype !== "undefined" ? _.prototype.toString : function() {
475
443
  return "";
476
444
  };
@@ -813,7 +781,7 @@ var global = (() => {
813
781
  init_getType();
814
782
  init_isQCObjects();
815
783
  init_ObjectName();
816
- is_a = /* @__PURE__ */ __name(function is_a2(obj, typeName) {
784
+ is_a = /* @__PURE__ */ __name((obj, typeName) => {
817
785
  return !!(typeof obj !== "undefined" && obj !== null && ((isQCObjects_Class(obj) || isQCObjects_Object(obj)) && obj.hierarchy().includes(typeName) || __getType__(obj) === typeName || ObjectName(obj) === typeName || typeof obj === typeName));
818
786
  }, "is_a");
819
787
  }
@@ -824,7 +792,7 @@ var global = (() => {
824
792
  var init_is_forbidden_name = __esm({
825
793
  "src/is_forbidden_name.ts"() {
826
794
  "use strict";
827
- __is__forbidden_name__ = /* @__PURE__ */ __name(function(name) {
795
+ __is__forbidden_name__ = /* @__PURE__ */ __name((name) => {
828
796
  return ["__proto__", "prototype", "Object", "Map", "defineProperty", "indexOf", "toString", "__instanceID", "function", "Function"].indexOf(name) !== -1;
829
797
  }, "__is__forbidden_name__");
830
798
  }
@@ -1162,13 +1130,16 @@ var global = (() => {
1162
1130
  var init_Base64 = __esm({
1163
1131
  "src/Base64.ts"() {
1164
1132
  "use strict";
1165
- Base64 = {
1166
- _keyStr: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
1167
- encode(e) {
1133
+ Base64 = class _Base64 {
1134
+ static {
1135
+ __name(this, "Base64");
1136
+ }
1137
+ static _keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
1138
+ static encode(e) {
1168
1139
  let t = "";
1169
1140
  let n, r, i, s, o, u, a;
1170
1141
  let f = 0;
1171
- e = Base64._utf8_encode(e);
1142
+ e = _Base64._utf8_encode(e);
1172
1143
  while (f < e.length) {
1173
1144
  n = e.charCodeAt(f++);
1174
1145
  r = e.charCodeAt(f++);
@@ -1185,8 +1156,8 @@ var global = (() => {
1185
1156
  t = t + this._keyStr.charAt(s) + this._keyStr.charAt(o) + this._keyStr.charAt(u) + this._keyStr.charAt(a);
1186
1157
  }
1187
1158
  return t;
1188
- },
1189
- decode(e) {
1159
+ }
1160
+ static decode(e) {
1190
1161
  let t = "";
1191
1162
  let n, r, i;
1192
1163
  let s, o, u, a;
@@ -1208,10 +1179,10 @@ var global = (() => {
1208
1179
  t = t + String.fromCharCode(i);
1209
1180
  }
1210
1181
  }
1211
- t = Base64._utf8_decode(t);
1182
+ t = _Base64._utf8_decode(t);
1212
1183
  return t;
1213
- },
1214
- _utf8_encode(e) {
1184
+ }
1185
+ static _utf8_encode(e) {
1215
1186
  e = e.replace(/rn/g, "n");
1216
1187
  let t = "";
1217
1188
  for (let n = 0; n < e.length; n++) {
@@ -1228,8 +1199,8 @@ var global = (() => {
1228
1199
  }
1229
1200
  }
1230
1201
  return t;
1231
- },
1232
- _utf8_decode(e) {
1202
+ }
1203
+ static _utf8_decode(e) {
1233
1204
  let t = "";
1234
1205
  let n = 0;
1235
1206
  let r = 0;
@@ -1258,12 +1229,12 @@ var global = (() => {
1258
1229
  });
1259
1230
 
1260
1231
  // src/basePath.ts
1261
- var _basePath_, setBasePath;
1232
+ var import_node_process, _basePath_, setBasePath;
1262
1233
  var init_basePath = __esm({
1263
1234
  "src/basePath.ts"() {
1264
1235
  "use strict";
1265
- init_Logger();
1266
1236
  init_platform();
1237
+ import_node_process = __toESM(__require("node:process"));
1267
1238
  _basePath_ = function() {
1268
1239
  let _basePath = "";
1269
1240
  if (isBrowser) {
@@ -1271,14 +1242,8 @@ var global = (() => {
1271
1242
  baseURI.pop();
1272
1243
  _basePath = baseURI.join("/") + "/";
1273
1244
  } else {
1274
- let process2;
1275
- try {
1276
- process2 = _require_("process");
1277
- } catch (e) {
1278
- logger.debug(`An error ocurred: ${e}.`);
1279
- }
1280
- if (typeof process2 !== "undefined") {
1281
- _basePath = `${process2.cwd()}/`;
1245
+ if (typeof import_node_process.default !== "undefined") {
1246
+ _basePath = `${import_node_process.default.cwd()}/`;
1282
1247
  } else {
1283
1248
  _basePath = "";
1284
1249
  }
@@ -1297,7 +1262,7 @@ var global = (() => {
1297
1262
  "src/DataStringify.ts"() {
1298
1263
  "use strict";
1299
1264
  init_LegacyCopy();
1300
- _DataStringify = /* @__PURE__ */ __name(function(data) {
1265
+ _DataStringify = /* @__PURE__ */ __name((data) => {
1301
1266
  const getCircularReplacer = /* @__PURE__ */ __name(function() {
1302
1267
  const seen = /* @__PURE__ */ new WeakSet();
1303
1268
  let _level = 0;
@@ -1673,7 +1638,7 @@ var global = (() => {
1673
1638
  var init_routings = __esm({
1674
1639
  "src/routings.ts"() {
1675
1640
  "use strict";
1676
- __routing_params__ = /* @__PURE__ */ __name(function(routing, routingPath) {
1641
+ __routing_params__ = /* @__PURE__ */ __name((routing, routingPath) => {
1677
1642
  const standardRoutingPath = routing.path.replace(/{(.*?)}/g, "(?<$1>.*)");
1678
1643
  return {
1679
1644
  ...[...routingPath.matchAll(new RegExp(standardRoutingPath, "g"))][0].groups
@@ -1685,7 +1650,7 @@ var global = (() => {
1685
1650
  return new RegExp(standardRoutingPath, "g").test(routingPath);
1686
1651
  }).reverse();
1687
1652
  }, "__valid_routings__");
1688
- __valid_routing_way__ = /* @__PURE__ */ __name(function(validRoutingWays, routingWay) {
1653
+ __valid_routing_way__ = /* @__PURE__ */ __name((validRoutingWays, routingWay) => {
1689
1654
  return validRoutingWays.includes(routingWay);
1690
1655
  }, "__valid_routing_way__");
1691
1656
  }
@@ -1719,7 +1684,7 @@ var global = (() => {
1719
1684
  init_top();
1720
1685
  _asyncLoad = [];
1721
1686
  __name(asyncLoad, "asyncLoad");
1722
- _fireAsyncLoad = /* @__PURE__ */ __name(function() {
1687
+ _fireAsyncLoad = /* @__PURE__ */ __name(() => {
1723
1688
  if (isBrowser) {
1724
1689
  document.addEventListener("readystatechange", () => {
1725
1690
  if (document.readyState === "complete") {
@@ -3473,7 +3438,7 @@ var global = (() => {
3473
3438
  const templateURI = TPL_SOURCE === "default" ? `${COMPONENTS_BASE_PATH}${COMPONENT_NAME}.${TPLEXTENSION}` : "";
3474
3439
  return templateURI;
3475
3440
  }, "ComponentURI");
3476
- _buildComponentFromElement_ = /* @__PURE__ */ __name(function(element, __parent__) {
3441
+ _buildComponentFromElement_ = /* @__PURE__ */ __name((element, __parent__) => {
3477
3442
  const __shadowed_not_set = element.getAttribute("shadowed") === null;
3478
3443
  const __tplsource_attr_not_set = element.getAttribute("template-source") === null;
3479
3444
  const shadowed = element.getAttribute("shadowed") === "true";
@@ -3535,7 +3500,7 @@ var global = (() => {
3535
3500
  const newComponent = __create_component_instance_();
3536
3501
  return newComponent;
3537
3502
  }, "_buildComponentFromElement_");
3538
- _buildComponentsFromElements_ = /* @__PURE__ */ __name(function(elements, __parent__) {
3503
+ _buildComponentsFromElements_ = /* @__PURE__ */ __name((elements, __parent__) => {
3539
3504
  let componentsBuiltWith = [];
3540
3505
  if (isBrowser) {
3541
3506
  componentsBuiltWith = elements.map(
@@ -3949,7 +3914,7 @@ var global = (() => {
3949
3914
  "src/range.ts"() {
3950
3915
  "use strict";
3951
3916
  init_introspection();
3952
- range = /* @__PURE__ */ __name(function(start, stop = 0, step = 1) {
3917
+ range = /* @__PURE__ */ __name((start, stop = 0, step = 1) => {
3953
3918
  if (stop === 0 || typeof stop === "undefined") {
3954
3919
  stop = start;
3955
3920
  start = 0;
@@ -4285,7 +4250,7 @@ var global = (() => {
4285
4250
  init_platform();
4286
4251
  init_PrimaryCollections();
4287
4252
  init_top();
4288
- Ready = /* @__PURE__ */ __name(function Ready2(e) {
4253
+ Ready = /* @__PURE__ */ __name((e) => {
4289
4254
  if (isBrowser) {
4290
4255
  _QC_READY_LISTENERS.push(e.bind(window));
4291
4256
  } else if (typeof global !== "undefined") {
@@ -4293,8 +4258,8 @@ var global = (() => {
4293
4258
  }
4294
4259
  }, "Ready");
4295
4260
  ready = Ready;
4296
- _Ready = /* @__PURE__ */ __name(function(e) {
4297
- const _execReady = /* @__PURE__ */ __name(function() {
4261
+ _Ready = /* @__PURE__ */ __name((e) => {
4262
+ const _execReady = /* @__PURE__ */ __name(() => {
4298
4263
  _QC_READY_LISTENERS.map(function(_ready_listener_, _r) {
4299
4264
  if (typeof _ready_listener_ === "function") {
4300
4265
  _ready_listener_();
@@ -4418,12 +4383,12 @@ var global = (() => {
4418
4383
  const self2 = this;
4419
4384
  logger.debug("VALUE ADDED");
4420
4385
  logger.debug(value);
4421
- self2.source.push(value);
4386
+ return self2.source.push(value);
4422
4387
  }
4423
4388
  pop() {
4424
4389
  const self2 = this;
4425
4390
  logger.debug("VALUE POPPED");
4426
- self2.source.pop();
4391
+ return self2.source.pop();
4427
4392
  }
4428
4393
  _new_(source) {
4429
4394
  const self2 = this;
@@ -4537,7 +4502,7 @@ var global = (() => {
4537
4502
  "src/shortCode.ts"() {
4538
4503
  "use strict";
4539
4504
  init_Crypt();
4540
- shortCode = /* @__PURE__ */ __name(function() {
4505
+ shortCode = /* @__PURE__ */ __name(() => {
4541
4506
  const length = 1e3;
4542
4507
  const code1 = _Crypt.encrypt((Math.random() * length).toString().replace(".", ""), (/* @__PURE__ */ new Date()).getTime().toString());
4543
4508
  const code2 = _Crypt.encrypt((Math.random() * length).toString().replace(".", ""), new Date((/* @__PURE__ */ new Date()).getTime() - 1e3 * 1e3).getTime().toString());
@@ -4570,8 +4535,8 @@ var global = (() => {
4570
4535
  "src/waitUntil.ts"() {
4571
4536
  "use strict";
4572
4537
  init_Logger();
4573
- waitUntil = /* @__PURE__ */ __name(function(func, exp) {
4574
- const _waitUntil = /* @__PURE__ */ __name(function(func2, exp2) {
4538
+ waitUntil = /* @__PURE__ */ __name((func, exp) => {
4539
+ const _waitUntil = /* @__PURE__ */ __name((func2, exp2) => {
4575
4540
  const maxWaitCycles = 2e3;
4576
4541
  let _w = 0;
4577
4542
  var _t = setInterval(function() {
@@ -4610,56 +4575,7 @@ var global = (() => {
4610
4575
  });
4611
4576
 
4612
4577
  // src/loadSDK.ts
4613
- function loadSDK() {
4614
- if (CONFIG.get("useSDK")) {
4615
- (function() {
4616
- const remoteImportsPath = CONFIG.get("remoteImportsPath");
4617
- const external = !CONFIG.get("useLocalSDK");
4618
- CONFIG.set("remoteImportsPath", CONFIG.get("remoteSDKPath"));
4619
- let tryImportingSDK = false;
4620
- let sdkName = "QCObjects-SDK";
4621
- if (isBrowser) {
4622
- tryImportingSDK = true;
4623
- } else {
4624
- const sdkPath = findPackageNodePath("qcobjects-sdk");
4625
- if (sdkPath !== null) {
4626
- sdkName = "qcobjects-sdk";
4627
- tryImportingSDK = true;
4628
- } else if (sdkPath !== "") {
4629
- sdkName = "node_modules/qcobjects-sdk/QCObjects-SDK";
4630
- tryImportingSDK = true;
4631
- } else {
4632
- tryImportingSDK = false;
4633
- }
4634
- }
4635
- if (tryImportingSDK) {
4636
- logger.info("Importing SDK... " + sdkName);
4637
- if (isNodeCommonJS && typeof __require !== "undefined") {
4638
- const sdk = _require_("qcobjects-sdk");
4639
- if (sdk) {
4640
- logger.debug("QCObjects SDK was loaded OK.");
4641
- } else {
4642
- logger.debug("QCObjects SDK could not be imported.");
4643
- }
4644
- } else {
4645
- Import(sdkName, function() {
4646
- if (external) {
4647
- logger.debug("QCObjects-SDK.js loaded from remote location");
4648
- } else {
4649
- logger.debug("QCObjects-SDK.js loaded from local");
4650
- }
4651
- CONFIG.set("remoteImportsPath", remoteImportsPath);
4652
- }, external)?.catch((e) => {
4653
- throw new Error(`An error ocurred when trying to import: ${e}`);
4654
- });
4655
- }
4656
- } else {
4657
- logger.debug("SDK has not been imported as it is not available at the moment");
4658
- }
4659
- })();
4660
- }
4661
- }
4662
- var loadSDK_default;
4578
+ var loadSDK, loadSDK_default;
4663
4579
  var init_loadSDK = __esm({
4664
4580
  "src/loadSDK.ts"() {
4665
4581
  "use strict";
@@ -4668,7 +4584,55 @@ var global = (() => {
4668
4584
  init_Import();
4669
4585
  init_Logger();
4670
4586
  init_platform();
4671
- __name(loadSDK, "loadSDK");
4587
+ loadSDK = /* @__PURE__ */ __name(() => {
4588
+ if (CONFIG.get("useSDK")) {
4589
+ (function() {
4590
+ const remoteImportsPath = CONFIG.get("remoteImportsPath");
4591
+ const external = !CONFIG.get("useLocalSDK");
4592
+ CONFIG.set("remoteImportsPath", CONFIG.get("remoteSDKPath"));
4593
+ let tryImportingSDK = false;
4594
+ let sdkName = "QCObjects-SDK";
4595
+ if (isBrowser) {
4596
+ tryImportingSDK = true;
4597
+ } else {
4598
+ const sdkPath = findPackageNodePath("qcobjects-sdk");
4599
+ if (sdkPath !== null) {
4600
+ sdkName = "qcobjects-sdk";
4601
+ tryImportingSDK = true;
4602
+ } else if (sdkPath !== "") {
4603
+ sdkName = "node_modules/qcobjects-sdk/QCObjects-SDK";
4604
+ tryImportingSDK = true;
4605
+ } else {
4606
+ tryImportingSDK = false;
4607
+ }
4608
+ }
4609
+ if (tryImportingSDK) {
4610
+ logger.info("Importing SDK... " + sdkName);
4611
+ if (isNodeCommonJS && typeof __require !== "undefined") {
4612
+ const sdk = _require_("qcobjects-sdk");
4613
+ if (sdk) {
4614
+ logger.debug("QCObjects SDK was loaded OK.");
4615
+ } else {
4616
+ logger.debug("QCObjects SDK could not be imported.");
4617
+ }
4618
+ } else {
4619
+ Import(sdkName, function() {
4620
+ if (external) {
4621
+ logger.debug("QCObjects-SDK.js loaded from remote location");
4622
+ } else {
4623
+ logger.debug("QCObjects-SDK.js loaded from local");
4624
+ }
4625
+ CONFIG.set("remoteImportsPath", remoteImportsPath);
4626
+ }, external)?.catch((e) => {
4627
+ throw new Error(`An error ocurred when trying to import: ${e}`);
4628
+ });
4629
+ }
4630
+ } else {
4631
+ logger.debug("SDK has not been imported as it is not available at the moment");
4632
+ }
4633
+ })();
4634
+ }
4635
+ }, "loadSDK");
4672
4636
  loadSDK_default = loadSDK;
4673
4637
  }
4674
4638
  });
@@ -5072,7 +5036,7 @@ var global = (() => {
5072
5036
  __export(QCObjects_exports, {
5073
5037
  ArrayCollection: () => ArrayCollection,
5074
5038
  ArrayList: () => ArrayList,
5075
- AssignPolyfill: () => AssignPolyfill,
5039
+ AssignPolyfill: () => assign_exports,
5076
5040
  BackendMicroservice: () => BackendMicroservice,
5077
5041
  CONFIG: () => CONFIG,
5078
5042
  Class: () => Class,
@@ -5139,7 +5103,6 @@ var global = (() => {
5139
5103
  asyncLoad: () => asyncLoad,
5140
5104
  captureFalseTouch: () => captureFalseTouch,
5141
5105
  componentLoader: () => componentLoader,
5142
- default: () => QCObjects_default,
5143
5106
  findPackageNodePath: () => findPackageNodePath,
5144
5107
  get: () => get,
5145
5108
  getDocumentLayout: () => getDocumentLayout,
@@ -5162,7 +5125,36 @@ var global = (() => {
5162
5125
  subelements: () => subelements,
5163
5126
  waitUntil: () => waitUntil
5164
5127
  });
5165
- var AssignPolyfill = __toESM(require_assign());
5128
+
5129
+ // src/assign.ts
5130
+ var assign_exports = {};
5131
+ if (typeof Object.assign !== "function") {
5132
+ Object.defineProperty(Object, "assign", {
5133
+ // eslint-disable-next-line no-unused-vars
5134
+ value: /* @__PURE__ */ __name(function assign(target, varArgs) {
5135
+ "use strict";
5136
+ if (target === null) {
5137
+ throw new TypeError("Cannot convert undefined or null to object");
5138
+ }
5139
+ const to = Object(target);
5140
+ for (let index = 1; index < arguments.length; index++) {
5141
+ const nextSource = arguments[index];
5142
+ if (nextSource !== null) {
5143
+ for (const nextKey in nextSource) {
5144
+ if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {
5145
+ to[nextKey] = nextSource[nextKey];
5146
+ }
5147
+ }
5148
+ }
5149
+ }
5150
+ return to;
5151
+ }, "assign"),
5152
+ writable: true,
5153
+ configurable: true
5154
+ });
5155
+ }
5156
+
5157
+ // src/QCObjects.ts
5166
5158
  init_top();
5167
5159
  var qcobjects = __toESM(require_MainProcess());
5168
5160
  init_top();
@@ -5459,20 +5451,20 @@ var global = (() => {
5459
5451
  _value = GlobalProcessor.processObject.bind(processorHandler).call(processorHandler, _value, templateInstance.component);
5460
5452
  parsedAssignmentText = parsedAssignmentText.replace(new RegExp(`{{${k}}}`, "g"), _value);
5461
5453
  } catch (e) {
5462
- logger.warn(`${templateInstance.component.name} could not parse processors.`);
5463
- throw Error(`${templateInstance.component.name} could not parse processors. Reason: ${e.message}`);
5454
+ logger.warn(`${templateInstance.component?.name} could not parse processors.`);
5455
+ throw Error(`${templateInstance.component?.name} could not parse processors. Reason: ${e.message}`);
5464
5456
  }
5465
5457
  }
5466
5458
  return k;
5467
5459
  });
5468
5460
  } else {
5469
- logger.debug(`${templateInstance.component.name}.data is not an object`);
5461
+ logger.debug(`${templateInstance.component?.name}.data is not an object`);
5470
5462
  }
5471
5463
  try {
5472
5464
  parsedAssignmentText = GlobalProcessor.processObject.call(processorHandler, parsedAssignmentText, templateInstance.component);
5473
5465
  } catch (e) {
5474
- logger.warn(`${templateInstance.component.name} could not parse processors.`);
5475
- throw Error(`${templateInstance.component.name} could not parse processors. Reason: ${e.message}`);
5466
+ logger.warn(`${templateInstance.component?.name} could not parse processors.`);
5467
+ throw Error(`${templateInstance.component?.name} could not parse processors. Reason: ${e.message}`);
5476
5468
  }
5477
5469
  return parsedAssignmentText;
5478
5470
  }
@@ -6154,7 +6146,7 @@ var global = (() => {
6154
6146
  };
6155
6147
  }
6156
6148
  Export(_ComponentWidget_);
6157
- var RegisterWidget = /* @__PURE__ */ __name(function(widgetName) {
6149
+ var RegisterWidget = /* @__PURE__ */ __name((widgetName) => {
6158
6150
  if (isBrowser) {
6159
6151
  customElements.define(widgetName, class extends _ComponentWidget_ {
6160
6152
  });
@@ -6162,7 +6154,7 @@ var global = (() => {
6162
6154
  throw new Error("RegisterWidget is not implemented for non browser ecosystems yet.");
6163
6155
  }
6164
6156
  }, "RegisterWidget");
6165
- var RegisterWidgets = /* @__PURE__ */ __name(function(...args) {
6157
+ var RegisterWidgets = /* @__PURE__ */ __name((...args) => {
6166
6158
  const widgetList = [...args];
6167
6159
  widgetList.filter(function(widgetName) {
6168
6160
  return typeof widgetName === "string";
@@ -6611,7 +6603,6 @@ var global = (() => {
6611
6603
  init_top();
6612
6604
  init_make_global();
6613
6605
  init_top();
6614
- var QCObjects_default = {};
6615
6606
  return __toCommonJS(QCObjects_exports);
6616
6607
  })();
6617
6608
  //# sourceMappingURL=QCObjects.js.map