qcobjects 2.4.107-ts → 2.5.101-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 (197) hide show
  1. package/.hintrc +5 -0
  2. package/VERSION +1 -1
  3. package/build/ArrayCollection.js +136 -0
  4. package/build/BackendMicroservice.js +211 -0
  5. package/build/Base64.js +100 -0
  6. package/build/CONFIG.js +85 -0
  7. package/build/Cast.js +53 -0
  8. package/build/Class.js +284 -0
  9. package/build/ClassFactory.js +38 -0
  10. package/build/ComplexStorageCache.js +91 -0
  11. package/build/Component.js +1133 -0
  12. package/build/ComponentFactory.js +113 -0
  13. package/build/ConfigSettings.js +39 -0
  14. package/build/Controller.js +81 -0
  15. package/build/Crypt.js +87 -0
  16. package/build/DDO.js +81 -0
  17. package/build/DOMCreateElement.js +15 -0
  18. package/build/DataStringify.js +22 -0
  19. package/build/DefaultTemplateHandler.js +57 -0
  20. package/build/DocumentLayout.js +20 -0
  21. package/build/Effect.js +46 -0
  22. package/build/Export.js +11 -0
  23. package/build/Import.js +140 -0
  24. package/build/IncrementInstanceID.js +11 -0
  25. package/build/InheritClass.js +194 -0
  26. package/build/LegacyCopy.js +31 -0
  27. package/build/Logger.js +33 -0
  28. package/build/MainProcess.js +549 -0
  29. package/build/NamespaceRef.js +29 -0
  30. package/build/New.js +17 -0
  31. package/build/ObjectName.js +22 -0
  32. package/build/Package.js +67 -0
  33. package/build/PrimaryCollections.js +7 -0
  34. package/build/Processor.js +81 -0
  35. package/build/QCObjects.js +182 -4843
  36. package/build/Ready.js +49 -0
  37. package/build/RegisterClass.js +28 -0
  38. package/build/Service.js +112 -0
  39. package/build/SourceCSS.js +56 -0
  40. package/build/SourceJS.js +73 -0
  41. package/build/Tag.js +77 -0
  42. package/build/Timer.js +30 -0
  43. package/build/Toggle.js +59 -0
  44. package/build/TransitionEffect.js +65 -0
  45. package/build/VO.js +11 -0
  46. package/build/View.js +18 -0
  47. package/build/WidgetsFactory.js +537 -0
  48. package/build/assign.js +32 -0
  49. package/build/asyncLoad.js +43 -0
  50. package/build/basePath.js +32 -0
  51. package/build/captureFalseTouch.js +32 -0
  52. package/build/componentLoader.js +258 -0
  53. package/build/defaultProcessors.js +130 -0
  54. package/build/domain.js +4 -0
  55. package/build/findPackageNodePath.js +47 -0
  56. package/build/getType.js +38 -0
  57. package/build/globalSettings.js +115 -0
  58. package/build/index.d.ts +1045 -0
  59. package/build/index.js +24 -4
  60. package/build/index.mjs +1 -1
  61. package/build/introspection.js +86 -0
  62. package/build/isQCObjects.js +20 -0
  63. package/build/is_a.js +19 -0
  64. package/build/is_forbidden_name.js +15 -0
  65. package/build/is_raw_class.js +7 -0
  66. package/build/loadSDK.js +63 -0
  67. package/build/localStorage.js +19 -0
  68. package/build/make_global.js +24 -0
  69. package/build/mathFunctions.js +7 -0
  70. package/build/platform.js +28 -0
  71. package/build/range.js +17 -0
  72. package/build/routings.js +21 -0
  73. package/build/secretKey.js +5 -0
  74. package/build/serviceLoader.js +300 -0
  75. package/build/shortCode.js +14 -0
  76. package/build/subelements.js +8 -0
  77. package/build/super.js +20 -0
  78. package/build/tag_filter.js +4 -0
  79. package/build/top.js +23 -0
  80. package/build/uniqueID.js +5 -0
  81. package/build/waitUntil.js +31 -0
  82. package/build-esbuild.js +62 -0
  83. package/eslint.config.mjs +87 -0
  84. package/package.json +26 -23
  85. package/public/browser/index.js +6502 -0
  86. package/public/browser/index.js.map +7 -0
  87. package/public/cjs/index.cjs +6586 -0
  88. package/public/cjs/index.cjs.map +7 -0
  89. package/public/esm/index.mjs +6494 -0
  90. package/public/esm/index.mjs.map +7 -0
  91. package/spec/helpers/mock-sdk.helper.ts +5 -0
  92. package/spec/mocks/qcobjects-sdk.mock.ts +1 -0
  93. package/spec/support/jasmine.json +3 -3
  94. package/spec/testsClassFactorySpec.ts +40 -0
  95. package/spec/{testsConfigSpec.js → testsConfigSpec.ts} +2 -2
  96. package/spec/{testsGlobalFeaturesSpec.js → testsGlobalFeaturesSpec.ts} +10 -8
  97. package/spec/{testsSpec.js → testsSpec.ts} +11 -10
  98. package/spec/{testsTypeSpec.js → testsTypeSpec.ts} +5 -3
  99. package/src/ArrayCollection.ts +143 -0
  100. package/src/BackendMicroservice.ts +229 -0
  101. package/src/Base64.ts +92 -0
  102. package/src/CONFIG.ts +96 -0
  103. package/src/Cast.ts +46 -0
  104. package/src/Class.ts +303 -0
  105. package/src/ClassFactory.ts +34 -0
  106. package/src/ComplexStorageCache.ts +97 -0
  107. package/src/Component.ts +1222 -0
  108. package/src/ComponentFactory.ts +122 -0
  109. package/src/ConfigSettings.ts +62 -0
  110. package/src/Controller.ts +90 -0
  111. package/src/Crypt.ts +87 -0
  112. package/src/DDO.ts +93 -0
  113. package/src/DOMCreateElement.ts +12 -0
  114. package/src/DataStringify.ts +19 -0
  115. package/src/DefaultTemplateHandler.ts +55 -0
  116. package/src/DocumentLayout.ts +16 -0
  117. package/src/Effect.ts +56 -0
  118. package/src/Export.ts +8 -0
  119. package/src/Import.ts +135 -0
  120. package/src/IncrementInstanceID.ts +8 -0
  121. package/src/InheritClass.ts +210 -0
  122. package/src/LegacyCopy.ts +27 -0
  123. package/src/Logger.ts +32 -0
  124. package/src/MainProcess.ts +629 -0
  125. package/src/NamespaceRef.ts +26 -0
  126. package/src/New.ts +15 -0
  127. package/src/ObjectName.ts +16 -0
  128. package/src/Package.ts +67 -0
  129. package/src/PrimaryCollections.ts +7 -0
  130. package/src/Processor.ts +93 -0
  131. package/src/QCObjects.ts +100 -0
  132. package/src/Ready.ts +44 -0
  133. package/src/RegisterClass.ts +26 -0
  134. package/src/Service.ts +127 -0
  135. package/src/SourceCSS.ts +59 -0
  136. package/src/SourceJS.ts +76 -0
  137. package/src/Tag.ts +76 -0
  138. package/src/Timer.ts +42 -0
  139. package/src/Toggle.ts +65 -0
  140. package/src/TransitionEffect.ts +80 -0
  141. package/src/VO.ts +8 -0
  142. package/src/View.ts +17 -0
  143. package/src/WidgetsFactory.ts +543 -0
  144. package/src/assign.ts +33 -0
  145. package/src/asyncLoad.ts +42 -0
  146. package/src/basePath.ts +29 -0
  147. package/src/captureFalseTouch.ts +29 -0
  148. package/src/componentLoader.ts +252 -0
  149. package/src/defaultProcessors.ts +145 -0
  150. package/src/domain.ts +1 -0
  151. package/src/findPackageNodePath.ts +43 -0
  152. package/src/getType.ts +36 -0
  153. package/src/globalSettings.ts +118 -0
  154. package/src/index.mts +1 -1
  155. package/src/index.ts +1 -1
  156. package/src/introspection.ts +80 -0
  157. package/src/isQCObjects.ts +19 -0
  158. package/src/is_a.ts +16 -0
  159. package/src/is_forbidden_name.ts +12 -0
  160. package/src/is_raw_class.ts +3 -0
  161. package/src/loadSDK.ts +59 -0
  162. package/src/localStorage.ts +17 -0
  163. package/src/make_global.ts +19 -0
  164. package/src/mathFunctions.ts +3 -0
  165. package/src/platform.ts +30 -0
  166. package/src/range.ts +15 -0
  167. package/src/routings.ts +18 -0
  168. package/src/secretKey.ts +3 -0
  169. package/src/serviceLoader.ts +306 -0
  170. package/src/shortCode.ts +11 -0
  171. package/src/subelements.ts +4 -0
  172. package/src/super.ts +17 -0
  173. package/src/tag_filter.ts +1 -0
  174. package/src/top.ts +111 -0
  175. package/src/types/global/index.d.ts +597 -0
  176. package/src/uniqueID.ts +3 -0
  177. package/src/waitUntil.ts +26 -0
  178. package/tsconfig.d.json +35 -8
  179. package/tsconfig.jasmine.json +39 -0
  180. package/tsconfig.json +46 -12
  181. package/.eslintignore +0 -5
  182. package/.eslintrc.cjs +0 -21
  183. package/.eslintrc.json +0 -24
  184. package/browser/QCObjects.js +0 -2
  185. package/browser/QCObjects.js.map +0 -7
  186. package/browser/chunks/chunk-O2PFFZVJ.js +0 -713
  187. package/browser/chunks/chunk-O2PFFZVJ.js.map +0 -7
  188. package/browser/chunks/chunk-TBLBK5VV.js +0 -713
  189. package/browser/chunks/chunk-TBLBK5VV.js.map +0 -7
  190. package/browser/chunks/chunk-ZYLXOA35.js +0 -713
  191. package/browser/chunks/chunk-ZYLXOA35.js.map +0 -7
  192. package/browser/index.js +0 -2
  193. package/browser/index.js.map +0 -7
  194. package/spec/testsClassFactorySpec.js +0 -41
  195. package/src/QCObjects.js +0 -5247
  196. package/src/index.d.ts +0 -8
  197. package/types/index.d.ts +0 -472
package/build/index.js CHANGED
@@ -1,7 +1,27 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
4
24
  };
5
25
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const QCObjects_1 = __importDefault(require("./QCObjects"));
7
- exports.default = QCObjects_1.default;
26
+ const QCObjects = __importStar(require("./QCObjects"));
27
+ exports.default = QCObjects;
package/build/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import QCObjects from "./QCObjects.js";
1
+ import * as QCObjects from "./QCObjects.js";
2
2
  export default QCObjects;
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports._methods_ = exports._protected_code_ = void 0;
4
+ const _protected_code_ = function (_) {
5
+ const __oldtoString = (typeof _.prototype !== "undefined") ? (_.prototype.toString) : (function () {
6
+ return "";
7
+ });
8
+ if (typeof _.prototype !== "undefined") {
9
+ _.prototype.toString = function () {
10
+ const _protected_symbols = [
11
+ "__qcobjects__",
12
+ "__qcobjects_sdk__",
13
+ "__loaded__",
14
+ "ComplexStorageCache",
15
+ "css",
16
+ "append",
17
+ "attachIn",
18
+ "debug",
19
+ "info",
20
+ "warn",
21
+ "QC_Append",
22
+ "set",
23
+ "get",
24
+ "done",
25
+ "componentDone",
26
+ "_new_",
27
+ "__new__",
28
+ "Class",
29
+ "ClassFactory",
30
+ "New",
31
+ "Export",
32
+ "Package",
33
+ "Import",
34
+ "subelements",
35
+ "componentLoader",
36
+ "buildComponents",
37
+ "Controller",
38
+ "View",
39
+ "VO",
40
+ "Service",
41
+ "serviceLoader",
42
+ "JSONService",
43
+ "ConfigService",
44
+ "SourceJS",
45
+ "SourceCSS",
46
+ "ArrayList",
47
+ "ArrayCollection",
48
+ "Effect",
49
+ "Timer",
50
+ "sum",
51
+ "avg",
52
+ "table",
53
+ "max",
54
+ "min",
55
+ "range",
56
+ "matrix",
57
+ "matrix2d",
58
+ "matrix3d",
59
+ "unique",
60
+ "uniqueId",
61
+ "shortCode",
62
+ "NamespaceRef"
63
+ ];
64
+ let _ret_;
65
+ if (_protected_symbols.includes(this.name)) {
66
+ _ret_ = this.name + "{ [QCObjects native code] }";
67
+ }
68
+ else {
69
+ _ret_ = __oldtoString.call(this);
70
+ }
71
+ return _ret_;
72
+ };
73
+ }
74
+ };
75
+ exports._protected_code_ = _protected_code_;
76
+ (exports._protected_code_)(Function);
77
+ const _methods_ = function (_) {
78
+ const _m = [];
79
+ for (const i in _) {
80
+ if ((typeof _[i]).toLowerCase() === "function") {
81
+ _m.push(_[i]);
82
+ }
83
+ }
84
+ return _m;
85
+ };
86
+ exports._methods_ = _methods_;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isQCObjects_Class = exports.isQCObjects_Object = void 0;
4
+ const InheritClass_1 = require("./InheritClass");
5
+ const isQCObjects_Object = function (_) {
6
+ return (!!((typeof _ === "object" &&
7
+ Object.hasOwn(_, "__classType") &&
8
+ (!!_.__instanceID) &&
9
+ Object.hasOwn(_, "__definition") &&
10
+ typeof _.__definition !== "undefined"))) || _ instanceof InheritClass_1.InheritClass;
11
+ };
12
+ exports.isQCObjects_Object = isQCObjects_Object;
13
+ const isQCObjects_Class = function (_) {
14
+ return (!!((typeof _ === "function" &&
15
+ (!_.__instanceID) &&
16
+ (!!_.__definition) &&
17
+ typeof _.__definition !== "undefined" &&
18
+ !!_.__definition.__classType))) || _.prototype instanceof InheritClass_1.InheritClass;
19
+ };
20
+ exports.isQCObjects_Class = isQCObjects_Class;
package/build/is_a.js ADDED
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.is_a = void 0;
4
+ const getType_1 = require("./getType");
5
+ const isQCObjects_1 = require("./isQCObjects");
6
+ const ObjectName_1 = require("./ObjectName");
7
+ /**
8
+ * Returns if a class or object is from a determinated type
9
+ * @param {Object} object
10
+ * @param {String} typeName
11
+ */
12
+ const is_a = function is_a(obj, typeName) {
13
+ return !!((typeof obj !== "undefined" && obj !== null &&
14
+ ((((0, isQCObjects_1.isQCObjects_Class)(obj) || (0, isQCObjects_1.isQCObjects_Object)(obj)) && (obj.hierarchy().includes(typeName))) ||
15
+ (0, getType_1.__getType__)(obj) === typeName ||
16
+ (0, ObjectName_1.ObjectName)(obj) === typeName ||
17
+ typeof obj === typeName)));
18
+ };
19
+ exports.is_a = is_a;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.__is__forbidden_name__ = void 0;
4
+ /**
5
+ * Internal use to determine the forbidden names for classes
6
+ * Reserved words
7
+ *
8
+ * @param {String} name
9
+ * @param {Object} type
10
+ * @param {Object} definition
11
+ */
12
+ const __is__forbidden_name__ = function (name) {
13
+ return (["__proto__", "prototype", "Object", "Map", "defineProperty", "indexOf", "toString", "__instanceID", "function", "Function"].indexOf(name) !== -1);
14
+ };
15
+ exports.__is__forbidden_name__ = __is__forbidden_name__;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.__is_raw_class__ = void 0;
4
+ const __is_raw_class__ = function (o_c) {
5
+ return !!((typeof o_c === "function" && o_c.toString().startsWith("class")));
6
+ };
7
+ exports.__is_raw_class__ = __is_raw_class__;
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const CONFIG_1 = require("./CONFIG");
4
+ const findPackageNodePath_1 = require("./findPackageNodePath");
5
+ const Import_1 = require("./Import");
6
+ const Logger_1 = require("./Logger");
7
+ const platform_1 = require("./platform");
8
+ function loadSDK() {
9
+ if (CONFIG_1.CONFIG.get("useSDK")) {
10
+ (function () {
11
+ const remoteImportsPath = CONFIG_1.CONFIG.get("remoteImportsPath");
12
+ const external = (!CONFIG_1.CONFIG.get("useLocalSDK"));
13
+ CONFIG_1.CONFIG.set("remoteImportsPath", CONFIG_1.CONFIG.get("remoteSDKPath"));
14
+ let tryImportingSDK = false;
15
+ let sdkName = "QCObjects-SDK";
16
+ if (platform_1.isBrowser) {
17
+ tryImportingSDK = true;
18
+ }
19
+ else {
20
+ const sdkPath = (0, findPackageNodePath_1.findPackageNodePath)("qcobjects-sdk");
21
+ if (sdkPath !== null) {
22
+ sdkName = "qcobjects-sdk";
23
+ tryImportingSDK = true;
24
+ }
25
+ else if (sdkPath !== "") {
26
+ sdkName = "node_modules/qcobjects-sdk/QCObjects-SDK";
27
+ tryImportingSDK = true;
28
+ }
29
+ else {
30
+ tryImportingSDK = false;
31
+ }
32
+ }
33
+ if (tryImportingSDK) {
34
+ Logger_1.logger.info("Importing SDK... " + sdkName);
35
+ if (platform_1.isNodeCommonJS && typeof require !== "undefined") {
36
+ const sdk = (0, platform_1._require_)("qcobjects-sdk");
37
+ if (sdk) {
38
+ Logger_1.logger.debug("QCObjects SDK was loaded OK.");
39
+ }
40
+ else {
41
+ Logger_1.logger.debug("QCObjects SDK could not be imported.");
42
+ }
43
+ }
44
+ else {
45
+ (0, Import_1.Import)(sdkName, function () {
46
+ if (external) {
47
+ Logger_1.logger.debug("QCObjects-SDK.js loaded from remote location");
48
+ }
49
+ else {
50
+ Logger_1.logger.debug("QCObjects-SDK.js loaded from local");
51
+ }
52
+ CONFIG_1.CONFIG.set("remoteImportsPath", remoteImportsPath);
53
+ }, external)
54
+ ?.catch((e) => { throw new Error(`An error ocurred when trying to import: ${e}`); });
55
+ }
56
+ }
57
+ else {
58
+ Logger_1.logger.debug("SDK has not been imported as it is not available at the moment");
59
+ }
60
+ })();
61
+ }
62
+ }
63
+ exports.default = loadSDK;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.localStorage = void 0;
4
+ exports.localStorage = window.localStorage;
5
+ if (typeof exports.localStorage === "undefined") {
6
+ /* Polyfill for localStorage */
7
+ exports.localStorage = {
8
+ getItem(name) {
9
+ return (Object.hasOwn(this, name)) ? (this[name]) : (null);
10
+ },
11
+ setItem(name, value) {
12
+ this[name] = value;
13
+ },
14
+ removeItem(name) {
15
+ delete this[name];
16
+ }
17
+ };
18
+ /* end Polyfill for localStorage */
19
+ }
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.__make_global__ = void 0;
4
+ const platform_1 = require("./platform");
5
+ const top_1 = require("./top");
6
+ const __make_global__ = function (f) {
7
+ if (typeof f !== "undefined") {
8
+ if (platform_1.isBrowser) {
9
+ try {
10
+ top_1._top[f.name] = f;
11
+ window[f.name] = f;
12
+ }
13
+ catch (e) {
14
+ throw Error(`An error ocurred: ${e}`);
15
+ }
16
+ }
17
+ else if (typeof global !== "undefined") {
18
+ if (!Object.hasOwn(global, f.name)) {
19
+ global[f.name] = f;
20
+ }
21
+ }
22
+ }
23
+ };
24
+ exports.__make_global__ = __make_global__;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.__to_number = void 0;
4
+ const __to_number = function (value) {
5
+ return ((isNaN(value)) ? new Number(0) : new Number(value));
6
+ };
7
+ exports.__to_number = __to_number;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.is_phonegap = exports._require_ = exports.deno_require = exports.isNodeCommonJS = exports.isBrowser = exports.isDeno = void 0;
4
+ const Logger_1 = require("./Logger");
5
+ exports.isDeno = (typeof window !== "undefined" && "Deno" in window);
6
+ exports.isBrowser = (typeof window !== "undefined" && typeof window.self !== "undefined" && window === window.self) && !exports.isDeno;
7
+ exports.isNodeCommonJS = (typeof module !== "undefined");
8
+ // eslint-disable-next-line no-unused-vars
9
+ const deno_require = (name) => { };
10
+ exports.deno_require = deno_require;
11
+ const _require_ = (name) => {
12
+ return (exports.isDeno) ? ((0, exports.deno_require)(name)) : (((name) => {
13
+ let r;
14
+ try {
15
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
16
+ r = require(name);
17
+ }
18
+ catch (e) {
19
+ Logger_1.logger.debug(`An error ocurred importing module. ${e}`);
20
+ r = { export: {} };
21
+ }
22
+ return r;
23
+ })(name));
24
+ };
25
+ exports._require_ = _require_;
26
+ exports.is_phonegap = (function () {
27
+ return (typeof cordova !== "undefined");
28
+ })();
package/build/range.js ADDED
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.range = void 0;
4
+ const introspection_1 = require("./introspection");
5
+ const range = function (start, stop = 0, step = 1) {
6
+ if (stop === 0 || typeof stop === "undefined") {
7
+ stop = start;
8
+ start = 0;
9
+ }
10
+ return Array.from({
11
+ length: (stop - start) / step + 1
12
+ }, function (_, i) {
13
+ return start + (i * step);
14
+ });
15
+ };
16
+ exports.range = range;
17
+ (introspection_1._protected_code_)(exports.range);
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.__valid_routing_way__ = exports.__valid_routings__ = exports.__routing_params__ = void 0;
4
+ const __routing_params__ = function (routing, routingPath) {
5
+ const standardRoutingPath = routing.path.replace(/{(.*?)}/g, "(?<$1>.*)"); // allowing {param}
6
+ return {
7
+ ...[...routingPath.matchAll((new RegExp(standardRoutingPath, "g")))][0].groups
8
+ };
9
+ };
10
+ exports.__routing_params__ = __routing_params__;
11
+ const __valid_routings__ = function (routings, routingPath) {
12
+ return routings.filter(function (routing) {
13
+ const standardRoutingPath = routing.path.replace(/{(.*?)}/g, "(?<$1>.*)");
14
+ return (new RegExp(standardRoutingPath, "g")).test(routingPath);
15
+ }).reverse();
16
+ };
17
+ exports.__valid_routings__ = __valid_routings__;
18
+ const __valid_routing_way__ = function (validRoutingWays, routingWay) {
19
+ return validRoutingWays.includes(routingWay);
20
+ };
21
+ exports.__valid_routing_way__ = __valid_routing_way__;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports._secretKey = void 0;
4
+ const platform_1 = require("./platform");
5
+ exports._secretKey = (platform_1.isBrowser) ? (location.host) : ("secret");