@kontur.candy/generator 5.45.2-minitourlinks.0 → 5.46.0-incremental-dictionaries.3

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 (2) hide show
  1. package/dist/index.js +511 -255
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -45028,15 +45028,20 @@ __webpack_require__.r(__webpack_exports__);
45028
45028
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
45029
45029
  /* harmony export */ extractGfvFromFormPath: () => (/* binding */ extractGfvFromFormPath)
45030
45030
  /* harmony export */ });
45031
- /* harmony import */ var _TypingUtils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./TypingUtils */ "./Common/TypingUtils.ts");
45032
- /* harmony import */ var _WellKnownDirectories__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./WellKnownDirectories */ "./Common/WellKnownDirectories.ts");
45033
-
45031
+ /* harmony import */ var _WellKnownDirectories__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./WellKnownDirectories */ "./Common/WellKnownDirectories.ts");
45034
45032
 
45035
45033
  function extractGfvFromFormPath(formPath) {
45036
- var _ref, _match$groups$gfv, _match$groups, _match$groups2;
45037
- const regexp = new RegExp(`([\\/\\\\](?<gfv1>\\d{6,})[\\/\\\\]${_WellKnownDirectories__WEBPACK_IMPORTED_MODULE_1__.WellKnownDirectories.CandySubdirectoryName})|(((\\.farm)|(${_WellKnownDirectories__WEBPACK_IMPORTED_MODULE_1__.WellKnownDirectories.TestFarmDir}))[\\/\\\\]forms[\\/\\\\](?<gfv2>\\d{6,}))`);
45034
+ var _match$groups$gfv, _match$groups, _match$groups2;
45035
+ const regexp = new RegExp(`([\\/\\\\](?<gfv1>\\d{6,})[\\/\\\\]${_WellKnownDirectories__WEBPACK_IMPORTED_MODULE_0__.WellKnownDirectories.CandySubdirectoryName})|(((\\.farm)|(${_WellKnownDirectories__WEBPACK_IMPORTED_MODULE_0__.WellKnownDirectories.TestFarmDir}))[\\/\\\\]forms[\\/\\\\](?<gfv2>\\d{6,}))`);
45038
45036
  const match = regexp.exec(formPath);
45039
- return (_ref = (_match$groups$gfv = match === null || match === void 0 || (_match$groups = match.groups) === null || _match$groups === void 0 ? void 0 : _match$groups["gfv1"]) !== null && _match$groups$gfv !== void 0 ? _match$groups$gfv : match === null || match === void 0 || (_match$groups2 = match.groups) === null || _match$groups2 === void 0 ? void 0 : _match$groups2["gfv2"]) !== null && _ref !== void 0 ? _ref : (0,_TypingUtils__WEBPACK_IMPORTED_MODULE_0__.reject)(`Unable to determine gfv from path: ${formPath}`);
45037
+ const gfv = (_match$groups$gfv = match === null || match === void 0 || (_match$groups = match.groups) === null || _match$groups === void 0 ? void 0 : _match$groups["gfv1"]) !== null && _match$groups$gfv !== void 0 ? _match$groups$gfv : match === null || match === void 0 || (_match$groups2 = match.groups) === null || _match$groups2 === void 0 ? void 0 : _match$groups2["gfv2"];
45038
+ if (gfv) {
45039
+ return gfv;
45040
+ }
45041
+ // Ошибка не долетает до консоли при работе с сервисранера. Поэтому доп. консолька
45042
+ // eslint-disable-next-line no-console
45043
+ console.trace(`[Error] Unable to determine gfv from path: ${formPath}`);
45044
+ throw new Error(`Unable to determine gfv from path: ${formPath}`);
45040
45045
  }
45041
45046
 
45042
45047
  /***/ }),
@@ -48627,6 +48632,7 @@ __webpack_require__.r(__webpack_exports__);
48627
48632
  /* harmony export */ getDaysInMonthKCLangFunction: () => (/* binding */ getDaysInMonthKCLangFunction),
48628
48633
  /* harmony export */ getMonthKCLangFunction: () => (/* binding */ getMonthKCLangFunction),
48629
48634
  /* harmony export */ getPicklistValuesKCLangFunction: () => (/* binding */ getPicklistValuesKCLangFunction),
48635
+ /* harmony export */ getSumByKeysKCLangFunction: () => (/* binding */ getSumByKeysKCLangFunction),
48630
48636
  /* harmony export */ getYearKCLangFunction: () => (/* binding */ getYearKCLangFunction),
48631
48637
  /* harmony export */ groupCountKCLangFunction: () => (/* binding */ groupCountKCLangFunction),
48632
48638
  /* harmony export */ groupSumKCLangFunction: () => (/* binding */ groupSumKCLangFunction),
@@ -48639,6 +48645,7 @@ __webpack_require__.r(__webpack_exports__);
48639
48645
  /* harmony export */ isValidAccountNumberKCLangFunction: () => (/* binding */ isValidAccountNumberKCLangFunction),
48640
48646
  /* harmony export */ isValidMirCardNumberKCLangFunction: () => (/* binding */ isValidMirCardNumberKCLangFunction),
48641
48647
  /* harmony export */ lengthKCLangFunction: () => (/* binding */ lengthKCLangFunction),
48648
+ /* harmony export */ makeDictKCLangFunction: () => (/* binding */ makeDictKCLangFunction),
48642
48649
  /* harmony export */ newlineKCLangFunction: () => (/* binding */ newlineKCLangFunction),
48643
48650
  /* harmony export */ noDepsKCLangFunction: () => (/* binding */ noDepsKCLangFunction),
48644
48651
  /* harmony export */ regexMatchKCLangFunction: () => (/* binding */ regexMatchKCLangFunction),
@@ -49326,6 +49333,46 @@ const hasAutoFlagKCLangFunction = params => {
49326
49333
  expression: param
49327
49334
  };
49328
49335
  };
49336
+ const makeDictKCLangFunction = params => {
49337
+ var _params$48, _params$49;
49338
+ const errors = Array.from(validateParams(params, 2));
49339
+ if (errors.length > 0) {
49340
+ return new FunctionValidationErrorCollection(errors);
49341
+ }
49342
+ const sourceKeyPathParam = (_params$48 = params[0]) === null || _params$48 === void 0 ? void 0 : _params$48.value;
49343
+ const sourceValuePathParam = (_params$49 = params[1]) === null || _params$49 === void 0 ? void 0 : _params$49.value;
49344
+ if ((sourceKeyPathParam === null || sourceKeyPathParam === void 0 ? void 0 : sourceKeyPathParam.type) !== "argument" || sourceValuePathParam == undefined) {
49345
+ const argumentsValidationError = new ArgumentValidationError("Invalid argument sourceKeyPath");
49346
+ return new FunctionValidationErrorCollection([argumentsValidationError]);
49347
+ }
49348
+ return {
49349
+ type: "makeDict",
49350
+ sourceKeyPath: sourceKeyPathParam.select,
49351
+ sourceValueExpression: sourceValuePathParam
49352
+ };
49353
+ };
49354
+ const getSumByKeysKCLangFunction = params => {
49355
+ var _params$50, _params$51;
49356
+ const errors = Array.from(validateParams(params, 2));
49357
+ if (errors.length > 0) {
49358
+ return new FunctionValidationErrorCollection(errors);
49359
+ }
49360
+ const dictPathParam = (_params$50 = params[0]) === null || _params$50 === void 0 ? void 0 : _params$50.value;
49361
+ const targetKeysParam = (_params$51 = params[1]) === null || _params$51 === void 0 ? void 0 : _params$51.value;
49362
+ if (targetKeysParam == undefined || (dictPathParam === null || dictPathParam === void 0 ? void 0 : dictPathParam.type) !== "argument") {
49363
+ const argumentsValidationError = new ArgumentValidationError("Invalid arguments dictPathParam, targetKeysParam");
49364
+ return new FunctionValidationErrorCollection([argumentsValidationError]);
49365
+ }
49366
+ const targetKeys = targetKeysParam.type === "array" ? targetKeysParam : {
49367
+ type: "array",
49368
+ items: [targetKeysParam]
49369
+ };
49370
+ return {
49371
+ type: "getSumByKeys",
49372
+ dictPath: dictPathParam.select,
49373
+ targetKeys: targetKeys
49374
+ };
49375
+ };
49329
49376
 
49330
49377
  /***/ }),
49331
49378
 
@@ -49390,7 +49437,9 @@ const getKCLangGlobalFunctionBuilders = () => ({
49390
49437
  addYears: [_KCLangAntlrFunctions__WEBPACK_IMPORTED_MODULE_2__.addYearsKCLangFunction],
49391
49438
  dateToString: [_KCLangAntlrFunctions__WEBPACK_IMPORTED_MODULE_2__.dateToStringKCLangFunction],
49392
49439
  dateTime: [_KCLangAntlrFunctions__WEBPACK_IMPORTED_MODULE_2__.dateTimeKCLangFunction],
49393
- hasAutoFlag: [_KCLangAntlrFunctions__WEBPACK_IMPORTED_MODULE_2__.hasAutoFlagKCLangFunction]
49440
+ hasAutoFlag: [_KCLangAntlrFunctions__WEBPACK_IMPORTED_MODULE_2__.hasAutoFlagKCLangFunction],
49441
+ makeDict: [_KCLangAntlrFunctions__WEBPACK_IMPORTED_MODULE_2__.makeDictKCLangFunction],
49442
+ getSumByKeys: [_KCLangAntlrFunctions__WEBPACK_IMPORTED_MODULE_2__.getSumByKeysKCLangFunction]
49394
49443
  });
49395
49444
  class ErrorListener {
49396
49445
  constructor() {
@@ -49741,6 +49790,12 @@ class KCLangAntlrVisitor {
49741
49790
  case "string":
49742
49791
  dataType = "string";
49743
49792
  break;
49793
+ case "dict":
49794
+ dataType = "dict";
49795
+ break;
49796
+ case "array":
49797
+ dataType = "array";
49798
+ break;
49744
49799
  default:
49745
49800
  throw Error("visitType syntax incorrect");
49746
49801
  }
@@ -57536,6 +57591,10 @@ function generateKCXmlExpression(expression) {
57536
57591
  return `<m:${expression.type} select="${expression.select}" />`;
57537
57592
  case "isValidAccountNumber":
57538
57593
  return `<m:${expression.type} bik="${expression.bik}" account="${expression.account}" />`;
57594
+ case "makeDict":
57595
+ return [`<m:${expression.type} sourceKeyPath="${expression.sourceKeyPath}">`, (0,_Common_IndentString__WEBPACK_IMPORTED_MODULE_2__.indent)(generateKCXmlExpression(expression.sourceValueExpression), 1), `</m:${expression.type}>`].join("\n");
57596
+ case "getSumByKeys":
57597
+ return [`<m:${expression.type} dictPath="${expression.dictPath}">`, (0,_Common_IndentString__WEBPACK_IMPORTED_MODULE_2__.indent)(generateKCXmlExpression(expression.targetKeys), 1), `</m:${expression.type}>`].join("\n");
57539
57598
  case "groupSum":
57540
57599
  return [`<m:${expression.type} sourceKeyPath="${expression.sourceKeyPath}" sourceValuePath="${expression.sourceValuePath}" >`, (0,_Common_IndentString__WEBPACK_IMPORTED_MODULE_2__.indent)(generateKCXmlExpression(expression.targetKeys), 1), `</m:${expression.type}>`].join("\n");
57541
57600
  case "groupCount":
@@ -63645,6 +63704,7 @@ __webpack_require__.r(__webpack_exports__);
63645
63704
  /* harmony export */ FormulaGetDaysInMonthExpression: () => (/* binding */ FormulaGetDaysInMonthExpression),
63646
63705
  /* harmony export */ FormulaGetMonthExpression: () => (/* binding */ FormulaGetMonthExpression),
63647
63706
  /* harmony export */ FormulaGetPicklistValuesExpression: () => (/* binding */ FormulaGetPicklistValuesExpression),
63707
+ /* harmony export */ FormulaGetSumByKeysExpression: () => (/* binding */ FormulaGetSumByKeysExpression),
63648
63708
  /* harmony export */ FormulaGetYearExpression: () => (/* binding */ FormulaGetYearExpression),
63649
63709
  /* harmony export */ FormulaGroupCountExpression: () => (/* binding */ FormulaGroupCountExpression),
63650
63710
  /* harmony export */ FormulaGroupSumExpression: () => (/* binding */ FormulaGroupSumExpression),
@@ -63660,6 +63720,7 @@ __webpack_require__.r(__webpack_exports__);
63660
63720
  /* harmony export */ FormulaLeExpression: () => (/* binding */ FormulaLeExpression),
63661
63721
  /* harmony export */ FormulaLengthExpression: () => (/* binding */ FormulaLengthExpression),
63662
63722
  /* harmony export */ FormulaLtExpression: () => (/* binding */ FormulaLtExpression),
63723
+ /* harmony export */ FormulaMakeDictExpression: () => (/* binding */ FormulaMakeDictExpression),
63663
63724
  /* harmony export */ FormulaMinusExpression: () => (/* binding */ FormulaMinusExpression),
63664
63725
  /* harmony export */ FormulaMultiplyExpression: () => (/* binding */ FormulaMultiplyExpression),
63665
63726
  /* harmony export */ FormulaMultySumExpression: () => (/* binding */ FormulaMultySumExpression),
@@ -63691,7 +63752,7 @@ __webpack_require__.r(__webpack_exports__);
63691
63752
 
63692
63753
 
63693
63754
 
63694
- var _dec, _dec2, _class, _class2, _descriptor, _dec3, _class3, _dec4, _dec5, _class4, _class5, _descriptor2, _dec6, _dec7, _class6, _class7, _descriptor3, _dec8, _dec9, _class8, _class9, _descriptor4, _dec10, _dec11, _class10, _class11, _descriptor5, _dec12, _dec13, _class12, _class13, _descriptor6, _dec14, _dec15, _dec16, _class14, _class15, _descriptor7, _descriptor8, _dec17, _dec18, _dec19, _class16, _class17, _descriptor9, _descriptor10, _dec20, _dec21, _class18, _class19, _descriptor11, _dec22, _dec23, _class20, _class21, _descriptor12, _dec24, _dec25, _class22, _class23, _descriptor13, _dec26, _dec27, _class24, _class25, _descriptor14, _dec28, _dec29, _class26, _class27, _descriptor15, _dec30, _dec31, _class28, _class29, _descriptor16, _dec32, _dec33, _class30, _class31, _descriptor17, _dec34, _dec35, _class32, _class33, _descriptor18, _dec36, _dec37, _class34, _class35, _descriptor19, _dec38, _dec39, _dec40, _dec41, _class36, _class37, _descriptor20, _descriptor21, _descriptor22, _dec42, _dec43, _class38, _class39, _descriptor23, _dec44, _dec45, _class40, _class41, _descriptor24, _dec46, _dec47, _dec48, _class42, _class43, _descriptor25, _descriptor26, _dec49, _dec50, _class44, _class45, _descriptor27, _dec51, _dec52, _class46, _class47, _descriptor28, _dec53, _dec54, _class48, _class49, _descriptor29, _dec55, _dec56, _class50, _class51, _descriptor30, _dec57, _dec58, _dec59, _class52, _class53, _descriptor31, _descriptor32, _dec60, _dec61, _dec62, _dec63, _class54, _class55, _descriptor33, _descriptor34, _descriptor35, _dec64, _dec65, _dec66, _class56, _class57, _descriptor36, _descriptor37, _dec67, _class58, _dec68, _dec69, _class59, _class60, _descriptor38, _dec70, _dec71, _class61, _class62, _descriptor39, _dec72, _dec73, _class63, _class64, _descriptor40, _dec74, _dec75, _class65, _class66, _descriptor41, _dec76, _dec77, _class67, _class68, _descriptor42, _dec78, _dec79, _class69, _class70, _descriptor43, _dec80, _dec81, _class71, _class72, _descriptor44, _dec82, _dec83, _class73, _class74, _descriptor45, _dec84, _dec85, _dec86, _class75, _class76, _descriptor46, _descriptor47, _dec87, _dec88, _dec89, _class77, _class78, _descriptor48, _descriptor49, _dec90, _dec91, _dec92, _class79, _class80, _descriptor50, _descriptor51, _dec93, _dec94, _dec95, _class81, _class82, _descriptor52, _descriptor53, _dec96, _dec97, _class83, _class84, _descriptor54, _dec98, _dec99, _class85, _class86, _descriptor55, _dec100, _dec101, _class87, _class88, _descriptor56, _dec102, _dec103, _class89, _class90, _descriptor57, _dec104, _dec105, _class91, _class92, _descriptor58, _dec106, _dec107, _dec108, _class93, _class94, _descriptor59, _descriptor60, _dec109, _dec110, _dec111, _class95, _class96, _descriptor61, _descriptor62, _dec112, _dec113, _class97, _class98, _descriptor63, _dec114, _dec115, _class99, _class100, _descriptor64, _dec116, _dec117, _class101, _class102, _descriptor65, _dec118, _dec119, _dec120, _dec121, _dec122, _class103, _class104, _descriptor66, _descriptor67, _descriptor68, _descriptor69, _dec123, _dec124, _class105, _class106, _descriptor70, _dec125, _dec126, _class107, _class108, _descriptor71, _dec127, _dec128, _class109, _class110, _descriptor72, _dec129, _dec130, _class111, _class112, _descriptor73, _dec131, _dec132, _dec133, _class113, _class114, _descriptor74, _descriptor75, _dec134, _dec135, _class115, _class116, _descriptor76, _dec136, _class117, _dec137, _dec138, _dec139, _dec140, _class118, _class119, _descriptor77, _descriptor78, _descriptor79, _dec141, _dec142, _class120, _class121, _descriptor80, _dec143, _dec144, _class122, _class123, _descriptor81, _dec145, _dec146, _dec147, _dec148, _dec149, _dec150, _class124, _class125, _descriptor82, _descriptor83, _descriptor84, _descriptor85, _descriptor86, _dec151, _dec152, _class126, _class127, _descriptor87, _dec153, _dec154, _dec155, _class128, _class129, _descriptor88, _descriptor89, _dec156, _dec157, _dec158, _dec159, _class130, _class131, _descriptor90, _descriptor91, _descriptor92, _dec160, _dec161, _dec162, _class132, _class133, _descriptor93, _descriptor94;
63755
+ var _dec, _dec2, _class, _class2, _descriptor, _dec3, _class3, _dec4, _dec5, _class4, _class5, _descriptor2, _dec6, _dec7, _class6, _class7, _descriptor3, _dec8, _dec9, _class8, _class9, _descriptor4, _dec10, _dec11, _class10, _class11, _descriptor5, _dec12, _dec13, _class12, _class13, _descriptor6, _dec14, _dec15, _dec16, _class14, _class15, _descriptor7, _descriptor8, _dec17, _dec18, _dec19, _class16, _class17, _descriptor9, _descriptor10, _dec20, _dec21, _class18, _class19, _descriptor11, _dec22, _dec23, _class20, _class21, _descriptor12, _dec24, _dec25, _class22, _class23, _descriptor13, _dec26, _dec27, _class24, _class25, _descriptor14, _dec28, _dec29, _class26, _class27, _descriptor15, _dec30, _dec31, _class28, _class29, _descriptor16, _dec32, _dec33, _class30, _class31, _descriptor17, _dec34, _dec35, _class32, _class33, _descriptor18, _dec36, _dec37, _class34, _class35, _descriptor19, _dec38, _dec39, _dec40, _dec41, _class36, _class37, _descriptor20, _descriptor21, _descriptor22, _dec42, _dec43, _class38, _class39, _descriptor23, _dec44, _dec45, _class40, _class41, _descriptor24, _dec46, _dec47, _dec48, _class42, _class43, _descriptor25, _descriptor26, _dec49, _dec50, _class44, _class45, _descriptor27, _dec51, _dec52, _class46, _class47, _descriptor28, _dec53, _dec54, _class48, _class49, _descriptor29, _dec55, _dec56, _class50, _class51, _descriptor30, _dec57, _dec58, _dec59, _class52, _class53, _descriptor31, _descriptor32, _dec60, _dec61, _dec62, _dec63, _class54, _class55, _descriptor33, _descriptor34, _descriptor35, _dec64, _dec65, _dec66, _class56, _class57, _descriptor36, _descriptor37, _dec67, _class58, _dec68, _dec69, _class59, _class60, _descriptor38, _dec70, _dec71, _class61, _class62, _descriptor39, _dec72, _dec73, _class63, _class64, _descriptor40, _dec74, _dec75, _class65, _class66, _descriptor41, _dec76, _dec77, _class67, _class68, _descriptor42, _dec78, _dec79, _class69, _class70, _descriptor43, _dec80, _dec81, _class71, _class72, _descriptor44, _dec82, _dec83, _class73, _class74, _descriptor45, _dec84, _dec85, _dec86, _class75, _class76, _descriptor46, _descriptor47, _dec87, _dec88, _dec89, _class77, _class78, _descriptor48, _descriptor49, _dec90, _dec91, _dec92, _class79, _class80, _descriptor50, _descriptor51, _dec93, _dec94, _dec95, _class81, _class82, _descriptor52, _descriptor53, _dec96, _dec97, _class83, _class84, _descriptor54, _dec98, _dec99, _class85, _class86, _descriptor55, _dec100, _dec101, _class87, _class88, _descriptor56, _dec102, _dec103, _class89, _class90, _descriptor57, _dec104, _dec105, _class91, _class92, _descriptor58, _dec106, _dec107, _dec108, _class93, _class94, _descriptor59, _descriptor60, _dec109, _dec110, _dec111, _class95, _class96, _descriptor61, _descriptor62, _dec112, _dec113, _class97, _class98, _descriptor63, _dec114, _dec115, _class99, _class100, _descriptor64, _dec116, _dec117, _class101, _class102, _descriptor65, _dec118, _dec119, _dec120, _dec121, _dec122, _class103, _class104, _descriptor66, _descriptor67, _descriptor68, _descriptor69, _dec123, _dec124, _class105, _class106, _descriptor70, _dec125, _dec126, _class107, _class108, _descriptor71, _dec127, _dec128, _class109, _class110, _descriptor72, _dec129, _dec130, _class111, _class112, _descriptor73, _dec131, _dec132, _dec133, _class113, _class114, _descriptor74, _descriptor75, _dec134, _dec135, _class115, _class116, _descriptor76, _dec136, _class117, _dec137, _dec138, _dec139, _dec140, _class118, _class119, _descriptor77, _descriptor78, _descriptor79, _dec141, _dec142, _class120, _class121, _descriptor80, _dec143, _dec144, _class122, _class123, _descriptor81, _dec145, _dec146, _dec147, _dec148, _dec149, _dec150, _class124, _class125, _descriptor82, _descriptor83, _descriptor84, _descriptor85, _descriptor86, _dec151, _dec152, _class126, _class127, _descriptor87, _dec153, _dec154, _dec155, _class128, _class129, _descriptor88, _descriptor89, _dec156, _dec157, _dec158, _class130, _class131, _descriptor90, _descriptor91, _dec159, _dec160, _dec161, _class132, _class133, _descriptor92, _descriptor93, _dec162, _dec163, _dec164, _dec165, _class134, _class135, _descriptor94, _descriptor95, _descriptor96, _dec166, _dec167, _dec168, _class136, _class137, _descriptor97, _descriptor98;
63695
63756
 
63696
63757
 
63697
63758
 
@@ -63707,7 +63768,7 @@ class FormulaExpression extends _markupGenerator_Serializer_SugarSerializer__WEB
63707
63768
  throw new Error(`${this.constructor} does not decorated with sugarNode() properly`);
63708
63769
  }
63709
63770
  }
63710
- const typeArgumentValueParser = _markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.enum("decimal", "string");
63771
+ const typeArgumentValueParser = _markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.enum("decimal", "string", "dict", "array");
63711
63772
  let FormulaWhenExpression = (_dec = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.sugarNode)("when", `TODO`), _dec2 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.children)(), _dec(_class = (_class2 = class FormulaWhenExpression extends FormulaExpression {
63712
63773
  constructor(...args) {
63713
63774
  super(...args);
@@ -64644,47 +64705,81 @@ let MathContainer = (_dec153 = (0,_markupGenerator_Serializer_SugarSerializer__W
64644
64705
  writable: true,
64645
64706
  initializer: null
64646
64707
  })), _class129)) || _class128);
64647
- let FormulaGroupSumExpression = (_dec156 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.sugarNode)("groupsum", `Вычисление суммы с группировкой в разных множественностях`), _dec157 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.singleChild)("array", [FormulaArrayExpression]), _dec158 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("sourceKeyPath", _markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.string.required, `Путь откуда брать ключ группы в суммируемой множественности`), _dec159 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("sourceValuePath", _markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.string.required, `Путь в суммируемой множественности откуда берем значение для свёртки`), _dec156(_class130 = (_class131 = class FormulaGroupSumExpression extends FormulaExpression {
64708
+ let FormulaMakeDictExpression = (_dec156 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.sugarNode)("makedict", `Получение словаря по ключу-значению из иннера`), _dec157 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("sourceKeyPath", _markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.string.required, `Путь откуда брать ключ`), _dec158 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.singleChild)(undefined, [FormulaArgumentExpression, FormulaConstExpression, FormulaCastExpression], `Путь откуда брать значение или константа`), _dec156(_class130 = (_class131 = class FormulaMakeDictExpression extends FormulaExpression {
64648
64709
  constructor(...args) {
64649
64710
  super(...args);
64650
- _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "targetKeys", _descriptor90, this);
64651
- _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "sourceKeyPath", _descriptor91, this);
64652
- _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "sourceValuePath", _descriptor92, this);
64711
+ _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "sourceKeyPath", _descriptor90, this);
64712
+ _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "sourceValueExpression", _descriptor91, this);
64653
64713
  }
64654
- }, (_descriptor90 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class131.prototype, "targetKeys", [_dec157], {
64714
+ }, (_descriptor90 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class131.prototype, "sourceKeyPath", [_dec157], {
64655
64715
  configurable: true,
64656
64716
  enumerable: true,
64657
64717
  writable: true,
64658
64718
  initializer: null
64659
- }), _descriptor91 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class131.prototype, "sourceKeyPath", [_dec158], {
64719
+ }), _descriptor91 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class131.prototype, "sourceValueExpression", [_dec158], {
64660
64720
  configurable: true,
64661
64721
  enumerable: true,
64662
64722
  writable: true,
64663
64723
  initializer: null
64664
- }), _descriptor92 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class131.prototype, "sourceValuePath", [_dec159], {
64724
+ })), _class131)) || _class130);
64725
+ let FormulaGetSumByKeysExpression = (_dec159 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.sugarNode)("getsumbykeys", `Вычисление суммы с группировкой в разных множественностях`), _dec160 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("dictPath", _markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.string.required, `Путь к словарю`), _dec161 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.singleChild)("array", [FormulaArrayExpression]), _dec159(_class132 = (_class133 = class FormulaGetSumByKeysExpression extends FormulaExpression {
64726
+ constructor(...args) {
64727
+ super(...args);
64728
+ _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "dictPath", _descriptor92, this);
64729
+ _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "targetKeys", _descriptor93, this);
64730
+ }
64731
+ }, (_descriptor92 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class133.prototype, "dictPath", [_dec160], {
64665
64732
  configurable: true,
64666
64733
  enumerable: true,
64667
64734
  writable: true,
64668
64735
  initializer: null
64669
- })), _class131)) || _class130);
64670
- let FormulaGroupCountExpression = (_dec160 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.sugarNode)("groupcount", `Вычисление количества элементов по группам в разных множественностях`), _dec161 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.singleChild)("array", [FormulaArrayExpression]), _dec162 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("sourceKeyPath", _markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.string.required, `Путь откуда брать ключ группы в суммируемой множественности`), _dec160(_class132 = (_class133 = class FormulaGroupCountExpression extends FormulaExpression {
64736
+ }), _descriptor93 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class133.prototype, "targetKeys", [_dec161], {
64737
+ configurable: true,
64738
+ enumerable: true,
64739
+ writable: true,
64740
+ initializer: null
64741
+ })), _class133)) || _class132);
64742
+ let FormulaGroupSumExpression = (_dec162 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.sugarNode)("groupsum", `Вычисление суммы с группировкой в разных множественностях`), _dec163 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.singleChild)("array", [FormulaArrayExpression]), _dec164 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("sourceKeyPath", _markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.string.required, `Путь откуда брать ключ группы в суммируемой множественности`), _dec165 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("sourceValuePath", _markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.string.required, `Путь в суммируемой множественности откуда берем значение для свёртки`), _dec162(_class134 = (_class135 = class FormulaGroupSumExpression extends FormulaExpression {
64671
64743
  constructor(...args) {
64672
64744
  super(...args);
64673
- _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "targetKeys", _descriptor93, this);
64674
- _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "sourceKeyPath", _descriptor94, this);
64745
+ _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "targetKeys", _descriptor94, this);
64746
+ _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "sourceKeyPath", _descriptor95, this);
64747
+ _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "sourceValuePath", _descriptor96, this);
64675
64748
  }
64676
- }, (_descriptor93 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class133.prototype, "targetKeys", [_dec161], {
64749
+ }, (_descriptor94 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class135.prototype, "targetKeys", [_dec163], {
64677
64750
  configurable: true,
64678
64751
  enumerable: true,
64679
64752
  writable: true,
64680
64753
  initializer: null
64681
- }), _descriptor94 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class133.prototype, "sourceKeyPath", [_dec162], {
64754
+ }), _descriptor95 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class135.prototype, "sourceKeyPath", [_dec164], {
64682
64755
  configurable: true,
64683
64756
  enumerable: true,
64684
64757
  writable: true,
64685
64758
  initializer: null
64686
- })), _class133)) || _class132);
64687
- const formulaExpressions = [FormulaSumExpression, FormulaArgumentExpression, FormulaConstExpression, FormulaMultySumExpression, FormulaRoundExpression, FormulaFloorExpression, FormulaAbsExpression, FormulaDivisionExpression, FormulaMinusExpression, FormulaMultiplyExpression, FormulaChooseExpression, FormulaEqExpression, FormulaGtExpression, FormulaLtExpression, FormulaGeExpression, FormulaLeExpression, FormulaAndExpression, FormulaOrExpression, FormulaNotExpression, FormulaRegexMatchExpression, FormulaSubstringExpression, FormulaXAbsExpression, FormulaExistsExpression, FormulaLengthExpression, FormulaWhenExpression, FormulaCountExpression, FormulaDateNowExpression, FormulaGetDaysInMonthExpression, FormulaGetDayExpression, FormulaGetMonthExpression, FormulaGetYearExpression, FormulaIsDateExpression, FormulaDifferenceInMonthsExpression, FormulaDifferenceInDaysExpression, FormulaAddDaysExpression, FormulaAddMonthsExpression, FormulaAddYearsExpression, FormulaDateToStringExpression, FormulaDateTimeExpression, FormulaIsSnilsExpression, FormulaIsRegNumSfrExpression, FormulaIsInnExpression, FormulaIsValidAccountNumberExpression, FormulaIsValidMirCardNumberExpression, FormulaCastExpression, FormulaConcatExpression, FormulaGroupSumExpression, FormulaGroupCountExpression, FormulaNewLineExpression, FormulaOneOfExpression, FormulaGetPicklistValuesExpression, FormulaArrayExpression, FormulaFirstOrDefaultExpression, FormulaHashSetExpression, FormulaFilterColumnExpression, FormulaFilterKeyExpression, FormulaNoDepsNode, FormulaHasAutoFlagExpression];
64759
+ }), _descriptor96 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class135.prototype, "sourceValuePath", [_dec165], {
64760
+ configurable: true,
64761
+ enumerable: true,
64762
+ writable: true,
64763
+ initializer: null
64764
+ })), _class135)) || _class134);
64765
+ let FormulaGroupCountExpression = (_dec166 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.sugarNode)("groupcount", `Вычисление количества элементов по группам в разных множественностях`), _dec167 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.singleChild)("array", [FormulaArrayExpression]), _dec168 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("sourceKeyPath", _markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.string.required, `Путь откуда брать ключ группы в суммируемой множественности`), _dec166(_class136 = (_class137 = class FormulaGroupCountExpression extends FormulaExpression {
64766
+ constructor(...args) {
64767
+ super(...args);
64768
+ _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "targetKeys", _descriptor97, this);
64769
+ _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "sourceKeyPath", _descriptor98, this);
64770
+ }
64771
+ }, (_descriptor97 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class137.prototype, "targetKeys", [_dec167], {
64772
+ configurable: true,
64773
+ enumerable: true,
64774
+ writable: true,
64775
+ initializer: null
64776
+ }), _descriptor98 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class137.prototype, "sourceKeyPath", [_dec168], {
64777
+ configurable: true,
64778
+ enumerable: true,
64779
+ writable: true,
64780
+ initializer: null
64781
+ })), _class137)) || _class136);
64782
+ const formulaExpressions = [FormulaSumExpression, FormulaArgumentExpression, FormulaConstExpression, FormulaMultySumExpression, FormulaRoundExpression, FormulaFloorExpression, FormulaAbsExpression, FormulaDivisionExpression, FormulaMinusExpression, FormulaMultiplyExpression, FormulaChooseExpression, FormulaEqExpression, FormulaGtExpression, FormulaLtExpression, FormulaGeExpression, FormulaLeExpression, FormulaAndExpression, FormulaOrExpression, FormulaNotExpression, FormulaRegexMatchExpression, FormulaSubstringExpression, FormulaXAbsExpression, FormulaExistsExpression, FormulaLengthExpression, FormulaWhenExpression, FormulaCountExpression, FormulaDateNowExpression, FormulaGetDaysInMonthExpression, FormulaGetDayExpression, FormulaGetMonthExpression, FormulaGetYearExpression, FormulaIsDateExpression, FormulaDifferenceInMonthsExpression, FormulaDifferenceInDaysExpression, FormulaAddDaysExpression, FormulaAddMonthsExpression, FormulaAddYearsExpression, FormulaDateToStringExpression, FormulaDateTimeExpression, FormulaIsSnilsExpression, FormulaIsRegNumSfrExpression, FormulaIsInnExpression, FormulaIsValidAccountNumberExpression, FormulaIsValidMirCardNumberExpression, FormulaCastExpression, FormulaConcatExpression, FormulaGroupSumExpression, FormulaGroupCountExpression, FormulaNewLineExpression, FormulaOneOfExpression, FormulaGetPicklistValuesExpression, FormulaArrayExpression, FormulaFirstOrDefaultExpression, FormulaHashSetExpression, FormulaFilterColumnExpression, FormulaFilterKeyExpression, FormulaNoDepsNode, FormulaHasAutoFlagExpression, FormulaMakeDictExpression, FormulaGetSumByKeysExpression];
64688
64783
 
64689
64784
  /***/ }),
64690
64785
 
@@ -67144,7 +67239,7 @@ class LazyLoadDeclarationGenerator {
67144
67239
  thresholdValue: lazyLoadingNodeDeclaration.thresholdValue
67145
67240
  };
67146
67241
  }
67147
- const result = this.replaceHolder(`
67242
+ const result = LazyLoadDeclarationGenerator.replaceHolder(`
67148
67243
  export default function lazyLoadDeclaration() {
67149
67244
  return ${serialize_javascript__WEBPACK_IMPORTED_MODULE_0___default()(declaration, {
67150
67245
  space: " "
@@ -67156,6 +67251,16 @@ class LazyLoadDeclarationGenerator {
67156
67251
  declaration: declaration
67157
67252
  };
67158
67253
  }
67254
+ static convertDeclarationToContent(declaration) {
67255
+ const result = LazyLoadDeclarationGenerator.replaceHolder(`
67256
+ export default function lazyLoadDeclaration() {
67257
+ return ${serialize_javascript__WEBPACK_IMPORTED_MODULE_0___default()(declaration, {
67258
+ space: " "
67259
+ })};
67260
+ };`);
67261
+ const content = unescape(result.replace(/(\\)(u[\dA-Fa-f]{4})/g, "%$2"));
67262
+ return content;
67263
+ }
67159
67264
  *extractLazyLoadingDeclarationFromSugar(sugarRoot) {
67160
67265
  const controlConverterClass = (0,_markupGenerator_AllConverters__WEBPACK_IMPORTED_MODULE_5__.getConverterByNodeClass)((0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.getNodeClass)(sugarRoot));
67161
67266
  if (controlConverterClass != undefined) {
@@ -67234,7 +67339,7 @@ class LazyLoadDeclarationGenerator {
67234
67339
  yield* this.processElement(nextPath, child);
67235
67340
  }
67236
67341
  }
67237
- replaceHolder(decl) {
67342
+ static replaceHolder(decl) {
67238
67343
  let replacedDecl = decl;
67239
67344
  for (const [placeholderName, placeHoldersFunction] of (0,_Common_IterableUtils__WEBPACK_IMPORTED_MODULE_1__.iterateEntries)(_DataDeclarationGenerator_placeholders__WEBPACK_IMPORTED_MODULE_2__.placeHolders)) {
67240
67345
  const checkName = `"#(${placeholderName})(\\('[\\w]*'\\))?#"`;
@@ -67410,14 +67515,15 @@ function processSugar(formSugarContent, additionalContent, generationOptions) {
67410
67515
  markupGenerator.generate(sugarRoot, builder);
67411
67516
  builder.addResource("settings.js", (0,_markupGenerator_getSettings__WEBPACK_IMPORTED_MODULE_9__.getSettings)(sugarRoot, additionalContent.gfv, additionalSettings, additionalContent.formJsonSettings));
67412
67517
  builder.addResource("requisiteList.js", (0,_RequisiteLIst_requisiteList__WEBPACK_IMPORTED_MODULE_24__.getRequisiteList)(sugarRoot, fetchFunctions));
67413
- builder.addResource("lazyLoadDeclaration.js", lazyLoadGeneratorResult.content);
67414
67518
  const autocalcGenerator = new _AutoCalculationsGenerator_AutoCalculationsGenerator__WEBPACK_IMPORTED_MODULE_18__.AutoCalculationsGenerator(dataDeclarationHelper, schemaRng);
67415
67519
  const formulasForCalculator = useOldCalculator ? formulas : [];
67416
67520
  builder.addResource("calculationFunctions.js", autocalcGenerator.generate(sugarRoot, additionalContent.autocalcsContent, formulasForCalculator));
67417
67521
  builder.addResource("dataDeclaration.js", dataDeclarationContent);
67522
+ let finalLazyLoadDeclaration = lazyLoadGeneratorResult.declaration;
67418
67523
  if ((_additionalContent$fo5 = (_additionalContent$fo6 = additionalContent.formJsonSettings) === null || _additionalContent$fo6 === void 0 ? void 0 : _additionalContent$fo6.useServerSideFLangNormalization) !== null && _additionalContent$fo5 !== void 0 ? _additionalContent$fo5 : false) {
67419
67524
  var _additionalContent$fo7, _additionalContent$fo8, _additionalContent$fo9;
67420
67525
  const defaultNormalizationRules = normalizationRulesGenerator.generateRules();
67526
+ finalLazyLoadDeclaration = mixLazyLoadingDeclarationWithServerOnlyPaths(lazyLoadGeneratorResult.declaration, defaultNormalizationRules.serverOnlyPaths);
67421
67527
  const customNormalizers = [{
67422
67528
  normalizerId: "formulas",
67423
67529
  content: (_additionalContent$fo7 = additionalContent.formJsonSettings) !== null && _additionalContent$fo7 !== void 0 && _additionalContent$fo7.disableFlangRulesForEnableAutoFieldFeature ? "" : formulaOnlyNormalizationRulesGenerator.generateRules()
@@ -67450,9 +67556,10 @@ function processSugar(formSugarContent, additionalContent, generationOptions) {
67450
67556
  throw new Error(`Cannot transform normalization file with ${additionalNormalizer.extension} extension`);
67451
67557
  }
67452
67558
  }) : [];
67453
- const resultRules = combineFlangRules(defaultNormalizationRules, ...additionalNormalizationRules, ...customNormalizers);
67559
+ const resultRules = combineFlangRules(defaultNormalizationRules.content, ...additionalNormalizationRules, ...customNormalizers);
67454
67560
  builder.addServerSideResource("ServerSide.normalize", resultRules);
67455
67561
  }
67562
+ builder.addResource("lazyLoadDeclaration.js", _LazyLoadDeclarationGenerator_LazyLoadDeclarationGenerator__WEBPACK_IMPORTED_MODULE_29__.LazyLoadDeclarationGenerator.convertDeclarationToContent(finalLazyLoadDeclaration));
67456
67563
  const attachmentPathsGenerator = new _AttachmentPaths_AttachmentPathsGenerator__WEBPACK_IMPORTED_MODULE_27__.AttachmentPathsGenerator();
67457
67564
  const attachmentPaths = attachmentPathsGenerator.generate(sugarRoot);
67458
67565
  builder.addServerSideResource(`AttachmentPaths.json`, JSON.stringify(attachmentPaths));
@@ -67493,6 +67600,17 @@ function processSugar(formSugarContent, additionalContent, generationOptions) {
67493
67600
  return (0,_common_Errors_ProcessSugarErrors__WEBPACK_IMPORTED_MODULE_1__.processSugarErrors)(e, additionalContent.gfv);
67494
67601
  }
67495
67602
  }
67603
+ function mixLazyLoadingDeclarationWithServerOnlyPaths(declaration, paths) {
67604
+ const updateDeclaration = {
67605
+ ...declaration
67606
+ };
67607
+ for (const path of paths) {
67608
+ updateDeclaration[path.toString()] = {
67609
+ lazyLoadMode: "serverOnly"
67610
+ };
67611
+ }
67612
+ return updateDeclaration;
67613
+ }
67496
67614
  function combineFlangRules(baseRules, ...rules) {
67497
67615
  const customNormalizeRules = rules.filter(r => r.normalizerId).map(x => `--${x.normalizerId}--\n${x.content}`);
67498
67616
  const additionalBaseRules = rules.filter(r => !r.normalizerId).map(r => r.content);
@@ -67981,7 +68099,7 @@ class CustomKCLangToFlangRuleGenerator {
67981
68099
  const result = [];
67982
68100
  const getFormulaExpression = field => new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.NullCoalesceExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_5__.wrapWithArgumentsCondition)((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_5__.castOperandToStringIfNeed)(this.formulaExprConverter.compileExpressionToFlangExpression(formula.expression, prefix, new _Common_ModelPath_AbsoluteModelFieldPath__WEBPACK_IMPORTED_MODULE_4__.AbsoluteModelFieldPath(fullTarget, field), x => precalculationRules.push(x)), "G29")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.StringLiteralExpression(defaultValue));
67983
68101
  if (isTargetAutoField) {
67984
- result.push(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.ValueReferenceExpression(fullTarget, "autoValue"), getFormulaExpression("autoValue")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.ValueReferenceExpression(fullTarget, "value"), getFormulaExpression("value")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.ValueReferenceExpression(fullTarget, "autoFlag"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.CastExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.IsEqualsBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.ValueReferenceExpression(fullTarget.toCurrentIteration(), "value"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.ValueReferenceExpression(fullTarget.toCurrentIteration(), "autoValue")), _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.BuildInTypeExpression.string)));
68102
+ result.push(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.ValueReferenceExpression(fullTarget, "autoValue"), getFormulaExpression("autoValue")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.ValueReferenceExpression(fullTarget, "value"), getFormulaExpression("value")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.ValueReferenceExpression(fullTarget, "autoFlag"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.CastExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.IsEqualsBinaryExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_5__.makeStringValueReference)(fullTarget.toCurrentIteration(), "value"), (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_5__.makeStringValueReference)(fullTarget.toCurrentIteration(), "autoValue")), _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.BuildInTypeExpression.string)));
67985
68103
  } else {
67986
68104
  result.push(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.ValueReferenceExpression(fullTarget, "value"), getFormulaExpression("value")));
67987
68105
  }
@@ -68071,8 +68189,8 @@ class FLangValidationBuildContext {
68071
68189
  buildBasicValidations(targetPath, typeNode, schemaTypeNode, optional, highOrderDescription, nodeGId) {
68072
68190
  var _typeNode$base, _typeNode$description;
68073
68191
  const validations = [];
68074
- const valueReference = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_14__.ValueReferenceExpression(targetPath.toCurrentIteration(), "value");
68075
- const autoValueReference = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_14__.ValueReferenceExpression(targetPath.toCurrentIteration(), "autoValue");
68192
+ const valueReference = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_13__.makeStringValueReference)(targetPath.toCurrentIteration(), "value");
68193
+ const autoValueReference = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_13__.makeStringValueReference)(targetPath.toCurrentIteration(), "autoValue");
68076
68194
  const baseName = (_typeNode$base = typeNode === null || typeNode === void 0 ? void 0 : typeNode.base) !== null && _typeNode$base !== void 0 ? _typeNode$base : schemaTypeNode === null || schemaTypeNode === void 0 ? void 0 : schemaTypeNode.baseType;
68077
68195
  const baseDescription = (_typeNode$description = typeNode === null || typeNode === void 0 ? void 0 : typeNode.description) !== null && _typeNode$description !== void 0 ? _typeNode$description : schemaTypeNode === null || schemaTypeNode === void 0 ? void 0 : schemaTypeNode.description;
68078
68196
  if (baseName != undefined) {
@@ -68095,7 +68213,7 @@ class FLangValidationBuildContext {
68095
68213
  const schemaNode = this.schemaRng.getElementByPath(targetPath);
68096
68214
  const parentNode = schemaNode != undefined ? this.getFirstAcceptedParent(schemaNode) : undefined;
68097
68215
  const allChildrenPaths = parentNode instanceof _common_SchemaRng_FormSchemaRng__WEBPACK_IMPORTED_MODULE_2__.FormSchemaRngElement ? this.schemaRng.getAllChildValueNodes(parentNode).map(x => this.schemaRng.getPath(x, _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.each)).filter(x => !(0,_Common_ModelPath_PathSplitHelper__WEBPACK_IMPORTED_MODULE_4__.getMatchedAndDifferentModelPaths)(targetPath, x).differentPath.isContainIteration()) : undefined;
68098
- const restChecks = allChildrenPaths === null || allChildrenPaths === void 0 ? void 0 : allChildrenPaths.map(childPath => new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_14__.EqExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_14__.ValueReferenceExpression(childPath.toCurrentIteration(), "value"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_14__.StringLiteralExpression(""))).reduce(_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_13__.combineByAndFlangExpr, undefined);
68216
+ const restChecks = allChildrenPaths === null || allChildrenPaths === void 0 ? void 0 : allChildrenPaths.map(childPath => new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_14__.EqExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_13__.makeStringValueReference)(childPath.toCurrentIteration(), "value"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_14__.StringLiteralExpression(""))).reduce(_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_13__.combineByAndFlangExpr, undefined);
68099
68217
  const errorValidations = validations.filter(x => !x.checkType || x.checkType === "error");
68100
68218
  const errorExpression = this.createFlangExpression((0,_Common_IterableUtils__WEBPACK_IMPORTED_MODULE_5__.reverseArray)(errorValidations), targetPath, valueReference, "error", highOrderDescription !== null && highOrderDescription !== void 0 ? highOrderDescription : typeNode === null || typeNode === void 0 ? void 0 : typeNode.requiredDescription, optional, parentNode, restChecks);
68101
68219
  const result = [];
@@ -68190,7 +68308,7 @@ class FLangValidationBuildContext {
68190
68308
  const value = match === null || match === void 0 || (_match$3 = match[0]) === null || _match$3 === void 0 ? void 0 : _match$3[3];
68191
68309
  if (path != undefined && sign != undefined && value != undefined) {
68192
68310
  const fullPath = this.schemaRng.adjustPathMultiplicity(prefix.joinWith((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createModelPath)(path, false)).normalize()).trimLastStarIfLastToken().toCurrentIteration();
68193
- const valueRef = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_14__.ValueReferenceExpression(fullPath, "children");
68311
+ const valueRef = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_13__.makeStringValueReference)(fullPath, "children");
68194
68312
  const len = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_14__.LenExpression(valueRef);
68195
68313
  const argument = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_14__.DecimalLiteralExpression(value);
68196
68314
  const getOperation = () => {
@@ -68644,7 +68762,7 @@ class ValueReferenceExpression extends FLangExpression {
68644
68762
  return [];
68645
68763
  }
68646
68764
  getType() {
68647
- return BuildInTypeExpression.string;
68765
+ return BuildInTypeExpression.object;
68648
68766
  }
68649
68767
  convertToString() {
68650
68768
  return `${toFLangString(this.modePath)}.${this.valueName}`;
@@ -68842,6 +68960,7 @@ class BuildInTypeExpression extends TypeReferenceExpression {
68842
68960
  }
68843
68961
  }
68844
68962
  _BuildInTypeExpression = BuildInTypeExpression;
68963
+ BuildInTypeExpression.object = new _BuildInTypeExpression("object");
68845
68964
  BuildInTypeExpression.decimal = new _BuildInTypeExpression("decimal");
68846
68965
  BuildInTypeExpression.string = new _BuildInTypeExpression("string");
68847
68966
  BuildInTypeExpression.dict = new _BuildInTypeExpression("dict");
@@ -69098,7 +69217,7 @@ class StringLiteralExpression extends ConstExpression {
69098
69217
  return JSON.stringify(this.stringValue);
69099
69218
  }
69100
69219
  }
69101
- class DecimalLiteralExpression extends FLangDecimalExpression {
69220
+ class DecimalLiteralExpression extends ConstExpression {
69102
69221
  constructor(value) {
69103
69222
  super();
69104
69223
  this.value = void 0;
@@ -69115,6 +69234,11 @@ class DecimalLiteralExpression extends FLangDecimalExpression {
69115
69234
  }
69116
69235
  }
69117
69236
  class DictLiteralExpression extends FLangExpression {
69237
+ constructor(value) {
69238
+ super();
69239
+ this.value = void 0;
69240
+ this.value = value;
69241
+ }
69118
69242
  getChildNodes() {
69119
69243
  return [];
69120
69244
  }
@@ -69122,7 +69246,9 @@ class DictLiteralExpression extends FLangExpression {
69122
69246
  return BuildInTypeExpression.dict;
69123
69247
  }
69124
69248
  convertToString() {
69125
- return `dict()`;
69249
+ var _this$value;
69250
+ const argument = this.value != undefined ? (_this$value = this.value) === null || _this$value === void 0 ? void 0 : _this$value.convertToString() : "";
69251
+ return `dict(${argument})`;
69126
69252
  }
69127
69253
  }
69128
69254
  class BoolLiteralExpression extends ConstExpression {
@@ -69804,7 +69930,7 @@ class GetOldExpression extends FLangExpression {
69804
69930
  return [];
69805
69931
  }
69806
69932
  getType() {
69807
- return BuildInTypeExpression.bool;
69933
+ return this.expression.getType();
69808
69934
  }
69809
69935
  convertToString() {
69810
69936
  return `old(${this.expression.convertToString()})`;
@@ -69839,6 +69965,7 @@ class SetStatement extends FLangStatement {
69839
69965
  "use strict";
69840
69966
  __webpack_require__.r(__webpack_exports__);
69841
69967
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
69968
+ /* harmony export */ castOperandIfNeed: () => (/* binding */ castOperandIfNeed),
69842
69969
  /* harmony export */ castOperandToBoolIfNeed: () => (/* binding */ castOperandToBoolIfNeed),
69843
69970
  /* harmony export */ castOperandToDateTimeIfNeed: () => (/* binding */ castOperandToDateTimeIfNeed),
69844
69971
  /* harmony export */ castOperandToDecimalIfNeed: () => (/* binding */ castOperandToDecimalIfNeed),
@@ -69848,7 +69975,11 @@ __webpack_require__.r(__webpack_exports__);
69848
69975
  /* harmony export */ combineRulesWithOptionalSectionChecking: () => (/* binding */ combineRulesWithOptionalSectionChecking),
69849
69976
  /* harmony export */ decimalWrapper: () => (/* binding */ decimalWrapper),
69850
69977
  /* harmony export */ ensureOperandsOfTypeOrNull: () => (/* binding */ ensureOperandsOfTypeOrNull),
69978
+ /* harmony export */ extractValueReferenceFromCast: () => (/* binding */ extractValueReferenceFromCast),
69851
69979
  /* harmony export */ getAllExpressionChildren: () => (/* binding */ getAllExpressionChildren),
69980
+ /* harmony export */ makeGetOld: () => (/* binding */ makeGetOld),
69981
+ /* harmony export */ makeNoDeps: () => (/* binding */ makeNoDeps),
69982
+ /* harmony export */ makeStringValueReference: () => (/* binding */ makeStringValueReference),
69852
69983
  /* harmony export */ nullCoalesceWithTypeCheck: () => (/* binding */ nullCoalesceWithTypeCheck),
69853
69984
  /* harmony export */ tryExtractValueReferenceAsStringFromDecimal: () => (/* binding */ tryExtractValueReferenceAsStringFromDecimal),
69854
69985
  /* harmony export */ wrapWithArgumentsCondition: () => (/* binding */ wrapWithArgumentsCondition),
@@ -69870,7 +70001,7 @@ function* getAllExpressionChildren(node, descendantsFilter) {
69870
70001
  }
69871
70002
  }
69872
70003
  function createValueRuleWithDisableValueAutoInitCheck(path, originalExpression) {
69873
- return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.SetStatement(new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.ValueReferenceExpression(path, "value"), new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.ConditionalExpression(new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.EqExpression(new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.ValueReferenceExpression(path.toCurrentIteration(), "disableValueAutoInit"), new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.StringLiteralExpression("true")), new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.NoDepsExpression(new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.ValueReferenceExpression(path.toCurrentIteration(), "value")), originalExpression));
70004
+ return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.SetStatement(new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.ValueReferenceExpression(path, "value"), new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.ConditionalExpression(new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.EqExpression(makeStringValueReference(path.toCurrentIteration(), "disableValueAutoInit"), new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.StringLiteralExpression("true")), new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.NoDepsExpression(castOperandIfNeed(new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.ValueReferenceExpression(path.toCurrentIteration(), "value"), originalExpression.getType())), originalExpression));
69874
70005
  }
69875
70006
  function wrapWithDisableValueAutoInitFlagCheckIfRequired(formSchemaRng, x) {
69876
70007
  var _formSchemaRng$getEle;
@@ -69904,18 +70035,24 @@ function castOperandToStringIfNeed(operandExpression, decimalFormat = "G29") {
69904
70035
  if (operandExpression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.DateTimeExpression || operandExpression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.DateNowExpression) {
69905
70036
  return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.DateToStringExpression(operandExpression, new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.StringLiteralExpression("dd.MM.yyyy"));
69906
70037
  }
69907
- if (operandExpression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.HashSetExpression) {
69908
- return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.SerializeEnumerationExpression(operandExpression);
70038
+ if (operandExpression.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.BuildInTypeExpression.dict || operandExpression.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.BuildInTypeExpression.array) {
70039
+ return operandExpression;
69909
70040
  }
69910
70041
  return operandExpression.getType() != _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.BuildInTypeExpression.string ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.CastExpression(operandExpression, _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.BuildInTypeExpression.string, decimalFormat != undefined && operandExpression.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.BuildInTypeExpression.decimal ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.StringLiteralExpression(decimalFormat) : undefined) : operandExpression;
69911
70042
  }
70043
+ function castOperandIfNeed(operandExpression, type) {
70044
+ if (type instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.BuildInTypeExpression) {
70045
+ return operandExpression.getType() != type ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.CastExpression(operandExpression, type) : operandExpression;
70046
+ }
70047
+ return (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_1__.reject)(`Invalid type for cast: ${type}`);
70048
+ }
69912
70049
  function castOperandToBoolIfNeed(operandExpression) {
69913
70050
  return operandExpression.getType() != _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.BuildInTypeExpression.bool ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.CastExpression(operandExpression, _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.BuildInTypeExpression.bool) : operandExpression;
69914
70051
  }
69915
70052
  function castOperandToDecimalIfNeed(operandExpression, defaultValue) {
69916
70053
  return operandExpression.getType() !== _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.BuildInTypeExpression.decimal ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.CastExpression(operandExpression, _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.BuildInTypeExpression.decimal, defaultValue != undefined ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.DecimalLiteralExpression(defaultValue) : undefined) : operandExpression;
69917
70054
  }
69918
- const decimalWrapper = (ex, needWrapped) => needWrapped ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.CastExpression(ex, _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.BuildInTypeExpression.decimal) : ex;
70055
+ const decimalWrapper = (ex, needWrapped) => needWrapped ? castOperandToDecimalIfNeed(ex) : ex;
69919
70056
  function castOperandToDateTimeIfNeed(operandExpression) {
69920
70057
  return operandExpression.getType() != _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.BuildInTypeExpression.dateTime ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.CastExpression(operandExpression, _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.BuildInTypeExpression.dateTime) : operandExpression;
69921
70058
  }
@@ -69940,6 +70077,36 @@ function combineByOrFlangExpr(acc, current) {
69940
70077
  function combineByAndFlangExpr(acc, current) {
69941
70078
  return acc != undefined ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.AndBinaryExpression(acc, current) : current;
69942
70079
  }
70080
+ function makeNoDeps(expression) {
70081
+ if (expression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.ValueReferenceExpression) {
70082
+ return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.NoDepsExpression(expression);
70083
+ }
70084
+ if (expression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.CastExpression && expression.targetExpression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.ValueReferenceExpression) {
70085
+ return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.CastExpression(new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.NoDepsExpression(expression.targetExpression), expression.targetType, expression.defaultValue);
70086
+ }
70087
+ return (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_1__.reject)(`Invalid NoDeps usage: argument must be native ValueReferenceExpression or wrapped to CastExpression!`);
70088
+ }
70089
+ function makeGetOld(expression) {
70090
+ if (expression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.ValueReferenceExpression) {
70091
+ return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.GetOldExpression(expression);
70092
+ }
70093
+ if (expression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.CastExpression && expression.targetExpression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.ValueReferenceExpression) {
70094
+ return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.CastExpression(new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.GetOldExpression(expression.targetExpression), expression.targetType, expression.defaultValue);
70095
+ }
70096
+ return (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_1__.reject)(`Invalid GetOld usage: argument must be native ValueReferenceExpression or wrapped to CastExpression!`);
70097
+ }
70098
+ function makeStringValueReference(modePath, valueName) {
70099
+ return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.CastExpression(new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.ValueReferenceExpression(modePath, valueName), _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.BuildInTypeExpression.string);
70100
+ }
70101
+ function extractValueReferenceFromCast(expression) {
70102
+ if (expression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.ValueReferenceExpression) {
70103
+ return expression;
70104
+ }
70105
+ if (expression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.CastExpression && expression.targetExpression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.ValueReferenceExpression) {
70106
+ return expression.targetExpression;
70107
+ }
70108
+ return (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_1__.reject)(`Cannot extract ValueReferenceExpression!`);
70109
+ }
69943
70110
 
69944
70111
  /***/ }),
69945
70112
 
@@ -70107,15 +70274,20 @@ __webpack_require__.r(__webpack_exports__);
70107
70274
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
70108
70275
  /* harmony export */ FormulaExpressionToFlangExpressionConverter: () => (/* binding */ FormulaExpressionToFlangExpressionConverter)
70109
70276
  /* harmony export */ });
70110
- /* harmony import */ var _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../AutoCalculationsGenerator/AutoCalculationsFromFormulas/KCXmlContract/Formula */ "./Generator/src/generators/AutoCalculationsGenerator/AutoCalculationsFromFormulas/KCXmlContract/Formula.ts");
70111
- /* harmony import */ var _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../Common/ModelPath/ModelPath */ "./Common/ModelPath/ModelPath.ts");
70112
- /* harmony import */ var _Common_Errors__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../Common/Errors */ "./Common/Errors.ts");
70113
- /* harmony import */ var _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../Common/IterableUtils */ "./Common/IterableUtils.ts");
70114
- /* harmony import */ var _Common_ModelPath_BuildIterationSequence__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../Common/ModelPath/BuildIterationSequence */ "./Common/ModelPath/BuildIterationSequence.ts");
70115
- /* harmony import */ var _Common_ModelPath_PathSplitHelper__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../Common/ModelPath/PathSplitHelper */ "./Common/ModelPath/PathSplitHelper.ts");
70116
- /* harmony import */ var _Common_TypingUtils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../Common/TypingUtils */ "./Common/TypingUtils.ts");
70117
- /* harmony import */ var _FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./FLang/FlangUtils */ "./Generator/src/generators/ServerSideFLangNormalization/FLang/FlangUtils.ts");
70118
- /* harmony import */ var _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./FLang/FLangCodeDom */ "./Generator/src/generators/ServerSideFLangNormalization/FLang/FLangCodeDom.ts");
70277
+ /* harmony import */ var util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! util */ "util");
70278
+ /* harmony import */ var util__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(util__WEBPACK_IMPORTED_MODULE_0__);
70279
+ /* harmony import */ var _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../AutoCalculationsGenerator/AutoCalculationsFromFormulas/KCXmlContract/Formula */ "./Generator/src/generators/AutoCalculationsGenerator/AutoCalculationsFromFormulas/KCXmlContract/Formula.ts");
70280
+ /* harmony import */ var _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../Common/ModelPath/ModelPath */ "./Common/ModelPath/ModelPath.ts");
70281
+ /* harmony import */ var _Common_Errors__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../Common/Errors */ "./Common/Errors.ts");
70282
+ /* harmony import */ var _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../Common/IterableUtils */ "./Common/IterableUtils.ts");
70283
+ /* harmony import */ var _Common_ModelPath_BuildIterationSequence__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../Common/ModelPath/BuildIterationSequence */ "./Common/ModelPath/BuildIterationSequence.ts");
70284
+ /* harmony import */ var _Common_ModelPath_PathSplitHelper__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../Common/ModelPath/PathSplitHelper */ "./Common/ModelPath/PathSplitHelper.ts");
70285
+ /* harmony import */ var _Common_TypingUtils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../Common/TypingUtils */ "./Common/TypingUtils.ts");
70286
+ /* harmony import */ var _Common_ModelPath_AbsoluteModelFieldPath__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../../Common/ModelPath/AbsoluteModelFieldPath */ "./Common/ModelPath/AbsoluteModelFieldPath.ts");
70287
+ /* harmony import */ var _FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./FLang/FlangUtils */ "./Generator/src/generators/ServerSideFLangNormalization/FLang/FlangUtils.ts");
70288
+ /* harmony import */ var _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./FLang/FLangCodeDom */ "./Generator/src/generators/ServerSideFLangNormalization/FLang/FLangCodeDom.ts");
70289
+
70290
+
70119
70291
 
70120
70292
 
70121
70293
 
@@ -70133,263 +70305,275 @@ class FormulaExpressionToFlangExpressionConverter {
70133
70305
  compileExpressionToFlangExpression(expression, prefix, target, addPrecalculationRule) {
70134
70306
  const resultExpr = this.compileExpressionToFlangExpressionInternal(expression, prefix, target, addPrecalculationRule);
70135
70307
  // Если формула это только прямое обращение к значене, то трактовать его как строку
70136
- if (resultExpr instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.CastExpression && resultExpr.targetType === _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.BuildInTypeExpression.decimal && resultExpr.targetExpression instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ValueReferenceExpression) {
70308
+ if (resultExpr instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.CastExpression && resultExpr.targetType === _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BuildInTypeExpression.decimal && resultExpr.targetExpression instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ValueReferenceExpression) {
70137
70309
  return resultExpr.targetExpression;
70138
70310
  }
70139
70311
  return resultExpr;
70140
70312
  }
70141
70313
  compileExpressionToFlangExpressionInternal(expression, prefix, target, addPrecalculationRule) {
70142
- if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaSumExpression) {
70314
+ if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaSumExpression) {
70143
70315
  return this.compileSumExpression(expression, prefix, target, addPrecalculationRule);
70144
70316
  }
70145
- if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaArgumentExpression) {
70317
+ if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaArgumentExpression) {
70146
70318
  var _expression$type;
70147
70319
  return this.compiledArgumentExpression(prefix, target, expression.select, (_expression$type = expression.type) !== null && _expression$type !== void 0 ? _expression$type : "decimal", addPrecalculationRule);
70148
70320
  }
70149
- if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaMultySumExpression) {
70321
+ if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaMultySumExpression) {
70150
70322
  return this.compiledArgumentExpression(prefix, target, expression.select, "decimal", addPrecalculationRule);
70151
70323
  }
70152
- if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaAbsExpression) {
70153
- return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.AbsExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToDecimalIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule)));
70324
+ if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaAbsExpression) {
70325
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.AbsExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.castOperandToDecimalIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule)));
70154
70326
  }
70155
- if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaXAbsExpression) {
70156
- const expr = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToDecimalIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule));
70157
- return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.LtExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToDecimalIfNeed)(expr), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.DecimalLiteralExpression(0)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.DecimalLiteralExpression(0), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.AbsExpression(expr));
70327
+ if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaXAbsExpression) {
70328
+ const expr = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.castOperandToDecimalIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule));
70329
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.LtExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.castOperandToDecimalIfNeed)(expr), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DecimalLiteralExpression(0)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DecimalLiteralExpression(0), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.AbsExpression(expr));
70158
70330
  }
70159
- if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaRoundExpression) {
70160
- return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.RoundExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToDecimalIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.IntegerLiteralExpression(expression.fractionalDigits));
70331
+ if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaRoundExpression) {
70332
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.RoundExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.castOperandToDecimalIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.IntegerLiteralExpression(expression.fractionalDigits));
70161
70333
  }
70162
- if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaFloorExpression) {
70163
- return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.FloorExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToDecimalIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule)));
70334
+ if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaFloorExpression) {
70335
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.FloorExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.castOperandToDecimalIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule)));
70164
70336
  }
70165
- if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaChooseExpression) {
70337
+ if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaChooseExpression) {
70166
70338
  const condExpr = this.compileExpressionToFlangExpressionInternal(expression.ifNode.condition, prefix, target, addPrecalculationRule);
70167
70339
  const thenExpr = this.compileExpressionToFlangExpressionInternal(expression.thenNode.expression, prefix, target, addPrecalculationRule);
70168
70340
  const elseExpr = this.compileExpressionToFlangExpressionInternal(expression.elseNode.expression, prefix, target, addPrecalculationRule);
70169
- const castToStringRequired = thenExpr.getType() === _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.BuildInTypeExpression.string || elseExpr.getType() === _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.BuildInTypeExpression.string;
70170
- return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ConditionalExpression(condExpr, castToStringRequired ? (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToStringIfNeed)(thenExpr) : thenExpr, castToStringRequired ? (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToStringIfNeed)(elseExpr) : elseExpr);
70341
+ const castToStringRequired = thenExpr.getType() === _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BuildInTypeExpression.string || elseExpr.getType() === _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BuildInTypeExpression.string;
70342
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ConditionalExpression(condExpr, castToStringRequired ? (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.castOperandToStringIfNeed)(thenExpr) : thenExpr, castToStringRequired ? (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.castOperandToStringIfNeed)(elseExpr) : elseExpr);
70171
70343
  }
70172
- if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaMultiplyExpression) {
70344
+ if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaMultiplyExpression) {
70173
70345
  return this.compileMultiplyExpression(expression, prefix, target, addPrecalculationRule);
70174
70346
  }
70175
- if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaOrExpression) {
70347
+ if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaOrExpression) {
70176
70348
  return this.compileOrExpression(expression, prefix, target, addPrecalculationRule);
70177
70349
  }
70178
- if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaAndExpression) {
70350
+ if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaAndExpression) {
70179
70351
  return this.compileAndExpression(expression, prefix, target, addPrecalculationRule);
70180
70352
  }
70181
- if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaNotExpression) {
70182
- return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.NegateUnaryExpression(this.compileExpressionToFlangExpressionInternal(expression.argument, prefix, target, addPrecalculationRule));
70353
+ if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaNotExpression) {
70354
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.NegateUnaryExpression(this.compileExpressionToFlangExpressionInternal(expression.argument, prefix, target, addPrecalculationRule));
70183
70355
  }
70184
- if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaConstExpression) {
70356
+ if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaConstExpression) {
70185
70357
  switch (expression.type) {
70186
70358
  case "string":
70187
- return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.StringLiteralExpression(expression.value);
70359
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.StringLiteralExpression(expression.value);
70188
70360
  case "decimal":
70189
- return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.DecimalLiteralExpression(expression.value);
70361
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DecimalLiteralExpression(expression.value);
70190
70362
  default:
70191
- throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_2__.NotSupportedError("Unknown constant type!");
70363
+ throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_3__.NotSupportedError("Unknown constant type!");
70192
70364
  }
70193
70365
  }
70194
- if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaDivisionExpression) {
70366
+ if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaDivisionExpression) {
70195
70367
  return this.compileDivisionExpression(expression, prefix, target, addPrecalculationRule);
70196
70368
  }
70197
- if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaMinusExpression) {
70198
- return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.MinusUnaryExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToDecimalIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule)));
70369
+ if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaMinusExpression) {
70370
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.MinusUnaryExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.castOperandToDecimalIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule)));
70199
70371
  }
70200
- if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaGtExpression) {
70372
+ if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaGtExpression) {
70201
70373
  const leftOperandExpression = this.compileExpressionToFlangExpressionInternal(expression.arguments[0], prefix, target, addPrecalculationRule);
70202
70374
  const left = this.castOperandForComparisonExpression(expression.arguments[0], leftOperandExpression);
70203
70375
  const rightOperandExpression = this.compileExpressionToFlangExpressionInternal(expression.arguments[1], prefix, target, addPrecalculationRule);
70204
70376
  const right = this.castOperandForComparisonExpression(expression.arguments[1], rightOperandExpression);
70205
- return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.GtExpression(left, right);
70377
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.GtExpression(left, right);
70206
70378
  }
70207
- if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaLtExpression) {
70379
+ if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaLtExpression) {
70208
70380
  const leftOperandExpression = this.compileExpressionToFlangExpressionInternal(expression.arguments[0], prefix, target, addPrecalculationRule);
70209
70381
  const left = this.castOperandForComparisonExpression(expression.arguments[0], leftOperandExpression);
70210
70382
  const rightOperandExpression = this.compileExpressionToFlangExpressionInternal(expression.arguments[1], prefix, target, addPrecalculationRule);
70211
70383
  const right = this.castOperandForComparisonExpression(expression.arguments[1], rightOperandExpression);
70212
- return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.LtExpression(left, right);
70384
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.LtExpression(left, right);
70213
70385
  }
70214
- if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaGeExpression) {
70386
+ if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaGeExpression) {
70215
70387
  const leftOperandExpression = this.compileExpressionToFlangExpressionInternal(expression.arguments[0], prefix, target, addPrecalculationRule);
70216
70388
  const left = this.castOperandForComparisonExpression(expression.arguments[0], leftOperandExpression);
70217
70389
  const rightOperandExpression = this.compileExpressionToFlangExpressionInternal(expression.arguments[1], prefix, target, addPrecalculationRule);
70218
70390
  const right = this.castOperandForComparisonExpression(expression.arguments[1], rightOperandExpression);
70219
- return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.GeExpression(left, right);
70391
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.GeExpression(left, right);
70220
70392
  }
70221
- if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaLeExpression) {
70393
+ if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaLeExpression) {
70222
70394
  const leftOperandExpression = this.compileExpressionToFlangExpressionInternal(expression.arguments[0], prefix, target, addPrecalculationRule);
70223
70395
  const left = this.castOperandForComparisonExpression(expression.arguments[0], leftOperandExpression);
70224
70396
  const rightOperandExpression = this.compileExpressionToFlangExpressionInternal(expression.arguments[1], prefix, target, addPrecalculationRule);
70225
70397
  const right = this.castOperandForComparisonExpression(expression.arguments[1], rightOperandExpression);
70226
- return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.LeExpression(left, right);
70398
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.LeExpression(left, right);
70227
70399
  }
70228
- if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaEqExpression) {
70400
+ if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaEqExpression) {
70229
70401
  return this.compileEqExpression(prefix, target, expression, addPrecalculationRule);
70230
70402
  }
70231
- if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaExistsExpression) {
70403
+ if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaExistsExpression) {
70232
70404
  /* eslint-disable no-warning-comments */
70233
70405
  // TODO: тут необходимо учесть, что exists может смотреть на множественность
70234
70406
  // TODO: реализовать в рамках задачи https://yt.skbkontur.ru/issue/FS-7385
70235
70407
  /* eslint-enable no-warning-comments */
70236
70408
  const arg = this.compiledArgumentExpression(prefix, target, expression.select, "string", addPrecalculationRule);
70237
- return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.NegateUnaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.OrBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.EqExpression(arg, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.StringLiteralExpression("")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.EqExpression(arg, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.NullLiteralExpression())));
70409
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.NegateUnaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.OrBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.EqExpression(arg, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.StringLiteralExpression("")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.EqExpression(arg, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.NullLiteralExpression())));
70238
70410
  }
70239
- if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaWhenExpression) {
70411
+ if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaWhenExpression) {
70240
70412
  const condition = this.compileExpressionToFlangExpressionInternal(expression.expressions[0], prefix, target, addPrecalculationRule);
70241
70413
  const thenExpression = this.compileExpressionToFlangExpressionInternal(expression.expressions[1], prefix, target, addPrecalculationRule);
70242
- return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ConditionalExpression(condition, thenExpression, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.EqExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.IntegerLiteralExpression(1), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.IntegerLiteralExpression(1)));
70414
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ConditionalExpression(condition, thenExpression, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.EqExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.IntegerLiteralExpression(1), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.IntegerLiteralExpression(1)));
70243
70415
  }
70244
- if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaRegexMatchExpression) {
70416
+ if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaRegexMatchExpression) {
70245
70417
  const arg = this.compileExpressionToFlangExpressionInternal(expression.argument, prefix, target, addPrecalculationRule);
70246
- const correctedArg = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.tryExtractValueReferenceAsStringFromDecimal)(arg);
70247
- return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.RegexMatchExpression(correctedArg, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.StringLiteralExpression(expression.pattern));
70418
+ const correctedArg = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.tryExtractValueReferenceAsStringFromDecimal)(arg);
70419
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.RegexMatchExpression(correctedArg, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.StringLiteralExpression(expression.pattern));
70248
70420
  }
70249
- if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaCountExpression) {
70250
- return (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToDecimalIfNeed)(this.compiledArgumentExpression(prefix, target, expression.select, "string", addPrecalculationRule, "Count"), 0);
70421
+ if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaCountExpression) {
70422
+ return (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.castOperandToDecimalIfNeed)(this.compiledArgumentExpression(prefix, target, expression.select, "string", addPrecalculationRule, "Count"), 0);
70251
70423
  }
70252
- if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaLengthExpression) {
70253
- return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.LenExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToStringIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.argument, prefix, target, addPrecalculationRule)));
70424
+ if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaLengthExpression) {
70425
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.LenExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.castOperandToStringIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.argument, prefix, target, addPrecalculationRule)));
70254
70426
  }
70255
- if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaConcatExpression) {
70427
+ if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaConcatExpression) {
70256
70428
  return this.compileConcatExpression(expression, prefix, target, addPrecalculationRule);
70257
70429
  }
70258
- if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaSubstringExpression) {
70430
+ if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaSubstringExpression) {
70259
70431
  const arg = this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule);
70260
- const argAsString = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToStringIfNeed)(arg, arg.getType() === _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.BuildInTypeExpression.decimal ? "G29" : undefined);
70261
- return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.SubstringExpression(argAsString, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.DecimalLiteralExpression(expression.start), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.DecimalLiteralExpression(expression.length));
70432
+ const argAsString = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.castOperandToStringIfNeed)(arg, arg.getType() === _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BuildInTypeExpression.decimal ? "G29" : undefined);
70433
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.SubstringExpression(argAsString, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DecimalLiteralExpression(expression.start), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DecimalLiteralExpression(expression.length));
70262
70434
  }
70263
- if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaNewLineExpression) {
70264
- return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.StringLiteralExpression("\r\n");
70435
+ if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaNewLineExpression) {
70436
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.StringLiteralExpression("\r\n");
70265
70437
  }
70266
- if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaNoDepsNode) {
70438
+ if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaNoDepsNode) {
70267
70439
  const noDepsExpression = this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule);
70268
- return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.NoDepsExpression(noDepsExpression);
70440
+ return (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.makeNoDeps)(noDepsExpression);
70269
70441
  }
70270
- if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaDateNowExpression) {
70271
- return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.DateNowExpression();
70442
+ if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaDateNowExpression) {
70443
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DateNowExpression();
70272
70444
  }
70273
- if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaGetDaysInMonthExpression) {
70274
- return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.GetDaysInMonthExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToDateTimeIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule)));
70445
+ if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaGetDaysInMonthExpression) {
70446
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.GetDaysInMonthExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.castOperandToDateTimeIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule)));
70275
70447
  }
70276
- if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaGetDayExpression) {
70277
- return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.GetDayExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToDateTimeIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule)));
70448
+ if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaGetDayExpression) {
70449
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.GetDayExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.castOperandToDateTimeIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule)));
70278
70450
  }
70279
- if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaGetMonthExpression) {
70280
- return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.GetMonthExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToDateTimeIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule)));
70451
+ if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaGetMonthExpression) {
70452
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.GetMonthExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.castOperandToDateTimeIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule)));
70281
70453
  }
70282
- if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaGetYearExpression) {
70283
- return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.GetYearExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToDateTimeIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule)));
70454
+ if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaGetYearExpression) {
70455
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.GetYearExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.castOperandToDateTimeIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule)));
70284
70456
  }
70285
- if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaIsDateExpression) {
70286
- return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.IsDateExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToStringIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule)));
70457
+ if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaIsDateExpression) {
70458
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.IsDateExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.castOperandToStringIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule)));
70287
70459
  }
70288
- if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaDifferenceInMonthsExpression) {
70289
- const expressions = expression.arguments.map(x => (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToDateTimeIfNeed)(this.compileExpressionToFlangExpressionInternal(x, prefix, target, addPrecalculationRule)));
70290
- return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.DifferenceInMonthsExpression(expressions);
70460
+ if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaDifferenceInMonthsExpression) {
70461
+ const expressions = expression.arguments.map(x => (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.castOperandToDateTimeIfNeed)(this.compileExpressionToFlangExpressionInternal(x, prefix, target, addPrecalculationRule)));
70462
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DifferenceInMonthsExpression(expressions);
70291
70463
  }
70292
- if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaDifferenceInDaysExpression) {
70293
- const expressions = expression.arguments.map(x => (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToDateTimeIfNeed)(this.compileExpressionToFlangExpressionInternal(x, prefix, target, addPrecalculationRule)));
70294
- return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.DifferenceInDaysExpression(expressions);
70464
+ if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaDifferenceInDaysExpression) {
70465
+ const expressions = expression.arguments.map(x => (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.castOperandToDateTimeIfNeed)(this.compileExpressionToFlangExpressionInternal(x, prefix, target, addPrecalculationRule)));
70466
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DifferenceInDaysExpression(expressions);
70295
70467
  }
70296
- if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaAddDaysExpression) {
70297
- return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.AddDaysExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToDateTimeIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.DecimalLiteralExpression(expression.amount));
70468
+ if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaAddDaysExpression) {
70469
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.AddDaysExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.castOperandToDateTimeIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DecimalLiteralExpression(expression.amount));
70298
70470
  }
70299
- if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaAddMonthsExpression) {
70300
- return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.AddMonthsExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToDateTimeIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.DecimalLiteralExpression(expression.amount));
70471
+ if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaAddMonthsExpression) {
70472
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.AddMonthsExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.castOperandToDateTimeIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DecimalLiteralExpression(expression.amount));
70301
70473
  }
70302
- if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaAddYearsExpression) {
70303
- return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.AddYearsExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToDateTimeIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.DecimalLiteralExpression(expression.amount));
70474
+ if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaAddYearsExpression) {
70475
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.AddYearsExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.castOperandToDateTimeIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DecimalLiteralExpression(expression.amount));
70304
70476
  }
70305
- if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaDateToStringExpression) {
70477
+ if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaDateToStringExpression) {
70306
70478
  var _expression$format;
70307
- return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.DateToStringExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToDateTimeIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.StringLiteralExpression((_expression$format = expression.format) !== null && _expression$format !== void 0 ? _expression$format : "dd.MM.yyyy"));
70479
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DateToStringExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.castOperandToDateTimeIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.StringLiteralExpression((_expression$format = expression.format) !== null && _expression$format !== void 0 ? _expression$format : "dd.MM.yyyy"));
70308
70480
  }
70309
- if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaDateTimeExpression) {
70310
- return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.CastExpression(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule), _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.BuildInTypeExpression.dateTime);
70481
+ if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaDateTimeExpression) {
70482
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.CastExpression(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule), _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BuildInTypeExpression.dateTime);
70311
70483
  }
70312
- if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaIsSnilsExpression) {
70484
+ if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaIsSnilsExpression) {
70313
70485
  const arg = this.compiledArgumentExpression(prefix, target, expression.select, "string", addPrecalculationRule);
70314
- return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.IsSnilsExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToStringIfNeed)(arg));
70486
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.IsSnilsExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.castOperandToStringIfNeed)(arg));
70315
70487
  }
70316
- if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaIsRegNumSfrExpression) {
70488
+ if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaIsRegNumSfrExpression) {
70317
70489
  const arg = this.compiledArgumentExpression(prefix, target, expression.select, "string", addPrecalculationRule);
70318
- return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.IsRegNumSfrExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToStringIfNeed)(arg));
70490
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.IsRegNumSfrExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.castOperandToStringIfNeed)(arg));
70319
70491
  }
70320
- if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaIsInnExpression) {
70492
+ if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaIsInnExpression) {
70321
70493
  const arg = this.compiledArgumentExpression(prefix, target, expression.select, "string", addPrecalculationRule);
70322
- return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.IsInnExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToStringIfNeed)(arg));
70494
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.IsInnExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.castOperandToStringIfNeed)(arg));
70323
70495
  }
70324
- if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaIsValidMirCardNumberExpression) {
70496
+ if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaIsValidMirCardNumberExpression) {
70325
70497
  const arg = this.compiledArgumentExpression(prefix, target, expression.select, "string", addPrecalculationRule);
70326
- return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.IsValidMirCardNumberExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToStringIfNeed)(arg));
70498
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.IsValidMirCardNumberExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.castOperandToStringIfNeed)(arg));
70327
70499
  }
70328
- if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaArrayExpression) {
70500
+ if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaArrayExpression) {
70329
70501
  const items = expression.items.map(arg => this.compileEnumerationItem(arg, prefix, target, addPrecalculationRule));
70330
- return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ArrayExpression(items);
70502
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ArrayExpression(items);
70331
70503
  }
70332
- if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaFirstOrDefaultExpression) {
70504
+ if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaFirstOrDefaultExpression) {
70333
70505
  const firstOrDefaultExpression = this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule);
70334
- return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.FirstOrDefaultExpression(firstOrDefaultExpression);
70506
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.FirstOrDefaultExpression(firstOrDefaultExpression);
70335
70507
  }
70336
- if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaHashSetExpression) {
70337
- if (expression.expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaArgumentExpression) {
70508
+ if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaHashSetExpression) {
70509
+ if (expression.expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaArgumentExpression) {
70338
70510
  const adjustedSelectPath = this.preparePathAndAdjustMultiplicity(prefix, expression.expression.select);
70339
- const splitInfo = (0,_Common_ModelPath_PathSplitHelper__WEBPACK_IMPORTED_MODULE_5__.getMatchedAndDifferentModelPaths)(target.path, adjustedSelectPath);
70511
+ const splitInfo = (0,_Common_ModelPath_PathSplitHelper__WEBPACK_IMPORTED_MODULE_6__.getMatchedAndDifferentModelPaths)(target.path, adjustedSelectPath);
70340
70512
  const diffSelectPath = splitInfo.differentPath;
70341
70513
  const hasMultiplicity = diffSelectPath.getIterationRank() > 0;
70342
70514
  if (hasMultiplicity) {
70343
70515
  const sourceKeyParts = adjustedSelectPath.getPathPartsAsArray();
70344
70516
  const firstPart = splitInfo.matchedPath.toCurrentIteration();
70345
- const firstPartLength = _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_3__.IterUtils.count(firstPart.getPathParts());
70346
- const secondPartParts = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createRelativeFromTokens)(sourceKeyParts.slice(firstPartLength)).getPathPartsAsArray();
70347
- const lastStarIndexSecondPart = secondPartParts.lastIndexOf(_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.each);
70517
+ const firstPartLength = _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_4__.IterUtils.count(firstPart.getPathParts());
70518
+ const secondPartParts = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_2__.createRelativeFromTokens)(sourceKeyParts.slice(firstPartLength)).getPathPartsAsArray();
70519
+ const lastStarIndexSecondPart = secondPartParts.lastIndexOf(_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_2__.PathTokens.each);
70348
70520
  const secondPartFinalParts = secondPartParts.slice(0, lastStarIndexSecondPart);
70349
- const finalIterPath = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createAbsoluteFromTokens)([...firstPart.getPathParts(), ...secondPartFinalParts]).trimLastStarIfLastToken();
70350
- return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ReduceCallExpression(finalIterPath, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.AnonymousFunctionDeclarationExpression(_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.BuildInTypeExpression.hashSet, [new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ArgumentDeclarationExpression("result", _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.BuildInTypeExpression.hashSet)], new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.AddArrayExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ArgumentReferenceExpression("result"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.HashSetExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ValueReferenceExpression(adjustedSelectPath.toCurrentIteration(), "value")))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.HashSetExpression());
70521
+ const finalIterPath = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_2__.createAbsoluteFromTokens)([...firstPart.getPathParts(), ...secondPartFinalParts]).trimLastStarIfLastToken();
70522
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ReduceCallExpression(finalIterPath, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.AnonymousFunctionDeclarationExpression(_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BuildInTypeExpression.hashSet, [new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ArgumentDeclarationExpression("result", _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BuildInTypeExpression.hashSet)], new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.AddArrayExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ArgumentReferenceExpression("result"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.HashSetExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ValueReferenceExpression(adjustedSelectPath.toCurrentIteration(), "value")))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.HashSetExpression());
70351
70523
  }
70352
70524
  }
70353
70525
  const hashSetExpression = this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule);
70354
- return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.HashSetExpression(hashSetExpression);
70526
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.HashSetExpression(hashSetExpression);
70355
70527
  }
70356
- if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaGetPicklistValuesExpression) {
70528
+ if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaGetPicklistValuesExpression) {
70357
70529
  const filterColumn = this.compileExpressionToFlangExpressionInternal(expression.filterColumn.filterColumn, prefix, target, addPrecalculationRule);
70358
70530
  const filterKey = this.compileExpressionToFlangExpressionInternal(expression.filterKey.filterKey, prefix, target, addPrecalculationRule);
70359
- return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.GetPicklistValuesExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.StringLiteralExpression(expression.gId), filterColumn, filterKey, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.StringLiteralExpression(expression.resultColumn));
70531
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.GetPicklistValuesExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.StringLiteralExpression(expression.gId), filterColumn, filterKey, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.StringLiteralExpression(expression.resultColumn));
70360
70532
  }
70361
- if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaIsValidAccountNumberExpression) {
70533
+ if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaIsValidAccountNumberExpression) {
70362
70534
  const bik = this.compiledArgumentExpression(prefix, target, expression.bik, "string", addPrecalculationRule);
70363
70535
  const account = this.compiledArgumentExpression(prefix, target, expression.account, "string", addPrecalculationRule);
70364
- return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.IsValidAccountNumberExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToStringIfNeed)(bik), (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToStringIfNeed)(account));
70536
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.IsValidAccountNumberExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.castOperandToStringIfNeed)(bik), (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.castOperandToStringIfNeed)(account));
70365
70537
  }
70366
- if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaGroupSumExpression) {
70538
+ if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaGroupSumExpression) {
70367
70539
  return this.compileGroupSumExpression(prefix, target, expression, addPrecalculationRule);
70368
70540
  }
70369
- if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaGroupCountExpression) {
70541
+ if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaGroupCountExpression) {
70370
70542
  return this.compileGroupCountExpression(prefix, target, expression, addPrecalculationRule);
70371
70543
  }
70372
- if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaOneOfExpression) {
70373
- const arg = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToStringIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.argument, prefix, target, addPrecalculationRule));
70374
- const items = expression.items.expressions.map(item => (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToStringIfNeed)(this.compileExpressionToFlangExpressionInternal(item, prefix, target, addPrecalculationRule)));
70375
- return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.OneOfExpression(arg, items);
70544
+ if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaMakeDictExpression) {
70545
+ return this.compileMakeDictExpression(prefix, target, expression, addPrecalculationRule);
70376
70546
  }
70377
- if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaHasAutoFlagExpression) {
70378
- const arg = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToStringIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule));
70379
- const valueRefExpression = arg instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ValueReferenceExpression ? arg : undefined;
70380
- if (valueRefExpression == undefined) {
70381
- throw new Error("hasAutoFlag supports only Argument expression (ValueReferenceExpression) as parameter.");
70382
- }
70383
- const expr = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.OrBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.EqExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.NoDepsExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ValueReferenceExpression(valueRefExpression.modePath, "value")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.NullLiteralExpression()), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.EqExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.NoDepsExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ValueReferenceExpression(valueRefExpression.modePath, "autoFlag")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.StringLiteralExpression("true")));
70547
+ if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaGetSumByKeysExpression) {
70548
+ return this.compileGetSumByKeysExpression(prefix, target, expression, addPrecalculationRule);
70549
+ }
70550
+ if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaOneOfExpression) {
70551
+ const arg = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.castOperandToStringIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.argument, prefix, target, addPrecalculationRule));
70552
+ const items = expression.items.expressions.map(item => (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.castOperandToStringIfNeed)(this.compileExpressionToFlangExpressionInternal(item, prefix, target, addPrecalculationRule)));
70553
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.OneOfExpression(arg, items);
70554
+ }
70555
+ if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaHasAutoFlagExpression) {
70556
+ const arg = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.castOperandToStringIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule));
70557
+ const getValueReferenceExpression = () => {
70558
+ if (arg instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ValueReferenceExpression) {
70559
+ return arg;
70560
+ }
70561
+ if (arg instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.CastExpression && arg.targetExpression instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ValueReferenceExpression) {
70562
+ return arg.targetExpression;
70563
+ }
70564
+ return (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_7__.reject)("hasAutoFlag supports only Argument expression (ValueReferenceExpression) as parameter.");
70565
+ };
70566
+ const valueRefExpression = getValueReferenceExpression();
70567
+ const expr = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.OrBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.EqExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.makeNoDeps)(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ValueReferenceExpression(valueRefExpression.modePath, "value")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.NullLiteralExpression()), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.EqExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.makeNoDeps)((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.makeStringValueReference)(valueRefExpression.modePath, "autoFlag")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.StringLiteralExpression("true")));
70384
70568
  return expr;
70385
70569
  }
70386
70570
  throw new Error(`Unsupported type of node: ${expression.constructor.name}, ${expression.sourceXmlNode.name}`);
70387
70571
  }
70388
70572
  castOperandForComparisonExpression(formulaExpression, flangExpression) {
70389
- if (formulaExpression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaDateTimeExpression || formulaExpression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaDateNowExpression) {
70573
+ if (formulaExpression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaDateTimeExpression || formulaExpression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaDateNowExpression) {
70390
70574
  return flangExpression;
70391
70575
  }
70392
- return (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToDecimalIfNeed)(flangExpression);
70576
+ return (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.castOperandToDecimalIfNeed)(flangExpression);
70393
70577
  }
70394
70578
  compileEqExpression(prefix, target, expression, addPrecalculationRule) {
70395
70579
  const left = this.compileExpressionToFlangExpressionInternal(expression.arguments[0], prefix, target, addPrecalculationRule);
@@ -70397,40 +70581,74 @@ class FormulaExpressionToFlangExpressionConverter {
70397
70581
 
70398
70582
  // Сейчас в АР иногда проверку на decimal значение делаем через [Значение != "Какая-то строка"]
70399
70583
  // Поэтому при такой проверке вычитываем поле "Значение" как строку
70400
- if (left.getType() === _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.BuildInTypeExpression.decimal && right.getType() === _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.BuildInTypeExpression.string && left instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.CastExpression && left.targetExpression instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ValueReferenceExpression) {
70401
- return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.EqExpression(left.targetExpression, right);
70584
+ if (left.getType() === _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BuildInTypeExpression.decimal && right.getType() === _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BuildInTypeExpression.string && left instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.CastExpression && left.targetExpression instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ValueReferenceExpression) {
70585
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.EqExpression(left.targetExpression, right);
70402
70586
  }
70403
- return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.EqExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToStringIfNeed)(left), (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToStringIfNeed)(right));
70587
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.EqExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.castOperandToStringIfNeed)(left), (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.castOperandToStringIfNeed)(right));
70588
+ }
70589
+ compileMakeDictExpression(prefix, target, expression, addPrecalculationRule) {
70590
+ const sourceKeyPath = this.preparePathAndAdjustMultiplicity(prefix, expression.sourceKeyPath);
70591
+ const sourceValueExpression = this.compileExpressionToFlangExpressionInternal(expression.sourceValueExpression, prefix, new _Common_ModelPath_AbsoluteModelFieldPath__WEBPACK_IMPORTED_MODULE_8__.AbsoluteModelFieldPath(sourceKeyPath, "value"), addPrecalculationRule);
70592
+ const getOldSourceValueExpression = () => {
70593
+ if (sourceValueExpression instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ValueReferenceExpression) {
70594
+ return (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.makeGetOld)(sourceValueExpression);
70595
+ }
70596
+ if (sourceValueExpression instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.CastExpression && sourceValueExpression.targetExpression instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ValueReferenceExpression) {
70597
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.CastExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.makeGetOld)(sourceValueExpression.targetExpression), sourceValueExpression.targetType, sourceValueExpression.defaultValue);
70598
+ }
70599
+ if (sourceValueExpression instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ConstExpression) {
70600
+ return sourceValueExpression;
70601
+ }
70602
+ return (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_7__.reject)(`SourceValueExpression for makeDict must be reference to value or constant.
70603
+ Converted Object: ${JSON.stringify(sourceValueExpression)}
70604
+ Source Object: ${(0,util__WEBPACK_IMPORTED_MODULE_0__.inspect)(expression.sourceValueExpression)}`);
70605
+ };
70606
+ const oldSourceValueExpression = getOldSourceValueExpression();
70607
+ const matchedPaths = (0,_Common_ModelPath_PathSplitHelper__WEBPACK_IMPORTED_MODULE_6__.getMatchedAndDifferentModelPaths)(target.path, sourceKeyPath);
70608
+ const firstPart = matchedPaths.matchedPath.toCurrentIteration();
70609
+ const secondPart = matchedPaths.differentPath;
70610
+ const finalIterPath = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_2__.createAbsoluteFromTokens)(firstPart.joinWith(secondPart).getLastListPath());
70611
+ const keys = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DeserializeEnumerationExpression([new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ValueReferenceExpression(sourceKeyPath.toCurrentIteration(), "value")], new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BoolLiteralExpression(true));
70612
+ const oldKeys = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DeserializeEnumerationExpression([(0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.makeGetOld)(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ValueReferenceExpression(sourceKeyPath.toCurrentIteration(), "value"))], new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BoolLiteralExpression(true));
70613
+ const reduceExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ReduceCallExpression(finalIterPath, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.AnonymousFunctionDeclarationExpression(_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BuildInTypeExpression.dict, [new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ArgumentDeclarationExpression("result", _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BuildInTypeExpression.dict)], new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.IncrementalFlagExpression(), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.AddSumByKeysExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.AddSumByKeysExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ArgumentReferenceExpression("result"), keys, (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.castOperandToDecimalIfNeed)(sourceValueExpression)), oldKeys, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.MinusUnaryExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.castOperandToDecimalIfNeed)(oldSourceValueExpression))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.AddSumByKeysExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ArgumentReferenceExpression("result"), keys, (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.castOperandToDecimalIfNeed)(sourceValueExpression)))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.IncrementalFlagExpression(), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DictLiteralExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.makeNoDeps)(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ValueReferenceExpression(target.path.toCurrentIteration(), "value"))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DictLiteralExpression()));
70614
+ return reduceExpression;
70615
+ }
70616
+ compileGetSumByKeysExpression(prefix, target, expression, addPrecalculationRule) {
70617
+ const dictPath = this.preparePathAndAdjustMultiplicity(prefix, expression.dictPath);
70618
+ const targetKeys = expression.targetKeys;
70619
+ const deserializedKeys = targetKeys.items[0] instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaGetPicklistValuesExpression ? this.compileExpressionToFlangExpressionInternal(targetKeys.items[0], prefix, target, addPrecalculationRule) : new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DeserializeEnumerationExpression(targetKeys.items.map(i => (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.extractValueReferenceFromCast)(this.compileEnumerationItem(i, prefix, target, addPrecalculationRule))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BoolLiteralExpression(true));
70620
+ const finalValueExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.GetSumByKeysExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DictLiteralExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ValueReferenceExpression(dictPath, "value")), deserializedKeys !== null && deserializedKeys !== void 0 ? deserializedKeys : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_7__.reject)());
70621
+ return finalValueExpression;
70404
70622
  }
70405
70623
  compileGroupSumExpressionWithCustomValueExpression(prefix, target, targetKeys, sourceKeyPath, sourceValueExpression, addPrecalculationRule) {
70406
- const matchPaths = (0,_Common_ModelPath_PathSplitHelper__WEBPACK_IMPORTED_MODULE_5__.getMatchedAndDifferentModelPaths)(target.path, sourceKeyPath);
70624
+ const matchPaths = (0,_Common_ModelPath_PathSplitHelper__WEBPACK_IMPORTED_MODULE_6__.getMatchedAndDifferentModelPaths)(target.path, sourceKeyPath);
70407
70625
  const sourceKeyParts = sourceKeyPath.getPathPartsAsArray();
70408
70626
  const firstPart = matchPaths.matchedPath.toCurrentIteration();
70409
- const firstPartLength = _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_3__.IterUtils.count(firstPart.getPathParts());
70410
- const secondParts = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createRelativeFromTokens)(sourceKeyParts.slice(firstPartLength));
70627
+ const firstPartLength = _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_4__.IterUtils.count(firstPart.getPathParts());
70628
+ const secondParts = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_2__.createRelativeFromTokens)(sourceKeyParts.slice(firstPartLength));
70411
70629
  const getIterationPathWithNestedMultiplicity = () => {
70412
- const secondPartParts = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createRelativeFromTokens)(sourceKeyParts.slice(firstPartLength)).getPathPartsAsArray();
70413
- const lastStarIndexSecondPart = secondPartParts.lastIndexOf(_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.each);
70630
+ const secondPartParts = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_2__.createRelativeFromTokens)(sourceKeyParts.slice(firstPartLength)).getPathPartsAsArray();
70631
+ const lastStarIndexSecondPart = secondPartParts.lastIndexOf(_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_2__.PathTokens.each);
70414
70632
  const secondPartFinalParts = secondPartParts.slice(0, lastStarIndexSecondPart);
70415
- return (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createAbsoluteFromTokens)([...firstPart.getPathParts(), ...secondPartFinalParts]).trimLastStarIfLastToken();
70633
+ return (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_2__.createAbsoluteFromTokens)([...firstPart.getPathParts(), ...secondPartFinalParts]).trimLastStarIfLastToken();
70416
70634
  };
70417
70635
  const getIterationPathWithoutNestedMultiplicity = () => {
70418
70636
  const firstPartParts = matchPaths.matchedPath.getPathPartsAsArray();
70419
- const lastStarIndexSecondPart = firstPartParts.lastIndexOf(_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.each);
70420
- return (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createAbsoluteFromTokens)(sourceKeyParts.slice(0, lastStarIndexSecondPart)).toCurrentIteration().trimLastStarIfLastToken();
70637
+ const lastStarIndexSecondPart = firstPartParts.lastIndexOf(_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_2__.PathTokens.each);
70638
+ return (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_2__.createAbsoluteFromTokens)(sourceKeyParts.slice(0, lastStarIndexSecondPart)).toCurrentIteration().trimLastStarIfLastToken();
70421
70639
  };
70422
70640
  const finalIterPath = secondParts.isContainCurrentOrEachIteration() ? getIterationPathWithNestedMultiplicity() : getIterationPathWithoutNestedMultiplicity();
70423
70641
  if (finalIterPath.isEmpty()) {
70424
70642
  throw new Error("Error occurred while trying parse path for reduce: " + firstPart.toLegacyPath());
70425
70643
  }
70426
- const keys = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.DeserializeEnumerationExpression([new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ValueReferenceExpression(sourceKeyPath.toCurrentIteration(), "value")], new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.BoolLiteralExpression(true));
70427
- const reduceExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ReduceCallExpression(finalIterPath, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.AnonymousFunctionDeclarationExpression(_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.BuildInTypeExpression.dict, [new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ArgumentDeclarationExpression("result", _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.BuildInTypeExpression.dict)], new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.AddSumByKeysExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ArgumentReferenceExpression("result"), keys, (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToDecimalIfNeed)(sourceValueExpression))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.DictLiteralExpression());
70428
- const deserializedKeys = targetKeys.items[0] instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaGetPicklistValuesExpression ? this.compileExpressionToFlangExpressionInternal(targetKeys.items[0], prefix, target, addPrecalculationRule) : new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.DeserializeEnumerationExpression(targetKeys.items.map(i => this.compileEnumerationItem(i, prefix, target, addPrecalculationRule)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.BoolLiteralExpression(true));
70429
- const finalValueExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.GetSumByKeysExpression(reduceExpression, deserializedKeys !== null && deserializedKeys !== void 0 ? deserializedKeys : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_6__.reject)());
70644
+ const keys = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DeserializeEnumerationExpression([new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ValueReferenceExpression(sourceKeyPath.toCurrentIteration(), "value")], new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BoolLiteralExpression(true));
70645
+ const reduceExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ReduceCallExpression(finalIterPath, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.AnonymousFunctionDeclarationExpression(_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BuildInTypeExpression.dict, [new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ArgumentDeclarationExpression("result", _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BuildInTypeExpression.dict)], new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.AddSumByKeysExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ArgumentReferenceExpression("result"), keys, (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.castOperandToDecimalIfNeed)(sourceValueExpression))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DictLiteralExpression());
70646
+ const deserializedKeys = targetKeys.items[0] instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaGetPicklistValuesExpression ? this.compileExpressionToFlangExpressionInternal(targetKeys.items[0], prefix, target, addPrecalculationRule) : new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DeserializeEnumerationExpression(targetKeys.items.map(i => this.compileEnumerationItem(i, prefix, target, addPrecalculationRule)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BoolLiteralExpression(true));
70647
+ const finalValueExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.GetSumByKeysExpression(reduceExpression, deserializedKeys !== null && deserializedKeys !== void 0 ? deserializedKeys : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_7__.reject)());
70430
70648
  return finalValueExpression;
70431
70649
  }
70432
70650
  compileEnumerationItem(expression, prefix, target, addPrecalculationRule) {
70433
- if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaArgumentExpression) {
70651
+ if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaArgumentExpression) {
70434
70652
  return this.compiledArgumentExpression(prefix, target, expression.select, "string", addPrecalculationRule);
70435
70653
  }
70436
70654
  return this.compileExpressionToFlangExpressionInternal(expression, prefix, target, addPrecalculationRule);
@@ -70438,108 +70656,123 @@ class FormulaExpressionToFlangExpressionConverter {
70438
70656
  compileGroupSumExpression(prefix, target, expression, addPrecalculationRule) {
70439
70657
  const sourceKeyPath = this.preparePathAndAdjustMultiplicity(prefix, expression.sourceKeyPath);
70440
70658
  const sourceValuePath = this.preparePathAndAdjustMultiplicity(prefix, expression.sourceValuePath);
70441
- const sourceValueExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ValueReferenceExpression(sourceValuePath.toCurrentIteration(), "value");
70659
+ const sourceValueExpression = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.makeStringValueReference)(sourceValuePath.toCurrentIteration(), "value");
70442
70660
  return this.compileGroupSumExpressionWithCustomValueExpression(prefix, target, expression.targetKeys, sourceKeyPath, sourceValueExpression, addPrecalculationRule);
70443
70661
  }
70444
70662
  compileGroupCountExpression(prefix, target, expression, addPrecalculationRule) {
70445
70663
  const sourceKeyPath = this.preparePathAndAdjustMultiplicity(prefix, expression.sourceKeyPath);
70446
- const sourceValueExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.DecimalLiteralExpression(1);
70664
+ const sourceValueExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DecimalLiteralExpression(1);
70447
70665
  return this.compileGroupSumExpressionWithCustomValueExpression(prefix, target, expression.targetKeys, sourceKeyPath, sourceValueExpression, addPrecalculationRule);
70448
70666
  }
70667
+ convertExpressionTypePropertyToFLangType(type) {
70668
+ switch (type) {
70669
+ case "string":
70670
+ return _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BuildInTypeExpression.string;
70671
+ case "array":
70672
+ return _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BuildInTypeExpression.array;
70673
+ case "decimal":
70674
+ return _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BuildInTypeExpression.decimal;
70675
+ case "dict":
70676
+ return _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BuildInTypeExpression.dict;
70677
+ default:
70678
+ return (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_7__.reject)(`Unknown ExpressionTypeProperty [${type}]`);
70679
+ }
70680
+ }
70449
70681
  compiledArgumentExpression(prefix, target, selectPath, selectType, addPrecalculationRule, aggregationFunction = "Sum") {
70682
+ const builtInType = this.convertExpressionTypePropertyToFLangType(selectType !== null && selectType !== void 0 ? selectType : "string");
70450
70683
  const adjustedSelectPath = this.preparePathAndAdjustMultiplicity(prefix, selectPath);
70451
- const splitInfo = (0,_Common_ModelPath_PathSplitHelper__WEBPACK_IMPORTED_MODULE_5__.getMatchedAndDifferentModelPaths)(target.path, adjustedSelectPath);
70684
+ const splitInfo = (0,_Common_ModelPath_PathSplitHelper__WEBPACK_IMPORTED_MODULE_6__.getMatchedAndDifferentModelPaths)(target.path, adjustedSelectPath);
70452
70685
  const baseSelectPath = splitInfo.matchedPath;
70453
70686
  if (!splitInfo.differentPath.isContainIteration()) {
70454
- const valueRefExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ValueReferenceExpression(adjustedSelectPath.toCurrentIteration().normalize(), "value");
70455
- const finalValue = splitInfo.differentPath.isEmpty() && target.field === "value" ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.NoDepsExpression(valueRefExpression) : valueRefExpression;
70456
- return selectType === "decimal" ? (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToDecimalIfNeed)(finalValue) : finalValue;
70687
+ const valueRefExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ValueReferenceExpression(adjustedSelectPath.toCurrentIteration().normalize(), "value");
70688
+ const finalValue = splitInfo.differentPath.isEmpty() && target.field === "value" ? (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.makeNoDeps)(valueRefExpression) : valueRefExpression;
70689
+ return (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.castOperandIfNeed)(finalValue, builtInType);
70457
70690
  } else {
70458
70691
  var _countValueExpression;
70459
- let resultValueExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ValueReferenceExpression(adjustedSelectPath.toCurrentIteration().normalize(), "value");
70692
+ let resultValueExpression = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.makeStringValueReference)(adjustedSelectPath.toCurrentIteration().normalize(), "value");
70460
70693
  let countValueExpression = undefined;
70461
- const iterationEntries = [...(0,_Common_IterableUtils__WEBPACK_IMPORTED_MODULE_3__.reverseArray)((0,_Common_ModelPath_BuildIterationSequence__WEBPACK_IMPORTED_MODULE_4__.buildIterationSequence)(splitInfo.differentPath))];
70694
+ const iterationEntries = [...(0,_Common_IterableUtils__WEBPACK_IMPORTED_MODULE_4__.reverseArray)((0,_Common_ModelPath_BuildIterationSequence__WEBPACK_IMPORTED_MODULE_5__.buildIterationSequence)(splitInfo.differentPath))];
70462
70695
  for (const iterationEntry of iterationEntries) {
70463
- const iterablePath = baseSelectPath.joinWith((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createRelativeFromTokens)(iterationEntry.iterable.getPathPartsAsArray()));
70464
- const suffixWithoutMultiple = iterationEntry.suffix.getPathPartsAsArray().filter(x => _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.isSimpleToken(x));
70465
- const nextResultValueExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ValueReferenceExpression(iterablePath.joinWith((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createRelativeFromTokens)(suffixWithoutMultiple)).joinWith("Sum").normalize(), "value");
70466
- const currentSumExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ValueReferenceExpression(iterablePath.joinWith((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createRelativeFromTokens)(suffixWithoutMultiple)).joinWith("Sum").toCurrentIteration().normalize(), "value");
70467
- const countResultValueExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ValueReferenceExpression(iterablePath.joinWith((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createRelativeFromTokens)(suffixWithoutMultiple)).joinWith("Count").normalize(), "value");
70468
- const currenCountExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ValueReferenceExpression(iterablePath.joinWith((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createRelativeFromTokens)(suffixWithoutMultiple)).joinWith("Count").toCurrentIteration().normalize(), "value");
70469
- const sumReduceExpr = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ReduceCallExpression(iterablePath.toCurrentIteration(), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.AnonymousFunctionDeclarationExpression(_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.BuildInTypeExpression.decimal, [new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ArgumentDeclarationExpression("result", _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.BuildInTypeExpression.decimal)], new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.OrBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.NotEqExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ArgumentReferenceExpression("result"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.NullLiteralExpression()), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.NotEqExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.CastExpression(resultValueExpression, _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.BuildInTypeExpression.decimal), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.NullLiteralExpression())), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.MinusBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.SumBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.NullCoalesceExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ArgumentReferenceExpression("result"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.DecimalLiteralExpression(0)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.CastExpression(resultValueExpression, _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.BuildInTypeExpression.decimal, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.DecimalLiteralExpression(0))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.IncrementalFlagExpression(), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.CastExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.GetOldExpression(resultValueExpression), _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.BuildInTypeExpression.decimal, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.DecimalLiteralExpression(0)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.DecimalLiteralExpression(0))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.NullLiteralExpression())), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.IncrementalFlagExpression(), (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToDecimalIfNeed)(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.NoDepsExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ValueReferenceExpression(nextResultValueExpression.modePath.toCurrentIteration(), nextResultValueExpression.valueName))), (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToDecimalIfNeed)(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.NullLiteralExpression())));
70470
- addPrecalculationRule(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.SetStatement(nextResultValueExpression, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.NullCoalesceExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.CastExpression(sumReduceExpr, _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.BuildInTypeExpression.string, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.StringLiteralExpression("G29")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.StringLiteralExpression(""))));
70471
- const countReduceExpr = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ReduceCallExpression(iterablePath.toCurrentIteration(), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.AnonymousFunctionDeclarationExpression(_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.BuildInTypeExpression.decimal, [new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ArgumentDeclarationExpression("result", _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.BuildInTypeExpression.decimal)], new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.MinusBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.SumBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.NullCoalesceExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ArgumentReferenceExpression("result"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.DecimalLiteralExpression(0)), countValueExpression == undefined ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.AndBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.NotEqExpression(resultValueExpression, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.StringLiteralExpression("")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.NotEqExpression(resultValueExpression, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.NullLiteralExpression())), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.DecimalLiteralExpression(1), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.DecimalLiteralExpression(0)) : new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.CastExpression(countValueExpression, _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.BuildInTypeExpression.decimal, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.DecimalLiteralExpression(0))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.IncrementalFlagExpression(), countValueExpression == undefined ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.AndBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.NotEqExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.GetOldExpression(resultValueExpression), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.StringLiteralExpression("")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.NotEqExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.GetOldExpression(resultValueExpression), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.NullLiteralExpression())), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.DecimalLiteralExpression(1), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.DecimalLiteralExpression(0)) : new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.CastExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.GetOldExpression(countValueExpression), _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.BuildInTypeExpression.decimal, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.DecimalLiteralExpression(0)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.DecimalLiteralExpression(0)))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.IncrementalFlagExpression(), (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToDecimalIfNeed)(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.NoDepsExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ValueReferenceExpression(countResultValueExpression.modePath.toCurrentIteration(), countResultValueExpression.valueName))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.DecimalLiteralExpression(0)));
70472
- addPrecalculationRule(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.SetStatement(countResultValueExpression, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.CastExpression(countReduceExpr, _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.BuildInTypeExpression.string, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.StringLiteralExpression("G29"))));
70696
+ const iterablePath = baseSelectPath.joinWith((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_2__.createRelativeFromTokens)(iterationEntry.iterable.getPathPartsAsArray()));
70697
+ const suffixWithoutMultiple = iterationEntry.suffix.getPathPartsAsArray().filter(x => _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_2__.PathTokens.isSimpleToken(x));
70698
+ const nextResultValueExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ValueReferenceExpression(iterablePath.joinWith((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_2__.createRelativeFromTokens)(suffixWithoutMultiple)).joinWith("Sum").normalize(), "value");
70699
+ const currentSumExpression = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.makeStringValueReference)(iterablePath.joinWith((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_2__.createRelativeFromTokens)(suffixWithoutMultiple)).joinWith("Sum").toCurrentIteration().normalize(), "value");
70700
+ const countResultValueExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ValueReferenceExpression(iterablePath.joinWith((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_2__.createRelativeFromTokens)(suffixWithoutMultiple)).joinWith("Count").normalize(), "value");
70701
+ const currenCountExpression = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.makeStringValueReference)(iterablePath.joinWith((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_2__.createRelativeFromTokens)(suffixWithoutMultiple)).joinWith("Count").toCurrentIteration().normalize(), "value");
70702
+ const sumReduceExpr = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ReduceCallExpression(iterablePath.toCurrentIteration(), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.AnonymousFunctionDeclarationExpression(_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BuildInTypeExpression.decimal, [new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ArgumentDeclarationExpression("result", _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BuildInTypeExpression.decimal)], new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.OrBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.NotEqExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ArgumentReferenceExpression("result"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.NullLiteralExpression()), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.NotEqExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.CastExpression(resultValueExpression, _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BuildInTypeExpression.decimal), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.NullLiteralExpression())), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.MinusBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.SumBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.NullCoalesceExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ArgumentReferenceExpression("result"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DecimalLiteralExpression(0)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.CastExpression(resultValueExpression, _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BuildInTypeExpression.decimal, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DecimalLiteralExpression(0))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.IncrementalFlagExpression(), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.CastExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.makeGetOld)(resultValueExpression), _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BuildInTypeExpression.decimal, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DecimalLiteralExpression(0)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DecimalLiteralExpression(0))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.NullLiteralExpression())), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.IncrementalFlagExpression(), (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.castOperandToDecimalIfNeed)((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.makeNoDeps)((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.makeStringValueReference)(nextResultValueExpression.modePath.toCurrentIteration(), nextResultValueExpression.valueName))), (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.castOperandToDecimalIfNeed)(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.NullLiteralExpression())));
70703
+ addPrecalculationRule(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.SetStatement(nextResultValueExpression, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.NullCoalesceExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.CastExpression(sumReduceExpr, _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BuildInTypeExpression.string, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.StringLiteralExpression("G29")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.StringLiteralExpression(""))));
70704
+ const countReduceExpr = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ReduceCallExpression(iterablePath.toCurrentIteration(), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.AnonymousFunctionDeclarationExpression(_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BuildInTypeExpression.decimal, [new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ArgumentDeclarationExpression("result", _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BuildInTypeExpression.decimal)], new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.MinusBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.SumBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.NullCoalesceExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ArgumentReferenceExpression("result"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DecimalLiteralExpression(0)), countValueExpression == undefined ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.AndBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.NotEqExpression(resultValueExpression, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.StringLiteralExpression("")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.NotEqExpression(resultValueExpression, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.NullLiteralExpression())), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DecimalLiteralExpression(1), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DecimalLiteralExpression(0)) : new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.CastExpression(countValueExpression, _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BuildInTypeExpression.decimal, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DecimalLiteralExpression(0))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.IncrementalFlagExpression(), countValueExpression == undefined ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.AndBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.NotEqExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.makeGetOld)(resultValueExpression), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.StringLiteralExpression("")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.NotEqExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.makeGetOld)(resultValueExpression), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.NullLiteralExpression())), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DecimalLiteralExpression(1), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DecimalLiteralExpression(0)) : new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.CastExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.makeGetOld)(countValueExpression), _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BuildInTypeExpression.decimal, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DecimalLiteralExpression(0)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DecimalLiteralExpression(0)))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.IncrementalFlagExpression(), (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.castOperandToDecimalIfNeed)((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.makeNoDeps)((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.makeStringValueReference)(countResultValueExpression.modePath.toCurrentIteration(), countResultValueExpression.valueName))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DecimalLiteralExpression(0)));
70705
+ addPrecalculationRule(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.SetStatement(countResultValueExpression, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.CastExpression(countReduceExpr, _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BuildInTypeExpression.string, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.StringLiteralExpression("G29"))));
70473
70706
  resultValueExpression = currentSumExpression;
70474
70707
  countValueExpression = currenCountExpression;
70475
70708
  }
70476
- const finalValue = aggregationFunction === "Sum" ? resultValueExpression : (_countValueExpression = countValueExpression) !== null && _countValueExpression !== void 0 ? _countValueExpression : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_6__.reject)();
70477
- return selectType === "decimal" ? (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToDecimalIfNeed)(finalValue) : finalValue;
70709
+ const finalValue = aggregationFunction === "Sum" ? resultValueExpression : (_countValueExpression = countValueExpression) !== null && _countValueExpression !== void 0 ? _countValueExpression : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_7__.reject)();
70710
+ return (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.castOperandIfNeed)(finalValue, builtInType);
70478
70711
  }
70479
70712
  }
70480
70713
  compileSumExpression(expression, prefix, target, addPrecalculationRule) {
70481
70714
  const result = expression.arguments.reduce((acc, curr) => {
70482
- const currExpr = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.NullCoalesceExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToDecimalIfNeed)(this.compileExpressionToFlangExpressionInternal(curr, prefix, target, addPrecalculationRule)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.DecimalLiteralExpression(0));
70483
- return acc != undefined ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.SumBinaryExpression(acc, currExpr) : currExpr;
70715
+ const currExpr = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.NullCoalesceExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.castOperandToDecimalIfNeed)(this.compileExpressionToFlangExpressionInternal(curr, prefix, target, addPrecalculationRule)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DecimalLiteralExpression(0));
70716
+ return acc != undefined ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.SumBinaryExpression(acc, currExpr) : currExpr;
70484
70717
  }, undefined);
70485
70718
  if (result == undefined) {
70486
- throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_2__.InvalidProgramStateError();
70719
+ throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_3__.InvalidProgramStateError();
70487
70720
  }
70488
- return (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.wrapWithArgumentsCondition)(result);
70721
+ return (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.wrapWithArgumentsCondition)(result);
70489
70722
  }
70490
70723
  compileConcatExpression(expression, prefix, target, addPrecalculationRule) {
70491
70724
  const result = expression.arguments.reduce((acc, curr) => {
70492
- const currExpr = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToStringIfNeed)(this.compileExpressionToFlangExpressionInternal(curr, prefix, target, addPrecalculationRule));
70493
- return acc != undefined ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ConcatStringsExpression(acc, currExpr) : currExpr;
70725
+ const currExpr = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.castOperandToStringIfNeed)(this.compileExpressionToFlangExpressionInternal(curr, prefix, target, addPrecalculationRule));
70726
+ return acc != undefined ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ConcatStringsExpression(acc, currExpr) : currExpr;
70494
70727
  }, undefined);
70495
70728
  if (result == undefined) {
70496
- throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_2__.InvalidProgramStateError();
70729
+ throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_3__.InvalidProgramStateError();
70497
70730
  }
70498
70731
  return result;
70499
70732
  }
70500
70733
  compileOrExpression(expression, prefix, target, addPrecalculationRule) {
70501
70734
  const result = expression.arguments.reduce((acc, curr) => {
70502
70735
  const currExpr = this.compileExpressionToFlangExpressionInternal(curr, prefix, target, addPrecalculationRule);
70503
- return acc != undefined ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.OrBinaryExpression(acc, currExpr) : currExpr;
70736
+ return acc != undefined ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.OrBinaryExpression(acc, currExpr) : currExpr;
70504
70737
  }, undefined);
70505
70738
  if (result == undefined) {
70506
- throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_2__.InvalidProgramStateError();
70739
+ throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_3__.InvalidProgramStateError();
70507
70740
  }
70508
70741
  return result;
70509
70742
  }
70510
70743
  compileAndExpression(expression, prefix, target, addPrecalculationRule) {
70511
70744
  const result = expression.arguments.reduce((acc, curr) => {
70512
70745
  const currExpr = this.compileExpressionToFlangExpressionInternal(curr, prefix, target, addPrecalculationRule);
70513
- return acc != undefined ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.AndBinaryExpression(acc, currExpr) : currExpr;
70746
+ return acc != undefined ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.AndBinaryExpression(acc, currExpr) : currExpr;
70514
70747
  }, undefined);
70515
70748
  if (result == undefined) {
70516
- throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_2__.InvalidProgramStateError();
70749
+ throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_3__.InvalidProgramStateError();
70517
70750
  }
70518
70751
  return result;
70519
70752
  }
70520
70753
  compileMultiplyExpression(expression, prefix, target, addPrecalculationRule) {
70521
70754
  const result = expression.arguments.reduce((acc, curr) => {
70522
- const expr = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.NullCoalesceExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToDecimalIfNeed)(this.compileExpressionToFlangExpressionInternal(curr, prefix, target, addPrecalculationRule)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.DecimalLiteralExpression(0));
70523
- return acc != undefined ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.MultiplyBinaryExpression(acc, expr) : expr;
70755
+ const expr = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.NullCoalesceExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.castOperandToDecimalIfNeed)(this.compileExpressionToFlangExpressionInternal(curr, prefix, target, addPrecalculationRule)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DecimalLiteralExpression(0));
70756
+ return acc != undefined ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.MultiplyBinaryExpression(acc, expr) : expr;
70524
70757
  }, undefined);
70525
70758
  if (result == undefined) {
70526
- throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_2__.InvalidProgramStateError();
70759
+ throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_3__.InvalidProgramStateError();
70527
70760
  }
70528
- return (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.wrapWithArgumentsCondition)(result);
70761
+ return (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.wrapWithArgumentsCondition)(result);
70529
70762
  }
70530
70763
  compileDivisionExpression(expression, prefix, target, addPrecalculationRule) {
70531
- const makeDivision = (numerator, denominator) => new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.NotEqExpression(denominator, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.DecimalLiteralExpression(0)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.DivisionBinaryExpression(numerator, denominator), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.NullLiteralExpression());
70764
+ const makeDivision = (numerator, denominator) => new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.NotEqExpression(denominator, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DecimalLiteralExpression(0)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DivisionBinaryExpression(numerator, denominator), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.NullLiteralExpression());
70532
70765
  const result = expression.arguments.reduce((acc, curr) => {
70533
- const currExpr = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToDecimalIfNeed)(this.compileExpressionToFlangExpressionInternal(curr, prefix, target, addPrecalculationRule), 0);
70766
+ const currExpr = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.castOperandToDecimalIfNeed)(this.compileExpressionToFlangExpressionInternal(curr, prefix, target, addPrecalculationRule), 0);
70534
70767
  return acc != undefined ? makeDivision(acc, currExpr) : currExpr;
70535
70768
  }, undefined);
70536
70769
  if (result == undefined) {
70537
- throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_2__.InvalidProgramStateError();
70770
+ throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_3__.InvalidProgramStateError();
70538
70771
  }
70539
- return (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.wrapWithArgumentsCondition)(result);
70772
+ return (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.wrapWithArgumentsCondition)(result);
70540
70773
  }
70541
70774
  preparePathAndAdjustMultiplicity(prefix, path) {
70542
- const resultPath = this.adjustPathMultiplicity(prefix.joinWith((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createModelPath)(path.replace(/\@/g, ""), "auto")).normalize());
70775
+ const resultPath = this.adjustPathMultiplicity(prefix.joinWith((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_2__.createModelPath)(path.replace(/\@/g, ""), "auto")).normalize());
70543
70776
  return resultPath;
70544
70777
  }
70545
70778
  }
@@ -70648,7 +70881,7 @@ class AutoValueForValueByDefaultNormalizationRuleGenerator {
70648
70881
  const valueRef = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.ValueReferenceExpression(autoValueRule.left.modePath, "value");
70649
70882
  const valueRefCurrentIteration = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.ValueReferenceExpression(autoValueRule.left.modePath.toCurrentIteration(), "value");
70650
70883
  const autoFlagRefCurrentIteration = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.ValueReferenceExpression(autoValueRule.left.modePath.toCurrentIteration(), "autoFlag");
70651
- return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.SetStatement(valueRef, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.AndBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.EqExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.NoDepsExpression(valueRefCurrentIteration), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.NullLiteralExpression()), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.EqExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.NoDepsExpression(autoFlagRefCurrentIteration), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.NullLiteralExpression())), autoValueRule.right, formulaRulesMap.has(valueRef) ? (_formulaRulesMap$get$ = (_formulaRulesMap$get = formulaRulesMap.get(valueRef)) === null || _formulaRulesMap$get === void 0 ? void 0 : _formulaRulesMap$get.right) !== null && _formulaRulesMap$get$ !== void 0 ? _formulaRulesMap$get$ : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_4__.reject)("Unexpected error") : new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.NullCoalesceExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.ValueReferenceExpression(autoValueRule.left.modePath.toCurrentIteration(), "value"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.StringLiteralExpression(this.dataDeclarationHelper.getDefaultValue(autoValueRule.left.modePath)))));
70884
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.SetStatement(valueRef, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.AndBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.EqExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_1__.makeNoDeps)(valueRefCurrentIteration), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.NullLiteralExpression()), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.EqExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_1__.makeNoDeps)(autoFlagRefCurrentIteration), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.NullLiteralExpression())), autoValueRule.right, formulaRulesMap.has(valueRef) ? (_formulaRulesMap$get$ = (_formulaRulesMap$get = formulaRulesMap.get(valueRef)) === null || _formulaRulesMap$get === void 0 ? void 0 : _formulaRulesMap$get.right) !== null && _formulaRulesMap$get$ !== void 0 ? _formulaRulesMap$get$ : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_4__.reject)("Unexpected error") : new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.NullCoalesceExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.ValueReferenceExpression(autoValueRule.left.modePath.toCurrentIteration(), "value"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.StringLiteralExpression(this.dataDeclarationHelper.getDefaultValue(autoValueRule.left.modePath)))));
70652
70885
  };
70653
70886
  const updatedFormulaRules = Iterator.from(formulaFLangRules).flatMap(x => x instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.SetStatement && x.left.valueName === "autoValue" ? [x, createValueRuleFromAutoValueRule(x)] : [x]);
70654
70887
 
@@ -70695,7 +70928,7 @@ class FormulaAndInitOnlyNormalizationRuleGenerator {
70695
70928
  this.optionalSectionRuleBuilder = optionalSectionRuleBuilder;
70696
70929
  }
70697
70930
  generateRules() {
70698
- const createValueRuleFromAutoValueRule = autoValueRule => new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ValueReferenceExpression(autoValueRule.left.modePath, "value"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.NotEqExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.NoDepsExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ValueReferenceExpression(autoValueRule.left.modePath.toCurrentIteration(), "value")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.NullLiteralExpression()), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.NoDepsExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ValueReferenceExpression(autoValueRule.left.modePath.toCurrentIteration(), "value")), autoValueRule.right));
70931
+ const createValueRuleFromAutoValueRule = autoValueRule => new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ValueReferenceExpression(autoValueRule.left.modePath, "value"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.NotEqExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_2__.makeNoDeps)(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ValueReferenceExpression(autoValueRule.left.modePath.toCurrentIteration(), "value")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.NullLiteralExpression()), (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_2__.makeNoDeps)(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ValueReferenceExpression(autoValueRule.left.modePath.toCurrentIteration(), "value")), autoValueRule.right));
70699
70932
  const createValueRuleEmptyRule = path => new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ValueReferenceExpression(path, "value"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.NoDepsExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ValueReferenceExpression(path.toCurrentIteration(), "value")));
70700
70933
  const createDisableValueAutoInitRule = path => new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ValueReferenceExpression(path, "disableValueAutoInit"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.StringLiteralExpression("true"));
70701
70934
  const ignoredValueSetRuleMapper = x => {
@@ -70776,8 +71009,12 @@ class FormulaOnlyNormalizationRuleGenerator {
70776
71009
  const precalculationRules = [];
70777
71010
  const defaultValue = this.dataDeclarationHelper.getDefaultValue(fullTarget.toLegacyPath());
70778
71011
  const isTargetAutoField = this.dataDeclarationHelper.isNodeHasAutoFlagEntry(fullTarget.toAbsolute());
71012
+ const getFormulaExpression = field => {
71013
+ const result = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_5__.castOperandToStringIfNeed)(this.formulaExprConverter.compileExpressionToFlangExpression(formula.expression, prefix, new _Common_ModelPath_AbsoluteModelFieldPath__WEBPACK_IMPORTED_MODULE_3__.AbsoluteModelFieldPath(fullTarget, field), x => precalculationRules.push(x)), "G29");
71014
+ const resultType = result.getType();
71015
+ return resultType === _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.string ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.NullCoalesceExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_5__.wrapWithArgumentsCondition)(result), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.StringLiteralExpression(defaultValue)) : result;
71016
+ };
70779
71017
  const result = [];
70780
- const getFormulaExpression = field => new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.NullCoalesceExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_5__.wrapWithArgumentsCondition)((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_5__.castOperandToStringIfNeed)(this.formulaExprConverter.compileExpressionToFlangExpression(formula.expression, prefix, new _Common_ModelPath_AbsoluteModelFieldPath__WEBPACK_IMPORTED_MODULE_3__.AbsoluteModelFieldPath(fullTarget, field), x => precalculationRules.push(x)), "G29")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.StringLiteralExpression(defaultValue));
70781
71018
  if (isTargetAutoField) {
70782
71019
  result.push(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression(fullTarget, "autoValue"), getFormulaExpression("autoValue")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression(fullTarget, "value"), getFormulaExpression("value")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression(fullTarget, "autoFlag"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.CastExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.IsEqualsBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression(fullTarget.toCurrentIteration(), "value"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression(fullTarget.toCurrentIteration(), "autoValue")), _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.string)));
70783
71020
  } else {
@@ -70806,6 +71043,12 @@ __webpack_require__.r(__webpack_exports__);
70806
71043
  /* harmony export */ });
70807
71044
  /* harmony import */ var _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../Common/IterableUtils */ "./Common/IterableUtils.ts");
70808
71045
  /* harmony import */ var _FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../FLang/FlangUtils */ "./Generator/src/generators/ServerSideFLangNormalization/FLang/FlangUtils.ts");
71046
+ /* harmony import */ var _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../FLang/FLangCodeDom */ "./Generator/src/generators/ServerSideFLangNormalization/FLang/FLangCodeDom.ts");
71047
+ /* harmony import */ var _Common_ModelPath_AbsoluteModelFieldPath__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../../Common/ModelPath/AbsoluteModelFieldPath */ "./Common/ModelPath/AbsoluteModelFieldPath.ts");
71048
+ /* harmony import */ var _Common_TypingUtils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../../Common/TypingUtils */ "./Common/TypingUtils.ts");
71049
+
71050
+
71051
+
70809
71052
 
70810
71053
 
70811
71054
 
@@ -70838,8 +71081,13 @@ class NormalizationRulesGenerator {
70838
71081
  const dataDeclarationRules = this.sugarRulesBuilder.buildRules();
70839
71082
 
70840
71083
  // Порядок важен, т.к. потом делаем distinctBy.
70841
- const allRules = _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_0__.IterUtils.concat(initializeRules, lazyLoadingRules, formulaFLangRules, optionalSectionRules, dataDeclarationRules, sugarValidationRules).flatMap(rule => (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_1__.wrapWithDisableValueAutoInitFlagCheckIfRequired)(this.formSchemaRng, rule));
70842
- return (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_1__.combineRulesWithOptionalSectionChecking)(allRules, this.optionalSectionRulesBuilder);
71084
+ const allRules = _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_0__.IterUtils.concat(initializeRules, lazyLoadingRules, formulaFLangRules, optionalSectionRules, dataDeclarationRules, sugarValidationRules).flatMap(rule => (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_1__.wrapWithDisableValueAutoInitFlagCheckIfRequired)(this.formSchemaRng, rule)).toArray();
71085
+ const dictionaryRules = Iterator.from(allRules).filter(rule => rule instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.SetStatement && (rule.right.getType() === _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.BuildInTypeExpression.dict || rule.right instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.CastExpression && rule.right.targetExpression.getType() === _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.BuildInTypeExpression.dict || rule.right instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.NullCoalesceExpression && rule.right.expression instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.CastExpression && rule.right.expression.targetExpression.getType() === _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.BuildInTypeExpression.dict)).map(x => x instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.SetStatement ? new _Common_ModelPath_AbsoluteModelFieldPath__WEBPACK_IMPORTED_MODULE_3__.AbsoluteModelFieldPath(x.left.modePath, x.left.valueName) : undefined).filter(_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_4__.isNotNullOrUndefined).toArray();
71086
+ const content = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_1__.combineRulesWithOptionalSectionChecking)(allRules, this.optionalSectionRulesBuilder);
71087
+ return {
71088
+ content: content,
71089
+ serverOnlyPaths: dictionaryRules
71090
+ };
70843
71091
  }
70844
71092
  }
70845
71093
 
@@ -70920,7 +71168,11 @@ class FormulaRulesBuilder extends _BaseRuleBuilder__WEBPACK_IMPORTED_MODULE_6__.
70920
71168
  const isTargetAutoField = this.dataDeclarationHelper.isNodeHasAutoFlagEntry(fullTarget.toAbsolute());
70921
71169
  const isDisabled = this.dataDeclarationHelper.isNodeHasDisabledEntry(fullTarget.toAbsolute());
70922
71170
  const isDecimal = ((_this$formSchemaRng$g = this.formSchemaRng.getTypeNodeByPath(fullTarget.toAbsolute())) === null || _this$formSchemaRng$g === void 0 ? void 0 : _this$formSchemaRng$g.baseType) === "decimal";
70923
- const getFormulaExpression = targetField => new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NullCoalesceExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.wrapWithArgumentsCondition)((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.castOperandToStringIfNeed)(this.formulaExprConverter.compileExpressionToFlangExpression(formula.expression, prefix, new _Common_ModelPath_AbsoluteModelFieldPath__WEBPACK_IMPORTED_MODULE_4__.AbsoluteModelFieldPath(fullTarget, targetField), x => precalculationRules.push(x)), "G29")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression(defaultValue));
71171
+ const getFormulaExpression = targetField => {
71172
+ const result = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.castOperandToStringIfNeed)(this.formulaExprConverter.compileExpressionToFlangExpression(formula.expression, prefix, new _Common_ModelPath_AbsoluteModelFieldPath__WEBPACK_IMPORTED_MODULE_4__.AbsoluteModelFieldPath(fullTarget, targetField), x => precalculationRules.push(x)), "G29");
71173
+ const resultType = result.getType();
71174
+ return resultType === _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.BuildInTypeExpression.string ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NullCoalesceExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.wrapWithArgumentsCondition)(result), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression(defaultValue)) : result;
71175
+ };
70924
71176
  const valueRule = isTargetAutoField ? isDisabled ? this.createValueRuleForDisabledAutoField(fullTarget, getFormulaExpression) : this.createValueRuleForAutoField(fullTarget, defaultValue, getFormulaExpression) : this.createRegularValueRule(fullTarget, getFormulaExpression);
70925
71177
  const autoValueRule = isTargetAutoField ? this.createAutoValueRule(fullTarget, getFormulaExpression) : undefined;
70926
71178
  const autoFlagRule = isTargetAutoField ? this.createAutoFlagRule(fullTarget, isDecimal) : undefined;
@@ -70934,13 +71186,13 @@ class FormulaRulesBuilder extends _BaseRuleBuilder__WEBPACK_IMPORTED_MODULE_6__.
70934
71186
  return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(fullTarget, "value"), getFormulaExpression("value"));
70935
71187
  }
70936
71188
  createAutoFlagRule(fullTarget, isDecimal) {
70937
- return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(fullTarget, "autoFlag"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.OrBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.IsEqualsBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(fullTarget.toCurrentIteration(), "autoFlag"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NullLiteralExpression()), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.IsEqualsBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(fullTarget.toCurrentIteration(), "autoFlag"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression("false"))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.CastExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.IsEqualsBinaryExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.decimalWrapper)(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(fullTarget.toCurrentIteration(), "value"), isDecimal), (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.decimalWrapper)(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(fullTarget.toCurrentIteration(), "autoValue"), isDecimal)), _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.BuildInTypeExpression.string), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NoDepsExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(fullTarget.toCurrentIteration(), "autoFlag"))));
71189
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(fullTarget, "autoFlag"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.OrBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.IsEqualsBinaryExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeStringValueReference)(fullTarget.toCurrentIteration(), "autoFlag"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NullLiteralExpression()), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.IsEqualsBinaryExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeStringValueReference)(fullTarget.toCurrentIteration(), "autoFlag"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression("false"))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.CastExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.IsEqualsBinaryExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.decimalWrapper)((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeStringValueReference)(fullTarget.toCurrentIteration(), "value"), isDecimal), (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.decimalWrapper)((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeStringValueReference)(fullTarget.toCurrentIteration(), "autoValue"), isDecimal)), _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.BuildInTypeExpression.string), (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeNoDeps)(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(fullTarget.toCurrentIteration(), "autoFlag"))));
70938
71190
  }
70939
71191
  createValueRuleForDisabledAutoField(fullTarget, getFormulaExpression) {
70940
71192
  return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(fullTarget, "value"), getFormulaExpression("value"));
70941
71193
  }
70942
71194
  createValueRuleForAutoField(fullTarget, defaultValue, getFormulaExpression) {
70943
- return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(fullTarget, "value"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.IsEqualsBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NoDepsExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(fullTarget.toCurrentIteration(), "autoFlag")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression("true")), getFormulaExpression("value"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NullCoalesceExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(fullTarget.toCurrentIteration(), "value"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression(defaultValue))));
71195
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(fullTarget, "value"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.IsEqualsBinaryExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeNoDeps)((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeStringValueReference)(fullTarget.toCurrentIteration(), "autoFlag")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression("true")), getFormulaExpression("value"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NullCoalesceExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(fullTarget.toCurrentIteration(), "value"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression(defaultValue))));
70944
71196
  }
70945
71197
  adjustPathMultiplicity(path) {
70946
71198
  return (0,_DataSchema_DataSchemaUtils__WEBPACK_IMPORTED_MODULE_2__.adjustPathMultiplicityComplex)(path, this.formSchemaRng, this.dataDeclarationHelper);
@@ -71052,6 +71304,8 @@ __webpack_require__.r(__webpack_exports__);
71052
71304
  /* harmony import */ var _Common_ModelPath_ModelPathHelper__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../../Common/ModelPath/ModelPathHelper */ "./Common/ModelPath/ModelPathHelper.ts");
71053
71305
  /* harmony import */ var _Common_PathConstants__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../../../Common/PathConstants */ "./Common/PathConstants.ts");
71054
71306
  /* harmony import */ var _BaseRuleBuilder__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./BaseRuleBuilder */ "./Generator/src/generators/ServerSideFLangNormalization/RuleBuilders/BaseRuleBuilder.ts");
71307
+ /* harmony import */ var _FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../FLang/FlangUtils */ "./Generator/src/generators/ServerSideFLangNormalization/FLang/FlangUtils.ts");
71308
+
71055
71309
 
71056
71310
 
71057
71311
 
@@ -71170,7 +71424,7 @@ class OptionalSectionRulesBuilder extends _BaseRuleBuilder__WEBPACK_IMPORTED_MOD
71170
71424
  var _pathGroup$, _pathGroup$map$reduce;
71171
71425
  const iterationEntry = (_pathGroup$ = pathGroup[0]) === null || _pathGroup$ === void 0 ? void 0 : _pathGroup$.lastIterationEntry;
71172
71426
  const pathCheckExpr = (_pathGroup$map$reduce = pathGroup.map(pathInfo => {
71173
- const pathValueRef = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.NoDepsExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ValueReferenceExpression(pathInfo.path.toCurrentIteration(), "value"));
71427
+ const pathValueRef = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_10__.makeNoDeps)(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ValueReferenceExpression(pathInfo.path.toCurrentIteration(), "value"));
71174
71428
  const checkExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.NotEqExpression(pathValueRef, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.NullLiteralExpression());
71175
71429
  return checkExpression;
71176
71430
  }).reduce((acc, current) => acc == undefined ? current : new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.OrBinaryExpression(acc, current), undefined)) !== null && _pathGroup$map$reduce !== void 0 ? _pathGroup$map$reduce : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_4__.reject)();
@@ -71382,7 +71636,7 @@ class ValidationRulesBuilder extends _BaseRuleBuilder__WEBPACK_IMPORTED_MODULE_1
71382
71636
  }
71383
71637
  buildErrorWarningCountReduceRule(iterable, countFieldName, getAllItemsSumExpression) {
71384
71638
  const nextErrorCountTarget = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ValueReferenceExpression(iterable, countFieldName);
71385
- const aggregationReduce = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ReduceCallExpression(iterable.toCurrentIteration(), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.AnonymousFunctionDeclarationExpression(_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.BuildInTypeExpression.decimal, [new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ArgumentDeclarationExpression("result", _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.BuildInTypeExpression.decimal)], new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.SumBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ArgumentReferenceExpression("result"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.MinusBinaryExpression(getAllItemsSumExpression(false), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.IncrementalFlagExpression(), getAllItemsSumExpression(true), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.DecimalLiteralExpression(0))))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.IncrementalFlagExpression(), (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToDecimalIfNeed)(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.GetOldExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ValueReferenceExpression(iterable.toCurrentIteration(), countFieldName))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.DecimalLiteralExpression(0)));
71639
+ const aggregationReduce = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ReduceCallExpression(iterable.toCurrentIteration(), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.AnonymousFunctionDeclarationExpression(_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.BuildInTypeExpression.decimal, [new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ArgumentDeclarationExpression("result", _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.BuildInTypeExpression.decimal)], new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.SumBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ArgumentReferenceExpression("result"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.MinusBinaryExpression(getAllItemsSumExpression(false), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.IncrementalFlagExpression(), getAllItemsSumExpression(true), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.DecimalLiteralExpression(0))))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.IncrementalFlagExpression(), (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToDecimalIfNeed)((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.makeGetOld)((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.makeStringValueReference)(iterable.toCurrentIteration(), countFieldName))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.DecimalLiteralExpression(0)));
71386
71640
  return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.SetStatement(nextErrorCountTarget, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.CastExpression(aggregationReduce, _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.BuildInTypeExpression.string, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.StringLiteralExpression("G29")));
71387
71641
  }
71388
71642
  buildErrorWarningCountSimpleSumRule(iterable, countFieldName, getAllItemsSumExpression) {
@@ -71390,11 +71644,11 @@ class ValidationRulesBuilder extends _BaseRuleBuilder__WEBPACK_IMPORTED_MODULE_1
71390
71644
  return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.SetStatement(nextErrorCountTarget, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.CastExpression(getAllItemsSumExpression(false), _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.BuildInTypeExpression.string, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.StringLiteralExpression("G29")));
71391
71645
  }
71392
71646
  getErrorWarningCountExpression(path, fieldName, readOldValues) {
71393
- const valueGetExpression = readOldValues ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.GetOldExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ValueReferenceExpression(path, fieldName)) : new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ValueReferenceExpression(path, fieldName);
71647
+ const valueGetExpression = readOldValues ? (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.makeGetOld)((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.makeStringValueReference)(path, fieldName)) : (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.makeStringValueReference)(path, fieldName);
71394
71648
  return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.OrBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.IsEqualsBinaryExpression(valueGetExpression, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.StringLiteralExpression(`[]`)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.IsEqualsBinaryExpression(valueGetExpression, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.NullLiteralExpression())), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.DecimalLiteralExpression(0), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.DecimalLiteralExpression(1));
71395
71649
  }
71396
71650
  getReadErrorCountValueExpression(path, countFieldName, readOldValues) {
71397
- return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.CastExpression(readOldValues ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.GetOldExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ValueReferenceExpression(path.toCurrentIteration(), countFieldName)) : new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ValueReferenceExpression(path.toCurrentIteration(), countFieldName), _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.BuildInTypeExpression.decimal, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.DecimalLiteralExpression(0));
71651
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.CastExpression(readOldValues ? (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.makeGetOld)((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.makeStringValueReference)(path.toCurrentIteration(), countFieldName)) : (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.makeStringValueReference)(path.toCurrentIteration(), countFieldName), _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.BuildInTypeExpression.decimal, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.DecimalLiteralExpression(0));
71398
71652
  }
71399
71653
  buildChainOfErrorCountRules(path, countFieldName, fieldName) {
71400
71654
  const reduceResult = Iterator.from((0,_Common_IterableUtils__WEBPACK_IMPORTED_MODULE_4__.reverseArray)([...this.splitModelPathIfErrorCountRequired(path)])).flatMap(iterationPath => this.dataDeclarationHelper.isNodeHasChildrenEntry(iterationPath) ? [iterationPath.joinWith(_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__.PathTokens.each), iterationPath] : [iterationPath]).reduce((result, iterationPath) => {
@@ -95675,8 +95929,10 @@ __webpack_require__.r(__webpack_exports__);
95675
95929
  /* harmony import */ var _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../ServerSideFLangNormalization/FLang/FLangCodeDom */ "./Generator/src/generators/ServerSideFLangNormalization/FLang/FLangCodeDom.ts");
95676
95930
  /* harmony import */ var _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../Common/ModelPath/ModelPath */ "./Common/ModelPath/ModelPath.ts");
95677
95931
  /* harmony import */ var _Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../Common/TypingUtils */ "./Common/TypingUtils.ts");
95678
- /* harmony import */ var _getBindingPath__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./getBindingPath */ "./Generator/src/generators/markupGenerator/getBindingPath.ts");
95679
- /* harmony import */ var _ElementProcessors_CommonNodeProperties_ValidationInfoNode__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./ElementProcessors/CommonNodeProperties/ValidationInfoNode */ "./Generator/src/generators/markupGenerator/ElementProcessors/CommonNodeProperties/ValidationInfoNode.ts");
95932
+ /* harmony import */ var _ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../ServerSideFLangNormalization/FLang/FlangUtils */ "./Generator/src/generators/ServerSideFLangNormalization/FLang/FlangUtils.ts");
95933
+ /* harmony import */ var _getBindingPath__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./getBindingPath */ "./Generator/src/generators/markupGenerator/getBindingPath.ts");
95934
+ /* harmony import */ var _ElementProcessors_CommonNodeProperties_ValidationInfoNode__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./ElementProcessors/CommonNodeProperties/ValidationInfoNode */ "./Generator/src/generators/markupGenerator/ElementProcessors/CommonNodeProperties/ValidationInfoNode.ts");
95935
+
95680
95936
 
95681
95937
 
95682
95938
 
@@ -95698,17 +95954,17 @@ class FLangNormalizationRulesBuilder {
95698
95954
  this.controlCustomizationContext = controlCustomizationContext;
95699
95955
  }
95700
95956
  *childrenInitializer(node, optional, defaultChildren) {
95701
- const targetPathReference = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createFromMask)((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_3__.getResolvedBindingPath)(node), true, _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.each);
95702
- yield new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(targetPathReference, "children"), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ConditionalExpression(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.IsEqualsBinaryExpression(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NoDepsExpression(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(targetPathReference.toCurrentIteration(), "children")), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NullLiteralExpression()), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression(JSON.stringify(defaultChildren !== null && defaultChildren !== void 0 ? defaultChildren : optional ? [] : ["0"])), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NoDepsExpression(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(targetPathReference.toCurrentIteration(), "children"))));
95957
+ const targetPathReference = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createFromMask)((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_4__.getResolvedBindingPath)(node), true, _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.each);
95958
+ yield new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(targetPathReference, "children"), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ConditionalExpression(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.IsEqualsBinaryExpression((0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeNoDeps)((0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeStringValueReference)(targetPathReference.toCurrentIteration(), "children")), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NullLiteralExpression()), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression(JSON.stringify(defaultChildren !== null && defaultChildren !== void 0 ? defaultChildren : optional ? [] : ["0"])), (0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeNoDeps)((0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeStringValueReference)(targetPathReference.toCurrentIteration(), "children"))));
95703
95959
  }
95704
95960
  *childrenInitializerForPicklist(node, optional, defaultChildren) {
95705
95961
  const targetPathReference = node.getFullPath().toEachIteration().trimLastStarIfLastToken();
95706
- yield new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(targetPathReference, "children"), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ConditionalExpression(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.IsEqualsBinaryExpression(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NoDepsExpression(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(targetPathReference.toCurrentIteration(), "children")), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NullLiteralExpression()), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression(JSON.stringify(defaultChildren !== null && defaultChildren !== void 0 ? defaultChildren : optional ? [] : ["0"])), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NoDepsExpression(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(targetPathReference.toCurrentIteration(), "children"))));
95962
+ yield new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(targetPathReference, "children"), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ConditionalExpression(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.IsEqualsBinaryExpression((0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeNoDeps)((0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeStringValueReference)(targetPathReference.toCurrentIteration(), "children")), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NullLiteralExpression()), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression(JSON.stringify(defaultChildren !== null && defaultChildren !== void 0 ? defaultChildren : optional ? [] : ["0"])), (0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeNoDeps)((0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeStringValueReference)(targetPathReference.toCurrentIteration(), "children"))));
95707
95963
  }
95708
95964
  valueInitializer(node, dataBinding, disabled, pathSuffix, fetchFunctionSuffix) {
95709
95965
  var _dataBinding$defaultV;
95710
- const targetPathReference = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createFromMask)((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_3__.getResolvedBindingPath)(node), true, _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.each).joinWith((0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.isNotNullOrEmpty)(pathSuffix) ? (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createFromMask)(pathSuffix, false, _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.each) : (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.emptyModelPath)());
95711
- const originalValueReference = new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NoDepsExpression(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(targetPathReference.toCurrentIteration(), "value"));
95966
+ const targetPathReference = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createFromMask)((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_4__.getResolvedBindingPath)(node), true, _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.each).joinWith((0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.isNotNullOrEmpty)(pathSuffix) ? (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createFromMask)(pathSuffix, false, _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.each) : (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.emptyModelPath)());
95967
+ const originalValueReference = (0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeNoDeps)((0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeStringValueReference)(targetPathReference.toCurrentIteration(), "value"));
95712
95968
  const sourceValueReference = this.getSourceValueReferenceWithCorrection(node, targetPathReference);
95713
95969
  const defaultValue = (_dataBinding$defaultV = dataBinding.defaultValue) !== null && _dataBinding$defaultV !== void 0 ? _dataBinding$defaultV : "";
95714
95970
  if ((0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.isNotNullOrEmpty)(dataBinding.fetchfn)) {
@@ -95732,11 +95988,11 @@ class FLangNormalizationRulesBuilder {
95732
95988
  if (!disabled && !dataBinding.settings) {
95733
95989
  valueExpression = new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ConditionalExpression(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.IsEqualsBinaryExpression(originalValueReference, new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NullLiteralExpression()), valueExpression, sourceValueReference);
95734
95990
  }
95735
- const finalExpression = this.dataDeclarationHelper.isNodeHasAutoFlagEntry(targetPathReference) ? new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ConditionalExpression(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.IsEqualsBinaryExpression(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NoDepsExpression(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(targetPathReference.toCurrentIteration(), "autoFlag")), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression("true")), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NoDepsExpression(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(targetPathReference.toCurrentIteration(), "autoValue")), valueExpression) : valueExpression;
95991
+ const finalExpression = this.dataDeclarationHelper.isNodeHasAutoFlagEntry(targetPathReference) ? new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ConditionalExpression(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.IsEqualsBinaryExpression((0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeNoDeps)((0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeStringValueReference)(targetPathReference.toCurrentIteration(), "autoFlag")), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression("true")), (0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeNoDeps)((0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeStringValueReference)(targetPathReference.toCurrentIteration(), "autoValue")), valueExpression) : valueExpression;
95736
95992
  return new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(targetPathReference, "value"), finalExpression);
95737
95993
  }
95738
95994
  *specialFieldsInitializer(node, options) {
95739
- const targetPathReference = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createFromMask)((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_3__.getResolvedBindingPath)(node), true, _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.each).joinWith((0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.isNotNullOrEmpty)(options.pathSuffix) ? (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createFromMask)(options.pathSuffix, false, _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.each) : (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.emptyModelPath)());
95995
+ const targetPathReference = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createFromMask)((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_4__.getResolvedBindingPath)(node), true, _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.each).joinWith((0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.isNotNullOrEmpty)(options.pathSuffix) ? (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createFromMask)(options.pathSuffix, false, _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.each) : (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.emptyModelPath)());
95740
95996
  if (options.disabled) {
95741
95997
  yield new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(targetPathReference, "disabled"), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression("true"));
95742
95998
  }
@@ -95754,9 +96010,9 @@ class FLangNormalizationRulesBuilder {
95754
96010
  var _typeNode$base, _this$schemaRng$getTy;
95755
96011
  // eslint-disable-next-line
95756
96012
  const validationInfoSource = node === null || node === void 0 ? void 0 : node.validationInfo;
95757
- const typeNode = validationInfoSource instanceof _ElementProcessors_CommonNodeProperties_ValidationInfoNode__WEBPACK_IMPORTED_MODULE_4__.ValidationInfoNode ? this.nodeTypeInfoHelper.getTypeNode(validationInfoSource) : undefined;
96013
+ const typeNode = validationInfoSource instanceof _ElementProcessors_CommonNodeProperties_ValidationInfoNode__WEBPACK_IMPORTED_MODULE_5__.ValidationInfoNode ? this.nodeTypeInfoHelper.getTypeNode(validationInfoSource) : undefined;
95758
96014
  const baseType = (_typeNode$base = typeNode === null || typeNode === void 0 ? void 0 : typeNode.base) !== null && _typeNode$base !== void 0 ? _typeNode$base : (_this$schemaRng$getTy = this.schemaRng.getTypeNodeByPath(targetPathReference)) === null || _this$schemaRng$getTy === void 0 ? void 0 : _this$schemaRng$getTy.baseType;
95759
- const sourceValueReference = new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NoDepsExpression(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(targetPathReference.toCurrentIteration(), "value"));
96015
+ const sourceValueReference = (0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeNoDeps)((0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeStringValueReference)(targetPathReference.toCurrentIteration(), "value"));
95760
96016
  return baseType != undefined ? this.wrapExpressionWithCorrectionExpression(baseType, sourceValueReference) : sourceValueReference;
95761
96017
  }
95762
96018
  }
@@ -97221,9 +97477,9 @@ function children(onlyTagName, nodeClasses = [], skipNodeNames = []) {
97221
97477
  (0,_ClassMetadataAccess__WEBPACK_IMPORTED_MODULE_4__.setPropertyDeserializer)(targetClass, propName, new _Properties_SinglePropertyDeserializer__WEBPACK_IMPORTED_MODULE_7__.SinglePropertyDeserializer(propName.toString(), new _Properties_ValuesSources_ChildrenNodesValueSource__WEBPACK_IMPORTED_MODULE_19__.ChildrenNodesValueSource(onlyTagNames != undefined ? node => onlyTagNames.includes(node.name) && !skipNodeNames.includes(node.name) : node => !skipNodeNames.includes(node.name), nodeClasses)));
97222
97478
  };
97223
97479
  }
97224
- function singleChild(tagName, nodeClasses = []) {
97480
+ function singleChild(tagName, nodeClasses = [], dec) {
97225
97481
  return (targetClass, propName) => {
97226
- (0,_ClassMetadataAccess__WEBPACK_IMPORTED_MODULE_4__.setPropertyDeserializer)(targetClass, propName, new _Properties_SinglePropertyDeserializer__WEBPACK_IMPORTED_MODULE_7__.SinglePropertyDeserializer(propName.toString(), new _Properties_ValuesSources_SingleChildValueSource__WEBPACK_IMPORTED_MODULE_20__.SingleChildValueSource(tagName, nodeClasses)));
97482
+ (0,_ClassMetadataAccess__WEBPACK_IMPORTED_MODULE_4__.setPropertyDeserializer)(targetClass, propName, new _Properties_SinglePropertyDeserializer__WEBPACK_IMPORTED_MODULE_7__.SinglePropertyDeserializer(propName.toString(), new _Properties_ValuesSources_SingleChildValueSource__WEBPACK_IMPORTED_MODULE_20__.SingleChildValueSource(tagName, nodeClasses), dec));
97227
97483
  };
97228
97484
  }
97229
97485
  function attr(attrName, valueParser, dec) {