@usearazzo/runner 1.0.1-alpha.12 → 1.0.1-alpha.14

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.
@@ -10805,6 +10805,14 @@ class ParameterIdentity {
10805
10805
  if (location === undefined || (0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__.isNullElement)(location)) return undefined;
10806
10806
  return (0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__.isStringElement)(location) ? (0,_speclynx_apidom_core__WEBPACK_IMPORTED_MODULE_0__["default"])(location) : null;
10807
10807
  }
10808
+
10809
+ /**
10810
+ * The locations the Parameter Object defines: Arazzo 1.0.1's closed set plus
10811
+ * 1.1.0's `querystring`. 1.0.0's field description also listed `body`, which
10812
+ * its own summary of locations did not; 1.0.1 removed it as an erratum, so it
10813
+ * is not a location in any version (a payload is the step's `requestBody`).
10814
+ */
10815
+ static LOCATIONS = ['path', 'query', 'header', 'cookie', 'querystring'];
10808
10816
  name;
10809
10817
  location;
10810
10818
  constructor(name, location) {
@@ -10812,6 +10820,14 @@ class ParameterIdentity {
10812
10820
  this.location = location;
10813
10821
  }
10814
10822
 
10823
+ /**
10824
+ * Whether the location is one the Parameter Object defines. An absent or
10825
+ * malformed location is not.
10826
+ */
10827
+ get hasDefinedLocation() {
10828
+ return ParameterIdentity.LOCATIONS.includes(this.location);
10829
+ }
10830
+
10815
10831
  /**
10816
10832
  * Whether this and the other identity name the same parameter. A malformed
10817
10833
  * location equals nothing, its own duplicate included.
@@ -11191,16 +11207,18 @@ __webpack_require__.r(__webpack_exports__);
11191
11207
  /* harmony import */ var _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(62823);
11192
11208
  /* harmony import */ var _speclynx_apidom_reference_configuration_empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(30698);
11193
11209
  /* harmony import */ var _speclynx_apidom_ns_openapi_2__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(29716);
11194
- /* harmony import */ var _swaggerexpert_media_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(93504);
11195
- /* harmony import */ var ramda_adjunct__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(34606);
11196
- /* harmony import */ var _vendor_swagger_client_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(96777);
11197
- /* harmony import */ var _client_ParameterDelivery_ts__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(55995);
11198
- /* harmony import */ var _client_HTTPClientFetch_ts__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(55549);
11199
- /* harmony import */ var _client_OpenAPIOperationResponseNormalizer_ts__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(63439);
11200
- /* harmony import */ var _extractor_OpenAPIOperationExtractor_ts__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(57658);
11201
- /* harmony import */ var _normalizer_OpenAPIOperationNormalizer_ts__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(87864);
11202
- /* harmony import */ var _assembler_OpenAPIDocumentAssembler_ts__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(6898);
11203
- /* harmony import */ var _errors_ClientError_ts__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(81763);
11210
+ /* harmony import */ var _swaggerexpert_cookie__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(36258);
11211
+ /* harmony import */ var _swaggerexpert_media_types__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(93504);
11212
+ /* harmony import */ var ramda_adjunct__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(34606);
11213
+ /* harmony import */ var _vendor_swagger_client_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(96777);
11214
+ /* harmony import */ var _client_ParameterDelivery_ts__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(55995);
11215
+ /* harmony import */ var _client_HTTPClientFetch_ts__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(55549);
11216
+ /* harmony import */ var _client_OpenAPIOperationResponseNormalizer_ts__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(63439);
11217
+ /* harmony import */ var _extractor_OpenAPIOperationExtractor_ts__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(57658);
11218
+ /* harmony import */ var _normalizer_OpenAPIOperationNormalizer_ts__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(87864);
11219
+ /* harmony import */ var _assembler_OpenAPIDocumentAssembler_ts__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(6898);
11220
+ /* harmony import */ var _errors_ClientError_ts__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(81763);
11221
+
11204
11222
 
11205
11223
 
11206
11224
 
@@ -11227,6 +11245,21 @@ __webpack_require__.r(__webpack_exports__);
11227
11245
  * @public
11228
11246
  */
11229
11247
 
11248
+ /**
11249
+ * The plain-JSON shape of the assembled document, as far as declaring a
11250
+ * parameter on its one operation needs it.
11251
+ */
11252
+
11253
+ /**
11254
+ * A caller-supplied parameter the operation does not declare, in a location
11255
+ * it can still be delivered to.
11256
+ */
11257
+
11258
+ const UNDECLARED_LOCATIONS = new Set(['header', 'query', 'cookie', 'path']);
11259
+
11260
+ // the header parameters OpenAPI 3 says SHALL be ignored, which buildRequest drops
11261
+ const IGNORED_HEADERS = new Set(['accept', 'authorization', 'content-type']);
11262
+
11230
11263
  /**
11231
11264
  * Options for executing an OpenAPI operation.
11232
11265
  *
@@ -11303,12 +11336,12 @@ class OpenAPIOperationExecutor {
11303
11336
  #operationNormalizer;
11304
11337
  #documentAssembler;
11305
11338
  constructor(options = {}) {
11306
- this.#httpClient = options.httpClient ?? _client_HTTPClientFetch_ts__WEBPACK_IMPORTED_MODULE_8__["default"];
11339
+ this.#httpClient = options.httpClient ?? _client_HTTPClientFetch_ts__WEBPACK_IMPORTED_MODULE_9__["default"];
11307
11340
  this.#requestInterceptor = options.requestInterceptor;
11308
- this.#responseNormalizer = options.responseNormalizer ?? new _client_OpenAPIOperationResponseNormalizer_ts__WEBPACK_IMPORTED_MODULE_9__["default"]();
11309
- this.#operationExtractor = options.operationExtractor ?? new _extractor_OpenAPIOperationExtractor_ts__WEBPACK_IMPORTED_MODULE_10__["default"]();
11310
- this.#operationNormalizer = options.operationNormalizer ?? new _normalizer_OpenAPIOperationNormalizer_ts__WEBPACK_IMPORTED_MODULE_11__["default"]();
11311
- this.#documentAssembler = options.documentAssembler ?? new _assembler_OpenAPIDocumentAssembler_ts__WEBPACK_IMPORTED_MODULE_12__["default"]();
11341
+ this.#responseNormalizer = options.responseNormalizer ?? new _client_OpenAPIOperationResponseNormalizer_ts__WEBPACK_IMPORTED_MODULE_10__["default"]();
11342
+ this.#operationExtractor = options.operationExtractor ?? new _extractor_OpenAPIOperationExtractor_ts__WEBPACK_IMPORTED_MODULE_11__["default"]();
11343
+ this.#operationNormalizer = options.operationNormalizer ?? new _normalizer_OpenAPIOperationNormalizer_ts__WEBPACK_IMPORTED_MODULE_12__["default"]();
11344
+ this.#documentAssembler = options.documentAssembler ?? new _assembler_OpenAPIDocumentAssembler_ts__WEBPACK_IMPORTED_MODULE_13__["default"]();
11312
11345
  }
11313
11346
 
11314
11347
  /**
@@ -11328,7 +11361,7 @@ class OpenAPIOperationExecutor {
11328
11361
  const operation = this.#operationExtractor.extractByPointer(locator.document, locator.jsonPointer);
11329
11362
  // the legacy id (`{method}-{path}`) matches regardless of an explicit
11330
11363
  // `operationId` in the assembled document
11331
- const operationId = (0,_vendor_swagger_client_mjs__WEBPACK_IMPORTED_MODULE_6__.idFromPathMethodLegacy)((0,_speclynx_apidom_core__WEBPACK_IMPORTED_MODULE_0__["default"])(operation.meta.get('path')), (0,_speclynx_apidom_core__WEBPACK_IMPORTED_MODULE_0__["default"])(operation.meta.get('http-method')));
11364
+ const operationId = (0,_vendor_swagger_client_mjs__WEBPACK_IMPORTED_MODULE_7__.idFromPathMethodLegacy)((0,_speclynx_apidom_core__WEBPACK_IMPORTED_MODULE_0__["default"])(operation.meta.get('path')), (0,_speclynx_apidom_core__WEBPACK_IMPORTED_MODULE_0__["default"])(operation.meta.get('http-method')));
11332
11365
  const normalizedOperation = await this.#operationNormalizer.normalize(operation, locator.document);
11333
11366
  const assembled = this.#documentAssembler.assemble(normalizedOperation, locator.document);
11334
11367
 
@@ -11345,16 +11378,18 @@ class OpenAPIOperationExecutor {
11345
11378
  const withServer = this.#applyServerOptions(rest, normalizedOperation, locator.document);
11346
11379
  const withBody = this.#adaptRequestBody(withServer, normalizedOperation, locator.document, locator.jsonPointer);
11347
11380
  const buildOptions = this.#adaptRequestContentType(withBody, normalizedOperation, locator.document, locator.jsonPointer);
11381
+ const undeclared = this.#undeclaredParameters(buildOptions.parameters, normalizedOperation);
11382
+ const spec = assembled.toJSON();
11383
+ this.#declareQueryAndPathParameters(spec, undeclared, (0,_speclynx_apidom_core__WEBPACK_IMPORTED_MODULE_0__["default"])(operation.meta.get('path')), (0,_speclynx_apidom_core__WEBPACK_IMPORTED_MODULE_0__["default"])(operation.meta.get('http-method')), locator);
11348
11384
  let request;
11349
11385
  try {
11350
- const spec = assembled.toJSON();
11351
- request = (0,_vendor_swagger_client_mjs__WEBPACK_IMPORTED_MODULE_6__.buildRequest)({
11386
+ request = (0,_vendor_swagger_client_mjs__WEBPACK_IMPORTED_MODULE_7__.buildRequest)({
11352
11387
  ...buildOptions,
11353
11388
  spec,
11354
11389
  operationId
11355
11390
  });
11356
11391
  } catch (error) {
11357
- throw new _errors_ClientError_ts__WEBPACK_IMPORTED_MODULE_13__["default"]('Failed to build request for OpenAPI operation', {
11392
+ throw new _errors_ClientError_ts__WEBPACK_IMPORTED_MODULE_14__["default"]('Failed to build request for OpenAPI operation', {
11358
11393
  operationPath: locator.jsonPointer,
11359
11394
  cause: error
11360
11395
  });
@@ -11367,6 +11402,7 @@ class OpenAPIOperationExecutor {
11367
11402
  if (typeof authoredContentType === 'string' && buildOptions.requestContentType !== authoredContentType) {
11368
11403
  request.headers['Content-Type'] = authoredContentType;
11369
11404
  }
11405
+ this.#deliverHeadersAndCookies(request, undeclared);
11370
11406
  request = await this.#finalizeRequest(request, requestInterceptor);
11371
11407
 
11372
11408
  // capture the request as sent, so `$url` / `$method` / `$request.*` can be
@@ -11384,7 +11420,7 @@ class OpenAPIOperationExecutor {
11384
11420
  try {
11385
11421
  rawResponse = await this.#httpClient(request);
11386
11422
  } catch (error) {
11387
- throw new _errors_ClientError_ts__WEBPACK_IMPORTED_MODULE_13__["default"]('OpenAPI operation request failed', {
11423
+ throw new _errors_ClientError_ts__WEBPACK_IMPORTED_MODULE_14__["default"]('OpenAPI operation request failed', {
11388
11424
  operationPath: locator.jsonPointer,
11389
11425
  cause: error
11390
11426
  });
@@ -11392,6 +11428,130 @@ class OpenAPIOperationExecutor {
11392
11428
  return this.#responseNormalizer.normalize(rawResponse, requestInfo);
11393
11429
  }
11394
11430
 
11431
+ /**
11432
+ * The `{in}.{name}`-keyed parameters (see {@link ParameterDelivery}) in a
11433
+ * header, query, cookie or path location that the operation does not
11434
+ * declare. `buildRequest` delivers only what the operation declares, yet a
11435
+ * step's parameters are what its author asked to send — an `Authorization`
11436
+ * header carrying a token from an earlier step most of all, which OpenAPI 3
11437
+ * cannot even declare. A declared `Accept`, `Authorization` or
11438
+ * `Content-Type` header parameter counts as undeclared too: `buildRequest`
11439
+ * drops it for OpenAPI 3, as that specification requires, and for 2.0
11440
+ * delivering it here sends the same value. Bare keys are left to
11441
+ * `buildRequest`: they name no location to deliver to.
11442
+ */
11443
+ #undeclaredParameters(parameters, operation) {
11444
+ if (!(0,ramda_adjunct__WEBPACK_IMPORTED_MODULE_6__["default"])(parameters)) return [];
11445
+ const declared = new Set(((0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__.isArrayElement)(operation.parameters) ? [...operation.parameters] : []).filter(_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__.isObjectElement).map(parameter => `${(0,_speclynx_apidom_core__WEBPACK_IMPORTED_MODULE_0__["default"])(parameter.get('in'))}.${(0,_speclynx_apidom_core__WEBPACK_IMPORTED_MODULE_0__["default"])(parameter.get('name'))}`));
11446
+ return Object.entries(parameters).flatMap(([key, value]) => {
11447
+ const separator = key.indexOf('.');
11448
+ const location = key.slice(0, separator);
11449
+ const name = key.slice(separator + 1);
11450
+ // an unresolved expression or a null delivers nothing, as buildRequest
11451
+ // does for a declared parameter
11452
+ if (separator === -1 || !UNDECLARED_LOCATIONS.has(location) || value === undefined || value === null) {
11453
+ return [];
11454
+ }
11455
+ const ignored = location === 'header' && IGNORED_HEADERS.has(name.toLowerCase());
11456
+ return declared.has(key) && !ignored ? [] : [{
11457
+ location,
11458
+ name,
11459
+ value
11460
+ }];
11461
+ });
11462
+ }
11463
+
11464
+ /**
11465
+ * Declares the undeclared query and path parameters on the assembled
11466
+ * operation, so `buildRequest` serializes and encodes them as it does
11467
+ * declared ones. A path parameter is declared only when the path has its
11468
+ * `{name}` template expression; otherwise there is nowhere to put it, and
11469
+ * that authoring error throws {@link ClientError} rather than sending a
11470
+ * request without it.
11471
+ */
11472
+ #declareQueryAndPathParameters(spec, undeclared, path, method, locator) {
11473
+ const operation = spec.paths[path][method];
11474
+ const isSwagger = (0,_speclynx_apidom_ns_openapi_2__WEBPACK_IMPORTED_MODULE_3__.isSwaggerElement)(locator.document.parseResult.api);
11475
+ for (const {
11476
+ location,
11477
+ name
11478
+ } of undeclared) {
11479
+ if (location !== 'query' && location !== 'path') continue;
11480
+ if (location === 'path' && !path.includes(`{${name}}`)) {
11481
+ throw new _errors_ClientError_ts__WEBPACK_IMPORTED_MODULE_14__["default"](`Path parameter "${name}" is not declared by the operation and its path "${path}" ` + `has no "{${name}}" to substitute it into`, {
11482
+ operationPath: locator.jsonPointer
11483
+ });
11484
+ }
11485
+ const required = location === 'path';
11486
+ (operation.parameters ??= []).push(isSwagger ? {
11487
+ name,
11488
+ in: location,
11489
+ required,
11490
+ type: 'string'
11491
+ } : {
11492
+ name,
11493
+ in: location,
11494
+ required,
11495
+ schema: {}
11496
+ });
11497
+ }
11498
+ }
11499
+
11500
+ /**
11501
+ * Sets the undeclared header parameters on the built request and appends the
11502
+ * undeclared cookie parameters to its `Cookie` header. A header replaces any
11503
+ * value the build gave it under any spelling — the default `Accept`, say —
11504
+ * since the step naming it is the more specific intent. OpenAPI 2.0 has no
11505
+ * cookie location, so its cookies always go this way.
11506
+ */
11507
+ #deliverHeadersAndCookies(request, undeclared) {
11508
+ const present = name => Object.keys(request.headers).find(header => header.toLowerCase() === name.toLowerCase());
11509
+ for (const {
11510
+ location,
11511
+ name,
11512
+ value
11513
+ } of undeclared) {
11514
+ if (location !== 'header') continue;
11515
+ const built = present(name);
11516
+ if (built !== undefined) delete request.headers[built];
11517
+ request.headers[name] = this.#stringify(value);
11518
+ }
11519
+ const cookies = undeclared.filter(({
11520
+ location
11521
+ }) => location === 'cookie').map(({
11522
+ name,
11523
+ value
11524
+ }) => [name, this.#stringify(value)]);
11525
+ if (cookies.length === 0) return;
11526
+ // serialized as buildRequest serializes a declared cookie, so a `;` in the
11527
+ // value is percent-encoded rather than splitting it into further cookies
11528
+ const serialized = (0,_swaggerexpert_cookie__WEBPACK_IMPORTED_MODULE_4__.serializeCookie)(cookies, {
11529
+ encoders: {
11530
+ value: _swaggerexpert_cookie__WEBPACK_IMPORTED_MODULE_4__.cookieValueStrictPercentEncoder
11531
+ },
11532
+ validators: {
11533
+ name: _swaggerexpert_cookie__WEBPACK_IMPORTED_MODULE_4__.cookieNameLenientValidator
11534
+ }
11535
+ });
11536
+ const cookieHeader = present('Cookie') ?? 'Cookie';
11537
+ const existing = request.headers[cookieHeader];
11538
+ request.headers[cookieHeader] = existing ? `${existing}; ${serialized}` : serialized;
11539
+ }
11540
+
11541
+ /**
11542
+ * A header or cookie value with no schema to serialize it by, the way
11543
+ * OpenAPI's default for those locations (`simple` and `form`, not exploded)
11544
+ * serializes a declared one: an array as `a,b`, an object as `k,v,k2,v2`,
11545
+ * anything else via `String()`.
11546
+ */
11547
+ #stringify(value) {
11548
+ if (Array.isArray(value)) return value.map(String).join(',');
11549
+ if (typeof value === 'object' && value !== null) {
11550
+ return Object.entries(value).flat().map(String).join(',');
11551
+ }
11552
+ return String(value);
11553
+ }
11554
+
11395
11555
  /**
11396
11556
  * Derives where the request is sent, returning the options to build with.
11397
11557
  *
@@ -11474,7 +11634,7 @@ class OpenAPIOperationExecutor {
11474
11634
  const requestBody = operation.get('requestBody');
11475
11635
  const content = (0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__.isObjectElement)(requestBody) ? requestBody.get('content') : undefined;
11476
11636
  if (!(0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__.isObjectElement)(content)) {
11477
- throw new _errors_ClientError_ts__WEBPACK_IMPORTED_MODULE_13__["default"](`Request body media type "${requested}" cannot be sent: the operation declares ` + 'no request body content. Omit the content type to send the payload as-is', {
11637
+ throw new _errors_ClientError_ts__WEBPACK_IMPORTED_MODULE_14__["default"](`Request body media type "${requested}" cannot be sent: the operation declares ` + 'no request body content. Omit the content type to send the payload as-is', {
11478
11638
  operationPath: jsonPointer
11479
11639
  });
11480
11640
  }
@@ -11482,8 +11642,8 @@ class OpenAPIOperationExecutor {
11482
11642
  if (declared.includes(requested)) return buildOptions;
11483
11643
 
11484
11644
  // a range or a malformed value names no concrete media type to send
11485
- if ((0,_swaggerexpert_media_types__WEBPACK_IMPORTED_MODULE_4__.identify)(requested) !== 'media-type') {
11486
- throw new _errors_ClientError_ts__WEBPACK_IMPORTED_MODULE_13__["default"](`Request body media type "${requested}" is not a valid media type`, {
11645
+ if ((0,_swaggerexpert_media_types__WEBPACK_IMPORTED_MODULE_5__.identify)(requested) !== 'media-type') {
11646
+ throw new _errors_ClientError_ts__WEBPACK_IMPORTED_MODULE_14__["default"](`Request body media type "${requested}" is not a valid media type`, {
11487
11647
  operationPath: jsonPointer
11488
11648
  });
11489
11649
  }
@@ -11491,18 +11651,18 @@ class OpenAPIOperationExecutor {
11491
11651
  // a form media type decides how the body is encoded, and buildRequest applies
11492
11652
  // that encoding only for an exactly declared type. matching one against a
11493
11653
  // range would put a JSON body behind a form Content-Type
11494
- const isFormEncoded = (0,_swaggerexpert_media_types__WEBPACK_IMPORTED_MODULE_4__.matches)('application/x-www-form-urlencoded', requested) || (0,_swaggerexpert_media_types__WEBPACK_IMPORTED_MODULE_4__.matches)('multipart/form-data', requested);
11654
+ const isFormEncoded = (0,_swaggerexpert_media_types__WEBPACK_IMPORTED_MODULE_5__.matches)('application/x-www-form-urlencoded', requested) || (0,_swaggerexpert_media_types__WEBPACK_IMPORTED_MODULE_5__.matches)('multipart/form-data', requested);
11495
11655
 
11496
11656
  // otherwise a declared range covers a concrete type, so `*/*` (what several
11497
11657
  // generators emit by default) accepts anything; the most specific wins.
11498
11658
  // parameters on one side only (a declared `charset=utf-8`) describe the
11499
11659
  // content rather than constrain it, while conflicting ones never match
11500
- const candidates = isFormEncoded ? declared.filter(mediaType => (0,_swaggerexpert_media_types__WEBPACK_IMPORTED_MODULE_4__.identify)(mediaType) === 'media-type') : declared;
11501
- const match = (0,_swaggerexpert_media_types__WEBPACK_IMPORTED_MODULE_4__.selectBestMatch)(candidates, requested, {
11660
+ const candidates = isFormEncoded ? declared.filter(mediaType => (0,_swaggerexpert_media_types__WEBPACK_IMPORTED_MODULE_5__.identify)(mediaType) === 'media-type') : declared;
11661
+ const match = (0,_swaggerexpert_media_types__WEBPACK_IMPORTED_MODULE_5__.selectBestMatch)(candidates, requested, {
11502
11662
  parameterMatching: 'compatible'
11503
11663
  });
11504
11664
  if (match === null) {
11505
- throw new _errors_ClientError_ts__WEBPACK_IMPORTED_MODULE_13__["default"](isFormEncoded ? `Request body media type "${requested}" must be declared by the operation exactly, ` + `since it decides how the body is encoded (declared: [${declared.join(', ')}])` : `Request body media type "${requested}" is not declared by the operation ` + `(declared: [${declared.join(', ')}])`, {
11665
+ throw new _errors_ClientError_ts__WEBPACK_IMPORTED_MODULE_14__["default"](isFormEncoded ? `Request body media type "${requested}" must be declared by the operation exactly, ` + `since it decides how the body is encoded (declared: [${declared.join(', ')}])` : `Request body media type "${requested}" is not declared by the operation ` + `(declared: [${declared.join(', ')}])`, {
11506
11666
  operationPath: jsonPointer
11507
11667
  });
11508
11668
  }
@@ -11564,7 +11724,7 @@ class OpenAPIOperationExecutor {
11564
11724
  ...rest,
11565
11725
  parameters: {
11566
11726
  ...callerParameters,
11567
- [_client_ParameterDelivery_ts__WEBPACK_IMPORTED_MODULE_7__["default"].keyFor('body', name)]: requestBody
11727
+ [_client_ParameterDelivery_ts__WEBPACK_IMPORTED_MODULE_8__["default"].keyFor('body', name)]: requestBody
11568
11728
  }
11569
11729
  };
11570
11730
  }
@@ -11573,8 +11733,8 @@ class OpenAPIOperationExecutor {
11573
11733
  // are the parameter names; buildRequest reports any that do not match
11574
11734
  const hasForm = parameters.some(parameter => (0,_speclynx_apidom_core__WEBPACK_IMPORTED_MODULE_0__["default"])(parameter.in) === 'formData');
11575
11735
  if (hasForm) {
11576
- if (!(0,ramda_adjunct__WEBPACK_IMPORTED_MODULE_5__["default"])(requestBody)) {
11577
- throw new _errors_ClientError_ts__WEBPACK_IMPORTED_MODULE_13__["default"]('Request body cannot be sent: the OpenAPI 2.0 operation carries it in "formData" ' + 'parameters, so the payload must be an object keyed by their names', {
11736
+ if (!(0,ramda_adjunct__WEBPACK_IMPORTED_MODULE_6__["default"])(requestBody)) {
11737
+ throw new _errors_ClientError_ts__WEBPACK_IMPORTED_MODULE_14__["default"]('Request body cannot be sent: the OpenAPI 2.0 operation carries it in "formData" ' + 'parameters, so the payload must be an object keyed by their names', {
11578
11738
  operationPath: jsonPointer
11579
11739
  });
11580
11740
  }
@@ -11584,14 +11744,14 @@ class OpenAPIOperationExecutor {
11584
11744
  ...callerParameters
11585
11745
  };
11586
11746
  for (const [field, value] of Object.entries(payload)) {
11587
- merged[_client_ParameterDelivery_ts__WEBPACK_IMPORTED_MODULE_7__["default"].keyFor('formData', field)] = value;
11747
+ merged[_client_ParameterDelivery_ts__WEBPACK_IMPORTED_MODULE_8__["default"].keyFor('formData', field)] = value;
11588
11748
  }
11589
11749
  return {
11590
11750
  ...rest,
11591
11751
  parameters: merged
11592
11752
  };
11593
11753
  }
11594
- throw new _errors_ClientError_ts__WEBPACK_IMPORTED_MODULE_13__["default"]('Request body cannot be sent: the OpenAPI 2.0 operation declares no "body" or ' + '"formData" parameter to carry it', {
11754
+ throw new _errors_ClientError_ts__WEBPACK_IMPORTED_MODULE_14__["default"]('Request body cannot be sent: the OpenAPI 2.0 operation declares no "body" or ' + '"formData" parameter to carry it', {
11595
11755
  operationPath: jsonPointer
11596
11756
  });
11597
11757
  }
@@ -11606,7 +11766,7 @@ class OpenAPIOperationExecutor {
11606
11766
  if (callerParameters === undefined) return;
11607
11767
  const conflicts = payloadNames.filter(name => Object.hasOwn(callerParameters, name));
11608
11768
  if (conflicts.length === 0) return;
11609
- throw new _errors_ClientError_ts__WEBPACK_IMPORTED_MODULE_13__["default"](`Request body cannot be sent: bare parameter ${conflicts.length === 1 ? 'entry' : 'entries'} ` + `[${conflicts.join(', ')}] would displace the payload at delivery. Supply the ` + `parameter under its "{in}.{name}" key, or drop the duplicate`, {
11769
+ throw new _errors_ClientError_ts__WEBPACK_IMPORTED_MODULE_14__["default"](`Request body cannot be sent: bare parameter ${conflicts.length === 1 ? 'entry' : 'entries'} ` + `[${conflicts.join(', ')}] would displace the payload at delivery. Supply the ` + `parameter under its "{in}.{name}" key, or drop the duplicate`, {
11610
11770
  operationPath: jsonPointer
11611
11771
  });
11612
11772
  }
@@ -11625,7 +11785,7 @@ class OpenAPIOperationExecutor {
11625
11785
 
11626
11786
  // JSON-encode plain-object and array bodies, exactly as swagger-client's
11627
11787
  // execute() does before handing the request to its transport
11628
- if (finalized.body && ((0,ramda_adjunct__WEBPACK_IMPORTED_MODULE_5__["default"])(finalized.body) || Array.isArray(finalized.body))) {
11788
+ if (finalized.body && ((0,ramda_adjunct__WEBPACK_IMPORTED_MODULE_6__["default"])(finalized.body) || Array.isArray(finalized.body))) {
11629
11789
  finalized.body = JSON.stringify(finalized.body);
11630
11790
  }
11631
11791
 
@@ -15953,7 +16113,11 @@ __webpack_require__.r(__webpack_exports__);
15953
16113
  * instead would let it capture *every* declared location of that name — see
15954
16114
  * `ParameterDelivery` for the lookup order that makes it so. A
15955
16115
  * non-string location throws for the same reason it deduplicates with nothing
15956
- * in the normalizer: it names no location. And two *different* parameters the
16116
+ * in the normalizer: it names no location. So does a location outside
16117
+ * `path`, `query`, `header`, `cookie` and `querystring`: Arazzo 1.0.1 removed
16118
+ * `in: body`, and forwarding one would let it still deliver a request body
16119
+ * against an OpenAPI 2.0 operation, bypassing the step's `requestBody`, while
16120
+ * an unknown location reaches nothing at all. And two *different* parameters the
15957
16121
  * map reports as colliding cannot both be delivered, so a collision throws
15958
16122
  * rather than silently dropping one — whether they collide on one key (the
15959
16123
  * scheme is not injective: a `querystring` parameter named `header.token` and
@@ -16014,6 +16178,13 @@ class OpenAPIOperationParameterResolver extends _StepParameterResolver_ts__WEBPA
16014
16178
  reason: 'malformed-location'
16015
16179
  });
16016
16180
  }
16181
+ if (!identity.hasDefinedLocation) {
16182
+ throw new _errors_ResolverError_ts__WEBPACK_IMPORTED_MODULE_4__["default"](`Parameter "${name}" has location "${location}", which is not one of ` + `${_document_ParameterIdentity_ts__WEBPACK_IMPORTED_MODULE_3__["default"].LOCATIONS.join(', ')}`, {
16183
+ ...scope,
16184
+ target: name,
16185
+ reason: 'invalid-location'
16186
+ });
16187
+ }
16017
16188
  const {
16018
16189
  key,
16019
16190
  outcome
@@ -71764,6 +71935,1742 @@ const test = runtimeExpression => {
71764
71935
  /* harmony export */ ]);
71765
71936
 
71766
71937
 
71938
+ /***/ },
71939
+
71940
+ /***/ 95878
71941
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
71942
+
71943
+ "use strict";
71944
+ __webpack_require__.r(__webpack_exports__);
71945
+ /* harmony import */ var apg_lite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(51751);
71946
+
71947
+ const cookieName = (state, chars, phraseIndex, phraseLength, data) => {
71948
+ if (state === apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_PRE) {
71949
+ data.push(['cookie-name', apg_lite__WEBPACK_IMPORTED_MODULE_0__.utilities.charsToString(chars, phraseIndex, phraseLength)]);
71950
+ } else if (state === apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_POST) {
71951
+ /* not used in this example */
71952
+ }
71953
+ return apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_OK;
71954
+ };
71955
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cookieName);
71956
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, [
71957
+ /* harmony export */ "default", 0, __WEBPACK_DEFAULT_EXPORT__
71958
+ /* harmony export */ ]);
71959
+
71960
+
71961
+ /***/ },
71962
+
71963
+ /***/ 19511
71964
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
71965
+
71966
+ "use strict";
71967
+ __webpack_require__.r(__webpack_exports__);
71968
+ /* harmony import */ var apg_lite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(51751);
71969
+
71970
+ const cookiePair = (state, chars, phraseIndex, phraseLength, data) => {
71971
+ if (state === apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_PRE) {
71972
+ data.push(['cookie-pair', apg_lite__WEBPACK_IMPORTED_MODULE_0__.utilities.charsToString(chars, phraseIndex, phraseLength)]);
71973
+ } else if (state === apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_POST) {
71974
+ /* not used in this example */
71975
+ }
71976
+ return apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_OK;
71977
+ };
71978
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cookiePair);
71979
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, [
71980
+ /* harmony export */ "default", 0, __WEBPACK_DEFAULT_EXPORT__
71981
+ /* harmony export */ ]);
71982
+
71983
+
71984
+ /***/ },
71985
+
71986
+ /***/ 12556
71987
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
71988
+
71989
+ "use strict";
71990
+ __webpack_require__.r(__webpack_exports__);
71991
+ /* harmony import */ var apg_lite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(51751);
71992
+
71993
+ const cookieString = (state, chars, phraseIndex, phraseLength, data) => {
71994
+ if (state === apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_PRE) {
71995
+ if (Array.isArray(data) === false) {
71996
+ throw new Error("parser's user data must be an array");
71997
+ }
71998
+ data.push(['cookie-string', apg_lite__WEBPACK_IMPORTED_MODULE_0__.utilities.charsToString(chars, phraseIndex, phraseLength)]);
71999
+ }
72000
+ return apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_OK;
72001
+ };
72002
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cookieString);
72003
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, [
72004
+ /* harmony export */ "default", 0, __WEBPACK_DEFAULT_EXPORT__
72005
+ /* harmony export */ ]);
72006
+
72007
+
72008
+ /***/ },
72009
+
72010
+ /***/ 18494
72011
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
72012
+
72013
+ "use strict";
72014
+ __webpack_require__.r(__webpack_exports__);
72015
+ /* harmony import */ var apg_lite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(51751);
72016
+
72017
+ const cookieValue = (state, chars, phraseIndex, phraseLength, data) => {
72018
+ if (state === apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_PRE) {
72019
+ data.push(['cookie-value', apg_lite__WEBPACK_IMPORTED_MODULE_0__.utilities.charsToString(chars, phraseIndex, phraseLength)]);
72020
+ } else if (state === apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_POST) {
72021
+ /* not used in this example */
72022
+ }
72023
+ return apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_OK;
72024
+ };
72025
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cookieValue);
72026
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, [
72027
+ /* harmony export */ "default", 0, __WEBPACK_DEFAULT_EXPORT__
72028
+ /* harmony export */ ]);
72029
+
72030
+
72031
+ /***/ },
72032
+
72033
+ /***/ 5789
72034
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
72035
+
72036
+ "use strict";
72037
+ __webpack_require__.r(__webpack_exports__);
72038
+ /* harmony import */ var apg_lite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(51751);
72039
+ /* harmony import */ var _grammar_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(67789);
72040
+ /* harmony import */ var _callbacks_cookie_string_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(12556);
72041
+ /* harmony import */ var _callbacks_cookie_pair_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(19511);
72042
+ /* harmony import */ var _callbacks_cookie_name_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(95878);
72043
+ /* harmony import */ var _callbacks_cookie_value_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(18494);
72044
+
72045
+
72046
+
72047
+
72048
+
72049
+
72050
+ const grammar = new _grammar_mjs__WEBPACK_IMPORTED_MODULE_1__["default"]();
72051
+ const parse = (cookieString, {
72052
+ strict = true
72053
+ } = {}) => {
72054
+ const parser = new apg_lite__WEBPACK_IMPORTED_MODULE_0__.Parser();
72055
+ parser.ast = new apg_lite__WEBPACK_IMPORTED_MODULE_0__.Ast();
72056
+ if (strict) {
72057
+ parser.ast.callbacks['cookie-string'] = _callbacks_cookie_string_mjs__WEBPACK_IMPORTED_MODULE_2__["default"];
72058
+ parser.ast.callbacks['cookie-pair'] = _callbacks_cookie_pair_mjs__WEBPACK_IMPORTED_MODULE_3__["default"];
72059
+ parser.ast.callbacks['cookie-name'] = _callbacks_cookie_name_mjs__WEBPACK_IMPORTED_MODULE_4__["default"];
72060
+ parser.ast.callbacks['cookie-value'] = _callbacks_cookie_value_mjs__WEBPACK_IMPORTED_MODULE_5__["default"];
72061
+ } else {
72062
+ parser.ast.callbacks['lenient-cookie-string'] = _callbacks_cookie_string_mjs__WEBPACK_IMPORTED_MODULE_2__["default"];
72063
+ parser.ast.callbacks['lenient-cookie-pair'] = _callbacks_cookie_pair_mjs__WEBPACK_IMPORTED_MODULE_3__["default"];
72064
+ parser.ast.callbacks['lenient-cookie-name'] = _callbacks_cookie_name_mjs__WEBPACK_IMPORTED_MODULE_4__["default"];
72065
+ parser.ast.callbacks['lenient-cookie-value'] = _callbacks_cookie_value_mjs__WEBPACK_IMPORTED_MODULE_5__["default"];
72066
+ }
72067
+ const startRule = strict ? 'cookie-string' : 'lenient-cookie-string';
72068
+ const result = parser.parse(grammar, startRule, cookieString);
72069
+ return {
72070
+ result,
72071
+ ast: parser.ast
72072
+ };
72073
+ };
72074
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (parse);
72075
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, [
72076
+ /* harmony export */ "default", 0, __WEBPACK_DEFAULT_EXPORT__
72077
+ /* harmony export */ ]);
72078
+
72079
+
72080
+ /***/ },
72081
+
72082
+ /***/ 70074
72083
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
72084
+
72085
+ "use strict";
72086
+ __webpack_require__.r(__webpack_exports__);
72087
+ /* harmony import */ var _set_cookie_serialize_index_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(51575);
72088
+
72089
+ const serialize = (cookiePairs, options = {}) => {
72090
+ const cookiePairEntries = Array.isArray(cookiePairs) ? cookiePairs : typeof cookiePairs === 'object' && cookiePairs !== null ? Object.entries(cookiePairs) : [];
72091
+ return cookiePairEntries.map(([name, value]) => (0,_set_cookie_serialize_index_mjs__WEBPACK_IMPORTED_MODULE_0__["default"])(name, value, options)).join('; ');
72092
+ };
72093
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (serialize);
72094
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, [
72095
+ /* harmony export */ "default", 0, __WEBPACK_DEFAULT_EXPORT__
72096
+ /* harmony export */ ]);
72097
+
72098
+
72099
+ /***/ },
72100
+
72101
+ /***/ 16552
72102
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
72103
+
72104
+ "use strict";
72105
+ __webpack_require__.r(__webpack_exports__);
72106
+ /* harmony import */ var apg_lite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(51751);
72107
+ /* harmony import */ var _grammar_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(67789);
72108
+
72109
+
72110
+ const parser = new apg_lite__WEBPACK_IMPORTED_MODULE_0__.Parser();
72111
+ const grammar = new _grammar_mjs__WEBPACK_IMPORTED_MODULE_1__["default"]();
72112
+ const testCookieName = (cookieName, {
72113
+ strict = true
72114
+ } = {}) => {
72115
+ try {
72116
+ const startRule = strict ? 'cookie-name' : 'lenient-cookie-name';
72117
+ return parser.parse(grammar, startRule, cookieName).success;
72118
+ } catch {
72119
+ return false;
72120
+ }
72121
+ };
72122
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (testCookieName);
72123
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, [
72124
+ /* harmony export */ "default", 0, __WEBPACK_DEFAULT_EXPORT__
72125
+ /* harmony export */ ]);
72126
+
72127
+
72128
+ /***/ },
72129
+
72130
+ /***/ 23396
72131
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
72132
+
72133
+ "use strict";
72134
+ __webpack_require__.r(__webpack_exports__);
72135
+ /* harmony import */ var apg_lite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(51751);
72136
+ /* harmony import */ var _grammar_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(67789);
72137
+ /* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(93913);
72138
+
72139
+
72140
+
72141
+ const parser = new apg_lite__WEBPACK_IMPORTED_MODULE_0__.Parser();
72142
+ const grammar = new _grammar_mjs__WEBPACK_IMPORTED_MODULE_1__["default"]();
72143
+ const testCookieValue = (cookieValue, {
72144
+ strict = true,
72145
+ quoted = null
72146
+ } = {}) => {
72147
+ try {
72148
+ const startRule = strict ? 'cookie-value' : 'lenient-cookie-value';
72149
+ const result = parser.parse(grammar, startRule, cookieValue);
72150
+ if (typeof quoted === 'boolean') {
72151
+ return result.success && quoted === (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_2__.isQuoted)(cookieValue);
72152
+ }
72153
+ return result.success;
72154
+ } catch {
72155
+ return false;
72156
+ }
72157
+ };
72158
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (testCookieValue);
72159
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, [
72160
+ /* harmony export */ "default", 0, __WEBPACK_DEFAULT_EXPORT__
72161
+ /* harmony export */ ]);
72162
+
72163
+
72164
+ /***/ },
72165
+
72166
+ /***/ 67789
72167
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
72168
+
72169
+ "use strict";
72170
+ __webpack_require__.r(__webpack_exports__);
72171
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
72172
+ /* harmony export */ "default": () => (/* binding */ grammar)
72173
+ /* harmony export */ });
72174
+ // copyright: Copyright (c) 2024 Lowell D. Thomas, all rights reserved<br>
72175
+ // license: BSD-2-Clause (https://opensource.org/licenses/BSD-2-Clause)<br>
72176
+ //
72177
+ // Generated by apg-js, Version 4.4.0 [apg-js](https://github.com/ldthomas/apg-js)
72178
+ function grammar() {
72179
+ // ```
72180
+ // SUMMARY
72181
+ // rules = 30
72182
+ // udts = 0
72183
+ // opcodes = 139
72184
+ // --- ABNF original opcodes
72185
+ // ALT = 12
72186
+ // CAT = 12
72187
+ // REP = 13
72188
+ // RNM = 41
72189
+ // TLS = 35
72190
+ // TBS = 10
72191
+ // TRG = 16
72192
+ // --- SABNF superset opcodes
72193
+ // UDT = 0
72194
+ // AND = 0
72195
+ // NOT = 0
72196
+ // characters = [0 - 127]
72197
+ // ```
72198
+ /* OBJECT IDENTIFIER (for internal parser use) */
72199
+ this.grammarObject = 'grammarObject';
72200
+
72201
+ /* RULES */
72202
+ this.rules = [];
72203
+ this.rules[0] = {
72204
+ name: 'lenient-cookie-string',
72205
+ lower: 'lenient-cookie-string',
72206
+ index: 0,
72207
+ isBkr: false
72208
+ };
72209
+ this.rules[1] = {
72210
+ name: 'lenient-cookie-entry',
72211
+ lower: 'lenient-cookie-entry',
72212
+ index: 1,
72213
+ isBkr: false
72214
+ };
72215
+ this.rules[2] = {
72216
+ name: 'lenient-cookie-pair',
72217
+ lower: 'lenient-cookie-pair',
72218
+ index: 2,
72219
+ isBkr: false
72220
+ };
72221
+ this.rules[3] = {
72222
+ name: 'lenient-cookie-pair-invalid',
72223
+ lower: 'lenient-cookie-pair-invalid',
72224
+ index: 3,
72225
+ isBkr: false
72226
+ };
72227
+ this.rules[4] = {
72228
+ name: 'lenient-cookie-name',
72229
+ lower: 'lenient-cookie-name',
72230
+ index: 4,
72231
+ isBkr: false
72232
+ };
72233
+ this.rules[5] = {
72234
+ name: 'lenient-cookie-value',
72235
+ lower: 'lenient-cookie-value',
72236
+ index: 5,
72237
+ isBkr: false
72238
+ };
72239
+ this.rules[6] = {
72240
+ name: 'lenient-quoted-value',
72241
+ lower: 'lenient-quoted-value',
72242
+ index: 6,
72243
+ isBkr: false
72244
+ };
72245
+ this.rules[7] = {
72246
+ name: 'lenient-quoted-char',
72247
+ lower: 'lenient-quoted-char',
72248
+ index: 7,
72249
+ isBkr: false
72250
+ };
72251
+ this.rules[8] = {
72252
+ name: 'lenient-cookie-octet',
72253
+ lower: 'lenient-cookie-octet',
72254
+ index: 8,
72255
+ isBkr: false
72256
+ };
72257
+ this.rules[9] = {
72258
+ name: 'cookie-string',
72259
+ lower: 'cookie-string',
72260
+ index: 9,
72261
+ isBkr: false
72262
+ };
72263
+ this.rules[10] = {
72264
+ name: 'cookie-pair',
72265
+ lower: 'cookie-pair',
72266
+ index: 10,
72267
+ isBkr: false
72268
+ };
72269
+ this.rules[11] = {
72270
+ name: 'cookie-name',
72271
+ lower: 'cookie-name',
72272
+ index: 11,
72273
+ isBkr: false
72274
+ };
72275
+ this.rules[12] = {
72276
+ name: 'cookie-value',
72277
+ lower: 'cookie-value',
72278
+ index: 12,
72279
+ isBkr: false
72280
+ };
72281
+ this.rules[13] = {
72282
+ name: 'cookie-octet',
72283
+ lower: 'cookie-octet',
72284
+ index: 13,
72285
+ isBkr: false
72286
+ };
72287
+ this.rules[14] = {
72288
+ name: 'OWS',
72289
+ lower: 'ows',
72290
+ index: 14,
72291
+ isBkr: false
72292
+ };
72293
+ this.rules[15] = {
72294
+ name: 'token',
72295
+ lower: 'token',
72296
+ index: 15,
72297
+ isBkr: false
72298
+ };
72299
+ this.rules[16] = {
72300
+ name: 'tchar',
72301
+ lower: 'tchar',
72302
+ index: 16,
72303
+ isBkr: false
72304
+ };
72305
+ this.rules[17] = {
72306
+ name: 'CHAR',
72307
+ lower: 'char',
72308
+ index: 17,
72309
+ isBkr: false
72310
+ };
72311
+ this.rules[18] = {
72312
+ name: 'CTL',
72313
+ lower: 'ctl',
72314
+ index: 18,
72315
+ isBkr: false
72316
+ };
72317
+ this.rules[19] = {
72318
+ name: 'separators',
72319
+ lower: 'separators',
72320
+ index: 19,
72321
+ isBkr: false
72322
+ };
72323
+ this.rules[20] = {
72324
+ name: 'SP',
72325
+ lower: 'sp',
72326
+ index: 20,
72327
+ isBkr: false
72328
+ };
72329
+ this.rules[21] = {
72330
+ name: 'HT',
72331
+ lower: 'ht',
72332
+ index: 21,
72333
+ isBkr: false
72334
+ };
72335
+ this.rules[22] = {
72336
+ name: 'ALPHA',
72337
+ lower: 'alpha',
72338
+ index: 22,
72339
+ isBkr: false
72340
+ };
72341
+ this.rules[23] = {
72342
+ name: 'DIGIT',
72343
+ lower: 'digit',
72344
+ index: 23,
72345
+ isBkr: false
72346
+ };
72347
+ this.rules[24] = {
72348
+ name: 'DQUOTE',
72349
+ lower: 'dquote',
72350
+ index: 24,
72351
+ isBkr: false
72352
+ };
72353
+ this.rules[25] = {
72354
+ name: 'WSP',
72355
+ lower: 'wsp',
72356
+ index: 25,
72357
+ isBkr: false
72358
+ };
72359
+ this.rules[26] = {
72360
+ name: 'HTAB',
72361
+ lower: 'htab',
72362
+ index: 26,
72363
+ isBkr: false
72364
+ };
72365
+ this.rules[27] = {
72366
+ name: 'CRLF',
72367
+ lower: 'crlf',
72368
+ index: 27,
72369
+ isBkr: false
72370
+ };
72371
+ this.rules[28] = {
72372
+ name: 'CR',
72373
+ lower: 'cr',
72374
+ index: 28,
72375
+ isBkr: false
72376
+ };
72377
+ this.rules[29] = {
72378
+ name: 'LF',
72379
+ lower: 'lf',
72380
+ index: 29,
72381
+ isBkr: false
72382
+ };
72383
+
72384
+ /* UDTS */
72385
+ this.udts = [];
72386
+
72387
+ /* OPCODES */
72388
+ /* lenient-cookie-string */
72389
+ this.rules[0].opcodes = [];
72390
+ this.rules[0].opcodes[0] = {
72391
+ type: 2,
72392
+ children: [1, 2]
72393
+ }; // CAT
72394
+ this.rules[0].opcodes[1] = {
72395
+ type: 4,
72396
+ index: 1
72397
+ }; // RNM(lenient-cookie-entry)
72398
+ this.rules[0].opcodes[2] = {
72399
+ type: 3,
72400
+ min: 0,
72401
+ max: Infinity
72402
+ }; // REP
72403
+ this.rules[0].opcodes[3] = {
72404
+ type: 2,
72405
+ children: [4, 5, 6]
72406
+ }; // CAT
72407
+ this.rules[0].opcodes[4] = {
72408
+ type: 7,
72409
+ string: [59]
72410
+ }; // TLS
72411
+ this.rules[0].opcodes[5] = {
72412
+ type: 4,
72413
+ index: 14
72414
+ }; // RNM(OWS)
72415
+ this.rules[0].opcodes[6] = {
72416
+ type: 4,
72417
+ index: 1
72418
+ }; // RNM(lenient-cookie-entry)
72419
+
72420
+ /* lenient-cookie-entry */
72421
+ this.rules[1].opcodes = [];
72422
+ this.rules[1].opcodes[0] = {
72423
+ type: 1,
72424
+ children: [1, 2]
72425
+ }; // ALT
72426
+ this.rules[1].opcodes[1] = {
72427
+ type: 4,
72428
+ index: 2
72429
+ }; // RNM(lenient-cookie-pair)
72430
+ this.rules[1].opcodes[2] = {
72431
+ type: 4,
72432
+ index: 3
72433
+ }; // RNM(lenient-cookie-pair-invalid)
72434
+
72435
+ /* lenient-cookie-pair */
72436
+ this.rules[2].opcodes = [];
72437
+ this.rules[2].opcodes[0] = {
72438
+ type: 2,
72439
+ children: [1, 2, 3, 4, 5, 6, 7]
72440
+ }; // CAT
72441
+ this.rules[2].opcodes[1] = {
72442
+ type: 4,
72443
+ index: 14
72444
+ }; // RNM(OWS)
72445
+ this.rules[2].opcodes[2] = {
72446
+ type: 4,
72447
+ index: 4
72448
+ }; // RNM(lenient-cookie-name)
72449
+ this.rules[2].opcodes[3] = {
72450
+ type: 4,
72451
+ index: 14
72452
+ }; // RNM(OWS)
72453
+ this.rules[2].opcodes[4] = {
72454
+ type: 7,
72455
+ string: [61]
72456
+ }; // TLS
72457
+ this.rules[2].opcodes[5] = {
72458
+ type: 4,
72459
+ index: 14
72460
+ }; // RNM(OWS)
72461
+ this.rules[2].opcodes[6] = {
72462
+ type: 4,
72463
+ index: 5
72464
+ }; // RNM(lenient-cookie-value)
72465
+ this.rules[2].opcodes[7] = {
72466
+ type: 4,
72467
+ index: 14
72468
+ }; // RNM(OWS)
72469
+
72470
+ /* lenient-cookie-pair-invalid */
72471
+ this.rules[3].opcodes = [];
72472
+ this.rules[3].opcodes[0] = {
72473
+ type: 2,
72474
+ children: [1, 2, 4]
72475
+ }; // CAT
72476
+ this.rules[3].opcodes[1] = {
72477
+ type: 4,
72478
+ index: 14
72479
+ }; // RNM(OWS)
72480
+ this.rules[3].opcodes[2] = {
72481
+ type: 3,
72482
+ min: 1,
72483
+ max: Infinity
72484
+ }; // REP
72485
+ this.rules[3].opcodes[3] = {
72486
+ type: 4,
72487
+ index: 16
72488
+ }; // RNM(tchar)
72489
+ this.rules[3].opcodes[4] = {
72490
+ type: 4,
72491
+ index: 14
72492
+ }; // RNM(OWS)
72493
+
72494
+ /* lenient-cookie-name */
72495
+ this.rules[4].opcodes = [];
72496
+ this.rules[4].opcodes[0] = {
72497
+ type: 3,
72498
+ min: 1,
72499
+ max: Infinity
72500
+ }; // REP
72501
+ this.rules[4].opcodes[1] = {
72502
+ type: 1,
72503
+ children: [2, 3, 4]
72504
+ }; // ALT
72505
+ this.rules[4].opcodes[2] = {
72506
+ type: 5,
72507
+ min: 33,
72508
+ max: 58
72509
+ }; // TRG
72510
+ this.rules[4].opcodes[3] = {
72511
+ type: 6,
72512
+ string: [60]
72513
+ }; // TBS
72514
+ this.rules[4].opcodes[4] = {
72515
+ type: 5,
72516
+ min: 62,
72517
+ max: 126
72518
+ }; // TRG
72519
+
72520
+ /* lenient-cookie-value */
72521
+ this.rules[5].opcodes = [];
72522
+ this.rules[5].opcodes[0] = {
72523
+ type: 1,
72524
+ children: [1, 6]
72525
+ }; // ALT
72526
+ this.rules[5].opcodes[1] = {
72527
+ type: 2,
72528
+ children: [2, 3]
72529
+ }; // CAT
72530
+ this.rules[5].opcodes[2] = {
72531
+ type: 4,
72532
+ index: 6
72533
+ }; // RNM(lenient-quoted-value)
72534
+ this.rules[5].opcodes[3] = {
72535
+ type: 3,
72536
+ min: 0,
72537
+ max: 1
72538
+ }; // REP
72539
+ this.rules[5].opcodes[4] = {
72540
+ type: 3,
72541
+ min: 0,
72542
+ max: Infinity
72543
+ }; // REP
72544
+ this.rules[5].opcodes[5] = {
72545
+ type: 4,
72546
+ index: 8
72547
+ }; // RNM(lenient-cookie-octet)
72548
+ this.rules[5].opcodes[6] = {
72549
+ type: 3,
72550
+ min: 0,
72551
+ max: Infinity
72552
+ }; // REP
72553
+ this.rules[5].opcodes[7] = {
72554
+ type: 4,
72555
+ index: 8
72556
+ }; // RNM(lenient-cookie-octet)
72557
+
72558
+ /* lenient-quoted-value */
72559
+ this.rules[6].opcodes = [];
72560
+ this.rules[6].opcodes[0] = {
72561
+ type: 2,
72562
+ children: [1, 2, 4]
72563
+ }; // CAT
72564
+ this.rules[6].opcodes[1] = {
72565
+ type: 4,
72566
+ index: 24
72567
+ }; // RNM(DQUOTE)
72568
+ this.rules[6].opcodes[2] = {
72569
+ type: 3,
72570
+ min: 0,
72571
+ max: Infinity
72572
+ }; // REP
72573
+ this.rules[6].opcodes[3] = {
72574
+ type: 4,
72575
+ index: 7
72576
+ }; // RNM(lenient-quoted-char)
72577
+ this.rules[6].opcodes[4] = {
72578
+ type: 4,
72579
+ index: 24
72580
+ }; // RNM(DQUOTE)
72581
+
72582
+ /* lenient-quoted-char */
72583
+ this.rules[7].opcodes = [];
72584
+ this.rules[7].opcodes[0] = {
72585
+ type: 1,
72586
+ children: [1, 2]
72587
+ }; // ALT
72588
+ this.rules[7].opcodes[1] = {
72589
+ type: 5,
72590
+ min: 32,
72591
+ max: 33
72592
+ }; // TRG
72593
+ this.rules[7].opcodes[2] = {
72594
+ type: 5,
72595
+ min: 35,
72596
+ max: 126
72597
+ }; // TRG
72598
+
72599
+ /* lenient-cookie-octet */
72600
+ this.rules[8].opcodes = [];
72601
+ this.rules[8].opcodes[0] = {
72602
+ type: 1,
72603
+ children: [1, 2, 3]
72604
+ }; // ALT
72605
+ this.rules[8].opcodes[1] = {
72606
+ type: 5,
72607
+ min: 33,
72608
+ max: 43
72609
+ }; // TRG
72610
+ this.rules[8].opcodes[2] = {
72611
+ type: 5,
72612
+ min: 45,
72613
+ max: 58
72614
+ }; // TRG
72615
+ this.rules[8].opcodes[3] = {
72616
+ type: 5,
72617
+ min: 60,
72618
+ max: 126
72619
+ }; // TRG
72620
+
72621
+ /* cookie-string */
72622
+ this.rules[9].opcodes = [];
72623
+ this.rules[9].opcodes[0] = {
72624
+ type: 2,
72625
+ children: [1, 2]
72626
+ }; // CAT
72627
+ this.rules[9].opcodes[1] = {
72628
+ type: 4,
72629
+ index: 10
72630
+ }; // RNM(cookie-pair)
72631
+ this.rules[9].opcodes[2] = {
72632
+ type: 3,
72633
+ min: 0,
72634
+ max: Infinity
72635
+ }; // REP
72636
+ this.rules[9].opcodes[3] = {
72637
+ type: 2,
72638
+ children: [4, 5, 6]
72639
+ }; // CAT
72640
+ this.rules[9].opcodes[4] = {
72641
+ type: 7,
72642
+ string: [59]
72643
+ }; // TLS
72644
+ this.rules[9].opcodes[5] = {
72645
+ type: 4,
72646
+ index: 20
72647
+ }; // RNM(SP)
72648
+ this.rules[9].opcodes[6] = {
72649
+ type: 4,
72650
+ index: 10
72651
+ }; // RNM(cookie-pair)
72652
+
72653
+ /* cookie-pair */
72654
+ this.rules[10].opcodes = [];
72655
+ this.rules[10].opcodes[0] = {
72656
+ type: 2,
72657
+ children: [1, 2, 3]
72658
+ }; // CAT
72659
+ this.rules[10].opcodes[1] = {
72660
+ type: 4,
72661
+ index: 11
72662
+ }; // RNM(cookie-name)
72663
+ this.rules[10].opcodes[2] = {
72664
+ type: 7,
72665
+ string: [61]
72666
+ }; // TLS
72667
+ this.rules[10].opcodes[3] = {
72668
+ type: 4,
72669
+ index: 12
72670
+ }; // RNM(cookie-value)
72671
+
72672
+ /* cookie-name */
72673
+ this.rules[11].opcodes = [];
72674
+ this.rules[11].opcodes[0] = {
72675
+ type: 4,
72676
+ index: 15
72677
+ }; // RNM(token)
72678
+
72679
+ /* cookie-value */
72680
+ this.rules[12].opcodes = [];
72681
+ this.rules[12].opcodes[0] = {
72682
+ type: 1,
72683
+ children: [1, 6]
72684
+ }; // ALT
72685
+ this.rules[12].opcodes[1] = {
72686
+ type: 2,
72687
+ children: [2, 3, 5]
72688
+ }; // CAT
72689
+ this.rules[12].opcodes[2] = {
72690
+ type: 4,
72691
+ index: 24
72692
+ }; // RNM(DQUOTE)
72693
+ this.rules[12].opcodes[3] = {
72694
+ type: 3,
72695
+ min: 0,
72696
+ max: Infinity
72697
+ }; // REP
72698
+ this.rules[12].opcodes[4] = {
72699
+ type: 4,
72700
+ index: 13
72701
+ }; // RNM(cookie-octet)
72702
+ this.rules[12].opcodes[5] = {
72703
+ type: 4,
72704
+ index: 24
72705
+ }; // RNM(DQUOTE)
72706
+ this.rules[12].opcodes[6] = {
72707
+ type: 3,
72708
+ min: 0,
72709
+ max: Infinity
72710
+ }; // REP
72711
+ this.rules[12].opcodes[7] = {
72712
+ type: 4,
72713
+ index: 13
72714
+ }; // RNM(cookie-octet)
72715
+
72716
+ /* cookie-octet */
72717
+ this.rules[13].opcodes = [];
72718
+ this.rules[13].opcodes[0] = {
72719
+ type: 1,
72720
+ children: [1, 2, 3, 4, 5]
72721
+ }; // ALT
72722
+ this.rules[13].opcodes[1] = {
72723
+ type: 6,
72724
+ string: [33]
72725
+ }; // TBS
72726
+ this.rules[13].opcodes[2] = {
72727
+ type: 5,
72728
+ min: 35,
72729
+ max: 43
72730
+ }; // TRG
72731
+ this.rules[13].opcodes[3] = {
72732
+ type: 5,
72733
+ min: 45,
72734
+ max: 58
72735
+ }; // TRG
72736
+ this.rules[13].opcodes[4] = {
72737
+ type: 5,
72738
+ min: 60,
72739
+ max: 91
72740
+ }; // TRG
72741
+ this.rules[13].opcodes[5] = {
72742
+ type: 5,
72743
+ min: 93,
72744
+ max: 126
72745
+ }; // TRG
72746
+
72747
+ /* OWS */
72748
+ this.rules[14].opcodes = [];
72749
+ this.rules[14].opcodes[0] = {
72750
+ type: 3,
72751
+ min: 0,
72752
+ max: Infinity
72753
+ }; // REP
72754
+ this.rules[14].opcodes[1] = {
72755
+ type: 2,
72756
+ children: [2, 4]
72757
+ }; // CAT
72758
+ this.rules[14].opcodes[2] = {
72759
+ type: 3,
72760
+ min: 0,
72761
+ max: 1
72762
+ }; // REP
72763
+ this.rules[14].opcodes[3] = {
72764
+ type: 4,
72765
+ index: 27
72766
+ }; // RNM(CRLF)
72767
+ this.rules[14].opcodes[4] = {
72768
+ type: 4,
72769
+ index: 25
72770
+ }; // RNM(WSP)
72771
+
72772
+ /* token */
72773
+ this.rules[15].opcodes = [];
72774
+ this.rules[15].opcodes[0] = {
72775
+ type: 3,
72776
+ min: 1,
72777
+ max: Infinity
72778
+ }; // REP
72779
+ this.rules[15].opcodes[1] = {
72780
+ type: 4,
72781
+ index: 16
72782
+ }; // RNM(tchar)
72783
+
72784
+ /* tchar */
72785
+ this.rules[16].opcodes = [];
72786
+ this.rules[16].opcodes[0] = {
72787
+ type: 1,
72788
+ children: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]
72789
+ }; // ALT
72790
+ this.rules[16].opcodes[1] = {
72791
+ type: 7,
72792
+ string: [33]
72793
+ }; // TLS
72794
+ this.rules[16].opcodes[2] = {
72795
+ type: 7,
72796
+ string: [35]
72797
+ }; // TLS
72798
+ this.rules[16].opcodes[3] = {
72799
+ type: 7,
72800
+ string: [36]
72801
+ }; // TLS
72802
+ this.rules[16].opcodes[4] = {
72803
+ type: 7,
72804
+ string: [37]
72805
+ }; // TLS
72806
+ this.rules[16].opcodes[5] = {
72807
+ type: 7,
72808
+ string: [38]
72809
+ }; // TLS
72810
+ this.rules[16].opcodes[6] = {
72811
+ type: 7,
72812
+ string: [39]
72813
+ }; // TLS
72814
+ this.rules[16].opcodes[7] = {
72815
+ type: 7,
72816
+ string: [42]
72817
+ }; // TLS
72818
+ this.rules[16].opcodes[8] = {
72819
+ type: 7,
72820
+ string: [43]
72821
+ }; // TLS
72822
+ this.rules[16].opcodes[9] = {
72823
+ type: 7,
72824
+ string: [45]
72825
+ }; // TLS
72826
+ this.rules[16].opcodes[10] = {
72827
+ type: 7,
72828
+ string: [46]
72829
+ }; // TLS
72830
+ this.rules[16].opcodes[11] = {
72831
+ type: 7,
72832
+ string: [94]
72833
+ }; // TLS
72834
+ this.rules[16].opcodes[12] = {
72835
+ type: 7,
72836
+ string: [95]
72837
+ }; // TLS
72838
+ this.rules[16].opcodes[13] = {
72839
+ type: 7,
72840
+ string: [96]
72841
+ }; // TLS
72842
+ this.rules[16].opcodes[14] = {
72843
+ type: 7,
72844
+ string: [124]
72845
+ }; // TLS
72846
+ this.rules[16].opcodes[15] = {
72847
+ type: 7,
72848
+ string: [126]
72849
+ }; // TLS
72850
+ this.rules[16].opcodes[16] = {
72851
+ type: 4,
72852
+ index: 23
72853
+ }; // RNM(DIGIT)
72854
+ this.rules[16].opcodes[17] = {
72855
+ type: 4,
72856
+ index: 22
72857
+ }; // RNM(ALPHA)
72858
+
72859
+ /* CHAR */
72860
+ this.rules[17].opcodes = [];
72861
+ this.rules[17].opcodes[0] = {
72862
+ type: 5,
72863
+ min: 1,
72864
+ max: 127
72865
+ }; // TRG
72866
+
72867
+ /* CTL */
72868
+ this.rules[18].opcodes = [];
72869
+ this.rules[18].opcodes[0] = {
72870
+ type: 1,
72871
+ children: [1, 2]
72872
+ }; // ALT
72873
+ this.rules[18].opcodes[1] = {
72874
+ type: 5,
72875
+ min: 0,
72876
+ max: 31
72877
+ }; // TRG
72878
+ this.rules[18].opcodes[2] = {
72879
+ type: 6,
72880
+ string: [127]
72881
+ }; // TBS
72882
+
72883
+ /* separators */
72884
+ this.rules[19].opcodes = [];
72885
+ this.rules[19].opcodes[0] = {
72886
+ type: 1,
72887
+ children: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]
72888
+ }; // ALT
72889
+ this.rules[19].opcodes[1] = {
72890
+ type: 7,
72891
+ string: [40]
72892
+ }; // TLS
72893
+ this.rules[19].opcodes[2] = {
72894
+ type: 7,
72895
+ string: [41]
72896
+ }; // TLS
72897
+ this.rules[19].opcodes[3] = {
72898
+ type: 7,
72899
+ string: [60]
72900
+ }; // TLS
72901
+ this.rules[19].opcodes[4] = {
72902
+ type: 7,
72903
+ string: [62]
72904
+ }; // TLS
72905
+ this.rules[19].opcodes[5] = {
72906
+ type: 7,
72907
+ string: [64]
72908
+ }; // TLS
72909
+ this.rules[19].opcodes[6] = {
72910
+ type: 7,
72911
+ string: [44]
72912
+ }; // TLS
72913
+ this.rules[19].opcodes[7] = {
72914
+ type: 7,
72915
+ string: [59]
72916
+ }; // TLS
72917
+ this.rules[19].opcodes[8] = {
72918
+ type: 7,
72919
+ string: [58]
72920
+ }; // TLS
72921
+ this.rules[19].opcodes[9] = {
72922
+ type: 7,
72923
+ string: [92]
72924
+ }; // TLS
72925
+ this.rules[19].opcodes[10] = {
72926
+ type: 6,
72927
+ string: [34]
72928
+ }; // TBS
72929
+ this.rules[19].opcodes[11] = {
72930
+ type: 7,
72931
+ string: [47]
72932
+ }; // TLS
72933
+ this.rules[19].opcodes[12] = {
72934
+ type: 7,
72935
+ string: [91]
72936
+ }; // TLS
72937
+ this.rules[19].opcodes[13] = {
72938
+ type: 7,
72939
+ string: [93]
72940
+ }; // TLS
72941
+ this.rules[19].opcodes[14] = {
72942
+ type: 7,
72943
+ string: [63]
72944
+ }; // TLS
72945
+ this.rules[19].opcodes[15] = {
72946
+ type: 7,
72947
+ string: [61]
72948
+ }; // TLS
72949
+ this.rules[19].opcodes[16] = {
72950
+ type: 7,
72951
+ string: [123]
72952
+ }; // TLS
72953
+ this.rules[19].opcodes[17] = {
72954
+ type: 7,
72955
+ string: [125]
72956
+ }; // TLS
72957
+ this.rules[19].opcodes[18] = {
72958
+ type: 4,
72959
+ index: 20
72960
+ }; // RNM(SP)
72961
+ this.rules[19].opcodes[19] = {
72962
+ type: 4,
72963
+ index: 21
72964
+ }; // RNM(HT)
72965
+
72966
+ /* SP */
72967
+ this.rules[20].opcodes = [];
72968
+ this.rules[20].opcodes[0] = {
72969
+ type: 6,
72970
+ string: [32]
72971
+ }; // TBS
72972
+
72973
+ /* HT */
72974
+ this.rules[21].opcodes = [];
72975
+ this.rules[21].opcodes[0] = {
72976
+ type: 6,
72977
+ string: [9]
72978
+ }; // TBS
72979
+
72980
+ /* ALPHA */
72981
+ this.rules[22].opcodes = [];
72982
+ this.rules[22].opcodes[0] = {
72983
+ type: 1,
72984
+ children: [1, 2]
72985
+ }; // ALT
72986
+ this.rules[22].opcodes[1] = {
72987
+ type: 5,
72988
+ min: 65,
72989
+ max: 90
72990
+ }; // TRG
72991
+ this.rules[22].opcodes[2] = {
72992
+ type: 5,
72993
+ min: 97,
72994
+ max: 122
72995
+ }; // TRG
72996
+
72997
+ /* DIGIT */
72998
+ this.rules[23].opcodes = [];
72999
+ this.rules[23].opcodes[0] = {
73000
+ type: 5,
73001
+ min: 48,
73002
+ max: 57
73003
+ }; // TRG
73004
+
73005
+ /* DQUOTE */
73006
+ this.rules[24].opcodes = [];
73007
+ this.rules[24].opcodes[0] = {
73008
+ type: 6,
73009
+ string: [34]
73010
+ }; // TBS
73011
+
73012
+ /* WSP */
73013
+ this.rules[25].opcodes = [];
73014
+ this.rules[25].opcodes[0] = {
73015
+ type: 1,
73016
+ children: [1, 2]
73017
+ }; // ALT
73018
+ this.rules[25].opcodes[1] = {
73019
+ type: 4,
73020
+ index: 20
73021
+ }; // RNM(SP)
73022
+ this.rules[25].opcodes[2] = {
73023
+ type: 4,
73024
+ index: 26
73025
+ }; // RNM(HTAB)
73026
+
73027
+ /* HTAB */
73028
+ this.rules[26].opcodes = [];
73029
+ this.rules[26].opcodes[0] = {
73030
+ type: 6,
73031
+ string: [9]
73032
+ }; // TBS
73033
+
73034
+ /* CRLF */
73035
+ this.rules[27].opcodes = [];
73036
+ this.rules[27].opcodes[0] = {
73037
+ type: 2,
73038
+ children: [1, 2]
73039
+ }; // CAT
73040
+ this.rules[27].opcodes[1] = {
73041
+ type: 4,
73042
+ index: 28
73043
+ }; // RNM(CR)
73044
+ this.rules[27].opcodes[2] = {
73045
+ type: 4,
73046
+ index: 29
73047
+ }; // RNM(LF)
73048
+
73049
+ /* CR */
73050
+ this.rules[28].opcodes = [];
73051
+ this.rules[28].opcodes[0] = {
73052
+ type: 6,
73053
+ string: [13]
73054
+ }; // TBS
73055
+
73056
+ /* LF */
73057
+ this.rules[29].opcodes = [];
73058
+ this.rules[29].opcodes[0] = {
73059
+ type: 6,
73060
+ string: [10]
73061
+ }; // TBS
73062
+
73063
+ // The `toString()` function will display the original grammar file(s) that produced these opcodes.
73064
+ this.toString = function toString() {
73065
+ let str = "";
73066
+ str += "; Lenient version of https://datatracker.ietf.org/doc/html/rfc6265#section-4.2.1\n";
73067
+ str += "lenient-cookie-string = lenient-cookie-entry *( \";\" OWS lenient-cookie-entry )\n";
73068
+ str += "lenient-cookie-entry = lenient-cookie-pair / lenient-cookie-pair-invalid\n";
73069
+ str += "lenient-cookie-pair = OWS lenient-cookie-name OWS \"=\" OWS lenient-cookie-value OWS\n";
73070
+ str += "lenient-cookie-pair-invalid = OWS 1*tchar OWS ; Allow for standalone entries like \"fizz\" to be ignored\n";
73071
+ str += "lenient-cookie-name = 1*( %x21-3A / %x3C / %x3E-7E ) ; Allow all printable US-ASCII except \"=\"\n";
73072
+ str += "lenient-cookie-value = lenient-quoted-value [ *lenient-cookie-octet ] / *lenient-cookie-octet\n";
73073
+ str += "lenient-quoted-value = DQUOTE *( lenient-quoted-char ) DQUOTE\n";
73074
+ str += "lenient-quoted-char = %x20-21 / %x23-7E ; Allow all printable US-ASCII except DQUOTE\n";
73075
+ str += "lenient-cookie-octet = %x21-2B / %x2D-3A / %x3C-7E\n";
73076
+ str += " ; Allow all printable characters except CTLs, semicolon and SP\n";
73077
+ str += "\n";
73078
+ str += "; https://datatracker.ietf.org/doc/html/rfc6265#section-4.2.1\n";
73079
+ str += "cookie-string = cookie-pair *( \";\" SP cookie-pair )\n";
73080
+ str += "\n";
73081
+ str += "; https://datatracker.ietf.org/doc/html/rfc6265#section-4.1.1\n";
73082
+ str += "; https://www.rfc-editor.org/errata/eid5518\n";
73083
+ str += "cookie-pair = cookie-name \"=\" cookie-value\n";
73084
+ str += "cookie-name = token\n";
73085
+ str += "cookie-value = ( DQUOTE *cookie-octet DQUOTE ) / *cookie-octet\n";
73086
+ str += " ; https://www.rfc-editor.org/errata/eid8242\n";
73087
+ str += "cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E\n";
73088
+ str += " ; US-ASCII characters excluding CTLs,\n";
73089
+ str += " ; whitespace, DQUOTE, comma, semicolon,\n";
73090
+ str += " ; and backslash\n";
73091
+ str += "\n";
73092
+ str += "; https://datatracker.ietf.org/doc/html/rfc6265#section-2.2\n";
73093
+ str += "OWS = *( [ CRLF ] WSP ) ; \"optional\" whitespace\n";
73094
+ str += "\n";
73095
+ str += "; https://datatracker.ietf.org/doc/html/rfc9110#section-5.6.2\n";
73096
+ str += "token = 1*(tchar)\n";
73097
+ str += "tchar = \"!\" / \"#\" / \"$\" / \"%\" / \"&\" / \"'\" / \"*\"\n";
73098
+ str += " / \"+\" / \"-\" / \".\" / \"^\" / \"_\" / \"`\" / \"|\" / \"~\"\n";
73099
+ str += " / DIGIT / ALPHA\n";
73100
+ str += " ; any VCHAR, except delimiters\n";
73101
+ str += "\n";
73102
+ str += "; https://datatracker.ietf.org/doc/html/rfc2616#section-2.2\n";
73103
+ str += "CHAR = %x01-7F ; any US-ASCII character (octets 0 - 127)\n";
73104
+ str += "CTL = %x00-1F / %x7F ; any US-ASCII control character\n";
73105
+ str += "separators = \"(\" / \")\" / \"<\" / \">\" / \"@\" / \",\" / \";\" / \":\" / \"\\\" / %x22 / \"/\" / \"[\" / \"]\" / \"?\" / \"=\" / \"{\" / \"}\" / SP / HT\n";
73106
+ str += "SP = %x20 ; US-ASCII SP, space (32)\n";
73107
+ str += "HT = %x09 ; US-ASCII HT, horizontal-tab (9)\n";
73108
+ str += "\n";
73109
+ str += "; https://datatracker.ietf.org/doc/html/rfc5234#appendix-B.1\n";
73110
+ str += "ALPHA = %x41-5A / %x61-7A ; A-Z / a-z\n";
73111
+ str += "DIGIT = %x30-39 ; 0-9\n";
73112
+ str += "DQUOTE = %x22 ; \" (Double Quote)\n";
73113
+ str += "WSP = SP / HTAB ; white space\n";
73114
+ str += "HTAB = %x09 ; horizontal tab\n";
73115
+ str += "CRLF = CR LF ; Internet standard newline\n";
73116
+ str += "CR = %x0D ; carriage return\n";
73117
+ str += "LF = %x0A ; linefeed\n";
73118
+ return str;
73119
+ };
73120
+ }
73121
+
73122
+ /***/ },
73123
+
73124
+ /***/ 36258
73125
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
73126
+
73127
+ "use strict";
73128
+ __webpack_require__.r(__webpack_exports__);
73129
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
73130
+ /* harmony export */ Grammar: () => (/* reexport safe */ _grammar_mjs__WEBPACK_IMPORTED_MODULE_0__["default"]),
73131
+ /* harmony export */ base64Encoder: () => (/* reexport safe */ _set_cookie_serialize_encoders_base64_node_mjs__WEBPACK_IMPORTED_MODULE_3__["default"]),
73132
+ /* harmony export */ base64urlEncoder: () => (/* reexport safe */ _set_cookie_serialize_encoders_base64url_node_mjs__WEBPACK_IMPORTED_MODULE_4__["default"]),
73133
+ /* harmony export */ cookieNameLenientPercentEncoder: () => (/* reexport safe */ _set_cookie_serialize_encoders_cookie_name_lenient_percent_mjs__WEBPACK_IMPORTED_MODULE_6__["default"]),
73134
+ /* harmony export */ cookieNameLenientValidator: () => (/* reexport safe */ _set_cookie_serialize_validators_cookie_name_lenient_mjs__WEBPACK_IMPORTED_MODULE_14__["default"]),
73135
+ /* harmony export */ cookieNameStrictPercentEncoder: () => (/* reexport safe */ _set_cookie_serialize_encoders_cookie_name_strict_percent_mjs__WEBPACK_IMPORTED_MODULE_5__["default"]),
73136
+ /* harmony export */ cookieNameStrictValidator: () => (/* reexport safe */ _set_cookie_serialize_validators_cookie_name_strict_mjs__WEBPACK_IMPORTED_MODULE_13__["default"]),
73137
+ /* harmony export */ cookieValueLenientBase64Encoder: () => (/* reexport safe */ _set_cookie_serialize_encoders_cookie_value_lenient_base64_mjs__WEBPACK_IMPORTED_MODULE_11__["default"]),
73138
+ /* harmony export */ cookieValueLenientBase64urlEncoder: () => (/* reexport safe */ _set_cookie_serialize_encoders_cookie_value_lenient_base64url_mjs__WEBPACK_IMPORTED_MODULE_12__["default"]),
73139
+ /* harmony export */ cookieValueLenientPercentEncoder: () => (/* reexport safe */ _set_cookie_serialize_encoders_cookie_value_lenient_percent_mjs__WEBPACK_IMPORTED_MODULE_10__["default"]),
73140
+ /* harmony export */ cookieValueLenientValidator: () => (/* reexport safe */ _set_cookie_serialize_validators_cookie_value_lenient_mjs__WEBPACK_IMPORTED_MODULE_16__["default"]),
73141
+ /* harmony export */ cookieValueStrictBase64Encoder: () => (/* reexport safe */ _set_cookie_serialize_encoders_cookie_value_strict_base64_mjs__WEBPACK_IMPORTED_MODULE_8__["default"]),
73142
+ /* harmony export */ cookieValueStrictBase64urlEncoder: () => (/* reexport safe */ _set_cookie_serialize_encoders_cookie_value_strict_base64url_mjs__WEBPACK_IMPORTED_MODULE_9__["default"]),
73143
+ /* harmony export */ cookieValueStrictPercentEncoder: () => (/* reexport safe */ _set_cookie_serialize_encoders_cookie_value_strict_percent_mjs__WEBPACK_IMPORTED_MODULE_7__["default"]),
73144
+ /* harmony export */ cookieValueStrictValidator: () => (/* reexport safe */ _set_cookie_serialize_validators_cookie_value_strict_mjs__WEBPACK_IMPORTED_MODULE_15__["default"]),
73145
+ /* harmony export */ identity: () => (/* reexport safe */ _utils_mjs__WEBPACK_IMPORTED_MODULE_17__.identity),
73146
+ /* harmony export */ noop: () => (/* reexport safe */ _utils_mjs__WEBPACK_IMPORTED_MODULE_17__.noop),
73147
+ /* harmony export */ parseCookie: () => (/* reexport safe */ _cookie_parse_index_mjs__WEBPACK_IMPORTED_MODULE_1__["default"]),
73148
+ /* harmony export */ serializeCookie: () => (/* reexport safe */ _cookie_serialize_index_mjs__WEBPACK_IMPORTED_MODULE_2__["default"])
73149
+ /* harmony export */ });
73150
+ /* harmony import */ var _grammar_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(67789);
73151
+ /* harmony import */ var _cookie_parse_index_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5789);
73152
+ /* harmony import */ var _cookie_serialize_index_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(70074);
73153
+ /* harmony import */ var _set_cookie_serialize_encoders_base64_node_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(99710);
73154
+ /* harmony import */ var _set_cookie_serialize_encoders_base64url_node_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(5221);
73155
+ /* harmony import */ var _set_cookie_serialize_encoders_cookie_name_strict_percent_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(25753);
73156
+ /* harmony import */ var _set_cookie_serialize_encoders_cookie_name_lenient_percent_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(64871);
73157
+ /* harmony import */ var _set_cookie_serialize_encoders_cookie_value_strict_percent_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(8655);
73158
+ /* harmony import */ var _set_cookie_serialize_encoders_cookie_value_strict_base64_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(29057);
73159
+ /* harmony import */ var _set_cookie_serialize_encoders_cookie_value_strict_base64url_mjs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(1428);
73160
+ /* harmony import */ var _set_cookie_serialize_encoders_cookie_value_lenient_percent_mjs__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(20541);
73161
+ /* harmony import */ var _set_cookie_serialize_encoders_cookie_value_lenient_base64_mjs__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(93083);
73162
+ /* harmony import */ var _set_cookie_serialize_encoders_cookie_value_lenient_base64url_mjs__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(34822);
73163
+ /* harmony import */ var _set_cookie_serialize_validators_cookie_name_strict_mjs__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(46319);
73164
+ /* harmony import */ var _set_cookie_serialize_validators_cookie_name_lenient_mjs__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(74297);
73165
+ /* harmony import */ var _set_cookie_serialize_validators_cookie_value_strict_mjs__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(77901);
73166
+ /* harmony import */ var _set_cookie_serialize_validators_cookie_value_lenient_mjs__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(55959);
73167
+ /* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(93913);
73168
+
73169
+
73170
+
73171
+ /**
73172
+ * Encoders
73173
+ */
73174
+
73175
+
73176
+
73177
+
73178
+
73179
+
73180
+
73181
+
73182
+
73183
+
73184
+ /**
73185
+ * Validators
73186
+ */
73187
+
73188
+
73189
+
73190
+
73191
+ /**
73192
+ * Utils
73193
+ */
73194
+
73195
+
73196
+ /***/ },
73197
+
73198
+ /***/ 99710
73199
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
73200
+
73201
+ "use strict";
73202
+ __webpack_require__.r(__webpack_exports__);
73203
+ const base64Encoder = input => {
73204
+ const bytes = new TextEncoder().encode(input);
73205
+ const binaryString = bytes.reduce((acc, byte) => acc + String.fromCharCode(byte), '');
73206
+ return btoa(binaryString);
73207
+ };
73208
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (base64Encoder);
73209
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, [
73210
+ /* harmony export */ "default", 0, __WEBPACK_DEFAULT_EXPORT__
73211
+ /* harmony export */ ]);
73212
+
73213
+
73214
+ /***/ },
73215
+
73216
+ /***/ 5221
73217
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
73218
+
73219
+ "use strict";
73220
+ __webpack_require__.r(__webpack_exports__);
73221
+ /* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(93913);
73222
+ /* harmony import */ var _base64_browser_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(99710);
73223
+
73224
+
73225
+ const base64urlEncoder = input => {
73226
+ return (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_0__.toBase64url)((0,_base64_browser_mjs__WEBPACK_IMPORTED_MODULE_1__["default"])(input));
73227
+ };
73228
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (base64urlEncoder);
73229
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, [
73230
+ /* harmony export */ "default", 0, __WEBPACK_DEFAULT_EXPORT__
73231
+ /* harmony export */ ]);
73232
+
73233
+
73234
+ /***/ },
73235
+
73236
+ /***/ 64871
73237
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
73238
+
73239
+ "use strict";
73240
+ __webpack_require__.r(__webpack_exports__);
73241
+ /* harmony import */ var _cookie_test_cookie_name_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16552);
73242
+ /* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(93913);
73243
+
73244
+
73245
+ const cookieNameLenientPercentEncoder = cookieName => {
73246
+ const value = String(cookieName);
73247
+ let result = '';
73248
+ for (const char of value) {
73249
+ result += (0,_cookie_test_cookie_name_mjs__WEBPACK_IMPORTED_MODULE_0__["default"])(char, {
73250
+ strict: false
73251
+ }) ? char : (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.percentEncodeChar)(char);
73252
+ }
73253
+ return result;
73254
+ };
73255
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cookieNameLenientPercentEncoder);
73256
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, [
73257
+ /* harmony export */ "default", 0, __WEBPACK_DEFAULT_EXPORT__
73258
+ /* harmony export */ ]);
73259
+
73260
+
73261
+ /***/ },
73262
+
73263
+ /***/ 25753
73264
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
73265
+
73266
+ "use strict";
73267
+ __webpack_require__.r(__webpack_exports__);
73268
+ /* harmony import */ var _cookie_test_cookie_name_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16552);
73269
+ /* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(93913);
73270
+
73271
+
73272
+ const cookieNameStrictPercentEncoder = cookieName => {
73273
+ const value = String(cookieName);
73274
+ let result = '';
73275
+ for (const char of value) {
73276
+ result += (0,_cookie_test_cookie_name_mjs__WEBPACK_IMPORTED_MODULE_0__["default"])(char) ? char : (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.percentEncodeChar)(char);
73277
+ }
73278
+ return result;
73279
+ };
73280
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cookieNameStrictPercentEncoder);
73281
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, [
73282
+ /* harmony export */ "default", 0, __WEBPACK_DEFAULT_EXPORT__
73283
+ /* harmony export */ ]);
73284
+
73285
+
73286
+ /***/ },
73287
+
73288
+ /***/ 93083
73289
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
73290
+
73291
+ "use strict";
73292
+ __webpack_require__.r(__webpack_exports__);
73293
+ /* harmony import */ var _cookie_test_cookie_value_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23396);
73294
+ /* harmony import */ var _base64_node_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(99710);
73295
+ /* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(93913);
73296
+
73297
+
73298
+
73299
+ const cookieValueLenientBase64Encoder = (cookieValue, encoder = _base64_node_mjs__WEBPACK_IMPORTED_MODULE_1__["default"]) => {
73300
+ const value = String(cookieValue);
73301
+
73302
+ // return early if the value is already valid
73303
+ if ((0,_cookie_test_cookie_value_mjs__WEBPACK_IMPORTED_MODULE_0__["default"])(value, {
73304
+ strict: false
73305
+ })) return value;
73306
+
73307
+ // detect if the value is quoted
73308
+ const isQuoted = (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_2__.isQuoted)(value);
73309
+
73310
+ // remove quotes if present for processing
73311
+ const valueToEncode = isQuoted ? (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_2__.unquote)(value) : value;
73312
+
73313
+ // encode the value
73314
+ const result = encoder(valueToEncode);
73315
+
73316
+ // return quoted if input was quoted, unquoted otherwise
73317
+ return isQuoted ? (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_2__.quote)(result) : result;
73318
+ };
73319
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cookieValueLenientBase64Encoder);
73320
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, [
73321
+ /* harmony export */ "default", 0, __WEBPACK_DEFAULT_EXPORT__
73322
+ /* harmony export */ ]);
73323
+
73324
+
73325
+ /***/ },
73326
+
73327
+ /***/ 34822
73328
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
73329
+
73330
+ "use strict";
73331
+ __webpack_require__.r(__webpack_exports__);
73332
+ /* harmony import */ var _cookie_value_lenient_base64_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(93083);
73333
+ /* harmony import */ var _base64url_node_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5221);
73334
+
73335
+
73336
+ const cookieValueLenientBase64urlEncoder = cookieValue => {
73337
+ return (0,_cookie_value_lenient_base64_mjs__WEBPACK_IMPORTED_MODULE_0__["default"])(cookieValue, _base64url_node_mjs__WEBPACK_IMPORTED_MODULE_1__["default"]);
73338
+ };
73339
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cookieValueLenientBase64urlEncoder);
73340
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, [
73341
+ /* harmony export */ "default", 0, __WEBPACK_DEFAULT_EXPORT__
73342
+ /* harmony export */ ]);
73343
+
73344
+
73345
+ /***/ },
73346
+
73347
+ /***/ 20541
73348
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
73349
+
73350
+ "use strict";
73351
+ __webpack_require__.r(__webpack_exports__);
73352
+ /* harmony import */ var apg_lite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(51751);
73353
+ /* harmony import */ var _grammar_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(67789);
73354
+ /* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(93913);
73355
+ /* harmony import */ var _cookie_test_cookie_value_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(23396);
73356
+
73357
+
73358
+
73359
+
73360
+ const parser = new apg_lite__WEBPACK_IMPORTED_MODULE_0__.Parser();
73361
+ const grammar = new _grammar_mjs__WEBPACK_IMPORTED_MODULE_1__["default"]();
73362
+ const cookieValueLenientPercentEncoder = cookieValue => {
73363
+ const value = String(cookieValue);
73364
+
73365
+ // return early if the value is already valid
73366
+ if ((0,_cookie_test_cookie_value_mjs__WEBPACK_IMPORTED_MODULE_3__["default"])(value, {
73367
+ strict: false
73368
+ })) return value;
73369
+
73370
+ // detect if the value is quoted
73371
+ const isQuoted = (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_2__.isQuoted)(value);
73372
+
73373
+ // remove quotes if present for processing
73374
+ const valueToEncode = isQuoted ? (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_2__.unquote)(value) : value;
73375
+ const startRule = isQuoted ? 'lenient-quoted-char' : 'lenient-cookie-octet';
73376
+ let result = '';
73377
+ for (const char of valueToEncode) {
73378
+ result += parser.parse(grammar, startRule, char).success ? char : (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_2__.percentEncodeChar)(char);
73379
+ }
73380
+
73381
+ // return quoted if input was quoted, unquoted otherwise
73382
+ return isQuoted ? (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_2__.quote)(result) : result;
73383
+ };
73384
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cookieValueLenientPercentEncoder);
73385
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, [
73386
+ /* harmony export */ "default", 0, __WEBPACK_DEFAULT_EXPORT__
73387
+ /* harmony export */ ]);
73388
+
73389
+
73390
+ /***/ },
73391
+
73392
+ /***/ 29057
73393
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
73394
+
73395
+ "use strict";
73396
+ __webpack_require__.r(__webpack_exports__);
73397
+ /* harmony import */ var _cookie_test_cookie_value_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23396);
73398
+ /* harmony import */ var _base64_node_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(99710);
73399
+ /* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(93913);
73400
+
73401
+
73402
+
73403
+ const cookieValueStrictBase64Encoder = (cookieValue, encoder = _base64_node_mjs__WEBPACK_IMPORTED_MODULE_1__["default"]) => {
73404
+ const value = String(cookieValue);
73405
+
73406
+ // return early if the value is already valid
73407
+ if ((0,_cookie_test_cookie_value_mjs__WEBPACK_IMPORTED_MODULE_0__["default"])(value)) return value;
73408
+
73409
+ // detect if the value is quoted
73410
+ const isQuoted = (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_2__.isQuoted)(value);
73411
+
73412
+ // remove quotes if present for processing
73413
+ const valueToEncode = isQuoted ? (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_2__.unquote)(value) : value;
73414
+
73415
+ // base64 encode the value
73416
+ const base64EncodedValue = encoder(valueToEncode);
73417
+
73418
+ // return quoted if input was quoted, unquoted otherwise
73419
+ return isQuoted ? (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_2__.quote)(base64EncodedValue) : base64EncodedValue;
73420
+ };
73421
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cookieValueStrictBase64Encoder);
73422
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, [
73423
+ /* harmony export */ "default", 0, __WEBPACK_DEFAULT_EXPORT__
73424
+ /* harmony export */ ]);
73425
+
73426
+
73427
+ /***/ },
73428
+
73429
+ /***/ 1428
73430
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
73431
+
73432
+ "use strict";
73433
+ __webpack_require__.r(__webpack_exports__);
73434
+ /* harmony import */ var _cookie_value_strict_base64_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(29057);
73435
+ /* harmony import */ var _base64url_node_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5221);
73436
+
73437
+
73438
+ const cookieValueStrictBase64urlEncoder = cookieValue => {
73439
+ return (0,_cookie_value_strict_base64_mjs__WEBPACK_IMPORTED_MODULE_0__["default"])(cookieValue, _base64url_node_mjs__WEBPACK_IMPORTED_MODULE_1__["default"]);
73440
+ };
73441
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cookieValueStrictBase64urlEncoder);
73442
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, [
73443
+ /* harmony export */ "default", 0, __WEBPACK_DEFAULT_EXPORT__
73444
+ /* harmony export */ ]);
73445
+
73446
+
73447
+ /***/ },
73448
+
73449
+ /***/ 8655
73450
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
73451
+
73452
+ "use strict";
73453
+ __webpack_require__.r(__webpack_exports__);
73454
+ /* harmony import */ var apg_lite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(51751);
73455
+ /* harmony import */ var _grammar_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(67789);
73456
+ /* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(93913);
73457
+ /* harmony import */ var _cookie_test_cookie_value_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(23396);
73458
+
73459
+
73460
+
73461
+
73462
+ const parser = new apg_lite__WEBPACK_IMPORTED_MODULE_0__.Parser();
73463
+ const grammar = new _grammar_mjs__WEBPACK_IMPORTED_MODULE_1__["default"]();
73464
+ const cookieValueStrictPercentEncoder = cookieValue => {
73465
+ const value = String(cookieValue);
73466
+
73467
+ // return early if the value is already valid
73468
+ if ((0,_cookie_test_cookie_value_mjs__WEBPACK_IMPORTED_MODULE_3__["default"])(value)) return value;
73469
+
73470
+ // detect if the value is quoted
73471
+ const isQuoted = (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_2__.isQuoted)(value);
73472
+
73473
+ // remove quotes if present for processing
73474
+ const valueToEncode = isQuoted ? (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_2__.unquote)(value) : value;
73475
+ let result = '';
73476
+ for (const char of valueToEncode) {
73477
+ result += parser.parse(grammar, 'cookie-octet', char).success ? char : (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_2__.percentEncodeChar)(char);
73478
+ }
73479
+
73480
+ // return quoted if input was quoted, unquoted otherwise
73481
+ return isQuoted ? (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_2__.quote)(result) : result;
73482
+ };
73483
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cookieValueStrictPercentEncoder);
73484
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, [
73485
+ /* harmony export */ "default", 0, __WEBPACK_DEFAULT_EXPORT__
73486
+ /* harmony export */ ]);
73487
+
73488
+
73489
+ /***/ },
73490
+
73491
+ /***/ 51575
73492
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
73493
+
73494
+ "use strict";
73495
+ __webpack_require__.r(__webpack_exports__);
73496
+ /* harmony import */ var _encoders_cookie_value_strict_base64url_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1428);
73497
+ /* harmony import */ var _validators_cookie_name_strict_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(46319);
73498
+ /* harmony import */ var _validators_cookie_value_strict_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(77901);
73499
+ /* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(93913);
73500
+
73501
+
73502
+
73503
+
73504
+ const defaultOptions = {
73505
+ encoders: {
73506
+ name: _utils_mjs__WEBPACK_IMPORTED_MODULE_3__.identity,
73507
+ value: _encoders_cookie_value_strict_base64url_mjs__WEBPACK_IMPORTED_MODULE_0__["default"]
73508
+ },
73509
+ validators: {
73510
+ name: _validators_cookie_name_strict_mjs__WEBPACK_IMPORTED_MODULE_1__["default"],
73511
+ value: _validators_cookie_value_strict_mjs__WEBPACK_IMPORTED_MODULE_2__["default"]
73512
+ }
73513
+ };
73514
+ const serialize = (name, value, options = {}) => {
73515
+ const mergedOptions = {
73516
+ ...defaultOptions,
73517
+ ...options,
73518
+ encoders: {
73519
+ ...defaultOptions.encoders,
73520
+ ...options.encoders
73521
+ },
73522
+ validators: {
73523
+ ...defaultOptions.validators,
73524
+ ...options.validators
73525
+ }
73526
+ };
73527
+ const encodedName = mergedOptions.encoders.name(name);
73528
+ const encodedValue = mergedOptions.encoders.value(value);
73529
+ mergedOptions.validators.name(encodedName);
73530
+ mergedOptions.validators.value(encodedValue);
73531
+ return `${encodedName}=${encodedValue}`;
73532
+ };
73533
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (serialize);
73534
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, [
73535
+ /* harmony export */ "default", 0, __WEBPACK_DEFAULT_EXPORT__
73536
+ /* harmony export */ ]);
73537
+
73538
+
73539
+ /***/ },
73540
+
73541
+ /***/ 74297
73542
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
73543
+
73544
+ "use strict";
73545
+ __webpack_require__.r(__webpack_exports__);
73546
+ /* harmony import */ var _cookie_test_cookie_name_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16552);
73547
+
73548
+ const cookieNameLenientValidator = cookieName => {
73549
+ if (!(0,_cookie_test_cookie_name_mjs__WEBPACK_IMPORTED_MODULE_0__["default"])(cookieName, {
73550
+ strict: false
73551
+ })) {
73552
+ throw new TypeError(`Invalid cookie name: ${cookieName}`);
73553
+ }
73554
+ };
73555
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cookieNameLenientValidator);
73556
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, [
73557
+ /* harmony export */ "default", 0, __WEBPACK_DEFAULT_EXPORT__
73558
+ /* harmony export */ ]);
73559
+
73560
+
73561
+ /***/ },
73562
+
73563
+ /***/ 46319
73564
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
73565
+
73566
+ "use strict";
73567
+ __webpack_require__.r(__webpack_exports__);
73568
+ /* harmony import */ var _cookie_test_cookie_name_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16552);
73569
+
73570
+ const cookieNameStrictValidator = cookieName => {
73571
+ if (!(0,_cookie_test_cookie_name_mjs__WEBPACK_IMPORTED_MODULE_0__["default"])(cookieName)) {
73572
+ throw new TypeError(`Invalid cookie name: ${cookieName}`);
73573
+ }
73574
+ };
73575
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cookieNameStrictValidator);
73576
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, [
73577
+ /* harmony export */ "default", 0, __WEBPACK_DEFAULT_EXPORT__
73578
+ /* harmony export */ ]);
73579
+
73580
+
73581
+ /***/ },
73582
+
73583
+ /***/ 55959
73584
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
73585
+
73586
+ "use strict";
73587
+ __webpack_require__.r(__webpack_exports__);
73588
+ /* harmony import */ var _cookie_test_cookie_value_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23396);
73589
+
73590
+ const cookieValueLenientValidator = cookieValue => {
73591
+ if (!(0,_cookie_test_cookie_value_mjs__WEBPACK_IMPORTED_MODULE_0__["default"])(cookieValue, {
73592
+ strict: false
73593
+ })) {
73594
+ throw new TypeError(`Invalid cookie value: ${cookieValue}`);
73595
+ }
73596
+ };
73597
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cookieValueLenientValidator);
73598
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, [
73599
+ /* harmony export */ "default", 0, __WEBPACK_DEFAULT_EXPORT__
73600
+ /* harmony export */ ]);
73601
+
73602
+
73603
+ /***/ },
73604
+
73605
+ /***/ 77901
73606
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
73607
+
73608
+ "use strict";
73609
+ __webpack_require__.r(__webpack_exports__);
73610
+ /* harmony import */ var _cookie_test_cookie_value_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23396);
73611
+
73612
+ const cookieValueStrictValidator = cookieValue => {
73613
+ if (!(0,_cookie_test_cookie_value_mjs__WEBPACK_IMPORTED_MODULE_0__["default"])(cookieValue)) {
73614
+ throw new TypeError(`Invalid cookie value: ${cookieValue}`);
73615
+ }
73616
+ };
73617
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cookieValueStrictValidator);
73618
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, [
73619
+ /* harmony export */ "default", 0, __WEBPACK_DEFAULT_EXPORT__
73620
+ /* harmony export */ ]);
73621
+
73622
+
73623
+ /***/ },
73624
+
73625
+ /***/ 93913
73626
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
73627
+
73628
+ "use strict";
73629
+ __webpack_require__.r(__webpack_exports__);
73630
+ const percentEncodeChar = char => {
73631
+ if (typeof char !== 'string' || [...char].length !== 1) {
73632
+ throw new TypeError('Input must be a single character string.');
73633
+ }
73634
+ const codePoint = char.codePointAt(0);
73635
+ if (codePoint <= 0x7f) {
73636
+ // ASCII range: Encode as %XX
73637
+ return `%${codePoint.toString(16).toUpperCase().padStart(2, '0')}`;
73638
+ } else {
73639
+ // Non-ASCII range: Use encodeURIComponent to handle UTF-8 encoding
73640
+ return encodeURIComponent(char);
73641
+ }
73642
+ };
73643
+ const toBase64url = base64 => {
73644
+ return base64.replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/g, '');
73645
+ };
73646
+ const toBase64 = base64url => {
73647
+ const base64 = base64url.replace(/-/g, '+').replace(/_/g, '/');
73648
+ const padding = '='.repeat((4 - base64.length % 4) % 4);
73649
+ return `${base64}${padding}`;
73650
+ };
73651
+ const isQuoted = value => {
73652
+ return value.length >= 2 && value.startsWith('"') && value.endsWith('"');
73653
+ };
73654
+ const unquote = value => {
73655
+ return isQuoted(value) ? value.slice(1, -1) : value;
73656
+ };
73657
+ const quote = value => {
73658
+ return `"${value}"`;
73659
+ };
73660
+ const identity = a => a;
73661
+ const noop = () => {};
73662
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, [
73663
+ /* harmony export */ "identity", 0, /* binding */ identity,
73664
+ /* harmony export */ "isQuoted", 0, /* binding */ isQuoted,
73665
+ /* harmony export */ "noop", 0, /* binding */ noop,
73666
+ /* harmony export */ "percentEncodeChar", 0, /* binding */ percentEncodeChar,
73667
+ /* harmony export */ "quote", 0, /* binding */ quote,
73668
+ /* harmony export */ "toBase64", 0, /* binding */ toBase64,
73669
+ /* harmony export */ "toBase64url", 0, /* binding */ toBase64url,
73670
+ /* harmony export */ "unquote", 0, /* binding */ unquote
73671
+ /* harmony export */ ]);
73672
+
73673
+
71767
73674
  /***/ },
71768
73675
 
71769
73676
  /***/ 96901