@swagger-api/apidom-ns-openapi-3-1 1.0.0-beta.32 → 1.0.0-beta.33

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.
@@ -345,6 +345,36 @@ class MediaTypeExamples extends _swagger_api_apidom_core__WEBPACK_IMPORTED_MODUL
345
345
 
346
346
  /***/ }),
347
347
 
348
+ /***/ 675:
349
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
350
+
351
+ "use strict";
352
+ __webpack_require__.r(__webpack_exports__);
353
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
354
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
355
+ /* harmony export */ });
356
+ /* harmony import */ var _JSONPointerEvaluateError_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(924);
357
+
358
+ class JSONPointerTypeError extends _JSONPointerEvaluateError_mjs__WEBPACK_IMPORTED_MODULE_0__["default"] {}
359
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (JSONPointerTypeError);
360
+
361
+ /***/ }),
362
+
363
+ /***/ 924:
364
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
365
+
366
+ "use strict";
367
+ __webpack_require__.r(__webpack_exports__);
368
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
369
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
370
+ /* harmony export */ });
371
+ /* harmony import */ var _JSONPointerError_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12008);
372
+
373
+ class JSONPointerEvaluateError extends _JSONPointerError_mjs__WEBPACK_IMPORTED_MODULE_0__["default"] {}
374
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (JSONPointerEvaluateError);
375
+
376
+ /***/ }),
377
+
348
378
  /***/ 1037:
349
379
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
350
380
 
@@ -1117,6 +1147,21 @@ var nodeUtil = (function() {
1117
1147
  module.exports = nodeUtil;
1118
1148
 
1119
1149
 
1150
+ /***/ }),
1151
+
1152
+ /***/ 2325:
1153
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
1154
+
1155
+ "use strict";
1156
+ __webpack_require__.r(__webpack_exports__);
1157
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1158
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1159
+ /* harmony export */ });
1160
+ /* harmony import */ var _JSONPointerEvaluateError_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(924);
1161
+
1162
+ class JSONPointerIndexError extends _JSONPointerEvaluateError_mjs__WEBPACK_IMPORTED_MODULE_0__["default"] {}
1163
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (JSONPointerIndexError);
1164
+
1120
1165
  /***/ }),
1121
1166
 
1122
1167
  /***/ 2459:
@@ -2036,6 +2081,32 @@ module.exports = function (argument, $default) {
2036
2081
  };
2037
2082
 
2038
2083
 
2084
+ /***/ }),
2085
+
2086
+ /***/ 4896:
2087
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
2088
+
2089
+ "use strict";
2090
+ __webpack_require__.r(__webpack_exports__);
2091
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2092
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
2093
+ /* harmony export */ });
2094
+ /* harmony import */ var apg_lite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(51751);
2095
+ /* harmony import */ var _grammar_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(36585);
2096
+
2097
+
2098
+ const grammar = new _grammar_mjs__WEBPACK_IMPORTED_MODULE_1__["default"]();
2099
+ const parser = new apg_lite__WEBPACK_IMPORTED_MODULE_0__.Parser();
2100
+ const testArrayLocation = referenceToken => {
2101
+ if (typeof referenceToken !== 'string') return false;
2102
+ try {
2103
+ return parser.parse(grammar, 'array-location', referenceToken).success;
2104
+ } catch {
2105
+ return false;
2106
+ }
2107
+ };
2108
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (testArrayLocation);
2109
+
2039
2110
  /***/ }),
2040
2111
 
2041
2112
  /***/ 4930:
@@ -2997,6 +3068,56 @@ class OpenApi3_0Visitor extends (0,ts_mixer__WEBPACK_IMPORTED_MODULE_0__.Mixin)(
2997
3068
 
2998
3069
  /***/ }),
2999
3070
 
3071
+ /***/ 8750:
3072
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
3073
+
3074
+ "use strict";
3075
+ __webpack_require__.r(__webpack_exports__);
3076
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3077
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
3078
+ /* harmony export */ });
3079
+ /* harmony import */ var apg_lite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(51751);
3080
+ /* harmony import */ var _grammar_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(36585);
3081
+ /* harmony import */ var _errors_JSONPointerParseError_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(26490);
3082
+ /* harmony import */ var _translators_ASTTranslator_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(23020);
3083
+ /* harmony import */ var _trace_Trace_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(17431);
3084
+
3085
+
3086
+
3087
+
3088
+
3089
+ const grammar = new _grammar_mjs__WEBPACK_IMPORTED_MODULE_4__["default"]();
3090
+ const parse = (jsonPointer, {
3091
+ translator = new _translators_ASTTranslator_mjs__WEBPACK_IMPORTED_MODULE_2__["default"](),
3092
+ stats = false,
3093
+ trace = false
3094
+ } = {}) => {
3095
+ if (typeof jsonPointer !== 'string') {
3096
+ throw new TypeError('JSON Pointer must be a string');
3097
+ }
3098
+ try {
3099
+ const parser = new apg_lite__WEBPACK_IMPORTED_MODULE_0__.Parser();
3100
+ if (translator) parser.ast = translator;
3101
+ if (stats) parser.stats = new apg_lite__WEBPACK_IMPORTED_MODULE_0__.Stats();
3102
+ if (trace) parser.trace = new _trace_Trace_mjs__WEBPACK_IMPORTED_MODULE_3__["default"]();
3103
+ const result = parser.parse(grammar, 'json-pointer', jsonPointer);
3104
+ return {
3105
+ result,
3106
+ tree: result.success && translator ? parser.ast.getTree() : undefined,
3107
+ stats: parser.stats,
3108
+ trace: parser.trace
3109
+ };
3110
+ } catch (error) {
3111
+ throw new _errors_JSONPointerParseError_mjs__WEBPACK_IMPORTED_MODULE_1__["default"]('Unexpected error during JSON Pointer parsing', {
3112
+ cause: error,
3113
+ jsonPointer
3114
+ });
3115
+ }
3116
+ };
3117
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (parse);
3118
+
3119
+ /***/ }),
3120
+
3000
3121
  /***/ 8867:
3001
3122
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
3002
3123
 
@@ -4314,6 +4435,57 @@ var isNull = (0,ramda__WEBPACK_IMPORTED_MODULE_0__["default"])(null);
4314
4435
 
4315
4436
  /***/ }),
4316
4437
 
4438
+ /***/ 12008:
4439
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
4440
+
4441
+ "use strict";
4442
+ __webpack_require__.r(__webpack_exports__);
4443
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4444
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
4445
+ /* harmony export */ });
4446
+ class JSONPointerError extends Error {
4447
+ constructor(message, options = undefined) {
4448
+ super(message, options);
4449
+ this.name = this.constructor.name;
4450
+ if (typeof message === 'string') {
4451
+ this.message = message;
4452
+ }
4453
+ if (typeof Error.captureStackTrace === 'function') {
4454
+ Error.captureStackTrace(this, this.constructor);
4455
+ } else {
4456
+ this.stack = new Error(message).stack;
4457
+ }
4458
+
4459
+ /**
4460
+ * This needs to stay here until our minimum supported version of Node.js is >= 16.9.0.
4461
+ * Node.js is >= 16.9.0 supports error causes natively.
4462
+ */
4463
+ if (options != null && typeof options === 'object' && Object.prototype.hasOwnProperty.call(options, 'cause') && !('cause' in this)) {
4464
+ const {
4465
+ cause
4466
+ } = options;
4467
+ this.cause = cause;
4468
+ if (cause instanceof Error && 'stack' in cause) {
4469
+ this.stack = `${this.stack}\nCAUSE: ${cause.stack}`;
4470
+ }
4471
+ }
4472
+
4473
+ /**
4474
+ * Allows to assign arbitrary properties to the error object.
4475
+ */
4476
+ if (options != null && typeof options === 'object') {
4477
+ const {
4478
+ cause,
4479
+ ...causelessOptions
4480
+ } = options;
4481
+ Object.assign(this, causelessOptions);
4482
+ }
4483
+ }
4484
+ }
4485
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (JSONPointerError);
4486
+
4487
+ /***/ }),
4488
+
4317
4489
  /***/ 12243:
4318
4490
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
4319
4491
 
@@ -6755,6 +6927,50 @@ visitor, {
6755
6927
 
6756
6928
  /***/ }),
6757
6929
 
6930
+ /***/ 17431:
6931
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
6932
+
6933
+ "use strict";
6934
+ __webpack_require__.r(__webpack_exports__);
6935
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
6936
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
6937
+ /* harmony export */ });
6938
+ /* harmony import */ var apg_lite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(51751);
6939
+ /* harmony import */ var _Expectations_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(83421);
6940
+
6941
+
6942
+ class Trace extends apg_lite__WEBPACK_IMPORTED_MODULE_0__.Trace {
6943
+ inferExpectations() {
6944
+ const lines = this.displayTrace().split('\n');
6945
+ const expectations = new Set();
6946
+ let collecting = false;
6947
+ let lastMatchedIndex = -1;
6948
+ for (let i = 0; i < lines.length; i++) {
6949
+ const line = lines[i];
6950
+
6951
+ // capture the max match line (first one that ends in a single character match)
6952
+ if (!collecting && line.includes('M|')) {
6953
+ const textMatch = line.match(/]'(.*)'$/);
6954
+ if (textMatch && textMatch[1]) {
6955
+ lastMatchedIndex = i;
6956
+ }
6957
+ }
6958
+
6959
+ // begin collecting after the deepest successful match
6960
+ if (i > lastMatchedIndex) {
6961
+ const terminalFailMatch = line.match(/N\|\[TLS\(([^)]+)\)]/);
6962
+ if (terminalFailMatch) {
6963
+ expectations.add(terminalFailMatch[1]);
6964
+ }
6965
+ }
6966
+ }
6967
+ return new _Expectations_mjs__WEBPACK_IMPORTED_MODULE_1__["default"](...expectations);
6968
+ }
6969
+ }
6970
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Trace);
6971
+
6972
+ /***/ }),
6973
+
6758
6974
  /***/ 17760:
6759
6975
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
6760
6976
 
@@ -7671,6 +7887,30 @@ function _functionName(f) {
7671
7887
 
7672
7888
  /***/ }),
7673
7889
 
7890
+ /***/ 20439:
7891
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
7892
+
7893
+ "use strict";
7894
+ __webpack_require__.r(__webpack_exports__);
7895
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
7896
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
7897
+ /* harmony export */ });
7898
+ /* harmony import */ var _parse_index_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8750);
7899
+
7900
+ const testJSONPointer = jsonPointer => {
7901
+ try {
7902
+ const parseResult = (0,_parse_index_mjs__WEBPACK_IMPORTED_MODULE_0__["default"])(jsonPointer, {
7903
+ translator: null
7904
+ });
7905
+ return parseResult.result.success;
7906
+ } catch {
7907
+ return false;
7908
+ }
7909
+ };
7910
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (testJSONPointer);
7911
+
7912
+ /***/ }),
7913
+
7674
7914
  /***/ 20746:
7675
7915
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
7676
7916
 
@@ -8228,6 +8468,32 @@ class LicenseVisitor extends BaseLicenseVisitor {
8228
8468
 
8229
8469
  /***/ }),
8230
8470
 
8471
+ /***/ 22587:
8472
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
8473
+
8474
+ "use strict";
8475
+ __webpack_require__.r(__webpack_exports__);
8476
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
8477
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
8478
+ /* harmony export */ });
8479
+ /* harmony import */ var apg_lite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(51751);
8480
+ /* harmony import */ var _grammar_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(36585);
8481
+
8482
+
8483
+ const grammar = new _grammar_mjs__WEBPACK_IMPORTED_MODULE_1__["default"]();
8484
+ const parser = new apg_lite__WEBPACK_IMPORTED_MODULE_0__.Parser();
8485
+ const testArrayIndex = referenceToken => {
8486
+ if (typeof referenceToken !== 'string') return false;
8487
+ try {
8488
+ return parser.parse(grammar, 'array-index', referenceToken).success;
8489
+ } catch {
8490
+ return false;
8491
+ }
8492
+ };
8493
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (testArrayIndex);
8494
+
8495
+ /***/ }),
8496
+
8231
8497
  /***/ 22824:
8232
8498
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
8233
8499
 
@@ -8598,6 +8864,34 @@ Object.defineProperty(Header.prototype, 'description', {
8598
8864
 
8599
8865
  /***/ }),
8600
8866
 
8867
+ /***/ 23020:
8868
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
8869
+
8870
+ "use strict";
8871
+ __webpack_require__.r(__webpack_exports__);
8872
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
8873
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
8874
+ /* harmony export */ });
8875
+ /* harmony import */ var _CSTTranslator_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92802);
8876
+ /* harmony import */ var _unescape_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(82182);
8877
+
8878
+
8879
+ class ASTTranslator extends _CSTTranslator_mjs__WEBPACK_IMPORTED_MODULE_0__["default"] {
8880
+ getTree() {
8881
+ const {
8882
+ root
8883
+ } = super.getTree();
8884
+ return root.children.filter(({
8885
+ type
8886
+ }) => type === 'reference-token').map(({
8887
+ text
8888
+ }) => (0,_unescape_mjs__WEBPACK_IMPORTED_MODULE_1__["default"])(text));
8889
+ }
8890
+ }
8891
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ASTTranslator);
8892
+
8893
+ /***/ }),
8894
+
8601
8895
  /***/ 23031:
8602
8896
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
8603
8897
 
@@ -9836,6 +10130,21 @@ class PatternPropertiesVisitor extends _swagger_api_apidom_ns_json_schema_2020_1
9836
10130
 
9837
10131
  /***/ }),
9838
10132
 
10133
+ /***/ 26490:
10134
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
10135
+
10136
+ "use strict";
10137
+ __webpack_require__.r(__webpack_exports__);
10138
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
10139
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
10140
+ /* harmony export */ });
10141
+ /* harmony import */ var _JSONPointerError_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12008);
10142
+
10143
+ class JSONPointerParseError extends _JSONPointerError_mjs__WEBPACK_IMPORTED_MODULE_0__["default"] {}
10144
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (JSONPointerParseError);
10145
+
10146
+ /***/ }),
10147
+
9839
10148
  /***/ 26517:
9840
10149
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
9841
10150
 
@@ -9982,6 +10291,24 @@ Object.defineProperty(Reference.prototype, 'summary', {
9982
10291
 
9983
10292
  /***/ }),
9984
10293
 
10294
+ /***/ 27123:
10295
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
10296
+
10297
+ "use strict";
10298
+ __webpack_require__.r(__webpack_exports__);
10299
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
10300
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
10301
+ /* harmony export */ });
10302
+ const escape = referenceToken => {
10303
+ if (typeof referenceToken !== 'string' && typeof referenceToken !== 'number') {
10304
+ throw new TypeError('Reference token must be a string or number');
10305
+ }
10306
+ return String(referenceToken).replace(/~/g, '~0').replace(/\//g, '~1');
10307
+ };
10308
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (escape);
10309
+
10310
+ /***/ }),
10311
+
9985
10312
  /***/ 27488:
9986
10313
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
9987
10314
 
@@ -14159,6 +14486,266 @@ const createRefractor = specPath => (value, options = {}) => refract(value, {
14159
14486
 
14160
14487
  /***/ }),
14161
14488
 
14489
+ /***/ 36585:
14490
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
14491
+
14492
+ "use strict";
14493
+ __webpack_require__.r(__webpack_exports__);
14494
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
14495
+ /* harmony export */ "default": () => (/* binding */ grammar)
14496
+ /* harmony export */ });
14497
+ // copyright: Copyright (c) 2024 Lowell D. Thomas, all rights reserved<br>
14498
+ // license: BSD-2-Clause (https://opensource.org/licenses/BSD-2-Clause)<br>
14499
+ //
14500
+ // Generated by apg-js, Version 4.4.0 [apg-js](https://github.com/ldthomas/apg-js)
14501
+ function grammar() {
14502
+ // ```
14503
+ // SUMMARY
14504
+ // rules = 8
14505
+ // udts = 0
14506
+ // opcodes = 28
14507
+ // --- ABNF original opcodes
14508
+ // ALT = 5
14509
+ // CAT = 3
14510
+ // REP = 3
14511
+ // RNM = 6
14512
+ // TLS = 5
14513
+ // TBS = 1
14514
+ // TRG = 5
14515
+ // --- SABNF superset opcodes
14516
+ // UDT = 0
14517
+ // AND = 0
14518
+ // NOT = 0
14519
+ // characters = [0 - 1114111]
14520
+ // ```
14521
+ /* OBJECT IDENTIFIER (for internal parser use) */
14522
+ this.grammarObject = 'grammarObject';
14523
+
14524
+ /* RULES */
14525
+ this.rules = [];
14526
+ this.rules[0] = {
14527
+ name: 'json-pointer',
14528
+ lower: 'json-pointer',
14529
+ index: 0,
14530
+ isBkr: false
14531
+ };
14532
+ this.rules[1] = {
14533
+ name: 'reference-token',
14534
+ lower: 'reference-token',
14535
+ index: 1,
14536
+ isBkr: false
14537
+ };
14538
+ this.rules[2] = {
14539
+ name: 'unescaped',
14540
+ lower: 'unescaped',
14541
+ index: 2,
14542
+ isBkr: false
14543
+ };
14544
+ this.rules[3] = {
14545
+ name: 'escaped',
14546
+ lower: 'escaped',
14547
+ index: 3,
14548
+ isBkr: false
14549
+ };
14550
+ this.rules[4] = {
14551
+ name: 'array-location',
14552
+ lower: 'array-location',
14553
+ index: 4,
14554
+ isBkr: false
14555
+ };
14556
+ this.rules[5] = {
14557
+ name: 'array-index',
14558
+ lower: 'array-index',
14559
+ index: 5,
14560
+ isBkr: false
14561
+ };
14562
+ this.rules[6] = {
14563
+ name: 'array-dash',
14564
+ lower: 'array-dash',
14565
+ index: 6,
14566
+ isBkr: false
14567
+ };
14568
+ this.rules[7] = {
14569
+ name: 'slash',
14570
+ lower: 'slash',
14571
+ index: 7,
14572
+ isBkr: false
14573
+ };
14574
+
14575
+ /* UDTS */
14576
+ this.udts = [];
14577
+
14578
+ /* OPCODES */
14579
+ /* json-pointer */
14580
+ this.rules[0].opcodes = [];
14581
+ this.rules[0].opcodes[0] = {
14582
+ type: 3,
14583
+ min: 0,
14584
+ max: Infinity
14585
+ }; // REP
14586
+ this.rules[0].opcodes[1] = {
14587
+ type: 2,
14588
+ children: [2, 3]
14589
+ }; // CAT
14590
+ this.rules[0].opcodes[2] = {
14591
+ type: 4,
14592
+ index: 7
14593
+ }; // RNM(slash)
14594
+ this.rules[0].opcodes[3] = {
14595
+ type: 4,
14596
+ index: 1
14597
+ }; // RNM(reference-token)
14598
+
14599
+ /* reference-token */
14600
+ this.rules[1].opcodes = [];
14601
+ this.rules[1].opcodes[0] = {
14602
+ type: 3,
14603
+ min: 0,
14604
+ max: Infinity
14605
+ }; // REP
14606
+ this.rules[1].opcodes[1] = {
14607
+ type: 1,
14608
+ children: [2, 3]
14609
+ }; // ALT
14610
+ this.rules[1].opcodes[2] = {
14611
+ type: 4,
14612
+ index: 2
14613
+ }; // RNM(unescaped)
14614
+ this.rules[1].opcodes[3] = {
14615
+ type: 4,
14616
+ index: 3
14617
+ }; // RNM(escaped)
14618
+
14619
+ /* unescaped */
14620
+ this.rules[2].opcodes = [];
14621
+ this.rules[2].opcodes[0] = {
14622
+ type: 1,
14623
+ children: [1, 2, 3]
14624
+ }; // ALT
14625
+ this.rules[2].opcodes[1] = {
14626
+ type: 5,
14627
+ min: 0,
14628
+ max: 46
14629
+ }; // TRG
14630
+ this.rules[2].opcodes[2] = {
14631
+ type: 5,
14632
+ min: 48,
14633
+ max: 125
14634
+ }; // TRG
14635
+ this.rules[2].opcodes[3] = {
14636
+ type: 5,
14637
+ min: 127,
14638
+ max: 1114111
14639
+ }; // TRG
14640
+
14641
+ /* escaped */
14642
+ this.rules[3].opcodes = [];
14643
+ this.rules[3].opcodes[0] = {
14644
+ type: 2,
14645
+ children: [1, 2]
14646
+ }; // CAT
14647
+ this.rules[3].opcodes[1] = {
14648
+ type: 7,
14649
+ string: [126]
14650
+ }; // TLS
14651
+ this.rules[3].opcodes[2] = {
14652
+ type: 1,
14653
+ children: [3, 4]
14654
+ }; // ALT
14655
+ this.rules[3].opcodes[3] = {
14656
+ type: 7,
14657
+ string: [48]
14658
+ }; // TLS
14659
+ this.rules[3].opcodes[4] = {
14660
+ type: 7,
14661
+ string: [49]
14662
+ }; // TLS
14663
+
14664
+ /* array-location */
14665
+ this.rules[4].opcodes = [];
14666
+ this.rules[4].opcodes[0] = {
14667
+ type: 1,
14668
+ children: [1, 2]
14669
+ }; // ALT
14670
+ this.rules[4].opcodes[1] = {
14671
+ type: 4,
14672
+ index: 5
14673
+ }; // RNM(array-index)
14674
+ this.rules[4].opcodes[2] = {
14675
+ type: 4,
14676
+ index: 6
14677
+ }; // RNM(array-dash)
14678
+
14679
+ /* array-index */
14680
+ this.rules[5].opcodes = [];
14681
+ this.rules[5].opcodes[0] = {
14682
+ type: 1,
14683
+ children: [1, 2]
14684
+ }; // ALT
14685
+ this.rules[5].opcodes[1] = {
14686
+ type: 6,
14687
+ string: [48]
14688
+ }; // TBS
14689
+ this.rules[5].opcodes[2] = {
14690
+ type: 2,
14691
+ children: [3, 4]
14692
+ }; // CAT
14693
+ this.rules[5].opcodes[3] = {
14694
+ type: 5,
14695
+ min: 49,
14696
+ max: 57
14697
+ }; // TRG
14698
+ this.rules[5].opcodes[4] = {
14699
+ type: 3,
14700
+ min: 0,
14701
+ max: Infinity
14702
+ }; // REP
14703
+ this.rules[5].opcodes[5] = {
14704
+ type: 5,
14705
+ min: 48,
14706
+ max: 57
14707
+ }; // TRG
14708
+
14709
+ /* array-dash */
14710
+ this.rules[6].opcodes = [];
14711
+ this.rules[6].opcodes[0] = {
14712
+ type: 7,
14713
+ string: [45]
14714
+ }; // TLS
14715
+
14716
+ /* slash */
14717
+ this.rules[7].opcodes = [];
14718
+ this.rules[7].opcodes[0] = {
14719
+ type: 7,
14720
+ string: [47]
14721
+ }; // TLS
14722
+
14723
+ // The `toString()` function will display the original grammar file(s) that produced these opcodes.
14724
+ this.toString = function toString() {
14725
+ let str = "";
14726
+ str += "; JavaScript Object Notation (JSON) Pointer ABNF syntax\n";
14727
+ str += "; https://datatracker.ietf.org/doc/html/rfc6901\n";
14728
+ str += "json-pointer = *( slash reference-token ) ; MODIFICATION: surrogate text rule used\n";
14729
+ str += "reference-token = *( unescaped / escaped )\n";
14730
+ str += "unescaped = %x00-2E / %x30-7D / %x7F-10FFFF\n";
14731
+ str += " ; %x2F ('/') and %x7E ('~') are excluded from 'unescaped'\n";
14732
+ str += "escaped = \"~\" ( \"0\" / \"1\" )\n";
14733
+ str += " ; representing '~' and '/', respectively\n";
14734
+ str += "\n";
14735
+ str += "; https://datatracker.ietf.org/doc/html/rfc6901#section-4\n";
14736
+ str += "array-location = array-index / array-dash\n";
14737
+ str += "array-index = %x30 / ( %x31-39 *(%x30-39) )\n";
14738
+ str += " ; \"0\", or digits without a leading \"0\"\n";
14739
+ str += "array-dash = \"-\"\n";
14740
+ str += "\n";
14741
+ str += "; Surrogate named rules\n";
14742
+ str += "slash = \"/\"\n";
14743
+ return str;
14744
+ };
14745
+ }
14746
+
14747
+ /***/ }),
14748
+
14162
14749
  /***/ 36882:
14163
14750
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
14164
14751
 
@@ -14827,6 +15414,64 @@ class InfoVisitor extends (0,ts_mixer__WEBPACK_IMPORTED_MODULE_0__.Mixin)(_gener
14827
15414
 
14828
15415
  /***/ }),
14829
15416
 
15417
+ /***/ 39150:
15418
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
15419
+
15420
+ "use strict";
15421
+ __webpack_require__.r(__webpack_exports__);
15422
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
15423
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
15424
+ /* harmony export */ });
15425
+ /* harmony import */ var _EvaluationRealm_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(59408);
15426
+ /* harmony import */ var _errors_JSONPointerIndexError_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2325);
15427
+
15428
+
15429
+ class JSONEvaluationRealm extends _EvaluationRealm_mjs__WEBPACK_IMPORTED_MODULE_0__["default"] {
15430
+ name = 'json';
15431
+ isArray(node) {
15432
+ return Array.isArray(node);
15433
+ }
15434
+ isObject(node) {
15435
+ return typeof node === 'object' && node !== null && !this.isArray(node);
15436
+ }
15437
+ sizeOf(node) {
15438
+ if (this.isArray(node)) {
15439
+ return node.length;
15440
+ }
15441
+ if (this.isObject(node)) {
15442
+ return Object.keys(node).length;
15443
+ }
15444
+ return 0;
15445
+ }
15446
+ has(node, referenceToken) {
15447
+ if (this.isArray(node)) {
15448
+ const index = Number(referenceToken);
15449
+ const indexUint32 = index >>> 0;
15450
+ if (index !== indexUint32) {
15451
+ throw new _errors_JSONPointerIndexError_mjs__WEBPACK_IMPORTED_MODULE_1__["default"](`Invalid array index "${referenceToken}": index must be an unsinged 32-bit integer`, {
15452
+ referenceToken,
15453
+ currentValue: node,
15454
+ realm: this.name
15455
+ });
15456
+ }
15457
+ return indexUint32 < this.sizeOf(node);
15458
+ }
15459
+ if (this.isObject(node)) {
15460
+ return Object.prototype.hasOwnProperty.call(node, referenceToken);
15461
+ }
15462
+ return false;
15463
+ }
15464
+ evaluate(node, referenceToken) {
15465
+ if (this.isArray(node)) {
15466
+ return node[Number(referenceToken)];
15467
+ }
15468
+ return node[referenceToken];
15469
+ }
15470
+ }
15471
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (JSONEvaluationRealm);
15472
+
15473
+ /***/ }),
15474
+
14830
15475
  /***/ 39361:
14831
15476
  /***/ ((module) => {
14832
15477
 
@@ -15604,6 +16249,21 @@ class Server extends _swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_0__.Objec
15604
16249
 
15605
16250
  /***/ }),
15606
16251
 
16252
+ /***/ 42144:
16253
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
16254
+
16255
+ "use strict";
16256
+ __webpack_require__.r(__webpack_exports__);
16257
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
16258
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
16259
+ /* harmony export */ });
16260
+ /* harmony import */ var _JSONPointerError_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12008);
16261
+
16262
+ class JSONPointerCompileError extends _JSONPointerError_mjs__WEBPACK_IMPORTED_MODULE_0__["default"] {}
16263
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (JSONPointerCompileError);
16264
+
16265
+ /***/ }),
16266
+
15607
16267
  /***/ 42466:
15608
16268
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
15609
16269
 
@@ -18430,6 +19090,1256 @@ Stack.prototype.set = stackSet;
18430
19090
  module.exports = Stack;
18431
19091
 
18432
19092
 
19093
+ /***/ }),
19094
+
19095
+ /***/ 51751:
19096
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
19097
+
19098
+ "use strict";
19099
+ __webpack_require__.r(__webpack_exports__);
19100
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
19101
+ /* harmony export */ Ast: () => (/* binding */ Ast),
19102
+ /* harmony export */ Parser: () => (/* binding */ Parser),
19103
+ /* harmony export */ Stats: () => (/* binding */ Stats),
19104
+ /* harmony export */ Trace: () => (/* binding */ Trace),
19105
+ /* harmony export */ identifiers: () => (/* binding */ identifiers),
19106
+ /* harmony export */ utilities: () => (/* binding */ utilities)
19107
+ /* harmony export */ });
19108
+ /* *************************************************************************************
19109
+ * copyright: Copyright (c) 2023 Lowell D. Thomas, all rights reserved
19110
+ * license: BSD-2-Clause (https://opensource.org/licenses/BSD-2-Clause)
19111
+ *
19112
+ * Redistribution and use in source and binary forms, with or without
19113
+ * modification, are permitted provided that the following conditions are met:
19114
+ *
19115
+ * 1. Redistributions of source code must retain the above copyright notice, this
19116
+ * list of conditions and the following disclaimer.
19117
+ *
19118
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
19119
+ * this list of conditions and the following disclaimer in the documentation
19120
+ * and/or other materials provided with the distribution.
19121
+ *
19122
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19123
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19124
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19125
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
19126
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19127
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
19128
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
19129
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
19130
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
19131
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
19132
+ *
19133
+ * ********************************************************************************* */
19134
+
19135
+
19136
+ const Parser = function fnparser() {
19137
+ const id = identifiers;
19138
+ const utils = utilities;
19139
+ const p = this;
19140
+ const thisFileName = 'parser.js: Parser(): ';
19141
+ const systemData = function systemData() {
19142
+ this.state = id.ACTIVE;
19143
+ this.phraseLength = 0;
19144
+ this.refresh = () => {
19145
+ this.state = id.ACTIVE;
19146
+ this.phraseLength = 0;
19147
+ };
19148
+ };
19149
+ p.ast = undefined;
19150
+ p.stats = undefined;
19151
+ p.trace = undefined;
19152
+ p.callbacks = [];
19153
+ let lookAhead = 0;
19154
+ let treeDepth = 0;
19155
+ let maxTreeDepth = 0;
19156
+ let nodeHits = 0;
19157
+ let maxMatched = 0;
19158
+ let rules = undefined;
19159
+ let udts = undefined;
19160
+ let opcodes = undefined;
19161
+ let chars = undefined;
19162
+ let sysData = new systemData();
19163
+ let ruleCallbacks = undefined;
19164
+ let udtCallbacks = undefined;
19165
+ let userData = undefined;
19166
+ const clear = () => {
19167
+ lookAhead = 0;
19168
+ treeDepth = 0;
19169
+ maxTreeDepth = 0;
19170
+ nodeHits = 0;
19171
+ maxMatched = 0;
19172
+ rules = undefined;
19173
+ udts = undefined;
19174
+ opcodes = undefined;
19175
+ chars = undefined;
19176
+ sysData.refresh();
19177
+ ruleCallbacks = undefined;
19178
+ udtCallbacks = undefined;
19179
+ userData = undefined;
19180
+ };
19181
+
19182
+ const initializeCallbacks = () => {
19183
+ const functionName = `${thisFileName}initializeCallbacks(): `;
19184
+ let i;
19185
+ ruleCallbacks = [];
19186
+ udtCallbacks = [];
19187
+ for (i = 0; i < rules.length; i += 1) {
19188
+ ruleCallbacks[i] = undefined;
19189
+ }
19190
+ for (i = 0; i < udts.length; i += 1) {
19191
+ udtCallbacks[i] = undefined;
19192
+ }
19193
+ let func;
19194
+ const list = [];
19195
+ for (i = 0; i < rules.length; i += 1) {
19196
+ list.push(rules[i].lower);
19197
+ }
19198
+ for (i = 0; i < udts.length; i += 1) {
19199
+ list.push(udts[i].lower);
19200
+ }
19201
+ for (const index in p.callbacks) {
19202
+ if (p.callbacks.hasOwnProperty(index)) {
19203
+ i = list.indexOf(index.toLowerCase());
19204
+ if (i < 0) {
19205
+ throw new Error(`${functionName}syntax callback '${index}' not a rule or udt name`);
19206
+ }
19207
+ func = p.callbacks[index] ? p.callbacks[index] : undefined;
19208
+ if (typeof func === 'function' || func === undefined) {
19209
+ if (i < rules.length) {
19210
+ ruleCallbacks[i] = func;
19211
+ } else {
19212
+ udtCallbacks[i - rules.length] = func;
19213
+ }
19214
+ } else {
19215
+ throw new Error(`${functionName}syntax callback[${index}] must be function reference or falsy)`);
19216
+ }
19217
+ }
19218
+ }
19219
+ };
19220
+
19221
+ p.parse = (grammar, startName, inputString, callbackData) => {
19222
+ const functionName = `${thisFileName}parse(): `;
19223
+ clear();
19224
+ chars = utils.stringToChars(inputString);
19225
+ rules = grammar.rules;
19226
+ udts = grammar.udts;
19227
+ const lower = startName.toLowerCase();
19228
+ let startIndex = undefined;
19229
+ for (const i in rules) {
19230
+ if (rules.hasOwnProperty(i)) {
19231
+ if (lower === rules[i].lower) {
19232
+ startIndex = rules[i].index;
19233
+ break;
19234
+ }
19235
+ }
19236
+ }
19237
+ if (startIndex === undefined) {
19238
+ throw new Error(`${functionName}start rule name '${startRule}' not recognized`);
19239
+ }
19240
+ initializeCallbacks();
19241
+ if (p.trace) {
19242
+ p.trace.init(rules, udts, chars);
19243
+ }
19244
+ if (p.stats) {
19245
+ p.stats.init(rules, udts);
19246
+ }
19247
+ if (p.ast) {
19248
+ p.ast.init(rules, udts, chars);
19249
+ }
19250
+ userData = callbackData;
19251
+ /* create a dummy opcode for the start rule */
19252
+ opcodes = [
19253
+ {
19254
+ type: id.RNM,
19255
+ index: startIndex,
19256
+ },
19257
+ ];
19258
+ /* execute the start rule */
19259
+ opExecute(0, 0);
19260
+ opcodes = undefined;
19261
+ /* test and return the sysData */
19262
+ let success = false;
19263
+ switch (sysData.state) {
19264
+ case id.ACTIVE:
19265
+ throw new Error(`${functionName}final state should never be 'ACTIVE'`);
19266
+ case id.NOMATCH:
19267
+ success = false;
19268
+ break;
19269
+ case id.EMPTY:
19270
+ case id.MATCH:
19271
+ if (sysData.phraseLength === chars.length) {
19272
+ success = true;
19273
+ } else {
19274
+ success = false;
19275
+ }
19276
+ break;
19277
+ default:
19278
+ throw new Error('unrecognized state');
19279
+ }
19280
+ return {
19281
+ success,
19282
+ state: sysData.state,
19283
+ stateName: id.idName(sysData.state),
19284
+ length: chars.length,
19285
+ matched: sysData.phraseLength,
19286
+ maxMatched,
19287
+ maxTreeDepth,
19288
+ nodeHits,
19289
+ };
19290
+ };
19291
+ // The `ALT` operator.<br>
19292
+ // Executes its child nodes, from left to right, until it finds a match.
19293
+ // Fails if *all* of its child nodes fail.
19294
+ const opALT = (opIndex, phraseIndex) => {
19295
+ const op = opcodes[opIndex];
19296
+ for (let i = 0; i < op.children.length; i += 1) {
19297
+ opExecute(op.children[i], phraseIndex);
19298
+ if (sysData.state !== id.NOMATCH) {
19299
+ break;
19300
+ }
19301
+ }
19302
+ };
19303
+ // The `CAT` operator.<br>
19304
+ // Executes all of its child nodes, from left to right,
19305
+ // concatenating the matched phrases.
19306
+ // Fails if *any* child nodes fail.
19307
+ const opCAT = (opIndex, phraseIndex) => {
19308
+ let success;
19309
+ let astLength;
19310
+ let catCharIndex;
19311
+ let catPhrase;
19312
+ const op = opcodes[opIndex];
19313
+ if (p.ast) {
19314
+ astLength = p.ast.getLength();
19315
+ }
19316
+ success = true;
19317
+ catCharIndex = phraseIndex;
19318
+ catPhrase = 0;
19319
+ for (let i = 0; i < op.children.length; i += 1) {
19320
+ opExecute(op.children[i], catCharIndex);
19321
+ if (sysData.state === id.NOMATCH) {
19322
+ success = false;
19323
+ break;
19324
+ } else {
19325
+ catCharIndex += sysData.phraseLength;
19326
+ catPhrase += sysData.phraseLength;
19327
+ }
19328
+ }
19329
+ if (success) {
19330
+ sysData.state = catPhrase === 0 ? id.EMPTY : id.MATCH;
19331
+ sysData.phraseLength = catPhrase;
19332
+ } else {
19333
+ sysData.state = id.NOMATCH;
19334
+ sysData.phraseLength = 0;
19335
+ if (p.ast) {
19336
+ p.ast.setLength(astLength);
19337
+ }
19338
+ }
19339
+ };
19340
+ // The `REP` operator.<br>
19341
+ // Repeatedly executes its single child node,
19342
+ // concatenating each of the matched phrases found.
19343
+ // The number of repetitions executed and its final sysData depends
19344
+ // on its `min` & `max` repetition values.
19345
+ const opREP = (opIndex, phraseIndex) => {
19346
+ let astLength;
19347
+ let repCharIndex;
19348
+ let repPhrase;
19349
+ let repCount;
19350
+ const op = opcodes[opIndex];
19351
+ if (op.max === 0) {
19352
+ // this is an empty-string acceptor
19353
+ // deprecated: use the TLS empty string operator, "", instead
19354
+ sysData.state = id.EMPTY;
19355
+ sysData.phraseLength = 0;
19356
+ return;
19357
+ }
19358
+ repCharIndex = phraseIndex;
19359
+ repPhrase = 0;
19360
+ repCount = 0;
19361
+ if (p.ast) {
19362
+ astLength = p.ast.getLength();
19363
+ }
19364
+ while (1) {
19365
+ if (repCharIndex >= chars.length) {
19366
+ /* exit on end of input string */
19367
+ break;
19368
+ }
19369
+ opExecute(opIndex + 1, repCharIndex);
19370
+ if (sysData.state === id.NOMATCH) {
19371
+ /* always end if the child node fails */
19372
+ break;
19373
+ }
19374
+ if (sysData.state === id.EMPTY) {
19375
+ /* REP always succeeds when the child node returns an empty phrase */
19376
+ /* this may not seem obvious, but that's the way it works out */
19377
+ break;
19378
+ }
19379
+ repCount += 1;
19380
+ repPhrase += sysData.phraseLength;
19381
+ repCharIndex += sysData.phraseLength;
19382
+ if (repCount === op.max) {
19383
+ /* end on maxed out reps */
19384
+ break;
19385
+ }
19386
+ }
19387
+ /* evaluate the match count according to the min, max values */
19388
+ if (sysData.state === id.EMPTY) {
19389
+ sysData.state = repPhrase === 0 ? id.EMPTY : id.MATCH;
19390
+ sysData.phraseLength = repPhrase;
19391
+ } else if (repCount >= op.min) {
19392
+ sysData.state = repPhrase === 0 ? id.EMPTY : id.MATCH;
19393
+ sysData.phraseLength = repPhrase;
19394
+ } else {
19395
+ sysData.state = id.NOMATCH;
19396
+ sysData.phraseLength = 0;
19397
+ if (p.ast) {
19398
+ p.ast.setLength(astLength);
19399
+ }
19400
+ }
19401
+ };
19402
+ // Validate the callback function's returned sysData values.
19403
+ // It's the user's responsibility to get them right
19404
+ // but `RNM` fails if not.
19405
+ const validateRnmCallbackResult = (rule, sysData, charsLeft, down) => {
19406
+ if (sysData.phraseLength > charsLeft) {
19407
+ let str = `${thisFileName}opRNM(${rule.name}): callback function error: `;
19408
+ str += `sysData.phraseLength: ${sysData.phraseLength}`;
19409
+ str += ` must be <= remaining chars: ${charsLeft}`;
19410
+ throw new Error(str);
19411
+ }
19412
+ switch (sysData.state) {
19413
+ case id.ACTIVE:
19414
+ if (!down) {
19415
+ throw new Error(
19416
+ `${thisFileName}opRNM(${rule.name}): callback function return error. ACTIVE state not allowed.`
19417
+ );
19418
+ }
19419
+ break;
19420
+ case id.EMPTY:
19421
+ sysData.phraseLength = 0;
19422
+ break;
19423
+ case id.MATCH:
19424
+ if (sysData.phraseLength === 0) {
19425
+ sysData.state = id.EMPTY;
19426
+ }
19427
+ break;
19428
+ case id.NOMATCH:
19429
+ sysData.phraseLength = 0;
19430
+ break;
19431
+ default:
19432
+ throw new Error(
19433
+ `${thisFileName}opRNM(${rule.name}): callback function return error. Unrecognized return state: ${sysData.state}`
19434
+ );
19435
+ }
19436
+ };
19437
+ // The `RNM` operator.<br>
19438
+ // This operator will acts as a root node for a parse tree branch below and
19439
+ // returns the matched phrase to its parent.
19440
+ // However, its larger responsibility is handling user-defined callback functions and `AST` nodes.
19441
+ // Note that the `AST` is a separate object, but `RNM` calls its functions to create its nodes.
19442
+ const opRNM = (opIndex, phraseIndex) => {
19443
+ let astLength;
19444
+ let astDefined;
19445
+ let savedOpcodes;
19446
+ const op = opcodes[opIndex];
19447
+ const rule = rules[op.index];
19448
+ const callback = ruleCallbacks[rule.index];
19449
+ /* ignore AST in look ahead (AND or NOT operator above) */
19450
+ if (!lookAhead) {
19451
+ astDefined = p.ast && p.ast.ruleDefined(op.index);
19452
+ if (astDefined) {
19453
+ astLength = p.ast.getLength();
19454
+ p.ast.down(op.index, rules[op.index].name);
19455
+ }
19456
+ }
19457
+ if (callback) {
19458
+ /* call user's callback going down the parse tree*/
19459
+ const charsLeft = chars.length - phraseIndex;
19460
+ callback(sysData, chars, phraseIndex, userData);
19461
+ validateRnmCallbackResult(rule, sysData, charsLeft, true);
19462
+ if (sysData.state === id.ACTIVE) {
19463
+ savedOpcodes = opcodes;
19464
+ opcodes = rule.opcodes;
19465
+ opExecute(0, phraseIndex);
19466
+ opcodes = savedOpcodes;
19467
+ /* call user's callback going up the parse tree*/
19468
+ callback(sysData, chars, phraseIndex, userData);
19469
+ validateRnmCallbackResult(rule, sysData, charsLeft, false);
19470
+ } /* implied else clause: just accept the callback sysData - RNM acting as UDT */
19471
+ } else {
19472
+ /* no callback - just execute the rule */
19473
+ savedOpcodes = opcodes;
19474
+ opcodes = rule.opcodes;
19475
+ opExecute(0, phraseIndex, sysData);
19476
+ opcodes = savedOpcodes;
19477
+ }
19478
+ if (!lookAhead) {
19479
+ /* end AST */
19480
+ if (astDefined) {
19481
+ if (sysData.state === id.NOMATCH) {
19482
+ p.ast.setLength(astLength);
19483
+ } else {
19484
+ p.ast.up(op.index, rule.name, phraseIndex, sysData.phraseLength);
19485
+ }
19486
+ }
19487
+ }
19488
+ };
19489
+ // The `TRG` operator.<br>
19490
+ // Succeeds if the single first character of the phrase is
19491
+ // within the `min - max` range.
19492
+ const opTRG = (opIndex, phraseIndex) => {
19493
+ const op = opcodes[opIndex];
19494
+ sysData.state = id.NOMATCH;
19495
+ if (phraseIndex < chars.length) {
19496
+ if (op.min <= chars[phraseIndex] && chars[phraseIndex] <= op.max) {
19497
+ sysData.state = id.MATCH;
19498
+ sysData.phraseLength = 1;
19499
+ }
19500
+ }
19501
+ };
19502
+ // The `TBS` operator.<br>
19503
+ // Matches its pre-defined phrase against the input string.
19504
+ // All characters must match exactly.
19505
+ // Case-sensitive literal strings (`'string'` & `%s"string"`) are translated to `TBS`
19506
+ // operators by `apg`.
19507
+ // Phrase length of zero is not allowed.
19508
+ // Empty phrases can only be defined with `TLS` operators.
19509
+ const opTBS = (opIndex, phraseIndex) => {
19510
+ const op = opcodes[opIndex];
19511
+ const len = op.string.length;
19512
+ sysData.state = id.NOMATCH;
19513
+ if (phraseIndex + len <= chars.length) {
19514
+ for (let i = 0; i < len; i += 1) {
19515
+ if (chars[phraseIndex + i] !== op.string[i]) {
19516
+ return;
19517
+ }
19518
+ }
19519
+ sysData.state = id.MATCH;
19520
+ sysData.phraseLength = len;
19521
+ } /* implied else NOMATCH */
19522
+ };
19523
+ // The `TLS` operator.<br>
19524
+ // Matches its pre-defined phrase against the input string.
19525
+ // A case-insensitive match is attempted for ASCII alphbetical characters.
19526
+ // `TLS` is the only operator that explicitly allows empty phrases.
19527
+ // `apg` will fail for empty `TBS`, case-sensitive strings (`''`) or
19528
+ // zero repetitions (`0*0RuleName` or `0RuleName`).
19529
+ const opTLS = (opIndex, phraseIndex) => {
19530
+ let code;
19531
+ const op = opcodes[opIndex];
19532
+ sysData.state = id.NOMATCH;
19533
+ const len = op.string.length;
19534
+ if (len === 0) {
19535
+ /* EMPTY match allowed for TLS */
19536
+ sysData.state = id.EMPTY;
19537
+ return;
19538
+ }
19539
+ if (phraseIndex + len <= chars.length) {
19540
+ for (let i = 0; i < len; i += 1) {
19541
+ code = chars[phraseIndex + i];
19542
+ if (code >= 65 && code <= 90) {
19543
+ code += 32;
19544
+ }
19545
+ if (code !== op.string[i]) {
19546
+ return;
19547
+ }
19548
+ }
19549
+ sysData.state = id.MATCH;
19550
+ sysData.phraseLength = len;
19551
+ } /* implied else NOMATCH */
19552
+ };
19553
+ // Validate the callback function's returned sysData values.
19554
+ // It's the user's responsibility to get it right but `UDT` fails if not.
19555
+ const validateUdtCallbackResult = (udt, sysData, charsLeft) => {
19556
+ if (sysData.phraseLength > charsLeft) {
19557
+ let str = `${thisFileName}opUDT(${udt.name}): callback function error: `;
19558
+ str += `sysData.phraseLength: ${sysData.phraseLength}`;
19559
+ str += ` must be <= remaining chars: ${charsLeft}`;
19560
+ throw new Error(str);
19561
+ }
19562
+ switch (sysData.state) {
19563
+ case id.ACTIVE:
19564
+ throw new Error(`${thisFileName}opUDT(${udt.name}) ACTIVE state return not allowed.`);
19565
+ case id.EMPTY:
19566
+ if (udt.empty) {
19567
+ sysData.phraseLength = 0;
19568
+ } else {
19569
+ throw new Error(`${thisFileName}opUDT(${udt.name}) may not return EMPTY.`);
19570
+ }
19571
+ break;
19572
+ case id.MATCH:
19573
+ if (sysData.phraseLength === 0) {
19574
+ if (udt.empty) {
19575
+ sysData.state = id.EMPTY;
19576
+ } else {
19577
+ throw new Error(`${thisFileName}opUDT(${udt.name}) may not return EMPTY.`);
19578
+ }
19579
+ }
19580
+ break;
19581
+ case id.NOMATCH:
19582
+ sysData.phraseLength = 0;
19583
+ break;
19584
+ default:
19585
+ throw new Error(
19586
+ `${thisFileName}opUDT(${udt.name}): callback function return error. Unrecognized return state: ${sysData.state}`
19587
+ );
19588
+ }
19589
+ };
19590
+ // The `UDT` operator.<br>
19591
+ // Simply calls the user's callback function, but operates like `RNM` with regard to the `AST`
19592
+ // and back referencing.
19593
+ // There is some ambiguity here. `UDT`s act as terminals for phrase recognition but as named rules
19594
+ // for `AST` nodes and back referencing.
19595
+ // See [`ast.js`](./ast.html) for usage.
19596
+ const opUDT = (opIndex, phraseIndex) => {
19597
+ let astLength;
19598
+ let astIndex;
19599
+ let astDefined;
19600
+ const op = opcodes[opIndex];
19601
+ const udt = udts[op.index];
19602
+ sysData.UdtIndex = udt.index;
19603
+ /* ignore AST in look ahead */
19604
+ if (!lookAhead) {
19605
+ astDefined = p.ast && p.ast.udtDefined(op.index);
19606
+ if (astDefined) {
19607
+ astIndex = rules.length + op.index;
19608
+ astLength = p.ast.getLength();
19609
+ p.ast.down(astIndex, udt.name);
19610
+ }
19611
+ }
19612
+ /* call the UDT */
19613
+ const charsLeft = chars.length - phraseIndex;
19614
+ udtCallbacks[op.index](sysData, chars, phraseIndex, userData);
19615
+ validateUdtCallbackResult(udt, sysData, charsLeft);
19616
+ if (!lookAhead) {
19617
+ /* end AST */
19618
+ if (astDefined) {
19619
+ if (sysData.state === id.NOMATCH) {
19620
+ p.ast.setLength(astLength);
19621
+ } else {
19622
+ p.ast.up(astIndex, udt.name, phraseIndex, sysData.phraseLength);
19623
+ }
19624
+ }
19625
+ }
19626
+ };
19627
+ // The `AND` operator.<br>
19628
+ // This is the positive `look ahead` operator.
19629
+ // Executes its single child node, returning the EMPTY state
19630
+ // if it succeedsand NOMATCH if it fails.
19631
+ // *Always* backtracks on any matched phrase and returns EMPTY on success.
19632
+ const opAND = (opIndex, phraseIndex) => {
19633
+ lookAhead += 1;
19634
+ opExecute(opIndex + 1, phraseIndex);
19635
+ lookAhead -= 1;
19636
+ sysData.phraseLength = 0;
19637
+ switch (sysData.state) {
19638
+ case id.EMPTY:
19639
+ sysData.state = id.EMPTY;
19640
+ break;
19641
+ case id.MATCH:
19642
+ sysData.state = id.EMPTY;
19643
+ break;
19644
+ case id.NOMATCH:
19645
+ sysData.state = id.NOMATCH;
19646
+ break;
19647
+ default:
19648
+ throw new Error(`opAND: invalid state ${sysData.state}`);
19649
+ }
19650
+ };
19651
+ // The `NOT` operator.<br>
19652
+ // This is the negative `look ahead` operator.
19653
+ // Executes its single child node, returning the EMPTY state
19654
+ // if it *fails* and NOMATCH if it succeeds.
19655
+ // *Always* backtracks on any matched phrase and returns EMPTY
19656
+ // on success (failure of its child node).
19657
+ const opNOT = (opIndex, phraseIndex) => {
19658
+ lookAhead += 1;
19659
+ opExecute(opIndex + 1, phraseIndex);
19660
+ lookAhead -= 1;
19661
+ sysData.phraseLength = 0;
19662
+ switch (sysData.state) {
19663
+ case id.EMPTY:
19664
+ case id.MATCH:
19665
+ sysData.state = id.NOMATCH;
19666
+ break;
19667
+ case id.NOMATCH:
19668
+ sysData.state = id.EMPTY;
19669
+ break;
19670
+ default:
19671
+ throw new Error(`opNOT: invalid state ${sysData.state}`);
19672
+ }
19673
+ };
19674
+
19675
+ const opExecute = (opIndex, phraseIndex) => {
19676
+ const functionName = `${thisFileName}opExecute(): `;
19677
+ const op = opcodes[opIndex];
19678
+ nodeHits += 1;
19679
+ if (treeDepth > maxTreeDepth) {
19680
+ maxTreeDepth = treeDepth;
19681
+ }
19682
+ treeDepth += 1;
19683
+ sysData.refresh();
19684
+ if (p.trace) {
19685
+ p.trace.down(op, phraseIndex);
19686
+ }
19687
+ switch (op.type) {
19688
+ case id.ALT:
19689
+ opALT(opIndex, phraseIndex);
19690
+ break;
19691
+ case id.CAT:
19692
+ opCAT(opIndex, phraseIndex);
19693
+ break;
19694
+ case id.REP:
19695
+ opREP(opIndex, phraseIndex);
19696
+ break;
19697
+ case id.RNM:
19698
+ opRNM(opIndex, phraseIndex);
19699
+ break;
19700
+ case id.TRG:
19701
+ opTRG(opIndex, phraseIndex);
19702
+ break;
19703
+ case id.TBS:
19704
+ opTBS(opIndex, phraseIndex);
19705
+ break;
19706
+ case id.TLS:
19707
+ opTLS(opIndex, phraseIndex);
19708
+ break;
19709
+ case id.UDT:
19710
+ opUDT(opIndex, phraseIndex);
19711
+ break;
19712
+ case id.AND:
19713
+ opAND(opIndex, phraseIndex);
19714
+ break;
19715
+ case id.NOT:
19716
+ opNOT(opIndex, phraseIndex);
19717
+ break;
19718
+ default:
19719
+ throw new Error(`${functionName}unrecognized operator`);
19720
+ }
19721
+ if (!lookAhead) {
19722
+ if (phraseIndex + sysData.phraseLength > maxMatched) {
19723
+ maxMatched = phraseIndex + sysData.phraseLength;
19724
+ }
19725
+ }
19726
+ if (p.stats) {
19727
+ p.stats.collect(op, sysData);
19728
+ }
19729
+ if (p.trace) {
19730
+ p.trace.up(op, sysData.state, phraseIndex, sysData.phraseLength);
19731
+ }
19732
+ treeDepth -= 1;
19733
+ };
19734
+ };
19735
+
19736
+ const Ast = function fnast() {
19737
+ const thisFileName = 'parser.js: Ast()): ';
19738
+ const id = identifiers;
19739
+ const utils = utilities;
19740
+ const a = this;
19741
+ let rules = undefined;
19742
+ let udts = undefined;
19743
+ let chars = undefined;
19744
+ let nodeCount = 0;
19745
+ const nodeCallbacks = [];
19746
+ const stack = [];
19747
+ const records = [];
19748
+ a.callbacks = [];
19749
+ /* called by the parser to initialize the AST with the rules, UDTs and the input characters */
19750
+ a.init = (rulesIn, udtsIn, charsIn) => {
19751
+ stack.length = 0;
19752
+ records.length = 0;
19753
+ nodeCount = 0;
19754
+ rules = rulesIn;
19755
+ udts = udtsIn;
19756
+ chars = charsIn;
19757
+ let i;
19758
+ const list = [];
19759
+ for (i = 0; i < rules.length; i += 1) {
19760
+ list.push(rules[i].lower);
19761
+ }
19762
+ for (i = 0; i < udts.length; i += 1) {
19763
+ list.push(udts[i].lower);
19764
+ }
19765
+ nodeCount = rules.length + udts.length;
19766
+ for (i = 0; i < nodeCount; i += 1) {
19767
+ nodeCallbacks[i] = undefined;
19768
+ }
19769
+ for (const index in a.callbacks) {
19770
+ if (a.callbacks.hasOwnProperty(index)) {
19771
+ const lower = index.toLowerCase();
19772
+ i = list.indexOf(lower);
19773
+ if (i < 0) {
19774
+ throw new Error(`${thisFileName}init: node '${index}' not a rule or udt name`);
19775
+ }
19776
+ nodeCallbacks[i] = a.callbacks[index];
19777
+ }
19778
+ }
19779
+ };
19780
+ /* AST node rule callbacks - called by the parser's `RNM` operator */
19781
+ a.ruleDefined = (index) => !!nodeCallbacks[index];
19782
+ /* AST node UDT callbacks - called by the parser's `UDT` operator */
19783
+ a.udtDefined = (index) => !!nodeCallbacks[rules.length + index];
19784
+ /* called by the parser's `RNM` & `UDT` operators
19785
+ builds a record for the downward traversal of the node */
19786
+ a.down = (callbackIndex, name) => {
19787
+ const thisIndex = records.length;
19788
+ stack.push(thisIndex);
19789
+ records.push({
19790
+ name,
19791
+ thisIndex,
19792
+ thatIndex: undefined,
19793
+ state: id.SEM_PRE,
19794
+ callbackIndex,
19795
+ phraseIndex: undefined,
19796
+ phraseLength: undefined,
19797
+ stack: stack.length,
19798
+ });
19799
+ return thisIndex;
19800
+ };
19801
+ /* called by the parser's `RNM` & `UDT` operators */
19802
+ /* builds a record for the upward traversal of the node */
19803
+ a.up = (callbackIndex, name, phraseIndex, phraseLength) => {
19804
+ const thisIndex = records.length;
19805
+ const thatIndex = stack.pop();
19806
+ records.push({
19807
+ name,
19808
+ thisIndex,
19809
+ thatIndex,
19810
+ state: id.SEM_POST,
19811
+ callbackIndex,
19812
+ phraseIndex,
19813
+ phraseLength,
19814
+ stack: stack.length,
19815
+ });
19816
+ records[thatIndex].thatIndex = thisIndex;
19817
+ records[thatIndex].phraseIndex = phraseIndex;
19818
+ records[thatIndex].phraseLength = phraseLength;
19819
+ return thisIndex;
19820
+ };
19821
+ // Called by the user to translate the AST.
19822
+ // Translate means to associate or apply some semantic action to the
19823
+ // phrases that were syntactically matched to the AST nodes according
19824
+ // to the defining grammar.
19825
+ // ```
19826
+ // data - optional user-defined data
19827
+ // passed to the callback functions by the translator
19828
+ // ```
19829
+ a.translate = (data) => {
19830
+ let ret;
19831
+ let callback;
19832
+ let record;
19833
+ for (let i = 0; i < records.length; i += 1) {
19834
+ record = records[i];
19835
+ callback = nodeCallbacks[record.callbackIndex];
19836
+ if (callback) {
19837
+ if (record.state === id.SEM_PRE) {
19838
+ callback(id.SEM_PRE, chars, record.phraseIndex, record.phraseLength, data);
19839
+ } else if (callback) {
19840
+ callback(id.SEM_POST, chars, record.phraseIndex, record.phraseLength, data);
19841
+ }
19842
+ }
19843
+ }
19844
+ };
19845
+ /* called by the parser to reset the length of the records array */
19846
+ /* necessary on backtracking */
19847
+ a.setLength = (length) => {
19848
+ records.length = length;
19849
+ if (length > 0) {
19850
+ stack.length = records[length - 1].stack;
19851
+ } else {
19852
+ stack.length = 0;
19853
+ }
19854
+ };
19855
+ /* called by the parser to get the length of the records array */
19856
+ a.getLength = () => records.length;
19857
+ /* helper for XML display */
19858
+ function indent(n) {
19859
+ let ret = '';
19860
+ while (n-- > 0) {
19861
+ ret += ' ';
19862
+ }
19863
+ return ret;
19864
+ }
19865
+ // Generate an `XML` version of the AST.
19866
+ // Useful if you want to use a special or favorite XML parser to translate the
19867
+ // AST. Node data are JavaScript strings.
19868
+ a.toXml = () => {
19869
+ let xml = '';
19870
+ let depth = 0;
19871
+ xml += '<?xml version="1.0" encoding="utf-8"?>\n';
19872
+ xml += `<root nodes="${records.length / 2}" characters="${chars.length}">\n`;
19873
+ xml += `<!-- input string -->\n`;
19874
+ xml += indent(depth + 2);
19875
+ xml += utils.charsToString(chars);
19876
+ xml += '\n';
19877
+ records.forEach((rec) => {
19878
+ if (rec.state === id.SEM_PRE) {
19879
+ depth += 1;
19880
+ xml += indent(depth);
19881
+ xml += `<node name="${rec.name}" index="${rec.phraseIndex}" length="${rec.phraseLength}">\n`;
19882
+ xml += indent(depth + 2);
19883
+ xml += utils.charsToString(chars, rec.phraseIndex, rec.phraseLength);
19884
+ xml += '\n';
19885
+ } else {
19886
+ xml += indent(depth);
19887
+ xml += `</node><!-- name="${rec.name}" -->\n`;
19888
+ depth -= 1;
19889
+ }
19890
+ });
19891
+
19892
+ xml += '</root>\n';
19893
+ return xml;
19894
+ };
19895
+ };
19896
+
19897
+ const Trace = function fntrace() {
19898
+ const id = identifiers;
19899
+ const utils = utilities;
19900
+ const thisFile = 'parser.js: Trace(): ';
19901
+ let chars = undefined;
19902
+ let rules = undefined;
19903
+ let udts = undefined;
19904
+ let out = '';
19905
+ let treeDepth = 0;
19906
+ const MAX_PHRASE = 100;
19907
+ const t = this;
19908
+ const indent = (n) => {
19909
+ let ret = '';
19910
+ let count = 0;
19911
+ if (n >= 0) {
19912
+ while (n--) {
19913
+ count += 1;
19914
+ if (count === 5) {
19915
+ ret += '|';
19916
+ count = 0;
19917
+ } else {
19918
+ ret += '.';
19919
+ }
19920
+ }
19921
+ }
19922
+ return ret;
19923
+ };
19924
+ t.init = (r, u, c) => {
19925
+ rules = r;
19926
+ udts = u;
19927
+ chars = c;
19928
+ };
19929
+ const opName = (op) => {
19930
+ let name;
19931
+ switch (op.type) {
19932
+ case id.ALT:
19933
+ name = 'ALT';
19934
+ break;
19935
+ case id.CAT:
19936
+ name = 'CAT';
19937
+ break;
19938
+ case id.REP:
19939
+ if (op.max === Infinity) {
19940
+ name = `REP(${op.min},inf)`;
19941
+ } else {
19942
+ name = `REP(${op.min},${op.max})`;
19943
+ }
19944
+ break;
19945
+ case id.RNM:
19946
+ name = `RNM(${rules[op.index].name})`;
19947
+ break;
19948
+ case id.TRG:
19949
+ name = `TRG(${op.min},${op.max})`;
19950
+ break;
19951
+ case id.TBS:
19952
+ if (op.string.length > 6) {
19953
+ name = `TBS(${utils.charsToString(op.string, 0, 3)}...)`;
19954
+ } else {
19955
+ name = `TBS(${utils.charsToString(op.string, 0, 6)})`;
19956
+ }
19957
+ break;
19958
+ case id.TLS:
19959
+ if (op.string.length > 6) {
19960
+ name = `TLS(${utils.charsToString(op.string, 0, 3)}...)`;
19961
+ } else {
19962
+ name = `TLS(${utils.charsToString(op.string, 0, 6)})`;
19963
+ }
19964
+ break;
19965
+ case id.UDT:
19966
+ name = `UDT(${udts[op.index].name})`;
19967
+ break;
19968
+ case id.AND:
19969
+ name = 'AND';
19970
+ break;
19971
+ case id.NOT:
19972
+ name = 'NOT';
19973
+ break;
19974
+ default:
19975
+ throw new Error(`${thisFile}Trace: opName: unrecognized opcode`);
19976
+ }
19977
+ return name;
19978
+ };
19979
+ t.down = (op, offset) => {
19980
+ const lead = indent(treeDepth);
19981
+ const len = Math.min(MAX_PHRASE, chars.length - offset);
19982
+ let phrase = utils.charsToString(chars, offset, len);
19983
+ if (len < chars.length - offset) {
19984
+ phrase += '...';
19985
+ }
19986
+ phrase = `${lead}|-|[${opName(op)}]${phrase}\n`;
19987
+ out += phrase;
19988
+ treeDepth += 1;
19989
+ };
19990
+ t.up = (op, state, offset, phraseLength) => {
19991
+ const thisFunc = `${thisFile}trace.up: `;
19992
+ treeDepth -= 1;
19993
+ const lead = indent(treeDepth);
19994
+ let len;
19995
+ let phrase;
19996
+ let st;
19997
+ switch (state) {
19998
+ case id.EMPTY:
19999
+ st = '|E|';
20000
+ phrase = `''`;
20001
+ break;
20002
+ case id.MATCH:
20003
+ st = '|M|';
20004
+ len = Math.min(MAX_PHRASE, phraseLength);
20005
+ if (len < phraseLength) {
20006
+ phrase = `'${utils.charsToString(chars, offset, len)}...'`;
20007
+ } else {
20008
+ phrase = `'${utils.charsToString(chars, offset, len)}'`;
20009
+ }
20010
+ break;
20011
+ case id.NOMATCH:
20012
+ st = '|N|';
20013
+ phrase = '';
20014
+ break;
20015
+ default:
20016
+ throw new Error(`${thisFunc} unrecognized state`);
20017
+ }
20018
+ phrase = `${lead}${st}[${opName(op)}]${phrase}\n`;
20019
+ out += phrase;
20020
+ };
20021
+ t.displayTrace = () => out;
20022
+ };
20023
+
20024
+ const Stats = function fnstats() {
20025
+ const id = identifiers;
20026
+ const thisFileName = 'parser.js: Stats(): ';
20027
+ let rules;
20028
+ let udts;
20029
+ let totals;
20030
+ const stats = [];
20031
+ const ruleStats = [];
20032
+ const udtStats = [];
20033
+ /* called by parser to initialize the stats */
20034
+ this.init = (r, u) => {
20035
+ rules = r;
20036
+ udts = u;
20037
+ clear();
20038
+ };
20039
+ /* This function is the main interaction with the parser. */
20040
+ /* The parser calls it after each node has been traversed. */
20041
+ this.collect = (op, sys) => {
20042
+ incStat(totals, sys.state, sys.phraseLength);
20043
+ incStat(stats[op.type], sys.state, sys.phraseLength);
20044
+ if (op.type === id.RNM) {
20045
+ incStat(ruleStats[op.index], sys.state, sys.phraseLength);
20046
+ }
20047
+ if (op.type === id.UDT) {
20048
+ incStat(udtStats[op.index], sys.state, sys.phraseLength);
20049
+ }
20050
+ };
20051
+ this.displayStats = () => {
20052
+ let out = '';
20053
+ const totals = {
20054
+ match: 0,
20055
+ empty: 0,
20056
+ nomatch: 0,
20057
+ total: 0,
20058
+ };
20059
+ const displayRow = (op, m, e, n, t) => {
20060
+ totals.match += m;
20061
+ totals.empty += e;
20062
+ totals.nomatch += n;
20063
+ totals.total += t;
20064
+ const mm = normalize(m);
20065
+ const ee = normalize(e);
20066
+ const nn = normalize(n);
20067
+ const tt = normalize(t);
20068
+ return `${op} | ${mm} | ${ee} | ${nn} | ${tt} |\n`;
20069
+ };
20070
+ out += ' OPERATOR STATS\n';
20071
+ out += ' | MATCH | EMPTY | NOMATCH | TOTAL |\n';
20072
+ out += displayRow(' ALT', stats[id.ALT].match, stats[id.ALT].empty, stats[id.ALT].nomatch, stats[id.ALT].total);
20073
+ out += displayRow(' CAT', stats[id.CAT].match, stats[id.CAT].empty, stats[id.CAT].nomatch, stats[id.CAT].total);
20074
+ out += displayRow(' REP', stats[id.REP].match, stats[id.REP].empty, stats[id.REP].nomatch, stats[id.REP].total);
20075
+ out += displayRow(' RNM', stats[id.RNM].match, stats[id.RNM].empty, stats[id.RNM].nomatch, stats[id.RNM].total);
20076
+ out += displayRow(' TRG', stats[id.TRG].match, stats[id.TRG].empty, stats[id.TRG].nomatch, stats[id.TRG].total);
20077
+ out += displayRow(' TBS', stats[id.TBS].match, stats[id.TBS].empty, stats[id.TBS].nomatch, stats[id.TBS].total);
20078
+ out += displayRow(' TLS', stats[id.TLS].match, stats[id.TLS].empty, stats[id.TLS].nomatch, stats[id.TLS].total);
20079
+ out += displayRow(' UDT', stats[id.UDT].match, stats[id.UDT].empty, stats[id.UDT].nomatch, stats[id.UDT].total);
20080
+ out += displayRow(' AND', stats[id.AND].match, stats[id.AND].empty, stats[id.AND].nomatch, stats[id.AND].total);
20081
+ out += displayRow(' NOT', stats[id.NOT].match, stats[id.NOT].empty, stats[id.NOT].nomatch, stats[id.NOT].total);
20082
+ out += displayRow('TOTAL', totals.match, totals.empty, totals.nomatch, totals.total);
20083
+ return out;
20084
+ };
20085
+ /*
20086
+ Display rule/udt
20087
+ */
20088
+ this.displayHits = (type) => {
20089
+ let out = '';
20090
+ const displayRow = (m, e, n, t, name) => {
20091
+ totals.match += m;
20092
+ totals.empty += e;
20093
+ totals.nomatch += n;
20094
+ totals.total += t;
20095
+ const mm = normalize(m);
20096
+ const ee = normalize(e);
20097
+ const nn = normalize(n);
20098
+ const tt = normalize(t);
20099
+ return `| ${mm} | ${ee} | ${nn} | ${tt} | ${name}\n`;
20100
+ };
20101
+ if (typeof type === 'string' && type.toLowerCase()[0] === 'a') {
20102
+ ruleStats.sort(sortAlpha);
20103
+ udtStats.sort(sortAlpha);
20104
+ out += ' RULES/UDTS ALPHABETICALLY\n';
20105
+ } else if (typeof type === 'string' && type.toLowerCase()[0] === 'i') {
20106
+ ruleStats.sort(sortIndex);
20107
+ udtStats.sort(sortIndex);
20108
+ out += ' RULES/UDTS BY INDEX\n';
20109
+ } else {
20110
+ ruleStats.sort(sortHits);
20111
+ udtStats.sort(sortHits);
20112
+ out += ' RULES/UDTS BY HIT COUNT\n';
20113
+ }
20114
+ out += '| MATCH | EMPTY | NOMATCH | TOTAL | NAME\n';
20115
+ for (let i = 0; i < ruleStats.length; i += 1) {
20116
+ let r = ruleStats[i];
20117
+ if (r.total) {
20118
+ out += displayRow(r.match, r.empty, r.nomatch, r.total, r.name);
20119
+ }
20120
+ }
20121
+ for (let i = 0; i < udtStats.length; i += 1) {
20122
+ let r = udtStats[i];
20123
+ if (r.total) {
20124
+ out += displayRow(r.match, r.empty, r.nomatch, r.total, r.name);
20125
+ }
20126
+ }
20127
+ return out;
20128
+ };
20129
+ const normalize = (n) => {
20130
+ if (n < 10) {
20131
+ return ` ${n}`;
20132
+ }
20133
+ if (n < 100) {
20134
+ return ` ${n}`;
20135
+ }
20136
+ if (n < 1000) {
20137
+ return ` ${n}`;
20138
+ }
20139
+ if (n < 10000) {
20140
+ return ` ${n}`;
20141
+ }
20142
+ if (n < 100000) {
20143
+ return ` ${n}`;
20144
+ }
20145
+ if (n < 1000000) {
20146
+ return ` ${n}`;
20147
+ }
20148
+ return `${n}`;
20149
+ };
20150
+ const sortAlpha = (lhs, rhs) => {
20151
+ if (lhs.lower < rhs.lower) {
20152
+ return -1;
20153
+ }
20154
+ if (lhs.lower > rhs.lower) {
20155
+ return 1;
20156
+ }
20157
+ return 0;
20158
+ };
20159
+ const sortHits = (lhs, rhs) => {
20160
+ if (lhs.total < rhs.total) {
20161
+ return 1;
20162
+ }
20163
+ if (lhs.total > rhs.total) {
20164
+ return -1;
20165
+ }
20166
+ return sortAlpha(lhs, rhs);
20167
+ };
20168
+ const sortIndex = (lhs, rhs) => {
20169
+ if (lhs.index < rhs.index) {
20170
+ return -1;
20171
+ }
20172
+ if (lhs.index > rhs.index) {
20173
+ return 1;
20174
+ }
20175
+ return 0;
20176
+ };
20177
+ const EmptyStat = function fnempty() {
20178
+ this.empty = 0;
20179
+ this.match = 0;
20180
+ this.nomatch = 0;
20181
+ this.total = 0;
20182
+ };
20183
+ /* Zero out all stats */
20184
+ const clear = () => {
20185
+ stats.length = 0;
20186
+ totals = new EmptyStat();
20187
+ stats[id.ALT] = new EmptyStat();
20188
+ stats[id.CAT] = new EmptyStat();
20189
+ stats[id.REP] = new EmptyStat();
20190
+ stats[id.RNM] = new EmptyStat();
20191
+ stats[id.TRG] = new EmptyStat();
20192
+ stats[id.TBS] = new EmptyStat();
20193
+ stats[id.TLS] = new EmptyStat();
20194
+ stats[id.UDT] = new EmptyStat();
20195
+ stats[id.AND] = new EmptyStat();
20196
+ stats[id.NOT] = new EmptyStat();
20197
+ ruleStats.length = 0;
20198
+ for (let i = 0; i < rules.length; i += 1) {
20199
+ ruleStats.push({
20200
+ empty: 0,
20201
+ match: 0,
20202
+ nomatch: 0,
20203
+ total: 0,
20204
+ name: rules[i].name,
20205
+ lower: rules[i].lower,
20206
+ index: rules[i].index,
20207
+ });
20208
+ }
20209
+ if (udts.length > 0) {
20210
+ udtStats.length = 0;
20211
+ for (let i = 0; i < udts.length; i += 1) {
20212
+ udtStats.push({
20213
+ empty: 0,
20214
+ match: 0,
20215
+ nomatch: 0,
20216
+ total: 0,
20217
+ name: udts[i].name,
20218
+ lower: udts[i].lower,
20219
+ index: udts[i].index,
20220
+ });
20221
+ }
20222
+ }
20223
+ };
20224
+ /* increment the designated operator hit count by one */
20225
+ const incStat = (stat, state) => {
20226
+ stat.total += 1;
20227
+ switch (state) {
20228
+ case id.EMPTY:
20229
+ stat.empty += 1;
20230
+ break;
20231
+ case id.MATCH:
20232
+ stat.match += 1;
20233
+ break;
20234
+ case id.NOMATCH:
20235
+ stat.nomatch += 1;
20236
+ break;
20237
+ default:
20238
+ throw new Error(`${thisFileName}collect(): incStat(): unrecognized state: ${state}`);
20239
+ }
20240
+ };
20241
+ };
20242
+
20243
+ const utilities = {
20244
+ // utility functions
20245
+ stringToChars: (string) => [...string].map((cp) => cp.codePointAt(0)),
20246
+ charsToString: (chars, beg, len) => {
20247
+ let subChars = chars;
20248
+ while (1) {
20249
+ if (beg === undefined || beg < 0) {
20250
+ break;
20251
+ }
20252
+ if (len === undefined) {
20253
+ subChars = chars.slice(beg);
20254
+ break;
20255
+ }
20256
+ if (len <= 0) {
20257
+ // always an empty string
20258
+ return '';
20259
+ }
20260
+ subChars = chars.slice(beg, beg + len);
20261
+ break;
20262
+ }
20263
+ return String.fromCodePoint(...subChars);
20264
+ },
20265
+ };
20266
+
20267
+ const identifiers = {
20268
+ // Identifies the operator type.
20269
+ // NB: These must match the values in apg-js 4.3.0, apg-lib/identifiers.
20270
+ /* the original ABNF operators */
20271
+ ALT: 1 /* alternation */,
20272
+ CAT: 2 /* concatenation */,
20273
+ REP: 3 /* repetition */,
20274
+ RNM: 4 /* rule name */,
20275
+ TRG: 5 /* terminal range */,
20276
+ TBS: 6 /* terminal binary string, case sensitive */,
20277
+ TLS: 7 /* terminal literal string, case insensitive */,
20278
+ /* the super set, SABNF operators */
20279
+ UDT: 11 /* user-defined terminal */,
20280
+ AND: 12 /* positive look ahead */,
20281
+ NOT: 13 /* negative look ahead */,
20282
+ // Used by the parser and the user's `RNM` and `UDT` callback functions.
20283
+ // Identifies the parser state as it traverses the parse tree nodes.
20284
+ // - *ACTIVE* - indicates the downward direction through the parse tree node.
20285
+ // - *MATCH* - indicates the upward direction and a phrase, of length \> 0, has been successfully matched
20286
+ // - *EMPTY* - indicates the upward direction and a phrase, of length = 0, has been successfully matched
20287
+ // - *NOMATCH* - indicates the upward direction and the parser failed to match any phrase at all
20288
+ ACTIVE: 100,
20289
+ MATCH: 101,
20290
+ EMPTY: 102,
20291
+ NOMATCH: 103,
20292
+ // Used by [`AST` translator](./ast.html) (semantic analysis) and the user's callback functions
20293
+ // to indicate the direction of flow through the `AST` nodes.
20294
+ // - *SEM_PRE* - indicates the downward (pre-branch) direction through the `AST` node.
20295
+ // - *SEM_POST* - indicates the upward (post-branch) direction through the `AST` node.
20296
+ SEM_PRE: 200,
20297
+ SEM_POST: 201,
20298
+ // Ignored. Retained for backwords compatibility.
20299
+ SEM_OK: 300,
20300
+ idName: (s) => {
20301
+ switch (s) {
20302
+ case identifiers.ALT:
20303
+ return 'ALT';
20304
+ case identifiers.CAT:
20305
+ return 'CAT';
20306
+ case identifiers.REP:
20307
+ return 'REP';
20308
+ case identifiers.RNM:
20309
+ return 'RNM';
20310
+ case identifiers.TRG:
20311
+ return 'TRG';
20312
+ case identifiers.TBS:
20313
+ return 'TBS';
20314
+ case identifiers.TLS:
20315
+ return 'TLS';
20316
+ case identifiers.UDT:
20317
+ return 'UDT';
20318
+ case identifiers.AND:
20319
+ return 'AND';
20320
+ case identifiers.NOT:
20321
+ return 'NOT';
20322
+ case identifiers.ACTIVE:
20323
+ return 'ACTIVE';
20324
+ case identifiers.EMPTY:
20325
+ return 'EMPTY';
20326
+ case identifiers.MATCH:
20327
+ return 'MATCH';
20328
+ case identifiers.NOMATCH:
20329
+ return 'NOMATCH';
20330
+ case identifiers.SEM_PRE:
20331
+ return 'SEM_PRE';
20332
+ case identifiers.SEM_POST:
20333
+ return 'SEM_POST';
20334
+ case identifiers.SEM_OK:
20335
+ return 'SEM_OK';
20336
+ default:
20337
+ return 'UNRECOGNIZED STATE';
20338
+ }
20339
+ },
20340
+ };
20341
+
20342
+
18433
20343
  /***/ }),
18434
20344
 
18435
20345
  /***/ 51865:
@@ -18828,6 +20738,48 @@ class ExternalValueVisitor extends _FallbackVisitor_mjs__WEBPACK_IMPORTED_MODULE
18828
20738
 
18829
20739
  /***/ }),
18830
20740
 
20741
+ /***/ 52725:
20742
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
20743
+
20744
+ "use strict";
20745
+ __webpack_require__.r(__webpack_exports__);
20746
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
20747
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
20748
+ /* harmony export */ });
20749
+ /* harmony import */ var apg_lite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(51751);
20750
+ /* harmony import */ var _errors_JSONPointerParseError_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(26490);
20751
+
20752
+
20753
+ const cst = ruleName => {
20754
+ return (state, chars, phraseIndex, phraseLength, data) => {
20755
+ if (!(typeof data === 'object' && data !== null && !Array.isArray(data))) {
20756
+ throw new _errors_JSONPointerParseError_mjs__WEBPACK_IMPORTED_MODULE_1__["default"]("parser's user data must be an object");
20757
+ }
20758
+ if (state === apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_PRE) {
20759
+ const node = {
20760
+ type: ruleName,
20761
+ text: apg_lite__WEBPACK_IMPORTED_MODULE_0__.utilities.charsToString(chars, phraseIndex, phraseLength),
20762
+ start: phraseIndex,
20763
+ length: phraseLength,
20764
+ children: []
20765
+ };
20766
+ if (data.stack.length > 0) {
20767
+ const parent = data.stack[data.stack.length - 1];
20768
+ parent.children.push(node);
20769
+ } else {
20770
+ data.root = node;
20771
+ }
20772
+ data.stack.push(node);
20773
+ }
20774
+ if (state === apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_POST) {
20775
+ data.stack.pop();
20776
+ }
20777
+ };
20778
+ };
20779
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cst);
20780
+
20781
+ /***/ }),
20782
+
18831
20783
  /***/ 52769:
18832
20784
  /***/ ((module) => {
18833
20785
 
@@ -20267,6 +22219,63 @@ class Encoding extends _swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_0__.Obj
20267
22219
 
20268
22220
  /***/ }),
20269
22221
 
22222
+ /***/ 56660:
22223
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
22224
+
22225
+ "use strict";
22226
+ __webpack_require__.r(__webpack_exports__);
22227
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
22228
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
22229
+ /* harmony export */ });
22230
+ class TraceBuilder {
22231
+ #trace;
22232
+ #path;
22233
+ #realm;
22234
+ constructor(trace, context = {}) {
22235
+ this.#trace = trace;
22236
+ this.#trace.steps = [];
22237
+ this.#trace.failed = false;
22238
+ this.#trace.failedAt = -1;
22239
+ this.#trace.message = `JSON Pointer "${context.jsonPointer}" was successfully evaluated against the provided value`;
22240
+ this.#trace.context = {
22241
+ ...context,
22242
+ realm: context.realm.name
22243
+ };
22244
+ this.#path = [];
22245
+ this.#realm = context.realm;
22246
+ }
22247
+ step({
22248
+ referenceToken,
22249
+ input,
22250
+ output,
22251
+ success = true,
22252
+ reason
22253
+ }) {
22254
+ const position = this.#path.length;
22255
+ this.#path.push(referenceToken);
22256
+ const step = {
22257
+ referenceToken,
22258
+ referenceTokenPosition: position,
22259
+ input,
22260
+ inputType: this.#realm.isObject(input) ? 'object' : this.#realm.isArray(input) ? 'array' : 'unrecognized',
22261
+ output,
22262
+ success
22263
+ };
22264
+ if (reason) {
22265
+ step.reason = reason;
22266
+ }
22267
+ this.#trace.steps.push(step);
22268
+ if (!success) {
22269
+ this.#trace.failed = true;
22270
+ this.#trace.failedAt = position;
22271
+ this.#trace.message = reason;
22272
+ }
22273
+ }
22274
+ }
22275
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (TraceBuilder);
22276
+
22277
+ /***/ }),
22278
+
20270
22279
  /***/ 56935:
20271
22280
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
20272
22281
 
@@ -21282,6 +23291,38 @@ class DependenciesVisitor extends (0,ts_mixer__WEBPACK_IMPORTED_MODULE_0__.Mixin
21282
23291
 
21283
23292
  /***/ }),
21284
23293
 
23294
+ /***/ 59408:
23295
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
23296
+
23297
+ "use strict";
23298
+ __webpack_require__.r(__webpack_exports__);
23299
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
23300
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
23301
+ /* harmony export */ });
23302
+ /* harmony import */ var _errors_JSONPointerError_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12008);
23303
+
23304
+ class EvaluationRealm {
23305
+ name = '';
23306
+ isArray(node) {
23307
+ throw new _errors_JSONPointerError_mjs__WEBPACK_IMPORTED_MODULE_0__["default"]('Realm.isArray(node) must be implemented in a subclass');
23308
+ }
23309
+ isObject(node) {
23310
+ throw new _errors_JSONPointerError_mjs__WEBPACK_IMPORTED_MODULE_0__["default"]('Realm.isObject(node) must be implemented in a subclass');
23311
+ }
23312
+ sizeOf(node) {
23313
+ throw new _errors_JSONPointerError_mjs__WEBPACK_IMPORTED_MODULE_0__["default"]('Realm.sizeOf(node) must be implemented in a subclass');
23314
+ }
23315
+ has(node, referenceToken) {
23316
+ throw new _errors_JSONPointerError_mjs__WEBPACK_IMPORTED_MODULE_0__["default"]('Realm.has(node) must be implemented in a subclass');
23317
+ }
23318
+ evaluate(node, referenceToken) {
23319
+ throw new _errors_JSONPointerError_mjs__WEBPACK_IMPORTED_MODULE_0__["default"]('Realm.evaluate(node) must be implemented in a subclass');
23320
+ }
23321
+ }
23322
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (EvaluationRealm);
23323
+
23324
+ /***/ }),
23325
+
21285
23326
  /***/ 59619:
21286
23327
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
21287
23328
 
@@ -22279,6 +24320,32 @@ visitor, {
22279
24320
 
22280
24321
  /***/ }),
22281
24322
 
24323
+ /***/ 60357:
24324
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
24325
+
24326
+ "use strict";
24327
+ __webpack_require__.r(__webpack_exports__);
24328
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
24329
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
24330
+ /* harmony export */ });
24331
+ /* harmony import */ var apg_lite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(51751);
24332
+ /* harmony import */ var _grammar_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(36585);
24333
+
24334
+
24335
+ const grammar = new _grammar_mjs__WEBPACK_IMPORTED_MODULE_1__["default"]();
24336
+ const parser = new apg_lite__WEBPACK_IMPORTED_MODULE_0__.Parser();
24337
+ const testArrayDash = referenceToken => {
24338
+ if (typeof referenceToken !== 'string') return false;
24339
+ try {
24340
+ return parser.parse(grammar, 'array-dash', referenceToken).success;
24341
+ } catch {
24342
+ return false;
24343
+ }
24344
+ };
24345
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (testArrayDash);
24346
+
24347
+ /***/ }),
24348
+
22282
24349
  /***/ 60493:
22283
24350
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
22284
24351
 
@@ -22521,6 +24588,92 @@ module.exports = {
22521
24588
  // https://tc39.es/ecma262/#sec-array.prototype.indexof
22522
24589
  indexOf: createMethod(false)
22523
24590
  };
24591
+
24592
+
24593
+ /***/ }),
24594
+
24595
+ /***/ 61198:
24596
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
24597
+
24598
+ "use strict";
24599
+ __webpack_require__.r(__webpack_exports__);
24600
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
24601
+ /* harmony export */ ASTTranslator: () => (/* reexport safe */ _parse_translators_ASTTranslator_mjs__WEBPACK_IMPORTED_MODULE_5__["default"]),
24602
+ /* harmony export */ CSTTranslator: () => (/* reexport safe */ _parse_translators_CSTTranslator_mjs__WEBPACK_IMPORTED_MODULE_4__["default"]),
24603
+ /* harmony export */ EvaluationRealm: () => (/* reexport safe */ _evaluate_realms_EvaluationRealm_mjs__WEBPACK_IMPORTED_MODULE_16__["default"]),
24604
+ /* harmony export */ Grammar: () => (/* reexport safe */ _grammar_mjs__WEBPACK_IMPORTED_MODULE_2__["default"]),
24605
+ /* harmony export */ JSONPointerCompileError: () => (/* reexport safe */ _errors_JSONPointerCompileError_mjs__WEBPACK_IMPORTED_MODULE_20__["default"]),
24606
+ /* harmony export */ JSONPointerError: () => (/* reexport safe */ _errors_JSONPointerError_mjs__WEBPACK_IMPORTED_MODULE_18__["default"]),
24607
+ /* harmony export */ JSONPointerEvaluateError: () => (/* reexport safe */ _errors_JSONPointerEvaluateError_mjs__WEBPACK_IMPORTED_MODULE_21__["default"]),
24608
+ /* harmony export */ JSONPointerIndexError: () => (/* reexport safe */ _errors_JSONPointerIndexError_mjs__WEBPACK_IMPORTED_MODULE_24__["default"]),
24609
+ /* harmony export */ JSONPointerKeyError: () => (/* reexport safe */ _errors_JSONPointerKeyError_mjs__WEBPACK_IMPORTED_MODULE_23__["default"]),
24610
+ /* harmony export */ JSONPointerParseError: () => (/* reexport safe */ _errors_JSONPointerParseError_mjs__WEBPACK_IMPORTED_MODULE_19__["default"]),
24611
+ /* harmony export */ JSONPointerTypeError: () => (/* reexport safe */ _errors_JSONPointerTypeError_mjs__WEBPACK_IMPORTED_MODULE_22__["default"]),
24612
+ /* harmony export */ JSONString: () => (/* reexport module object */ _representation_json_string_mjs__WEBPACK_IMPORTED_MODULE_0__),
24613
+ /* harmony export */ URIFragmentIdentifier: () => (/* reexport module object */ _representation_uri_fragment_identifier_mjs__WEBPACK_IMPORTED_MODULE_1__),
24614
+ /* harmony export */ XMLTranslator: () => (/* reexport safe */ _parse_translators_XMLTranslator_mjs__WEBPACK_IMPORTED_MODULE_6__["default"]),
24615
+ /* harmony export */ compile: () => (/* reexport safe */ _compile_mjs__WEBPACK_IMPORTED_MODULE_12__["default"]),
24616
+ /* harmony export */ composeRealms: () => (/* reexport safe */ _evaluate_realms_compose_mjs__WEBPACK_IMPORTED_MODULE_17__["default"]),
24617
+ /* harmony export */ escape: () => (/* reexport safe */ _escape_mjs__WEBPACK_IMPORTED_MODULE_13__["default"]),
24618
+ /* harmony export */ evaluate: () => (/* reexport safe */ _evaluate_index_mjs__WEBPACK_IMPORTED_MODULE_15__["default"]),
24619
+ /* harmony export */ parse: () => (/* reexport safe */ _parse_index_mjs__WEBPACK_IMPORTED_MODULE_3__["default"]),
24620
+ /* harmony export */ testArrayDash: () => (/* reexport safe */ _test_array_dash_mjs__WEBPACK_IMPORTED_MODULE_11__["default"]),
24621
+ /* harmony export */ testArrayIndex: () => (/* reexport safe */ _test_array_index_mjs__WEBPACK_IMPORTED_MODULE_10__["default"]),
24622
+ /* harmony export */ testArrayLocation: () => (/* reexport safe */ _test_array_location_mjs__WEBPACK_IMPORTED_MODULE_9__["default"]),
24623
+ /* harmony export */ testJSONPointer: () => (/* reexport safe */ _test_json_pointer_mjs__WEBPACK_IMPORTED_MODULE_7__["default"]),
24624
+ /* harmony export */ testReferenceToken: () => (/* reexport safe */ _test_reference_token_mjs__WEBPACK_IMPORTED_MODULE_8__["default"]),
24625
+ /* harmony export */ unescape: () => (/* reexport safe */ _unescape_mjs__WEBPACK_IMPORTED_MODULE_14__["default"])
24626
+ /* harmony export */ });
24627
+ /* harmony import */ var _representation_json_string_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(70204);
24628
+ /* harmony import */ var _representation_uri_fragment_identifier_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(86181);
24629
+ /* harmony import */ var _grammar_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(36585);
24630
+ /* harmony import */ var _parse_index_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(8750);
24631
+ /* harmony import */ var _parse_translators_CSTTranslator_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(92802);
24632
+ /* harmony import */ var _parse_translators_ASTTranslator_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(23020);
24633
+ /* harmony import */ var _parse_translators_XMLTranslator_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(70979);
24634
+ /* harmony import */ var _test_json_pointer_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(20439);
24635
+ /* harmony import */ var _test_reference_token_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(91560);
24636
+ /* harmony import */ var _test_array_location_mjs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(4896);
24637
+ /* harmony import */ var _test_array_index_mjs__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(22587);
24638
+ /* harmony import */ var _test_array_dash_mjs__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(60357);
24639
+ /* harmony import */ var _compile_mjs__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(96901);
24640
+ /* harmony import */ var _escape_mjs__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(27123);
24641
+ /* harmony import */ var _unescape_mjs__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(82182);
24642
+ /* harmony import */ var _evaluate_index_mjs__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(89274);
24643
+ /* harmony import */ var _evaluate_realms_EvaluationRealm_mjs__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(59408);
24644
+ /* harmony import */ var _evaluate_realms_compose_mjs__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(99799);
24645
+ /* harmony import */ var _errors_JSONPointerError_mjs__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(12008);
24646
+ /* harmony import */ var _errors_JSONPointerParseError_mjs__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(26490);
24647
+ /* harmony import */ var _errors_JSONPointerCompileError_mjs__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(42144);
24648
+ /* harmony import */ var _errors_JSONPointerEvaluateError_mjs__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(924);
24649
+ /* harmony import */ var _errors_JSONPointerTypeError_mjs__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(675);
24650
+ /* harmony import */ var _errors_JSONPointerKeyError_mjs__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(82414);
24651
+ /* harmony import */ var _errors_JSONPointerIndexError_mjs__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(2325);
24652
+
24653
+
24654
+
24655
+
24656
+
24657
+
24658
+
24659
+
24660
+
24661
+
24662
+
24663
+
24664
+
24665
+
24666
+
24667
+
24668
+
24669
+
24670
+
24671
+
24672
+
24673
+
24674
+
24675
+
24676
+
22524
24677
 
22525
24678
 
22526
24679
  /***/ }),
@@ -25302,6 +27455,28 @@ class PathItemVisitor extends BasePathItemVisitor {
25302
27455
 
25303
27456
  /***/ }),
25304
27457
 
27458
+ /***/ 70204:
27459
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
27460
+
27461
+ "use strict";
27462
+ __webpack_require__.r(__webpack_exports__);
27463
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
27464
+ /* harmony export */ from: () => (/* binding */ from),
27465
+ /* harmony export */ to: () => (/* binding */ to)
27466
+ /* harmony export */ });
27467
+ const to = jsonPointer => {
27468
+ return JSON.stringify(jsonPointer);
27469
+ };
27470
+ const from = jsonString => {
27471
+ try {
27472
+ return String(JSON.parse(jsonString));
27473
+ } catch {
27474
+ return jsonString;
27475
+ }
27476
+ };
27477
+
27478
+ /***/ }),
27479
+
25305
27480
  /***/ 70369:
25306
27481
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
25307
27482
 
@@ -25664,6 +27839,25 @@ const jsonSchema202012 = {
25664
27839
 
25665
27840
  /***/ }),
25666
27841
 
27842
+ /***/ 70979:
27843
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
27844
+
27845
+ "use strict";
27846
+ __webpack_require__.r(__webpack_exports__);
27847
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
27848
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
27849
+ /* harmony export */ });
27850
+ /* harmony import */ var _CSTTranslator_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92802);
27851
+
27852
+ class XMLTranslator extends _CSTTranslator_mjs__WEBPACK_IMPORTED_MODULE_0__["default"] {
27853
+ getTree() {
27854
+ return this.toXml();
27855
+ }
27856
+ }
27857
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (XMLTranslator);
27858
+
27859
+ /***/ }),
27860
+
25667
27861
  /***/ 71020:
25668
27862
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
25669
27863
 
@@ -29406,6 +31600,24 @@ class ExternalDocumentationVisitor extends (0,ts_mixer__WEBPACK_IMPORTED_MODULE_
29406
31600
 
29407
31601
  /***/ }),
29408
31602
 
31603
+ /***/ 82182:
31604
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
31605
+
31606
+ "use strict";
31607
+ __webpack_require__.r(__webpack_exports__);
31608
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
31609
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
31610
+ /* harmony export */ });
31611
+ const unescape = referenceToken => {
31612
+ if (typeof referenceToken !== 'string') {
31613
+ throw new TypeError('Reference token must be a string');
31614
+ }
31615
+ return referenceToken.replace(/~1/g, '/').replace(/~0/g, '~');
31616
+ };
31617
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (unescape);
31618
+
31619
+ /***/ }),
31620
+
29409
31621
  /***/ 82258:
29410
31622
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
29411
31623
 
@@ -29489,6 +31701,21 @@ class KeyValuePair {
29489
31701
  module.exports = KeyValuePair;
29490
31702
 
29491
31703
 
31704
+ /***/ }),
31705
+
31706
+ /***/ 82414:
31707
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
31708
+
31709
+ "use strict";
31710
+ __webpack_require__.r(__webpack_exports__);
31711
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
31712
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
31713
+ /* harmony export */ });
31714
+ /* harmony import */ var _JSONPointerEvaluateError_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(924);
31715
+
31716
+ class JSONPointerKeyError extends _JSONPointerEvaluateError_mjs__WEBPACK_IMPORTED_MODULE_0__["default"] {}
31717
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (JSONPointerKeyError);
31718
+
29492
31719
  /***/ }),
29493
31720
 
29494
31721
  /***/ 82719:
@@ -30149,6 +32376,23 @@ module.exports = function (it) {
30149
32376
  };
30150
32377
 
30151
32378
 
32379
+ /***/ }),
32380
+
32381
+ /***/ 83421:
32382
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
32383
+
32384
+ "use strict";
32385
+ __webpack_require__.r(__webpack_exports__);
32386
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
32387
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
32388
+ /* harmony export */ });
32389
+ class Expectations extends Array {
32390
+ toString() {
32391
+ return this.map(c => `"${String(c)}"`).join(', ');
32392
+ }
32393
+ }
32394
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Expectations);
32395
+
30152
32396
  /***/ }),
30153
32397
 
30154
32398
  /***/ 83479:
@@ -30876,6 +33120,30 @@ var hasPath = /*#__PURE__*/(0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["
30876
33120
 
30877
33121
  /***/ }),
30878
33122
 
33123
+ /***/ 86181:
33124
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
33125
+
33126
+ "use strict";
33127
+ __webpack_require__.r(__webpack_exports__);
33128
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
33129
+ /* harmony export */ from: () => (/* binding */ from),
33130
+ /* harmony export */ to: () => (/* binding */ to)
33131
+ /* harmony export */ });
33132
+ const to = jsonPointer => {
33133
+ const encodedFragment = [...jsonPointer].map(char => /^[A-Za-z0-9\-._~!$&'()*+,;=:@/?]$/.test(char) ? char : encodeURIComponent(char)).join('');
33134
+ return `#${encodedFragment}`;
33135
+ };
33136
+ const from = fragment => {
33137
+ try {
33138
+ const rfc3986Fragment = fragment.startsWith('#') ? fragment.slice(1) : fragment;
33139
+ return decodeURIComponent(rfc3986Fragment);
33140
+ } catch {
33141
+ return fragment;
33142
+ }
33143
+ };
33144
+
33145
+ /***/ }),
33146
+
30879
33147
  /***/ 86561:
30880
33148
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
30881
33149
 
@@ -30931,26 +33199,6 @@ var tail = /*#__PURE__*/(0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__["def
30931
33199
  module.exports = {};
30932
33200
 
30933
33201
 
30934
- /***/ }),
30935
-
30936
- /***/ 87129:
30937
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
30938
-
30939
- "use strict";
30940
- __webpack_require__.r(__webpack_exports__);
30941
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
30942
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
30943
- /* harmony export */ });
30944
- /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(27567);
30945
- /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(98675);
30946
-
30947
-
30948
- /**
30949
- * @public
30950
- */
30951
- const escape = (0,ramda__WEBPACK_IMPORTED_MODULE_0__["default"])((0,ramda__WEBPACK_IMPORTED_MODULE_1__["default"])(/~/g, '~0'), (0,ramda__WEBPACK_IMPORTED_MODULE_1__["default"])(/\//g, '~1'), encodeURIComponent);
30952
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (escape);
30953
-
30954
33202
  /***/ }),
30955
33203
 
30956
33204
  /***/ 87161:
@@ -31398,6 +33646,174 @@ module.exports = function (input, pref) {
31398
33646
  };
31399
33647
 
31400
33648
 
33649
+ /***/ }),
33650
+
33651
+ /***/ 89274:
33652
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
33653
+
33654
+ "use strict";
33655
+ __webpack_require__.r(__webpack_exports__);
33656
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
33657
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
33658
+ /* harmony export */ });
33659
+ /* harmony import */ var _parse_index_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8750);
33660
+ /* harmony import */ var _test_array_dash_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(60357);
33661
+ /* harmony import */ var _test_array_index_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(22587);
33662
+ /* harmony import */ var _trace_TraceBuilder_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(56660);
33663
+ /* harmony import */ var _realms_json_index_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(39150);
33664
+ /* harmony import */ var _errors_JSONPointerEvaluateError_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(924);
33665
+ /* harmony import */ var _errors_JSONPointerTypeError_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(675);
33666
+ /* harmony import */ var _errors_JSONPointerIndexError_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(2325);
33667
+ /* harmony import */ var _errors_JSONPointerKeyError_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(82414);
33668
+
33669
+
33670
+
33671
+
33672
+
33673
+
33674
+
33675
+
33676
+
33677
+ const evaluate = (value, jsonPointer, {
33678
+ strictArrays = true,
33679
+ strictObjects = true,
33680
+ realm = new _realms_json_index_mjs__WEBPACK_IMPORTED_MODULE_3__["default"](),
33681
+ trace = true
33682
+ } = {}) => {
33683
+ const {
33684
+ result: parseResult,
33685
+ tree: referenceTokens,
33686
+ trace: parseTrace
33687
+ } = (0,_parse_index_mjs__WEBPACK_IMPORTED_MODULE_0__["default"])(jsonPointer, {
33688
+ trace: !!trace
33689
+ });
33690
+ const tracer = typeof trace === 'object' && trace !== null ? new _trace_TraceBuilder_mjs__WEBPACK_IMPORTED_MODULE_8__["default"](trace, {
33691
+ jsonPointer,
33692
+ referenceTokens,
33693
+ strictArrays,
33694
+ strictObjects,
33695
+ realm,
33696
+ value
33697
+ }) : null;
33698
+ try {
33699
+ let output;
33700
+ if (!parseResult.success) {
33701
+ let message = `Invalid JSON Pointer: "${jsonPointer}". Syntax error at position ${parseResult.maxMatched}`;
33702
+ message += parseTrace ? `, expected ${parseTrace.inferExpectations()}` : '';
33703
+ throw new _errors_JSONPointerEvaluateError_mjs__WEBPACK_IMPORTED_MODULE_4__["default"](message, {
33704
+ jsonPointer,
33705
+ currentValue: value,
33706
+ realm: realm.name
33707
+ });
33708
+ }
33709
+ return referenceTokens.reduce((current, referenceToken, referenceTokenPosition) => {
33710
+ if (realm.isArray(current)) {
33711
+ if ((0,_test_array_dash_mjs__WEBPACK_IMPORTED_MODULE_1__["default"])(referenceToken)) {
33712
+ if (strictArrays) {
33713
+ throw new _errors_JSONPointerIndexError_mjs__WEBPACK_IMPORTED_MODULE_6__["default"](`Invalid array index "-" at position ${referenceTokenPosition} in "${jsonPointer}". The "-" token always refers to a nonexistent element during evaluation`, {
33714
+ jsonPointer,
33715
+ referenceTokens,
33716
+ referenceToken,
33717
+ referenceTokenPosition,
33718
+ currentValue: current,
33719
+ realm: realm.name
33720
+ });
33721
+ } else {
33722
+ output = realm.evaluate(current, String(realm.sizeOf(current)));
33723
+ tracer === null || tracer === void 0 || tracer.step({
33724
+ referenceToken,
33725
+ input: current,
33726
+ output
33727
+ });
33728
+ return output;
33729
+ }
33730
+ }
33731
+ if (strictArrays && !(0,_test_array_index_mjs__WEBPACK_IMPORTED_MODULE_2__["default"])(referenceToken)) {
33732
+ throw new _errors_JSONPointerIndexError_mjs__WEBPACK_IMPORTED_MODULE_6__["default"](`Invalid array index "${referenceToken}" at position ${referenceTokenPosition} in "${jsonPointer}": index MUST be "0", or digits without a leading "0"`, {
33733
+ jsonPointer,
33734
+ referenceTokens,
33735
+ referenceToken,
33736
+ referenceTokenPosition,
33737
+ currentValue: current,
33738
+ realm: realm.name
33739
+ });
33740
+ }
33741
+ const index = Number(referenceToken);
33742
+ if (!Number.isSafeInteger(index)) {
33743
+ throw new _errors_JSONPointerIndexError_mjs__WEBPACK_IMPORTED_MODULE_6__["default"](`Invalid array index "${referenceToken}" at position ${referenceTokenPosition} in "${jsonPointer}": index must be a safe integer`, {
33744
+ jsonPointer,
33745
+ referenceTokens,
33746
+ referenceToken,
33747
+ referenceTokenPosition,
33748
+ currentValue: current,
33749
+ realm: realm.name
33750
+ });
33751
+ }
33752
+ if (!realm.has(current, referenceToken) && strictArrays) {
33753
+ throw new _errors_JSONPointerIndexError_mjs__WEBPACK_IMPORTED_MODULE_6__["default"](`Invalid array index "${referenceToken}" at position ${referenceTokenPosition} in "${jsonPointer}": out of bounds`, {
33754
+ jsonPointer,
33755
+ referenceTokens,
33756
+ referenceToken,
33757
+ referenceTokenPosition,
33758
+ currentValue: current,
33759
+ realm: realm.name
33760
+ });
33761
+ }
33762
+ output = realm.evaluate(current, referenceToken);
33763
+ tracer === null || tracer === void 0 || tracer.step({
33764
+ referenceToken,
33765
+ input: current,
33766
+ output
33767
+ });
33768
+ return output;
33769
+ }
33770
+ if (realm.isObject(current)) {
33771
+ if (!realm.has(current, referenceToken) && strictObjects) {
33772
+ throw new _errors_JSONPointerKeyError_mjs__WEBPACK_IMPORTED_MODULE_7__["default"](`Invalid object key "${referenceToken}" at position ${referenceTokenPosition} in "${jsonPointer}": key not found in object`, {
33773
+ jsonPointer,
33774
+ referenceTokens,
33775
+ referenceToken,
33776
+ referenceTokenPosition,
33777
+ currentValue: current,
33778
+ realm: realm.name
33779
+ });
33780
+ }
33781
+ output = realm.evaluate(current, referenceToken);
33782
+ tracer === null || tracer === void 0 || tracer.step({
33783
+ referenceToken,
33784
+ input: current,
33785
+ output
33786
+ });
33787
+ return output;
33788
+ }
33789
+ throw new _errors_JSONPointerTypeError_mjs__WEBPACK_IMPORTED_MODULE_5__["default"](`Invalid reference token "${referenceToken}" at position ${referenceTokenPosition} in "${jsonPointer}": cannot be applied to a non-object/non-array value`, {
33790
+ jsonPointer,
33791
+ referenceTokens,
33792
+ referenceToken,
33793
+ referenceTokenPosition,
33794
+ currentValue: current,
33795
+ realm: realm.name
33796
+ });
33797
+ }, value);
33798
+ } catch (error) {
33799
+ tracer === null || tracer === void 0 || tracer.step({
33800
+ referenceToken: error.referenceToken,
33801
+ input: error.currentValue,
33802
+ success: false,
33803
+ reason: error.message
33804
+ });
33805
+ if (error instanceof _errors_JSONPointerEvaluateError_mjs__WEBPACK_IMPORTED_MODULE_4__["default"]) {
33806
+ throw error;
33807
+ }
33808
+ throw new _errors_JSONPointerEvaluateError_mjs__WEBPACK_IMPORTED_MODULE_4__["default"]('Unexpected error during JSON Pointer evaluation', {
33809
+ cause: error,
33810
+ jsonPointer,
33811
+ referenceTokens
33812
+ });
33813
+ }
33814
+ };
33815
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (evaluate);
33816
+
31401
33817
  /***/ }),
31402
33818
 
31403
33819
  /***/ 89319:
@@ -32853,6 +35269,32 @@ class SourceMap extends minim__WEBPACK_IMPORTED_MODULE_0__.ArrayElement {
32853
35269
 
32854
35270
  /***/ }),
32855
35271
 
35272
+ /***/ 91560:
35273
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
35274
+
35275
+ "use strict";
35276
+ __webpack_require__.r(__webpack_exports__);
35277
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
35278
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
35279
+ /* harmony export */ });
35280
+ /* harmony import */ var apg_lite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(51751);
35281
+ /* harmony import */ var _grammar_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(36585);
35282
+
35283
+
35284
+ const grammar = new _grammar_mjs__WEBPACK_IMPORTED_MODULE_1__["default"]();
35285
+ const parser = new apg_lite__WEBPACK_IMPORTED_MODULE_0__.Parser();
35286
+ const testReferenceToken = referenceToken => {
35287
+ if (typeof referenceToken !== 'string') return false;
35288
+ try {
35289
+ return parser.parse(grammar, 'reference-token', referenceToken).success;
35290
+ } catch {
35291
+ return false;
35292
+ }
35293
+ };
35294
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (testReferenceToken);
35295
+
35296
+ /***/ }),
35297
+
32856
35298
  /***/ 91613:
32857
35299
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
32858
35300
 
@@ -33137,6 +35579,39 @@ class DefinitionsVisitor extends (0,ts_mixer__WEBPACK_IMPORTED_MODULE_0__.Mixin)
33137
35579
 
33138
35580
  /***/ }),
33139
35581
 
35582
+ /***/ 92802:
35583
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
35584
+
35585
+ "use strict";
35586
+ __webpack_require__.r(__webpack_exports__);
35587
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
35588
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
35589
+ /* harmony export */ });
35590
+ /* harmony import */ var apg_lite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(51751);
35591
+ /* harmony import */ var _callbacks_cst_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(52725);
35592
+
35593
+
35594
+ class CSTTranslator extends apg_lite__WEBPACK_IMPORTED_MODULE_0__.Ast {
35595
+ constructor() {
35596
+ super();
35597
+ this.callbacks['json-pointer'] = (0,_callbacks_cst_mjs__WEBPACK_IMPORTED_MODULE_1__["default"])('json-pointer');
35598
+ this.callbacks['reference-token'] = (0,_callbacks_cst_mjs__WEBPACK_IMPORTED_MODULE_1__["default"])('reference-token');
35599
+ this.callbacks['slash'] = (0,_callbacks_cst_mjs__WEBPACK_IMPORTED_MODULE_1__["default"])('text');
35600
+ }
35601
+ getTree() {
35602
+ const data = {
35603
+ stack: [],
35604
+ root: null
35605
+ };
35606
+ this.translate(data);
35607
+ delete data.stack;
35608
+ return data;
35609
+ }
35610
+ }
35611
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CSTTranslator);
35612
+
35613
+ /***/ }),
35614
+
33140
35615
  /***/ 92935:
33141
35616
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
33142
35617
 
@@ -33145,7 +35620,7 @@ __webpack_require__.r(__webpack_exports__);
33145
35620
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
33146
35621
  /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
33147
35622
  /* harmony export */ });
33148
- /* harmony import */ var _escape_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(87129);
35623
+ /* harmony import */ var _swaggerexpert_json_pointer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(61198);
33149
35624
  /* harmony import */ var _errors_CompilationJsonPointerError_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(41428);
33150
35625
 
33151
35626
 
@@ -33154,15 +35629,15 @@ __webpack_require__.r(__webpack_exports__);
33154
35629
  */
33155
35630
  const compile = tokens => {
33156
35631
  try {
33157
- if (tokens.length === 0) {
33158
- return '';
33159
- }
33160
- return `/${tokens.map(_escape_mjs__WEBPACK_IMPORTED_MODULE_0__["default"]).join('/')}`;
35632
+ return _swaggerexpert_json_pointer__WEBPACK_IMPORTED_MODULE_0__.URIFragmentIdentifier.to((0,_swaggerexpert_json_pointer__WEBPACK_IMPORTED_MODULE_0__.compile)(tokens)).slice(1);
33161
35633
  } catch (error) {
33162
- throw new _errors_CompilationJsonPointerError_mjs__WEBPACK_IMPORTED_MODULE_1__["default"]('JSON Pointer compilation of tokens encountered an error.', {
33163
- tokens,
33164
- cause: error
33165
- });
35634
+ if (error instanceof _swaggerexpert_json_pointer__WEBPACK_IMPORTED_MODULE_0__.JSONPointerCompileError) {
35635
+ throw new _errors_CompilationJsonPointerError_mjs__WEBPACK_IMPORTED_MODULE_1__["default"](error.message, {
35636
+ tokens,
35637
+ cause: error
35638
+ });
35639
+ }
35640
+ throw error;
33166
35641
  }
33167
35642
  };
33168
35643
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (compile);
@@ -35038,6 +37513,43 @@ class License extends _swagger_api_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODUL
35038
37513
 
35039
37514
  /***/ }),
35040
37515
 
37516
+ /***/ 96901:
37517
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
37518
+
37519
+ "use strict";
37520
+ __webpack_require__.r(__webpack_exports__);
37521
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
37522
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
37523
+ /* harmony export */ });
37524
+ /* harmony import */ var _escape_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(27123);
37525
+ /* harmony import */ var _errors_JSONPointerCompileError_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(42144);
37526
+
37527
+
37528
+ const compile = referenceTokens => {
37529
+ if (!Array.isArray(referenceTokens)) {
37530
+ throw new TypeError('Reference tokens must be a list of strings or numbers');
37531
+ }
37532
+ try {
37533
+ if (referenceTokens.length === 0) {
37534
+ return '';
37535
+ }
37536
+ return `/${referenceTokens.map(referenceToken => {
37537
+ if (typeof referenceToken !== 'string' && typeof referenceToken !== 'number') {
37538
+ throw new TypeError('Reference token must be a string or number');
37539
+ }
37540
+ return (0,_escape_mjs__WEBPACK_IMPORTED_MODULE_1__["default"])(String(referenceToken));
37541
+ }).join('/')}`;
37542
+ } catch (error) {
37543
+ throw new _errors_JSONPointerCompileError_mjs__WEBPACK_IMPORTED_MODULE_0__["default"]('Unexpected error during JSON Pointer compilation', {
37544
+ cause: error,
37545
+ referenceTokens
37546
+ });
37547
+ }
37548
+ };
37549
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (compile);
37550
+
37551
+ /***/ }),
37552
+
35041
37553
  /***/ 96903:
35042
37554
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
35043
37555
 
@@ -36118,48 +38630,6 @@ class MediaTypeEncoding extends _swagger_api_apidom_core__WEBPACK_IMPORTED_MODUL
36118
38630
 
36119
38631
  /***/ }),
36120
38632
 
36121
- /***/ 98675:
36122
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
36123
-
36124
- "use strict";
36125
- __webpack_require__.r(__webpack_exports__);
36126
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
36127
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
36128
- /* harmony export */ });
36129
- /* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39088);
36130
-
36131
-
36132
- /**
36133
- * Replace a substring or regex match in a string with a replacement.
36134
- *
36135
- * The first two parameters correspond to the parameters of the
36136
- * `String.prototype.replace()` function, so the second parameter can also be a
36137
- * function.
36138
- *
36139
- * @func
36140
- * @memberOf R
36141
- * @since v0.7.0
36142
- * @category String
36143
- * @sig RegExp|String -> String -> String -> String
36144
- * @param {RegExp|String} pattern A regular expression or a substring to match.
36145
- * @param {String} replacement The string to replace the matches with.
36146
- * @param {String} str The String to do the search and replacement in.
36147
- * @return {String} The result.
36148
- * @example
36149
- *
36150
- * R.replace('foo', 'bar', 'foo foo foo'); //=> 'bar foo foo'
36151
- * R.replace(/foo/, 'bar', 'foo foo foo'); //=> 'bar foo foo'
36152
- *
36153
- * // Use the "g" (global) flag to replace all occurrences:
36154
- * R.replace(/foo/g, 'bar', 'foo foo foo'); //=> 'bar bar bar'
36155
- */
36156
- var replace = /*#__PURE__*/(0,_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function replace(regex, replacement, str) {
36157
- return str.replace(regex, replacement);
36158
- });
36159
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (replace);
36160
-
36161
- /***/ }),
36162
-
36163
38633
  /***/ 99306:
36164
38634
  /***/ ((module) => {
36165
38635
 
@@ -36353,6 +38823,64 @@ class HeaderContent extends _swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_0_
36353
38823
 
36354
38824
  /***/ }),
36355
38825
 
38826
+ /***/ 99799:
38827
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
38828
+
38829
+ "use strict";
38830
+ __webpack_require__.r(__webpack_exports__);
38831
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
38832
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
38833
+ /* harmony export */ });
38834
+ /* harmony import */ var _EvaluationRealm_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(59408);
38835
+ /* harmony import */ var _errors_JSONPointerEvaluateError_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(924);
38836
+ function _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }
38837
+ function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
38838
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
38839
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
38840
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
38841
+ function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
38842
+
38843
+
38844
+ var _CompositeEvaluationRealm_brand = /*#__PURE__*/new WeakSet();
38845
+ class CompositeEvaluationRealm extends _EvaluationRealm_mjs__WEBPACK_IMPORTED_MODULE_0__["default"] {
38846
+ constructor(realms) {
38847
+ super();
38848
+ _classPrivateMethodInitSpec(this, _CompositeEvaluationRealm_brand);
38849
+ _defineProperty(this, "name", 'composite');
38850
+ _defineProperty(this, "realms", []);
38851
+ this.realms = realms;
38852
+ }
38853
+ isArray(node) {
38854
+ return _assertClassBrand(_CompositeEvaluationRealm_brand, this, _findRealm).call(this, node).isArray(node);
38855
+ }
38856
+ isObject(node) {
38857
+ return _assertClassBrand(_CompositeEvaluationRealm_brand, this, _findRealm).call(this, node).isObject(node);
38858
+ }
38859
+ sizeOf(node) {
38860
+ return _assertClassBrand(_CompositeEvaluationRealm_brand, this, _findRealm).call(this, node).sizeOf(node);
38861
+ }
38862
+ has(node, referenceToken) {
38863
+ return _assertClassBrand(_CompositeEvaluationRealm_brand, this, _findRealm).call(this, node).has(node, referenceToken);
38864
+ }
38865
+ evaluate(node, referenceToken) {
38866
+ return _assertClassBrand(_CompositeEvaluationRealm_brand, this, _findRealm).call(this, node).evaluate(node, referenceToken);
38867
+ }
38868
+ }
38869
+ function _findRealm(node) {
38870
+ for (const realm of this.realms) {
38871
+ if (realm.isArray(node) || realm.isObject(node)) {
38872
+ return realm;
38873
+ }
38874
+ }
38875
+ throw new _errors_JSONPointerEvaluateError_mjs__WEBPACK_IMPORTED_MODULE_1__["default"]('No suitable evaluation realm found for value', {
38876
+ currentValue: node
38877
+ });
38878
+ }
38879
+ const compose = (...realms) => new CompositeEvaluationRealm(realms);
38880
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (compose);
38881
+
38882
+ /***/ }),
38883
+
36356
38884
  /***/ 99852:
36357
38885
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
36358
38886