swagger-client 3.33.0 → 3.33.2
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.
- package/dist/swagger-client.browser.js +1947 -838
- package/dist/swagger-client.browser.min.js +1 -1
- package/dist/swagger-client.browser.min.js.map +1 -1
- package/es/execute/index.js +16 -9
- package/es/execute/oas3/parameter-builders.js +25 -6
- package/es/helpers/cookie-value-encoder.js +5 -0
- package/es/index.js +1 -0
- package/es/resolver/strategies/openapi-3-1-apidom/resolve.js +1 -1
- package/lib/execute/index.js +15 -8
- package/lib/execute/oas3/parameter-builders.js +25 -6
- package/lib/helpers/cookie-value-encoder.js +9 -0
- package/lib/index.js +1 -0
- package/lib/resolver/strategies/openapi-3-1-apidom/resolve.js +1 -1
- package/package.json +3 -3
|
@@ -40,12 +40,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
40
40
|
/* harmony export */ execute: () => (/* binding */ execute),
|
|
41
41
|
/* harmony export */ self: () => (/* binding */ self)
|
|
42
42
|
/* harmony export */ });
|
|
43
|
-
/* harmony import */ var
|
|
44
|
-
/* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(43628);
|
|
43
|
+
/* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(43628);
|
|
45
44
|
/* harmony import */ var ramda_adjunct__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(24955);
|
|
46
|
-
/* harmony import */ var
|
|
45
|
+
/* harmony import */ var ramda_adjunct__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(46455);
|
|
46
|
+
/* harmony import */ var openapi_server_url_templating__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(29646);
|
|
47
|
+
/* harmony import */ var _swaggerexpert_cookie__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2211);
|
|
47
48
|
/* harmony import */ var _swagger_api_apidom_error__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(22874);
|
|
48
|
-
/* harmony import */ var
|
|
49
|
+
/* harmony import */ var _swagger_api_apidom_reference_configuration_empty__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(96664);
|
|
49
50
|
/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3832);
|
|
50
51
|
/* harmony import */ var _http_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(51670);
|
|
51
52
|
/* harmony import */ var _http_serializers_request_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(29382);
|
|
@@ -318,13 +319,20 @@ function buildRequest(options) {
|
|
|
318
319
|
// If the cookie convenience object exists in our request,
|
|
319
320
|
// serialize its content and then delete the cookie object.
|
|
320
321
|
if (req.cookies && Object.keys(req.cookies).length) {
|
|
321
|
-
const cookieString =
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
322
|
+
const cookieString = (0,_swaggerexpert_cookie__WEBPACK_IMPORTED_MODULE_1__.serializeCookie)(req.cookies, {
|
|
323
|
+
encoders: {
|
|
324
|
+
value: _swaggerexpert_cookie__WEBPACK_IMPORTED_MODULE_1__.cookieValueLenientEncoder
|
|
325
|
+
},
|
|
326
|
+
validators: {
|
|
327
|
+
name: _swaggerexpert_cookie__WEBPACK_IMPORTED_MODULE_1__.cookieNameLenientValidator,
|
|
328
|
+
value: _swaggerexpert_cookie__WEBPACK_IMPORTED_MODULE_1__.cookieValueLenientValidator
|
|
329
|
+
}
|
|
330
|
+
});
|
|
331
|
+
if ((0,ramda_adjunct__WEBPACK_IMPORTED_MODULE_14__["default"])(req.headers.Cookie)) {
|
|
332
|
+
req.headers.Cookie += `; ${cookieString}`;
|
|
333
|
+
} else {
|
|
334
|
+
req.headers.Cookie = cookieString;
|
|
335
|
+
}
|
|
328
336
|
}
|
|
329
337
|
if (req.cookies) {
|
|
330
338
|
// even if no cookies were defined, we need to remove
|
|
@@ -377,7 +385,7 @@ function oas3BaseUrl({
|
|
|
377
385
|
[selectedServerObj] = servers;
|
|
378
386
|
selectedServerUrl = selectedServerObj.url;
|
|
379
387
|
}
|
|
380
|
-
if ((0,
|
|
388
|
+
if ((0,openapi_server_url_templating__WEBPACK_IMPORTED_MODULE_0__.test)(selectedServerUrl, {
|
|
381
389
|
strict: true
|
|
382
390
|
})) {
|
|
383
391
|
const selectedServerVariables = Object.entries({
|
|
@@ -386,18 +394,18 @@ function oas3BaseUrl({
|
|
|
386
394
|
acc[serverVariableName] = serverVariable.default;
|
|
387
395
|
return acc;
|
|
388
396
|
}, {});
|
|
389
|
-
selectedServerUrl = (0,
|
|
397
|
+
selectedServerUrl = (0,openapi_server_url_templating__WEBPACK_IMPORTED_MODULE_0__.substitute)(selectedServerUrl, {
|
|
390
398
|
...selectedServerVariables,
|
|
391
399
|
...serverVariables
|
|
392
400
|
}, {
|
|
393
|
-
encoder: typeof serverVariableEncoder === 'function' ? serverVariableEncoder :
|
|
401
|
+
encoder: typeof serverVariableEncoder === 'function' ? serverVariableEncoder : ramda__WEBPACK_IMPORTED_MODULE_15__["default"]
|
|
394
402
|
});
|
|
395
403
|
}
|
|
396
404
|
return buildOas3UrlWithContext(selectedServerUrl, contextUrl);
|
|
397
405
|
}
|
|
398
406
|
function buildOas3UrlWithContext(ourUrl = '', contextUrl = '') {
|
|
399
407
|
// relative server url should be resolved against contextUrl
|
|
400
|
-
const parsedUrl = ourUrl && contextUrl ? parseURIReference(
|
|
408
|
+
const parsedUrl = ourUrl && contextUrl ? parseURIReference(_swagger_api_apidom_reference_configuration_empty__WEBPACK_IMPORTED_MODULE_16__.resolve(contextUrl, ourUrl)) : parseURIReference(ourUrl);
|
|
401
409
|
const parsedContextUrl = parseURIReference(contextUrl);
|
|
402
410
|
const computedScheme = stripNonAlpha(parsedUrl.protocol) || stripNonAlpha(parsedContextUrl.protocol);
|
|
403
411
|
const computedHost = parsedUrl.host || parsedContextUrl.host;
|
|
@@ -670,8 +678,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
670
678
|
/* harmony export */ query: () => (/* binding */ query)
|
|
671
679
|
/* harmony export */ });
|
|
672
680
|
/* harmony import */ var openapi_path_templating__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(61546);
|
|
673
|
-
/* harmony import */ var
|
|
674
|
-
/* harmony import */ var
|
|
681
|
+
/* harmony import */ var _swaggerexpert_cookie__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2211);
|
|
682
|
+
/* harmony import */ var _style_serializer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(33838);
|
|
683
|
+
/* harmony import */ var _content_serializer_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(27986);
|
|
684
|
+
/* harmony import */ var _helpers_cookie_value_encoder_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(37499);
|
|
685
|
+
|
|
686
|
+
|
|
675
687
|
|
|
676
688
|
|
|
677
689
|
|
|
@@ -695,17 +707,17 @@ function path({
|
|
|
695
707
|
resolvedPathname = (0,openapi_path_templating__WEBPACK_IMPORTED_MODULE_0__.resolve)(pathname, {
|
|
696
708
|
[name]: value
|
|
697
709
|
}, {
|
|
698
|
-
encoder: val => (0,
|
|
710
|
+
encoder: val => (0,_style_serializer_js__WEBPACK_IMPORTED_MODULE_3__.encodeCharacters)((0,_content_serializer_js__WEBPACK_IMPORTED_MODULE_4__["default"])(val, effectiveMediaType))
|
|
699
711
|
});
|
|
700
712
|
} else {
|
|
701
713
|
resolvedPathname = (0,openapi_path_templating__WEBPACK_IMPORTED_MODULE_0__.resolve)(pathname, {
|
|
702
714
|
[name]: value
|
|
703
715
|
}, {
|
|
704
|
-
encoder: val => (0,
|
|
716
|
+
encoder: val => (0,_style_serializer_js__WEBPACK_IMPORTED_MODULE_3__["default"])({
|
|
705
717
|
key: parameter.name,
|
|
706
718
|
value: val,
|
|
707
719
|
style: style || 'simple',
|
|
708
|
-
explode: explode
|
|
720
|
+
explode: explode ?? false,
|
|
709
721
|
escape: 'reserved'
|
|
710
722
|
})
|
|
711
723
|
});
|
|
@@ -720,7 +732,7 @@ function query({
|
|
|
720
732
|
req.query = req.query || {};
|
|
721
733
|
if (value !== undefined && parameter.content) {
|
|
722
734
|
const effectiveMediaType = Object.keys(parameter.content)[0];
|
|
723
|
-
const serializedValue = (0,
|
|
735
|
+
const serializedValue = (0,_content_serializer_js__WEBPACK_IMPORTED_MODULE_4__["default"])(value, effectiveMediaType);
|
|
724
736
|
if (serializedValue) {
|
|
725
737
|
req.query[parameter.name] = serializedValue;
|
|
726
738
|
} else if (parameter.allowEmptyValue) {
|
|
@@ -768,11 +780,11 @@ function header({
|
|
|
768
780
|
}
|
|
769
781
|
if (value !== undefined && parameter.content) {
|
|
770
782
|
const effectiveMediaType = Object.keys(parameter.content)[0];
|
|
771
|
-
req.headers[parameter.name] = (0,
|
|
783
|
+
req.headers[parameter.name] = (0,_content_serializer_js__WEBPACK_IMPORTED_MODULE_4__["default"])(value, effectiveMediaType);
|
|
772
784
|
return;
|
|
773
785
|
}
|
|
774
786
|
if (value !== undefined && !(Array.isArray(value) && value.length === 0)) {
|
|
775
|
-
req.headers[parameter.name] = (0,
|
|
787
|
+
req.headers[parameter.name] = (0,_style_serializer_js__WEBPACK_IMPORTED_MODULE_3__["default"])({
|
|
776
788
|
key: parameter.name,
|
|
777
789
|
value,
|
|
778
790
|
style: parameter.style || 'simple',
|
|
@@ -786,21 +798,37 @@ function cookie({
|
|
|
786
798
|
parameter,
|
|
787
799
|
value
|
|
788
800
|
}) {
|
|
801
|
+
const {
|
|
802
|
+
name: cookieName
|
|
803
|
+
} = parameter;
|
|
789
804
|
req.headers = req.headers || {};
|
|
790
|
-
const type = typeof value;
|
|
791
805
|
if (value !== undefined && parameter.content) {
|
|
792
806
|
const effectiveMediaType = Object.keys(parameter.content)[0];
|
|
793
|
-
|
|
807
|
+
const cookieValue = (0,_content_serializer_js__WEBPACK_IMPORTED_MODULE_4__["default"])(value, effectiveMediaType);
|
|
808
|
+
req.headers.Cookie = (0,_swaggerexpert_cookie__WEBPACK_IMPORTED_MODULE_1__.serializeCookie)({
|
|
809
|
+
[cookieName]: cookieValue
|
|
810
|
+
}, {
|
|
811
|
+
encoders: {
|
|
812
|
+
value: _helpers_cookie_value_encoder_js__WEBPACK_IMPORTED_MODULE_2__["default"]
|
|
813
|
+
}
|
|
814
|
+
});
|
|
794
815
|
return;
|
|
795
816
|
}
|
|
796
817
|
if (value !== undefined && !(Array.isArray(value) && value.length === 0)) {
|
|
797
|
-
const
|
|
798
|
-
req.headers.Cookie = prefix + (0,_style_serializer_js__WEBPACK_IMPORTED_MODULE_1__["default"])({
|
|
818
|
+
const serializedValue = (0,_style_serializer_js__WEBPACK_IMPORTED_MODULE_3__["default"])({
|
|
799
819
|
key: parameter.name,
|
|
800
820
|
value,
|
|
801
821
|
escape: false,
|
|
802
822
|
style: parameter.style || 'form',
|
|
803
|
-
explode:
|
|
823
|
+
explode: parameter.explode ?? false
|
|
824
|
+
});
|
|
825
|
+
const cookieValue = Array.isArray(value) && parameter.explode ? `${cookieName}=${serializedValue}` : serializedValue;
|
|
826
|
+
req.headers.Cookie = (0,_swaggerexpert_cookie__WEBPACK_IMPORTED_MODULE_1__.serializeCookie)({
|
|
827
|
+
[cookieName]: cookieValue
|
|
828
|
+
}, {
|
|
829
|
+
encoders: {
|
|
830
|
+
value: _helpers_cookie_value_encoder_js__WEBPACK_IMPORTED_MODULE_2__["default"]
|
|
831
|
+
}
|
|
804
832
|
});
|
|
805
833
|
}
|
|
806
834
|
}
|
|
@@ -1268,6 +1296,23 @@ const {
|
|
|
1268
1296
|
|
|
1269
1297
|
/***/ }),
|
|
1270
1298
|
|
|
1299
|
+
/***/ 37499:
|
|
1300
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1301
|
+
|
|
1302
|
+
"use strict";
|
|
1303
|
+
__webpack_require__.r(__webpack_exports__);
|
|
1304
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1305
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
1306
|
+
/* harmony export */ });
|
|
1307
|
+
/* harmony import */ var _swaggerexpert_cookie__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2211);
|
|
1308
|
+
|
|
1309
|
+
const eqSignPE = '%3D';
|
|
1310
|
+
const ampersandPE = '%26';
|
|
1311
|
+
const cookieValueEncoder = cookieValue => (0,_swaggerexpert_cookie__WEBPACK_IMPORTED_MODULE_0__.cookieValueStrictEncoder)(cookieValue).replace(/[=&]/gu, match => match === '=' ? eqSignPE : ampersandPE);
|
|
1312
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cookieValueEncoder);
|
|
1313
|
+
|
|
1314
|
+
/***/ }),
|
|
1315
|
+
|
|
1271
1316
|
/***/ 28686:
|
|
1272
1317
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1273
1318
|
|
|
@@ -5990,7 +6035,7 @@ const resolveOpenAPI31Strategy = async options => {
|
|
|
5990
6035
|
} catch (error) {
|
|
5991
6036
|
if (error instanceof _swagger_api_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_23__["default"] || error instanceof _swagger_api_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_24__["default"]) {
|
|
5992
6037
|
return {
|
|
5993
|
-
spec
|
|
6038
|
+
spec,
|
|
5994
6039
|
errors: []
|
|
5995
6040
|
};
|
|
5996
6041
|
}
|
|
@@ -6163,349 +6208,6 @@ const makeResolveSubtree = defaultOptions => async (obj, path, options = {}) =>
|
|
|
6163
6208
|
strategies: [_resolver_strategies_openapi_3_0_index_js__WEBPACK_IMPORTED_MODULE_3__["default"], _resolver_strategies_openapi_2_index_js__WEBPACK_IMPORTED_MODULE_2__["default"], _resolver_strategies_generic_index_js__WEBPACK_IMPORTED_MODULE_1__["default"]]
|
|
6164
6209
|
}));
|
|
6165
6210
|
|
|
6166
|
-
/***/ }),
|
|
6167
|
-
|
|
6168
|
-
/***/ 57427:
|
|
6169
|
-
/***/ ((__unused_webpack_module, exports) => {
|
|
6170
|
-
|
|
6171
|
-
"use strict";
|
|
6172
|
-
/*!
|
|
6173
|
-
* cookie
|
|
6174
|
-
* Copyright(c) 2012-2014 Roman Shtylman
|
|
6175
|
-
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
6176
|
-
* MIT Licensed
|
|
6177
|
-
*/
|
|
6178
|
-
|
|
6179
|
-
|
|
6180
|
-
|
|
6181
|
-
/**
|
|
6182
|
-
* Module exports.
|
|
6183
|
-
* @public
|
|
6184
|
-
*/
|
|
6185
|
-
|
|
6186
|
-
exports.parse = parse;
|
|
6187
|
-
exports.serialize = serialize;
|
|
6188
|
-
|
|
6189
|
-
/**
|
|
6190
|
-
* Module variables.
|
|
6191
|
-
* @private
|
|
6192
|
-
*/
|
|
6193
|
-
|
|
6194
|
-
var __toString = Object.prototype.toString
|
|
6195
|
-
var __hasOwnProperty = Object.prototype.hasOwnProperty
|
|
6196
|
-
|
|
6197
|
-
/**
|
|
6198
|
-
* RegExp to match cookie-name in RFC 6265 sec 4.1.1
|
|
6199
|
-
* This refers out to the obsoleted definition of token in RFC 2616 sec 2.2
|
|
6200
|
-
* which has been replaced by the token definition in RFC 7230 appendix B.
|
|
6201
|
-
*
|
|
6202
|
-
* cookie-name = token
|
|
6203
|
-
* token = 1*tchar
|
|
6204
|
-
* tchar = "!" / "#" / "$" / "%" / "&" / "'" /
|
|
6205
|
-
* "*" / "+" / "-" / "." / "^" / "_" /
|
|
6206
|
-
* "`" / "|" / "~" / DIGIT / ALPHA
|
|
6207
|
-
*/
|
|
6208
|
-
|
|
6209
|
-
var cookieNameRegExp = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;
|
|
6210
|
-
|
|
6211
|
-
/**
|
|
6212
|
-
* RegExp to match cookie-value in RFC 6265 sec 4.1.1
|
|
6213
|
-
*
|
|
6214
|
-
* cookie-value = *cookie-octet / ( DQUOTE *cookie-octet DQUOTE )
|
|
6215
|
-
* cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E
|
|
6216
|
-
* ; US-ASCII characters excluding CTLs,
|
|
6217
|
-
* ; whitespace DQUOTE, comma, semicolon,
|
|
6218
|
-
* ; and backslash
|
|
6219
|
-
*/
|
|
6220
|
-
|
|
6221
|
-
var cookieValueRegExp = /^("?)[\u0021\u0023-\u002B\u002D-\u003A\u003C-\u005B\u005D-\u007E]*\1$/;
|
|
6222
|
-
|
|
6223
|
-
/**
|
|
6224
|
-
* RegExp to match domain-value in RFC 6265 sec 4.1.1
|
|
6225
|
-
*
|
|
6226
|
-
* domain-value = <subdomain>
|
|
6227
|
-
* ; defined in [RFC1034], Section 3.5, as
|
|
6228
|
-
* ; enhanced by [RFC1123], Section 2.1
|
|
6229
|
-
* <subdomain> = <label> | <subdomain> "." <label>
|
|
6230
|
-
* <label> = <let-dig> [ [ <ldh-str> ] <let-dig> ]
|
|
6231
|
-
* Labels must be 63 characters or less.
|
|
6232
|
-
* 'let-dig' not 'letter' in the first char, per RFC1123
|
|
6233
|
-
* <ldh-str> = <let-dig-hyp> | <let-dig-hyp> <ldh-str>
|
|
6234
|
-
* <let-dig-hyp> = <let-dig> | "-"
|
|
6235
|
-
* <let-dig> = <letter> | <digit>
|
|
6236
|
-
* <letter> = any one of the 52 alphabetic characters A through Z in
|
|
6237
|
-
* upper case and a through z in lower case
|
|
6238
|
-
* <digit> = any one of the ten digits 0 through 9
|
|
6239
|
-
*
|
|
6240
|
-
* Keep support for leading dot: https://github.com/jshttp/cookie/issues/173
|
|
6241
|
-
*
|
|
6242
|
-
* > (Note that a leading %x2E ("."), if present, is ignored even though that
|
|
6243
|
-
* character is not permitted, but a trailing %x2E ("."), if present, will
|
|
6244
|
-
* cause the user agent to ignore the attribute.)
|
|
6245
|
-
*/
|
|
6246
|
-
|
|
6247
|
-
var domainValueRegExp = /^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i;
|
|
6248
|
-
|
|
6249
|
-
/**
|
|
6250
|
-
* RegExp to match path-value in RFC 6265 sec 4.1.1
|
|
6251
|
-
*
|
|
6252
|
-
* path-value = <any CHAR except CTLs or ";">
|
|
6253
|
-
* CHAR = %x01-7F
|
|
6254
|
-
* ; defined in RFC 5234 appendix B.1
|
|
6255
|
-
*/
|
|
6256
|
-
|
|
6257
|
-
var pathValueRegExp = /^[\u0020-\u003A\u003D-\u007E]*$/;
|
|
6258
|
-
|
|
6259
|
-
/**
|
|
6260
|
-
* Parse a cookie header.
|
|
6261
|
-
*
|
|
6262
|
-
* Parse the given cookie header string into an object
|
|
6263
|
-
* The object has the various cookies as keys(names) => values
|
|
6264
|
-
*
|
|
6265
|
-
* @param {string} str
|
|
6266
|
-
* @param {object} [opt]
|
|
6267
|
-
* @return {object}
|
|
6268
|
-
* @public
|
|
6269
|
-
*/
|
|
6270
|
-
|
|
6271
|
-
function parse(str, opt) {
|
|
6272
|
-
if (typeof str !== 'string') {
|
|
6273
|
-
throw new TypeError('argument str must be a string');
|
|
6274
|
-
}
|
|
6275
|
-
|
|
6276
|
-
var obj = {};
|
|
6277
|
-
var len = str.length;
|
|
6278
|
-
// RFC 6265 sec 4.1.1, RFC 2616 2.2 defines a cookie name consists of one char minimum, plus '='.
|
|
6279
|
-
if (len < 2) return obj;
|
|
6280
|
-
|
|
6281
|
-
var dec = (opt && opt.decode) || decode;
|
|
6282
|
-
var index = 0;
|
|
6283
|
-
var eqIdx = 0;
|
|
6284
|
-
var endIdx = 0;
|
|
6285
|
-
|
|
6286
|
-
do {
|
|
6287
|
-
eqIdx = str.indexOf('=', index);
|
|
6288
|
-
if (eqIdx === -1) break; // No more cookie pairs.
|
|
6289
|
-
|
|
6290
|
-
endIdx = str.indexOf(';', index);
|
|
6291
|
-
|
|
6292
|
-
if (endIdx === -1) {
|
|
6293
|
-
endIdx = len;
|
|
6294
|
-
} else if (eqIdx > endIdx) {
|
|
6295
|
-
// backtrack on prior semicolon
|
|
6296
|
-
index = str.lastIndexOf(';', eqIdx - 1) + 1;
|
|
6297
|
-
continue;
|
|
6298
|
-
}
|
|
6299
|
-
|
|
6300
|
-
var keyStartIdx = startIndex(str, index, eqIdx);
|
|
6301
|
-
var keyEndIdx = endIndex(str, eqIdx, keyStartIdx);
|
|
6302
|
-
var key = str.slice(keyStartIdx, keyEndIdx);
|
|
6303
|
-
|
|
6304
|
-
// only assign once
|
|
6305
|
-
if (!__hasOwnProperty.call(obj, key)) {
|
|
6306
|
-
var valStartIdx = startIndex(str, eqIdx + 1, endIdx);
|
|
6307
|
-
var valEndIdx = endIndex(str, endIdx, valStartIdx);
|
|
6308
|
-
|
|
6309
|
-
if (str.charCodeAt(valStartIdx) === 0x22 /* " */ && str.charCodeAt(valEndIdx - 1) === 0x22 /* " */) {
|
|
6310
|
-
valStartIdx++;
|
|
6311
|
-
valEndIdx--;
|
|
6312
|
-
}
|
|
6313
|
-
|
|
6314
|
-
var val = str.slice(valStartIdx, valEndIdx);
|
|
6315
|
-
obj[key] = tryDecode(val, dec);
|
|
6316
|
-
}
|
|
6317
|
-
|
|
6318
|
-
index = endIdx + 1
|
|
6319
|
-
} while (index < len);
|
|
6320
|
-
|
|
6321
|
-
return obj;
|
|
6322
|
-
}
|
|
6323
|
-
|
|
6324
|
-
function startIndex(str, index, max) {
|
|
6325
|
-
do {
|
|
6326
|
-
var code = str.charCodeAt(index);
|
|
6327
|
-
if (code !== 0x20 /* */ && code !== 0x09 /* \t */) return index;
|
|
6328
|
-
} while (++index < max);
|
|
6329
|
-
return max;
|
|
6330
|
-
}
|
|
6331
|
-
|
|
6332
|
-
function endIndex(str, index, min) {
|
|
6333
|
-
while (index > min) {
|
|
6334
|
-
var code = str.charCodeAt(--index);
|
|
6335
|
-
if (code !== 0x20 /* */ && code !== 0x09 /* \t */) return index + 1;
|
|
6336
|
-
}
|
|
6337
|
-
return min;
|
|
6338
|
-
}
|
|
6339
|
-
|
|
6340
|
-
/**
|
|
6341
|
-
* Serialize data into a cookie header.
|
|
6342
|
-
*
|
|
6343
|
-
* Serialize a name value pair into a cookie string suitable for
|
|
6344
|
-
* http headers. An optional options object specifies cookie parameters.
|
|
6345
|
-
*
|
|
6346
|
-
* serialize('foo', 'bar', { httpOnly: true })
|
|
6347
|
-
* => "foo=bar; httpOnly"
|
|
6348
|
-
*
|
|
6349
|
-
* @param {string} name
|
|
6350
|
-
* @param {string} val
|
|
6351
|
-
* @param {object} [opt]
|
|
6352
|
-
* @return {string}
|
|
6353
|
-
* @public
|
|
6354
|
-
*/
|
|
6355
|
-
|
|
6356
|
-
function serialize(name, val, opt) {
|
|
6357
|
-
var enc = (opt && opt.encode) || encodeURIComponent;
|
|
6358
|
-
|
|
6359
|
-
if (typeof enc !== 'function') {
|
|
6360
|
-
throw new TypeError('option encode is invalid');
|
|
6361
|
-
}
|
|
6362
|
-
|
|
6363
|
-
if (!cookieNameRegExp.test(name)) {
|
|
6364
|
-
throw new TypeError('argument name is invalid');
|
|
6365
|
-
}
|
|
6366
|
-
|
|
6367
|
-
var value = enc(val);
|
|
6368
|
-
|
|
6369
|
-
if (!cookieValueRegExp.test(value)) {
|
|
6370
|
-
throw new TypeError('argument val is invalid');
|
|
6371
|
-
}
|
|
6372
|
-
|
|
6373
|
-
var str = name + '=' + value;
|
|
6374
|
-
if (!opt) return str;
|
|
6375
|
-
|
|
6376
|
-
if (null != opt.maxAge) {
|
|
6377
|
-
var maxAge = Math.floor(opt.maxAge);
|
|
6378
|
-
|
|
6379
|
-
if (!isFinite(maxAge)) {
|
|
6380
|
-
throw new TypeError('option maxAge is invalid')
|
|
6381
|
-
}
|
|
6382
|
-
|
|
6383
|
-
str += '; Max-Age=' + maxAge;
|
|
6384
|
-
}
|
|
6385
|
-
|
|
6386
|
-
if (opt.domain) {
|
|
6387
|
-
if (!domainValueRegExp.test(opt.domain)) {
|
|
6388
|
-
throw new TypeError('option domain is invalid');
|
|
6389
|
-
}
|
|
6390
|
-
|
|
6391
|
-
str += '; Domain=' + opt.domain;
|
|
6392
|
-
}
|
|
6393
|
-
|
|
6394
|
-
if (opt.path) {
|
|
6395
|
-
if (!pathValueRegExp.test(opt.path)) {
|
|
6396
|
-
throw new TypeError('option path is invalid');
|
|
6397
|
-
}
|
|
6398
|
-
|
|
6399
|
-
str += '; Path=' + opt.path;
|
|
6400
|
-
}
|
|
6401
|
-
|
|
6402
|
-
if (opt.expires) {
|
|
6403
|
-
var expires = opt.expires
|
|
6404
|
-
|
|
6405
|
-
if (!isDate(expires) || isNaN(expires.valueOf())) {
|
|
6406
|
-
throw new TypeError('option expires is invalid');
|
|
6407
|
-
}
|
|
6408
|
-
|
|
6409
|
-
str += '; Expires=' + expires.toUTCString()
|
|
6410
|
-
}
|
|
6411
|
-
|
|
6412
|
-
if (opt.httpOnly) {
|
|
6413
|
-
str += '; HttpOnly';
|
|
6414
|
-
}
|
|
6415
|
-
|
|
6416
|
-
if (opt.secure) {
|
|
6417
|
-
str += '; Secure';
|
|
6418
|
-
}
|
|
6419
|
-
|
|
6420
|
-
if (opt.partitioned) {
|
|
6421
|
-
str += '; Partitioned'
|
|
6422
|
-
}
|
|
6423
|
-
|
|
6424
|
-
if (opt.priority) {
|
|
6425
|
-
var priority = typeof opt.priority === 'string'
|
|
6426
|
-
? opt.priority.toLowerCase() : opt.priority;
|
|
6427
|
-
|
|
6428
|
-
switch (priority) {
|
|
6429
|
-
case 'low':
|
|
6430
|
-
str += '; Priority=Low'
|
|
6431
|
-
break
|
|
6432
|
-
case 'medium':
|
|
6433
|
-
str += '; Priority=Medium'
|
|
6434
|
-
break
|
|
6435
|
-
case 'high':
|
|
6436
|
-
str += '; Priority=High'
|
|
6437
|
-
break
|
|
6438
|
-
default:
|
|
6439
|
-
throw new TypeError('option priority is invalid')
|
|
6440
|
-
}
|
|
6441
|
-
}
|
|
6442
|
-
|
|
6443
|
-
if (opt.sameSite) {
|
|
6444
|
-
var sameSite = typeof opt.sameSite === 'string'
|
|
6445
|
-
? opt.sameSite.toLowerCase() : opt.sameSite;
|
|
6446
|
-
|
|
6447
|
-
switch (sameSite) {
|
|
6448
|
-
case true:
|
|
6449
|
-
str += '; SameSite=Strict';
|
|
6450
|
-
break;
|
|
6451
|
-
case 'lax':
|
|
6452
|
-
str += '; SameSite=Lax';
|
|
6453
|
-
break;
|
|
6454
|
-
case 'strict':
|
|
6455
|
-
str += '; SameSite=Strict';
|
|
6456
|
-
break;
|
|
6457
|
-
case 'none':
|
|
6458
|
-
str += '; SameSite=None';
|
|
6459
|
-
break;
|
|
6460
|
-
default:
|
|
6461
|
-
throw new TypeError('option sameSite is invalid');
|
|
6462
|
-
}
|
|
6463
|
-
}
|
|
6464
|
-
|
|
6465
|
-
return str;
|
|
6466
|
-
}
|
|
6467
|
-
|
|
6468
|
-
/**
|
|
6469
|
-
* URL-decode string value. Optimized to skip native call when no %.
|
|
6470
|
-
*
|
|
6471
|
-
* @param {string} str
|
|
6472
|
-
* @returns {string}
|
|
6473
|
-
*/
|
|
6474
|
-
|
|
6475
|
-
function decode (str) {
|
|
6476
|
-
return str.indexOf('%') !== -1
|
|
6477
|
-
? decodeURIComponent(str)
|
|
6478
|
-
: str
|
|
6479
|
-
}
|
|
6480
|
-
|
|
6481
|
-
/**
|
|
6482
|
-
* Determine if value is a Date.
|
|
6483
|
-
*
|
|
6484
|
-
* @param {*} val
|
|
6485
|
-
* @private
|
|
6486
|
-
*/
|
|
6487
|
-
|
|
6488
|
-
function isDate (val) {
|
|
6489
|
-
return __toString.call(val) === '[object Date]';
|
|
6490
|
-
}
|
|
6491
|
-
|
|
6492
|
-
/**
|
|
6493
|
-
* Try decoding a string using a decoding function.
|
|
6494
|
-
*
|
|
6495
|
-
* @param {string} str
|
|
6496
|
-
* @param {function} decode
|
|
6497
|
-
* @private
|
|
6498
|
-
*/
|
|
6499
|
-
|
|
6500
|
-
function tryDecode(str, decode) {
|
|
6501
|
-
try {
|
|
6502
|
-
return decode(str);
|
|
6503
|
-
} catch (e) {
|
|
6504
|
-
return str;
|
|
6505
|
-
}
|
|
6506
|
-
}
|
|
6507
|
-
|
|
6508
|
-
|
|
6509
6211
|
/***/ }),
|
|
6510
6212
|
|
|
6511
6213
|
/***/ 14744:
|
|
@@ -38255,259 +37957,1753 @@ const unsanitize = uri => {
|
|
|
38255
37957
|
|
|
38256
37958
|
/***/ }),
|
|
38257
37959
|
|
|
38258
|
-
/***/
|
|
37960
|
+
/***/ 34389:
|
|
38259
37961
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
38260
37962
|
|
|
38261
37963
|
"use strict";
|
|
38262
37964
|
__webpack_require__.r(__webpack_exports__);
|
|
38263
37965
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
38264
|
-
/* harmony export */
|
|
38265
|
-
/* harmony export */ Parser: () => (/* binding */ Parser),
|
|
38266
|
-
/* harmony export */ Stats: () => (/* binding */ Stats),
|
|
38267
|
-
/* harmony export */ Trace: () => (/* binding */ Trace),
|
|
38268
|
-
/* harmony export */ identifiers: () => (/* binding */ identifiers),
|
|
38269
|
-
/* harmony export */ utilities: () => (/* binding */ utilities)
|
|
37966
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
38270
37967
|
/* harmony export */ });
|
|
38271
|
-
/*
|
|
38272
|
-
* copyright: Copyright (c) 2023 Lowell D. Thomas, all rights reserved
|
|
38273
|
-
* license: BSD-2-Clause (https://opensource.org/licenses/BSD-2-Clause)
|
|
38274
|
-
*
|
|
38275
|
-
* Redistribution and use in source and binary forms, with or without
|
|
38276
|
-
* modification, are permitted provided that the following conditions are met:
|
|
38277
|
-
*
|
|
38278
|
-
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
38279
|
-
* list of conditions and the following disclaimer.
|
|
38280
|
-
*
|
|
38281
|
-
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
38282
|
-
* this list of conditions and the following disclaimer in the documentation
|
|
38283
|
-
* and/or other materials provided with the distribution.
|
|
38284
|
-
*
|
|
38285
|
-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
38286
|
-
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
38287
|
-
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
38288
|
-
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
38289
|
-
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
38290
|
-
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
38291
|
-
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
38292
|
-
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
38293
|
-
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
38294
|
-
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
38295
|
-
*
|
|
38296
|
-
* ********************************************************************************* */
|
|
37968
|
+
/* harmony import */ var apg_lite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16646);
|
|
38297
37969
|
|
|
37970
|
+
const cookieName = (state, chars, phraseIndex, phraseLength, data) => {
|
|
37971
|
+
if (state === apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_PRE) {
|
|
37972
|
+
data.push(['cookie-name', apg_lite__WEBPACK_IMPORTED_MODULE_0__.utilities.charsToString(chars, phraseIndex, phraseLength)]);
|
|
37973
|
+
} else if (state === apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_POST) {
|
|
37974
|
+
/* not used in this example */
|
|
37975
|
+
}
|
|
37976
|
+
return apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_OK;
|
|
37977
|
+
};
|
|
37978
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cookieName);
|
|
38298
37979
|
|
|
38299
|
-
|
|
38300
|
-
const id = identifiers;
|
|
38301
|
-
const utils = utilities;
|
|
38302
|
-
const p = this;
|
|
38303
|
-
const thisFileName = 'parser.js: Parser(): ';
|
|
38304
|
-
const systemData = function systemData() {
|
|
38305
|
-
this.state = id.ACTIVE;
|
|
38306
|
-
this.phraseLength = 0;
|
|
38307
|
-
this.refresh = () => {
|
|
38308
|
-
this.state = id.ACTIVE;
|
|
38309
|
-
this.phraseLength = 0;
|
|
38310
|
-
};
|
|
38311
|
-
};
|
|
38312
|
-
p.ast = undefined;
|
|
38313
|
-
p.stats = undefined;
|
|
38314
|
-
p.trace = undefined;
|
|
38315
|
-
p.callbacks = [];
|
|
38316
|
-
let lookAhead = 0;
|
|
38317
|
-
let treeDepth = 0;
|
|
38318
|
-
let maxTreeDepth = 0;
|
|
38319
|
-
let nodeHits = 0;
|
|
38320
|
-
let maxMatched = 0;
|
|
38321
|
-
let rules = undefined;
|
|
38322
|
-
let udts = undefined;
|
|
38323
|
-
let opcodes = undefined;
|
|
38324
|
-
let chars = undefined;
|
|
38325
|
-
let sysData = new systemData();
|
|
38326
|
-
let ruleCallbacks = undefined;
|
|
38327
|
-
let udtCallbacks = undefined;
|
|
38328
|
-
let userData = undefined;
|
|
38329
|
-
const clear = () => {
|
|
38330
|
-
lookAhead = 0;
|
|
38331
|
-
treeDepth = 0;
|
|
38332
|
-
maxTreeDepth = 0;
|
|
38333
|
-
nodeHits = 0;
|
|
38334
|
-
maxMatched = 0;
|
|
38335
|
-
rules = undefined;
|
|
38336
|
-
udts = undefined;
|
|
38337
|
-
opcodes = undefined;
|
|
38338
|
-
chars = undefined;
|
|
38339
|
-
sysData.refresh();
|
|
38340
|
-
ruleCallbacks = undefined;
|
|
38341
|
-
udtCallbacks = undefined;
|
|
38342
|
-
userData = undefined;
|
|
38343
|
-
};
|
|
37980
|
+
/***/ }),
|
|
38344
37981
|
|
|
38345
|
-
|
|
38346
|
-
|
|
38347
|
-
let i;
|
|
38348
|
-
ruleCallbacks = [];
|
|
38349
|
-
udtCallbacks = [];
|
|
38350
|
-
for (i = 0; i < rules.length; i += 1) {
|
|
38351
|
-
ruleCallbacks[i] = undefined;
|
|
38352
|
-
}
|
|
38353
|
-
for (i = 0; i < udts.length; i += 1) {
|
|
38354
|
-
udtCallbacks[i] = undefined;
|
|
38355
|
-
}
|
|
38356
|
-
let func;
|
|
38357
|
-
const list = [];
|
|
38358
|
-
for (i = 0; i < rules.length; i += 1) {
|
|
38359
|
-
list.push(rules[i].lower);
|
|
38360
|
-
}
|
|
38361
|
-
for (i = 0; i < udts.length; i += 1) {
|
|
38362
|
-
list.push(udts[i].lower);
|
|
38363
|
-
}
|
|
38364
|
-
for (const index in p.callbacks) {
|
|
38365
|
-
if (p.callbacks.hasOwnProperty(index)) {
|
|
38366
|
-
i = list.indexOf(index.toLowerCase());
|
|
38367
|
-
if (i < 0) {
|
|
38368
|
-
throw new Error(`${functionName}syntax callback '${index}' not a rule or udt name`);
|
|
38369
|
-
}
|
|
38370
|
-
func = p.callbacks[index] ? p.callbacks[index] : undefined;
|
|
38371
|
-
if (typeof func === 'function' || func === undefined) {
|
|
38372
|
-
if (i < rules.length) {
|
|
38373
|
-
ruleCallbacks[i] = func;
|
|
38374
|
-
} else {
|
|
38375
|
-
udtCallbacks[i - rules.length] = func;
|
|
38376
|
-
}
|
|
38377
|
-
} else {
|
|
38378
|
-
throw new Error(`${functionName}syntax callback[${index}] must be function reference or falsy)`);
|
|
38379
|
-
}
|
|
38380
|
-
}
|
|
38381
|
-
}
|
|
38382
|
-
};
|
|
37982
|
+
/***/ 36168:
|
|
37983
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
38383
37984
|
|
|
38384
|
-
|
|
38385
|
-
|
|
38386
|
-
|
|
38387
|
-
|
|
38388
|
-
|
|
38389
|
-
|
|
38390
|
-
|
|
38391
|
-
|
|
38392
|
-
|
|
38393
|
-
|
|
38394
|
-
|
|
38395
|
-
|
|
38396
|
-
|
|
38397
|
-
|
|
38398
|
-
|
|
38399
|
-
|
|
38400
|
-
|
|
38401
|
-
|
|
38402
|
-
|
|
38403
|
-
|
|
38404
|
-
|
|
38405
|
-
|
|
38406
|
-
|
|
38407
|
-
|
|
38408
|
-
|
|
38409
|
-
|
|
38410
|
-
|
|
38411
|
-
|
|
38412
|
-
|
|
38413
|
-
|
|
38414
|
-
|
|
38415
|
-
|
|
38416
|
-
|
|
38417
|
-
type: id.RNM,
|
|
38418
|
-
index: startIndex,
|
|
38419
|
-
},
|
|
38420
|
-
];
|
|
38421
|
-
/* execute the start rule */
|
|
38422
|
-
opExecute(0, 0);
|
|
38423
|
-
opcodes = undefined;
|
|
38424
|
-
/* test and return the sysData */
|
|
38425
|
-
let success = false;
|
|
38426
|
-
switch (sysData.state) {
|
|
38427
|
-
case id.ACTIVE:
|
|
38428
|
-
throw new Error(`${functionName}final state should never be 'ACTIVE'`);
|
|
38429
|
-
case id.NOMATCH:
|
|
38430
|
-
success = false;
|
|
38431
|
-
break;
|
|
38432
|
-
case id.EMPTY:
|
|
38433
|
-
case id.MATCH:
|
|
38434
|
-
if (sysData.phraseLength === chars.length) {
|
|
38435
|
-
success = true;
|
|
38436
|
-
} else {
|
|
38437
|
-
success = false;
|
|
38438
|
-
}
|
|
38439
|
-
break;
|
|
38440
|
-
default:
|
|
38441
|
-
throw new Error('unrecognized state');
|
|
38442
|
-
}
|
|
38443
|
-
return {
|
|
38444
|
-
success,
|
|
38445
|
-
state: sysData.state,
|
|
38446
|
-
stateName: id.idName(sysData.state),
|
|
38447
|
-
length: chars.length,
|
|
38448
|
-
matched: sysData.phraseLength,
|
|
38449
|
-
maxMatched,
|
|
38450
|
-
maxTreeDepth,
|
|
38451
|
-
nodeHits,
|
|
38452
|
-
};
|
|
38453
|
-
};
|
|
38454
|
-
// The `ALT` operator.<br>
|
|
38455
|
-
// Executes its child nodes, from left to right, until it finds a match.
|
|
38456
|
-
// Fails if *all* of its child nodes fail.
|
|
38457
|
-
const opALT = (opIndex, phraseIndex) => {
|
|
38458
|
-
const op = opcodes[opIndex];
|
|
38459
|
-
for (let i = 0; i < op.children.length; i += 1) {
|
|
38460
|
-
opExecute(op.children[i], phraseIndex);
|
|
38461
|
-
if (sysData.state !== id.NOMATCH) {
|
|
38462
|
-
break;
|
|
38463
|
-
}
|
|
38464
|
-
}
|
|
38465
|
-
};
|
|
38466
|
-
// The `CAT` operator.<br>
|
|
38467
|
-
// Executes all of its child nodes, from left to right,
|
|
38468
|
-
// concatenating the matched phrases.
|
|
38469
|
-
// Fails if *any* child nodes fail.
|
|
38470
|
-
const opCAT = (opIndex, phraseIndex) => {
|
|
38471
|
-
let success;
|
|
38472
|
-
let astLength;
|
|
38473
|
-
let catCharIndex;
|
|
38474
|
-
let catPhrase;
|
|
38475
|
-
const op = opcodes[opIndex];
|
|
38476
|
-
if (p.ast) {
|
|
38477
|
-
astLength = p.ast.getLength();
|
|
38478
|
-
}
|
|
38479
|
-
success = true;
|
|
38480
|
-
catCharIndex = phraseIndex;
|
|
38481
|
-
catPhrase = 0;
|
|
38482
|
-
for (let i = 0; i < op.children.length; i += 1) {
|
|
38483
|
-
opExecute(op.children[i], catCharIndex);
|
|
38484
|
-
if (sysData.state === id.NOMATCH) {
|
|
38485
|
-
success = false;
|
|
38486
|
-
break;
|
|
38487
|
-
} else {
|
|
38488
|
-
catCharIndex += sysData.phraseLength;
|
|
38489
|
-
catPhrase += sysData.phraseLength;
|
|
38490
|
-
}
|
|
38491
|
-
}
|
|
38492
|
-
if (success) {
|
|
38493
|
-
sysData.state = catPhrase === 0 ? id.EMPTY : id.MATCH;
|
|
38494
|
-
sysData.phraseLength = catPhrase;
|
|
38495
|
-
} else {
|
|
38496
|
-
sysData.state = id.NOMATCH;
|
|
38497
|
-
sysData.phraseLength = 0;
|
|
38498
|
-
if (p.ast) {
|
|
38499
|
-
p.ast.setLength(astLength);
|
|
38500
|
-
}
|
|
37985
|
+
"use strict";
|
|
37986
|
+
__webpack_require__.r(__webpack_exports__);
|
|
37987
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
37988
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
37989
|
+
/* harmony export */ });
|
|
37990
|
+
/* harmony import */ var apg_lite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16646);
|
|
37991
|
+
|
|
37992
|
+
const cookiePair = (state, chars, phraseIndex, phraseLength, data) => {
|
|
37993
|
+
if (state === apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_PRE) {
|
|
37994
|
+
data.push(['cookie-pair', apg_lite__WEBPACK_IMPORTED_MODULE_0__.utilities.charsToString(chars, phraseIndex, phraseLength)]);
|
|
37995
|
+
} else if (state === apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_POST) {
|
|
37996
|
+
/* not used in this example */
|
|
37997
|
+
}
|
|
37998
|
+
return apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_OK;
|
|
37999
|
+
};
|
|
38000
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cookiePair);
|
|
38001
|
+
|
|
38002
|
+
/***/ }),
|
|
38003
|
+
|
|
38004
|
+
/***/ 99511:
|
|
38005
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
38006
|
+
|
|
38007
|
+
"use strict";
|
|
38008
|
+
__webpack_require__.r(__webpack_exports__);
|
|
38009
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
38010
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
38011
|
+
/* harmony export */ });
|
|
38012
|
+
/* harmony import */ var apg_lite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16646);
|
|
38013
|
+
|
|
38014
|
+
const cookieString = (state, chars, phraseIndex, phraseLength, data) => {
|
|
38015
|
+
if (state === apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_PRE) {
|
|
38016
|
+
if (Array.isArray(data) === false) {
|
|
38017
|
+
throw new Error("parser's user data must be an array");
|
|
38501
38018
|
}
|
|
38019
|
+
data.push(['cookie-string', apg_lite__WEBPACK_IMPORTED_MODULE_0__.utilities.charsToString(chars, phraseIndex, phraseLength)]);
|
|
38020
|
+
}
|
|
38021
|
+
return apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_OK;
|
|
38022
|
+
};
|
|
38023
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cookieString);
|
|
38024
|
+
|
|
38025
|
+
/***/ }),
|
|
38026
|
+
|
|
38027
|
+
/***/ 80935:
|
|
38028
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
38029
|
+
|
|
38030
|
+
"use strict";
|
|
38031
|
+
__webpack_require__.r(__webpack_exports__);
|
|
38032
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
38033
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
38034
|
+
/* harmony export */ });
|
|
38035
|
+
/* harmony import */ var apg_lite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16646);
|
|
38036
|
+
|
|
38037
|
+
const cookieValue = (state, chars, phraseIndex, phraseLength, data) => {
|
|
38038
|
+
if (state === apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_PRE) {
|
|
38039
|
+
data.push(['cookie-value', apg_lite__WEBPACK_IMPORTED_MODULE_0__.utilities.charsToString(chars, phraseIndex, phraseLength)]);
|
|
38040
|
+
} else if (state === apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_POST) {
|
|
38041
|
+
/* not used in this example */
|
|
38042
|
+
}
|
|
38043
|
+
return apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_OK;
|
|
38044
|
+
};
|
|
38045
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cookieValue);
|
|
38046
|
+
|
|
38047
|
+
/***/ }),
|
|
38048
|
+
|
|
38049
|
+
/***/ 32910:
|
|
38050
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
38051
|
+
|
|
38052
|
+
"use strict";
|
|
38053
|
+
__webpack_require__.r(__webpack_exports__);
|
|
38054
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
38055
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
38056
|
+
/* harmony export */ });
|
|
38057
|
+
/* harmony import */ var apg_lite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16646);
|
|
38058
|
+
/* harmony import */ var _grammar_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(96552);
|
|
38059
|
+
/* harmony import */ var _callbacks_cookie_string_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(99511);
|
|
38060
|
+
/* harmony import */ var _callbacks_cookie_pair_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(36168);
|
|
38061
|
+
/* harmony import */ var _callbacks_cookie_name_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(34389);
|
|
38062
|
+
/* harmony import */ var _callbacks_cookie_value_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(80935);
|
|
38063
|
+
|
|
38064
|
+
|
|
38065
|
+
|
|
38066
|
+
|
|
38067
|
+
|
|
38068
|
+
|
|
38069
|
+
const grammar = new _grammar_mjs__WEBPACK_IMPORTED_MODULE_5__["default"]();
|
|
38070
|
+
const parse = (cookieString, {
|
|
38071
|
+
strict = true
|
|
38072
|
+
} = {}) => {
|
|
38073
|
+
const parser = new apg_lite__WEBPACK_IMPORTED_MODULE_0__.Parser();
|
|
38074
|
+
parser.ast = new apg_lite__WEBPACK_IMPORTED_MODULE_0__.Ast();
|
|
38075
|
+
if (strict) {
|
|
38076
|
+
parser.ast.callbacks['cookie-string'] = _callbacks_cookie_string_mjs__WEBPACK_IMPORTED_MODULE_1__["default"];
|
|
38077
|
+
parser.ast.callbacks['cookie-pair'] = _callbacks_cookie_pair_mjs__WEBPACK_IMPORTED_MODULE_2__["default"];
|
|
38078
|
+
parser.ast.callbacks['cookie-name'] = _callbacks_cookie_name_mjs__WEBPACK_IMPORTED_MODULE_3__["default"];
|
|
38079
|
+
parser.ast.callbacks['cookie-value'] = _callbacks_cookie_value_mjs__WEBPACK_IMPORTED_MODULE_4__["default"];
|
|
38080
|
+
} else {
|
|
38081
|
+
parser.ast.callbacks['lenient-cookie-string'] = _callbacks_cookie_string_mjs__WEBPACK_IMPORTED_MODULE_1__["default"];
|
|
38082
|
+
parser.ast.callbacks['lenient-cookie-pair'] = _callbacks_cookie_pair_mjs__WEBPACK_IMPORTED_MODULE_2__["default"];
|
|
38083
|
+
parser.ast.callbacks['lenient-cookie-name'] = _callbacks_cookie_name_mjs__WEBPACK_IMPORTED_MODULE_3__["default"];
|
|
38084
|
+
parser.ast.callbacks['lenient-cookie-value'] = _callbacks_cookie_value_mjs__WEBPACK_IMPORTED_MODULE_4__["default"];
|
|
38085
|
+
}
|
|
38086
|
+
const startRule = strict ? 'cookie-string' : 'lenient-cookie-string';
|
|
38087
|
+
const result = parser.parse(grammar, startRule, cookieString);
|
|
38088
|
+
return {
|
|
38089
|
+
result,
|
|
38090
|
+
ast: parser.ast
|
|
38502
38091
|
};
|
|
38503
|
-
|
|
38504
|
-
|
|
38505
|
-
|
|
38506
|
-
|
|
38507
|
-
|
|
38508
|
-
|
|
38509
|
-
|
|
38510
|
-
|
|
38092
|
+
};
|
|
38093
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (parse);
|
|
38094
|
+
|
|
38095
|
+
/***/ }),
|
|
38096
|
+
|
|
38097
|
+
/***/ 90465:
|
|
38098
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
38099
|
+
|
|
38100
|
+
"use strict";
|
|
38101
|
+
__webpack_require__.r(__webpack_exports__);
|
|
38102
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
38103
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
38104
|
+
/* harmony export */ });
|
|
38105
|
+
/* harmony import */ var _set_cookie_serialize_index_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(79080);
|
|
38106
|
+
|
|
38107
|
+
const serialize = (cookiePairs, options = {}) => {
|
|
38108
|
+
const cookiePairEntries = Array.isArray(cookiePairs) ? cookiePairs : typeof cookiePairs === 'object' && cookiePairs !== null ? Object.entries(cookiePairs) : [];
|
|
38109
|
+
return cookiePairEntries.map(([name, value]) => (0,_set_cookie_serialize_index_mjs__WEBPACK_IMPORTED_MODULE_0__["default"])(name, value, options)).join('; ');
|
|
38110
|
+
};
|
|
38111
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (serialize);
|
|
38112
|
+
|
|
38113
|
+
/***/ }),
|
|
38114
|
+
|
|
38115
|
+
/***/ 87561:
|
|
38116
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
38117
|
+
|
|
38118
|
+
"use strict";
|
|
38119
|
+
__webpack_require__.r(__webpack_exports__);
|
|
38120
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
38121
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
38122
|
+
/* harmony export */ });
|
|
38123
|
+
/* harmony import */ var apg_lite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16646);
|
|
38124
|
+
/* harmony import */ var _grammar_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(96552);
|
|
38125
|
+
|
|
38126
|
+
|
|
38127
|
+
const parser = new apg_lite__WEBPACK_IMPORTED_MODULE_0__.Parser();
|
|
38128
|
+
const grammar = new _grammar_mjs__WEBPACK_IMPORTED_MODULE_1__["default"]();
|
|
38129
|
+
const testCookieName = (cookieName, {
|
|
38130
|
+
strict = true
|
|
38131
|
+
} = {}) => {
|
|
38132
|
+
try {
|
|
38133
|
+
const startRule = strict ? 'cookie-name' : 'lenient-cookie-name';
|
|
38134
|
+
return parser.parse(grammar, startRule, cookieName).success;
|
|
38135
|
+
} catch {
|
|
38136
|
+
return false;
|
|
38137
|
+
}
|
|
38138
|
+
};
|
|
38139
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (testCookieName);
|
|
38140
|
+
|
|
38141
|
+
/***/ }),
|
|
38142
|
+
|
|
38143
|
+
/***/ 58571:
|
|
38144
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
38145
|
+
|
|
38146
|
+
"use strict";
|
|
38147
|
+
__webpack_require__.r(__webpack_exports__);
|
|
38148
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
38149
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
38150
|
+
/* harmony export */ });
|
|
38151
|
+
/* harmony import */ var apg_lite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16646);
|
|
38152
|
+
/* harmony import */ var _grammar_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(96552);
|
|
38153
|
+
|
|
38154
|
+
|
|
38155
|
+
const parser = new apg_lite__WEBPACK_IMPORTED_MODULE_0__.Parser();
|
|
38156
|
+
const grammar = new _grammar_mjs__WEBPACK_IMPORTED_MODULE_1__["default"]();
|
|
38157
|
+
const testCookieValue = (cookieValue, {
|
|
38158
|
+
strict = true
|
|
38159
|
+
} = {}) => {
|
|
38160
|
+
try {
|
|
38161
|
+
const startRule = strict ? 'cookie-value' : 'lenient-cookie-value';
|
|
38162
|
+
return parser.parse(grammar, startRule, cookieValue).success;
|
|
38163
|
+
} catch {
|
|
38164
|
+
return false;
|
|
38165
|
+
}
|
|
38166
|
+
};
|
|
38167
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (testCookieValue);
|
|
38168
|
+
|
|
38169
|
+
/***/ }),
|
|
38170
|
+
|
|
38171
|
+
/***/ 96552:
|
|
38172
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
38173
|
+
|
|
38174
|
+
"use strict";
|
|
38175
|
+
__webpack_require__.r(__webpack_exports__);
|
|
38176
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
38177
|
+
/* harmony export */ "default": () => (/* binding */ grammar)
|
|
38178
|
+
/* harmony export */ });
|
|
38179
|
+
// copyright: Copyright (c) 2024 Lowell D. Thomas, all rights reserved<br>
|
|
38180
|
+
// license: BSD-2-Clause (https://opensource.org/licenses/BSD-2-Clause)<br>
|
|
38181
|
+
//
|
|
38182
|
+
// Generated by apg-js, Version 4.4.0 [apg-js](https://github.com/ldthomas/apg-js)
|
|
38183
|
+
function grammar() {
|
|
38184
|
+
// ```
|
|
38185
|
+
// SUMMARY
|
|
38186
|
+
// rules = 30
|
|
38187
|
+
// udts = 0
|
|
38188
|
+
// opcodes = 139
|
|
38189
|
+
// --- ABNF original opcodes
|
|
38190
|
+
// ALT = 12
|
|
38191
|
+
// CAT = 12
|
|
38192
|
+
// REP = 13
|
|
38193
|
+
// RNM = 41
|
|
38194
|
+
// TLS = 35
|
|
38195
|
+
// TBS = 10
|
|
38196
|
+
// TRG = 16
|
|
38197
|
+
// --- SABNF superset opcodes
|
|
38198
|
+
// UDT = 0
|
|
38199
|
+
// AND = 0
|
|
38200
|
+
// NOT = 0
|
|
38201
|
+
// characters = [0 - 127]
|
|
38202
|
+
// ```
|
|
38203
|
+
/* OBJECT IDENTIFIER (for internal parser use) */
|
|
38204
|
+
this.grammarObject = 'grammarObject';
|
|
38205
|
+
|
|
38206
|
+
/* RULES */
|
|
38207
|
+
this.rules = [];
|
|
38208
|
+
this.rules[0] = {
|
|
38209
|
+
name: 'lenient-cookie-string',
|
|
38210
|
+
lower: 'lenient-cookie-string',
|
|
38211
|
+
index: 0,
|
|
38212
|
+
isBkr: false
|
|
38213
|
+
};
|
|
38214
|
+
this.rules[1] = {
|
|
38215
|
+
name: 'lenient-cookie-entry',
|
|
38216
|
+
lower: 'lenient-cookie-entry',
|
|
38217
|
+
index: 1,
|
|
38218
|
+
isBkr: false
|
|
38219
|
+
};
|
|
38220
|
+
this.rules[2] = {
|
|
38221
|
+
name: 'lenient-cookie-pair',
|
|
38222
|
+
lower: 'lenient-cookie-pair',
|
|
38223
|
+
index: 2,
|
|
38224
|
+
isBkr: false
|
|
38225
|
+
};
|
|
38226
|
+
this.rules[3] = {
|
|
38227
|
+
name: 'lenient-cookie-pair-invalid',
|
|
38228
|
+
lower: 'lenient-cookie-pair-invalid',
|
|
38229
|
+
index: 3,
|
|
38230
|
+
isBkr: false
|
|
38231
|
+
};
|
|
38232
|
+
this.rules[4] = {
|
|
38233
|
+
name: 'lenient-cookie-name',
|
|
38234
|
+
lower: 'lenient-cookie-name',
|
|
38235
|
+
index: 4,
|
|
38236
|
+
isBkr: false
|
|
38237
|
+
};
|
|
38238
|
+
this.rules[5] = {
|
|
38239
|
+
name: 'lenient-cookie-value',
|
|
38240
|
+
lower: 'lenient-cookie-value',
|
|
38241
|
+
index: 5,
|
|
38242
|
+
isBkr: false
|
|
38243
|
+
};
|
|
38244
|
+
this.rules[6] = {
|
|
38245
|
+
name: 'lenient-quoted-value',
|
|
38246
|
+
lower: 'lenient-quoted-value',
|
|
38247
|
+
index: 6,
|
|
38248
|
+
isBkr: false
|
|
38249
|
+
};
|
|
38250
|
+
this.rules[7] = {
|
|
38251
|
+
name: 'lenient-quoted-char',
|
|
38252
|
+
lower: 'lenient-quoted-char',
|
|
38253
|
+
index: 7,
|
|
38254
|
+
isBkr: false
|
|
38255
|
+
};
|
|
38256
|
+
this.rules[8] = {
|
|
38257
|
+
name: 'lenient-cookie-octet',
|
|
38258
|
+
lower: 'lenient-cookie-octet',
|
|
38259
|
+
index: 8,
|
|
38260
|
+
isBkr: false
|
|
38261
|
+
};
|
|
38262
|
+
this.rules[9] = {
|
|
38263
|
+
name: 'cookie-string',
|
|
38264
|
+
lower: 'cookie-string',
|
|
38265
|
+
index: 9,
|
|
38266
|
+
isBkr: false
|
|
38267
|
+
};
|
|
38268
|
+
this.rules[10] = {
|
|
38269
|
+
name: 'cookie-pair',
|
|
38270
|
+
lower: 'cookie-pair',
|
|
38271
|
+
index: 10,
|
|
38272
|
+
isBkr: false
|
|
38273
|
+
};
|
|
38274
|
+
this.rules[11] = {
|
|
38275
|
+
name: 'cookie-name',
|
|
38276
|
+
lower: 'cookie-name',
|
|
38277
|
+
index: 11,
|
|
38278
|
+
isBkr: false
|
|
38279
|
+
};
|
|
38280
|
+
this.rules[12] = {
|
|
38281
|
+
name: 'cookie-value',
|
|
38282
|
+
lower: 'cookie-value',
|
|
38283
|
+
index: 12,
|
|
38284
|
+
isBkr: false
|
|
38285
|
+
};
|
|
38286
|
+
this.rules[13] = {
|
|
38287
|
+
name: 'cookie-octet',
|
|
38288
|
+
lower: 'cookie-octet',
|
|
38289
|
+
index: 13,
|
|
38290
|
+
isBkr: false
|
|
38291
|
+
};
|
|
38292
|
+
this.rules[14] = {
|
|
38293
|
+
name: 'OWS',
|
|
38294
|
+
lower: 'ows',
|
|
38295
|
+
index: 14,
|
|
38296
|
+
isBkr: false
|
|
38297
|
+
};
|
|
38298
|
+
this.rules[15] = {
|
|
38299
|
+
name: 'token',
|
|
38300
|
+
lower: 'token',
|
|
38301
|
+
index: 15,
|
|
38302
|
+
isBkr: false
|
|
38303
|
+
};
|
|
38304
|
+
this.rules[16] = {
|
|
38305
|
+
name: 'tchar',
|
|
38306
|
+
lower: 'tchar',
|
|
38307
|
+
index: 16,
|
|
38308
|
+
isBkr: false
|
|
38309
|
+
};
|
|
38310
|
+
this.rules[17] = {
|
|
38311
|
+
name: 'CHAR',
|
|
38312
|
+
lower: 'char',
|
|
38313
|
+
index: 17,
|
|
38314
|
+
isBkr: false
|
|
38315
|
+
};
|
|
38316
|
+
this.rules[18] = {
|
|
38317
|
+
name: 'CTL',
|
|
38318
|
+
lower: 'ctl',
|
|
38319
|
+
index: 18,
|
|
38320
|
+
isBkr: false
|
|
38321
|
+
};
|
|
38322
|
+
this.rules[19] = {
|
|
38323
|
+
name: 'separators',
|
|
38324
|
+
lower: 'separators',
|
|
38325
|
+
index: 19,
|
|
38326
|
+
isBkr: false
|
|
38327
|
+
};
|
|
38328
|
+
this.rules[20] = {
|
|
38329
|
+
name: 'SP',
|
|
38330
|
+
lower: 'sp',
|
|
38331
|
+
index: 20,
|
|
38332
|
+
isBkr: false
|
|
38333
|
+
};
|
|
38334
|
+
this.rules[21] = {
|
|
38335
|
+
name: 'HT',
|
|
38336
|
+
lower: 'ht',
|
|
38337
|
+
index: 21,
|
|
38338
|
+
isBkr: false
|
|
38339
|
+
};
|
|
38340
|
+
this.rules[22] = {
|
|
38341
|
+
name: 'ALPHA',
|
|
38342
|
+
lower: 'alpha',
|
|
38343
|
+
index: 22,
|
|
38344
|
+
isBkr: false
|
|
38345
|
+
};
|
|
38346
|
+
this.rules[23] = {
|
|
38347
|
+
name: 'DIGIT',
|
|
38348
|
+
lower: 'digit',
|
|
38349
|
+
index: 23,
|
|
38350
|
+
isBkr: false
|
|
38351
|
+
};
|
|
38352
|
+
this.rules[24] = {
|
|
38353
|
+
name: 'DQUOTE',
|
|
38354
|
+
lower: 'dquote',
|
|
38355
|
+
index: 24,
|
|
38356
|
+
isBkr: false
|
|
38357
|
+
};
|
|
38358
|
+
this.rules[25] = {
|
|
38359
|
+
name: 'WSP',
|
|
38360
|
+
lower: 'wsp',
|
|
38361
|
+
index: 25,
|
|
38362
|
+
isBkr: false
|
|
38363
|
+
};
|
|
38364
|
+
this.rules[26] = {
|
|
38365
|
+
name: 'HTAB',
|
|
38366
|
+
lower: 'htab',
|
|
38367
|
+
index: 26,
|
|
38368
|
+
isBkr: false
|
|
38369
|
+
};
|
|
38370
|
+
this.rules[27] = {
|
|
38371
|
+
name: 'CRLF',
|
|
38372
|
+
lower: 'crlf',
|
|
38373
|
+
index: 27,
|
|
38374
|
+
isBkr: false
|
|
38375
|
+
};
|
|
38376
|
+
this.rules[28] = {
|
|
38377
|
+
name: 'CR',
|
|
38378
|
+
lower: 'cr',
|
|
38379
|
+
index: 28,
|
|
38380
|
+
isBkr: false
|
|
38381
|
+
};
|
|
38382
|
+
this.rules[29] = {
|
|
38383
|
+
name: 'LF',
|
|
38384
|
+
lower: 'lf',
|
|
38385
|
+
index: 29,
|
|
38386
|
+
isBkr: false
|
|
38387
|
+
};
|
|
38388
|
+
|
|
38389
|
+
/* UDTS */
|
|
38390
|
+
this.udts = [];
|
|
38391
|
+
|
|
38392
|
+
/* OPCODES */
|
|
38393
|
+
/* lenient-cookie-string */
|
|
38394
|
+
this.rules[0].opcodes = [];
|
|
38395
|
+
this.rules[0].opcodes[0] = {
|
|
38396
|
+
type: 2,
|
|
38397
|
+
children: [1, 2]
|
|
38398
|
+
}; // CAT
|
|
38399
|
+
this.rules[0].opcodes[1] = {
|
|
38400
|
+
type: 4,
|
|
38401
|
+
index: 1
|
|
38402
|
+
}; // RNM(lenient-cookie-entry)
|
|
38403
|
+
this.rules[0].opcodes[2] = {
|
|
38404
|
+
type: 3,
|
|
38405
|
+
min: 0,
|
|
38406
|
+
max: Infinity
|
|
38407
|
+
}; // REP
|
|
38408
|
+
this.rules[0].opcodes[3] = {
|
|
38409
|
+
type: 2,
|
|
38410
|
+
children: [4, 5, 6]
|
|
38411
|
+
}; // CAT
|
|
38412
|
+
this.rules[0].opcodes[4] = {
|
|
38413
|
+
type: 7,
|
|
38414
|
+
string: [59]
|
|
38415
|
+
}; // TLS
|
|
38416
|
+
this.rules[0].opcodes[5] = {
|
|
38417
|
+
type: 4,
|
|
38418
|
+
index: 14
|
|
38419
|
+
}; // RNM(OWS)
|
|
38420
|
+
this.rules[0].opcodes[6] = {
|
|
38421
|
+
type: 4,
|
|
38422
|
+
index: 1
|
|
38423
|
+
}; // RNM(lenient-cookie-entry)
|
|
38424
|
+
|
|
38425
|
+
/* lenient-cookie-entry */
|
|
38426
|
+
this.rules[1].opcodes = [];
|
|
38427
|
+
this.rules[1].opcodes[0] = {
|
|
38428
|
+
type: 1,
|
|
38429
|
+
children: [1, 2]
|
|
38430
|
+
}; // ALT
|
|
38431
|
+
this.rules[1].opcodes[1] = {
|
|
38432
|
+
type: 4,
|
|
38433
|
+
index: 2
|
|
38434
|
+
}; // RNM(lenient-cookie-pair)
|
|
38435
|
+
this.rules[1].opcodes[2] = {
|
|
38436
|
+
type: 4,
|
|
38437
|
+
index: 3
|
|
38438
|
+
}; // RNM(lenient-cookie-pair-invalid)
|
|
38439
|
+
|
|
38440
|
+
/* lenient-cookie-pair */
|
|
38441
|
+
this.rules[2].opcodes = [];
|
|
38442
|
+
this.rules[2].opcodes[0] = {
|
|
38443
|
+
type: 2,
|
|
38444
|
+
children: [1, 2, 3, 4, 5, 6, 7]
|
|
38445
|
+
}; // CAT
|
|
38446
|
+
this.rules[2].opcodes[1] = {
|
|
38447
|
+
type: 4,
|
|
38448
|
+
index: 14
|
|
38449
|
+
}; // RNM(OWS)
|
|
38450
|
+
this.rules[2].opcodes[2] = {
|
|
38451
|
+
type: 4,
|
|
38452
|
+
index: 4
|
|
38453
|
+
}; // RNM(lenient-cookie-name)
|
|
38454
|
+
this.rules[2].opcodes[3] = {
|
|
38455
|
+
type: 4,
|
|
38456
|
+
index: 14
|
|
38457
|
+
}; // RNM(OWS)
|
|
38458
|
+
this.rules[2].opcodes[4] = {
|
|
38459
|
+
type: 7,
|
|
38460
|
+
string: [61]
|
|
38461
|
+
}; // TLS
|
|
38462
|
+
this.rules[2].opcodes[5] = {
|
|
38463
|
+
type: 4,
|
|
38464
|
+
index: 14
|
|
38465
|
+
}; // RNM(OWS)
|
|
38466
|
+
this.rules[2].opcodes[6] = {
|
|
38467
|
+
type: 4,
|
|
38468
|
+
index: 5
|
|
38469
|
+
}; // RNM(lenient-cookie-value)
|
|
38470
|
+
this.rules[2].opcodes[7] = {
|
|
38471
|
+
type: 4,
|
|
38472
|
+
index: 14
|
|
38473
|
+
}; // RNM(OWS)
|
|
38474
|
+
|
|
38475
|
+
/* lenient-cookie-pair-invalid */
|
|
38476
|
+
this.rules[3].opcodes = [];
|
|
38477
|
+
this.rules[3].opcodes[0] = {
|
|
38478
|
+
type: 2,
|
|
38479
|
+
children: [1, 2, 4]
|
|
38480
|
+
}; // CAT
|
|
38481
|
+
this.rules[3].opcodes[1] = {
|
|
38482
|
+
type: 4,
|
|
38483
|
+
index: 14
|
|
38484
|
+
}; // RNM(OWS)
|
|
38485
|
+
this.rules[3].opcodes[2] = {
|
|
38486
|
+
type: 3,
|
|
38487
|
+
min: 1,
|
|
38488
|
+
max: Infinity
|
|
38489
|
+
}; // REP
|
|
38490
|
+
this.rules[3].opcodes[3] = {
|
|
38491
|
+
type: 4,
|
|
38492
|
+
index: 16
|
|
38493
|
+
}; // RNM(tchar)
|
|
38494
|
+
this.rules[3].opcodes[4] = {
|
|
38495
|
+
type: 4,
|
|
38496
|
+
index: 14
|
|
38497
|
+
}; // RNM(OWS)
|
|
38498
|
+
|
|
38499
|
+
/* lenient-cookie-name */
|
|
38500
|
+
this.rules[4].opcodes = [];
|
|
38501
|
+
this.rules[4].opcodes[0] = {
|
|
38502
|
+
type: 3,
|
|
38503
|
+
min: 1,
|
|
38504
|
+
max: Infinity
|
|
38505
|
+
}; // REP
|
|
38506
|
+
this.rules[4].opcodes[1] = {
|
|
38507
|
+
type: 1,
|
|
38508
|
+
children: [2, 3, 4]
|
|
38509
|
+
}; // ALT
|
|
38510
|
+
this.rules[4].opcodes[2] = {
|
|
38511
|
+
type: 5,
|
|
38512
|
+
min: 33,
|
|
38513
|
+
max: 58
|
|
38514
|
+
}; // TRG
|
|
38515
|
+
this.rules[4].opcodes[3] = {
|
|
38516
|
+
type: 6,
|
|
38517
|
+
string: [60]
|
|
38518
|
+
}; // TBS
|
|
38519
|
+
this.rules[4].opcodes[4] = {
|
|
38520
|
+
type: 5,
|
|
38521
|
+
min: 62,
|
|
38522
|
+
max: 126
|
|
38523
|
+
}; // TRG
|
|
38524
|
+
|
|
38525
|
+
/* lenient-cookie-value */
|
|
38526
|
+
this.rules[5].opcodes = [];
|
|
38527
|
+
this.rules[5].opcodes[0] = {
|
|
38528
|
+
type: 1,
|
|
38529
|
+
children: [1, 6]
|
|
38530
|
+
}; // ALT
|
|
38531
|
+
this.rules[5].opcodes[1] = {
|
|
38532
|
+
type: 2,
|
|
38533
|
+
children: [2, 3]
|
|
38534
|
+
}; // CAT
|
|
38535
|
+
this.rules[5].opcodes[2] = {
|
|
38536
|
+
type: 4,
|
|
38537
|
+
index: 6
|
|
38538
|
+
}; // RNM(lenient-quoted-value)
|
|
38539
|
+
this.rules[5].opcodes[3] = {
|
|
38540
|
+
type: 3,
|
|
38541
|
+
min: 0,
|
|
38542
|
+
max: 1
|
|
38543
|
+
}; // REP
|
|
38544
|
+
this.rules[5].opcodes[4] = {
|
|
38545
|
+
type: 3,
|
|
38546
|
+
min: 0,
|
|
38547
|
+
max: Infinity
|
|
38548
|
+
}; // REP
|
|
38549
|
+
this.rules[5].opcodes[5] = {
|
|
38550
|
+
type: 4,
|
|
38551
|
+
index: 8
|
|
38552
|
+
}; // RNM(lenient-cookie-octet)
|
|
38553
|
+
this.rules[5].opcodes[6] = {
|
|
38554
|
+
type: 3,
|
|
38555
|
+
min: 0,
|
|
38556
|
+
max: Infinity
|
|
38557
|
+
}; // REP
|
|
38558
|
+
this.rules[5].opcodes[7] = {
|
|
38559
|
+
type: 4,
|
|
38560
|
+
index: 8
|
|
38561
|
+
}; // RNM(lenient-cookie-octet)
|
|
38562
|
+
|
|
38563
|
+
/* lenient-quoted-value */
|
|
38564
|
+
this.rules[6].opcodes = [];
|
|
38565
|
+
this.rules[6].opcodes[0] = {
|
|
38566
|
+
type: 2,
|
|
38567
|
+
children: [1, 2, 4]
|
|
38568
|
+
}; // CAT
|
|
38569
|
+
this.rules[6].opcodes[1] = {
|
|
38570
|
+
type: 4,
|
|
38571
|
+
index: 24
|
|
38572
|
+
}; // RNM(DQUOTE)
|
|
38573
|
+
this.rules[6].opcodes[2] = {
|
|
38574
|
+
type: 3,
|
|
38575
|
+
min: 0,
|
|
38576
|
+
max: Infinity
|
|
38577
|
+
}; // REP
|
|
38578
|
+
this.rules[6].opcodes[3] = {
|
|
38579
|
+
type: 4,
|
|
38580
|
+
index: 7
|
|
38581
|
+
}; // RNM(lenient-quoted-char)
|
|
38582
|
+
this.rules[6].opcodes[4] = {
|
|
38583
|
+
type: 4,
|
|
38584
|
+
index: 24
|
|
38585
|
+
}; // RNM(DQUOTE)
|
|
38586
|
+
|
|
38587
|
+
/* lenient-quoted-char */
|
|
38588
|
+
this.rules[7].opcodes = [];
|
|
38589
|
+
this.rules[7].opcodes[0] = {
|
|
38590
|
+
type: 1,
|
|
38591
|
+
children: [1, 2]
|
|
38592
|
+
}; // ALT
|
|
38593
|
+
this.rules[7].opcodes[1] = {
|
|
38594
|
+
type: 5,
|
|
38595
|
+
min: 32,
|
|
38596
|
+
max: 33
|
|
38597
|
+
}; // TRG
|
|
38598
|
+
this.rules[7].opcodes[2] = {
|
|
38599
|
+
type: 5,
|
|
38600
|
+
min: 35,
|
|
38601
|
+
max: 126
|
|
38602
|
+
}; // TRG
|
|
38603
|
+
|
|
38604
|
+
/* lenient-cookie-octet */
|
|
38605
|
+
this.rules[8].opcodes = [];
|
|
38606
|
+
this.rules[8].opcodes[0] = {
|
|
38607
|
+
type: 1,
|
|
38608
|
+
children: [1, 2, 3]
|
|
38609
|
+
}; // ALT
|
|
38610
|
+
this.rules[8].opcodes[1] = {
|
|
38611
|
+
type: 5,
|
|
38612
|
+
min: 33,
|
|
38613
|
+
max: 43
|
|
38614
|
+
}; // TRG
|
|
38615
|
+
this.rules[8].opcodes[2] = {
|
|
38616
|
+
type: 5,
|
|
38617
|
+
min: 45,
|
|
38618
|
+
max: 58
|
|
38619
|
+
}; // TRG
|
|
38620
|
+
this.rules[8].opcodes[3] = {
|
|
38621
|
+
type: 5,
|
|
38622
|
+
min: 60,
|
|
38623
|
+
max: 126
|
|
38624
|
+
}; // TRG
|
|
38625
|
+
|
|
38626
|
+
/* cookie-string */
|
|
38627
|
+
this.rules[9].opcodes = [];
|
|
38628
|
+
this.rules[9].opcodes[0] = {
|
|
38629
|
+
type: 2,
|
|
38630
|
+
children: [1, 2]
|
|
38631
|
+
}; // CAT
|
|
38632
|
+
this.rules[9].opcodes[1] = {
|
|
38633
|
+
type: 4,
|
|
38634
|
+
index: 10
|
|
38635
|
+
}; // RNM(cookie-pair)
|
|
38636
|
+
this.rules[9].opcodes[2] = {
|
|
38637
|
+
type: 3,
|
|
38638
|
+
min: 0,
|
|
38639
|
+
max: Infinity
|
|
38640
|
+
}; // REP
|
|
38641
|
+
this.rules[9].opcodes[3] = {
|
|
38642
|
+
type: 2,
|
|
38643
|
+
children: [4, 5, 6]
|
|
38644
|
+
}; // CAT
|
|
38645
|
+
this.rules[9].opcodes[4] = {
|
|
38646
|
+
type: 7,
|
|
38647
|
+
string: [59]
|
|
38648
|
+
}; // TLS
|
|
38649
|
+
this.rules[9].opcodes[5] = {
|
|
38650
|
+
type: 4,
|
|
38651
|
+
index: 20
|
|
38652
|
+
}; // RNM(SP)
|
|
38653
|
+
this.rules[9].opcodes[6] = {
|
|
38654
|
+
type: 4,
|
|
38655
|
+
index: 10
|
|
38656
|
+
}; // RNM(cookie-pair)
|
|
38657
|
+
|
|
38658
|
+
/* cookie-pair */
|
|
38659
|
+
this.rules[10].opcodes = [];
|
|
38660
|
+
this.rules[10].opcodes[0] = {
|
|
38661
|
+
type: 2,
|
|
38662
|
+
children: [1, 2, 3]
|
|
38663
|
+
}; // CAT
|
|
38664
|
+
this.rules[10].opcodes[1] = {
|
|
38665
|
+
type: 4,
|
|
38666
|
+
index: 11
|
|
38667
|
+
}; // RNM(cookie-name)
|
|
38668
|
+
this.rules[10].opcodes[2] = {
|
|
38669
|
+
type: 7,
|
|
38670
|
+
string: [61]
|
|
38671
|
+
}; // TLS
|
|
38672
|
+
this.rules[10].opcodes[3] = {
|
|
38673
|
+
type: 4,
|
|
38674
|
+
index: 12
|
|
38675
|
+
}; // RNM(cookie-value)
|
|
38676
|
+
|
|
38677
|
+
/* cookie-name */
|
|
38678
|
+
this.rules[11].opcodes = [];
|
|
38679
|
+
this.rules[11].opcodes[0] = {
|
|
38680
|
+
type: 4,
|
|
38681
|
+
index: 15
|
|
38682
|
+
}; // RNM(token)
|
|
38683
|
+
|
|
38684
|
+
/* cookie-value */
|
|
38685
|
+
this.rules[12].opcodes = [];
|
|
38686
|
+
this.rules[12].opcodes[0] = {
|
|
38687
|
+
type: 1,
|
|
38688
|
+
children: [1, 6]
|
|
38689
|
+
}; // ALT
|
|
38690
|
+
this.rules[12].opcodes[1] = {
|
|
38691
|
+
type: 2,
|
|
38692
|
+
children: [2, 3, 5]
|
|
38693
|
+
}; // CAT
|
|
38694
|
+
this.rules[12].opcodes[2] = {
|
|
38695
|
+
type: 4,
|
|
38696
|
+
index: 24
|
|
38697
|
+
}; // RNM(DQUOTE)
|
|
38698
|
+
this.rules[12].opcodes[3] = {
|
|
38699
|
+
type: 3,
|
|
38700
|
+
min: 0,
|
|
38701
|
+
max: Infinity
|
|
38702
|
+
}; // REP
|
|
38703
|
+
this.rules[12].opcodes[4] = {
|
|
38704
|
+
type: 4,
|
|
38705
|
+
index: 13
|
|
38706
|
+
}; // RNM(cookie-octet)
|
|
38707
|
+
this.rules[12].opcodes[5] = {
|
|
38708
|
+
type: 4,
|
|
38709
|
+
index: 24
|
|
38710
|
+
}; // RNM(DQUOTE)
|
|
38711
|
+
this.rules[12].opcodes[6] = {
|
|
38712
|
+
type: 3,
|
|
38713
|
+
min: 0,
|
|
38714
|
+
max: Infinity
|
|
38715
|
+
}; // REP
|
|
38716
|
+
this.rules[12].opcodes[7] = {
|
|
38717
|
+
type: 4,
|
|
38718
|
+
index: 13
|
|
38719
|
+
}; // RNM(cookie-octet)
|
|
38720
|
+
|
|
38721
|
+
/* cookie-octet */
|
|
38722
|
+
this.rules[13].opcodes = [];
|
|
38723
|
+
this.rules[13].opcodes[0] = {
|
|
38724
|
+
type: 1,
|
|
38725
|
+
children: [1, 2, 3, 4, 5]
|
|
38726
|
+
}; // ALT
|
|
38727
|
+
this.rules[13].opcodes[1] = {
|
|
38728
|
+
type: 6,
|
|
38729
|
+
string: [33]
|
|
38730
|
+
}; // TBS
|
|
38731
|
+
this.rules[13].opcodes[2] = {
|
|
38732
|
+
type: 5,
|
|
38733
|
+
min: 35,
|
|
38734
|
+
max: 43
|
|
38735
|
+
}; // TRG
|
|
38736
|
+
this.rules[13].opcodes[3] = {
|
|
38737
|
+
type: 5,
|
|
38738
|
+
min: 45,
|
|
38739
|
+
max: 58
|
|
38740
|
+
}; // TRG
|
|
38741
|
+
this.rules[13].opcodes[4] = {
|
|
38742
|
+
type: 5,
|
|
38743
|
+
min: 60,
|
|
38744
|
+
max: 91
|
|
38745
|
+
}; // TRG
|
|
38746
|
+
this.rules[13].opcodes[5] = {
|
|
38747
|
+
type: 5,
|
|
38748
|
+
min: 93,
|
|
38749
|
+
max: 126
|
|
38750
|
+
}; // TRG
|
|
38751
|
+
|
|
38752
|
+
/* OWS */
|
|
38753
|
+
this.rules[14].opcodes = [];
|
|
38754
|
+
this.rules[14].opcodes[0] = {
|
|
38755
|
+
type: 3,
|
|
38756
|
+
min: 0,
|
|
38757
|
+
max: Infinity
|
|
38758
|
+
}; // REP
|
|
38759
|
+
this.rules[14].opcodes[1] = {
|
|
38760
|
+
type: 2,
|
|
38761
|
+
children: [2, 4]
|
|
38762
|
+
}; // CAT
|
|
38763
|
+
this.rules[14].opcodes[2] = {
|
|
38764
|
+
type: 3,
|
|
38765
|
+
min: 0,
|
|
38766
|
+
max: 1
|
|
38767
|
+
}; // REP
|
|
38768
|
+
this.rules[14].opcodes[3] = {
|
|
38769
|
+
type: 4,
|
|
38770
|
+
index: 27
|
|
38771
|
+
}; // RNM(CRLF)
|
|
38772
|
+
this.rules[14].opcodes[4] = {
|
|
38773
|
+
type: 4,
|
|
38774
|
+
index: 25
|
|
38775
|
+
}; // RNM(WSP)
|
|
38776
|
+
|
|
38777
|
+
/* token */
|
|
38778
|
+
this.rules[15].opcodes = [];
|
|
38779
|
+
this.rules[15].opcodes[0] = {
|
|
38780
|
+
type: 3,
|
|
38781
|
+
min: 1,
|
|
38782
|
+
max: Infinity
|
|
38783
|
+
}; // REP
|
|
38784
|
+
this.rules[15].opcodes[1] = {
|
|
38785
|
+
type: 4,
|
|
38786
|
+
index: 16
|
|
38787
|
+
}; // RNM(tchar)
|
|
38788
|
+
|
|
38789
|
+
/* tchar */
|
|
38790
|
+
this.rules[16].opcodes = [];
|
|
38791
|
+
this.rules[16].opcodes[0] = {
|
|
38792
|
+
type: 1,
|
|
38793
|
+
children: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]
|
|
38794
|
+
}; // ALT
|
|
38795
|
+
this.rules[16].opcodes[1] = {
|
|
38796
|
+
type: 7,
|
|
38797
|
+
string: [33]
|
|
38798
|
+
}; // TLS
|
|
38799
|
+
this.rules[16].opcodes[2] = {
|
|
38800
|
+
type: 7,
|
|
38801
|
+
string: [35]
|
|
38802
|
+
}; // TLS
|
|
38803
|
+
this.rules[16].opcodes[3] = {
|
|
38804
|
+
type: 7,
|
|
38805
|
+
string: [36]
|
|
38806
|
+
}; // TLS
|
|
38807
|
+
this.rules[16].opcodes[4] = {
|
|
38808
|
+
type: 7,
|
|
38809
|
+
string: [37]
|
|
38810
|
+
}; // TLS
|
|
38811
|
+
this.rules[16].opcodes[5] = {
|
|
38812
|
+
type: 7,
|
|
38813
|
+
string: [38]
|
|
38814
|
+
}; // TLS
|
|
38815
|
+
this.rules[16].opcodes[6] = {
|
|
38816
|
+
type: 7,
|
|
38817
|
+
string: [39]
|
|
38818
|
+
}; // TLS
|
|
38819
|
+
this.rules[16].opcodes[7] = {
|
|
38820
|
+
type: 7,
|
|
38821
|
+
string: [42]
|
|
38822
|
+
}; // TLS
|
|
38823
|
+
this.rules[16].opcodes[8] = {
|
|
38824
|
+
type: 7,
|
|
38825
|
+
string: [43]
|
|
38826
|
+
}; // TLS
|
|
38827
|
+
this.rules[16].opcodes[9] = {
|
|
38828
|
+
type: 7,
|
|
38829
|
+
string: [45]
|
|
38830
|
+
}; // TLS
|
|
38831
|
+
this.rules[16].opcodes[10] = {
|
|
38832
|
+
type: 7,
|
|
38833
|
+
string: [46]
|
|
38834
|
+
}; // TLS
|
|
38835
|
+
this.rules[16].opcodes[11] = {
|
|
38836
|
+
type: 7,
|
|
38837
|
+
string: [94]
|
|
38838
|
+
}; // TLS
|
|
38839
|
+
this.rules[16].opcodes[12] = {
|
|
38840
|
+
type: 7,
|
|
38841
|
+
string: [95]
|
|
38842
|
+
}; // TLS
|
|
38843
|
+
this.rules[16].opcodes[13] = {
|
|
38844
|
+
type: 7,
|
|
38845
|
+
string: [96]
|
|
38846
|
+
}; // TLS
|
|
38847
|
+
this.rules[16].opcodes[14] = {
|
|
38848
|
+
type: 7,
|
|
38849
|
+
string: [124]
|
|
38850
|
+
}; // TLS
|
|
38851
|
+
this.rules[16].opcodes[15] = {
|
|
38852
|
+
type: 7,
|
|
38853
|
+
string: [126]
|
|
38854
|
+
}; // TLS
|
|
38855
|
+
this.rules[16].opcodes[16] = {
|
|
38856
|
+
type: 4,
|
|
38857
|
+
index: 23
|
|
38858
|
+
}; // RNM(DIGIT)
|
|
38859
|
+
this.rules[16].opcodes[17] = {
|
|
38860
|
+
type: 4,
|
|
38861
|
+
index: 22
|
|
38862
|
+
}; // RNM(ALPHA)
|
|
38863
|
+
|
|
38864
|
+
/* CHAR */
|
|
38865
|
+
this.rules[17].opcodes = [];
|
|
38866
|
+
this.rules[17].opcodes[0] = {
|
|
38867
|
+
type: 5,
|
|
38868
|
+
min: 1,
|
|
38869
|
+
max: 127
|
|
38870
|
+
}; // TRG
|
|
38871
|
+
|
|
38872
|
+
/* CTL */
|
|
38873
|
+
this.rules[18].opcodes = [];
|
|
38874
|
+
this.rules[18].opcodes[0] = {
|
|
38875
|
+
type: 1,
|
|
38876
|
+
children: [1, 2]
|
|
38877
|
+
}; // ALT
|
|
38878
|
+
this.rules[18].opcodes[1] = {
|
|
38879
|
+
type: 5,
|
|
38880
|
+
min: 0,
|
|
38881
|
+
max: 31
|
|
38882
|
+
}; // TRG
|
|
38883
|
+
this.rules[18].opcodes[2] = {
|
|
38884
|
+
type: 6,
|
|
38885
|
+
string: [127]
|
|
38886
|
+
}; // TBS
|
|
38887
|
+
|
|
38888
|
+
/* separators */
|
|
38889
|
+
this.rules[19].opcodes = [];
|
|
38890
|
+
this.rules[19].opcodes[0] = {
|
|
38891
|
+
type: 1,
|
|
38892
|
+
children: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]
|
|
38893
|
+
}; // ALT
|
|
38894
|
+
this.rules[19].opcodes[1] = {
|
|
38895
|
+
type: 7,
|
|
38896
|
+
string: [40]
|
|
38897
|
+
}; // TLS
|
|
38898
|
+
this.rules[19].opcodes[2] = {
|
|
38899
|
+
type: 7,
|
|
38900
|
+
string: [41]
|
|
38901
|
+
}; // TLS
|
|
38902
|
+
this.rules[19].opcodes[3] = {
|
|
38903
|
+
type: 7,
|
|
38904
|
+
string: [60]
|
|
38905
|
+
}; // TLS
|
|
38906
|
+
this.rules[19].opcodes[4] = {
|
|
38907
|
+
type: 7,
|
|
38908
|
+
string: [62]
|
|
38909
|
+
}; // TLS
|
|
38910
|
+
this.rules[19].opcodes[5] = {
|
|
38911
|
+
type: 7,
|
|
38912
|
+
string: [64]
|
|
38913
|
+
}; // TLS
|
|
38914
|
+
this.rules[19].opcodes[6] = {
|
|
38915
|
+
type: 7,
|
|
38916
|
+
string: [44]
|
|
38917
|
+
}; // TLS
|
|
38918
|
+
this.rules[19].opcodes[7] = {
|
|
38919
|
+
type: 7,
|
|
38920
|
+
string: [59]
|
|
38921
|
+
}; // TLS
|
|
38922
|
+
this.rules[19].opcodes[8] = {
|
|
38923
|
+
type: 7,
|
|
38924
|
+
string: [58]
|
|
38925
|
+
}; // TLS
|
|
38926
|
+
this.rules[19].opcodes[9] = {
|
|
38927
|
+
type: 7,
|
|
38928
|
+
string: [92]
|
|
38929
|
+
}; // TLS
|
|
38930
|
+
this.rules[19].opcodes[10] = {
|
|
38931
|
+
type: 6,
|
|
38932
|
+
string: [34]
|
|
38933
|
+
}; // TBS
|
|
38934
|
+
this.rules[19].opcodes[11] = {
|
|
38935
|
+
type: 7,
|
|
38936
|
+
string: [47]
|
|
38937
|
+
}; // TLS
|
|
38938
|
+
this.rules[19].opcodes[12] = {
|
|
38939
|
+
type: 7,
|
|
38940
|
+
string: [91]
|
|
38941
|
+
}; // TLS
|
|
38942
|
+
this.rules[19].opcodes[13] = {
|
|
38943
|
+
type: 7,
|
|
38944
|
+
string: [93]
|
|
38945
|
+
}; // TLS
|
|
38946
|
+
this.rules[19].opcodes[14] = {
|
|
38947
|
+
type: 7,
|
|
38948
|
+
string: [63]
|
|
38949
|
+
}; // TLS
|
|
38950
|
+
this.rules[19].opcodes[15] = {
|
|
38951
|
+
type: 7,
|
|
38952
|
+
string: [61]
|
|
38953
|
+
}; // TLS
|
|
38954
|
+
this.rules[19].opcodes[16] = {
|
|
38955
|
+
type: 7,
|
|
38956
|
+
string: [123]
|
|
38957
|
+
}; // TLS
|
|
38958
|
+
this.rules[19].opcodes[17] = {
|
|
38959
|
+
type: 7,
|
|
38960
|
+
string: [125]
|
|
38961
|
+
}; // TLS
|
|
38962
|
+
this.rules[19].opcodes[18] = {
|
|
38963
|
+
type: 4,
|
|
38964
|
+
index: 20
|
|
38965
|
+
}; // RNM(SP)
|
|
38966
|
+
this.rules[19].opcodes[19] = {
|
|
38967
|
+
type: 4,
|
|
38968
|
+
index: 21
|
|
38969
|
+
}; // RNM(HT)
|
|
38970
|
+
|
|
38971
|
+
/* SP */
|
|
38972
|
+
this.rules[20].opcodes = [];
|
|
38973
|
+
this.rules[20].opcodes[0] = {
|
|
38974
|
+
type: 6,
|
|
38975
|
+
string: [32]
|
|
38976
|
+
}; // TBS
|
|
38977
|
+
|
|
38978
|
+
/* HT */
|
|
38979
|
+
this.rules[21].opcodes = [];
|
|
38980
|
+
this.rules[21].opcodes[0] = {
|
|
38981
|
+
type: 6,
|
|
38982
|
+
string: [9]
|
|
38983
|
+
}; // TBS
|
|
38984
|
+
|
|
38985
|
+
/* ALPHA */
|
|
38986
|
+
this.rules[22].opcodes = [];
|
|
38987
|
+
this.rules[22].opcodes[0] = {
|
|
38988
|
+
type: 1,
|
|
38989
|
+
children: [1, 2]
|
|
38990
|
+
}; // ALT
|
|
38991
|
+
this.rules[22].opcodes[1] = {
|
|
38992
|
+
type: 5,
|
|
38993
|
+
min: 65,
|
|
38994
|
+
max: 90
|
|
38995
|
+
}; // TRG
|
|
38996
|
+
this.rules[22].opcodes[2] = {
|
|
38997
|
+
type: 5,
|
|
38998
|
+
min: 97,
|
|
38999
|
+
max: 122
|
|
39000
|
+
}; // TRG
|
|
39001
|
+
|
|
39002
|
+
/* DIGIT */
|
|
39003
|
+
this.rules[23].opcodes = [];
|
|
39004
|
+
this.rules[23].opcodes[0] = {
|
|
39005
|
+
type: 5,
|
|
39006
|
+
min: 48,
|
|
39007
|
+
max: 57
|
|
39008
|
+
}; // TRG
|
|
39009
|
+
|
|
39010
|
+
/* DQUOTE */
|
|
39011
|
+
this.rules[24].opcodes = [];
|
|
39012
|
+
this.rules[24].opcodes[0] = {
|
|
39013
|
+
type: 6,
|
|
39014
|
+
string: [34]
|
|
39015
|
+
}; // TBS
|
|
39016
|
+
|
|
39017
|
+
/* WSP */
|
|
39018
|
+
this.rules[25].opcodes = [];
|
|
39019
|
+
this.rules[25].opcodes[0] = {
|
|
39020
|
+
type: 1,
|
|
39021
|
+
children: [1, 2]
|
|
39022
|
+
}; // ALT
|
|
39023
|
+
this.rules[25].opcodes[1] = {
|
|
39024
|
+
type: 4,
|
|
39025
|
+
index: 20
|
|
39026
|
+
}; // RNM(SP)
|
|
39027
|
+
this.rules[25].opcodes[2] = {
|
|
39028
|
+
type: 4,
|
|
39029
|
+
index: 26
|
|
39030
|
+
}; // RNM(HTAB)
|
|
39031
|
+
|
|
39032
|
+
/* HTAB */
|
|
39033
|
+
this.rules[26].opcodes = [];
|
|
39034
|
+
this.rules[26].opcodes[0] = {
|
|
39035
|
+
type: 6,
|
|
39036
|
+
string: [9]
|
|
39037
|
+
}; // TBS
|
|
39038
|
+
|
|
39039
|
+
/* CRLF */
|
|
39040
|
+
this.rules[27].opcodes = [];
|
|
39041
|
+
this.rules[27].opcodes[0] = {
|
|
39042
|
+
type: 2,
|
|
39043
|
+
children: [1, 2]
|
|
39044
|
+
}; // CAT
|
|
39045
|
+
this.rules[27].opcodes[1] = {
|
|
39046
|
+
type: 4,
|
|
39047
|
+
index: 28
|
|
39048
|
+
}; // RNM(CR)
|
|
39049
|
+
this.rules[27].opcodes[2] = {
|
|
39050
|
+
type: 4,
|
|
39051
|
+
index: 29
|
|
39052
|
+
}; // RNM(LF)
|
|
39053
|
+
|
|
39054
|
+
/* CR */
|
|
39055
|
+
this.rules[28].opcodes = [];
|
|
39056
|
+
this.rules[28].opcodes[0] = {
|
|
39057
|
+
type: 6,
|
|
39058
|
+
string: [13]
|
|
39059
|
+
}; // TBS
|
|
39060
|
+
|
|
39061
|
+
/* LF */
|
|
39062
|
+
this.rules[29].opcodes = [];
|
|
39063
|
+
this.rules[29].opcodes[0] = {
|
|
39064
|
+
type: 6,
|
|
39065
|
+
string: [10]
|
|
39066
|
+
}; // TBS
|
|
39067
|
+
|
|
39068
|
+
// The `toString()` function will display the original grammar file(s) that produced these opcodes.
|
|
39069
|
+
this.toString = function toString() {
|
|
39070
|
+
let str = "";
|
|
39071
|
+
str += "; Lenient version of https://datatracker.ietf.org/doc/html/rfc6265#section-4.2.1\n";
|
|
39072
|
+
str += "lenient-cookie-string = lenient-cookie-entry *( \";\" OWS lenient-cookie-entry )\n";
|
|
39073
|
+
str += "lenient-cookie-entry = lenient-cookie-pair / lenient-cookie-pair-invalid\n";
|
|
39074
|
+
str += "lenient-cookie-pair = OWS lenient-cookie-name OWS \"=\" OWS lenient-cookie-value OWS\n";
|
|
39075
|
+
str += "lenient-cookie-pair-invalid = OWS 1*tchar OWS ; Allow for standalone entries like \"fizz\" to be ignored\n";
|
|
39076
|
+
str += "lenient-cookie-name = 1*( %x21-3A / %x3C / %x3E-7E ) ; Allow all printable US-ASCII except \"=\"\n";
|
|
39077
|
+
str += "lenient-cookie-value = lenient-quoted-value [ *lenient-cookie-octet ] / *lenient-cookie-octet\n";
|
|
39078
|
+
str += "lenient-quoted-value = DQUOTE *( lenient-quoted-char ) DQUOTE\n";
|
|
39079
|
+
str += "lenient-quoted-char = %x20-21 / %x23-7E ; Allow all printable US-ASCII except DQUOTE\n";
|
|
39080
|
+
str += "lenient-cookie-octet = %x21-2B / %x2D-3A / %x3C-7E\n";
|
|
39081
|
+
str += " ; Allow all printable characters except CTLs, DQUOTE, semicolon and SP\n";
|
|
39082
|
+
str += "\n";
|
|
39083
|
+
str += "; https://datatracker.ietf.org/doc/html/rfc6265#section-4.2.1\n";
|
|
39084
|
+
str += "cookie-string = cookie-pair *( \";\" SP cookie-pair )\n";
|
|
39085
|
+
str += "\n";
|
|
39086
|
+
str += "; https://datatracker.ietf.org/doc/html/rfc6265#section-4.1.1\n";
|
|
39087
|
+
str += "; https://www.rfc-editor.org/errata/eid5518\n";
|
|
39088
|
+
str += "cookie-pair = cookie-name \"=\" cookie-value\n";
|
|
39089
|
+
str += "cookie-name = token\n";
|
|
39090
|
+
str += "cookie-value = ( DQUOTE *cookie-octet DQUOTE ) / *cookie-octet\n";
|
|
39091
|
+
str += " ; https://www.rfc-editor.org/errata/eid8242\n";
|
|
39092
|
+
str += "cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E\n";
|
|
39093
|
+
str += " ; US-ASCII characters excluding CTLs,\n";
|
|
39094
|
+
str += " ; whitespace, DQUOTE, comma, semicolon,\n";
|
|
39095
|
+
str += " ; and backslash\n";
|
|
39096
|
+
str += "\n";
|
|
39097
|
+
str += "; https://datatracker.ietf.org/doc/html/rfc6265#section-2.2\n";
|
|
39098
|
+
str += "OWS = *( [ CRLF ] WSP ) ; \"optional\" whitespace\n";
|
|
39099
|
+
str += "\n";
|
|
39100
|
+
str += "; https://datatracker.ietf.org/doc/html/rfc9110#section-5.6.2\n";
|
|
39101
|
+
str += "token = 1*(tchar)\n";
|
|
39102
|
+
str += "tchar = \"!\" / \"#\" / \"$\" / \"%\" / \"&\" / \"'\" / \"*\"\n";
|
|
39103
|
+
str += " / \"+\" / \"-\" / \".\" / \"^\" / \"_\" / \"`\" / \"|\" / \"~\"\n";
|
|
39104
|
+
str += " / DIGIT / ALPHA\n";
|
|
39105
|
+
str += " ; any VCHAR, except delimiters\n";
|
|
39106
|
+
str += "\n";
|
|
39107
|
+
str += "; https://datatracker.ietf.org/doc/html/rfc2616#section-2.2\n";
|
|
39108
|
+
str += "CHAR = %x01-7F ; any US-ASCII character (octets 0 - 127)\n";
|
|
39109
|
+
str += "CTL = %x00-1F / %x7F ; any US-ASCII control character\n";
|
|
39110
|
+
str += "separators = \"(\" / \")\" / \"<\" / \">\" / \"@\" / \",\" / \";\" / \":\" / \"\\\" / %x22 / \"/\" / \"[\" / \"]\" / \"?\" / \"=\" / \"{\" / \"}\" / SP / HT\n";
|
|
39111
|
+
str += "SP = %x20 ; US-ASCII SP, space (32)\n";
|
|
39112
|
+
str += "HT = %x09 ; US-ASCII HT, horizontal-tab (9)\n";
|
|
39113
|
+
str += "\n";
|
|
39114
|
+
str += "; https://datatracker.ietf.org/doc/html/rfc5234#appendix-B.1\n";
|
|
39115
|
+
str += "ALPHA = %x41-5A / %x61-7A ; A-Z / a-z\n";
|
|
39116
|
+
str += "DIGIT = %x30-39 ; 0-9\n";
|
|
39117
|
+
str += "DQUOTE = %x22 ; \" (Double Quote)\n";
|
|
39118
|
+
str += "WSP = SP / HTAB ; white space\n";
|
|
39119
|
+
str += "HTAB = %x09 ; horizontal tab\n";
|
|
39120
|
+
str += "CRLF = CR LF ; Internet standard newline\n";
|
|
39121
|
+
str += "CR = %x0D ; carriage return\n";
|
|
39122
|
+
str += "LF = %x0A ; linefeed\n";
|
|
39123
|
+
return str;
|
|
39124
|
+
};
|
|
39125
|
+
}
|
|
39126
|
+
|
|
39127
|
+
/***/ }),
|
|
39128
|
+
|
|
39129
|
+
/***/ 2211:
|
|
39130
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
39131
|
+
|
|
39132
|
+
"use strict";
|
|
39133
|
+
__webpack_require__.r(__webpack_exports__);
|
|
39134
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
39135
|
+
/* harmony export */ Grammar: () => (/* reexport safe */ _grammar_mjs__WEBPACK_IMPORTED_MODULE_0__["default"]),
|
|
39136
|
+
/* harmony export */ cookieNameLenientEncoder: () => (/* reexport safe */ _set_cookie_serialize_encoders_cookie_name_lenient_mjs__WEBPACK_IMPORTED_MODULE_4__["default"]),
|
|
39137
|
+
/* harmony export */ cookieNameLenientValidator: () => (/* reexport safe */ _set_cookie_serialize_validators_cookie_name_lenient_mjs__WEBPACK_IMPORTED_MODULE_8__["default"]),
|
|
39138
|
+
/* harmony export */ cookieNameStrictEncoder: () => (/* reexport safe */ _set_cookie_serialize_encoders_cookie_name_strict_mjs__WEBPACK_IMPORTED_MODULE_3__["default"]),
|
|
39139
|
+
/* harmony export */ cookieNameStrictValidator: () => (/* reexport safe */ _set_cookie_serialize_validators_cookie_name_strict_mjs__WEBPACK_IMPORTED_MODULE_7__["default"]),
|
|
39140
|
+
/* harmony export */ cookieValueLenientEncoder: () => (/* reexport safe */ _set_cookie_serialize_encoders_cookie_value_lenient_mjs__WEBPACK_IMPORTED_MODULE_6__["default"]),
|
|
39141
|
+
/* harmony export */ cookieValueLenientValidator: () => (/* reexport safe */ _set_cookie_serialize_validators_cookie_value_lenient_mjs__WEBPACK_IMPORTED_MODULE_10__["default"]),
|
|
39142
|
+
/* harmony export */ cookieValueStrictEncoder: () => (/* reexport safe */ _set_cookie_serialize_encoders_cookie_value_strict_mjs__WEBPACK_IMPORTED_MODULE_5__["default"]),
|
|
39143
|
+
/* harmony export */ cookieValueStrictValidator: () => (/* reexport safe */ _set_cookie_serialize_validators_cookie_value_strict_mjs__WEBPACK_IMPORTED_MODULE_9__["default"]),
|
|
39144
|
+
/* harmony export */ identity: () => (/* reexport safe */ _utils_mjs__WEBPACK_IMPORTED_MODULE_11__.identity),
|
|
39145
|
+
/* harmony export */ noop: () => (/* reexport safe */ _utils_mjs__WEBPACK_IMPORTED_MODULE_11__.noop),
|
|
39146
|
+
/* harmony export */ parseCookie: () => (/* reexport safe */ _cookie_parse_index_mjs__WEBPACK_IMPORTED_MODULE_1__["default"]),
|
|
39147
|
+
/* harmony export */ serializeCookie: () => (/* reexport safe */ _cookie_serialize_index_mjs__WEBPACK_IMPORTED_MODULE_2__["default"])
|
|
39148
|
+
/* harmony export */ });
|
|
39149
|
+
/* harmony import */ var _grammar_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(96552);
|
|
39150
|
+
/* harmony import */ var _cookie_parse_index_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(32910);
|
|
39151
|
+
/* harmony import */ var _cookie_serialize_index_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(90465);
|
|
39152
|
+
/* harmony import */ var _set_cookie_serialize_encoders_cookie_name_strict_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(97558);
|
|
39153
|
+
/* harmony import */ var _set_cookie_serialize_encoders_cookie_name_lenient_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(10934);
|
|
39154
|
+
/* harmony import */ var _set_cookie_serialize_encoders_cookie_value_strict_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(11714);
|
|
39155
|
+
/* harmony import */ var _set_cookie_serialize_encoders_cookie_value_lenient_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(81194);
|
|
39156
|
+
/* harmony import */ var _set_cookie_serialize_validators_cookie_name_strict_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(68712);
|
|
39157
|
+
/* harmony import */ var _set_cookie_serialize_validators_cookie_name_lenient_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(80904);
|
|
39158
|
+
/* harmony import */ var _set_cookie_serialize_validators_cookie_value_strict_mjs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(27120);
|
|
39159
|
+
/* harmony import */ var _set_cookie_serialize_validators_cookie_value_lenient_mjs__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(99504);
|
|
39160
|
+
/* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(91176);
|
|
39161
|
+
|
|
39162
|
+
|
|
39163
|
+
|
|
39164
|
+
|
|
39165
|
+
|
|
39166
|
+
|
|
39167
|
+
|
|
39168
|
+
|
|
39169
|
+
|
|
39170
|
+
|
|
39171
|
+
|
|
39172
|
+
|
|
39173
|
+
|
|
39174
|
+
/***/ }),
|
|
39175
|
+
|
|
39176
|
+
/***/ 10934:
|
|
39177
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
39178
|
+
|
|
39179
|
+
"use strict";
|
|
39180
|
+
__webpack_require__.r(__webpack_exports__);
|
|
39181
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
39182
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
39183
|
+
/* harmony export */ });
|
|
39184
|
+
/* harmony import */ var _cookie_test_cookie_name_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(87561);
|
|
39185
|
+
/* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(91176);
|
|
39186
|
+
|
|
39187
|
+
|
|
39188
|
+
const cookieNameLenientEncoder = cookieName => {
|
|
39189
|
+
const value = String(cookieName);
|
|
39190
|
+
let result = '';
|
|
39191
|
+
for (const char of value) {
|
|
39192
|
+
result += (0,_cookie_test_cookie_name_mjs__WEBPACK_IMPORTED_MODULE_0__["default"])(char, {
|
|
39193
|
+
strict: false
|
|
39194
|
+
}) ? char : (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.percentEncodeChar)(char);
|
|
39195
|
+
}
|
|
39196
|
+
return result;
|
|
39197
|
+
};
|
|
39198
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cookieNameLenientEncoder);
|
|
39199
|
+
|
|
39200
|
+
/***/ }),
|
|
39201
|
+
|
|
39202
|
+
/***/ 97558:
|
|
39203
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
39204
|
+
|
|
39205
|
+
"use strict";
|
|
39206
|
+
__webpack_require__.r(__webpack_exports__);
|
|
39207
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
39208
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
39209
|
+
/* harmony export */ });
|
|
39210
|
+
/* harmony import */ var _cookie_test_cookie_name_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(87561);
|
|
39211
|
+
/* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(91176);
|
|
39212
|
+
|
|
39213
|
+
|
|
39214
|
+
const cookieNameStrictEncoder = cookieName => {
|
|
39215
|
+
const value = String(cookieName);
|
|
39216
|
+
let result = '';
|
|
39217
|
+
for (const char of value) {
|
|
39218
|
+
result += (0,_cookie_test_cookie_name_mjs__WEBPACK_IMPORTED_MODULE_0__["default"])(char) ? char : (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.percentEncodeChar)(char);
|
|
39219
|
+
}
|
|
39220
|
+
return result;
|
|
39221
|
+
};
|
|
39222
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cookieNameStrictEncoder);
|
|
39223
|
+
|
|
39224
|
+
/***/ }),
|
|
39225
|
+
|
|
39226
|
+
/***/ 81194:
|
|
39227
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
39228
|
+
|
|
39229
|
+
"use strict";
|
|
39230
|
+
__webpack_require__.r(__webpack_exports__);
|
|
39231
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
39232
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
39233
|
+
/* harmony export */ });
|
|
39234
|
+
/* harmony import */ var apg_lite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16646);
|
|
39235
|
+
/* harmony import */ var _grammar_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(96552);
|
|
39236
|
+
/* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(91176);
|
|
39237
|
+
|
|
39238
|
+
|
|
39239
|
+
|
|
39240
|
+
const parser = new apg_lite__WEBPACK_IMPORTED_MODULE_0__.Parser();
|
|
39241
|
+
const grammar = new _grammar_mjs__WEBPACK_IMPORTED_MODULE_1__["default"]();
|
|
39242
|
+
const cookieValueLenientEncoder = cookieValue => {
|
|
39243
|
+
const value = String(cookieValue);
|
|
39244
|
+
|
|
39245
|
+
// detect if the value is quoted
|
|
39246
|
+
const isQuoted = value.length >= 2 && value.startsWith('"') && value.endsWith('"');
|
|
39247
|
+
|
|
39248
|
+
// remove quotes if present for processing
|
|
39249
|
+
const valueToEncode = isQuoted ? value.slice(1, -1) : value;
|
|
39250
|
+
const startRule = isQuoted ? 'lenient-quoted-char' : 'lenient-cookie-octet';
|
|
39251
|
+
let result = '';
|
|
39252
|
+
for (const char of valueToEncode) {
|
|
39253
|
+
result += parser.parse(grammar, startRule, char).success ? char : (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_2__.percentEncodeChar)(char);
|
|
39254
|
+
}
|
|
39255
|
+
return isQuoted ? `"${result}"` : result;
|
|
39256
|
+
};
|
|
39257
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cookieValueLenientEncoder);
|
|
39258
|
+
|
|
39259
|
+
/***/ }),
|
|
39260
|
+
|
|
39261
|
+
/***/ 11714:
|
|
39262
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
39263
|
+
|
|
39264
|
+
"use strict";
|
|
39265
|
+
__webpack_require__.r(__webpack_exports__);
|
|
39266
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
39267
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
39268
|
+
/* harmony export */ });
|
|
39269
|
+
/* harmony import */ var apg_lite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16646);
|
|
39270
|
+
/* harmony import */ var _grammar_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(96552);
|
|
39271
|
+
/* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(91176);
|
|
39272
|
+
|
|
39273
|
+
|
|
39274
|
+
|
|
39275
|
+
const parser = new apg_lite__WEBPACK_IMPORTED_MODULE_0__.Parser();
|
|
39276
|
+
const grammar = new _grammar_mjs__WEBPACK_IMPORTED_MODULE_1__["default"]();
|
|
39277
|
+
const cookieValueStrictEncoder = cookieValue => {
|
|
39278
|
+
const value = String(cookieValue);
|
|
39279
|
+
|
|
39280
|
+
// detect if the value is quoted
|
|
39281
|
+
const isQuoted = value.length >= 2 && value.startsWith('"') && value.endsWith('"');
|
|
39282
|
+
|
|
39283
|
+
// remove quotes if present for processing
|
|
39284
|
+
const valueToEncode = isQuoted ? value.slice(1, -1) : value;
|
|
39285
|
+
let result = '';
|
|
39286
|
+
for (const char of valueToEncode) {
|
|
39287
|
+
result += parser.parse(grammar, 'cookie-octet', char).success ? char : (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_2__.percentEncodeChar)(char);
|
|
39288
|
+
}
|
|
39289
|
+
|
|
39290
|
+
// return quoted if input was quoted, unquoted otherwise
|
|
39291
|
+
return isQuoted ? `"${result}"` : result;
|
|
39292
|
+
};
|
|
39293
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cookieValueStrictEncoder);
|
|
39294
|
+
|
|
39295
|
+
/***/ }),
|
|
39296
|
+
|
|
39297
|
+
/***/ 79080:
|
|
39298
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
39299
|
+
|
|
39300
|
+
"use strict";
|
|
39301
|
+
__webpack_require__.r(__webpack_exports__);
|
|
39302
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
39303
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
39304
|
+
/* harmony export */ });
|
|
39305
|
+
/* harmony import */ var _encoders_cookie_value_strict_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11714);
|
|
39306
|
+
/* harmony import */ var _validators_cookie_name_strict_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(68712);
|
|
39307
|
+
/* harmony import */ var _validators_cookie_value_strict_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(27120);
|
|
39308
|
+
/* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(91176);
|
|
39309
|
+
|
|
39310
|
+
|
|
39311
|
+
|
|
39312
|
+
|
|
39313
|
+
const defaultOptions = {
|
|
39314
|
+
encoders: {
|
|
39315
|
+
name: _utils_mjs__WEBPACK_IMPORTED_MODULE_3__.identity,
|
|
39316
|
+
value: _encoders_cookie_value_strict_mjs__WEBPACK_IMPORTED_MODULE_0__["default"]
|
|
39317
|
+
},
|
|
39318
|
+
validators: {
|
|
39319
|
+
name: _validators_cookie_name_strict_mjs__WEBPACK_IMPORTED_MODULE_1__["default"],
|
|
39320
|
+
value: _validators_cookie_value_strict_mjs__WEBPACK_IMPORTED_MODULE_2__["default"]
|
|
39321
|
+
}
|
|
39322
|
+
};
|
|
39323
|
+
const serialize = (name, value, options = {}) => {
|
|
39324
|
+
const mergedOptions = {
|
|
39325
|
+
...defaultOptions,
|
|
39326
|
+
...options,
|
|
39327
|
+
encoders: {
|
|
39328
|
+
...defaultOptions.encoders,
|
|
39329
|
+
...options.encoders
|
|
39330
|
+
},
|
|
39331
|
+
validators: {
|
|
39332
|
+
...defaultOptions.validators,
|
|
39333
|
+
...options.validators
|
|
39334
|
+
}
|
|
39335
|
+
};
|
|
39336
|
+
const encodedName = mergedOptions.encoders.name(name);
|
|
39337
|
+
const encodedValue = mergedOptions.encoders.value(value);
|
|
39338
|
+
mergedOptions.validators.name(encodedName);
|
|
39339
|
+
mergedOptions.validators.value(encodedValue);
|
|
39340
|
+
return `${encodedName}=${encodedValue}`;
|
|
39341
|
+
};
|
|
39342
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (serialize);
|
|
39343
|
+
|
|
39344
|
+
/***/ }),
|
|
39345
|
+
|
|
39346
|
+
/***/ 80904:
|
|
39347
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
39348
|
+
|
|
39349
|
+
"use strict";
|
|
39350
|
+
__webpack_require__.r(__webpack_exports__);
|
|
39351
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
39352
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
39353
|
+
/* harmony export */ });
|
|
39354
|
+
/* harmony import */ var _cookie_test_cookie_name_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(87561);
|
|
39355
|
+
|
|
39356
|
+
const cookieNameLenientValidator = cookieName => {
|
|
39357
|
+
if (!(0,_cookie_test_cookie_name_mjs__WEBPACK_IMPORTED_MODULE_0__["default"])(cookieName, {
|
|
39358
|
+
strict: false
|
|
39359
|
+
})) {
|
|
39360
|
+
throw new TypeError(`Invalid cookie name: ${cookieName}`);
|
|
39361
|
+
}
|
|
39362
|
+
};
|
|
39363
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cookieNameLenientValidator);
|
|
39364
|
+
|
|
39365
|
+
/***/ }),
|
|
39366
|
+
|
|
39367
|
+
/***/ 68712:
|
|
39368
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
39369
|
+
|
|
39370
|
+
"use strict";
|
|
39371
|
+
__webpack_require__.r(__webpack_exports__);
|
|
39372
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
39373
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
39374
|
+
/* harmony export */ });
|
|
39375
|
+
/* harmony import */ var _cookie_test_cookie_name_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(87561);
|
|
39376
|
+
|
|
39377
|
+
const cookieNameStrictValidator = cookieName => {
|
|
39378
|
+
if (!(0,_cookie_test_cookie_name_mjs__WEBPACK_IMPORTED_MODULE_0__["default"])(cookieName)) {
|
|
39379
|
+
throw new TypeError(`Invalid cookie name: ${cookieName}`);
|
|
39380
|
+
}
|
|
39381
|
+
};
|
|
39382
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cookieNameStrictValidator);
|
|
39383
|
+
|
|
39384
|
+
/***/ }),
|
|
39385
|
+
|
|
39386
|
+
/***/ 99504:
|
|
39387
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
39388
|
+
|
|
39389
|
+
"use strict";
|
|
39390
|
+
__webpack_require__.r(__webpack_exports__);
|
|
39391
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
39392
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
39393
|
+
/* harmony export */ });
|
|
39394
|
+
/* harmony import */ var _cookie_test_cookie_value_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(58571);
|
|
39395
|
+
|
|
39396
|
+
const cookieValueLenientValidator = cookieValue => {
|
|
39397
|
+
if (!(0,_cookie_test_cookie_value_mjs__WEBPACK_IMPORTED_MODULE_0__["default"])(cookieValue, {
|
|
39398
|
+
strict: false
|
|
39399
|
+
})) {
|
|
39400
|
+
throw new TypeError(`Invalid cookie value: ${cookieValue}`);
|
|
39401
|
+
}
|
|
39402
|
+
};
|
|
39403
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cookieValueLenientValidator);
|
|
39404
|
+
|
|
39405
|
+
/***/ }),
|
|
39406
|
+
|
|
39407
|
+
/***/ 27120:
|
|
39408
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
39409
|
+
|
|
39410
|
+
"use strict";
|
|
39411
|
+
__webpack_require__.r(__webpack_exports__);
|
|
39412
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
39413
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
39414
|
+
/* harmony export */ });
|
|
39415
|
+
/* harmony import */ var _cookie_test_cookie_value_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(58571);
|
|
39416
|
+
|
|
39417
|
+
const cookieValueStrictValidator = cookieValue => {
|
|
39418
|
+
if (!(0,_cookie_test_cookie_value_mjs__WEBPACK_IMPORTED_MODULE_0__["default"])(cookieValue)) {
|
|
39419
|
+
throw new TypeError(`Invalid cookie value: ${cookieValue}`);
|
|
39420
|
+
}
|
|
39421
|
+
};
|
|
39422
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cookieValueStrictValidator);
|
|
39423
|
+
|
|
39424
|
+
/***/ }),
|
|
39425
|
+
|
|
39426
|
+
/***/ 91176:
|
|
39427
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
39428
|
+
|
|
39429
|
+
"use strict";
|
|
39430
|
+
__webpack_require__.r(__webpack_exports__);
|
|
39431
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
39432
|
+
/* harmony export */ identity: () => (/* binding */ identity),
|
|
39433
|
+
/* harmony export */ noop: () => (/* binding */ noop),
|
|
39434
|
+
/* harmony export */ percentEncodeChar: () => (/* binding */ percentEncodeChar)
|
|
39435
|
+
/* harmony export */ });
|
|
39436
|
+
const percentEncodeChar = char => {
|
|
39437
|
+
if (typeof char !== 'string' || [...char].length !== 1) {
|
|
39438
|
+
throw new TypeError('Input must be a single character string.');
|
|
39439
|
+
}
|
|
39440
|
+
const codePoint = char.codePointAt(0);
|
|
39441
|
+
if (codePoint <= 0x7f) {
|
|
39442
|
+
// ASCII range: Encode as %XX
|
|
39443
|
+
return `%${codePoint.toString(16).toUpperCase().padStart(2, '0')}`;
|
|
39444
|
+
} else {
|
|
39445
|
+
// Non-ASCII range: Use encodeURIComponent to handle UTF-8 encoding
|
|
39446
|
+
return encodeURIComponent(char);
|
|
39447
|
+
}
|
|
39448
|
+
};
|
|
39449
|
+
const identity = a => a;
|
|
39450
|
+
const noop = () => {};
|
|
39451
|
+
|
|
39452
|
+
/***/ }),
|
|
39453
|
+
|
|
39454
|
+
/***/ 16646:
|
|
39455
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
39456
|
+
|
|
39457
|
+
"use strict";
|
|
39458
|
+
__webpack_require__.r(__webpack_exports__);
|
|
39459
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
39460
|
+
/* harmony export */ Ast: () => (/* binding */ Ast),
|
|
39461
|
+
/* harmony export */ Parser: () => (/* binding */ Parser),
|
|
39462
|
+
/* harmony export */ Stats: () => (/* binding */ Stats),
|
|
39463
|
+
/* harmony export */ Trace: () => (/* binding */ Trace),
|
|
39464
|
+
/* harmony export */ identifiers: () => (/* binding */ identifiers),
|
|
39465
|
+
/* harmony export */ utilities: () => (/* binding */ utilities)
|
|
39466
|
+
/* harmony export */ });
|
|
39467
|
+
/* *************************************************************************************
|
|
39468
|
+
* copyright: Copyright (c) 2023 Lowell D. Thomas, all rights reserved
|
|
39469
|
+
* license: BSD-2-Clause (https://opensource.org/licenses/BSD-2-Clause)
|
|
39470
|
+
*
|
|
39471
|
+
* Redistribution and use in source and binary forms, with or without
|
|
39472
|
+
* modification, are permitted provided that the following conditions are met:
|
|
39473
|
+
*
|
|
39474
|
+
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
39475
|
+
* list of conditions and the following disclaimer.
|
|
39476
|
+
*
|
|
39477
|
+
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
39478
|
+
* this list of conditions and the following disclaimer in the documentation
|
|
39479
|
+
* and/or other materials provided with the distribution.
|
|
39480
|
+
*
|
|
39481
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
39482
|
+
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
39483
|
+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
39484
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
39485
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
39486
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
39487
|
+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
39488
|
+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
39489
|
+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
39490
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
39491
|
+
*
|
|
39492
|
+
* ********************************************************************************* */
|
|
39493
|
+
|
|
39494
|
+
|
|
39495
|
+
const Parser = function fnparser() {
|
|
39496
|
+
const id = identifiers;
|
|
39497
|
+
const utils = utilities;
|
|
39498
|
+
const p = this;
|
|
39499
|
+
const thisFileName = 'parser.js: Parser(): ';
|
|
39500
|
+
const systemData = function systemData() {
|
|
39501
|
+
this.state = id.ACTIVE;
|
|
39502
|
+
this.phraseLength = 0;
|
|
39503
|
+
this.refresh = () => {
|
|
39504
|
+
this.state = id.ACTIVE;
|
|
39505
|
+
this.phraseLength = 0;
|
|
39506
|
+
};
|
|
39507
|
+
};
|
|
39508
|
+
p.ast = undefined;
|
|
39509
|
+
p.stats = undefined;
|
|
39510
|
+
p.trace = undefined;
|
|
39511
|
+
p.callbacks = [];
|
|
39512
|
+
let lookAhead = 0;
|
|
39513
|
+
let treeDepth = 0;
|
|
39514
|
+
let maxTreeDepth = 0;
|
|
39515
|
+
let nodeHits = 0;
|
|
39516
|
+
let maxMatched = 0;
|
|
39517
|
+
let rules = undefined;
|
|
39518
|
+
let udts = undefined;
|
|
39519
|
+
let opcodes = undefined;
|
|
39520
|
+
let chars = undefined;
|
|
39521
|
+
let sysData = new systemData();
|
|
39522
|
+
let ruleCallbacks = undefined;
|
|
39523
|
+
let udtCallbacks = undefined;
|
|
39524
|
+
let userData = undefined;
|
|
39525
|
+
const clear = () => {
|
|
39526
|
+
lookAhead = 0;
|
|
39527
|
+
treeDepth = 0;
|
|
39528
|
+
maxTreeDepth = 0;
|
|
39529
|
+
nodeHits = 0;
|
|
39530
|
+
maxMatched = 0;
|
|
39531
|
+
rules = undefined;
|
|
39532
|
+
udts = undefined;
|
|
39533
|
+
opcodes = undefined;
|
|
39534
|
+
chars = undefined;
|
|
39535
|
+
sysData.refresh();
|
|
39536
|
+
ruleCallbacks = undefined;
|
|
39537
|
+
udtCallbacks = undefined;
|
|
39538
|
+
userData = undefined;
|
|
39539
|
+
};
|
|
39540
|
+
|
|
39541
|
+
const initializeCallbacks = () => {
|
|
39542
|
+
const functionName = `${thisFileName}initializeCallbacks(): `;
|
|
39543
|
+
let i;
|
|
39544
|
+
ruleCallbacks = [];
|
|
39545
|
+
udtCallbacks = [];
|
|
39546
|
+
for (i = 0; i < rules.length; i += 1) {
|
|
39547
|
+
ruleCallbacks[i] = undefined;
|
|
39548
|
+
}
|
|
39549
|
+
for (i = 0; i < udts.length; i += 1) {
|
|
39550
|
+
udtCallbacks[i] = undefined;
|
|
39551
|
+
}
|
|
39552
|
+
let func;
|
|
39553
|
+
const list = [];
|
|
39554
|
+
for (i = 0; i < rules.length; i += 1) {
|
|
39555
|
+
list.push(rules[i].lower);
|
|
39556
|
+
}
|
|
39557
|
+
for (i = 0; i < udts.length; i += 1) {
|
|
39558
|
+
list.push(udts[i].lower);
|
|
39559
|
+
}
|
|
39560
|
+
for (const index in p.callbacks) {
|
|
39561
|
+
if (p.callbacks.hasOwnProperty(index)) {
|
|
39562
|
+
i = list.indexOf(index.toLowerCase());
|
|
39563
|
+
if (i < 0) {
|
|
39564
|
+
throw new Error(`${functionName}syntax callback '${index}' not a rule or udt name`);
|
|
39565
|
+
}
|
|
39566
|
+
func = p.callbacks[index] ? p.callbacks[index] : undefined;
|
|
39567
|
+
if (typeof func === 'function' || func === undefined) {
|
|
39568
|
+
if (i < rules.length) {
|
|
39569
|
+
ruleCallbacks[i] = func;
|
|
39570
|
+
} else {
|
|
39571
|
+
udtCallbacks[i - rules.length] = func;
|
|
39572
|
+
}
|
|
39573
|
+
} else {
|
|
39574
|
+
throw new Error(`${functionName}syntax callback[${index}] must be function reference or falsy)`);
|
|
39575
|
+
}
|
|
39576
|
+
}
|
|
39577
|
+
}
|
|
39578
|
+
};
|
|
39579
|
+
|
|
39580
|
+
p.parse = (grammar, startName, inputString, callbackData) => {
|
|
39581
|
+
const functionName = `${thisFileName}parse(): `;
|
|
39582
|
+
clear();
|
|
39583
|
+
chars = utils.stringToChars(inputString);
|
|
39584
|
+
rules = grammar.rules;
|
|
39585
|
+
udts = grammar.udts;
|
|
39586
|
+
const lower = startName.toLowerCase();
|
|
39587
|
+
let startIndex = undefined;
|
|
39588
|
+
for (const i in rules) {
|
|
39589
|
+
if (rules.hasOwnProperty(i)) {
|
|
39590
|
+
if (lower === rules[i].lower) {
|
|
39591
|
+
startIndex = rules[i].index;
|
|
39592
|
+
break;
|
|
39593
|
+
}
|
|
39594
|
+
}
|
|
39595
|
+
}
|
|
39596
|
+
if (startIndex === undefined) {
|
|
39597
|
+
throw new Error(`${functionName}start rule name '${startRule}' not recognized`);
|
|
39598
|
+
}
|
|
39599
|
+
initializeCallbacks();
|
|
39600
|
+
if (p.trace) {
|
|
39601
|
+
p.trace.init(rules, udts, chars);
|
|
39602
|
+
}
|
|
39603
|
+
if (p.stats) {
|
|
39604
|
+
p.stats.init(rules, udts);
|
|
39605
|
+
}
|
|
39606
|
+
if (p.ast) {
|
|
39607
|
+
p.ast.init(rules, udts, chars);
|
|
39608
|
+
}
|
|
39609
|
+
userData = callbackData;
|
|
39610
|
+
/* create a dummy opcode for the start rule */
|
|
39611
|
+
opcodes = [
|
|
39612
|
+
{
|
|
39613
|
+
type: id.RNM,
|
|
39614
|
+
index: startIndex,
|
|
39615
|
+
},
|
|
39616
|
+
];
|
|
39617
|
+
/* execute the start rule */
|
|
39618
|
+
opExecute(0, 0);
|
|
39619
|
+
opcodes = undefined;
|
|
39620
|
+
/* test and return the sysData */
|
|
39621
|
+
let success = false;
|
|
39622
|
+
switch (sysData.state) {
|
|
39623
|
+
case id.ACTIVE:
|
|
39624
|
+
throw new Error(`${functionName}final state should never be 'ACTIVE'`);
|
|
39625
|
+
case id.NOMATCH:
|
|
39626
|
+
success = false;
|
|
39627
|
+
break;
|
|
39628
|
+
case id.EMPTY:
|
|
39629
|
+
case id.MATCH:
|
|
39630
|
+
if (sysData.phraseLength === chars.length) {
|
|
39631
|
+
success = true;
|
|
39632
|
+
} else {
|
|
39633
|
+
success = false;
|
|
39634
|
+
}
|
|
39635
|
+
break;
|
|
39636
|
+
default:
|
|
39637
|
+
throw new Error('unrecognized state');
|
|
39638
|
+
}
|
|
39639
|
+
return {
|
|
39640
|
+
success,
|
|
39641
|
+
state: sysData.state,
|
|
39642
|
+
stateName: id.idName(sysData.state),
|
|
39643
|
+
length: chars.length,
|
|
39644
|
+
matched: sysData.phraseLength,
|
|
39645
|
+
maxMatched,
|
|
39646
|
+
maxTreeDepth,
|
|
39647
|
+
nodeHits,
|
|
39648
|
+
};
|
|
39649
|
+
};
|
|
39650
|
+
// The `ALT` operator.<br>
|
|
39651
|
+
// Executes its child nodes, from left to right, until it finds a match.
|
|
39652
|
+
// Fails if *all* of its child nodes fail.
|
|
39653
|
+
const opALT = (opIndex, phraseIndex) => {
|
|
39654
|
+
const op = opcodes[opIndex];
|
|
39655
|
+
for (let i = 0; i < op.children.length; i += 1) {
|
|
39656
|
+
opExecute(op.children[i], phraseIndex);
|
|
39657
|
+
if (sysData.state !== id.NOMATCH) {
|
|
39658
|
+
break;
|
|
39659
|
+
}
|
|
39660
|
+
}
|
|
39661
|
+
};
|
|
39662
|
+
// The `CAT` operator.<br>
|
|
39663
|
+
// Executes all of its child nodes, from left to right,
|
|
39664
|
+
// concatenating the matched phrases.
|
|
39665
|
+
// Fails if *any* child nodes fail.
|
|
39666
|
+
const opCAT = (opIndex, phraseIndex) => {
|
|
39667
|
+
let success;
|
|
39668
|
+
let astLength;
|
|
39669
|
+
let catCharIndex;
|
|
39670
|
+
let catPhrase;
|
|
39671
|
+
const op = opcodes[opIndex];
|
|
39672
|
+
if (p.ast) {
|
|
39673
|
+
astLength = p.ast.getLength();
|
|
39674
|
+
}
|
|
39675
|
+
success = true;
|
|
39676
|
+
catCharIndex = phraseIndex;
|
|
39677
|
+
catPhrase = 0;
|
|
39678
|
+
for (let i = 0; i < op.children.length; i += 1) {
|
|
39679
|
+
opExecute(op.children[i], catCharIndex);
|
|
39680
|
+
if (sysData.state === id.NOMATCH) {
|
|
39681
|
+
success = false;
|
|
39682
|
+
break;
|
|
39683
|
+
} else {
|
|
39684
|
+
catCharIndex += sysData.phraseLength;
|
|
39685
|
+
catPhrase += sysData.phraseLength;
|
|
39686
|
+
}
|
|
39687
|
+
}
|
|
39688
|
+
if (success) {
|
|
39689
|
+
sysData.state = catPhrase === 0 ? id.EMPTY : id.MATCH;
|
|
39690
|
+
sysData.phraseLength = catPhrase;
|
|
39691
|
+
} else {
|
|
39692
|
+
sysData.state = id.NOMATCH;
|
|
39693
|
+
sysData.phraseLength = 0;
|
|
39694
|
+
if (p.ast) {
|
|
39695
|
+
p.ast.setLength(astLength);
|
|
39696
|
+
}
|
|
39697
|
+
}
|
|
39698
|
+
};
|
|
39699
|
+
// The `REP` operator.<br>
|
|
39700
|
+
// Repeatedly executes its single child node,
|
|
39701
|
+
// concatenating each of the matched phrases found.
|
|
39702
|
+
// The number of repetitions executed and its final sysData depends
|
|
39703
|
+
// on its `min` & `max` repetition values.
|
|
39704
|
+
const opREP = (opIndex, phraseIndex) => {
|
|
39705
|
+
let astLength;
|
|
39706
|
+
let repCharIndex;
|
|
38511
39707
|
let repPhrase;
|
|
38512
39708
|
let repCount;
|
|
38513
39709
|
const op = opcodes[opIndex];
|
|
@@ -44838,6 +46034,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
44838
46034
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
44839
46035
|
/* harmony export */ Grammar: () => (/* reexport safe */ _path_templating_mjs__WEBPACK_IMPORTED_MODULE_0__["default"]),
|
|
44840
46036
|
/* harmony export */ encodePathComponent: () => (/* reexport safe */ _resolve_mjs__WEBPACK_IMPORTED_MODULE_3__.encodePathComponent),
|
|
46037
|
+
/* harmony export */ isIdentical: () => (/* reexport safe */ _predicates_mjs__WEBPACK_IMPORTED_MODULE_4__.isIdentical),
|
|
44841
46038
|
/* harmony export */ parse: () => (/* reexport safe */ _parse_index_mjs__WEBPACK_IMPORTED_MODULE_2__["default"]),
|
|
44842
46039
|
/* harmony export */ resolve: () => (/* reexport safe */ _resolve_mjs__WEBPACK_IMPORTED_MODULE_3__["default"]),
|
|
44843
46040
|
/* harmony export */ test: () => (/* reexport safe */ _test_mjs__WEBPACK_IMPORTED_MODULE_1__["default"])
|
|
@@ -44846,6 +46043,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
44846
46043
|
/* harmony import */ var _test_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(62674);
|
|
44847
46044
|
/* harmony import */ var _parse_index_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(10426);
|
|
44848
46045
|
/* harmony import */ var _resolve_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(97642);
|
|
46046
|
+
/* harmony import */ var _predicates_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1604);
|
|
46047
|
+
|
|
44849
46048
|
|
|
44850
46049
|
|
|
44851
46050
|
|
|
@@ -45438,6 +46637,7 @@ function grammar() {
|
|
|
45438
46637
|
this.toString = function toString() {
|
|
45439
46638
|
let str = "";
|
|
45440
46639
|
str += "; OpenAPI Path Templating ABNF syntax\n";
|
|
46640
|
+
str += "; variant of https://datatracker.ietf.org/doc/html/rfc3986#section-3.3\n";
|
|
45441
46641
|
str += "path-template = slash *( path-segment slash ) [ path-segment ]\n";
|
|
45442
46642
|
str += "path-segment = 1*( path-literal / template-expression )\n";
|
|
45443
46643
|
str += "slash = \"/\"\n";
|
|
@@ -45445,14 +46645,17 @@ function grammar() {
|
|
|
45445
46645
|
str += "template-expression = \"{\" template-expression-param-name \"}\"\n";
|
|
45446
46646
|
str += "template-expression-param-name = 1*( %x00-7A / %x7C / %x7E-10FFFF ) ; every UTF8 character except { and } (from OpenAPI)\n";
|
|
45447
46647
|
str += "\n";
|
|
45448
|
-
str += ";
|
|
46648
|
+
str += "; https://datatracker.ietf.org/doc/html/rfc3986#section-3.3\n";
|
|
45449
46649
|
str += "pchar = unreserved / pct-encoded / sub-delims / \":\" / \"@\"\n";
|
|
45450
46650
|
str += "unreserved = ALPHA / DIGIT / \"-\" / \".\" / \"_\" / \"~\"\n";
|
|
46651
|
+
str += " ; https://datatracker.ietf.org/doc/html/rfc3986#section-2.3\n";
|
|
45451
46652
|
str += "pct-encoded = \"%\" HEXDIG HEXDIG\n";
|
|
46653
|
+
str += " ; https://datatracker.ietf.org/doc/html/rfc3986#section-2.1\n";
|
|
45452
46654
|
str += "sub-delims = \"!\" / \"$\" / \"&\" / \"'\" / \"(\" / \")\"\n";
|
|
45453
46655
|
str += " / \"*\" / \"+\" / \",\" / \";\" / \"=\"\n";
|
|
46656
|
+
str += " ; https://datatracker.ietf.org/doc/html/rfc3986#section-2.2\n";
|
|
45454
46657
|
str += "\n";
|
|
45455
|
-
str += ";
|
|
46658
|
+
str += "; https://datatracker.ietf.org/doc/html/rfc5234#appendix-B.1\n";
|
|
45456
46659
|
str += "ALPHA = %x41-5A / %x61-7A ; A-Z / a-z\n";
|
|
45457
46660
|
str += "DIGIT = %x30-39 ; 0-9\n";
|
|
45458
46661
|
str += "HEXDIG = DIGIT / \"A\" / \"B\" / \"C\" / \"D\" / \"E\" / \"F\"\n";
|
|
@@ -45462,6 +46665,40 @@ function grammar() {
|
|
|
45462
46665
|
|
|
45463
46666
|
/***/ }),
|
|
45464
46667
|
|
|
46668
|
+
/***/ 1604:
|
|
46669
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
46670
|
+
|
|
46671
|
+
"use strict";
|
|
46672
|
+
__webpack_require__.r(__webpack_exports__);
|
|
46673
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
46674
|
+
/* harmony export */ isIdentical: () => (/* binding */ isIdentical)
|
|
46675
|
+
/* harmony export */ });
|
|
46676
|
+
/* harmony import */ var _parse_index_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(10426);
|
|
46677
|
+
|
|
46678
|
+
const isIdentical = (pathTemplate1, pathTemplate2) => {
|
|
46679
|
+
if (typeof pathTemplate1 !== 'string') return false;
|
|
46680
|
+
if (typeof pathTemplate2 !== 'string') return false;
|
|
46681
|
+
const parseResult1 = (0,_parse_index_mjs__WEBPACK_IMPORTED_MODULE_0__["default"])(pathTemplate1);
|
|
46682
|
+
const parseResult2 = (0,_parse_index_mjs__WEBPACK_IMPORTED_MODULE_0__["default"])(pathTemplate2);
|
|
46683
|
+
const parts1 = [];
|
|
46684
|
+
const parts2 = [];
|
|
46685
|
+
if (!parseResult1.result.success) return false;
|
|
46686
|
+
if (!parseResult2.result.success) return false;
|
|
46687
|
+
parseResult1.ast.translate(parts1);
|
|
46688
|
+
parseResult2.ast.translate(parts2);
|
|
46689
|
+
if (parts1.length !== parts2.length) return false;
|
|
46690
|
+
for (let i = 1; i < parts1.length; i++) {
|
|
46691
|
+
const [type1, value1] = parts1[i];
|
|
46692
|
+
const [type2, value2] = parts2[i];
|
|
46693
|
+
if (type1 !== type2) return false;
|
|
46694
|
+
if (type1 === 'template-expression' || type1 === 'template-expression-param-name') continue;
|
|
46695
|
+
if (value1 !== value2) return false;
|
|
46696
|
+
}
|
|
46697
|
+
return true;
|
|
46698
|
+
};
|
|
46699
|
+
|
|
46700
|
+
/***/ }),
|
|
46701
|
+
|
|
45465
46702
|
/***/ 97642:
|
|
45466
46703
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
45467
46704
|
|
|
@@ -45715,22 +46952,22 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
45715
46952
|
function grammar() {
|
|
45716
46953
|
// ```
|
|
45717
46954
|
// SUMMARY
|
|
45718
|
-
// rules =
|
|
46955
|
+
// rules = 9
|
|
45719
46956
|
// udts = 0
|
|
45720
|
-
// opcodes =
|
|
46957
|
+
// opcodes = 62
|
|
45721
46958
|
// --- ABNF original opcodes
|
|
45722
|
-
// ALT =
|
|
46959
|
+
// ALT = 6
|
|
45723
46960
|
// CAT = 2
|
|
45724
46961
|
// REP = 3
|
|
45725
|
-
// RNM =
|
|
45726
|
-
// TLS =
|
|
46962
|
+
// RNM = 9
|
|
46963
|
+
// TLS = 9
|
|
45727
46964
|
// TBS = 6
|
|
45728
46965
|
// TRG = 27
|
|
45729
46966
|
// --- SABNF superset opcodes
|
|
45730
46967
|
// UDT = 0
|
|
45731
46968
|
// AND = 0
|
|
45732
46969
|
// NOT = 0
|
|
45733
|
-
// characters = [
|
|
46970
|
+
// characters = [0 - 1114111]
|
|
45734
46971
|
// ```
|
|
45735
46972
|
/* OBJECT IDENTIFIER (for internal parser use) */
|
|
45736
46973
|
this.grammarObject = 'grammarObject';
|
|
@@ -45762,51 +46999,33 @@ function grammar() {
|
|
|
45762
46999
|
isBkr: false
|
|
45763
47000
|
};
|
|
45764
47001
|
this.rules[4] = {
|
|
45765
|
-
name: 'ALPHA',
|
|
45766
|
-
lower: 'alpha',
|
|
45767
|
-
index: 4,
|
|
45768
|
-
isBkr: false
|
|
45769
|
-
};
|
|
45770
|
-
this.rules[5] = {
|
|
45771
47002
|
name: 'DIGIT',
|
|
45772
47003
|
lower: 'digit',
|
|
45773
|
-
index:
|
|
47004
|
+
index: 4,
|
|
45774
47005
|
isBkr: false
|
|
45775
47006
|
};
|
|
45776
|
-
this.rules[
|
|
47007
|
+
this.rules[5] = {
|
|
45777
47008
|
name: 'HEXDIG',
|
|
45778
47009
|
lower: 'hexdig',
|
|
45779
|
-
index:
|
|
47010
|
+
index: 5,
|
|
45780
47011
|
isBkr: false
|
|
45781
47012
|
};
|
|
45782
|
-
this.rules[
|
|
47013
|
+
this.rules[6] = {
|
|
45783
47014
|
name: 'pct-encoded',
|
|
45784
47015
|
lower: 'pct-encoded',
|
|
45785
|
-
index:
|
|
45786
|
-
isBkr: false
|
|
45787
|
-
};
|
|
45788
|
-
this.rules[8] = {
|
|
45789
|
-
name: 'unreserved',
|
|
45790
|
-
lower: 'unreserved',
|
|
45791
|
-
index: 8,
|
|
45792
|
-
isBkr: false
|
|
45793
|
-
};
|
|
45794
|
-
this.rules[9] = {
|
|
45795
|
-
name: 'sub-delims',
|
|
45796
|
-
lower: 'sub-delims',
|
|
45797
|
-
index: 9,
|
|
47016
|
+
index: 6,
|
|
45798
47017
|
isBkr: false
|
|
45799
47018
|
};
|
|
45800
|
-
this.rules[
|
|
47019
|
+
this.rules[7] = {
|
|
45801
47020
|
name: 'ucschar',
|
|
45802
47021
|
lower: 'ucschar',
|
|
45803
|
-
index:
|
|
47022
|
+
index: 7,
|
|
45804
47023
|
isBkr: false
|
|
45805
47024
|
};
|
|
45806
|
-
this.rules[
|
|
47025
|
+
this.rules[8] = {
|
|
45807
47026
|
name: 'iprivate',
|
|
45808
47027
|
lower: 'iprivate',
|
|
45809
|
-
index:
|
|
47028
|
+
index: 8,
|
|
45810
47029
|
isBkr: false
|
|
45811
47030
|
};
|
|
45812
47031
|
|
|
@@ -45862,28 +47081,22 @@ function grammar() {
|
|
|
45862
47081
|
}; // REP
|
|
45863
47082
|
this.rules[2].opcodes[1] = {
|
|
45864
47083
|
type: 1,
|
|
45865
|
-
children: [2, 3, 4
|
|
47084
|
+
children: [2, 3, 4]
|
|
45866
47085
|
}; // ALT
|
|
45867
47086
|
this.rules[2].opcodes[2] = {
|
|
45868
|
-
type:
|
|
45869
|
-
|
|
45870
|
-
|
|
47087
|
+
type: 5,
|
|
47088
|
+
min: 0,
|
|
47089
|
+
max: 122
|
|
47090
|
+
}; // TRG
|
|
45871
47091
|
this.rules[2].opcodes[3] = {
|
|
45872
|
-
type:
|
|
45873
|
-
|
|
45874
|
-
}; //
|
|
47092
|
+
type: 6,
|
|
47093
|
+
string: [124]
|
|
47094
|
+
}; // TBS
|
|
45875
47095
|
this.rules[2].opcodes[4] = {
|
|
45876
|
-
type:
|
|
45877
|
-
|
|
45878
|
-
|
|
45879
|
-
|
|
45880
|
-
type: 7,
|
|
45881
|
-
string: [58]
|
|
45882
|
-
}; // TLS
|
|
45883
|
-
this.rules[2].opcodes[6] = {
|
|
45884
|
-
type: 7,
|
|
45885
|
-
string: [64]
|
|
45886
|
-
}; // TLS
|
|
47096
|
+
type: 5,
|
|
47097
|
+
min: 126,
|
|
47098
|
+
max: 1114111
|
|
47099
|
+
}; // TRG
|
|
45887
47100
|
|
|
45888
47101
|
/* literals */
|
|
45889
47102
|
this.rules[3].opcodes = [];
|
|
@@ -45894,7 +47107,7 @@ function grammar() {
|
|
|
45894
47107
|
}; // REP
|
|
45895
47108
|
this.rules[3].opcodes[1] = {
|
|
45896
47109
|
type: 1,
|
|
45897
|
-
children: [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13
|
|
47110
|
+
children: [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
|
|
45898
47111
|
}; // ALT
|
|
45899
47112
|
this.rules[3].opcodes[2] = {
|
|
45900
47113
|
type: 6,
|
|
@@ -45906,323 +47119,220 @@ function grammar() {
|
|
|
45906
47119
|
max: 36
|
|
45907
47120
|
}; // TRG
|
|
45908
47121
|
this.rules[3].opcodes[4] = {
|
|
45909
|
-
type: 6,
|
|
45910
|
-
string: [38]
|
|
45911
|
-
}; // TBS
|
|
45912
|
-
this.rules[3].opcodes[5] = {
|
|
45913
47122
|
type: 5,
|
|
45914
|
-
min:
|
|
47123
|
+
min: 38,
|
|
45915
47124
|
max: 59
|
|
45916
47125
|
}; // TRG
|
|
45917
|
-
this.rules[3].opcodes[
|
|
47126
|
+
this.rules[3].opcodes[5] = {
|
|
45918
47127
|
type: 6,
|
|
45919
47128
|
string: [61]
|
|
45920
47129
|
}; // TBS
|
|
45921
|
-
this.rules[3].opcodes[
|
|
47130
|
+
this.rules[3].opcodes[6] = {
|
|
45922
47131
|
type: 5,
|
|
45923
47132
|
min: 63,
|
|
45924
47133
|
max: 91
|
|
45925
47134
|
}; // TRG
|
|
45926
|
-
this.rules[3].opcodes[
|
|
47135
|
+
this.rules[3].opcodes[7] = {
|
|
45927
47136
|
type: 6,
|
|
45928
47137
|
string: [93]
|
|
45929
47138
|
}; // TBS
|
|
45930
|
-
this.rules[3].opcodes[
|
|
47139
|
+
this.rules[3].opcodes[8] = {
|
|
45931
47140
|
type: 6,
|
|
45932
47141
|
string: [95]
|
|
45933
47142
|
}; // TBS
|
|
45934
|
-
this.rules[3].opcodes[
|
|
47143
|
+
this.rules[3].opcodes[9] = {
|
|
45935
47144
|
type: 5,
|
|
45936
47145
|
min: 97,
|
|
45937
47146
|
max: 122
|
|
45938
47147
|
}; // TRG
|
|
45939
|
-
this.rules[3].opcodes[
|
|
47148
|
+
this.rules[3].opcodes[10] = {
|
|
45940
47149
|
type: 6,
|
|
45941
47150
|
string: [126]
|
|
45942
47151
|
}; // TBS
|
|
45943
|
-
this.rules[3].opcodes[
|
|
47152
|
+
this.rules[3].opcodes[11] = {
|
|
45944
47153
|
type: 4,
|
|
45945
|
-
index:
|
|
47154
|
+
index: 7
|
|
45946
47155
|
}; // RNM(ucschar)
|
|
45947
|
-
this.rules[3].opcodes[
|
|
47156
|
+
this.rules[3].opcodes[12] = {
|
|
45948
47157
|
type: 4,
|
|
45949
|
-
index:
|
|
47158
|
+
index: 8
|
|
45950
47159
|
}; // RNM(iprivate)
|
|
45951
|
-
this.rules[3].opcodes[
|
|
47160
|
+
this.rules[3].opcodes[13] = {
|
|
45952
47161
|
type: 4,
|
|
45953
|
-
index:
|
|
47162
|
+
index: 6
|
|
45954
47163
|
}; // RNM(pct-encoded)
|
|
45955
47164
|
|
|
45956
|
-
/*
|
|
47165
|
+
/* DIGIT */
|
|
45957
47166
|
this.rules[4].opcodes = [];
|
|
45958
47167
|
this.rules[4].opcodes[0] = {
|
|
45959
|
-
type: 1,
|
|
45960
|
-
children: [1, 2]
|
|
45961
|
-
}; // ALT
|
|
45962
|
-
this.rules[4].opcodes[1] = {
|
|
45963
|
-
type: 5,
|
|
45964
|
-
min: 65,
|
|
45965
|
-
max: 90
|
|
45966
|
-
}; // TRG
|
|
45967
|
-
this.rules[4].opcodes[2] = {
|
|
45968
|
-
type: 5,
|
|
45969
|
-
min: 97,
|
|
45970
|
-
max: 122
|
|
45971
|
-
}; // TRG
|
|
45972
|
-
|
|
45973
|
-
/* DIGIT */
|
|
45974
|
-
this.rules[5].opcodes = [];
|
|
45975
|
-
this.rules[5].opcodes[0] = {
|
|
45976
47168
|
type: 5,
|
|
45977
47169
|
min: 48,
|
|
45978
47170
|
max: 57
|
|
45979
47171
|
}; // TRG
|
|
45980
47172
|
|
|
45981
47173
|
/* HEXDIG */
|
|
45982
|
-
this.rules[
|
|
45983
|
-
this.rules[
|
|
47174
|
+
this.rules[5].opcodes = [];
|
|
47175
|
+
this.rules[5].opcodes[0] = {
|
|
45984
47176
|
type: 1,
|
|
45985
47177
|
children: [1, 2, 3, 4, 5, 6, 7]
|
|
45986
47178
|
}; // ALT
|
|
45987
|
-
this.rules[
|
|
47179
|
+
this.rules[5].opcodes[1] = {
|
|
45988
47180
|
type: 4,
|
|
45989
|
-
index:
|
|
47181
|
+
index: 4
|
|
45990
47182
|
}; // RNM(DIGIT)
|
|
45991
|
-
this.rules[
|
|
47183
|
+
this.rules[5].opcodes[2] = {
|
|
45992
47184
|
type: 7,
|
|
45993
47185
|
string: [97]
|
|
45994
47186
|
}; // TLS
|
|
45995
|
-
this.rules[
|
|
47187
|
+
this.rules[5].opcodes[3] = {
|
|
45996
47188
|
type: 7,
|
|
45997
47189
|
string: [98]
|
|
45998
47190
|
}; // TLS
|
|
45999
|
-
this.rules[
|
|
47191
|
+
this.rules[5].opcodes[4] = {
|
|
46000
47192
|
type: 7,
|
|
46001
47193
|
string: [99]
|
|
46002
47194
|
}; // TLS
|
|
46003
|
-
this.rules[
|
|
47195
|
+
this.rules[5].opcodes[5] = {
|
|
46004
47196
|
type: 7,
|
|
46005
47197
|
string: [100]
|
|
46006
47198
|
}; // TLS
|
|
46007
|
-
this.rules[
|
|
47199
|
+
this.rules[5].opcodes[6] = {
|
|
46008
47200
|
type: 7,
|
|
46009
47201
|
string: [101]
|
|
46010
47202
|
}; // TLS
|
|
46011
|
-
this.rules[
|
|
47203
|
+
this.rules[5].opcodes[7] = {
|
|
46012
47204
|
type: 7,
|
|
46013
47205
|
string: [102]
|
|
46014
47206
|
}; // TLS
|
|
46015
47207
|
|
|
46016
47208
|
/* pct-encoded */
|
|
46017
|
-
this.rules[
|
|
46018
|
-
this.rules[
|
|
47209
|
+
this.rules[6].opcodes = [];
|
|
47210
|
+
this.rules[6].opcodes[0] = {
|
|
46019
47211
|
type: 2,
|
|
46020
47212
|
children: [1, 2, 3]
|
|
46021
47213
|
}; // CAT
|
|
46022
|
-
this.rules[
|
|
47214
|
+
this.rules[6].opcodes[1] = {
|
|
46023
47215
|
type: 7,
|
|
46024
47216
|
string: [37]
|
|
46025
47217
|
}; // TLS
|
|
46026
|
-
this.rules[
|
|
46027
|
-
type: 4,
|
|
46028
|
-
index: 6
|
|
46029
|
-
}; // RNM(HEXDIG)
|
|
46030
|
-
this.rules[7].opcodes[3] = {
|
|
47218
|
+
this.rules[6].opcodes[2] = {
|
|
46031
47219
|
type: 4,
|
|
46032
|
-
index:
|
|
47220
|
+
index: 5
|
|
46033
47221
|
}; // RNM(HEXDIG)
|
|
46034
|
-
|
|
46035
|
-
/* unreserved */
|
|
46036
|
-
this.rules[8].opcodes = [];
|
|
46037
|
-
this.rules[8].opcodes[0] = {
|
|
46038
|
-
type: 1,
|
|
46039
|
-
children: [1, 2, 3, 4, 5, 6]
|
|
46040
|
-
}; // ALT
|
|
46041
|
-
this.rules[8].opcodes[1] = {
|
|
46042
|
-
type: 4,
|
|
46043
|
-
index: 4
|
|
46044
|
-
}; // RNM(ALPHA)
|
|
46045
|
-
this.rules[8].opcodes[2] = {
|
|
47222
|
+
this.rules[6].opcodes[3] = {
|
|
46046
47223
|
type: 4,
|
|
46047
47224
|
index: 5
|
|
46048
|
-
}; // RNM(
|
|
46049
|
-
this.rules[8].opcodes[3] = {
|
|
46050
|
-
type: 7,
|
|
46051
|
-
string: [45]
|
|
46052
|
-
}; // TLS
|
|
46053
|
-
this.rules[8].opcodes[4] = {
|
|
46054
|
-
type: 7,
|
|
46055
|
-
string: [46]
|
|
46056
|
-
}; // TLS
|
|
46057
|
-
this.rules[8].opcodes[5] = {
|
|
46058
|
-
type: 7,
|
|
46059
|
-
string: [95]
|
|
46060
|
-
}; // TLS
|
|
46061
|
-
this.rules[8].opcodes[6] = {
|
|
46062
|
-
type: 7,
|
|
46063
|
-
string: [126]
|
|
46064
|
-
}; // TLS
|
|
46065
|
-
|
|
46066
|
-
/* sub-delims */
|
|
46067
|
-
this.rules[9].opcodes = [];
|
|
46068
|
-
this.rules[9].opcodes[0] = {
|
|
46069
|
-
type: 1,
|
|
46070
|
-
children: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
|
|
46071
|
-
}; // ALT
|
|
46072
|
-
this.rules[9].opcodes[1] = {
|
|
46073
|
-
type: 7,
|
|
46074
|
-
string: [33]
|
|
46075
|
-
}; // TLS
|
|
46076
|
-
this.rules[9].opcodes[2] = {
|
|
46077
|
-
type: 7,
|
|
46078
|
-
string: [36]
|
|
46079
|
-
}; // TLS
|
|
46080
|
-
this.rules[9].opcodes[3] = {
|
|
46081
|
-
type: 7,
|
|
46082
|
-
string: [38]
|
|
46083
|
-
}; // TLS
|
|
46084
|
-
this.rules[9].opcodes[4] = {
|
|
46085
|
-
type: 7,
|
|
46086
|
-
string: [39]
|
|
46087
|
-
}; // TLS
|
|
46088
|
-
this.rules[9].opcodes[5] = {
|
|
46089
|
-
type: 7,
|
|
46090
|
-
string: [40]
|
|
46091
|
-
}; // TLS
|
|
46092
|
-
this.rules[9].opcodes[6] = {
|
|
46093
|
-
type: 7,
|
|
46094
|
-
string: [41]
|
|
46095
|
-
}; // TLS
|
|
46096
|
-
this.rules[9].opcodes[7] = {
|
|
46097
|
-
type: 7,
|
|
46098
|
-
string: [42]
|
|
46099
|
-
}; // TLS
|
|
46100
|
-
this.rules[9].opcodes[8] = {
|
|
46101
|
-
type: 7,
|
|
46102
|
-
string: [43]
|
|
46103
|
-
}; // TLS
|
|
46104
|
-
this.rules[9].opcodes[9] = {
|
|
46105
|
-
type: 7,
|
|
46106
|
-
string: [44]
|
|
46107
|
-
}; // TLS
|
|
46108
|
-
this.rules[9].opcodes[10] = {
|
|
46109
|
-
type: 7,
|
|
46110
|
-
string: [59]
|
|
46111
|
-
}; // TLS
|
|
46112
|
-
this.rules[9].opcodes[11] = {
|
|
46113
|
-
type: 7,
|
|
46114
|
-
string: [61]
|
|
46115
|
-
}; // TLS
|
|
47225
|
+
}; // RNM(HEXDIG)
|
|
46116
47226
|
|
|
46117
47227
|
/* ucschar */
|
|
46118
|
-
this.rules[
|
|
46119
|
-
this.rules[
|
|
47228
|
+
this.rules[7].opcodes = [];
|
|
47229
|
+
this.rules[7].opcodes[0] = {
|
|
46120
47230
|
type: 1,
|
|
46121
47231
|
children: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]
|
|
46122
47232
|
}; // ALT
|
|
46123
|
-
this.rules[
|
|
47233
|
+
this.rules[7].opcodes[1] = {
|
|
46124
47234
|
type: 5,
|
|
46125
47235
|
min: 160,
|
|
46126
47236
|
max: 55295
|
|
46127
47237
|
}; // TRG
|
|
46128
|
-
this.rules[
|
|
47238
|
+
this.rules[7].opcodes[2] = {
|
|
46129
47239
|
type: 5,
|
|
46130
47240
|
min: 63744,
|
|
46131
47241
|
max: 64975
|
|
46132
47242
|
}; // TRG
|
|
46133
|
-
this.rules[
|
|
47243
|
+
this.rules[7].opcodes[3] = {
|
|
46134
47244
|
type: 5,
|
|
46135
47245
|
min: 65008,
|
|
46136
47246
|
max: 65519
|
|
46137
47247
|
}; // TRG
|
|
46138
|
-
this.rules[
|
|
47248
|
+
this.rules[7].opcodes[4] = {
|
|
46139
47249
|
type: 5,
|
|
46140
47250
|
min: 65536,
|
|
46141
47251
|
max: 131069
|
|
46142
47252
|
}; // TRG
|
|
46143
|
-
this.rules[
|
|
47253
|
+
this.rules[7].opcodes[5] = {
|
|
46144
47254
|
type: 5,
|
|
46145
47255
|
min: 131072,
|
|
46146
47256
|
max: 196605
|
|
46147
47257
|
}; // TRG
|
|
46148
|
-
this.rules[
|
|
47258
|
+
this.rules[7].opcodes[6] = {
|
|
46149
47259
|
type: 5,
|
|
46150
47260
|
min: 196608,
|
|
46151
47261
|
max: 262141
|
|
46152
47262
|
}; // TRG
|
|
46153
|
-
this.rules[
|
|
47263
|
+
this.rules[7].opcodes[7] = {
|
|
46154
47264
|
type: 5,
|
|
46155
47265
|
min: 262144,
|
|
46156
47266
|
max: 327677
|
|
46157
47267
|
}; // TRG
|
|
46158
|
-
this.rules[
|
|
47268
|
+
this.rules[7].opcodes[8] = {
|
|
46159
47269
|
type: 5,
|
|
46160
47270
|
min: 327680,
|
|
46161
47271
|
max: 393213
|
|
46162
47272
|
}; // TRG
|
|
46163
|
-
this.rules[
|
|
47273
|
+
this.rules[7].opcodes[9] = {
|
|
46164
47274
|
type: 5,
|
|
46165
47275
|
min: 393216,
|
|
46166
47276
|
max: 458749
|
|
46167
47277
|
}; // TRG
|
|
46168
|
-
this.rules[
|
|
47278
|
+
this.rules[7].opcodes[10] = {
|
|
46169
47279
|
type: 5,
|
|
46170
47280
|
min: 458752,
|
|
46171
47281
|
max: 524285
|
|
46172
47282
|
}; // TRG
|
|
46173
|
-
this.rules[
|
|
47283
|
+
this.rules[7].opcodes[11] = {
|
|
46174
47284
|
type: 5,
|
|
46175
47285
|
min: 524288,
|
|
46176
47286
|
max: 589821
|
|
46177
47287
|
}; // TRG
|
|
46178
|
-
this.rules[
|
|
47288
|
+
this.rules[7].opcodes[12] = {
|
|
46179
47289
|
type: 5,
|
|
46180
47290
|
min: 589824,
|
|
46181
47291
|
max: 655357
|
|
46182
47292
|
}; // TRG
|
|
46183
|
-
this.rules[
|
|
47293
|
+
this.rules[7].opcodes[13] = {
|
|
46184
47294
|
type: 5,
|
|
46185
47295
|
min: 655360,
|
|
46186
47296
|
max: 720893
|
|
46187
47297
|
}; // TRG
|
|
46188
|
-
this.rules[
|
|
47298
|
+
this.rules[7].opcodes[14] = {
|
|
46189
47299
|
type: 5,
|
|
46190
47300
|
min: 720896,
|
|
46191
47301
|
max: 786429
|
|
46192
47302
|
}; // TRG
|
|
46193
|
-
this.rules[
|
|
47303
|
+
this.rules[7].opcodes[15] = {
|
|
46194
47304
|
type: 5,
|
|
46195
47305
|
min: 786432,
|
|
46196
47306
|
max: 851965
|
|
46197
47307
|
}; // TRG
|
|
46198
|
-
this.rules[
|
|
47308
|
+
this.rules[7].opcodes[16] = {
|
|
46199
47309
|
type: 5,
|
|
46200
47310
|
min: 851968,
|
|
46201
47311
|
max: 917501
|
|
46202
47312
|
}; // TRG
|
|
46203
|
-
this.rules[
|
|
47313
|
+
this.rules[7].opcodes[17] = {
|
|
46204
47314
|
type: 5,
|
|
46205
47315
|
min: 921600,
|
|
46206
47316
|
max: 983037
|
|
46207
47317
|
}; // TRG
|
|
46208
47318
|
|
|
46209
47319
|
/* iprivate */
|
|
46210
|
-
this.rules[
|
|
46211
|
-
this.rules[
|
|
47320
|
+
this.rules[8].opcodes = [];
|
|
47321
|
+
this.rules[8].opcodes[0] = {
|
|
46212
47322
|
type: 1,
|
|
46213
47323
|
children: [1, 2, 3]
|
|
46214
47324
|
}; // ALT
|
|
46215
|
-
this.rules[
|
|
47325
|
+
this.rules[8].opcodes[1] = {
|
|
46216
47326
|
type: 5,
|
|
46217
47327
|
min: 57344,
|
|
46218
47328
|
max: 63743
|
|
46219
47329
|
}; // TRG
|
|
46220
|
-
this.rules[
|
|
47330
|
+
this.rules[8].opcodes[2] = {
|
|
46221
47331
|
type: 5,
|
|
46222
47332
|
min: 983040,
|
|
46223
47333
|
max: 1048573
|
|
46224
47334
|
}; // TRG
|
|
46225
|
-
this.rules[
|
|
47335
|
+
this.rules[8].opcodes[3] = {
|
|
46226
47336
|
type: 5,
|
|
46227
47337
|
min: 1048576,
|
|
46228
47338
|
max: 1114109
|
|
@@ -46232,26 +47342,24 @@ function grammar() {
|
|
|
46232
47342
|
this.toString = function toString() {
|
|
46233
47343
|
let str = "";
|
|
46234
47344
|
str += "; OpenAPI Server URL templating ABNF syntax\n";
|
|
46235
|
-
str += "server-url-template = 1*( literals / server-variable )\n";
|
|
47345
|
+
str += "server-url-template = 1*( literals / server-variable ) ; variant of https://www.rfc-editor.org/rfc/rfc6570#section-2\n";
|
|
46236
47346
|
str += "server-variable = \"{\" server-variable-name \"}\"\n";
|
|
46237
|
-
str += "server-variable-name = 1*(
|
|
46238
|
-
str += "
|
|
47347
|
+
str += "server-variable-name = 1*( %x00-7A / %x7C / %x7E-10FFFF ) ; every UTF8 character except { and } (from OpenAPI)\n";
|
|
47348
|
+
str += "\n";
|
|
47349
|
+
str += "; https://www.rfc-editor.org/rfc/rfc6570#section-2.1\n";
|
|
47350
|
+
str += "; https://www.rfc-editor.org/errata/eid6937\n";
|
|
47351
|
+
str += "literals = 1*( %x21 / %x23-24 / %x26-3B / %x3D / %x3F-5B\n";
|
|
46239
47352
|
str += " / %x5D / %x5F / %x61-7A / %x7E / ucschar / iprivate\n";
|
|
46240
47353
|
str += " / pct-encoded)\n";
|
|
46241
|
-
str += "
|
|
46242
|
-
str += "
|
|
46243
|
-
str += "
|
|
47354
|
+
str += " ; any Unicode character except: CTL, SP,\n";
|
|
47355
|
+
str += " ; DQUOTE, \"%\" (aside from pct-encoded),\n";
|
|
47356
|
+
str += " ; \"<\", \">\", \"\\\", \"^\", \"`\", \"{\", \"|\", \"}\"\n";
|
|
46244
47357
|
str += "\n";
|
|
46245
|
-
str += ";
|
|
46246
|
-
str += "ALPHA = %x41-5A / %x61-7A ; A-Z / a-z\n";
|
|
47358
|
+
str += "; https://www.rfc-editor.org/rfc/rfc6570#section-1.5\n";
|
|
46247
47359
|
str += "DIGIT = %x30-39 ; 0-9\n";
|
|
46248
|
-
str += "HEXDIG = DIGIT / \"A\" / \"B\" / \"C\" / \"D\" / \"E\" / \"F\"\n";
|
|
46249
|
-
str += " ; case-insensitive\n";
|
|
47360
|
+
str += "HEXDIG = DIGIT / \"A\" / \"B\" / \"C\" / \"D\" / \"E\" / \"F\" ; case-insensitive\n";
|
|
46250
47361
|
str += "\n";
|
|
46251
47362
|
str += "pct-encoded = \"%\" HEXDIG HEXDIG\n";
|
|
46252
|
-
str += "unreserved = ALPHA / DIGIT / \"-\" / \".\" / \"_\" / \"~\"\n";
|
|
46253
|
-
str += "sub-delims = \"!\" / \"$\" / \"&\" / \"'\" / \"(\" / \")\"\n";
|
|
46254
|
-
str += " / \"*\" / \"+\" / \",\" / \";\" / \"=\"\n";
|
|
46255
47363
|
str += "\n";
|
|
46256
47364
|
str += "ucschar = %xA0-D7FF / %xF900-FDCF / %xFDF0-FFEF\n";
|
|
46257
47365
|
str += " / %x10000-1FFFD / %x20000-2FFFD / %x30000-3FFFD\n";
|
|
@@ -54171,6 +55279,7 @@ src_Swagger.prototype = {
|
|
|
54171
55279
|
useCircularStructures: this.useCircularStructures,
|
|
54172
55280
|
requestInterceptor: this.requestInterceptor || null,
|
|
54173
55281
|
responseInterceptor: this.responseInterceptor || null,
|
|
55282
|
+
pathDiscriminator: this.pathDiscriminator || [],
|
|
54174
55283
|
skipNormalization: this.skipNormalization || false,
|
|
54175
55284
|
...options
|
|
54176
55285
|
}).then(obj => {
|