@cruglobal/godtools-shared 1.0.2-SNAPSHOT.1560 → 1.1.0-PR689-SNAPSHOT.1567

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.
@@ -1,20 +1,45 @@
1
1
  (function (root, factory) {
2
2
  if (typeof define === 'function' && define.amd)
3
- define(['exports'], factory);
3
+ define(['exports', './kotlin-kotlin-stdlib.js'], factory);
4
4
  else if (typeof exports === 'object')
5
- factory(module.exports);
6
- else
7
- root['kotlin-mpp-godtools-tool-parser-module-common'] = factory(typeof this['kotlin-mpp-godtools-tool-parser-module-common'] === 'undefined' ? {} : this['kotlin-mpp-godtools-tool-parser-module-common']);
8
- }(this, function (_) {
5
+ factory(module.exports, require('./kotlin-kotlin-stdlib.js'));
6
+ else {
7
+ if (typeof this['kotlin-kotlin-stdlib'] === 'undefined') {
8
+ throw new Error("Error loading module 'kotlin-mpp-godtools-tool-parser-module-common'. Its dependency 'kotlin-kotlin-stdlib' was not found. Please, check whether 'kotlin-kotlin-stdlib' is loaded prior to 'kotlin-mpp-godtools-tool-parser-module-common'.");
9
+ }
10
+ root['kotlin-mpp-godtools-tool-parser-module-common'] = factory(typeof this['kotlin-mpp-godtools-tool-parser-module-common'] === 'undefined' ? {} : this['kotlin-mpp-godtools-tool-parser-module-common'], this['kotlin-kotlin-stdlib']);
11
+ }
12
+ }(this, function (_, kotlin_kotlin) {
9
13
  'use strict';
14
+ //region block: imports
15
+ var RegexOption_IGNORE_CASE_getInstance = kotlin_kotlin.$_$.e;
16
+ var Regex_init_$Create$ = kotlin_kotlin.$_$.t;
17
+ var substringBefore = kotlin_kotlin.$_$.i8;
18
+ var contains = kotlin_kotlin.$_$.q7;
19
+ //endregion
10
20
  //region block: pre-declaration
11
21
  //endregion
22
+ function get_isHttpUrl(_this__u8e3s4) {
23
+ var tmp0_safe_receiver = get_scheme(_this__u8e3s4);
24
+ var tmp;
25
+ if (tmp0_safe_receiver == null) {
26
+ tmp = null;
27
+ } else {
28
+ // Inline function 'kotlin.text.matches' call
29
+ tmp = Regex_init_$Create$('https?', RegexOption_IGNORE_CASE_getInstance()).h8(tmp0_safe_receiver);
30
+ }
31
+ return tmp === true;
32
+ }
12
33
  function toUriOrNull(_this__u8e3s4) {
13
34
  return _this__u8e3s4;
14
35
  }
36
+ function get_scheme(_this__u8e3s4) {
37
+ return contains(_this__u8e3s4, ':') ? substringBefore(_this__u8e3s4, ':') : null;
38
+ }
15
39
  //region block: exports
16
40
  _.$_$ = _.$_$ || {};
17
- _.$_$.a = toUriOrNull;
41
+ _.$_$.a = get_isHttpUrl;
42
+ _.$_$.b = toUriOrNull;
18
43
  //endregion
19
44
  return _;
20
45
  }));
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../../../module/common/src/jsMain/kotlin/org/cru/godtools/shared/common/model/Uri.js.kt"],"sourcesContent":[null],"names":["toUriOrNull","<this>"],"mappings":";;;;;;;;;;;sBAKOA,CAAIC,aAAJD,EAA4B;A,IAAI,OAAJ,a;EAAG,C;;;;;;;"}
1
+ {"version":3,"sources":["../../../../../../../../module/common/src/commonMain/kotlin/org/cru/godtools/shared/common/model/Uri.kt","src/kotlin/text/Strings.kt","../../../../../../../../module/common/src/jsMain/kotlin/org/cru/godtools/shared/common/model/Uri.js.kt"],"sourcesContent":[null,null,null],"names":["<get-isHttpUrl>","<this>","toUriOrNull","<get-scheme>"],"mappings":";;;;;;;;;;;;;;;;;;;;;wBAI2BA,CAAvBC,aAAuBD,EAAQ;A,QAAA,8C;;IAAQ,IAAR,kBAAQ,S;YAAA,I;;;YCFa,oBAAO,QAAP,wCA2yBoB,IA3yBpC,kBA2yBoC,C;;IDzyBwB,OAAjE,QAA6D,I;EAAG,C;sBEE5FE,CAAID,aAAJC,EAAiC;A,IAAI,OAAJ,a;EAAG,C;qBAFrBC,CAAXF,aAAWE,EAAQ;A,IAAiD,OAA7C,wBAAU,GAAV,CAAJ,GAAmB,+BAAiB,GAAjB,CAAnB,GAA6C,I;EAAG,C;;;;;;;;"}
@@ -91,7 +91,7 @@
91
91
  var contains = kotlin_kotlin.$_$.e3;
92
92
  var toBoolean = kotlin_kotlin.$_$.j8;
93
93
  var toSet_0 = kotlin_kotlin.$_$.w4;
94
- var toUriOrNull = kotlin_org_cru_godtools_kotlin_common.$_$.a;
94
+ var toUriOrNull = kotlin_org_cru_godtools_kotlin_common.$_$.b;
95
95
  var Severity_Debug_getInstance = kotlin_co_touchlab_kermit_core.$_$.d;
96
96
  var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.t1;
97
97
  var charArrayOf = kotlin_kotlin.$_$.v5;
@@ -136,6 +136,7 @@
136
136
  var coroutineScope = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.c;
137
137
  var HashSet_init_$Create$ = kotlin_kotlin.$_$.l;
138
138
  var sortedWith = kotlin_kotlin.$_$.s4;
139
+ var get_isHttpUrl = kotlin_org_cru_godtools_kotlin_common.$_$.a;
139
140
  var to = kotlin_kotlin.$_$.x9;
140
141
  var Comparator = kotlin_kotlin.$_$.x8;
141
142
  var compareValues = kotlin_kotlin.$_$.y4;
@@ -168,10 +169,6 @@
168
169
  var launchIn = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.m;
169
170
  var CoroutineScope_0 = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.p;
170
171
  var contains_1 = kotlin_kotlin.$_$.r7;
171
- var substringBefore = kotlin_kotlin.$_$.i8;
172
- var contains_2 = kotlin_kotlin.$_$.q7;
173
- var RegexOption_IGNORE_CASE_getInstance = kotlin_kotlin.$_$.e;
174
- var Regex_init_$Create$_0 = kotlin_kotlin.$_$.t;
175
172
  var StringBuilder_init_$Create$ = kotlin_kotlin.$_$.v;
176
173
  var removeFirst = kotlin_kotlin.$_$.p4;
177
174
  var IndexOutOfBoundsException_init_$Create$ = kotlin_kotlin.$_$.g1;
@@ -2984,7 +2981,7 @@
2984
2981
  var tmp_0;
2985
2982
  if (trimmed == null) {
2986
2983
  tmp_0 = null;
2987
- } else if (contains_3(get_REGEX_PERCENT(), trimmed)) {
2984
+ } else if (contains_2(get_REGEX_PERCENT(), trimmed)) {
2988
2985
  // Inline function 'kotlin.text.toFloatOrNull' call
2989
2986
  var this_0 = trimEnd(trimmed, charArrayOf([_Char___init__impl__6a9atx(37)]));
2990
2987
  // Inline function 'kotlin.js.unsafeCast' call
@@ -3000,7 +2997,7 @@
3000
2997
  tmp_1 = new Percent(tmp1_safe_receiver / 100);
3001
2998
  }
3002
2999
  tmp_0 = tmp_1;
3003
- } else if (contains_3(get_REGEX_PIXELS(), trimmed)) {
3000
+ } else if (contains_2(get_REGEX_PIXELS(), trimmed)) {
3004
3001
  var tmp2_safe_receiver = toIntOrNull(trimmed);
3005
3002
  var tmp_2;
3006
3003
  if (tmp2_safe_receiver == null) {
@@ -5412,29 +5409,30 @@
5412
5409
  }
5413
5410
  } else if (tmp0_subject === get_XMLNS_ARTICLE()) {
5414
5411
  if (_this__u8e3s4.pa() === 'aem-import') {
5415
- var tmp5_safe_receiver = toUriOrNull(_this__u8e3s4.l3b('src'));
5412
+ var tmp5_safe_receiver = _this__u8e3s4.l3b('src');
5413
+ var tmp6_safe_receiver = tmp5_safe_receiver == null ? null : toUriOrNull(tmp5_safe_receiver);
5416
5414
  var tmp_2;
5417
- if (tmp5_safe_receiver == null) {
5415
+ if (tmp6_safe_receiver == null) {
5418
5416
  tmp_2 = null;
5419
5417
  } else {
5420
5418
  // Inline function 'kotlin.takeIf' call
5421
5419
  // Inline function 'kotlin.contracts.contract' call
5422
5420
  var tmp_3;
5423
5421
  // Inline function 'org.cru.godtools.shared.tool.parser.model.Manifest.parsePages.<anonymous>.<anonymous>.<anonymous>' call
5424
- if (get_isHttpUrl(tmp5_safe_receiver)) {
5425
- tmp_3 = tmp5_safe_receiver;
5422
+ if (get_isHttpUrl(tmp6_safe_receiver)) {
5423
+ tmp_3 = tmp6_safe_receiver;
5426
5424
  } else {
5427
5425
  tmp_3 = null;
5428
5426
  }
5429
5427
  tmp_2 = tmp_3;
5430
5428
  }
5431
- var tmp6_safe_receiver = tmp_2;
5432
- if (tmp6_safe_receiver == null)
5429
+ var tmp7_safe_receiver = tmp_2;
5430
+ if (tmp7_safe_receiver == null)
5433
5431
  null;
5434
5432
  else {
5435
5433
  // Inline function 'kotlin.let' call
5436
5434
  // Inline function 'kotlin.contracts.contract' call
5437
- this_0.o3n_1.p(tmp6_safe_receiver);
5435
+ this_0.o3n_1.p(tmp7_safe_receiver);
5438
5436
  }
5439
5437
  }
5440
5438
  }
@@ -10119,7 +10117,7 @@
10119
10117
  return REGEX_SEQUENCE_SEPARATOR;
10120
10118
  }
10121
10119
  var REGEX_SEQUENCE_SEPARATOR;
10122
- function contains_3(_this__u8e3s4, value) {
10120
+ function contains_2(_this__u8e3s4, value) {
10123
10121
  _init_properties_Regex_kt__v9a4ph();
10124
10122
  return _this__u8e3s4.h8(value);
10125
10123
  }
@@ -10175,19 +10173,8 @@
10175
10173
  }
10176
10174
  function toAbsoluteUriOrNull(_this__u8e3s4, defaultScheme) {
10177
10175
  defaultScheme = defaultScheme === VOID ? 'http' : defaultScheme;
10178
- return toUriOrNull(_this__u8e3s4 == null ? null : addSchemeIfNecessary(_this__u8e3s4, defaultScheme));
10179
- }
10180
- function get_isHttpUrl(_this__u8e3s4) {
10181
- // Inline function 'org.cru.godtools.shared.tool.parser.util.scheme' call
10182
- var tmp0_safe_receiver = contains_2(_this__u8e3s4, ':') ? substringBefore(_this__u8e3s4, ':') : null;
10183
- var tmp;
10184
- if (tmp0_safe_receiver == null) {
10185
- tmp = null;
10186
- } else {
10187
- // Inline function 'kotlin.text.matches' call
10188
- tmp = Regex_init_$Create$_0('https?', RegexOption_IGNORE_CASE_getInstance()).h8(tmp0_safe_receiver);
10189
- }
10190
- return tmp === true;
10176
+ var tmp1_safe_receiver = _this__u8e3s4 == null ? null : addSchemeIfNecessary(_this__u8e3s4, defaultScheme);
10177
+ return tmp1_safe_receiver == null ? null : toUriOrNull(tmp1_safe_receiver);
10191
10178
  }
10192
10179
  function addSchemeIfNecessary(_this__u8e3s4, defaultScheme) {
10193
10180
  return get_hasUriScheme(_this__u8e3s4) ? _this__u8e3s4 : defaultScheme + '://' + _this__u8e3s4;