@dhis2/expression-parser 1.1.4 → 1.1.5

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.
@@ -85,10 +85,12 @@ import {
85
85
  coerceAtMost322komnqp70ag as coerceAtMost,
86
86
  IntRange1cx8zvxgibbj2 as IntRange,
87
87
  replace3le3ie7l9k8aq as replace,
88
- endsWith3cq61xxngobwh as endsWith,
89
88
  startsWith26w8qjqapeeq6 as startsWith,
89
+ take9j4462mea726 as take,
90
+ dropLastlqc2oyv04br0 as dropLast,
91
+ endsWith3cq61xxngobwh as endsWith,
90
92
  Regex_init_$Create$xe1wdfnzfij1 as Regex_init_$Create$,
91
- take3onnpy6q7ctcz as take,
93
+ take3onnpy6q7ctcz as take_0,
92
94
  copyToArray2j022khrow2yi as copyToArray,
93
95
  getProgressionLastElement2w30kdy2w5nkt as getProgressionLastElement,
94
96
  arrayCopytctsywo3h7gj as arrayCopy,
@@ -728,7 +730,7 @@ function d2_split(input, delimiter, index) {
728
730
  // Inline function 'kotlin.text.isEmpty' call
729
731
  var this_2 = iterator.j1();
730
732
  if (!(charSequenceLength(this_2) === 0)) {
731
- tmp$ret$4 = take(this_1, iterator.i1() + 1 | 0);
733
+ tmp$ret$4 = take_0(this_1, iterator.i1() + 1 | 0);
732
734
  break $l$block;
733
735
  }
734
736
  }
@@ -5873,21 +5875,11 @@ protoOf(Companion_14).f19 = function (gs1Group) {
5873
5875
  var tmp0_iterator = get_entries_6().s();
5874
5876
  while (tmp0_iterator.t()) {
5875
5877
  var gs1Elements = tmp0_iterator.u();
5876
- var ai = gs1Elements.e19_1;
5877
- if (endsWith(ai, '*')) {
5878
- // Inline function 'kotlin.text.substring' call
5879
- var this_0 = ai;
5880
- var endIndex = ai.length - 1 | 0;
5881
- // Inline function 'kotlin.js.asDynamic' call
5882
- ai = this_0.substring(0, endIndex);
5883
- }
5884
- if (startsWith(gs1Group, ai) ? endsWith(ai, '*') : false) {
5885
- // Inline function 'kotlin.text.substring' call
5886
- var endIndex_0 = ai.length + 1 | 0;
5887
- // Inline function 'kotlin.js.asDynamic' call
5888
- return gs1Group.substring(0, endIndex_0);
5889
- } else if (startsWith(gs1Group, ai)) {
5890
- return ai;
5878
+ var name = gs1Elements.e19_1;
5879
+ if ((endsWith(name, '*') ? gs1Group.length >= name.length : false) ? startsWith(gs1Group, dropLast(name, 1)) : false) {
5880
+ return take(gs1Group, name.length);
5881
+ } else if (startsWith(gs1Group, name)) {
5882
+ return name;
5891
5883
  }
5892
5884
  }
5893
5885
  throw IllegalArgumentException_init_$Create$('Could not retrieve ai from value');
@@ -6941,7 +6933,7 @@ function formatValue($this, value, valueToReturn) {
6941
6933
  // Inline function 'kotlin.text.isEmpty' call
6942
6934
  var this_3 = iterator.j1();
6943
6935
  if (!(charSequenceLength(this_3) === 0)) {
6944
- tmp$ret$4 = take(this_2, iterator.i1() + 1 | 0);
6936
+ tmp$ret$4 = take_0(this_2, iterator.i1() + 1 | 0);
6945
6937
  break $l$block;
6946
6938
  }
6947
6939
  }
@@ -10143,7 +10135,7 @@ function dataItem($this, expr, ctx, name) {
10143
10135
  // Inline function 'kotlin.text.isEmpty' call
10144
10136
  var this_1 = iterator.j1();
10145
10137
  if (!(charSequenceLength(this_1) === 0)) {
10146
- tmp$ret$4 = take(this_0, iterator.i1() + 1 | 0);
10138
+ tmp$ret$4 = take_0(this_0, iterator.i1() + 1 | 0);
10147
10139
  break $l$block;
10148
10140
  }
10149
10141
  }
@@ -10208,7 +10200,7 @@ function dataItem($this, expr, ctx, name) {
10208
10200
  // Inline function 'kotlin.text.isEmpty' call
10209
10201
  var this_5 = iterator_0.j1();
10210
10202
  if (!(charSequenceLength(this_5) === 0)) {
10211
- tmp$ret$16 = take(this_4, iterator_0.i1() + 1 | 0);
10203
+ tmp$ret$16 = take_0(this_4, iterator_0.i1() + 1 | 0);
10212
10204
  break $l$block_1;
10213
10205
  }
10214
10206
  }
@@ -10263,7 +10255,7 @@ function isTaggedUidGroup($this, expr) {
10263
10255
  // Inline function 'kotlin.text.isEmpty' call
10264
10256
  var this_1 = iterator.j1();
10265
10257
  if (!(charSequenceLength(this_1) === 0)) {
10266
- tmp$ret$6 = take(this_0, iterator.i1() + 1 | 0);
10258
+ tmp$ret$6 = take_0(this_0, iterator.i1() + 1 | 0);
10267
10259
  break $l$block;
10268
10260
  }
10269
10261
  }