@speclynx/apidom-ns-json-schema-2020-12 4.10.0 → 4.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,18 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [4.11.1](https://github.com/speclynx/apidom/compare/v4.11.0...v4.11.1) (2026-06-10)
7
+
8
+ **Note:** Version bump only for package @speclynx/apidom-ns-json-schema-2020-12
9
+
10
+ # [4.11.0](https://github.com/speclynx/apidom/compare/v4.10.1...v4.11.0) (2026-06-10)
11
+
12
+ **Note:** Version bump only for package @speclynx/apidom-ns-json-schema-2020-12
13
+
14
+ ## [4.10.1](https://github.com/speclynx/apidom/compare/v4.10.0...v4.10.1) (2026-05-20)
15
+
16
+ **Note:** Version bump only for package @speclynx/apidom-ns-json-schema-2020-12
17
+
6
18
  # [4.10.0](https://github.com/speclynx/apidom/compare/v4.9.1...v4.10.0) (2026-05-12)
7
19
 
8
20
  **Note:** Version bump only for package @speclynx/apidom-ns-json-schema-2020-12
@@ -23596,6 +23596,14 @@ class Path {
23596
23596
  */
23597
23597
  inList;
23598
23598
 
23599
+ /**
23600
+ * True when this node is a non-descending revisit of an already-visited node
23601
+ * (only under skipVisited: 'enter-only'). Children are not traversed.
23602
+ * Set on both the enter and the matching leave phase, so it is meaningful
23603
+ * in either phase.
23604
+ */
23605
+ revisited = false;
23606
+
23599
23607
  /**
23600
23608
  * Internal state for traversal control.
23601
23609
  */
@@ -24180,6 +24188,10 @@ __webpack_require__.r(__webpack_exports__);
24180
24188
 
24181
24189
 
24182
24190
 
24191
+ /**
24192
+ * Controls handling of already-visited nodes during traversal.
24193
+ * @public
24194
+ */
24183
24195
  /**
24184
24196
  * Options for the traverse function.
24185
24197
  * @public
@@ -24187,6 +24199,12 @@ __webpack_require__.r(__webpack_exports__);
24187
24199
  // =============================================================================
24188
24200
  // Internal types for generator
24189
24201
  // =============================================================================
24202
+
24203
+ const normalizeSkipVisited = v => {
24204
+ if (v === true) return 'skip';
24205
+ if (v === false || v === undefined) return 'never';
24206
+ return v;
24207
+ };
24190
24208
  // =============================================================================
24191
24209
  // Core generator
24192
24210
  // =============================================================================
@@ -24204,7 +24222,7 @@ function* traverseGenerator(root, visitor, options) {
24204
24222
  mutationFn
24205
24223
  } = options;
24206
24224
  const keyMapIsFunction = typeof keyMap === 'function';
24207
- const visitedNodes = skipVisited ? new WeakSet() : null;
24225
+ const visitedNodes = skipVisited !== 'never' ? new WeakSet() : null;
24208
24226
  let stack;
24209
24227
  let inArray = Array.isArray(root);
24210
24228
  let keys = [root];
@@ -24219,6 +24237,7 @@ function* traverseGenerator(root, visitor, options) {
24219
24237
  index += 1;
24220
24238
  const isLeaving = index === keys.length;
24221
24239
  let key;
24240
+ let revisitNoDescend = false;
24222
24241
  const isEdited = isLeaving && edits.length !== 0;
24223
24242
  if (isLeaving) {
24224
24243
  key = ancestors.length === 0 ? undefined : currentPath?.key;
@@ -24260,6 +24279,7 @@ function* traverseGenerator(root, visitor, options) {
24260
24279
  edits = stack.edits;
24261
24280
  const parentInArray = stack.inArray;
24262
24281
  parentPath = stack.parentPath;
24282
+ revisitNoDescend = stack.revisitNoDescend;
24263
24283
  stack = stack.prev;
24264
24284
 
24265
24285
  // Push the edited node to parent's edits for propagation up the tree
@@ -24291,15 +24311,22 @@ function* traverseGenerator(root, visitor, options) {
24291
24311
  }
24292
24312
 
24293
24313
  // Skip already-visited nodes (handles DAG structures from cloneShallow)
24294
- if (skipVisited && !isLeaving) {
24314
+ if (skipVisited !== 'never' && !isLeaving) {
24295
24315
  if (visitedNodes.has(node)) {
24296
- continue;
24316
+ if (skipVisited === 'enter-only') {
24317
+ // fire enter/leave for this occurrence, but don't re-descend
24318
+ revisitNoDescend = true;
24319
+ } else {
24320
+ continue;
24321
+ }
24322
+ } else {
24323
+ visitedNodes.add(node);
24297
24324
  }
24298
- visitedNodes.add(node);
24299
24325
  }
24300
24326
 
24301
24327
  // Always create Path for the current node (needed for parentPath chain)
24302
24328
  currentPath = new _Path_mjs__WEBPACK_IMPORTED_MODULE_2__.Path(node, parent, parentPath, key, inArray);
24329
+ currentPath.revisited = revisitNoDescend;
24303
24330
  const visitFn = (0,_visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.getVisitFn)(visitor, nodeTypeGetter(node), isLeaving);
24304
24331
  if (visitFn) {
24305
24332
  // Assign state to visitor
@@ -24363,10 +24390,13 @@ function* traverseGenerator(root, visitor, options) {
24363
24390
  keys,
24364
24391
  edits,
24365
24392
  parentPath,
24393
+ revisitNoDescend,
24366
24394
  prev: stack
24367
24395
  };
24368
24396
  inArray = Array.isArray(node);
24369
- if (inArray) {
24397
+ if (revisitNoDescend) {
24398
+ keys = [];
24399
+ } else if (inArray) {
24370
24400
  keys = node;
24371
24401
  } else if (keyMapIsFunction) {
24372
24402
  keys = keyMap(node);
@@ -24441,7 +24471,7 @@ const traverse = (root, visitor, options = {}) => {
24441
24471
  nodePredicate: options.nodePredicate ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.isNode,
24442
24472
  nodeCloneFn: options.nodeCloneFn ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.cloneNode,
24443
24473
  detectCycles: options.detectCycles ?? true,
24444
- skipVisited: options.skipVisited ?? false,
24474
+ skipVisited: normalizeSkipVisited(options.skipVisited),
24445
24475
  mutable: options.mutable ?? false,
24446
24476
  mutationFn: options.mutationFn ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.mutateNode
24447
24477
  };
@@ -24473,7 +24503,7 @@ const traverseAsync = async (root, visitor, options = {}) => {
24473
24503
  nodePredicate: options.nodePredicate ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.isNode,
24474
24504
  nodeCloneFn: options.nodeCloneFn ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.cloneNode,
24475
24505
  detectCycles: options.detectCycles ?? true,
24476
- skipVisited: options.skipVisited ?? false,
24506
+ skipVisited: normalizeSkipVisited(options.skipVisited),
24477
24507
  mutable: options.mutable ?? false,
24478
24508
  mutationFn: options.mutationFn ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.mutateNode
24479
24509
  };
@@ -24941,7 +24971,9 @@ mergeVisitors[Symbol.for('nodejs.util.promisify.custom')] = mergeVisitorsAsync;
24941
24971
  * @internal
24942
24972
  */
24943
24973
  function createPathProxy(originalPath, currentNode) {
24944
- return new _Path_mjs__WEBPACK_IMPORTED_MODULE_4__.Path(currentNode, originalPath.parent, originalPath.parentPath, originalPath.key, originalPath.inList);
24974
+ const proxy = new _Path_mjs__WEBPACK_IMPORTED_MODULE_4__.Path(currentNode, originalPath.parent, originalPath.parentPath, originalPath.key, originalPath.inList);
24975
+ proxy.revisited = originalPath.revisited;
24976
+ return proxy;
24945
24977
  }
24946
24978
 
24947
24979
  /***/ }
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.apidomNsJSONSchema202012=t():e.apidomNsJSONSchema202012=t()}(self,()=>(()=>{"use strict";var e={d:(t,s)=>{for(var n in s)e.o(s,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:s[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{$defsVisitor:()=>Xi,$refVisitor:()=>Ui,$vocabularyVisitor:()=>Hi,AllOfVisitor:()=>Wi,AlternatingVisitor:()=>hi,AnyOfVisitor:()=>Ki,BaseSchemaArrayVisitor:()=>Gi,BaseSchemaMapVisitor:()=>zi,DependentRequiredVisitor:()=>so,DependentSchemasVisitor:()=>Qi,FallbackVisitor:()=>Ls,FixedFieldsVisitor:()=>Wn,ItemsVisitor:()=>Zi,JSONSchema202012MediaTypes:()=>m,JSONSchemaElement:()=>co,JSONSchemaVisitor:()=>Bo,LinkDescriptionElement:()=>ao,LinkDescriptionVisitor:()=>Ro,MapVisitor:()=>xr,OneOfVisitor:()=>Yi,ParentSchemaAwareVisitor:()=>br,PatternPropertiesVisitor:()=>to,PatternedFieldsVisitor:()=>gr,PrefixItemsVisitor:()=>qo,PropertiesVisitor:()=>eo,SpecificationVisitor:()=>Xn,Visitor:()=>Js,default:()=>lo,isBooleanJSONSchemaElement:()=>Ho,isJSONSchemaElement:()=>Uo,isLinkDescriptionElement:()=>Go,mediaTypes:()=>f,refract:()=>Yo,refractJSONSchema:()=>Wo,refractLinkDescription:()=>Ko,refractorPluginReplaceEmptyElement:()=>po,specificationObj:()=>Vo});var s={};function n(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]}function r(e){return function t(s){return 0===arguments.length||n(s)?t:e.apply(this,arguments)}}function i(e,t){return t[e<0?t.length+e:e]}e.r(s),e.d(s,{isBooleanJSONSchemaElement:()=>Ho,isJSONSchemaElement:()=>Uo,isLinkDescriptionElement:()=>Go});const o=r(function(e){return i(-1,e)});class c extends AggregateError{constructor(e,t,s){super(e,t,s),this.name=this.constructor.name,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}const a=c;class l extends Error{static[Symbol.hasInstance](e){return super[Symbol.hasInstance](e)||Function.prototype[Symbol.hasInstance].call(a,e)}constructor(e,t){super(e,t),this.name=this.constructor.name,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}const u=l;const h=class extends u{};const d=class extends h{};const p=class extends Array{unknownMediaType="application/octet-stream";filterByFormat(){throw new d("filterByFormat method in MediaTypes class is not yet implemented.")}findBy(){throw new d("findBy method in MediaTypes class is not yet implemented.")}latest(){throw new d("latest method in MediaTypes class is not yet implemented.")}};class m extends p{filterByFormat(e="generic"){const t="generic"===e?"schema;version":e;return this.filter(e=>e.includes(t))}findBy(e="2020-12",t="generic"){const s="generic"===t?`schema;version=${e}`:`schema+${t};version=${e}`;return this.find(e=>e.includes(s))||this.unknownMediaType}latest(e="generic"){return o(this.filterByFormat(e))}}const f=new m("application/schema;version=2020-12","application/schema+json;version=2020-12","application/schema+yaml;version=2020-12");function y(e,t,s){for(var n=0,r=s.length;n<r;)t=e(t,s[n]),n+=1;return t}function g(e){return function t(s,i){switch(arguments.length){case 0:return t;case 1:return n(s)?t:r(function(t){return e(s,t)});default:return n(s)&&n(i)?t:n(s)?r(function(t){return e(t,i)}):n(i)?r(function(t){return e(s,t)}):e(s,i)}}}function x(e,t){return Object.prototype.hasOwnProperty.call(t,e)}var b=Object.prototype.toString;const v=function(){return"[object Arguments]"===b.call(arguments)?function(e){return"[object Arguments]"===b.call(e)}:function(e){return x("callee",e)}}();var S=!{toString:null}.propertyIsEnumerable("toString"),w=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],O=function(){return arguments.propertyIsEnumerable("length")}(),j=function(e,t){for(var s=0;s<e.length;){if(e[s]===t)return!0;s+=1}return!1},k="function"!=typeof Object.keys||O?r(function(e){if(Object(e)!==e)return[];var t,s,n=[],r=O&&v(e);for(t in e)!x(t,e)||r&&"length"===t||(n[n.length]=t);if(S)for(s=w.length-1;s>=0;)x(t=w[s],e)&&!j(n,t)&&(n[n.length]=t),s-=1;return n}):r(function(e){return Object(e)!==e?[]:Object.keys(e)});const E=k;var A=g(function(e,t){return y(function(s,n){return s[n]=e(t[n],n,t),s},{},E(t))});const F=A;const N=r(function(e){return null==e});var I=g(function(e,t){if(0===e.length||N(t))return!1;for(var s=t,n=0;n<e.length;){if(N(s)||!x(e[n],s))return!1;s=s[e[n]],n+=1}return!0});const M=I;var T=g(function(e,t){return M([e],t)});const P=T;function D(e){return function t(s,i,o){switch(arguments.length){case 0:return t;case 1:return n(s)?t:g(function(t,n){return e(s,t,n)});case 2:return n(s)&&n(i)?t:n(s)?g(function(t,s){return e(t,i,s)}):n(i)?g(function(t,n){return e(s,t,n)}):r(function(t){return e(s,i,t)});default:return n(s)&&n(i)&&n(o)?t:n(s)&&n(i)?g(function(t,s){return e(t,s,o)}):n(s)&&n(o)?g(function(t,s){return e(t,i,s)}):n(i)&&n(o)?g(function(t,n){return e(s,t,n)}):n(s)?r(function(t){return e(t,i,o)}):n(i)?r(function(t){return e(s,t,o)}):n(o)?r(function(t){return e(s,i,t)}):e(s,i,o)}}}const C=Number.isInteger||function(e){return(e|0)===e};const $=function(e,t){if(null!=t)return C(e)?i(e,t):t[e]};const J=g($);const L=D(function(e,t,s){return e(J(t,s))});function _(e,t){for(var s=t,n=0;n<e.length;n+=1){if(null==s)return;var r=e[n];s=C(r)?i(r,s):s[r]}return s}const B=g(_);function q(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(e){return t.apply(this,arguments)};case 2:return function(e,s){return t.apply(this,arguments)};case 3:return function(e,s,n){return t.apply(this,arguments)};case 4:return function(e,s,n,r){return t.apply(this,arguments)};case 5:return function(e,s,n,r,i){return t.apply(this,arguments)};case 6:return function(e,s,n,r,i,o){return t.apply(this,arguments)};case 7:return function(e,s,n,r,i,o,c){return t.apply(this,arguments)};case 8:return function(e,s,n,r,i,o,c,a){return t.apply(this,arguments)};case 9:return function(e,s,n,r,i,o,c,a,l){return t.apply(this,arguments)};case 10:return function(e,s,n,r,i,o,c,a,l,u){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}function R(e,t){return function(){return t.call(this,e.apply(this,arguments))}}const V=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)};function H(e){return"[object String]"===Object.prototype.toString.call(e)}const U=r(function(e){return!!V(e)||!!e&&("object"==typeof e&&(!H(e)&&(0===e.length||e.length>0&&(e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1)))))});var G="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";function z(e,t,s){return function(n,r,i){if(U(i))return e(n,r,i);if(null==i)return r;if("function"==typeof i["fantasy-land/reduce"])return t(n,r,i,"fantasy-land/reduce");if(null!=i[G])return s(n,r,i[G]());if("function"==typeof i.next)return s(n,r,i);if("function"==typeof i.reduce)return t(n,r,i,"reduce");throw new TypeError("reduce: list must be array or iterable")}}function X(e,t,s){for(var n=0,r=s.length;n<r;){if((t=e["@@transducer/step"](t,s[n]))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}n+=1}return e["@@transducer/result"](t)}var W=g(function(e,t){return q(e.length,function(){return e.apply(t,arguments)})});const K=W;function Y(e,t,s){for(var n=s.next();!n.done;){if((t=e["@@transducer/step"](t,n.value))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}n=s.next()}return e["@@transducer/result"](t)}function Q(e,t,s,n){return e["@@transducer/result"](s[n](K(e["@@transducer/step"],e),t))}const Z=z(X,Q,Y);var ee=function(){function e(e){this.f=e}return e.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(e){return e},e.prototype["@@transducer/step"]=function(e,t){return this.f(e,t)},e}();const te=D(function(e,t,s){return Z("function"==typeof e?new ee(e):e,t,s)});function se(e,t){return function(){var s=arguments.length;if(0===s)return t();var n=arguments[s-1];return V(n)||"function"!=typeof n[e]?t.apply(this,arguments):n[e].apply(n,Array.prototype.slice.call(arguments,0,s-1))}}const ne=D(se("slice",function(e,t,s){return Array.prototype.slice.call(s,e,t)}));const re=r(se("tail",ne(1,1/0)));function ie(){if(0===arguments.length)throw new Error("pipe requires at least one argument");return q(arguments[0].length,te(R,arguments[0],re(arguments)))}const oe=r(function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)});const ce="function"==typeof Object.is?Object.is:function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};var ae=function(e,t){switch(arguments.length){case 0:return ae;case 1:return function t(s){return 0===arguments.length?t:ce(e,s)};default:return ce(e,t)}};const le=ae;function ue(e){for(var t,s=[];!(t=e.next()).done;)s.push(t.value);return s}function he(e,t,s){for(var n=0,r=s.length;n<r;){if(e(t,s[n]))return!0;n+=1}return!1}function de(e,t,s,n){var r=ue(e);function i(e,t){return pe(e,t,s.slice(),n.slice())}return!he(function(e,t){return!he(i,t,e)},ue(t),r)}function pe(e,t,s,n){if(ce(e,t))return!0;var r=oe(e);if(r!==oe(t))return!1;if("function"==typeof e["fantasy-land/equals"]||"function"==typeof t["fantasy-land/equals"])return"function"==typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](t)&&"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](e);if("function"==typeof e.equals||"function"==typeof t.equals)return"function"==typeof e.equals&&e.equals(t)&&"function"==typeof t.equals&&t.equals(e);switch(r){case"Arguments":case"Array":case"Object":if("function"==typeof e.constructor&&"Promise"===function(e){var t=String(e).match(/^function (\w*)/);return null==t?"":t[1]}(e.constructor))return e===t;break;case"Boolean":case"Number":case"String":if(typeof e!=typeof t||!ce(e.valueOf(),t.valueOf()))return!1;break;case"Date":if(!ce(e.valueOf(),t.valueOf()))return!1;break;case"Error":return e.name===t.name&&e.message===t.message;case"RegExp":if(e.source!==t.source||e.global!==t.global||e.ignoreCase!==t.ignoreCase||e.multiline!==t.multiline||e.sticky!==t.sticky||e.unicode!==t.unicode)return!1}for(var i=s.length-1;i>=0;){if(s[i]===e)return n[i]===t;i-=1}switch(r){case"Map":return e.size===t.size&&de(e.entries(),t.entries(),s.concat([e]),n.concat([t]));case"Set":return e.size===t.size&&de(e.values(),t.values(),s.concat([e]),n.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var o=E(e);if(o.length!==E(t).length)return!1;var c=s.concat([e]),a=n.concat([t]);for(i=o.length-1;i>=0;){var l=o[i];if(!x(l,t)||!pe(t[l],e[l],c,a))return!1;i-=1}return!0}const me=g(function(e,t){return pe(e,t,[],[])});function fe(e,t){return function(e,t,s){var n,r;if("function"==typeof e.indexOf)switch(typeof t){case"number":if(0===t){for(n=1/t;s<e.length;){if(0===(r=e[s])&&1/r===n)return s;s+=1}return-1}if(t!=t){for(;s<e.length;){if("number"==typeof(r=e[s])&&r!=r)return s;s+=1}return-1}return e.indexOf(t,s);case"string":case"boolean":case"function":case"undefined":return e.indexOf(t,s);case"object":if(null===t)return e.indexOf(t,s)}for(;s<e.length;){if(me(e[s],t))return s;s+=1}return-1}(t,e,0)>=0}function ye(e,t){for(var s=0,n=t.length,r=Array(n);s<n;)r[s]=e(t[s]),s+=1;return r}function ge(e){return'"'+e.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0").replace(/"/g,'\\"')+'"'}var xe=function(e){return(e<10?"0":"")+e};const be="function"==typeof Date.prototype.toISOString?function(e){return e.toISOString()}:function(e){return e.getUTCFullYear()+"-"+xe(e.getUTCMonth()+1)+"-"+xe(e.getUTCDate())+"T"+xe(e.getUTCHours())+":"+xe(e.getUTCMinutes())+":"+xe(e.getUTCSeconds())+"."+(e.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"};function ve(e,t,s){return function(){if(0===arguments.length)return s();var n=arguments[arguments.length-1];if(!V(n)){for(var r=0;r<e.length;){if("function"==typeof n[e[r]])return n[e[r]].apply(n,Array.prototype.slice.call(arguments,0,-1));r+=1}if(function(e){return null!=e&&"function"==typeof e["@@transducer/step"]}(n))return t.apply(null,Array.prototype.slice.call(arguments,0,-1))(n)}return s.apply(this,arguments)}}function Se(e){return"[object Object]"===Object.prototype.toString.call(e)}const we=function(){return this.xf["@@transducer/init"]()},Oe=function(e){return this.xf["@@transducer/result"](e)};var je=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=we,e.prototype["@@transducer/result"]=Oe,e.prototype["@@transducer/step"]=function(e,t){return this.f(t)?this.xf["@@transducer/step"](e,t):e},e}();function ke(e){return function(t){return new je(e,t)}}var Ee=g(ve(["fantasy-land/filter","filter"],ke,function(e,t){return Se(t)?y(function(s,n){return e(t[n])&&(s[n]=t[n]),s},{},E(t)):(s=t,"[object Map]"===Object.prototype.toString.call(s)?function(e,t){for(var s=new Map,n=t.entries(),r=n.next();!r.done;)e(r.value[1])&&s.set(r.value[0],r.value[1]),r=n.next();return s}(e,t):function(e,t){for(var s=0,n=t.length,r=[];s<n;)e(t[s])&&(r[r.length]=t[s]),s+=1;return r}(e,t));var s}));const Ae=Ee;const Fe=g(function(e,t){return Ae((s=e,function(){return!s.apply(this,arguments)}),t);var s});function Ne(e,t){var s=function(s){var n=t.concat([e]);return fe(s,n)?"<Circular>":Ne(s,n)},n=function(e,t){return ye(function(t){return ge(t)+": "+s(e[t])},t.slice().sort())};switch(Object.prototype.toString.call(e)){case"[object Arguments]":return"(function() { return arguments; }("+ye(s,e).join(", ")+"))";case"[object Array]":return"["+ye(s,e).concat(n(e,Fe(function(e){return/^\d+$/.test(e)},E(e)))).join(", ")+"]";case"[object Boolean]":return"object"==typeof e?"new Boolean("+s(e.valueOf())+")":e.toString();case"[object Date]":return"new Date("+(isNaN(e.valueOf())?s(NaN):ge(be(e)))+")";case"[object Map]":return"new Map("+s(Array.from(e))+")";case"[object Null]":return"null";case"[object Number]":return"object"==typeof e?"new Number("+s(e.valueOf())+")":1/e==-1/0?"-0":e.toString(10);case"[object Set]":return"new Set("+s(Array.from(e).sort())+")";case"[object String]":return"object"==typeof e?"new String("+s(e.valueOf())+")":ge(e);case"[object Undefined]":return"undefined";default:if("function"==typeof e.toString){var r=e.toString();if("[object Object]"!==r)return r}return"{"+n(e,E(e)).join(", ")+"}"}}const Ie=r(function(e){return Ne(e,[])});const Me=D(function(e,t,s){return e(_(t,s))});function Te(e){var t=Object.prototype.toString.call(e);return"[object Function]"===t||"[object AsyncFunction]"===t||"[object GeneratorFunction]"===t||"[object AsyncGeneratorFunction]"===t}const Pe=g(function(e,t){return e&&t});function De(e,t,s){for(var n=s.next();!n.done;)t=e(t,n.value),n=s.next();return t}function Ce(e,t,s,n){return s[n](e,t)}const $e=z(y,Ce,De);var Je=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=we,e.prototype["@@transducer/result"]=Oe,e.prototype["@@transducer/step"]=function(e,t){return this.xf["@@transducer/step"](e,this.f(t))},e}();const Le=function(e){return function(t){return new Je(e,t)}};function _e(e,t,s){return function(){for(var r=[],i=0,o=e,c=0,a=!1;c<t.length||i<arguments.length;){var l;c<t.length&&(!n(t[c])||i>=arguments.length)?l=t[c]:(l=arguments[i],i+=1),r[c]=l,n(l)?a=!0:o-=1,c+=1}return!a&&o<=0?s.apply(this,r):q(Math.max(0,o),_e(e,r,s))}}var Be=g(function(e,t){return 1===e?r(t):q(e,_e(e,[],t))});const qe=Be;var Re=g(ve(["fantasy-land/map","map"],Le,function(e,t){switch(Object.prototype.toString.call(t)){case"[object Function]":return qe(t.length,function(){return e.call(this,t.apply(this,arguments))});case"[object Object]":return y(function(s,n){return s[n]=e(t[n]),s},{},E(t));default:return ye(e,t)}}));const Ve=Re;const He=g(function(e,t){return"function"==typeof t["fantasy-land/ap"]?t["fantasy-land/ap"](e):"function"==typeof e.ap?e.ap(t):"function"==typeof e?function(s){return e(s)(t(s))}:$e(function(e,s){return function(e,t){var s;t=t||[];var n=(e=e||[]).length,r=t.length,i=[];for(s=0;s<n;)i[i.length]=e[s],s+=1;for(s=0;s<r;)i[i.length]=t[s],s+=1;return i}(e,Ve(s,t))},[],e)});var Ue=g(function(e,t){var s=qe(e,t);return qe(e,function(){return y(He,Ve(s,arguments[0]),Array.prototype.slice.call(arguments,1))})});const Ge=Ue;var ze=r(function(e){return Ge(e.length,e)});const Xe=ze;const We=g(function(e,t){return Te(e)?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:Xe(Pe)(e,t)});const Ke=me(null);const Ye=Xe(r(function(e){return!e}));const Qe=Ye(Ke);function Ze(e){return Ze="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ze(e)}const et=function(e){return"object"===Ze(e)};const tt=qe(1,We(Qe,et));const st=g(function(e,t){if(e===t)return t;function s(e,t){if(e>t!=t>e)return t>e?t:e}var n=s(e,t);if(void 0!==n)return n;var r=s(typeof e,typeof t);if(void 0!==r)return r===typeof e?e:t;var i=Ie(e),o=s(i,Ie(t));return void 0!==o&&o===i?e:t});const nt=g(function(e,t){return Ve(J(e),t)});const rt=r(function(e){return qe(te(st,0,nt("length",e)),function(){for(var t=0,s=e.length;t<s;){if(e[t].apply(this,arguments))return!0;t+=1}return!1})});const it=qe(1,ie(oe,le("GeneratorFunction")));const ot=qe(1,ie(oe,le("AsyncFunction")));const ct=rt([ie(oe,le("Function")),it,ot]);var at=ie(oe,le("Object")),lt=ie(Ie,me(Ie(Object))),ut=Me(We(ct,lt),["constructor"]);const ht=qe(1,function(e){if(!tt(e)||!at(e))return!1;var t=Object.getPrototypeOf(e);return!!Ke(t)||ut(t)});const dt=qe(1,ie(oe,le("String")));var pt=r(function(e){return qe(e.length,e)});const mt=pt;const ft=g(function(e,t){return qe(e+1,function(){var s=arguments[e];if(null!=s&&Te(s[t]))return s[t].apply(s,Array.prototype.slice.call(arguments,0,e));throw new TypeError(Ie(s)+' does not have a method named "'+t+'"')})});const yt=ft(1,"split");var gt=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=we,e.prototype["@@transducer/result"]=Oe,e.prototype["@@transducer/step"]=function(e,t){if(this.f){if(this.f(t))return e;this.f=null}return this.xf["@@transducer/step"](e,t)},e}();function xt(e){return function(t){return new gt(e,t)}}const bt=g(ve(["dropWhile"],xt,function(e,t){for(var s=0,n=t.length;s<n&&e(t[s]);)s+=1;return ne(s,1/0,t)}));const vt=ft(1,"join");var St=r(function(e){return qe(e.length,function(t,s){var n=Array.prototype.slice.call(arguments,0);return n[0]=s,n[1]=t,e.apply(this,n)})});const wt=St(g(fe));const Ot=mt(function(e,t){return ie(yt(""),bt(wt(e)),vt(""))(t)}),jt=new WeakMap,kt=e=>{if(jt.has(e))return jt.get(e);const t={},s=(e,n,r)=>("string"==typeof e.element&&(t[e.element]=e.$visitor?[...r,"$visitor"]:r),F((e,t)=>{const i=[...r,t];if(ht(e)&&P("$ref",e)&&L(dt,"$ref",e)){const t=B(["$ref"],e),s=Ot("#/",t),r=B(s.split("/"),n),{$ref:i,...o}=e;return Object.keys(o).length>0&&ht(r)?{...r,...o}:r}return ht(e)?s(e,n,i):e},e)),n=s(e,e,[]);return n.elementMap=t,jt.set(e,n),n};function Et(e,t,s){if(s||(s=new At),function(e){var t=typeof e;return null==e||"object"!=t&&"function"!=t}(e))return e;var n,r=function(n){var r=s.get(e);if(r)return r;for(var i in s.set(e,n),e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=t?Et(e[i],!0,s):e[i]);return n};switch(oe(e)){case"Object":return r(Object.create(Object.getPrototypeOf(e)));case"Array":return r(Array(e.length));case"Date":return new Date(e.valueOf());case"RegExp":return n=e,new RegExp(n.source,n.flags?n.flags:(n.global?"g":"")+(n.ignoreCase?"i":"")+(n.multiline?"m":"")+(n.sticky?"y":"")+(n.unicode?"u":"")+(n.dotAll?"s":""));case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":return e.slice();default:return e}}var At=function(){function e(){this.map={},this.length=0}return e.prototype.set=function(e,t){var s=this.hash(e),n=this.map[s];n||(this.map[s]=n=[]),n.push([e,t]),this.length+=1},e.prototype.hash=function(e){var t=[];for(var s in e)t.push(Object.prototype.toString.call(e[s]));return t.join()},e.prototype.get=function(e){if(this.length<=180)for(var t in this.map)for(var s=this.map[t],n=0;n<s.length;n+=1){if((i=s[n])[0]===e)return i[1]}else{var r=this.hash(e);if(s=this.map[r])for(n=0;n<s.length;n+=1){var i;if((i=s[n])[0]===e)return i[1]}}},e}();const Ft=r(function(e){return null!=e&&"function"==typeof e.clone?e.clone():Et(e,!0)});class Nt{get(e){return this[e]}set(e,t){this[e]=t}hasKey(e){return Object.hasOwn(this,e)}keys(){return Object.keys(this)}remove(e){delete this[e]}get isEmpty(){return 0===Object.keys(this).length}get isFrozen(){return Object.isFrozen(this)}freeze(){for(const e of Object.values(this))e instanceof this.Element?e.freeze():(Array.isArray(e)||null!==e&&"object"==typeof e)&&Object.freeze(e);Object.freeze(this)}cloneShallow(){const e=new Nt;return Object.assign(e,this),e}merge(e){const t=this.cloneShallow();for(const[s,n]of Object.entries(e)){const e=t.get(s);Array.isArray(e)&&Array.isArray(n)?t.set(s,[...e,...n]):t.set(s,n)}return t}cloneDeep(){const e=new Nt;for(const[t,s]of Object.entries(this))s instanceof this.Element?e.set(t,this.cloneDeepElement(s)):e.set(t,Ft(s));return e}}const It=Nt;const Mt=class{key;value;constructor(e,t){this.key=e,this.value=t}toValue(){return{key:this.key?.toValue(),value:this.value?.toValue()}}};class Tt{elements;constructor(e){this.elements=e??[]}toValue(){return this.elements.map(e=>({key:e.key?.toValue(),value:e.value?.toValue()}))}map(e,t){return this.elements.map(s=>{const n=s.value,r=s.key;if(void 0===n||void 0===r)throw new Error("MemberElement must have both key and value");return void 0!==t?e.call(t,n,r,s):e(n,r,s)})}filter(e,t){const s=this.elements.filter(s=>{const n=s.value,r=s.key;return void 0!==n&&void 0!==r&&(void 0!==t?e.call(t,n,r,s):e(n,r,s))});return new Tt(s)}reject(e,t){const s=[];for(const n of this.elements){const r=n.value,i=n.key;void 0!==r&&void 0!==i&&(e.call(t,r,i,n)||s.push(n))}return new Tt(s)}forEach(e,t){this.elements.forEach((s,n)=>{const r=s.value,i=s.key;void 0!==r&&void 0!==i&&(void 0!==t?e.call(t,r,i,s,n):e(r,i,s,n))})}find(e,t){return this.elements.find(s=>{const n=s.value,r=s.key;return void 0!==n&&void 0!==r&&(void 0!==t?e.call(t,n,r,s):e(n,r,s))})}keys(){return this.elements.map(e=>e.key?.toValue()).filter(e=>void 0!==e)}values(){return this.elements.map(e=>e.value?.toValue()).filter(e=>void 0!==e)}get length(){return this.elements.length}get isEmpty(){return 0===this.length}get first(){return this.elements[0]}get(e){return this.elements[e]}push(e){return this.elements.push(e),this}includesKey(e){return this.elements.some(t=>t.key?.equals(e))}[Symbol.iterator](){return this.elements[Symbol.iterator]()}}const Pt=Tt,Dt=Object.freeze(new It);class Ct{parent;style;startLine;startCharacter;startOffset;endLine;endCharacter;endOffset;_storedElement="element";_content;_meta;_attributes;constructor(e,t,s){void 0!==t&&(this.meta=t),void 0!==s&&(this.attributes=s),void 0!==e&&(this.content=e)}get element(){return this._storedElement}set element(e){this._storedElement=e}get content(){return this._content}set content(e){if(e instanceof Ct)this._content=e;else if(null!=e&&"string"!=typeof e&&"number"!=typeof e&&"boolean"!=typeof e&&"bigint"!=typeof e&&"symbol"!=typeof e)if(e instanceof Mt)this._content=e;else if(e instanceof Pt)this._content=e.elements;else if(Array.isArray(e))this._content=e.map(e=>this.refract(e));else{if("object"!=typeof e)throw new Error("Cannot set content to value of type "+typeof e);this._content=Object.entries(e).map(([e,t])=>new this.MemberElement(e,t))}else this._content=e}get meta(){if(!this._meta){if(this.isFrozen)return Dt;this._meta=new It}return this._meta}set meta(e){if(e instanceof It)this._meta=e;else if(e&&"object"==typeof e){const t=new It;Object.assign(t,e),this._meta=t}}get attributes(){if(!this._attributes){if(this.isFrozen){const e=new this.ObjectElement;return e.freeze(),e}this._attributes=new this.ObjectElement}return this._attributes}set attributes(e){e instanceof Ct?this._attributes=e:this.attributes.set(e??{})}get id(){if(!this.hasMetaProperty("id")){if(this.isFrozen)return"";this.setMetaProperty("id","")}return this.meta.get("id")}set id(e){this.setMetaProperty("id",e)}get classes(){if(!this.hasMetaProperty("classes")){if(this.isFrozen)return[];this.setMetaProperty("classes",[])}return this.meta.get("classes")}set classes(e){this.setMetaProperty("classes",e)}get links(){if(!this.hasMetaProperty("links")){if(this.isFrozen){const e=new this.ArrayElement;return e.freeze(),e}this.setMetaProperty("links",new this.ArrayElement)}return this.meta.get("links")}set links(e){this.setMetaProperty("links",e)}get children(){const{_content:e}=this;if(Array.isArray(e))return e;if(e instanceof Mt){const t=[];return e.key&&t.push(e.key),e.value&&t.push(e.value),t}return e instanceof Ct?[e]:[]}get isFrozen(){return Object.isFrozen(this)}freeze(){if(!this.isFrozen){this._meta&&this._meta.freeze(),this._attributes&&(this._attributes.parent=this,this._attributes.freeze());for(const e of this.children)e.parent=this,e.freeze();Array.isArray(this._content)&&Object.freeze(this._content),Object.freeze(this)}}toValue(){const{_content:e}=this;return e instanceof Ct||e instanceof Mt?e.toValue():Array.isArray(e)?e.map(e=>e.toValue()):e}equals(e){const t=e instanceof Ct?e.toValue():e;return me(this.toValue(),t)}primitive(){}set(e){return this.content=e,this}toRef(e){const t=this.id;if(""===t)throw new Error("Cannot create reference to an element without an ID");const s=new this.RefElement(t);return"string"==typeof e&&(s.path=this.refract(e)),s}getMetaProperty(e,t){return this.hasMetaProperty(e)?this.meta.get(e):t}setMetaProperty(e,t){this.meta.set(e,t)}hasMetaProperty(e){return void 0!==this._meta&&this._meta.hasKey(e)}get isMetaEmpty(){return void 0===this._meta||this._meta.isEmpty}getAttributesProperty(e,t){if(!this.hasAttributesProperty(e)){if(this.isFrozen){const e=this.refract(t);return e.freeze(),e}this.attributes.set(e,t)}return this.attributes.get(e)}setAttributesProperty(e,t){this.attributes.set(e,t)}hasAttributesProperty(e){return!this.isAttributesEmpty&&this.attributes.hasKey(e)}get isAttributesEmpty(){return void 0===this._attributes||this.attributes.isEmpty}}const $t=Ct;class Jt extends $t{constructor(e,t,s){super(e||[],t,s)}get length(){return this._content.length}get isEmpty(){return 0===this.length}get first(){return this._content[0]}get second(){return this._content[1]}get last(){return this._content.at(-1)}push(...e){for(const t of e)this._content.push(this.refract(t));return this}shift(){return this._content.shift()}unshift(e){this._content.unshift(this.refract(e))}includes(e){return this._content.some(t=>t.equals(e))}findElements(e,t){const s=t||{},n=!!s.recursive,r=void 0===s.results?[]:s.results;for(let t=0;t<this._content.length;t+=1){const s=this._content[t],i=s;n&&"function"==typeof i.findElements&&i.findElements(e,{results:r,recursive:n}),e(s,t,void 0)&&r.push(s)}return r}find(e){const t=this.findElements(e,{recursive:!0});return new this.ArrayElement(t)}findByElement(e){return this.find(t=>t.element===e)}findByClass(e){return this.find(t=>{const s=t.classes;return"function"==typeof s.includes&&s.includes(e)})}getById(e){return this.find(t=>t.id===e).first}concat(e){return new(0,this.constructor)(this._content.concat(e._content))}[Symbol.iterator](){return this._content[Symbol.iterator]()}}const Lt=Jt;const _t=class extends $t{constructor(e,t,s,n){super(new Mt,s,n),this.element="member",void 0!==e&&(this.key=e),arguments.length>=2&&(this.value=t)}primitive(){return"member"}get key(){return this._content.key}set key(e){this._content.key=this.refract(e)}get value(){return this._content.value}set value(e){this._content.value=void 0===e?void 0:this.refract(e)}};const Bt=class extends Lt{constructor(e,t,s){super(e||[],t,s),this.element="object"}primitive(){return"object"}toValue(){return this._content.reduce((e,t)=>(e[t.key.toValue()]=t.value?t.value.toValue():void 0,e),{})}get(e){const t=this.getMember(e);if(t)return t.value}getValue(e){const t=this.get(e);if(t)return t.toValue()}getMember(e){if(void 0!==e)return this._content.find(t=>t.key.toValue()===e)}remove(e){let t=null;return this.content=this._content.filter(s=>s.key.toValue()!==e||(t=s,!1)),t}getKey(e){const t=this.getMember(e);if(t)return t.key}set(e,t){if("string"==typeof e){const s=this.getMember(e);s?s.value=t:this._content.push(new _t(e,t))}else if("object"==typeof e&&!Array.isArray(e))for(const t of Object.keys(e))this.set(t,e[t]);return this}keys(){return this._content.map(e=>e.key.toValue())}values(){return this._content.map(e=>e.value.toValue())}hasKey(e){return this._content.some(t=>t.key.equals(e))}items(){return this._content.map(e=>[e.key.toValue(),e.value.toValue()])}map(e,t){return this._content.map(s=>e.call(t,s.value,s.key,s))}compactMap(e,t){const s=[];return this.forEach((n,r,i)=>{const o=e.call(t,n,r,i);o&&s.push(o)}),s}filter(e,t){return new Pt(this._content).filter(e,t)}reject(e,t){const s=[];for(const n of this._content)e.call(t,n.value,n.key,n)||s.push(n);return new Pt(s)}forEach(e,t){this._content.forEach(s=>e.call(t,s.value,s.key,s))}reduce(e,t){let s,n;void 0!==t?(s=0,n=this.refract(t)):(s=1,n=this._content[0]?.value);for(let t=s;t<this._content.length;t+=1){const s=this._content[t],r=e(n,s.value,s.key,s,this);n=void 0===r?r:this.refract(r)}return n}empty(){return new this.constructor([])}};const qt=class extends Bt{constructor(e,t,s){super(e,t,s),this.element="JSONSchemaDraft4"}get idField(){return this.get("id")}set idField(e){this.set("id",e)}get $schema(){return this.get("$schema")}set $schema(e){this.set("$schema",e)}get multipleOf(){return this.get("multipleOf")}set multipleOf(e){this.set("multipleOf",e)}get maximum(){return this.get("maximum")}set maximum(e){this.set("maximum",e)}get exclusiveMaximum(){return this.get("exclusiveMaximum")}set exclusiveMaximum(e){this.set("exclusiveMaximum",e)}get minimum(){return this.get("minimum")}set minimum(e){this.set("minimum",e)}get exclusiveMinimum(){return this.get("exclusiveMinimum")}set exclusiveMinimum(e){this.set("exclusiveMinimum",e)}get maxLength(){return this.get("maxLength")}set maxLength(e){this.set("maxLength",e)}get minLength(){return this.get("minLength")}set minLength(e){this.set("minLength",e)}get pattern(){return this.get("pattern")}set pattern(e){this.set("pattern",e)}get additionalItems(){return this.get("additionalItems")}set additionalItems(e){this.set("additionalItems",e)}get itemsField(){return this.get("items")}set itemsField(e){this.set("items",e)}get maxItems(){return this.get("maxItems")}set maxItems(e){this.set("maxItems",e)}get minItems(){return this.get("minItems")}set minItems(e){this.set("minItems",e)}get uniqueItems(){return this.get("uniqueItems")}set uniqueItems(e){this.set("uniqueItems",e)}get maxProperties(){return this.get("maxProperties")}set maxProperties(e){this.set("maxProperties",e)}get minProperties(){return this.get("minProperties")}set minProperties(e){this.set("minProperties",e)}get required(){return this.get("required")}set required(e){this.set("required",e)}get properties(){return this.get("properties")}set properties(e){this.set("properties",e)}get additionalProperties(){return this.get("additionalProperties")}set additionalProperties(e){this.set("additionalProperties",e)}get patternProperties(){return this.get("patternProperties")}set patternProperties(e){this.set("patternProperties",e)}get dependencies(){return this.get("dependencies")}set dependencies(e){this.set("dependencies",e)}get enum(){return this.get("enum")}set enum(e){this.set("enum",e)}get type(){return this.get("type")}set type(e){this.set("type",e)}get allOf(){return this.get("allOf")}set allOf(e){this.set("allOf",e)}get anyOf(){return this.get("anyOf")}set anyOf(e){this.set("anyOf",e)}get oneOf(){return this.get("oneOf")}set oneOf(e){this.set("oneOf",e)}get not(){return this.get("not")}set not(e){this.set("not",e)}get definitions(){return this.get("definitions")}set definitions(e){this.set("definitions",e)}get title(){return this.get("title")}set title(e){this.set("title",e)}get description(){return this.get("description")}set description(e){this.set("description",e)}get default(){return this.get("default")}set default(e){this.set("default",e)}get format(){return this.get("format")}set format(e){this.set("format",e)}get base(){return this.get("base")}set base(e){this.set("base",e)}get linksField(){return this.get("links")}set linksField(e){this.set("links",e)}get media(){return this.get("media")}set media(e){this.set("media",e)}get readOnly(){return this.get("readOnly")}set readOnly(e){this.set("readOnly",e)}};const Rt=class extends Bt{constructor(e,t,s){super(e,t,s),this.element="JSONReference",this.classes.push("json-reference")}get $ref(){return this.get("$ref")}set $ref(e){this.set("$ref",e)}};const Vt=class extends Bt{constructor(e,t,s){super(e,t,s),this.element="media"}get binaryEncoding(){return this.get("binaryEncoding")}set binaryEncoding(e){this.set("binaryEncoding",e)}get type(){return this.get("type")}set type(e){this.set("type",e)}};const Ht=class extends Bt{constructor(e,t,s){super(e,t,s),this.element="linkDescription"}get href(){return this.get("href")}set href(e){this.set("href",e)}get rel(){return this.get("rel")}set rel(e){this.set("rel",e)}get title(){return this.get("title")}set title(e){this.set("title",e)}get targetSchema(){return this.get("targetSchema")}set targetSchema(e){this.set("targetSchema",e)}get mediaType(){return this.get("mediaType")}set mediaType(e){this.set("mediaType",e)}get method(){return this.get("method")}set method(e){this.set("method",e)}get encType(){return this.get("encType")}set encType(e){this.set("encType",e)}get schema(){return this.get("schema")}set schema(e){this.set("schema",e)}};const Ut=class extends $t{constructor(e,t,s){super(e,t,s),this.element="string"}primitive(){return"string"}get length(){return this.content?.length??0}};const Gt=class extends $t{constructor(e,t,s){super(e,t,s),this.element="number"}primitive(){return"number"}};const zt=class extends $t{constructor(e,t,s){super(e??null,t,s),this.element="null"}primitive(){return"null"}set(e){throw new Error("Cannot set the value of null")}};const Xt=class extends $t{constructor(e,t,s){super(e,t,s),this.element="boolean"}primitive(){return"boolean"}};const Wt=class extends Lt{constructor(e,t,s){super(e||[],t,s),this.element="array"}primitive(){return"array"}get(e){return this._content[e]}getValue(e){const t=this.get(e);if(t)return t.toValue()}set(e,t){return"number"==typeof e&&void 0!==t?this._content[e]=this.refract(t):this.content=e,this}remove(e){return this._content.splice(e,1)[0]??null}map(e,t){return this._content.map(e,t)}flatMap(e,t){return this._content.flatMap(e,t)}compactMap(e,t){const s=[];for(const n of this._content){const r=e.call(t,n);r&&s.push(r)}return s}filter(e,t){const s=this._content.filter(e,t);return new this.constructor(s)}reject(e,t){const s=[];for(const n of this._content)e.call(t,n)||s.push(n);return new this.constructor(s)}reduce(e,t){let s,n;void 0!==t?(s=0,n=this.refract(t)):(s=1,n=this.first);for(let t=s;t<this.length;t+=1){const s=e(n,this._content[t],t,this);n=void 0===s?s:this.refract(s)}return n}forEach(e,t){this._content.forEach((s,n)=>{e.call(t,s,n)})}empty(){return new this.constructor([])}},Kt=e=>e instanceof $t,Yt=e=>e instanceof Ut,Qt=e=>e instanceof Gt,Zt=e=>e instanceof zt,es=e=>e instanceof Xt,ts=e=>e instanceof Wt,ss=e=>e instanceof Bt,ns=e=>e instanceof _t,rs=e=>void 0!==e.style,is=e=>"number"==typeof e.startLine&&"number"==typeof e.startCharacter&&"number"==typeof e.startOffset&&"number"==typeof e.endLine&&"number"==typeof e.endCharacter&&"number"==typeof e.endOffset,os=(e,t)=>0===t.length||!!Kt(e)&&(!e.isMetaEmpty&&(!!e.hasMetaProperty("classes")&&t.every(t=>e.classes.includes(t))));class cs extends Ut{constructor(e,t,s){super(e,t,s),this.element="sourceMap"}static transfer(e,t){t.startLine=e.startLine,t.startCharacter=e.startCharacter,t.startOffset=e.startOffset,t.endLine=e.endLine,t.endCharacter=e.endCharacter,t.endOffset=e.endOffset}static from(e){const{startLine:t,startCharacter:s,startOffset:n,endLine:r,endCharacter:i,endOffset:o}=e;if("number"!=typeof t||"number"!=typeof s||"number"!=typeof n||"number"!=typeof r||"number"!=typeof i||"number"!=typeof o)return;const c="sm1:"+[t,s,n,r,i,o].map(ls).join("");const a=new cs(c);return a.startLine=t,a.startCharacter=s,a.startOffset=n,a.endLine=r,a.endCharacter=i,a.endOffset=o,a}applyTo(e){this.content&&([e.startLine,e.startCharacter,e.startOffset,e.endLine,e.endCharacter,e.endOffset]=function(e){const t=e.startsWith("sm1:")?e.slice(4):e,s=[];let n=0;for(let e=0;e<6;e++){const e=us(t,n);s.push(e.value),n=e.next}return s}(this.content))}}const as="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function ls(e){let t=e>>>0,s="";do{let e=31&t;t>>>=5,0!==t&&(e|=32),s+=as[e]}while(0!==t);return s}function us(e,t=0){let s=0,n=0,r=t;for(;;){const t=e[r++],i=as.indexOf(t);if(-1===i)throw new Error(`Invalid Base64 VLQ char: ${t}`);if(s|=(31&i)<<n,n+=5,!!!(32&i))break}return{value:s>>>0,next:r}}const hs=cs;const ds=class extends u{constructor(e,t){if(super(e,t),null!=t&&"object"==typeof t){const{cause:e,...s}=t;Object.assign(this,s)}}};const ps=class extends ds{value;constructor(e,t){super(e,t),void 0!==t&&(this.value=t.value)}};const ms=class extends ps{};const fs=class extends ps{},ys=(e,t)=>{const{visited:s=new WeakMap}=t,n={...t,visited:s};if(s.has(e))return s.get(e);const r=vs(e);s.set(e,r);const{content:i}=e;return Array.isArray(i)?r.content=i.map(e=>ys(e,n)):Kt(i)?r.content=ys(i,n):r.content=i instanceof Mt?gs(i,n):i,r},gs=(e,t)=>{const{visited:s=new WeakMap}=t,n={...t,visited:s};if(s.has(e))return s.get(e);const{key:r,value:i}=e,o=void 0!==r?ys(r,n):void 0,c=void 0!==i?ys(i,n):void 0,a=new Mt(o,c);return s.set(e,a),a},xs=(e,t={})=>{if(e instanceof Mt)return gs(e,t);if(e instanceof Pt)return((e,t)=>{const{visited:s=new WeakMap}=t,n={...t,visited:s};if(s.has(e))return s.get(e);const r=[...e].map(e=>ys(e,n)),i=new Pt(r);return s.set(e,i),i})(e,t);if(Kt(e))return ys(e,t);throw new ms("Value provided to cloneDeep function couldn't be cloned",{value:e})};xs.safe=e=>{try{return xs(e)}catch{return e}};const bs=e=>{const{key:t,value:s}=e;return new Mt(t,s)},vs=e=>{const t=new(0,e.constructor);t.element=e.element,e.isMetaEmpty||(t.meta=e.meta.cloneDeep()),e.isAttributesEmpty||(t.attributes=xs(e.attributes)),is(e)&&hs.transfer(e,t),rs(e)&&(t.style=Ft(e.style));const{content:s}=e;return Kt(s)?t.content=vs(s):Array.isArray(s)?t.content=[...s]:t.content=s instanceof Mt?bs(s):s,t},Ss=e=>{if(e instanceof Mt)return bs(e);if(e instanceof Pt)return(e=>{const t=[...e];return new Pt(t)})(e);if(Kt(e))return vs(e);throw new fs("Value provided to cloneShallow function couldn't be cloned",{value:e})};Ss.safe=e=>{try{return Ss(e)}catch{return e}};const ws=class extends $t{constructor(e,t,s){super(e||[],t,s),this.element="link"}get relation(){if(this.hasAttributesProperty("relation"))return this.attributes.get("relation")}set relation(e){this.attributes.set("relation",e)}get href(){if(this.hasAttributesProperty("href"))return this.attributes.get("href")}set href(e){this.attributes.set("href",e)}};const Os=class extends $t{constructor(e,t,s){super(e||[],t,s),this.element="ref",this.path||(this.path="element")}get path(){if(this.hasAttributesProperty("path"))return this.attributes.get("path")}set path(e){this.attributes.set("path",e)}};const js=class extends Ut{constructor(e,t,s){super(e,t,s),this.element="annotation"}get code(){if(this.hasAttributesProperty("code"))return this.attributes.get("code")}set code(e){this.attributes.set("code",e)}};const ks=class extends Ut{constructor(e,t,s){super(e,t,s),this.element="comment"}};const Es=class extends Wt{constructor(e,t,s){super(e,t,s),this.element="parseResult"}get api(){return this.filter(e=>os(e,["api"])).first}get results(){return this.filter(e=>os(e,["result"]))}get result(){return this.results.first}get annotations(){return this.filter(e=>"annotation"===e.element)}get warnings(){return this.filter(e=>"annotation"===e.element&&os(e,["warning"]))}get errors(){return this.filter(e=>"annotation"===e.element&&os(e,["error"]))}get isEmpty(){return 0===this.reject(e=>"annotation"===e.element).length}replaceResult(e){const{result:t}=this;if(void 0===t)return!1;const s=this._content,n=s.findIndex(e=>e===t);return-1!==n&&(s[n]=e,!0)}},As=e=>e instanceof ws,Fs=e=>e instanceof Os,Ns=e=>{if(!Kt(e))return e;if(Yt(e)||Qt(e)||es(e)||Zt(e))return e.toValue();const t=new WeakMap,s=e=>{if(!Kt(e))return e;if(ss(e)){if(t.has(e))return t.get(e);const n={};return t.set(e,n),e.forEach((e,t)=>{const r=s(t),i=s(e);"string"==typeof r&&(n[r]=i)}),n}if(ts(e)){if(t.has(e))return t.get(e);const n=[];return t.set(e,n),e.forEach(e=>n.push(s(e))),n}return Fs(e)?String(e.toValue()):As(e)?Yt(e.href)?e.href.toValue():"":e.toValue()};return s(e)},Is=e=>{const t=e.isMetaEmpty?void 0:e.meta.cloneDeep(),s=e.isAttributesEmpty?void 0:xs(e.attributes);return new e.constructor(void 0,t,s)},Ms=(e,t)=>t.clone&&t.isMergeableElement(e)?Ps(Is(e),e,t):e,Ts={clone:!0,isMergeableElement:e=>ss(e)||ts(e),arrayElementMerge:(e,t,s)=>new(0,e.constructor)(e.concat(t).map(e=>Ms(e,s))),objectElementMerge:(e,t,s)=>{const n=ss(e)?Is(e):Is(t);return ss(e)&&e.forEach((e,t,r)=>{const i=Ss(r);i.value=Ms(e,s),n.content.push(i)}),t.forEach((t,r,i)=>{const o=Ns(r);let c;if(ss(e)&&e.hasKey(o)&&s.isMergeableElement(t)){const n=e.get(o);c=Ss(i),c.value=((e,t)=>{if("function"!=typeof t.customMerge)return Ps;const s=t.customMerge(e,t);return"function"==typeof s?s:Ps})(r,s)(n,t,s)}else c=Ss(i),c.value=Ms(t,s);n.remove(o),n.content.push(c)}),n},customMerge:void 0,customMetaMerge:void 0,customAttributesMerge:void 0},Ps=(e,t,s)=>{const n={...Ts,...s};n.isMergeableElement=n.isMergeableElement??Ts.isMergeableElement,n.arrayElementMerge=n.arrayElementMerge??Ts.arrayElementMerge,n.objectElementMerge=n.objectElementMerge??Ts.objectElementMerge;const r=ts(t);if(!(r===ts(e)))return Ms(t,n);const i=r&&"function"==typeof n.arrayElementMerge?n.arrayElementMerge(e,t,n):n.objectElementMerge(e,t,n);return e.isMetaEmpty||t.isMetaEmpty?e.isMetaEmpty?t.isMetaEmpty||(i.meta=t.meta.cloneDeep()):i.meta=e.meta.cloneDeep():i.meta=(e=>"function"!=typeof e.customMetaMerge?e=>e.cloneDeep():e.customMetaMerge)(n)(e.meta,t.meta),e.isAttributesEmpty||t.isAttributesEmpty?e.isAttributesEmpty?t.isAttributesEmpty||(i.attributes=xs(t.attributes)):i.attributes=xs(e.attributes):i.attributes=(e=>"function"!=typeof e.customAttributesMerge?e=>xs(e):e.customAttributesMerge)(n)(e.attributes,t.attributes),i};Ps.all=(e,t)=>{if(!Array.isArray(e))throw new TypeError("First argument of deepmerge should be an array.");return 0===e.length?new Bt:e.reduce((e,s)=>Ps(e,s,t),Is(e[0]))};const Ds=Ps;class Cs extends Bt{constructor(e,t,s){super(e,t,s),this.element="__styles__"}static transfer(e,t){t.style=e.style}static from(e){if(e.style)return new Cs(e.style)}applyTo(e){e.style=this.toValue()}}const $s=Cs;const Js=class{element;consume=!1;consumeSafe=!1;constructor(e){Object.assign(this,e)}copyMetaAndAttributes(e,t){e.isMetaEmpty||t.isMetaEmpty?e.isMetaEmpty||(t.meta=e.meta.cloneDeep()):t.meta=t.meta.merge(e.meta),e.isAttributesEmpty||t.isAttributesEmpty?e.isAttributesEmpty||(t.attributes=xs(e.attributes)):t.attributes=Ds(t.attributes,e.attributes),hs.transfer(e,t),$s.transfer(e,t)}};const Ls=class extends Js{enter(e){this.element=this.consume?e.node:xs(e.node),e.stop()}};const _s=r(function(e){return function(){return e}});const Bs=g(function(e,t){return null==t||t!=t?e:t});const qs=_s(void 0);const Rs=me(qs());const Vs=r(function(e){return qe(te(st,0,nt("length",e)),function(){for(var t=0,s=e.length;t<s;){if(!e[t].apply(this,arguments))return!1;t+=1}return!0})});var Hs=r(function(e){return null!=e&&"function"==typeof e["fantasy-land/empty"]?e["fantasy-land/empty"]():null!=e&&null!=e.constructor&&"function"==typeof e.constructor["fantasy-land/empty"]?e.constructor["fantasy-land/empty"]():null!=e&&"function"==typeof e.empty?e.empty():null!=e&&null!=e.constructor&&"function"==typeof e.constructor.empty?e.constructor.empty():e==Set||e instanceof Set?new Set:e==Map||e instanceof Map?new Map:V(e)?[]:H(e)?"":Se(e)?{}:v(e)?function(){return arguments}():function(e){var t=Object.prototype.toString.call(e);return"[object Uint8ClampedArray]"===t||"[object Int8Array]"===t||"[object Uint8Array]"===t||"[object Int16Array]"===t||"[object Uint16Array]"===t||"[object Int32Array]"===t||"[object Uint32Array]"===t||"[object Float32Array]"===t||"[object Float64Array]"===t||"[object BigInt64Array]"===t||"[object BigUint64Array]"===t}(e)?e.constructor.from(""):void 0});const Us=Hs;const Gs=r(function(e){return null!=e&&me(e,Us(e))});const zs=r(function(e){return!Gs(e)});const Xs=g(function(e,t){return e||t});const Ws=qe(1,We(Qe,g(function(e,t){return Te(e)?function(){return e.apply(this,arguments)||t.apply(this,arguments)}:Xe(Xs)(e,t)})(et,ct)));var Ks=Ye(Ws);const Ys=Vs([dt,Ks,zs]);const Qs=g(function(e,t){for(var s={},n=0;n<e.length;)e[n]in t&&(s[e[n]]=t[e[n]]),n+=1;return s}),Zs=function(){const e=tn,t=en,s=this,n="parser.js: Parser(): ";s.ast=void 0,s.stats=void 0,s.trace=void 0,s.callbacks=[];let r,i,o,c,a,l,u,h=0,d=0,p=0,m=0,f=0,y=new function(){this.state=e.ACTIVE,this.phraseLength=0,this.refresh=()=>{this.state=e.ACTIVE,this.phraseLength=0}};s.parse=(g,x,v,S)=>{const w=`${n}parse(): `;h=0,d=0,p=0,m=0,f=0,r=void 0,i=void 0,o=void 0,c=void 0,y.refresh(),a=void 0,l=void 0,u=void 0,c=t.stringToChars(v),r=g.rules,i=g.udts;const O=x.toLowerCase();let j;for(const e in r)if(r.hasOwnProperty(e)&&O===r[e].lower){j=r[e].index;break}if(void 0===j)throw new Error(`${w}start rule name '${startRule}' not recognized`);(()=>{const e=`${n}initializeCallbacks(): `;let t,o;for(a=[],l=[],t=0;t<r.length;t+=1)a[t]=void 0;for(t=0;t<i.length;t+=1)l[t]=void 0;const c=[];for(t=0;t<r.length;t+=1)c.push(r[t].lower);for(t=0;t<i.length;t+=1)c.push(i[t].lower);for(const n in s.callbacks)if(s.callbacks.hasOwnProperty(n)){if(t=c.indexOf(n.toLowerCase()),t<0)throw new Error(`${e}syntax callback '${n}' not a rule or udt name`);if(o=s.callbacks[n]?s.callbacks[n]:void 0,"function"!=typeof o&&void 0!==o)throw new Error(`${e}syntax callback[${n}] must be function reference or falsy)`);t<r.length?a[t]=o:l[t-r.length]=o}})(),s.trace&&s.trace.init(r,i,c),s.stats&&s.stats.init(r,i),s.ast&&s.ast.init(r,i,c),u=S,o=[{type:e.RNM,index:j}],b(0,0),o=void 0;let k=!1;switch(y.state){case e.ACTIVE:throw new Error(`${w}final state should never be 'ACTIVE'`);case e.NOMATCH:k=!1;break;case e.EMPTY:case e.MATCH:k=y.phraseLength===c.length;break;default:throw new Error("unrecognized state")}return{success:k,state:y.state,stateName:e.idName(y.state),length:c.length,matched:y.phraseLength,maxMatched:f,maxTreeDepth:p,nodeHits:m}};const g=(t,s,r,i)=>{if(s.phraseLength>r){let e=`${n}opRNM(${t.name}): callback function error: `;throw e+=`sysData.phraseLength: ${s.phraseLength}`,e+=` must be <= remaining chars: ${r}`,new Error(e)}switch(s.state){case e.ACTIVE:if(!i)throw new Error(`${n}opRNM(${t.name}): callback function return error. ACTIVE state not allowed.`);break;case e.EMPTY:s.phraseLength=0;break;case e.MATCH:0===s.phraseLength&&(s.state=e.EMPTY);break;case e.NOMATCH:s.phraseLength=0;break;default:throw new Error(`${n}opRNM(${t.name}): callback function return error. Unrecognized return state: ${s.state}`)}},x=(t,a)=>{let d,p,m;const f=o[t],g=i[f.index];y.UdtIndex=g.index,h||(m=s.ast&&s.ast.udtDefined(f.index),m&&(p=r.length+f.index,d=s.ast.getLength(),s.ast.down(p,g.name)));const x=c.length-a;l[f.index](y,c,a,u),((t,s,r)=>{if(s.phraseLength>r){let e=`${n}opUDT(${t.name}): callback function error: `;throw e+=`sysData.phraseLength: ${s.phraseLength}`,e+=` must be <= remaining chars: ${r}`,new Error(e)}switch(s.state){case e.ACTIVE:throw new Error(`${n}opUDT(${t.name}) ACTIVE state return not allowed.`);case e.EMPTY:if(!t.empty)throw new Error(`${n}opUDT(${t.name}) may not return EMPTY.`);s.phraseLength=0;break;case e.MATCH:if(0===s.phraseLength){if(!t.empty)throw new Error(`${n}opUDT(${t.name}) may not return EMPTY.`);s.state=e.EMPTY}break;case e.NOMATCH:s.phraseLength=0;break;default:throw new Error(`${n}opUDT(${t.name}): callback function return error. Unrecognized return state: ${s.state}`)}})(g,y,x),h||m&&(y.state===e.NOMATCH?s.ast.setLength(d):s.ast.up(p,g.name,a,y.phraseLength))},b=(t,i)=>{const l=`${n}opExecute(): `,v=o[t];switch(m+=1,d>p&&(p=d),d+=1,y.refresh(),s.trace&&s.trace.down(v,i),v.type){case e.ALT:((t,s)=>{const n=o[t];for(let t=0;t<n.children.length&&(b(n.children[t],s),y.state===e.NOMATCH);t+=1);})(t,i);break;case e.CAT:((t,n)=>{let r,i,c,a;const l=o[t];s.ast&&(i=s.ast.getLength()),r=!0,c=n,a=0;for(let t=0;t<l.children.length;t+=1){if(b(l.children[t],c),y.state===e.NOMATCH){r=!1;break}c+=y.phraseLength,a+=y.phraseLength}r?(y.state=0===a?e.EMPTY:e.MATCH,y.phraseLength=a):(y.state=e.NOMATCH,y.phraseLength=0,s.ast&&s.ast.setLength(i))})(t,i);break;case e.REP:((t,n)=>{let r,i,a,l;const u=o[t];if(0===u.max)return y.state=e.EMPTY,void(y.phraseLength=0);for(i=n,a=0,l=0,s.ast&&(r=s.ast.getLength());!(i>=c.length)&&(b(t+1,i),y.state!==e.NOMATCH)&&y.state!==e.EMPTY&&(l+=1,a+=y.phraseLength,i+=y.phraseLength,l!==u.max););y.state===e.EMPTY||l>=u.min?(y.state=0===a?e.EMPTY:e.MATCH,y.phraseLength=a):(y.state=e.NOMATCH,y.phraseLength=0,s.ast&&s.ast.setLength(r))})(t,i);break;case e.RNM:((t,n)=>{let i,l,d;const p=o[t],m=r[p.index],f=a[m.index];if(h||(l=s.ast&&s.ast.ruleDefined(p.index),l&&(i=s.ast.getLength(),s.ast.down(p.index,r[p.index].name))),f){const t=c.length-n;f(y,c,n,u),g(m,y,t,!0),y.state===e.ACTIVE&&(d=o,o=m.opcodes,b(0,n),o=d,f(y,c,n,u),g(m,y,t,!1))}else d=o,o=m.opcodes,b(0,n,y),o=d;h||l&&(y.state===e.NOMATCH?s.ast.setLength(i):s.ast.up(p.index,m.name,n,y.phraseLength))})(t,i);break;case e.TRG:((t,s)=>{const n=o[t];y.state=e.NOMATCH,s<c.length&&n.min<=c[s]&&c[s]<=n.max&&(y.state=e.MATCH,y.phraseLength=1)})(t,i);break;case e.TBS:((t,s)=>{const n=o[t],r=n.string.length;if(y.state=e.NOMATCH,s+r<=c.length){for(let e=0;e<r;e+=1)if(c[s+e]!==n.string[e])return;y.state=e.MATCH,y.phraseLength=r}})(t,i);break;case e.TLS:((t,s)=>{let n;const r=o[t];y.state=e.NOMATCH;const i=r.string.length;if(0!==i){if(s+i<=c.length){for(let e=0;e<i;e+=1)if(n=c[s+e],n>=65&&n<=90&&(n+=32),n!==r.string[e])return;y.state=e.MATCH,y.phraseLength=i}}else y.state=e.EMPTY})(t,i);break;case e.UDT:x(t,i);break;case e.AND:((t,s)=>{switch(h+=1,b(t+1,s),h-=1,y.phraseLength=0,y.state){case e.EMPTY:case e.MATCH:y.state=e.EMPTY;break;case e.NOMATCH:y.state=e.NOMATCH;break;default:throw new Error(`opAND: invalid state ${y.state}`)}})(t,i);break;case e.NOT:((t,s)=>{switch(h+=1,b(t+1,s),h-=1,y.phraseLength=0,y.state){case e.EMPTY:case e.MATCH:y.state=e.NOMATCH;break;case e.NOMATCH:y.state=e.EMPTY;break;default:throw new Error(`opNOT: invalid state ${y.state}`)}})(t,i);break;default:throw new Error(`${l}unrecognized operator`)}h||i+y.phraseLength>f&&(f=i+y.phraseLength),s.stats&&s.stats.collect(v,y),s.trace&&s.trace.up(v,y.state,i,y.phraseLength),d-=1}},en={stringToChars:e=>[...e].map(e=>e.codePointAt(0)),charsToString:(e,t,s)=>{let n=e;for(;!(void 0===t||t<0);){if(void 0===s){n=e.slice(t);break}if(s<=0)return"";n=e.slice(t,t+s);break}return String.fromCodePoint(...n)}},tn={ALT:1,CAT:2,REP:3,RNM:4,TRG:5,TBS:6,TLS:7,UDT:11,AND:12,NOT:13,ACTIVE:100,MATCH:101,EMPTY:102,NOMATCH:103,SEM_PRE:200,SEM_POST:201,SEM_OK:300,idName:e=>{switch(e){case tn.ALT:return"ALT";case tn.CAT:return"CAT";case tn.REP:return"REP";case tn.RNM:return"RNM";case tn.TRG:return"TRG";case tn.TBS:return"TBS";case tn.TLS:return"TLS";case tn.UDT:return"UDT";case tn.AND:return"AND";case tn.NOT:return"NOT";case tn.ACTIVE:return"ACTIVE";case tn.EMPTY:return"EMPTY";case tn.MATCH:return"MATCH";case tn.NOMATCH:return"NOMATCH";case tn.SEM_PRE:return"SEM_PRE";case tn.SEM_POST:return"SEM_POST";case tn.SEM_OK:return"SEM_OK";default:return"UNRECOGNIZED STATE"}}};function sn(){this.grammarObject="grammarObject",this.rules=[],this.rules[0]={name:"json-pointer",lower:"json-pointer",index:0,isBkr:!1},this.rules[1]={name:"reference-token",lower:"reference-token",index:1,isBkr:!1},this.rules[2]={name:"unescaped",lower:"unescaped",index:2,isBkr:!1},this.rules[3]={name:"escaped",lower:"escaped",index:3,isBkr:!1},this.rules[4]={name:"array-location",lower:"array-location",index:4,isBkr:!1},this.rules[5]={name:"array-index",lower:"array-index",index:5,isBkr:!1},this.rules[6]={name:"array-dash",lower:"array-dash",index:6,isBkr:!1},this.rules[7]={name:"slash",lower:"slash",index:7,isBkr:!1},this.udts=[],this.rules[0].opcodes=[],this.rules[0].opcodes[0]={type:3,min:0,max:1/0},this.rules[0].opcodes[1]={type:2,children:[2,3]},this.rules[0].opcodes[2]={type:4,index:7},this.rules[0].opcodes[3]={type:4,index:1},this.rules[1].opcodes=[],this.rules[1].opcodes[0]={type:3,min:0,max:1/0},this.rules[1].opcodes[1]={type:1,children:[2,3]},this.rules[1].opcodes[2]={type:4,index:2},this.rules[1].opcodes[3]={type:4,index:3},this.rules[2].opcodes=[],this.rules[2].opcodes[0]={type:1,children:[1,2,3]},this.rules[2].opcodes[1]={type:5,min:0,max:46},this.rules[2].opcodes[2]={type:5,min:48,max:125},this.rules[2].opcodes[3]={type:5,min:127,max:1114111},this.rules[3].opcodes=[],this.rules[3].opcodes[0]={type:2,children:[1,2]},this.rules[3].opcodes[1]={type:7,string:[126]},this.rules[3].opcodes[2]={type:1,children:[3,4]},this.rules[3].opcodes[3]={type:7,string:[48]},this.rules[3].opcodes[4]={type:7,string:[49]},this.rules[4].opcodes=[],this.rules[4].opcodes[0]={type:1,children:[1,2]},this.rules[4].opcodes[1]={type:4,index:5},this.rules[4].opcodes[2]={type:4,index:6},this.rules[5].opcodes=[],this.rules[5].opcodes[0]={type:1,children:[1,2]},this.rules[5].opcodes[1]={type:6,string:[48]},this.rules[5].opcodes[2]={type:2,children:[3,4]},this.rules[5].opcodes[3]={type:5,min:49,max:57},this.rules[5].opcodes[4]={type:3,min:0,max:1/0},this.rules[5].opcodes[5]={type:5,min:48,max:57},this.rules[6].opcodes=[],this.rules[6].opcodes[0]={type:7,string:[45]},this.rules[7].opcodes=[],this.rules[7].opcodes[0]={type:7,string:[47]},this.toString=function(){let e="";return e+="; JavaScript Object Notation (JSON) Pointer ABNF syntax\n",e+="; https://datatracker.ietf.org/doc/html/rfc6901\n",e+="json-pointer = *( slash reference-token ) ; MODIFICATION: surrogate text rule used\n",e+="reference-token = *( unescaped / escaped )\n",e+="unescaped = %x00-2E / %x30-7D / %x7F-10FFFF\n",e+=" ; %x2F ('/') and %x7E ('~') are excluded from 'unescaped'\n",e+='escaped = "~" ( "0" / "1" )\n',e+=" ; representing '~' and '/', respectively\n",e+="\n",e+="; https://datatracker.ietf.org/doc/html/rfc6901#section-4\n",e+="array-location = array-index / array-dash\n",e+="array-index = %x30 / ( %x31-39 *(%x30-39) )\n",e+=' ; "0", or digits without a leading "0"\n',e+='array-dash = "-"\n',e+="\n",e+="; Surrogate named rules\n",e+='slash = "/"\n','; JavaScript Object Notation (JSON) Pointer ABNF syntax\n; https://datatracker.ietf.org/doc/html/rfc6901\njson-pointer = *( slash reference-token ) ; MODIFICATION: surrogate text rule used\nreference-token = *( unescaped / escaped )\nunescaped = %x00-2E / %x30-7D / %x7F-10FFFF\n ; %x2F (\'/\') and %x7E (\'~\') are excluded from \'unescaped\'\nescaped = "~" ( "0" / "1" )\n ; representing \'~\' and \'/\', respectively\n\n; https://datatracker.ietf.org/doc/html/rfc6901#section-4\narray-location = array-index / array-dash\narray-index = %x30 / ( %x31-39 *(%x30-39) )\n ; "0", or digits without a leading "0"\narray-dash = "-"\n\n; Surrogate named rules\nslash = "/"\n'}}class nn extends Error{constructor(e,t=void 0){if(super(e,t),this.name=this.constructor.name,"string"==typeof e&&(this.message=e),"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error(e).stack,null!=t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"cause")&&!("cause"in this)){const{cause:e}=t;this.cause=e,e instanceof Error&&"stack"in e&&(this.stack=`${this.stack}\nCAUSE: ${e.stack}`)}if(null!=t&&"object"==typeof t){const{cause:e,...s}=t;Object.assign(this,s)}}}const rn=nn;new sn;new sn,new Zs,new sn,new Zs,new sn,new Zs,new sn,new Zs;const on=e=>{if("string"!=typeof e&&"number"!=typeof e)throw new TypeError("Reference token must be a string or number");return String(e).replace(/~/g,"~0").replace(/\//g,"~1")};const cn=class extends rn{},an=e=>{if(!Array.isArray(e))throw new TypeError("Reference tokens must be a list of strings or numbers");try{return 0===e.length?"":`/${e.map(e=>{if("string"!=typeof e&&"number"!=typeof e)throw new TypeError("Reference token must be a string or number");return on(String(e))}).join("/")}`}catch(t){throw new cn("Unexpected error during JSON Pointer compilation",{cause:t,referenceTokens:e})}};class ln extends Error{constructor(e,t=void 0){if(super(e,t),this.name=this.constructor.name,"string"==typeof e&&(this.message=e),"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error(e).stack,null!=t&&"object"==typeof t&&Object.hasOwn(t,"cause")&&!("cause"in this)){const{cause:e}=t;this.cause=e,e instanceof Error&&"stack"in e&&(this.stack=`${this.stack}\nCAUSE: ${e.stack}`)}if(null!=t&&"object"==typeof t){const{cause:e,...s}=t;Object.assign(this,s)}}}const un=ln;new function(){this.grammarObject="grammarObject",this.rules=[],this.rules[0]={name:"jsonpath-query",lower:"jsonpath-query",index:0,isBkr:!1},this.rules[1]={name:"segments",lower:"segments",index:1,isBkr:!1},this.rules[2]={name:"B",lower:"b",index:2,isBkr:!1},this.rules[3]={name:"S",lower:"s",index:3,isBkr:!1},this.rules[4]={name:"root-identifier",lower:"root-identifier",index:4,isBkr:!1},this.rules[5]={name:"selector",lower:"selector",index:5,isBkr:!1},this.rules[6]={name:"name-selector",lower:"name-selector",index:6,isBkr:!1},this.rules[7]={name:"string-literal",lower:"string-literal",index:7,isBkr:!1},this.rules[8]={name:"double-quoted",lower:"double-quoted",index:8,isBkr:!1},this.rules[9]={name:"single-quoted",lower:"single-quoted",index:9,isBkr:!1},this.rules[10]={name:"ESC",lower:"esc",index:10,isBkr:!1},this.rules[11]={name:"unescaped",lower:"unescaped",index:11,isBkr:!1},this.rules[12]={name:"escapable",lower:"escapable",index:12,isBkr:!1},this.rules[13]={name:"hexchar",lower:"hexchar",index:13,isBkr:!1},this.rules[14]={name:"non-surrogate",lower:"non-surrogate",index:14,isBkr:!1},this.rules[15]={name:"high-surrogate",lower:"high-surrogate",index:15,isBkr:!1},this.rules[16]={name:"low-surrogate",lower:"low-surrogate",index:16,isBkr:!1},this.rules[17]={name:"HEXDIG",lower:"hexdig",index:17,isBkr:!1},this.rules[18]={name:"wildcard-selector",lower:"wildcard-selector",index:18,isBkr:!1},this.rules[19]={name:"index-selector",lower:"index-selector",index:19,isBkr:!1},this.rules[20]={name:"int",lower:"int",index:20,isBkr:!1},this.rules[21]={name:"DIGIT1",lower:"digit1",index:21,isBkr:!1},this.rules[22]={name:"slice-selector",lower:"slice-selector",index:22,isBkr:!1},this.rules[23]={name:"start",lower:"start",index:23,isBkr:!1},this.rules[24]={name:"end",lower:"end",index:24,isBkr:!1},this.rules[25]={name:"step",lower:"step",index:25,isBkr:!1},this.rules[26]={name:"filter-selector",lower:"filter-selector",index:26,isBkr:!1},this.rules[27]={name:"logical-expr",lower:"logical-expr",index:27,isBkr:!1},this.rules[28]={name:"logical-or-expr",lower:"logical-or-expr",index:28,isBkr:!1},this.rules[29]={name:"logical-and-expr",lower:"logical-and-expr",index:29,isBkr:!1},this.rules[30]={name:"basic-expr",lower:"basic-expr",index:30,isBkr:!1},this.rules[31]={name:"paren-expr",lower:"paren-expr",index:31,isBkr:!1},this.rules[32]={name:"logical-not-op",lower:"logical-not-op",index:32,isBkr:!1},this.rules[33]={name:"test-expr",lower:"test-expr",index:33,isBkr:!1},this.rules[34]={name:"filter-query",lower:"filter-query",index:34,isBkr:!1},this.rules[35]={name:"rel-query",lower:"rel-query",index:35,isBkr:!1},this.rules[36]={name:"current-node-identifier",lower:"current-node-identifier",index:36,isBkr:!1},this.rules[37]={name:"comparison-expr",lower:"comparison-expr",index:37,isBkr:!1},this.rules[38]={name:"literal",lower:"literal",index:38,isBkr:!1},this.rules[39]={name:"comparable",lower:"comparable",index:39,isBkr:!1},this.rules[40]={name:"comparison-op",lower:"comparison-op",index:40,isBkr:!1},this.rules[41]={name:"singular-query",lower:"singular-query",index:41,isBkr:!1},this.rules[42]={name:"rel-singular-query",lower:"rel-singular-query",index:42,isBkr:!1},this.rules[43]={name:"abs-singular-query",lower:"abs-singular-query",index:43,isBkr:!1},this.rules[44]={name:"singular-query-segments",lower:"singular-query-segments",index:44,isBkr:!1},this.rules[45]={name:"name-segment",lower:"name-segment",index:45,isBkr:!1},this.rules[46]={name:"index-segment",lower:"index-segment",index:46,isBkr:!1},this.rules[47]={name:"number",lower:"number",index:47,isBkr:!1},this.rules[48]={name:"frac",lower:"frac",index:48,isBkr:!1},this.rules[49]={name:"exp",lower:"exp",index:49,isBkr:!1},this.rules[50]={name:"true",lower:"true",index:50,isBkr:!1},this.rules[51]={name:"false",lower:"false",index:51,isBkr:!1},this.rules[52]={name:"null",lower:"null",index:52,isBkr:!1},this.rules[53]={name:"function-name",lower:"function-name",index:53,isBkr:!1},this.rules[54]={name:"function-name-first",lower:"function-name-first",index:54,isBkr:!1},this.rules[55]={name:"function-name-char",lower:"function-name-char",index:55,isBkr:!1},this.rules[56]={name:"LCALPHA",lower:"lcalpha",index:56,isBkr:!1},this.rules[57]={name:"function-expr",lower:"function-expr",index:57,isBkr:!1},this.rules[58]={name:"function-argument",lower:"function-argument",index:58,isBkr:!1},this.rules[59]={name:"segment",lower:"segment",index:59,isBkr:!1},this.rules[60]={name:"child-segment",lower:"child-segment",index:60,isBkr:!1},this.rules[61]={name:"bracketed-selection",lower:"bracketed-selection",index:61,isBkr:!1},this.rules[62]={name:"member-name-shorthand",lower:"member-name-shorthand",index:62,isBkr:!1},this.rules[63]={name:"name-first",lower:"name-first",index:63,isBkr:!1},this.rules[64]={name:"name-char",lower:"name-char",index:64,isBkr:!1},this.rules[65]={name:"DIGIT",lower:"digit",index:65,isBkr:!1},this.rules[66]={name:"ALPHA",lower:"alpha",index:66,isBkr:!1},this.rules[67]={name:"descendant-segment",lower:"descendant-segment",index:67,isBkr:!1},this.rules[68]={name:"normalized-path",lower:"normalized-path",index:68,isBkr:!1},this.rules[69]={name:"normal-index-segment",lower:"normal-index-segment",index:69,isBkr:!1},this.rules[70]={name:"normal-selector",lower:"normal-selector",index:70,isBkr:!1},this.rules[71]={name:"normal-name-selector",lower:"normal-name-selector",index:71,isBkr:!1},this.rules[72]={name:"normal-single-quoted",lower:"normal-single-quoted",index:72,isBkr:!1},this.rules[73]={name:"normal-unescaped",lower:"normal-unescaped",index:73,isBkr:!1},this.rules[74]={name:"normal-escapable",lower:"normal-escapable",index:74,isBkr:!1},this.rules[75]={name:"normal-hexchar",lower:"normal-hexchar",index:75,isBkr:!1},this.rules[76]={name:"normal-HEXDIG",lower:"normal-hexdig",index:76,isBkr:!1},this.rules[77]={name:"normal-index-selector",lower:"normal-index-selector",index:77,isBkr:!1},this.rules[78]={name:"dot-prefix",lower:"dot-prefix",index:78,isBkr:!1},this.rules[79]={name:"double-dot-prefix",lower:"double-dot-prefix",index:79,isBkr:!1},this.rules[80]={name:"left-bracket",lower:"left-bracket",index:80,isBkr:!1},this.rules[81]={name:"right-bracket",lower:"right-bracket",index:81,isBkr:!1},this.rules[82]={name:"left-paren",lower:"left-paren",index:82,isBkr:!1},this.rules[83]={name:"right-paren",lower:"right-paren",index:83,isBkr:!1},this.rules[84]={name:"comma",lower:"comma",index:84,isBkr:!1},this.rules[85]={name:"colon",lower:"colon",index:85,isBkr:!1},this.rules[86]={name:"dquote",lower:"dquote",index:86,isBkr:!1},this.rules[87]={name:"squote",lower:"squote",index:87,isBkr:!1},this.rules[88]={name:"questionmark",lower:"questionmark",index:88,isBkr:!1},this.rules[89]={name:"disjunction",lower:"disjunction",index:89,isBkr:!1},this.rules[90]={name:"conjunction",lower:"conjunction",index:90,isBkr:!1},this.udts=[],this.rules[0].opcodes=[],this.rules[0].opcodes[0]={type:2,children:[1,2]},this.rules[0].opcodes[1]={type:4,index:4},this.rules[0].opcodes[2]={type:4,index:1},this.rules[1].opcodes=[],this.rules[1].opcodes[0]={type:3,min:0,max:1/0},this.rules[1].opcodes[1]={type:2,children:[2,3]},this.rules[1].opcodes[2]={type:4,index:3},this.rules[1].opcodes[3]={type:4,index:59},this.rules[2].opcodes=[],this.rules[2].opcodes[0]={type:1,children:[1,2,3,4]},this.rules[2].opcodes[1]={type:6,string:[32]},this.rules[2].opcodes[2]={type:6,string:[9]},this.rules[2].opcodes[3]={type:6,string:[10]},this.rules[2].opcodes[4]={type:6,string:[13]},this.rules[3].opcodes=[],this.rules[3].opcodes[0]={type:3,min:0,max:1/0},this.rules[3].opcodes[1]={type:4,index:2},this.rules[4].opcodes=[],this.rules[4].opcodes[0]={type:7,string:[36]},this.rules[5].opcodes=[],this.rules[5].opcodes[0]={type:1,children:[1,2,3,4,5]},this.rules[5].opcodes[1]={type:4,index:6},this.rules[5].opcodes[2]={type:4,index:18},this.rules[5].opcodes[3]={type:4,index:22},this.rules[5].opcodes[4]={type:4,index:19},this.rules[5].opcodes[5]={type:4,index:26},this.rules[6].opcodes=[],this.rules[6].opcodes[0]={type:4,index:7},this.rules[7].opcodes=[],this.rules[7].opcodes[0]={type:1,children:[1,6]},this.rules[7].opcodes[1]={type:2,children:[2,3,5]},this.rules[7].opcodes[2]={type:4,index:86},this.rules[7].opcodes[3]={type:3,min:0,max:1/0},this.rules[7].opcodes[4]={type:4,index:8},this.rules[7].opcodes[5]={type:4,index:86},this.rules[7].opcodes[6]={type:2,children:[7,8,10]},this.rules[7].opcodes[7]={type:4,index:87},this.rules[7].opcodes[8]={type:3,min:0,max:1/0},this.rules[7].opcodes[9]={type:4,index:9},this.rules[7].opcodes[10]={type:4,index:87},this.rules[8].opcodes=[],this.rules[8].opcodes[0]={type:1,children:[1,2,3,6]},this.rules[8].opcodes[1]={type:4,index:11},this.rules[8].opcodes[2]={type:6,string:[39]},this.rules[8].opcodes[3]={type:2,children:[4,5]},this.rules[8].opcodes[4]={type:4,index:10},this.rules[8].opcodes[5]={type:6,string:[34]},this.rules[8].opcodes[6]={type:2,children:[7,8]},this.rules[8].opcodes[7]={type:4,index:10},this.rules[8].opcodes[8]={type:4,index:12},this.rules[9].opcodes=[],this.rules[9].opcodes[0]={type:1,children:[1,2,3,6]},this.rules[9].opcodes[1]={type:4,index:11},this.rules[9].opcodes[2]={type:6,string:[34]},this.rules[9].opcodes[3]={type:2,children:[4,5]},this.rules[9].opcodes[4]={type:4,index:10},this.rules[9].opcodes[5]={type:6,string:[39]},this.rules[9].opcodes[6]={type:2,children:[7,8]},this.rules[9].opcodes[7]={type:4,index:10},this.rules[9].opcodes[8]={type:4,index:12},this.rules[10].opcodes=[],this.rules[10].opcodes[0]={type:6,string:[92]},this.rules[11].opcodes=[],this.rules[11].opcodes[0]={type:1,children:[1,2,3,4,5]},this.rules[11].opcodes[1]={type:5,min:32,max:33},this.rules[11].opcodes[2]={type:5,min:35,max:38},this.rules[11].opcodes[3]={type:5,min:40,max:91},this.rules[11].opcodes[4]={type:5,min:93,max:55295},this.rules[11].opcodes[5]={type:5,min:57344,max:1114111},this.rules[12].opcodes=[],this.rules[12].opcodes[0]={type:1,children:[1,2,3,4,5,6,7,8]},this.rules[12].opcodes[1]={type:6,string:[98]},this.rules[12].opcodes[2]={type:6,string:[102]},this.rules[12].opcodes[3]={type:6,string:[110]},this.rules[12].opcodes[4]={type:6,string:[114]},this.rules[12].opcodes[5]={type:6,string:[116]},this.rules[12].opcodes[6]={type:7,string:[47]},this.rules[12].opcodes[7]={type:7,string:[92]},this.rules[12].opcodes[8]={type:2,children:[9,10]},this.rules[12].opcodes[9]={type:6,string:[117]},this.rules[12].opcodes[10]={type:4,index:13},this.rules[13].opcodes=[],this.rules[13].opcodes[0]={type:1,children:[1,2]},this.rules[13].opcodes[1]={type:4,index:14},this.rules[13].opcodes[2]={type:2,children:[3,4,5,6]},this.rules[13].opcodes[3]={type:4,index:15},this.rules[13].opcodes[4]={type:7,string:[92]},this.rules[13].opcodes[5]={type:6,string:[117]},this.rules[13].opcodes[6]={type:4,index:16},this.rules[14].opcodes=[],this.rules[14].opcodes[0]={type:1,children:[1,11]},this.rules[14].opcodes[1]={type:2,children:[2,9]},this.rules[14].opcodes[2]={type:1,children:[3,4,5,6,7,8]},this.rules[14].opcodes[3]={type:4,index:65},this.rules[14].opcodes[4]={type:7,string:[97]},this.rules[14].opcodes[5]={type:7,string:[98]},this.rules[14].opcodes[6]={type:7,string:[99]},this.rules[14].opcodes[7]={type:7,string:[101]},this.rules[14].opcodes[8]={type:7,string:[102]},this.rules[14].opcodes[9]={type:3,min:3,max:3},this.rules[14].opcodes[10]={type:4,index:17},this.rules[14].opcodes[11]={type:2,children:[12,13,14]},this.rules[14].opcodes[12]={type:7,string:[100]},this.rules[14].opcodes[13]={type:5,min:48,max:55},this.rules[14].opcodes[14]={type:3,min:2,max:2},this.rules[14].opcodes[15]={type:4,index:17},this.rules[15].opcodes=[],this.rules[15].opcodes[0]={type:2,children:[1,2,7]},this.rules[15].opcodes[1]={type:7,string:[100]},this.rules[15].opcodes[2]={type:1,children:[3,4,5,6]},this.rules[15].opcodes[3]={type:7,string:[56]},this.rules[15].opcodes[4]={type:7,string:[57]},this.rules[15].opcodes[5]={type:7,string:[97]},this.rules[15].opcodes[6]={type:7,string:[98]},this.rules[15].opcodes[7]={type:3,min:2,max:2},this.rules[15].opcodes[8]={type:4,index:17},this.rules[16].opcodes=[],this.rules[16].opcodes[0]={type:2,children:[1,2,7]},this.rules[16].opcodes[1]={type:7,string:[100]},this.rules[16].opcodes[2]={type:1,children:[3,4,5,6]},this.rules[16].opcodes[3]={type:7,string:[99]},this.rules[16].opcodes[4]={type:7,string:[100]},this.rules[16].opcodes[5]={type:7,string:[101]},this.rules[16].opcodes[6]={type:7,string:[102]},this.rules[16].opcodes[7]={type:3,min:2,max:2},this.rules[16].opcodes[8]={type:4,index:17},this.rules[17].opcodes=[],this.rules[17].opcodes[0]={type:1,children:[1,2,3,4,5,6,7]},this.rules[17].opcodes[1]={type:4,index:65},this.rules[17].opcodes[2]={type:7,string:[97]},this.rules[17].opcodes[3]={type:7,string:[98]},this.rules[17].opcodes[4]={type:7,string:[99]},this.rules[17].opcodes[5]={type:7,string:[100]},this.rules[17].opcodes[6]={type:7,string:[101]},this.rules[17].opcodes[7]={type:7,string:[102]},this.rules[18].opcodes=[],this.rules[18].opcodes[0]={type:7,string:[42]},this.rules[19].opcodes=[],this.rules[19].opcodes[0]={type:4,index:20},this.rules[20].opcodes=[],this.rules[20].opcodes[0]={type:1,children:[1,2]},this.rules[20].opcodes[1]={type:7,string:[48]},this.rules[20].opcodes[2]={type:2,children:[3,5,6]},this.rules[20].opcodes[3]={type:3,min:0,max:1},this.rules[20].opcodes[4]={type:7,string:[45]},this.rules[20].opcodes[5]={type:4,index:21},this.rules[20].opcodes[6]={type:3,min:0,max:1/0},this.rules[20].opcodes[7]={type:4,index:65},this.rules[21].opcodes=[],this.rules[21].opcodes[0]={type:5,min:49,max:57},this.rules[22].opcodes=[],this.rules[22].opcodes[0]={type:2,children:[1,5,6,7,11]},this.rules[22].opcodes[1]={type:3,min:0,max:1},this.rules[22].opcodes[2]={type:2,children:[3,4]},this.rules[22].opcodes[3]={type:4,index:23},this.rules[22].opcodes[4]={type:4,index:3},this.rules[22].opcodes[5]={type:4,index:85},this.rules[22].opcodes[6]={type:4,index:3},this.rules[22].opcodes[7]={type:3,min:0,max:1},this.rules[22].opcodes[8]={type:2,children:[9,10]},this.rules[22].opcodes[9]={type:4,index:24},this.rules[22].opcodes[10]={type:4,index:3},this.rules[22].opcodes[11]={type:3,min:0,max:1},this.rules[22].opcodes[12]={type:2,children:[13,14]},this.rules[22].opcodes[13]={type:4,index:85},this.rules[22].opcodes[14]={type:3,min:0,max:1},this.rules[22].opcodes[15]={type:2,children:[16,17]},this.rules[22].opcodes[16]={type:4,index:3},this.rules[22].opcodes[17]={type:4,index:25},this.rules[23].opcodes=[],this.rules[23].opcodes[0]={type:4,index:20},this.rules[24].opcodes=[],this.rules[24].opcodes[0]={type:4,index:20},this.rules[25].opcodes=[],this.rules[25].opcodes[0]={type:4,index:20},this.rules[26].opcodes=[],this.rules[26].opcodes[0]={type:2,children:[1,2,3]},this.rules[26].opcodes[1]={type:4,index:88},this.rules[26].opcodes[2]={type:4,index:3},this.rules[26].opcodes[3]={type:4,index:27},this.rules[27].opcodes=[],this.rules[27].opcodes[0]={type:4,index:28},this.rules[28].opcodes=[],this.rules[28].opcodes[0]={type:2,children:[1,2]},this.rules[28].opcodes[1]={type:4,index:29},this.rules[28].opcodes[2]={type:3,min:0,max:1/0},this.rules[28].opcodes[3]={type:2,children:[4,5,6,7]},this.rules[28].opcodes[4]={type:4,index:3},this.rules[28].opcodes[5]={type:4,index:89},this.rules[28].opcodes[6]={type:4,index:3},this.rules[28].opcodes[7]={type:4,index:29},this.rules[29].opcodes=[],this.rules[29].opcodes[0]={type:2,children:[1,2]},this.rules[29].opcodes[1]={type:4,index:30},this.rules[29].opcodes[2]={type:3,min:0,max:1/0},this.rules[29].opcodes[3]={type:2,children:[4,5,6,7]},this.rules[29].opcodes[4]={type:4,index:3},this.rules[29].opcodes[5]={type:4,index:90},this.rules[29].opcodes[6]={type:4,index:3},this.rules[29].opcodes[7]={type:4,index:30},this.rules[30].opcodes=[],this.rules[30].opcodes[0]={type:1,children:[1,2,3]},this.rules[30].opcodes[1]={type:4,index:31},this.rules[30].opcodes[2]={type:4,index:37},this.rules[30].opcodes[3]={type:4,index:33},this.rules[31].opcodes=[],this.rules[31].opcodes[0]={type:2,children:[1,5,6,7,8,9]},this.rules[31].opcodes[1]={type:3,min:0,max:1},this.rules[31].opcodes[2]={type:2,children:[3,4]},this.rules[31].opcodes[3]={type:4,index:32},this.rules[31].opcodes[4]={type:4,index:3},this.rules[31].opcodes[5]={type:4,index:82},this.rules[31].opcodes[6]={type:4,index:3},this.rules[31].opcodes[7]={type:4,index:27},this.rules[31].opcodes[8]={type:4,index:3},this.rules[31].opcodes[9]={type:4,index:83},this.rules[32].opcodes=[],this.rules[32].opcodes[0]={type:7,string:[33]},this.rules[33].opcodes=[],this.rules[33].opcodes[0]={type:2,children:[1,5]},this.rules[33].opcodes[1]={type:3,min:0,max:1},this.rules[33].opcodes[2]={type:2,children:[3,4]},this.rules[33].opcodes[3]={type:4,index:32},this.rules[33].opcodes[4]={type:4,index:3},this.rules[33].opcodes[5]={type:1,children:[6,7]},this.rules[33].opcodes[6]={type:4,index:34},this.rules[33].opcodes[7]={type:4,index:57},this.rules[34].opcodes=[],this.rules[34].opcodes[0]={type:1,children:[1,2]},this.rules[34].opcodes[1]={type:4,index:35},this.rules[34].opcodes[2]={type:4,index:0},this.rules[35].opcodes=[],this.rules[35].opcodes[0]={type:2,children:[1,2]},this.rules[35].opcodes[1]={type:4,index:36},this.rules[35].opcodes[2]={type:4,index:1},this.rules[36].opcodes=[],this.rules[36].opcodes[0]={type:7,string:[64]},this.rules[37].opcodes=[],this.rules[37].opcodes[0]={type:2,children:[1,2,3,4,5]},this.rules[37].opcodes[1]={type:4,index:39},this.rules[37].opcodes[2]={type:4,index:3},this.rules[37].opcodes[3]={type:4,index:40},this.rules[37].opcodes[4]={type:4,index:3},this.rules[37].opcodes[5]={type:4,index:39},this.rules[38].opcodes=[],this.rules[38].opcodes[0]={type:1,children:[1,2,3,4,5]},this.rules[38].opcodes[1]={type:4,index:47},this.rules[38].opcodes[2]={type:4,index:7},this.rules[38].opcodes[3]={type:4,index:50},this.rules[38].opcodes[4]={type:4,index:51},this.rules[38].opcodes[5]={type:4,index:52},this.rules[39].opcodes=[],this.rules[39].opcodes[0]={type:1,children:[1,2,3]},this.rules[39].opcodes[1]={type:4,index:41},this.rules[39].opcodes[2]={type:4,index:57},this.rules[39].opcodes[3]={type:4,index:38},this.rules[40].opcodes=[],this.rules[40].opcodes[0]={type:1,children:[1,2,3,4,5,6]},this.rules[40].opcodes[1]={type:7,string:[61,61]},this.rules[40].opcodes[2]={type:7,string:[33,61]},this.rules[40].opcodes[3]={type:7,string:[60,61]},this.rules[40].opcodes[4]={type:7,string:[62,61]},this.rules[40].opcodes[5]={type:7,string:[60]},this.rules[40].opcodes[6]={type:7,string:[62]},this.rules[41].opcodes=[],this.rules[41].opcodes[0]={type:1,children:[1,2]},this.rules[41].opcodes[1]={type:4,index:42},this.rules[41].opcodes[2]={type:4,index:43},this.rules[42].opcodes=[],this.rules[42].opcodes[0]={type:2,children:[1,2]},this.rules[42].opcodes[1]={type:4,index:36},this.rules[42].opcodes[2]={type:4,index:44},this.rules[43].opcodes=[],this.rules[43].opcodes[0]={type:2,children:[1,2]},this.rules[43].opcodes[1]={type:4,index:4},this.rules[43].opcodes[2]={type:4,index:44},this.rules[44].opcodes=[],this.rules[44].opcodes[0]={type:3,min:0,max:1/0},this.rules[44].opcodes[1]={type:2,children:[2,3]},this.rules[44].opcodes[2]={type:4,index:3},this.rules[44].opcodes[3]={type:1,children:[4,5]},this.rules[44].opcodes[4]={type:4,index:45},this.rules[44].opcodes[5]={type:4,index:46},this.rules[45].opcodes=[],this.rules[45].opcodes[0]={type:1,children:[1,5]},this.rules[45].opcodes[1]={type:2,children:[2,3,4]},this.rules[45].opcodes[2]={type:4,index:80},this.rules[45].opcodes[3]={type:4,index:6},this.rules[45].opcodes[4]={type:4,index:81},this.rules[45].opcodes[5]={type:2,children:[6,7]},this.rules[45].opcodes[6]={type:4,index:78},this.rules[45].opcodes[7]={type:4,index:62},this.rules[46].opcodes=[],this.rules[46].opcodes[0]={type:2,children:[1,2,3]},this.rules[46].opcodes[1]={type:4,index:80},this.rules[46].opcodes[2]={type:4,index:19},this.rules[46].opcodes[3]={type:4,index:81},this.rules[47].opcodes=[],this.rules[47].opcodes[0]={type:2,children:[1,4,6]},this.rules[47].opcodes[1]={type:1,children:[2,3]},this.rules[47].opcodes[2]={type:4,index:20},this.rules[47].opcodes[3]={type:7,string:[45,48]},this.rules[47].opcodes[4]={type:3,min:0,max:1},this.rules[47].opcodes[5]={type:4,index:48},this.rules[47].opcodes[6]={type:3,min:0,max:1},this.rules[47].opcodes[7]={type:4,index:49},this.rules[48].opcodes=[],this.rules[48].opcodes[0]={type:2,children:[1,2]},this.rules[48].opcodes[1]={type:7,string:[46]},this.rules[48].opcodes[2]={type:3,min:1,max:1/0},this.rules[48].opcodes[3]={type:4,index:65},this.rules[49].opcodes=[],this.rules[49].opcodes[0]={type:2,children:[1,2,6]},this.rules[49].opcodes[1]={type:7,string:[101]},this.rules[49].opcodes[2]={type:3,min:0,max:1},this.rules[49].opcodes[3]={type:1,children:[4,5]},this.rules[49].opcodes[4]={type:7,string:[45]},this.rules[49].opcodes[5]={type:7,string:[43]},this.rules[49].opcodes[6]={type:3,min:1,max:1/0},this.rules[49].opcodes[7]={type:4,index:65},this.rules[50].opcodes=[],this.rules[50].opcodes[0]={type:6,string:[116,114,117,101]},this.rules[51].opcodes=[],this.rules[51].opcodes[0]={type:6,string:[102,97,108,115,101]},this.rules[52].opcodes=[],this.rules[52].opcodes[0]={type:6,string:[110,117,108,108]},this.rules[53].opcodes=[],this.rules[53].opcodes[0]={type:2,children:[1,2]},this.rules[53].opcodes[1]={type:4,index:54},this.rules[53].opcodes[2]={type:3,min:0,max:1/0},this.rules[53].opcodes[3]={type:4,index:55},this.rules[54].opcodes=[],this.rules[54].opcodes[0]={type:4,index:56},this.rules[55].opcodes=[],this.rules[55].opcodes[0]={type:1,children:[1,2,3]},this.rules[55].opcodes[1]={type:4,index:54},this.rules[55].opcodes[2]={type:7,string:[95]},this.rules[55].opcodes[3]={type:4,index:65},this.rules[56].opcodes=[],this.rules[56].opcodes[0]={type:5,min:97,max:122},this.rules[57].opcodes=[],this.rules[57].opcodes[0]={type:2,children:[1,2,3,4,13,14]},this.rules[57].opcodes[1]={type:4,index:53},this.rules[57].opcodes[2]={type:4,index:82},this.rules[57].opcodes[3]={type:4,index:3},this.rules[57].opcodes[4]={type:3,min:0,max:1},this.rules[57].opcodes[5]={type:2,children:[6,7]},this.rules[57].opcodes[6]={type:4,index:58},this.rules[57].opcodes[7]={type:3,min:0,max:1/0},this.rules[57].opcodes[8]={type:2,children:[9,10,11,12]},this.rules[57].opcodes[9]={type:4,index:3},this.rules[57].opcodes[10]={type:4,index:84},this.rules[57].opcodes[11]={type:4,index:3},this.rules[57].opcodes[12]={type:4,index:58},this.rules[57].opcodes[13]={type:4,index:3},this.rules[57].opcodes[14]={type:4,index:83},this.rules[58].opcodes=[],this.rules[58].opcodes[0]={type:1,children:[1,2,3,4]},this.rules[58].opcodes[1]={type:4,index:27},this.rules[58].opcodes[2]={type:4,index:34},this.rules[58].opcodes[3]={type:4,index:57},this.rules[58].opcodes[4]={type:4,index:38},this.rules[59].opcodes=[],this.rules[59].opcodes[0]={type:1,children:[1,2]},this.rules[59].opcodes[1]={type:4,index:60},this.rules[59].opcodes[2]={type:4,index:67},this.rules[60].opcodes=[],this.rules[60].opcodes[0]={type:1,children:[1,2]},this.rules[60].opcodes[1]={type:4,index:61},this.rules[60].opcodes[2]={type:2,children:[3,4]},this.rules[60].opcodes[3]={type:4,index:78},this.rules[60].opcodes[4]={type:1,children:[5,6]},this.rules[60].opcodes[5]={type:4,index:18},this.rules[60].opcodes[6]={type:4,index:62},this.rules[61].opcodes=[],this.rules[61].opcodes[0]={type:2,children:[1,2,3,4,10,11]},this.rules[61].opcodes[1]={type:4,index:80},this.rules[61].opcodes[2]={type:4,index:3},this.rules[61].opcodes[3]={type:4,index:5},this.rules[61].opcodes[4]={type:3,min:0,max:1/0},this.rules[61].opcodes[5]={type:2,children:[6,7,8,9]},this.rules[61].opcodes[6]={type:4,index:3},this.rules[61].opcodes[7]={type:4,index:84},this.rules[61].opcodes[8]={type:4,index:3},this.rules[61].opcodes[9]={type:4,index:5},this.rules[61].opcodes[10]={type:4,index:3},this.rules[61].opcodes[11]={type:4,index:81},this.rules[62].opcodes=[],this.rules[62].opcodes[0]={type:2,children:[1,2]},this.rules[62].opcodes[1]={type:4,index:63},this.rules[62].opcodes[2]={type:3,min:0,max:1/0},this.rules[62].opcodes[3]={type:4,index:64},this.rules[63].opcodes=[],this.rules[63].opcodes[0]={type:1,children:[1,2,3,4]},this.rules[63].opcodes[1]={type:4,index:66},this.rules[63].opcodes[2]={type:7,string:[95]},this.rules[63].opcodes[3]={type:5,min:128,max:55295},this.rules[63].opcodes[4]={type:5,min:57344,max:1114111},this.rules[64].opcodes=[],this.rules[64].opcodes[0]={type:1,children:[1,2]},this.rules[64].opcodes[1]={type:4,index:63},this.rules[64].opcodes[2]={type:4,index:65},this.rules[65].opcodes=[],this.rules[65].opcodes[0]={type:5,min:48,max:57},this.rules[66].opcodes=[],this.rules[66].opcodes[0]={type:1,children:[1,2]},this.rules[66].opcodes[1]={type:5,min:65,max:90},this.rules[66].opcodes[2]={type:5,min:97,max:122},this.rules[67].opcodes=[],this.rules[67].opcodes[0]={type:2,children:[1,2]},this.rules[67].opcodes[1]={type:4,index:79},this.rules[67].opcodes[2]={type:1,children:[3,4,5]},this.rules[67].opcodes[3]={type:4,index:61},this.rules[67].opcodes[4]={type:4,index:18},this.rules[67].opcodes[5]={type:4,index:62},this.rules[68].opcodes=[],this.rules[68].opcodes[0]={type:2,children:[1,2]},this.rules[68].opcodes[1]={type:4,index:4},this.rules[68].opcodes[2]={type:3,min:0,max:1/0},this.rules[68].opcodes[3]={type:4,index:69},this.rules[69].opcodes=[],this.rules[69].opcodes[0]={type:2,children:[1,2,3]},this.rules[69].opcodes[1]={type:4,index:80},this.rules[69].opcodes[2]={type:4,index:70},this.rules[69].opcodes[3]={type:4,index:81},this.rules[70].opcodes=[],this.rules[70].opcodes[0]={type:1,children:[1,2]},this.rules[70].opcodes[1]={type:4,index:71},this.rules[70].opcodes[2]={type:4,index:77},this.rules[71].opcodes=[],this.rules[71].opcodes[0]={type:2,children:[1,2,4]},this.rules[71].opcodes[1]={type:4,index:87},this.rules[71].opcodes[2]={type:3,min:0,max:1/0},this.rules[71].opcodes[3]={type:4,index:72},this.rules[71].opcodes[4]={type:4,index:87},this.rules[72].opcodes=[],this.rules[72].opcodes[0]={type:1,children:[1,2]},this.rules[72].opcodes[1]={type:4,index:73},this.rules[72].opcodes[2]={type:2,children:[3,4]},this.rules[72].opcodes[3]={type:4,index:10},this.rules[72].opcodes[4]={type:4,index:74},this.rules[73].opcodes=[],this.rules[73].opcodes[0]={type:1,children:[1,2,3,4]},this.rules[73].opcodes[1]={type:5,min:32,max:38},this.rules[73].opcodes[2]={type:5,min:40,max:91},this.rules[73].opcodes[3]={type:5,min:93,max:55295},this.rules[73].opcodes[4]={type:5,min:57344,max:1114111},this.rules[74].opcodes=[],this.rules[74].opcodes[0]={type:1,children:[1,2,3,4,5,6,7,8]},this.rules[74].opcodes[1]={type:6,string:[98]},this.rules[74].opcodes[2]={type:6,string:[102]},this.rules[74].opcodes[3]={type:6,string:[110]},this.rules[74].opcodes[4]={type:6,string:[114]},this.rules[74].opcodes[5]={type:6,string:[116]},this.rules[74].opcodes[6]={type:7,string:[39]},this.rules[74].opcodes[7]={type:7,string:[92]},this.rules[74].opcodes[8]={type:2,children:[9,10]},this.rules[74].opcodes[9]={type:6,string:[117]},this.rules[74].opcodes[10]={type:4,index:75},this.rules[75].opcodes=[],this.rules[75].opcodes[0]={type:2,children:[1,2,3]},this.rules[75].opcodes[1]={type:7,string:[48]},this.rules[75].opcodes[2]={type:7,string:[48]},this.rules[75].opcodes[3]={type:1,children:[4,7,10,13]},this.rules[75].opcodes[4]={type:2,children:[5,6]},this.rules[75].opcodes[5]={type:7,string:[48]},this.rules[75].opcodes[6]={type:5,min:48,max:55},this.rules[75].opcodes[7]={type:2,children:[8,9]},this.rules[75].opcodes[8]={type:7,string:[48]},this.rules[75].opcodes[9]={type:6,string:[98]},this.rules[75].opcodes[10]={type:2,children:[11,12]},this.rules[75].opcodes[11]={type:7,string:[48]},this.rules[75].opcodes[12]={type:5,min:101,max:102},this.rules[75].opcodes[13]={type:2,children:[14,15]},this.rules[75].opcodes[14]={type:7,string:[49]},this.rules[75].opcodes[15]={type:4,index:76},this.rules[76].opcodes=[],this.rules[76].opcodes[0]={type:1,children:[1,2]},this.rules[76].opcodes[1]={type:4,index:65},this.rules[76].opcodes[2]={type:5,min:97,max:102},this.rules[77].opcodes=[],this.rules[77].opcodes[0]={type:1,children:[1,2]},this.rules[77].opcodes[1]={type:7,string:[48]},this.rules[77].opcodes[2]={type:2,children:[3,4]},this.rules[77].opcodes[3]={type:4,index:21},this.rules[77].opcodes[4]={type:3,min:0,max:1/0},this.rules[77].opcodes[5]={type:4,index:65},this.rules[78].opcodes=[],this.rules[78].opcodes[0]={type:7,string:[46]},this.rules[79].opcodes=[],this.rules[79].opcodes[0]={type:7,string:[46,46]},this.rules[80].opcodes=[],this.rules[80].opcodes[0]={type:7,string:[91]},this.rules[81].opcodes=[],this.rules[81].opcodes[0]={type:7,string:[93]},this.rules[82].opcodes=[],this.rules[82].opcodes[0]={type:7,string:[40]},this.rules[83].opcodes=[],this.rules[83].opcodes[0]={type:7,string:[41]},this.rules[84].opcodes=[],this.rules[84].opcodes[0]={type:7,string:[44]},this.rules[85].opcodes=[],this.rules[85].opcodes[0]={type:7,string:[58]},this.rules[86].opcodes=[],this.rules[86].opcodes[0]={type:6,string:[34]},this.rules[87].opcodes=[],this.rules[87].opcodes[0]={type:6,string:[39]},this.rules[88].opcodes=[],this.rules[88].opcodes[0]={type:7,string:[63]},this.rules[89].opcodes=[],this.rules[89].opcodes[0]={type:7,string:[124,124]},this.rules[90].opcodes=[],this.rules[90].opcodes[0]={type:7,string:[38,38]},this.toString=function(){let e="";return e+="; JSONPath: Query Expressions for JSON\n",e+="; https://www.rfc-editor.org/rfc/rfc9535\n",e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#section-2.1.1\n",e+="jsonpath-query = root-identifier segments\n",e+="segments = *(S segment)\n",e+="\n",e+="B = %x20 / ; Space\n",e+=" %x09 / ; Horizontal tab\n",e+=" %x0A / ; Line feed or New line\n",e+=" %x0D ; Carriage return\n",e+="S = *B ; optional blank space\n",e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#section-2.2.1\n",e+='root-identifier = "$"\n',e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#section-2.3\n",e+="selector = name-selector /\n",e+=" wildcard-selector /\n",e+=" slice-selector /\n",e+=" index-selector /\n",e+=" filter-selector\n",e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#section-2.3.1.1\n",e+="name-selector = string-literal\n",e+="\n",e+='string-literal = dquote *double-quoted dquote / ; "string", MODIFICATION: surrogate text rule used\n',e+=" squote *single-quoted squote ; 'string', MODIFICATION: surrogate text rule used\n",e+="\n",e+="double-quoted = unescaped /\n",e+=" %x27 / ; '\n",e+=' ESC %x22 / ; \\"\n',e+=" ESC escapable\n",e+="\n",e+="single-quoted = unescaped /\n",e+=' %x22 / ; "\n',e+=" ESC %x27 / ; \\'\n",e+=" ESC escapable\n",e+="\n",e+="ESC = %x5C ; \\ backslash\n",e+="\n",e+="unescaped = %x20-21 / ; see RFC 8259\n",e+=' ; omit 0x22 "\n',e+=" %x23-26 /\n",e+=" ; omit 0x27 '\n",e+=" %x28-5B /\n",e+=" ; omit 0x5C \\\n",e+=" %x5D-D7FF /\n",e+=" ; skip surrogate code points\n",e+=" %xE000-10FFFF\n",e+="\n",e+="escapable = %x62 / ; b BS backspace U+0008\n",e+=" %x66 / ; f FF form feed U+000C\n",e+=" %x6E / ; n LF line feed U+000A\n",e+=" %x72 / ; r CR carriage return U+000D\n",e+=" %x74 / ; t HT horizontal tab U+0009\n",e+=' "/" / ; / slash (solidus) U+002F\n',e+=' "\\" / ; \\ backslash (reverse solidus) U+005C\n',e+=" (%x75 hexchar) ; uXXXX U+XXXX\n",e+="\n",e+="hexchar = non-surrogate /\n",e+=' (high-surrogate "\\" %x75 low-surrogate)\n',e+='non-surrogate = ((DIGIT / "A"/"B"/"C" / "E"/"F") 3HEXDIG) /\n',e+=' ("D" %x30-37 2HEXDIG )\n',e+='high-surrogate = "D" ("8"/"9"/"A"/"B") 2HEXDIG\n',e+='low-surrogate = "D" ("C"/"D"/"E"/"F") 2HEXDIG\n',e+="\n",e+='HEXDIG = DIGIT / "A" / "B" / "C" / "D" / "E" / "F"\n',e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#section-2.3.2.1\n",e+='wildcard-selector = "*"\n',e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#section-2.3.3.1\n",e+="index-selector = int ; decimal integer\n",e+="\n",e+='int = "0" /\n',e+=' (["-"] DIGIT1 *DIGIT) ; - optional\n',e+="DIGIT1 = %x31-39 ; 1-9 non-zero digit\n",e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#section-2.3.4.1\n",e+="slice-selector = [start S] colon S [end S] [colon [S step ]] ; MODIFICATION: surrogate text rule used\n",e+="\n",e+="start = int ; included in selection\n",e+="end = int ; not included in selection\n",e+="step = int ; default: 1\n",e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#section-2.3.5.1\n",e+="filter-selector = questionmark S logical-expr ; MODIFICATION: surrogate text rule used\n",e+="\n",e+="logical-expr = logical-or-expr\n",e+="logical-or-expr = logical-and-expr *(S disjunction S logical-and-expr) ; MODIFICATION: surrogate text rule used\n",e+=" ; disjunction\n",e+=" ; binds less tightly than conjunction\n",e+="logical-and-expr = basic-expr *(S conjunction S basic-expr) ; MODIFICATION: surrogate text rule used\n",e+=" ; conjunction\n",e+=" ; binds more tightly than disjunction\n",e+="\n",e+="basic-expr = paren-expr /\n",e+=" comparison-expr /\n",e+=" test-expr\n",e+="\n",e+="paren-expr = [logical-not-op S] left-paren S logical-expr S right-paren ; MODIFICATION: surrogate text rule used\n",e+=" ; parenthesized expression\n",e+='logical-not-op = "!" ; logical NOT operator\n',e+="\n",e+="test-expr = [logical-not-op S]\n",e+=" (filter-query / ; existence/non-existence\n",e+=" function-expr) ; LogicalType or NodesType\n",e+="filter-query = rel-query / jsonpath-query\n",e+="rel-query = current-node-identifier segments\n",e+='current-node-identifier = "@"\n',e+="\n",e+="comparison-expr = comparable S comparison-op S comparable\n",e+="literal = number / string-literal /\n",e+=" true / false / null\n",e+="comparable = singular-query / ; singular query value\n",e+=" function-expr / ; ValueType\n",e+=" literal\n",e+=" ; MODIFICATION: https://www.rfc-editor.org/errata/eid8352\n",e+='comparison-op = "==" / "!=" /\n',e+=' "<=" / ">=" /\n',e+=' "<" / ">"\n',e+="\n",e+="singular-query = rel-singular-query / abs-singular-query\n",e+="rel-singular-query = current-node-identifier singular-query-segments\n",e+="abs-singular-query = root-identifier singular-query-segments\n",e+="singular-query-segments = *(S (name-segment / index-segment))\n",e+="name-segment = (left-bracket name-selector right-bracket) / ; MODIFICATION: surrogate text rule used\n",e+=" (dot-prefix member-name-shorthand) ; MODIFICATION: surrogate text rule used\n",e+="index-segment = left-bracket index-selector right-bracket ; MODIFICATION: surrogate text rule used\n",e+="\n",e+='number = (int / "-0") [ frac ] [ exp ] ; decimal number\n',e+='frac = "." 1*DIGIT ; decimal fraction\n',e+='exp = "e" [ "-" / "+" ] 1*DIGIT ; decimal exponent\n',e+="true = %x74.72.75.65 ; true\n",e+="false = %x66.61.6c.73.65 ; false\n",e+="null = %x6e.75.6c.6c ; null\n",e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#section-2.4\n",e+="function-name = function-name-first *function-name-char\n",e+="function-name-first = LCALPHA\n",e+='function-name-char = function-name-first / "_" / DIGIT\n',e+='LCALPHA = %x61-7A ; "a".."z"\n',e+="\n",e+="function-expr = function-name left-paren S [function-argument ; MODIFICATION: surrogate text rule used\n",e+=" *(S comma S function-argument)] S right-paren ; MODIFICATION: surrogate text rule used\n",e+="function-argument = logical-expr / ; MODIFICATION: https://www.rfc-editor.org/errata/eid8343\n",e+=" filter-query / ; (includes singular-query)\n",e+=" function-expr /\n",e+=" literal\n",e+="\n",e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#section-2.5\n",e+="segment = child-segment / descendant-segment\n",e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#section-2.5.1.1\n",e+="child-segment = bracketed-selection /\n",e+=" (dot-prefix ; MODIFICATION: surrogate text rule used\n",e+=" (wildcard-selector /\n",e+=" member-name-shorthand))\n",e+="\n",e+="bracketed-selection = left-bracket S selector *(S comma S selector) S right-bracket\n",e+=" ; MODIFICATION: surrogate text rule used\n",e+="\n",e+="member-name-shorthand = name-first *name-char\n",e+="name-first = ALPHA /\n",e+=' "_" /\n',e+=" %x80-D7FF /\n",e+=" ; skip surrogate code points\n",e+=" %xE000-10FFFF\n",e+="name-char = name-first / DIGIT\n",e+="\n",e+="DIGIT = %x30-39 ; 0-9\n",e+="ALPHA = %x41-5A / %x61-7A ; A-Z / a-z\n",e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#section-2.5.2.1\n",e+="descendant-segment = double-dot-prefix (bracketed-selection / ; MODIFICATION: surrogate text rule used\n",e+=" wildcard-selector /\n",e+=" member-name-shorthand)\n",e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#name-normalized-paths\n",e+="normalized-path = root-identifier *(normal-index-segment)\n",e+="normal-index-segment = left-bracket normal-selector right-bracket ; MODIFICATION: surrogate text rule used\n",e+="normal-selector = normal-name-selector / normal-index-selector\n",e+="normal-name-selector = squote *normal-single-quoted squote ; 'string', MODIFICATION: surrogate text rule used\n",e+="normal-single-quoted = normal-unescaped /\n",e+=" ESC normal-escapable\n",e+="normal-unescaped = ; omit %x0-1F control codes\n",e+=" %x20-26 /\n",e+=" ; omit 0x27 '\n",e+=" %x28-5B /\n",e+=" ; omit 0x5C \\\n",e+=" %x5D-D7FF /\n",e+=" ; skip surrogate code points\n",e+=" %xE000-10FFFF\n",e+="\n",e+="normal-escapable = %x62 / ; b BS backspace U+0008\n",e+=" %x66 / ; f FF form feed U+000C\n",e+=" %x6E / ; n LF line feed U+000A\n",e+=" %x72 / ; r CR carriage return U+000D\n",e+=" %x74 / ; t HT horizontal tab U+0009\n",e+=" \"'\" / ; ' apostrophe U+0027\n",e+=' "\\" / ; \\ backslash (reverse solidus) U+005C\n',e+=" (%x75 normal-hexchar)\n",e+=" ; certain values u00xx U+00XX\n",e+='normal-hexchar = "0" "0"\n',e+=" (\n",e+=' ("0" %x30-37) / ; "00"-"07"\n',e+=" ; omit U+0008-U+000A BS HT LF\n",e+=' ("0" %x62) / ; "0b"\n',e+=" ; omit U+000C-U+000D FF CR\n",e+=' ("0" %x65-66) / ; "0e"-"0f"\n',e+=' ("1" normal-HEXDIG)\n',e+=" )\n",e+='normal-HEXDIG = DIGIT / %x61-66 ; "0"-"9", "a"-"f"\n',e+='normal-index-selector = "0" / (DIGIT1 *DIGIT)\n',e+=" ; non-negative decimal integer\n",e+="\n",e+="; Surrogate named rules\n",e+='dot-prefix = "."\n',e+='double-dot-prefix = ".."\n',e+='left-bracket = "["\n',e+='right-bracket = "]"\n',e+='left-paren = "("\n',e+='right-paren = ")"\n',e+='comma = ","\n',e+='colon = ":"\n',e+='dquote = %x22 ; "\n',e+="squote = %x27 ; '\n",e+='questionmark = "?"\n',e+='disjunction = "||"\n',e+='conjunction = "&&"\n','; JSONPath: Query Expressions for JSON\n; https://www.rfc-editor.org/rfc/rfc9535\n\n; https://www.rfc-editor.org/rfc/rfc9535#section-2.1.1\njsonpath-query = root-identifier segments\nsegments = *(S segment)\n\nB = %x20 / ; Space\n %x09 / ; Horizontal tab\n %x0A / ; Line feed or New line\n %x0D ; Carriage return\nS = *B ; optional blank space\n\n; https://www.rfc-editor.org/rfc/rfc9535#section-2.2.1\nroot-identifier = "$"\n\n; https://www.rfc-editor.org/rfc/rfc9535#section-2.3\nselector = name-selector /\n wildcard-selector /\n slice-selector /\n index-selector /\n filter-selector\n\n; https://www.rfc-editor.org/rfc/rfc9535#section-2.3.1.1\nname-selector = string-literal\n\nstring-literal = dquote *double-quoted dquote / ; "string", MODIFICATION: surrogate text rule used\n squote *single-quoted squote ; \'string\', MODIFICATION: surrogate text rule used\n\ndouble-quoted = unescaped /\n %x27 / ; \'\n ESC %x22 / ; \\"\n ESC escapable\n\nsingle-quoted = unescaped /\n %x22 / ; "\n ESC %x27 / ; \\\'\n ESC escapable\n\nESC = %x5C ; \\ backslash\n\nunescaped = %x20-21 / ; see RFC 8259\n ; omit 0x22 "\n %x23-26 /\n ; omit 0x27 \'\n %x28-5B /\n ; omit 0x5C \\\n %x5D-D7FF /\n ; skip surrogate code points\n %xE000-10FFFF\n\nescapable = %x62 / ; b BS backspace U+0008\n %x66 / ; f FF form feed U+000C\n %x6E / ; n LF line feed U+000A\n %x72 / ; r CR carriage return U+000D\n %x74 / ; t HT horizontal tab U+0009\n "/" / ; / slash (solidus) U+002F\n "\\" / ; \\ backslash (reverse solidus) U+005C\n (%x75 hexchar) ; uXXXX U+XXXX\n\nhexchar = non-surrogate /\n (high-surrogate "\\" %x75 low-surrogate)\nnon-surrogate = ((DIGIT / "A"/"B"/"C" / "E"/"F") 3HEXDIG) /\n ("D" %x30-37 2HEXDIG )\nhigh-surrogate = "D" ("8"/"9"/"A"/"B") 2HEXDIG\nlow-surrogate = "D" ("C"/"D"/"E"/"F") 2HEXDIG\n\nHEXDIG = DIGIT / "A" / "B" / "C" / "D" / "E" / "F"\n\n; https://www.rfc-editor.org/rfc/rfc9535#section-2.3.2.1\nwildcard-selector = "*"\n\n; https://www.rfc-editor.org/rfc/rfc9535#section-2.3.3.1\nindex-selector = int ; decimal integer\n\nint = "0" /\n (["-"] DIGIT1 *DIGIT) ; - optional\nDIGIT1 = %x31-39 ; 1-9 non-zero digit\n\n; https://www.rfc-editor.org/rfc/rfc9535#section-2.3.4.1\nslice-selector = [start S] colon S [end S] [colon [S step ]] ; MODIFICATION: surrogate text rule used\n\nstart = int ; included in selection\nend = int ; not included in selection\nstep = int ; default: 1\n\n; https://www.rfc-editor.org/rfc/rfc9535#section-2.3.5.1\nfilter-selector = questionmark S logical-expr ; MODIFICATION: surrogate text rule used\n\nlogical-expr = logical-or-expr\nlogical-or-expr = logical-and-expr *(S disjunction S logical-and-expr) ; MODIFICATION: surrogate text rule used\n ; disjunction\n ; binds less tightly than conjunction\nlogical-and-expr = basic-expr *(S conjunction S basic-expr) ; MODIFICATION: surrogate text rule used\n ; conjunction\n ; binds more tightly than disjunction\n\nbasic-expr = paren-expr /\n comparison-expr /\n test-expr\n\nparen-expr = [logical-not-op S] left-paren S logical-expr S right-paren ; MODIFICATION: surrogate text rule used\n ; parenthesized expression\nlogical-not-op = "!" ; logical NOT operator\n\ntest-expr = [logical-not-op S]\n (filter-query / ; existence/non-existence\n function-expr) ; LogicalType or NodesType\nfilter-query = rel-query / jsonpath-query\nrel-query = current-node-identifier segments\ncurrent-node-identifier = "@"\n\ncomparison-expr = comparable S comparison-op S comparable\nliteral = number / string-literal /\n true / false / null\ncomparable = singular-query / ; singular query value\n function-expr / ; ValueType\n literal\n ; MODIFICATION: https://www.rfc-editor.org/errata/eid8352\ncomparison-op = "==" / "!=" /\n "<=" / ">=" /\n "<" / ">"\n\nsingular-query = rel-singular-query / abs-singular-query\nrel-singular-query = current-node-identifier singular-query-segments\nabs-singular-query = root-identifier singular-query-segments\nsingular-query-segments = *(S (name-segment / index-segment))\nname-segment = (left-bracket name-selector right-bracket) / ; MODIFICATION: surrogate text rule used\n (dot-prefix member-name-shorthand) ; MODIFICATION: surrogate text rule used\nindex-segment = left-bracket index-selector right-bracket ; MODIFICATION: surrogate text rule used\n\nnumber = (int / "-0") [ frac ] [ exp ] ; decimal number\nfrac = "." 1*DIGIT ; decimal fraction\nexp = "e" [ "-" / "+" ] 1*DIGIT ; decimal exponent\ntrue = %x74.72.75.65 ; true\nfalse = %x66.61.6c.73.65 ; false\nnull = %x6e.75.6c.6c ; null\n\n; https://www.rfc-editor.org/rfc/rfc9535#section-2.4\nfunction-name = function-name-first *function-name-char\nfunction-name-first = LCALPHA\nfunction-name-char = function-name-first / "_" / DIGIT\nLCALPHA = %x61-7A ; "a".."z"\n\nfunction-expr = function-name left-paren S [function-argument ; MODIFICATION: surrogate text rule used\n *(S comma S function-argument)] S right-paren ; MODIFICATION: surrogate text rule used\nfunction-argument = logical-expr / ; MODIFICATION: https://www.rfc-editor.org/errata/eid8343\n filter-query / ; (includes singular-query)\n function-expr /\n literal\n\n\n; https://www.rfc-editor.org/rfc/rfc9535#section-2.5\nsegment = child-segment / descendant-segment\n\n; https://www.rfc-editor.org/rfc/rfc9535#section-2.5.1.1\nchild-segment = bracketed-selection /\n (dot-prefix ; MODIFICATION: surrogate text rule used\n (wildcard-selector /\n member-name-shorthand))\n\nbracketed-selection = left-bracket S selector *(S comma S selector) S right-bracket\n ; MODIFICATION: surrogate text rule used\n\nmember-name-shorthand = name-first *name-char\nname-first = ALPHA /\n "_" /\n %x80-D7FF /\n ; skip surrogate code points\n %xE000-10FFFF\nname-char = name-first / DIGIT\n\nDIGIT = %x30-39 ; 0-9\nALPHA = %x41-5A / %x61-7A ; A-Z / a-z\n\n; https://www.rfc-editor.org/rfc/rfc9535#section-2.5.2.1\ndescendant-segment = double-dot-prefix (bracketed-selection / ; MODIFICATION: surrogate text rule used\n wildcard-selector /\n member-name-shorthand)\n\n; https://www.rfc-editor.org/rfc/rfc9535#name-normalized-paths\nnormalized-path = root-identifier *(normal-index-segment)\nnormal-index-segment = left-bracket normal-selector right-bracket ; MODIFICATION: surrogate text rule used\nnormal-selector = normal-name-selector / normal-index-selector\nnormal-name-selector = squote *normal-single-quoted squote ; \'string\', MODIFICATION: surrogate text rule used\nnormal-single-quoted = normal-unescaped /\n ESC normal-escapable\nnormal-unescaped = ; omit %x0-1F control codes\n %x20-26 /\n ; omit 0x27 \'\n %x28-5B /\n ; omit 0x5C \\\n %x5D-D7FF /\n ; skip surrogate code points\n %xE000-10FFFF\n\nnormal-escapable = %x62 / ; b BS backspace U+0008\n %x66 / ; f FF form feed U+000C\n %x6E / ; n LF line feed U+000A\n %x72 / ; r CR carriage return U+000D\n %x74 / ; t HT horizontal tab U+0009\n "\'" / ; \' apostrophe U+0027\n "\\" / ; \\ backslash (reverse solidus) U+005C\n (%x75 normal-hexchar)\n ; certain values u00xx U+00XX\nnormal-hexchar = "0" "0"\n (\n ("0" %x30-37) / ; "00"-"07"\n ; omit U+0008-U+000A BS HT LF\n ("0" %x62) / ; "0b"\n ; omit U+000C-U+000D FF CR\n ("0" %x65-66) / ; "0e"-"0f"\n ("1" normal-HEXDIG)\n )\nnormal-HEXDIG = DIGIT / %x61-66 ; "0"-"9", "a"-"f"\nnormal-index-selector = "0" / (DIGIT1 *DIGIT)\n ; non-negative decimal integer\n\n; Surrogate named rules\ndot-prefix = "."\ndouble-dot-prefix = ".."\nleft-bracket = "["\nright-bracket = "]"\nleft-paren = "("\nright-paren = ")"\ncomma = ","\ncolon = ":"\ndquote = %x22 ; "\nsquote = %x27 ; \'\nquestionmark = "?"\ndisjunction = "||"\nconjunction = "&&"\n'}};const hn=class extends un{},dn=e=>{if(!Array.isArray(e))throw new hn("Selectors must be an array, got: "+typeof e,{selectors:e});try{return`$${e.map(e=>{if("string"==typeof e)return`['${(e=>{if("string"!=typeof e)throw new TypeError("Selector must be a string");let t="";for(const s of e){const e=s.codePointAt(0);switch(e){case 8:t+="\\b";break;case 9:t+="\\t";break;case 10:t+="\\n";break;case 12:t+="\\f";break;case 13:t+="\\r";break;case 39:t+="\\'";break;case 92:t+="\\\\";break;default:t+=e<=31?`\\u${e.toString(16).padStart(4,"0")}`:s}}return t})(e)}']`;if("number"==typeof e){if(!Number.isSafeInteger(e)||e<0)throw new TypeError(`Index selector must be a non-negative safe integer, got: ${e}`);return`[${e}]`}throw new TypeError("Selector must be a string or non-negative integer, got: "+typeof e)}).join("")}`}catch(t){throw new hn("Failed to compile normalized JSONPath",{cause:t,selectors:e})}},pn=(e,t,s,n)=>{const{realm:r}=e,{value:i}=s;if(r.isObject(t)&&r.hasProperty(t,i)){n(r.getProperty(t,i),i)}},mn=(e,t,s,n)=>{const{realm:r}=e,{value:i}=s;if(!r.isArray(t))return;const o=r.getLength(t),c=((e,t)=>e>=0?e:t+e)(i,o);if(c>=0&&c<o){n(r.getElement(t,c),c)}},fn=(e,t,s,n)=>{const{realm:r}=e;for(const[e,s]of r.entries(t))n(s,e)},yn=(e,t)=>e>=0?Math.min(e,t):Math.max(t+e,0),gn=(e,t,s,n)=>{const{realm:r}=e,{start:i,end:o,step:c}=s;if(!r.isArray(t))return;const a=((e,t,s,n)=>{const r=s??1;if(0===r)return null;let i,o;if(r>0){const s=0,r=n,c=null!==e?yn(e,n):s,a=null!==t?yn(t,n):r;i=Math.max(c,0),o=Math.min(a,n)}else{const s=n-1,r=-n-1,c=null!==e?e>=0?Math.min(e,n-1):Math.max(n+e,-1):s,a=null!==t?t>=0?Math.min(t,n-1):Math.max(n+t,-1):r;o=Math.min(c,n-1),i=Math.max(a,-1)}return{lower:i,upper:o,step:r}})(i,o,c,r.getLength(t));if(null===a)return;const{lower:l,upper:u,step:h}=a;if(h>0)for(let e=l;e<u;e+=h){n(r.getElement(t,e),e)}else for(let e=u;e>l;e+=h){n(r.getElement(t,e),e)}},xn=(e,t,s,n)=>n.value,bn=(e,t,s)=>{const{realm:n}=e,{selector:r}=s;switch(r.type){case"NameSelector":{const{value:e}=r;return n.isObject(t)&&n.hasProperty(t,e)?n.getProperty(t,e):void 0}case"IndexSelector":{const{value:e}=r;if(!n.isArray(t))return;const s=n.getLength(t),i=e>=0?e:s+e;return i>=0&&i<s?n.getElement(t,i):void 0}default:return}},vn=(e,t,s,n)=>{const{selectors:r}=s;for(const s of r)Tn(e,t,s,n)},Sn=(e,t,s)=>{const n=[],r=e=>{n.push(e)},{selector:i}=s;switch(i.type){case"BracketedSelection":vn(e,t,i,r);break;case"NameSelector":case"WildcardSelector":case"IndexSelector":case"SliceSelector":case"FilterSelector":Tn(e,t,i,r)}return n},wn=(e,t,s,n)=>{let r=s;for(const t of n){const s=[];if("DescendantSegment"===t.type){const n=r=>{const{realm:i}=e,o=Sn(e,r,t);s.push(...o);for(const[,e]of i.entries(r))n(e)};for(const e of r)n(e)}else for(const n of r){const r=Sn(e,n,t);s.push(...r)}r=s}return r},On=(e,t,s,n)=>{const{query:r}=n;let i;switch(r.type){case"RelQuery":i=((e,t,s,n)=>{const{segments:r}=n;return 0===r.length?[s]:wn(e,0,[s],r)})(e,0,s,r);break;case"JsonPathQuery":i=((e,t,s,n)=>{const{segments:r}=n;return 0===r.length?[t]:wn(e,0,[t],r)})(e,t,0,r);break;default:i=[]}return o=i,Object.defineProperty(o,"_isNodelist",{value:!0,enumerable:!1,writable:!1}),o;var o};let jn;const kn=(e,t,s,n)=>{const{name:r,arguments:i}=n,o=e.functions[r];if("function"!=typeof o)return;const c=i.map(n=>((e,t,s,n)=>{switch(n.type){case"Literal":case"RelSingularQuery":case"AbsSingularQuery":case"FunctionExpr":return En(e,t,s,n);case"FilterQuery":return On(e,t,s,n);case"TestExpr":return"FilterQuery"===n.expression.type?On(e,t,s,n.expression):"FunctionExpr"===n.expression.type?En(e,t,s,n.expression):jn(e,t,s,n);case"LogicalOrExpr":case"LogicalAndExpr":case"LogicalNotExpr":case"ComparisonExpr":return jn(e,t,s,n);default:return}})(e,t,s,n));return o(e.realm,...c)},En=(e,t,s,n)=>{switch(n.type){case"Literal":return xn(e,t,s,n);case"RelSingularQuery":return((e,t,s,n)=>{let r=s;for(const t of n.segments)if(r=bn(e,r,t),void 0===r)return;return r})(e,0,s,n);case"AbsSingularQuery":return((e,t,s,n)=>{let r=t;for(const t of n.segments)if(r=bn(e,r,t),void 0===r)return;return r})(e,t,0,n);case"FunctionExpr":return kn(e,t,s,n);default:return}},An=(e,t,s,n)=>{const{left:r,op:i,right:o}=n,c=En(e,t,s,r),a=En(e,t,s,o);return e.realm.compare(c,i,a)},Fn=e=>Array.isArray(e),Nn=(e,t,s,n)=>{switch(n.type){case"LogicalOrExpr":return!!Nn(e,t,s,n.left)||Nn(e,t,s,n.right);case"LogicalAndExpr":return!!Nn(e,t,s,n.left)&&Nn(e,t,s,n.right);case"LogicalNotExpr":return!Nn(e,t,s,n.expression);case"TestExpr":{const{expression:r}=n;if("FilterQuery"===r.type){return On(e,t,s,r).length>0}if("FunctionExpr"===r.type){const n=kn(e,t,s,r);return"boolean"==typeof n?n:void 0!==n&&(Fn(n)?n.length>0:Boolean(n))}return!1}case"ComparisonExpr":return An(e,t,s,n);default:return!1}};jn=Nn;const In=Nn,Mn=(e,t,s,n)=>{const{realm:r,root:i}=e,{expression:o}=s;for(const[s,c]of r.entries(t)){In(e,i,c,o)&&n(c,s)}},Tn=(e,t,s,n)=>{switch(s.type){case"NameSelector":pn(e,t,s,n);break;case"IndexSelector":mn(e,t,s,n);break;case"WildcardSelector":fn(e,t,s,n);break;case"SliceSelector":gn(e,t,s,n);break;case"FilterSelector":Mn(e,t,s,n)}};new Map;class Pn{node;key;index;parent;parentPath;inList;#e=!1;#t=!1;#s=!1;#n=!1;#r;#i=!1;constructor(e,t,s,n,r){this.node=e,this.parent=t,this.parentPath=s,this.key=n,this.index=r&&"number"==typeof n?n:void 0,this.inList=r}get shouldSkip(){return this.#e}get shouldStop(){return this.#t}get removed(){return this.#s}isRoot(){return null===this.parentPath}get depth(){let e=0,t=this.parentPath;for(;null!==t;)e+=1,t=t.parentPath;return e}getAncestry(){const e=[];let t=this.parentPath;for(;null!==t;)e.push(t),t=t.parentPath;return e}getAncestorNodes(){return this.getAncestry().map(e=>e.node)}getPathKeys(){const e=[];let t=this;for(;null!==t&&void 0!==t.key;){const{key:s,parent:n,parentPath:r}=t;if(ns(n)&&"value"===s){if(!Yt(n.key))throw new TypeError("MemberElement.key must be a StringElement");e.unshift(n.key.toValue())}else ts(r?.node)&&"number"==typeof s&&e.unshift(s);t=t.parentPath}return e}formatPath(e="jsonpointer"){const t=this.getPathKeys();return 0===t.length?"jsonpath"===e?"$":"":"jsonpath"===e?dn(t):an(t)}findParent(e){let t=this.parentPath;for(;null!==t;){if(e(t))return t;t=t.parentPath}return null}find(e){return e(this)?this:this.findParent(e)}skip(){this.#e=!0}stop(){this.#t=!0}replaceWith(e){this.#i&&console.warn("Warning: replaceWith() called on a stale Path. This path belongs to a node whose visit has already completed. The replacement will have no effect. To replace a parent node, do so from the parent's own visitor."),this.#n=!0,this.#r=e,this.node=e}remove(){this.#i&&console.warn("Warning: remove() called on a stale Path. This path belongs to a node whose visit has already completed. The removal will have no effect. To remove a parent node, do so from the parent's own visitor."),this.#s=!0}_getReplacementNode(){return this.#r}_wasReplaced(){return this.#n}_reset(){this.#e=!1,this.#t=!1,this.#s=!1,this.#n=!1,this.#r=void 0}_markStale(){this.#i=!0}}const Dn=qe(1,We(Ws,ie(Ie,me("[object Promise]")))),Cn=e=>{const t=e?.element;return void 0===t||"element"===t?"Element":`${t.charAt(0).toUpperCase()}${t.slice(1)}Element`},$n=e=>Kt(e),Jn=e=>Ss(e),Ln=(e,t,s)=>{ns(e)?e.value=s:Array.isArray(e)?e[t]=null===s?void 0:s:null===s?delete e[t]:e[t]=s},_n=e=>ns(e)?["key","value"]:ts(e)||ss(e)?["content"]:[],Bn=(e,t)=>{if(void 0!==e[t])return e[t];const s=t.length;for(const n in e){if(!n.includes("|"))continue;const r=n.indexOf(t);if(-1===r)continue;const i=0===r||"|"===n[r-1],o=r+s===n.length||"|"===n[r+s];if(i&&o)return e[n]}},qn=(e,t,s)=>{if(void 0===t)return null;const n=e,r=s?"leave":"enter",i=Bn(n,t);if(!s&&"function"==typeof i)return i;if(null!=i){const e=i[r];if("function"==typeof e)return e}const o=n[r];if("function"==typeof o)return o;if(null!=o){const e=Bn(o,t);if("function"==typeof e)return e}return null},Rn=(e,t={})=>{const{visitFnGetter:s=qn,nodeTypeGetter:n=Cn,exposeEdits:r=!1}=t,i=Symbol("internal-skip"),o=Symbol("break"),c=new Array(e.length).fill(i);return{enter(t){let a=t.node,l=!1;for(let u=0;u<e.length;u+=1)if(c[u]===i){const i=s(e[u],n(a),!1);if("function"==typeof i){const s=Hn(t,a),n=i.call(e[u],s);if(Dn(n))throw new ds("Async visitor not supported in sync mode",{visitor:e[u],visitFn:i});if(s.shouldStop&&(c[u]=o),s.shouldSkip&&(c[u]=a),s.removed)return void t.remove();if(s._wasReplaced()){const e=s._getReplacementNode();if(!r)return t.replaceWith(e),e;a=e,l=!0}else if(void 0!==n){if(!r)return t.replaceWith(n),n;a=n,l=!0}}}if(c.every(e=>e===o)&&t.stop(),l)return t.replaceWith(a),a},leave(t){const r=t.node;for(let a=0;a<e.length;a+=1)if(c[a]===i){const i=s(e[a],n(r),!0);if("function"==typeof i){const s=Hn(t,r),n=i.call(e[a],s);if(Dn(n))throw new ds("Async visitor not supported in sync mode",{visitor:e[a],visitFn:i});if(s.shouldStop&&(c[a]=o),s.removed)return void t.remove();if(s._wasReplaced()){const e=s._getReplacementNode();return t.replaceWith(e),e}if(void 0!==n)return t.replaceWith(n),n}}else c[a]===r&&(c[a]=i);c.every(e=>e===o)&&t.stop()}}},Vn=(e,t={})=>{const{visitFnGetter:s=qn,nodeTypeGetter:n=Cn,exposeEdits:r=!1}=t,i=Symbol("internal-skip"),o=Symbol("break"),c=new Array(e.length).fill(i);return{async enter(t){let a=t.node,l=!1;for(let u=0;u<e.length;u+=1)if(c[u]===i){const i=s(e[u],n(a),!1);if("function"==typeof i){const s=Hn(t,a),n=await i.call(e[u],s);if(s.shouldStop&&(c[u]=o),s.shouldSkip&&(c[u]=a),s.removed)return void t.remove();if(s._wasReplaced()){const e=s._getReplacementNode();if(!r)return t.replaceWith(e),e;a=e,l=!0}else if(void 0!==n){if(!r)return t.replaceWith(n),n;a=n,l=!0}}}if(c.every(e=>e===o)&&t.stop(),l)return t.replaceWith(a),a},async leave(t){const r=t.node;for(let a=0;a<e.length;a+=1)if(c[a]===i){const i=s(e[a],n(r),!0);if("function"==typeof i){const s=Hn(t,r),n=await i.call(e[a],s);if(s.shouldStop&&(c[a]=o),s.removed)return void t.remove();if(s._wasReplaced()){const e=s._getReplacementNode();return t.replaceWith(e),e}if(void 0!==n)return t.replaceWith(n),n}}else c[a]===r&&(c[a]=i);c.every(e=>e===o)&&t.stop()}}};function Hn(e,t){return new Pn(t,e.parent,e.parentPath,e.key,e.inList)}function*Un(e,t,s){const{keyMap:n,state:r,nodeTypeGetter:i,nodePredicate:o,nodeCloneFn:c,detectCycles:a,skipVisited:l,mutable:u,mutationFn:h}=s,d="function"==typeof n,p=l?new WeakSet:null;let m,f,y=Array.isArray(e),g=[e],x=-1,b=[],v=e,S=null,w=null;const O=[];do{x+=1;const e=x===g.length;let s;const j=e&&0!==b.length;if(e){if(s=0===O.length?void 0:S?.key,v=f,f=O.pop(),w=S?.parentPath?.parentPath??null,j)if(u)for(const[e,t]of b)h(v,e,t);else if(y){v=v.slice();let e=0;for(const[t,s]of b){const n=t-e;null===s?(v.splice(n,1),e+=1):v[n]=s}}else{v=c(v);for(const[e,t]of b)v[e]=t}if(void 0!==m){x=m.index,g=m.keys,b=m.edits;const e=m.inArray;if(w=m.parentPath,m=m.prev,j&&!u){const t=e?x:g[x];b.push([t,v])}y=e}}else if(void 0!==f&&(s=y?x:g[x],v=f[s],void 0===v))continue;if(!Array.isArray(v)){if(!o(v))throw new ds(`Invalid AST Node: ${String(v)}`,{node:v});if(a&&O.includes(v))continue;if(l&&!e){if(p.has(v))continue;p.add(v)}S=new Pn(v,f,w,s,y);const n=qn(t,i(v),e);if(n){for(const[e,s]of Object.entries(r))t[e]=s;const i=yield{visitFn:n,path:S,isLeaving:e};if(S.shouldStop)break;if(S.removed){if(b.push([s,null]),!e)continue}else if(S._wasReplaced()){const t=S._getReplacementNode();if(b.push([s,t]),!e){if(S.shouldSkip)continue;if(!o(t))continue;v=t}}else if(S.shouldSkip){if(!e)continue}else if(void 0!==i&&(b.push([s,i]),!e)){if(!o(i))continue;v=i}S._markStale()}}if(!e){if(m={inArray:y,index:x,keys:g,edits:b,parentPath:w,prev:m},y=Array.isArray(v),y)g=v;else if(d)g=n(v);else{const e=i(v);g=void 0!==e?n[e]??[]:[]}x=-1,b=[],void 0!==f&&O.push(f),f=v,w=S}}while(void 0!==m);return 0!==b.length?b.at(-1)[1]:e}Rn[Symbol.for("nodejs.util.promisify.custom")]=Vn;const Gn=(e,t,s={})=>{const n=Un(e,t,{keyMap:s.keyMap??_n,state:s.state??{},nodeTypeGetter:s.nodeTypeGetter??Cn,nodePredicate:s.nodePredicate??$n,nodeCloneFn:s.nodeCloneFn??Jn,detectCycles:s.detectCycles??!0,skipVisited:s.skipVisited??!1,mutable:s.mutable??!1,mutationFn:s.mutationFn??Ln});let r=n.next();for(;!r.done;){const e=r.value,s=e.visitFn.call(t,e.path);if(Dn(s))throw new ds("Async visitor not supported in sync mode",{visitor:t,visitFn:e.visitFn});r=n.next(s)}return r.value},zn=async(e,t,s={})=>{const n=Un(e,t,{keyMap:s.keyMap??_n,state:s.state??{},nodeTypeGetter:s.nodeTypeGetter??Cn,nodePredicate:s.nodePredicate??$n,nodeCloneFn:s.nodeCloneFn??Jn,detectCycles:s.detectCycles??!0,skipVisited:s.skipVisited??!1,mutable:s.mutable??!1,mutationFn:s.mutationFn??Ln});let r=n.next();for(;!r.done;){const e=r.value,s=await e.visitFn.call(t,e.path);r=n.next(s)}return r.value};Gn[Symbol.for("nodejs.util.promisify.custom")]=zn,Pn.prototype.traverse=function(e,t){return Gn(this.node,e,t)},Pn.prototype.traverseAsync=function(e,t){return zn(this.node,e,t)};const Xn=class extends Js{specObj;passingOptionsNames=["specObj","parent","consume"];constructor({specObj:e,...t}){super({...t}),this.specObj=e}retrievePassingOptions(){return Qs(this.passingOptionsNames,this)}retrieveFixedFields(e){const t=B(["visitors",...e,"fixedFields"],this.specObj);return"object"==typeof t&&null!==t?Object.keys(t):[]}retrieveVisitor(e){return Me(ct,["visitors",...e],this.specObj)?B(["visitors",...e],this.specObj):B(["visitors",...e,"$visitor"],this.specObj)}retrieveVisitorInstance(e,t={}){const s=this.retrievePassingOptions();return new(this.retrieveVisitor(e))({...s,...t})}toRefractedElement(e,t,s={}){const n=this.retrieveVisitorInstance(e,s);return n instanceof Ls&&n?.constructor===Ls?this.consume?t:xs(t):(Gn(t,n,s),n.element)}};const Wn=class extends Xn{specPath;ignoredFields;constructor({specPath:e,ignoredFields:t,...s}){super({...s}),this.specPath=e,this.ignoredFields=t||[]}ObjectElement(e){const t=e.node,s=this.specPath(t),n=this.retrieveFixedFields(s);t.forEach((e,t,r)=>{const i=Ns(t);if(Yt(t)&&n.includes(i)&&!this.ignoredFields.includes(i)){const n=this.toRefractedElement([...s,"fixedFields",i],e),o=new _t(this.consume?t:xs(t),n);this.copyMetaAndAttributes(r,o),this.element.content.push(o),this.consume&&this.consumeSafe&&!r.isFrozen&&(r.value=void 0)}else this.ignoredFields.includes(i)||this.element.content.push(this.consume?r:xs(r))}),this.copyMetaAndAttributes(t,this.element),e.stop()}},Kn=(e,t,s=[])=>{const n=Object.getOwnPropertyDescriptors(t);for(let e of s)delete n[e];Object.defineProperties(e,n)},Yn=(e,t=[e])=>{const s=Object.getPrototypeOf(e);return null===s?t:Yn(s,[...t,s])},Qn=(e,t,s=[])=>{var n;const r=null!==(n=((...e)=>{if(0===e.length)return;let t;const s=e.map(e=>Yn(e));for(;s.every(e=>e.length>0);){const e=s.map(e=>e.pop()),n=e[0];if(!e.every(e=>e===n))break;t=n}return t})(...e))&&void 0!==n?n:Object.prototype,i=Object.create(r),o=Yn(r);for(let t of e){let e=Yn(t);for(let t=e.length-1;t>=0;t--){let n=e[t];-1===o.indexOf(n)&&(Kn(i,n,["constructor",...s]),o.push(n))}}return i.constructor=t,i},Zn=e=>e.filter((t,s)=>e.indexOf(t)==s),er=(e,t)=>{const s=t.map(e=>Yn(e));let n=0,r=!0;for(;r;){r=!1;for(let i=t.length-1;i>=0;i--){const t=s[i][n];if(null!=t&&(r=!0,null!=Object.getOwnPropertyDescriptor(t,e)))return s[i][0]}n++}},tr=(e,t=Object.prototype)=>new Proxy({},{getPrototypeOf:()=>t,setPrototypeOf(){throw Error("Cannot set prototype of Proxies created by ts-mixer")},getOwnPropertyDescriptor:(t,s)=>Object.getOwnPropertyDescriptor(er(s,e)||{},s),defineProperty(){throw new Error("Cannot define new properties on Proxies created by ts-mixer")},has:(s,n)=>void 0!==er(n,e)||void 0!==t[n],get:(s,n)=>(er(n,e)||t)[n],set(t,s,n){const r=er(s,e);if(void 0===r)throw new Error("Cannot set new properties on Proxies created by ts-mixer");return r[s]=n,!0},deleteProperty(){throw new Error("Cannot delete properties on Proxies created by ts-mixer")},ownKeys:()=>e.map(Object.getOwnPropertyNames).reduce((e,t)=>t.concat(e.filter(e=>t.indexOf(e)<0)))}),sr=null,nr="copy",rr="copy",ir="deep",or=new WeakMap,cr=e=>or.get(e),ar=(e,t)=>{var s,n;const r=Zn([...Object.getOwnPropertyNames(e),...Object.getOwnPropertyNames(t)]),i={};for(let o of r)i[o]=Zn([...null!==(s=null==e?void 0:e[o])&&void 0!==s?s:[],...null!==(n=null==t?void 0:t[o])&&void 0!==n?n:[]]);return i},lr=(e,t)=>{var s,n,r,i;return{property:ar(null!==(s=null==e?void 0:e.property)&&void 0!==s?s:{},null!==(n=null==t?void 0:t.property)&&void 0!==n?n:{}),method:ar(null!==(r=null==e?void 0:e.method)&&void 0!==r?r:{},null!==(i=null==t?void 0:t.method)&&void 0!==i?i:{})}},ur=(e,t)=>{var s,n,r,i,o,c;return{class:Zn([...null!==(s=null==e?void 0:e.class)&&void 0!==s?s:[],...null!==(n=null==t?void 0:t.class)&&void 0!==n?n:[]]),static:lr(null!==(r=null==e?void 0:e.static)&&void 0!==r?r:{},null!==(i=null==t?void 0:t.static)&&void 0!==i?i:{}),instance:lr(null!==(o=null==e?void 0:e.instance)&&void 0!==o?o:{},null!==(c=null==t?void 0:t.instance)&&void 0!==c?c:{})}},hr=new Map,dr=(...e)=>{const t=((...e)=>{var t;const s=new Set,n=new Set([...e]);for(;n.size>0;)for(let e of n){const r=[...Yn(e.prototype).map(e=>e.constructor),...null!==(t=cr(e))&&void 0!==t?t:[]].filter(e=>!s.has(e));for(let e of r)n.add(e);s.add(e),n.delete(e)}return[...s]})(...e).map(e=>hr.get(e)).filter(e=>!!e);return 0==t.length?{}:1==t.length?t[0]:t.reduce((e,t)=>ur(e,t))},pr=e=>{let t=hr.get(e);return t||(t={},hr.set(e,t)),t};function mr(...e){var t,s,n;const r=e.map(e=>e.prototype),i=sr;if(null!==i){const e=r.map(e=>e[i]).filter(e=>"function"==typeof e),t=function(...t){for(let s of e)s.apply(this,t)},s={[i]:t};r.push(s)}function o(...t){for(const s of e)Kn(this,new s(...t));null!==i&&"function"==typeof this[i]&&this[i].apply(this,t)}var c,a;o.prototype="copy"===rr?Qn(r,o):(c=r,a=o,tr([...c,{constructor:a}])),Object.setPrototypeOf(o,"copy"===nr?Qn(e,null,["prototype"]):tr(e,Function.prototype));let l=o;if("none"!==ir){const r="deep"===ir?dr(...e):((...e)=>{const t=e.map(e=>pr(e));return 0===t.length?{}:1===t.length?t[0]:t.reduce((e,t)=>ur(e,t))})(...e);for(let e of null!==(t=null==r?void 0:r.class)&&void 0!==t?t:[]){const t=e(l);t&&(l=t)}fr(null!==(s=null==r?void 0:r.static)&&void 0!==s?s:{},l),fr(null!==(n=null==r?void 0:r.instance)&&void 0!==n?n:{},l.prototype)}var u,h;return u=l,h=e,or.set(u,h),l}const fr=(e,t)=>{const s=e.property,n=e.method;if(s)for(let e in s)for(let n of s[e])n(t,e);if(n)for(let e in n)for(let s of n[e])s(t,e,Object.getOwnPropertyDescriptor(t,e))};const yr=function(){return!1};const gr=class extends Xn{specPath;ignoredFields;fieldPatternPredicate=yr;constructor({specPath:e,ignoredFields:t,fieldPatternPredicate:s,...n}){super({...n}),this.specPath=e,this.ignoredFields=t||[],"function"==typeof s&&(this.fieldPatternPredicate=s)}ObjectElement(e){const t=e.node;t.forEach((e,t,s)=>{const n=Ns(t);if(!this.ignoredFields.includes(n)&&this.fieldPatternPredicate(n)){const n=this.specPath(e),r=this.toRefractedElement(n,e),i=new _t(this.consume?t:xs(t),r);this.copyMetaAndAttributes(s,i),i.classes.push("patterned-field"),this.element.content.push(i),this.consume&&this.consumeSafe&&!s.isFrozen&&(s.value=void 0)}else this.ignoredFields.includes(n)||this.element.content.push(this.consume?s:xs(s))}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const xr=class extends gr{constructor(e){super(e),this.fieldPatternPredicate=Ys}};const br=class{parent;constructor({parent:e}){this.parent=e}},vr=mr(Wn,br,Ls),Sr=mr(Wn,Ls),wr=mr(Wn,Ls),Or=mr(Wn,Ls),jr=mr(Xn,br,Ls),kr=mr(Xn,br,Ls),Er=mr(Xn,br,Ls),Ar=mr(Xn,br,Ls),Fr=mr(Xn,br,Ls),Nr=mr(xr,br,Ls),Ir=mr(xr,br,Ls),Mr=mr(xr,br,Ls),Tr=mr(xr,br,Ls);const Pr=class extends vr{constructor(e){super(e),this.element=new qt,this.consumeSafe=!0,this.specPath=_s(["document","objects","JSONSchema"])}get defaultDialectIdentifier(){return"http://json-schema.org/draft-04/schema#"}ObjectElement(e){const t=e.node;return this.handleDialectIdentifier(t),this.handleSchemaIdentifier(t),this.parent=this.element,Wn.prototype.ObjectElement.call(this,e)}handleDialectIdentifier(e){if(Rs(this.parent)&&!Yt(e.get("$schema")))this.element.meta.set("inheritedDialectIdentifier",this.defaultDialectIdentifier);else if(this.parent instanceof qt&&!Yt(e.get("$schema"))){const e=Bs(this.parent.meta.get("inheritedDialectIdentifier"),Ns(this.parent.$schema));this.element.meta.set("inheritedDialectIdentifier",e)}}handleSchemaIdentifier(e,t="id"){const s=void 0!==this.parent?[...this.parent.meta.get("ancestorsSchemaIdentifiers")??[]]:[],n=Ns(e.get(t));Ys(n)&&s.push(n),this.element.meta.set("ancestorsSchemaIdentifiers",s)}},Dr=e=>ss(e)&&e.hasKey("$ref");const Cr=class extends Ar{ObjectElement(e){const t=e.node,s=Dr(t)?["document","objects","JSONReference"]:["document","objects","JSONSchema"];this.element=this.toRefractedElement(s,t),e.stop()}ArrayElement(e){const t=e.node;this.element=new Wt,this.element.classes.push("json-schema-items"),t.forEach(e=>{const t=Dr(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],s=this.toRefractedElement(t,e);this.element.push(s)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const $r=class extends Ls{ArrayElement(e){super.enter(e),this.element.classes.push("json-schema-required")}};const Jr=class extends Tr{constructor(e){super(e),this.element=new Bt,this.element.classes.push("json-schema-properties"),this.specPath=e=>Dr(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}};const Lr=class extends Mr{constructor(e){super(e),this.element=new Bt,this.element.classes.push("json-schema-patternProperties"),this.specPath=e=>Dr(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}};const _r=class extends Ir{constructor(e){super(e),this.element=new Bt,this.element.classes.push("json-schema-dependencies"),this.specPath=e=>Dr(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}};const Br=class extends Ls{ArrayElement(e){super.enter(e),this.element.classes.push("json-schema-enum")}};const qr=class extends Ls{StringElement(e){super.enter(e),this.element.classes.push("json-schema-type")}ArrayElement(e){super.enter(e),this.element.classes.push("json-schema-type")}};const Rr=class extends jr{constructor(e){super(e),this.element=new Wt,this.element.classes.push("json-schema-allOf")}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=Dr(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],s=this.toRefractedElement(t,e);this.element.push(s)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const Vr=class extends kr{constructor(e){super(e),this.element=new Wt,this.element.classes.push("json-schema-anyOf")}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=Dr(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],s=this.toRefractedElement(t,e);this.element.push(s)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const Hr=class extends Er{constructor(e){super(e),this.element=new Wt,this.element.classes.push("json-schema-oneOf")}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=Dr(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],s=this.toRefractedElement(t,e);this.element.push(s)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const Ur=class extends Nr{constructor(e){super(e),this.element=new Bt,this.element.classes.push("json-schema-definitions"),this.specPath=e=>Dr(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}};const Gr=class extends Fr{constructor(e){super(e),this.element=new Wt,this.element.classes.push("json-schema-links")}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=this.toRefractedElement(["document","objects","LinkDescription"],e);this.element.push(t)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const zr=class extends Sr{constructor(e){super(e),this.element=new Rt,this.specPath=_s(["document","objects","JSONReference"])}ObjectElement(e){Wn.prototype.ObjectElement.call(this,e),Yt(this.element.$ref)&&this.element.classes.push("reference-element")}};const Xr=class extends Ls{StringElement(e){super.enter(e),this.element.classes.push("reference-value")}};const Wr=function(){return!0};const Kr=D(function(e,t,s){return qe(Math.max(e.length,t.length,s.length),function(){return e.apply(this,arguments)?t.apply(this,arguments):s.apply(this,arguments)})});const Yr=r(function(e){return function(t,s){return e(t,s)?-1:e(s,t)?1:0}});var Qr=g(function(e,t){return Array.prototype.slice.call(t,0).sort(e)});const Zr=Qr;const ei=r(function(e){return i(0,e)});function ti(e){return e&&e["@@transducer/reduced"]?e:{"@@transducer/value":e,"@@transducer/reduced":!0}}const si=r(ti);const ni=Ye(N);const ri=qe(1,ct(Array.isArray)?Array.isArray:ie(oe,le("Array")));const ii=We(ri,zs);function oi(e){return function(e){if(Array.isArray(e))return ci(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return ci(e,t);var s={}.toString.call(e).slice(8,-1);return"Object"===s&&e.constructor&&(s=e.constructor.name),"Map"===s||"Set"===s?Array.from(e):"Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?ci(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ci(e,t){(null==t||t>e.length)&&(t=e.length);for(var s=0,n=Array(t);s<t;s++)n[s]=e[s];return n}var ai=ie(Zr(Yr(function(e,t){return e.length>t.length})),ei,J("length")),li=mt(function(e,t,s){var n=s.apply(void 0,oi(e));return ni(n)?si(n):t});const ui=Kr(ii,function(e){var t=ai(e);return qe(t,function(){for(var t=arguments.length,s=new Array(t),n=0;n<t;n++)s[n]=arguments[n];return te(li(s),void 0,e)})},qs);const hi=class extends Xn{alternator;constructor({alternator:e,...t}){super({...t}),this.alternator=e}enter(e){const t=e.node,s=this.alternator.map(({predicate:e,specPath:t})=>Kr(e,_s(t),qs)),n=ui(s)(t);this.element=this.toRefractedElement(n,t),e.stop()}};const di=class extends hi{constructor(e){super(e),this.alternator=[{predicate:Dr,specPath:["document","objects","JSONReference"]},{predicate:Wr,specPath:["document","objects","JSONSchema"]}]}};const pi=class extends Or{constructor(e){super(e),this.element=new Vt,this.specPath=_s(["document","objects","Media"])}};const mi=class extends wr{constructor(e){super(e),this.element=new Ht,this.specPath=_s(["document","objects","LinkDescription"])}},fi={visitors:{value:Ls,JSONSchemaOrJSONReferenceVisitor:di,document:{objects:{JSONSchema:{element:"JSONSchemaDraft4",$visitor:Pr,fixedFields:{id:{$ref:"#/visitors/value",alias:"idField"},$schema:{$ref:"#/visitors/value"},multipleOf:{$ref:"#/visitors/value"},maximum:{$ref:"#/visitors/value"},exclusiveMaximum:{$ref:"#/visitors/value"},minimum:{$ref:"#/visitors/value"},exclusiveMinimum:{$ref:"#/visitors/value"},maxLength:{$ref:"#/visitors/value"},minLength:{$ref:"#/visitors/value"},pattern:{$ref:"#/visitors/value"},additionalItems:di,items:{$visitor:Cr,alias:"itemsField"},maxItems:{$ref:"#/visitors/value"},minItems:{$ref:"#/visitors/value"},uniqueItems:{$ref:"#/visitors/value"},maxProperties:{$ref:"#/visitors/value"},minProperties:{$ref:"#/visitors/value"},required:$r,properties:Jr,additionalProperties:di,patternProperties:Lr,dependencies:_r,enum:Br,type:qr,allOf:Rr,anyOf:Vr,oneOf:Hr,not:di,definitions:Ur,title:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},default:{$ref:"#/visitors/value"},format:{$ref:"#/visitors/value"},base:{$ref:"#/visitors/value"},links:{$visitor:Gr,alias:"linksField"},media:{$ref:"#/visitors/document/objects/Media"},readOnly:{$ref:"#/visitors/value"}}},JSONReference:{element:"JSONReference",$visitor:zr,fixedFields:{$ref:Xr}},Media:{element:"media",$visitor:pi,fixedFields:{binaryEncoding:{$ref:"#/visitors/value"},type:{$ref:"#/visitors/value"}}},LinkDescription:{element:"linkDescription",$visitor:mi,fixedFields:{href:{$ref:"#/visitors/value"},rel:{$ref:"#/visitors/value"},title:{$ref:"#/visitors/value"},targetSchema:di,mediaType:{$ref:"#/visitors/value"},method:{$ref:"#/visitors/value"},encType:{$ref:"#/visitors/value"},schema:di}}}}}},yi=kt(fi),gi=e=>Object.entries(e).map(([e,t])=>ht(t)?{name:e,...t}:{name:e,$visitor:t});Object.defineProperty(qt,"fixedFields",{get:()=>gi(yi.visitors.document.objects.JSONSchema.fixedFields),enumerable:!0}),Object.defineProperty(Rt,"fixedFields",{get:()=>gi(yi.visitors.document.objects.JSONReference.fixedFields),enumerable:!0}),Object.defineProperty(Vt,"fixedFields",{get:()=>gi(yi.visitors.document.objects.Media.fixedFields),enumerable:!0}),Object.defineProperty(Ht,"fixedFields",{get:()=>gi(yi.visitors.document.objects.LinkDescription.fixedFields),enumerable:!0});const xi=class extends qt{constructor(e,t,s){super(e,t,s),this.element="JSONSchemaDraft6"}get idField(){throw new h("id keyword from Core vocabulary has been renamed to $id.")}set idField(e){throw new h("id keyword from Core vocabulary has been renamed to $id.")}get $id(){return this.get("$id")}set $id(e){this.set("$id",e)}get exclusiveMaximum(){return this.get("exclusiveMaximum")}set exclusiveMaximum(e){this.set("exclusiveMaximum",e)}get exclusiveMinimum(){return this.get("exclusiveMinimum")}set exclusiveMinimum(e){this.set("exclusiveMinimum",e)}get containsField(){return this.get("contains")}set containsField(e){this.set("contains",e)}get itemsField(){return this.get("items")}set itemsField(e){this.set("items",e)}get propertyNames(){return this.get("propertyNames")}set propertyNames(e){this.set("propertyNames",e)}get const(){return this.get("const")}set const(e){this.set("const",e)}get not(){return this.get("not")}set not(e){this.set("not",e)}get examples(){return this.get("examples")}set examples(e){this.set("examples",e)}};const bi=class extends Ht{get hrefSchema(){return this.get("hrefSchema")}set hrefSchema(e){this.set("hrefSchema",e)}get targetSchema(){return this.get("targetSchema")}set targetSchema(e){this.set("targetSchema",e)}get schema(){throw new h("schema keyword from Hyper-Schema vocabulary has been renamed to submissionSchema.")}set schema(e){throw new h("schema keyword from Hyper-Schema vocabulary has been renamed to submissionSchema.")}get submissionSchema(){return this.get("submissionSchema")}set submissionSchema(e){this.set("submissionSchema",e)}get method(){throw new h("method keyword from Hyper-Schema vocabulary has been removed.")}set method(e){throw new h("method keyword from Hyper-Schema vocabulary has been removed.")}get encType(){throw new h("encType keyword from Hyper-Schema vocabulary has been renamed to submissionEncType.")}set encType(e){throw new h("encType keyword from Hyper-Schema vocabulary has been renamed to submissionEncType.")}get submissionEncType(){return this.get("submissionEncType")}set submissionEncType(e){this.set("submissionEncType",e)}};var vi=D(function e(t,s,n){if(0===t.length)return s;var r=t[0];if(t.length>1){var i=$(r,n);(N(i)||"object"!=typeof i)&&(i=C(t[1])?[]:{}),s=e(Array.prototype.slice.call(t,1),s,i)}return function(e,t,s){if(C(e)&&V(s)){var n=e<0?s.length+e:e,r=[].concat(s);return r[n]=t,r}var i={};for(var o in s)i[o]=s[o];return i[e]=t,i}(r,s,n)});const Si=vi;const wi=D(function(e,t,s){var n=Array.prototype.slice.call(s,0);return n.splice(e,t),n});var Oi=D(function(e,t,s){return Si([e],t,s)});const ji=Oi;var ki=g(function e(t,s){if(null==s)return s;switch(t.length){case 0:return s;case 1:return function(e,t){if(null==t)return t;if(C(e)&&V(t))return wi(e,1,t);var s={};for(var n in t)s[n]=t[n];return delete s[e],s}(t[0],s);default:var n=t[0],r=Array.prototype.slice.call(t,1);return null==s[n]?function(e,t){if(C(e)&&V(t))return[].concat(t);var s={};for(var n in t)s[n]=t[n];return s}(n,s):ji(n,e(r,s[n]),s)}});const Ei=ki;const Ai=class extends Pr{constructor(e){super(e),this.element=new xi}get defaultDialectIdentifier(){return"http://json-schema.org/draft-06/schema#"}BooleanElement(e){this.enter(e),this.element.classes.push("boolean-json-schema")}handleSchemaIdentifier(e,t="$id"){return super.handleSchemaIdentifier(e,t)}};const Fi=class extends Cr{BooleanElement(e){this.element=this.toRefractedElement(["document","objects","JSONSchema"],e.node),e.stop()}};const Ni=class extends Ls{ArrayElement(e){this.enter(e),this.element.classes.push("json-schema-examples")}};const Ii=class extends mi{constructor(e){super(e),this.element=new bi}},Mi=ie(Si(["visitors","document","objects","JSONSchema","element"],"JSONSchemaDraft6"),Si(["visitors","document","objects","JSONSchema","$visitor"],Ai),Ei(["visitors","document","objects","JSONSchema","fixedFields","id"]),Si(["visitors","document","objects","JSONSchema","fixedFields","$id"],{$ref:"#/visitors/value"}),Si(["visitors","document","objects","JSONSchema","fixedFields","contains"],{$visitor:fi.visitors.JSONSchemaOrJSONReferenceVisitor,alias:"containsField"}),Si(["visitors","document","objects","JSONSchema","fixedFields","items"],{$visitor:Fi,alias:"itemsField"}),Si(["visitors","document","objects","JSONSchema","fixedFields","propertyNames"],fi.visitors.JSONSchemaOrJSONReferenceVisitor),Si(["visitors","document","objects","JSONSchema","fixedFields","const"],{$ref:"#/visitors/value"}),Si(["visitors","document","objects","JSONSchema","fixedFields","examples"],Ni),Si(["visitors","document","objects","LinkDescription","$visitor"],Ii),Si(["visitors","document","objects","LinkDescription","fixedFields","hrefSchema"],fi.visitors.JSONSchemaOrJSONReferenceVisitor),Ei(["visitors","document","objects","LinkDescription","fixedFields","schema"]),Si(["visitors","document","objects","LinkDescription","fixedFields","submissionSchema"],fi.visitors.JSONSchemaOrJSONReferenceVisitor),Ei(["visitors","document","objects","LinkDescription","fixedFields","method"]),Ei(["visitors","document","objects","LinkDescription","fixedFields","encType"]),Si(["visitors","document","objects","LinkDescription","fixedFields","submissionEncType"],{$ref:"#/visitors/value"}))(fi),Ti=kt(Mi),Pi=e=>Object.entries(e).map(([e,t])=>ht(t)?{name:e,...t}:{name:e,$visitor:t});Object.defineProperty(xi,"fixedFields",{get:()=>Pi(Ti.visitors.document.objects.JSONSchema.fixedFields),enumerable:!0}),Object.defineProperty(bi,"fixedFields",{get:()=>Pi(Ti.visitors.document.objects.LinkDescription.fixedFields),enumerable:!0});const Di=class extends xi{constructor(e,t,s){super(e,t,s),this.element="JSONSchemaDraft7"}get $comment(){return this.get("$comment")}set $comment(e){this.set("$comment",e)}get itemsField(){return this.get("items")}set itemsField(e){this.set("items",e)}get if(){return this.get("if")}set if(e){this.set("if",e)}get then(){return this.get("then")}set then(e){this.set("then",e)}get else(){return this.get("else")}set else(e){this.set("else",e)}get not(){return this.get("not")}set not(e){this.set("not",e)}get contentEncoding(){return this.get("contentEncoding")}set contentEncoding(e){this.set("contentEncoding",e)}get contentMediaType(){return this.get("contentMediaType")}set contentMediaType(e){this.set("contentMediaType",e)}get media(){throw new h('media keyword from Hyper-Schema vocabulary has been moved to validation vocabulary as "contentMediaType" / "contentEncoding"')}set media(e){throw new h('media keyword from Hyper-Schema vocabulary has been moved to validation vocabulary as "contentMediaType" / "contentEncoding"')}get writeOnly(){return this.get("writeOnly")}set writeOnly(e){this.set("writeOnly",e)}};const Ci=class extends bi{get anchor(){return this.get("anchor")}set anchor(e){this.set("anchor",e)}get anchorPointer(){return this.get("anchorPointer")}set anchorPointer(e){this.set("anchorPointer",e)}get templatePointers(){return this.get("templatePointers")}set templatePointers(e){this.set("templatePointers",e)}get templateRequired(){return this.get("templateRequired")}set templateRequired(e){this.set("templateRequired",e)}get targetSchema(){return this.get("targetSchema")}set targetSchema(e){this.set("targetSchema",e)}get mediaType(){throw new h("mediaType keyword from Hyper-Schema vocabulary has been renamed to targetMediaType.")}set mediaType(e){throw new h("mediaType keyword from Hyper-Schema vocabulary has been renamed to targetMediaType.")}get targetMediaType(){return this.get("targetMediaType")}set targetMediaType(e){this.set("targetMediaType",e)}get targetHints(){return this.get("targetHints")}set targetHints(e){this.set("targetHints",e)}get description(){return this.get("description")}set description(e){this.set("description",e)}get $comment(){return this.get("$comment")}set $comment(e){this.set("$comment",e)}get hrefSchema(){return this.get("hrefSchema")}set hrefSchema(e){this.set("hrefSchema",e)}get headerSchema(){return this.get("headerSchema")}set headerSchema(e){this.set("headerSchema",e)}get submissionSchema(){return this.get("submissionSchema")}set submissionSchema(e){this.set("submissionSchema",e)}get submissionEncType(){throw new h("submissionEncType keyword from Hyper-Schema vocabulary has been renamed to submissionMediaType.")}set submissionEncType(e){throw new h("submissionEncType keyword from Hyper-Schema vocabulary has been renamed to submissionMediaType.")}get submissionMediaType(){return this.get("submissionMediaType")}set submissionMediaType(e){this.set("submissionMediaType",e)}};const $i=class extends Ai{constructor(e){super(e),this.element=new Di}get defaultDialectIdentifier(){return"http://json-schema.org/draft-07/schema#"}};const Ji=class extends Ii{constructor(e){super(e),this.element=new Ci}},Li=ie(Si(["visitors","document","objects","JSONSchema","element"],"JSONSchemaDraft7"),Si(["visitors","document","objects","JSONSchema","$visitor"],$i),Si(["visitors","document","objects","JSONSchema","fixedFields","$comment"],Mi.visitors.value),Si(["visitors","document","objects","JSONSchema","fixedFields","if"],Mi.visitors.JSONSchemaOrJSONReferenceVisitor),Si(["visitors","document","objects","JSONSchema","fixedFields","then"],Mi.visitors.JSONSchemaOrJSONReferenceVisitor),Si(["visitors","document","objects","JSONSchema","fixedFields","else"],Mi.visitors.JSONSchemaOrJSONReferenceVisitor),Ei(["visitors","document","objects","JSONSchema","fixedFields","media"]),Si(["visitors","document","objects","JSONSchema","fixedFields","contentEncoding"],Mi.visitors.value),Si(["visitors","document","objects","JSONSchema","fixedFields","contentMediaType"],Mi.visitors.value),Si(["visitors","document","objects","JSONSchema","fixedFields","writeOnly"],Mi.visitors.value),Si(["visitors","document","objects","LinkDescription","$visitor"],Ji),Si(["visitors","document","objects","LinkDescription","fixedFields","anchor"],Mi.visitors.value),Si(["visitors","document","objects","LinkDescription","fixedFields","anchorPointer"],Mi.visitors.value),Ei(["visitors","document","objects","LinkDescription","fixedFields","mediaType"]),Si(["visitors","document","objects","LinkDescription","fixedFields","targetMediaType"],Mi.visitors.value),Si(["visitors","document","objects","LinkDescription","fixedFields","targetHints"],Mi.visitors.value),Si(["visitors","document","objects","LinkDescription","fixedFields","description"],Mi.visitors.value),Si(["visitors","document","objects","LinkDescription","fixedFields","$comment"],Mi.visitors.value),Si(["visitors","document","objects","LinkDescription","fixedFields","headerSchema"],Mi.visitors.JSONSchemaOrJSONReferenceVisitor),Ei(["visitors","document","objects","LinkDescription","fixedFields","submissionEncType"]),Si(["visitors","document","objects","LinkDescription","fixedFields","submissionMediaType"],Mi.visitors.value))(Mi),_i=kt(Li),Bi=e=>Object.entries(e).map(([e,t])=>ht(t)?{name:e,...t}:{name:e,$visitor:t});Object.defineProperty(Di,"fixedFields",{get:()=>Bi(_i.visitors.document.objects.JSONSchema.fixedFields),enumerable:!0}),Object.defineProperty(Ci,"fixedFields",{get:()=>Bi(_i.visitors.document.objects.LinkDescription.fixedFields),enumerable:!0});const qi=class extends Di{constructor(e,t,s){super(e,t,s),this.element="JSONSchema201909"}get $vocabulary(){return this.get("$vocabulary")}set $vocabulary(e){this.set("$vocabulary",e)}get $anchor(){return this.get("$anchor")}set $anchor(e){this.set("$anchor",e)}get $recursiveAnchor(){return this.get("$recursiveAnchor")}set $recursiveAnchor(e){this.set("$recursiveAnchor",e)}get $recursiveRef(){return this.get("$recursiveRef")}set $recursiveRef(e){this.set("$recursiveRef",e)}get $ref(){return this.get("$ref")}set $ref(e){this.set("$ref",e)}get $defs(){return this.get("$defs")}set $defs(e){this.set("$defs",e)}get definitions(){throw new h("definitions keyword from Validation vocabulary has been renamed to $defs.")}set definitions(e){throw new h("definitions keyword from Validation vocabulary has been renamed to $defs.")}get not(){return this.get("not")}set not(e){this.set("not",e)}get if(){return this.get("if")}set if(e){this.set("if",e)}get then(){return this.get("then")}set then(e){this.set("then",e)}get else(){return this.get("else")}set else(e){this.set("else",e)}get dependentSchemas(){return this.get("dependentSchemas")}set dependentSchemas(e){this.set("dependentSchemas",e)}get dependencies(){throw new h("dependencies keyword from Validation vocabulary has been renamed to dependentSchemas.")}set dependencies(e){throw new h("dependencies keyword from Validation vocabulary has been renamed to dependentSchemas.")}get itemsField(){return this.get("items")}set itemsField(e){this.set("items",e)}get contains(){return this.get("contains")}set contains(e){this.set("contains",e)}get additionalProperties(){return this.get("additionalProperties")}set additionalProperties(e){this.set("additionalProperties",e)}get additionalItems(){return this.get("additionalItems")}set additionalItems(e){this.set("additionalItems",e)}get propertyNames(){return this.get("propertyNames")}set propertyNames(e){this.set("propertyNames",e)}get unevaluatedItems(){return this.get("unevaluatedItems")}set unevaluatedItems(e){this.set("unevaluatedItems",e)}get unevaluatedProperties(){return this.get("unevaluatedProperties")}set unevaluatedProperties(e){this.set("unevaluatedProperties",e)}get maxContains(){return this.get("maxContains")}set maxContains(e){this.set("maxContains",e)}get minContains(){return this.get("minContains")}set minContains(e){this.set("minContains",e)}get dependentRequired(){return this.get("dependentRequired")}set dependentRequired(e){this.set("dependentRequired",e)}get deprecated(){return this.get("deprecated")}set deprecated(e){this.set("deprecated",e)}get contentSchema(){return this.get("contentSchema")}set contentSchema(e){this.set("contentSchema",e)}};const Ri=class extends Ci{constructor(e,t,s){super(e,t,s),this.element="linkDescription"}get targetSchema(){return this.get("targetSchema")}set targetSchema(e){this.set("targetSchema",e)}get hrefSchema(){return this.get("hrefSchema")}set hrefSchema(e){this.set("hrefSchema",e)}get headerSchema(){return this.get("headerSchema")}set headerSchema(e){this.set("headerSchema",e)}get submissionSchema(){return this.get("submissionSchema")}set submissionSchema(e){this.set("submissionSchema",e)}};const Vi=class extends $i{constructor(e){super(e),this.element=new qi}get defaultDialectIdentifier(){return"https://json-schema.org/draft/2019-09/schema"}ObjectElement(e){const t=e.node;this.handleDialectIdentifier(t),this.handleSchemaIdentifier(t),this.parent=this.element,Wn.prototype.ObjectElement.call(this,e),Yt(this.element.$ref)&&(this.element.classes.push("reference-element"),this.element.meta.set("referenced-element","schema"))}};const Hi=class extends Ls{ObjectElement(e){this.enter(e),this.element.classes.push("json-schema-$vocabulary")}};const Ui=class extends Ls{StringElement(e){this.enter(e),this.element.classes.push("reference-value")}},Gi=mr(Xn,br,Ls),zi=mr(xr,br,Ls);const Xi=class extends zi{constructor(e){super(e),this.element=new Bt,this.element.classes.push("json-schema-$defs"),this.specPath=_s(["document","objects","JSONSchema"])}};const Wi=class extends Gi{constructor(e){super(e),this.element=new Wt,this.element.classes.push("json-schema-allOf")}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=this.toRefractedElement(["document","objects","JSONSchema"],e);this.element.push(t)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const Ki=class extends Gi{constructor(e){super(e),this.element=new Wt,this.element.classes.push("json-schema-anyOf")}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=this.toRefractedElement(["document","objects","JSONSchema"],e);this.element.push(t)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const Yi=class extends Gi{constructor(e){super(e),this.element=new Wt,this.element.classes.push("json-schema-oneOf")}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=this.toRefractedElement(["document","objects","JSONSchema"],e);this.element.push(t)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const Qi=class extends zi{constructor(e){super(e),this.element=new Bt,this.element.classes.push("json-schema-dependentSchemas"),this.specPath=_s(["document","objects","JSONSchema"])}};const Zi=class extends Gi{ObjectElement(e){this.element=this.toRefractedElement(["document","objects","JSONSchema"],e.node),e.stop()}ArrayElement(e){const t=e.node;this.element=new Wt,this.element.classes.push("json-schema-items"),t.forEach(e=>{const t=this.toRefractedElement(["document","objects","JSONSchema"],e);this.element.push(t)}),this.copyMetaAndAttributes(t,this.element),e.stop()}BooleanElement(e){this.element=this.toRefractedElement(["document","objects","JSONSchema"],e.node),e.stop()}};const eo=class extends zi{constructor(e){super(e),this.element=new Bt,this.element.classes.push("json-schema-properties"),this.specPath=_s(["document","objects","JSONSchema"])}};const to=class extends zi{constructor(e){super(e),this.element=new Bt,this.element.classes.push("json-schema-patternProperties"),this.specPath=_s(["document","objects","JSONSchema"])}};const so=class extends Ls{ObjectElement(e){this.enter(e),this.element.classes.push("json-schema-dependentRequired")}};const no=class extends Ji{constructor(e){super(e),this.element=new Ri}},ro=ie(Si(["visitors","document","objects","JSONSchema","element"],"JSONSchema201909"),Si(["visitors","document","objects","JSONSchema","$visitor"],Vi),Si(["visitors","document","objects","JSONSchema","fixedFields","$vocabulary"],Hi),Si(["visitors","document","objects","JSONSchema","fixedFields","$anchor"],Li.visitors.value),Si(["visitors","document","objects","JSONSchema","fixedFields","$recursiveAnchor"],Li.visitors.value),Si(["visitors","document","objects","JSONSchema","fixedFields","$recursiveRef"],Li.visitors.value),Ei(["visitors","document","objects","JSONReference","$visitor"]),Si(["visitors","document","objects","JSONSchema","fixedFields","$ref"],Ui),Ei(["visitors","document","objects","JSONSchema","fixedFields","definitions"]),Si(["visitors","document","objects","JSONSchema","fixedFields","$defs"],Xi),Si(["visitors","document","objects","JSONSchema","fixedFields","allOf"],Wi),Si(["visitors","document","objects","JSONSchema","fixedFields","anyOf"],Ki),Si(["visitors","document","objects","JSONSchema","fixedFields","oneOf"],Yi),Si(["visitors","document","objects","JSONSchema","fixedFields","not"],Vi),Si(["visitors","document","objects","JSONSchema","fixedFields","if"],Vi),Si(["visitors","document","objects","JSONSchema","fixedFields","then"],Vi),Si(["visitors","document","objects","JSONSchema","fixedFields","else"],Vi),Ei(["visitors","document","objects","JSONSchema","fixedFields","dependencies"]),Si(["visitors","document","objects","JSONSchema","fixedFields","dependentSchemas"],Qi),Si(["visitors","document","objects","JSONSchema","fixedFields","items"],{$visitor:Zi,alias:"itemsField"}),Si(["visitors","document","objects","JSONSchema","fixedFields","contains"],Vi),Si(["visitors","document","objects","JSONSchema","fixedFields","properties"],eo),Si(["visitors","document","objects","JSONSchema","fixedFields","patternProperties"],to),Si(["visitors","document","objects","JSONSchema","fixedFields","additionalProperties"],Vi),Si(["visitors","document","objects","JSONSchema","fixedFields","additionalItems"],Vi),Si(["visitors","document","objects","JSONSchema","fixedFields","propertyNames"],Vi),Si(["visitors","document","objects","JSONSchema","fixedFields","unevaluatedItems"],Vi),Si(["visitors","document","objects","JSONSchema","fixedFields","unevaluatedProperties"],Vi),Si(["visitors","document","objects","JSONSchema","fixedFields","maxContains"],Li.visitors.value),Si(["visitors","document","objects","JSONSchema","fixedFields","minContains"],Li.visitors.value),Si(["visitors","document","objects","JSONSchema","fixedFields","dependentRequired"],so),Si(["visitors","document","objects","JSONSchema","fixedFields","deprecated"],Li.visitors.value),Si(["visitors","document","objects","JSONSchema","fixedFields","contentSchema"],Vi),Si(["visitors","document","objects","LinkDescription","element"],"linkDescription"),Si(["visitors","document","objects","LinkDescription","$visitor"],no),Si(["visitors","document","objects","LinkDescription","fixedFields","targetSchema"],Vi),Si(["visitors","document","objects","LinkDescription","fixedFields","hrefSchema"],Vi),Si(["visitors","document","objects","LinkDescription","fixedFields","headerSchema"],Vi),Si(["visitors","document","objects","LinkDescription","fixedFields","submissionSchema"],Vi))(Li),io=kt(ro),oo=e=>Object.entries(e).map(([e,t])=>ht(t)?{name:e,...t}:{name:e,$visitor:t});Object.defineProperty(qi,"fixedFields",{get:()=>oo(io.visitors.document.objects.JSONSchema.fixedFields),enumerable:!0}),Object.defineProperty(Ri,"fixedFields",{get:()=>oo(io.visitors.document.objects.LinkDescription.fixedFields),enumerable:!0});const co=class extends qi{constructor(e,t,s){super(e,t,s),this.element="JSONSchema202012"}get $dynamicAnchor(){return this.get("$dynamicAnchor")}set $dynamicAnchor(e){this.set("$dynamicAnchor",e)}get $recursiveAnchor(){throw new h("$recursiveAnchor keyword from Core vocabulary has been renamed to $dynamicAnchor.")}set $recursiveAnchor(e){throw new h("$recursiveAnchor keyword from Core vocabulary has been renamed to $dynamicAnchor.")}get $dynamicRef(){return this.get("$dynamicRef")}set $dynamicRef(e){this.set("$dynamicRef",e)}get $recursiveRef(){throw new h("$recursiveRef keyword from Core vocabulary has been renamed to $dynamicRef.")}set $recursiveRef(e){throw new h("$recursiveRef keyword from Core vocabulary has been renamed to $dynamicRef.")}get prefixItems(){return this.get("prefixItems")}set prefixItems(e){this.set("prefixItems",e)}};const ao=class extends Ri{get targetSchema(){return this.get("targetSchema")}set targetSchema(e){this.set("targetSchema",e)}get hrefSchema(){return this.get("hrefSchema")}set hrefSchema(e){this.set("hrefSchema",e)}get headerSchema(){return this.get("headerSchema")}set headerSchema(e){this.set("headerSchema",e)}get submissionSchema(){return this.get("submissionSchema")}set submissionSchema(e){this.set("submissionSchema",e)}},lo={namespace:e=>{const{base:t}=e;return t.register("JSONSchema202012",co),t.register("linkDescription",ao),t}},uo={JSONSchema202012Element:{prefixItems(...e){const t=new Wt(...e);return t.classes.push("json-schema-prefixItems"),t},items:(...e)=>new co(...e),contains:(...e)=>new co(...e),required(...e){const t=new Wt(...e);return t.classes.push("json-schema-required"),t},properties(...e){const t=new Bt(...e);return t.classes.push("json-schema-properties"),t},additionalProperties:(...e)=>new co(...e),patternProperties(...e){const t=new Bt(...e);return t.classes.push("json-schema-patternProperties"),t},dependentSchemas(...e){const t=new Bt(...e);return t.classes.push("json-schema-dependentSchemas"),t},propertyNames:(...e)=>new co(...e),enum(...e){const t=new Wt(...e);return t.classes.push("json-schema-enum"),t},allOf(...e){const t=new Wt(...e);return t.classes.push("json-schema-allOf"),t},anyOf(...e){const t=new Wt(...e);return t.classes.push("json-schema-anyOf"),t},oneOf(...e){const t=new Wt(...e);return t.classes.push("json-schema-oneOf"),t},if:(...e)=>new co(...e),then:(...e)=>new co(...e),else:(...e)=>new co(...e),not:(...e)=>new co(...e),$defs(...e){const t=new Bt(...e);return t.classes.push("json-schema-$defs"),t},examples(...e){const t=new Wt(...e);return t.classes.push("json-schema-examples"),t},links(...e){const t=new Wt(...e);return t.classes.push("json-schema-links"),t},$vocabulary(...e){const t=new Bt(...e);return t.classes.push("json-schema-$vocabulary"),t},unevaluatedItems:(...e)=>new co(...e),unevaluatedProperties:(...e)=>new co(...e),$dependentRequired(...e){const t=new Bt(...e);return t.classes.push("json-schema-$dependentRequired"),t},contentSchema:(...e)=>new co(...e),type(...e){const t=new Wt(...e);return t.classes.push("json-schema-type"),t}},LinkDescriptionElement:{hrefSchema:(...e)=>new co(...e),targetSchema:(...e)=>new co(...e),submissionSchema:(...e)=>new co(...e),templatePointers:(...e)=>new Bt(...e),templateRequired:(...e)=>new Wt(...e),targetHints:(...e)=>new Bt(...e),headerSchema:(...e)=>new co(...e)},"json-schema-prefixItems":{"<*>":function(...e){return new co(...e)}},"json-schema-properties":{"[key: *]":function(...e){return new co(...e)}},"json-schema-patternProperties":{"[key: *]":function(...e){return new co(...e)}},"json-schema-dependentSchemas":{"[key: *]":function(...e){return new co(...e)}},"json-schema-allOf":{"<*>":function(...e){return new co(...e)}},"json-schema-anyOf":{"<*>":function(...e){return new co(...e)}},"json-schema-oneOf":{"<*>":function(...e){return new co(...e)}},"json-schema-$defs":{"[key: *]":function(...e){return new co(...e)}},"json-schema-links":{"<*>":function(...e){return new ao(...e)}}},ho=(e,t)=>{const s=Cn(e),n=e.isMetaEmpty?void 0:e.classes.at(0),r=uo[s]||uo[n];return void 0===r?void 0:Object.hasOwn(r,"[key: *]")?r["[key: *]"]:r[t]},po=()=>()=>({visitor:{StringElement(e){const t=e.node;if(!(e=>Yt(e)&&os(e,["yaml-e-node","yaml-e-scalar"]))(t))return;const s=e.getAncestorNodes().reverse().filter(Kt),n=s.at(-1);let r,i;if(ts(n)?(i=t,r=ho(n,"<*>")):ns(n)&&(i=s.at(-2),r=ho(i,Ns(n.key))),"function"!=typeof r)return;const o=r.call({context:i},void 0,t.isMetaEmpty?void 0:t.meta.cloneDeep(),t.isAttributesEmpty?void 0:xs(t.attributes));hs.transfer(t,o),$s.transfer(t,o),e.replaceWith(o)}}});var mo=D(function(e,t,s){var n,r={};for(n in s=s||{},t=t||{})x(n,t)&&(r[n]=x(n,s)?e(n,t[n],s[n]):t[n]);for(n in s)x(n,s)&&!x(n,r)&&(r[n]=s[n]);return r});const fo=mo;var yo=D(function e(t,s,n){return fo(function(s,n,r){return Se(n)&&Se(r)?e(t,n,r):t(s,n,r)},s,n)});const go=yo;const xo=g(function(e,t){return go(function(e,t,s){return s},e,t)});const bo=D(function(e,t,s){return Bs(e,J(t,s))});const vo=ne(0,-1);var So=g(function(e,t){return e.apply(this,t)});const wo=So;const Oo=Ye(ct);const jo=We(ri,Gs);const ko=qe(3,function(e,t,s){var n=B(e,s),r=B(vo(e),s);if(!Oo(n)&&!jo(e)){var i=K(n,r);return wo(i,t)}});const Eo=class{namespace;constructor(e){this.namespace=e||new this.Namespace}serialise(e){if(!(e instanceof this.namespace.elements.Element))throw new TypeError(`Given element \`${e}\` is not an Element instance`);const t={element:e.element};if(!e.isMetaEmpty){const s=this.serialiseMeta(e);s&&(t.meta=s.meta,s.rawKeys.length>0&&(t.__meta_raw__=s.rawKeys))}if(e.isAttributesEmpty||(t.attributes=this.serialiseObject(e.attributes)),!(e instanceof hs)){const s=hs.from(e);s&&(t.meta||(t.meta={}),t.meta.__mappings__=this.serialise(s))}if(!(e instanceof $s)){const s=$s.from(e);s&&(t.meta||(t.meta={}),t.meta.__styles__=this.serialise(s))}const s=this.serialiseContent(e.content);return void 0!==s&&(t.content=s),t}deserialise(e){if(!e.element)throw new Error("Given value is not an object containing an element name");const t=new(this.namespace.getElementClass(e.element));let s,n;t.element!==e.element&&(t.element=e.element);let r=e.meta;if(e.meta?.__mappings__||e.meta?.__styles__){const{__mappings__:t,__styles__:i,...o}=e.meta;s=t,n=i,r=Object.keys(o).length>0?o:void 0}const i=e.__meta_raw__?new Set(e.__meta_raw__):void 0;if(r)for(const[e,s]of Object.entries(r)){const n=this.deserialise(s);t.setMetaProperty(e,i?.has(e)?n.toValue():n)}if(s){this.deserialise(s).applyTo(t)}if(n){this.deserialise(n).applyTo(t)}e.attributes&&this.deserialiseObject(e.attributes,t.attributes);const o=this.deserialiseContent(e.content);return void 0===o&&null!==t.content||(t.content=o),t}serialiseContent(e){if(e instanceof this.namespace.elements.Element)return this.serialise(e);if(e instanceof this.namespace.KeyValuePair){const t=e,s={key:this.serialise(t.key)};return t.value&&(s.value=this.serialise(t.value)),s}if(e&&Array.isArray(e)){if(0===e.length)return;return e.map(e=>this.serialise(e))}return e}deserialiseContent(e){if(e){if(e.element)return this.deserialise(e);if(e.key){const t=new this.namespace.KeyValuePair(this.deserialise(e.key));return e.value&&(t.value=this.deserialise(e.value)),t}if(Array.isArray(e))return e.map(e=>this.deserialise(e))}return e}serialiseMeta(e){const t={},s=[];let n=!1;for(const[r,i]of Object.entries(e.meta))if(i instanceof this.namespace.elements.Element)t[r]=this.serialise(i),n=!0;else if(void 0!==i){const o=e.refract(i);t[r]=this.serialise(o),s.push(r),n=!0}return n?{meta:t,rawKeys:s}:void 0}serialiseObject(e){const t={};if(e.forEach((e,s)=>{e&&(t[s.toValue()]=this.serialise(e))}),0!==Object.keys(t).length)return t}deserialiseObject(e,t){Object.keys(e).forEach(s=>{t.set(s,this.deserialise(e[s]))})}},Ao=e=>null===e,Fo=e=>"string"==typeof e,No=e=>"number"==typeof e,Io=e=>"boolean"==typeof e,Mo=e=>null!==e&&"object"==typeof e;class To{elementMap={};elementDetection=[];Element;KeyValuePair;_elements;_attributeElementKeys=[];_attributeElementArrayKeys=[];constructor(e){this.Element=$t,this.KeyValuePair=Mt,e&&e.noDefault||this.useDefault()}use(e){return e.namespace&&e.namespace({base:this}),e.load&&e.load({base:this}),this}useDefault(){return this.register("null",zt).register("string",Ut).register("number",Gt).register("boolean",Xt).register("array",Wt).register("object",Bt).register("member",_t).register("ref",Os).register("link",ws).register("sourceMap",hs),this.detect(Ao,zt,!1).detect(Fo,Ut,!1).detect(No,Gt,!1).detect(Io,Xt,!1).detect(Array.isArray,Wt,!1).detect(Mo,Bt,!1),this}register(e,t){return this._elements=void 0,this.elementMap[e]=t,this}unregister(e){return this._elements=void 0,delete this.elementMap[e],this}detect(e,t,s){return void 0===s||s?this.elementDetection.unshift([e,t]):this.elementDetection.push([e,t]),this}toElement(e){if(e instanceof this.Element)return e;let t;for(const[s,n]of this.elementDetection)if(s(e)){t=new n(e);break}return t}getElementClass(e){const t=this.elementMap[e];return void 0===t?this.Element:t}fromRefract(e){return this.serialiser.deserialise(e)}toRefract(e){return this.serialiser.serialise(e)}get elements(){return void 0===this._elements&&(this._elements={Element:this.Element},Object.keys(this.elementMap).forEach(e=>{const t=e[0].toUpperCase()+e.substring(1);this._elements[t]=this.elementMap[e]})),this._elements}get serialiser(){return new Eo(this)}}Eo.prototype.Namespace=To;const Po=To,Do=new Po,Co={isElement:Kt,isStringElement:Yt,isNumberElement:Qt,isNullElement:Zt,isBooleanElement:es,isArrayElement:ts,isObjectElement:ss,isMemberElement:ns,isPrimitiveElement:e=>ss(e)&&"object"===e.element||ts(e)&&"array"===e.element||es(e)&&"boolean"===e.element||Qt(e)&&"number"===e.element||Yt(e)&&"string"===e.element||Zt(e)&&"null"===e.element||ns(e)&&"member"===e.element,isLinkElement:As,isRefElement:Fs,isAnnotationElement:e=>e instanceof js,isCommentElement:e=>e instanceof ks,isParseResultElement:e=>e instanceof Es,isSourceMapElement:e=>e instanceof hs,hasElementStyle:rs,hasElementSourceMap:is,includesSymbols:(e,t)=>{if(0===t.length)return!0;if(!e.hasAttributesProperty("symbols"))return!1;const s=e.attributes.get("symbols");return!!ts(s)&&t.every(e=>s.includes(e))},includesClasses:os},$o={toolboxCreator:()=>({predicates:Co,namespace:Do}),visitorOptions:{exposeEdits:!0}},Jo=(e,t,s={})=>{if(0===t.length)return e;const n=xo($o,s),{toolboxCreator:r,visitorOptions:i,traverseOptions:o}=n,c=r(),a=t.map(e=>e(c)),l=Rn(a.map(bo({},"visitor")),i);a.forEach(ko(["pre"],[]));const u=Gn(e,l,o);return a.forEach(ko(["post"],[])),u};function Lo(e){return void 0===e?new zt:_o(e)}function _o(e){if(e instanceof $t)return e;if("string"==typeof e)return new Ut(e);if("number"==typeof e)return new Gt(e);if("boolean"==typeof e)return new Xt(e);if(null===e)return new zt;if(Array.isArray(e))return new Wt(e.map(Lo));if("object"==typeof e)return new Bt(e);throw new Error("Cannot refract value of type "+typeof e)}Jo[Symbol.for("nodejs.util.promisify.custom")]=async(e,t,s={})=>{if(0===t.length)return e;const n=xo($o,s),{toolboxCreator:r,visitorOptions:i,traverseOptions:o}=n,c=r(),a=t.map(e=>e(c)),l=Vn(a.map(bo({},"visitor")),i);await Promise.allSettled(a.map(ko(["pre"],[])));const u=await zn(e,l,o);return await Promise.allSettled(a.map(ko(["post"],[]))),u},$t.prototype.ObjectElement=Bt,$t.prototype.ArrayElement=Wt,$t.prototype.RefElement=Os,$t.prototype.MemberElement=_t,$t.prototype.refract=_o,It.prototype.Element=$t,It.prototype.cloneDeepElement=e=>xs(e);const Bo=class extends Vi{constructor(e){super(e),this.element=new co}get defaultDialectIdentifier(){return"https://json-schema.org/draft/2020-12/schema"}};const qo=class extends Gi{constructor(e){super(e),this.element=new Wt,this.element.classes.push("json-schema-prefixItems")}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=this.toRefractedElement(["document","objects","JSONSchema"],e);this.element.push(t)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const Ro=class extends no{constructor(e){super(e),this.element=new ao}},Vo=ie(Si(["visitors","document","objects","JSONSchema","element"],"JSONSchema202012"),Si(["visitors","document","objects","JSONSchema","$visitor"],Bo),Ei(["visitors","document","objects","JSONSchema","fixedFields","$recursiveAnchor"]),Si(["visitors","document","objects","JSONSchema","fixedFields","$dynamicAnchor"],ro.visitors.value),Ei(["visitors","document","objects","JSONSchema","fixedFields","$recursiveRef"]),Si(["visitors","document","objects","JSONSchema","fixedFields","$dynamicRef"],ro.visitors.value),Si(["visitors","document","objects","JSONSchema","fixedFields","not"],Bo),Si(["visitors","document","objects","JSONSchema","fixedFields","if"],Bo),Si(["visitors","document","objects","JSONSchema","fixedFields","then"],Bo),Si(["visitors","document","objects","JSONSchema","fixedFields","else"],Bo),Si(["visitors","document","objects","JSONSchema","fixedFields","prefixItems"],qo),Si(["visitors","document","objects","JSONSchema","fixedFields","items"],Bo),Si(["visitors","document","objects","JSONSchema","fixedFields","contains"],Bo),Si(["visitors","document","objects","JSONSchema","fixedFields","additionalProperties"],Bo),Ei(["visitors","document","objects","JSONSchema","fixedFields","additionalItems"]),Si(["visitors","document","objects","JSONSchema","fixedFields","propertyNames"],Bo),Si(["visitors","document","objects","JSONSchema","fixedFields","unevaluatedItems"],Bo),Si(["visitors","document","objects","JSONSchema","fixedFields","unevaluatedProperties"],Bo),Si(["visitors","document","objects","JSONSchema","fixedFields","contentSchema"],Bo),Si(["visitors","document","objects","LinkDescription","element"],"linkDescription"),Si(["visitors","document","objects","LinkDescription","$visitor"],Ro),Si(["visitors","document","objects","LinkDescription","fixedFields","targetSchema"],Bo),Si(["visitors","document","objects","LinkDescription","fixedFields","hrefSchema"],Bo),Si(["visitors","document","objects","LinkDescription","fixedFields","headerSchema"],Bo),Si(["visitors","document","objects","LinkDescription","fixedFields","submissionSchema"],Bo))(ro);const Ho=e=>es(e)&&os(e,["boolean-json-schema"]),Uo=e=>e instanceof co,Go=e=>e instanceof ao,zo=()=>{const e=new Po,t={...s,isStringElement:Yt};return e.use(lo),{predicates:t,namespace:e}},Xo=(e,{element:t="JSONSchema202012",plugins:s=[],specificationObj:n=Vo,consume:r=!1}={})=>{const i=_o(e),o=kt(n),c=o.elementMap[t];if(!c)throw new Error(`Unknown element type: "${t}"`);const a=new(B(c,o))({specObj:o,consume:r});return Gn(i,a),Jo(a.element,s,{toolboxCreator:zo})},Wo=(e,t={})=>Xo(e,{...t,element:"JSONSchema202012"}),Ko=(e,t={})=>Xo(e,{...t,element:"linkDescription"}),Yo=Xo;return t})());
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.apidomNsJSONSchema202012=t():e.apidomNsJSONSchema202012=t()}(self,()=>(()=>{"use strict";var e={d:(t,s)=>{for(var n in s)e.o(s,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:s[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{$defsVisitor:()=>Wi,$refVisitor:()=>Gi,$vocabularyVisitor:()=>Ui,AllOfVisitor:()=>Ki,AlternatingVisitor:()=>di,AnyOfVisitor:()=>Yi,BaseSchemaArrayVisitor:()=>zi,BaseSchemaMapVisitor:()=>Xi,DependentRequiredVisitor:()=>no,DependentSchemasVisitor:()=>Zi,FallbackVisitor:()=>Ls,FixedFieldsVisitor:()=>Kn,ItemsVisitor:()=>eo,JSONSchema202012MediaTypes:()=>m,JSONSchemaElement:()=>ao,JSONSchemaVisitor:()=>qo,LinkDescriptionElement:()=>lo,LinkDescriptionVisitor:()=>Vo,MapVisitor:()=>br,OneOfVisitor:()=>Qi,ParentSchemaAwareVisitor:()=>vr,PatternPropertiesVisitor:()=>so,PatternedFieldsVisitor:()=>xr,PrefixItemsVisitor:()=>Ro,PropertiesVisitor:()=>to,SpecificationVisitor:()=>Wn,Visitor:()=>Js,default:()=>uo,isBooleanJSONSchemaElement:()=>Uo,isJSONSchemaElement:()=>Go,isLinkDescriptionElement:()=>zo,mediaTypes:()=>f,refract:()=>Qo,refractJSONSchema:()=>Ko,refractLinkDescription:()=>Yo,refractorPluginReplaceEmptyElement:()=>mo,specificationObj:()=>Ho});var s={};function n(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]}function r(e){return function t(s){return 0===arguments.length||n(s)?t:e.apply(this,arguments)}}function i(e,t){return t[e<0?t.length+e:e]}e.r(s),e.d(s,{isBooleanJSONSchemaElement:()=>Uo,isJSONSchemaElement:()=>Go,isLinkDescriptionElement:()=>zo});const o=r(function(e){return i(-1,e)});class c extends AggregateError{constructor(e,t,s){super(e,t,s),this.name=this.constructor.name,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}const a=c;class l extends Error{static[Symbol.hasInstance](e){return super[Symbol.hasInstance](e)||Function.prototype[Symbol.hasInstance].call(a,e)}constructor(e,t){super(e,t),this.name=this.constructor.name,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}const u=l;const h=class extends u{};const d=class extends h{};const p=class extends Array{unknownMediaType="application/octet-stream";filterByFormat(){throw new d("filterByFormat method in MediaTypes class is not yet implemented.")}findBy(){throw new d("findBy method in MediaTypes class is not yet implemented.")}latest(){throw new d("latest method in MediaTypes class is not yet implemented.")}};class m extends p{filterByFormat(e="generic"){const t="generic"===e?"schema;version":e;return this.filter(e=>e.includes(t))}findBy(e="2020-12",t="generic"){const s="generic"===t?`schema;version=${e}`:`schema+${t};version=${e}`;return this.find(e=>e.includes(s))||this.unknownMediaType}latest(e="generic"){return o(this.filterByFormat(e))}}const f=new m("application/schema;version=2020-12","application/schema+json;version=2020-12","application/schema+yaml;version=2020-12");function y(e,t,s){for(var n=0,r=s.length;n<r;)t=e(t,s[n]),n+=1;return t}function g(e){return function t(s,i){switch(arguments.length){case 0:return t;case 1:return n(s)?t:r(function(t){return e(s,t)});default:return n(s)&&n(i)?t:n(s)?r(function(t){return e(t,i)}):n(i)?r(function(t){return e(s,t)}):e(s,i)}}}function x(e,t){return Object.prototype.hasOwnProperty.call(t,e)}var b=Object.prototype.toString;const v=function(){return"[object Arguments]"===b.call(arguments)?function(e){return"[object Arguments]"===b.call(e)}:function(e){return x("callee",e)}}();var S=!{toString:null}.propertyIsEnumerable("toString"),w=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],O=function(){return arguments.propertyIsEnumerable("length")}(),j=function(e,t){for(var s=0;s<e.length;){if(e[s]===t)return!0;s+=1}return!1},k="function"!=typeof Object.keys||O?r(function(e){if(Object(e)!==e)return[];var t,s,n=[],r=O&&v(e);for(t in e)!x(t,e)||r&&"length"===t||(n[n.length]=t);if(S)for(s=w.length-1;s>=0;)x(t=w[s],e)&&!j(n,t)&&(n[n.length]=t),s-=1;return n}):r(function(e){return Object(e)!==e?[]:Object.keys(e)});const E=k;var A=g(function(e,t){return y(function(s,n){return s[n]=e(t[n],n,t),s},{},E(t))});const F=A;const N=r(function(e){return null==e});var I=g(function(e,t){if(0===e.length||N(t))return!1;for(var s=t,n=0;n<e.length;){if(N(s)||!x(e[n],s))return!1;s=s[e[n]],n+=1}return!0});const M=I;var T=g(function(e,t){return M([e],t)});const P=T;function D(e){return function t(s,i,o){switch(arguments.length){case 0:return t;case 1:return n(s)?t:g(function(t,n){return e(s,t,n)});case 2:return n(s)&&n(i)?t:n(s)?g(function(t,s){return e(t,i,s)}):n(i)?g(function(t,n){return e(s,t,n)}):r(function(t){return e(s,i,t)});default:return n(s)&&n(i)&&n(o)?t:n(s)&&n(i)?g(function(t,s){return e(t,s,o)}):n(s)&&n(o)?g(function(t,s){return e(t,i,s)}):n(i)&&n(o)?g(function(t,n){return e(s,t,n)}):n(s)?r(function(t){return e(t,i,o)}):n(i)?r(function(t){return e(s,t,o)}):n(o)?r(function(t){return e(s,i,t)}):e(s,i,o)}}}const C=Number.isInteger||function(e){return(e|0)===e};const $=function(e,t){if(null!=t)return C(e)?i(e,t):t[e]};const J=g($);const L=D(function(e,t,s){return e(J(t,s))});function _(e,t){for(var s=t,n=0;n<e.length;n+=1){if(null==s)return;var r=e[n];s=C(r)?i(r,s):s[r]}return s}const B=g(_);function q(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(e){return t.apply(this,arguments)};case 2:return function(e,s){return t.apply(this,arguments)};case 3:return function(e,s,n){return t.apply(this,arguments)};case 4:return function(e,s,n,r){return t.apply(this,arguments)};case 5:return function(e,s,n,r,i){return t.apply(this,arguments)};case 6:return function(e,s,n,r,i,o){return t.apply(this,arguments)};case 7:return function(e,s,n,r,i,o,c){return t.apply(this,arguments)};case 8:return function(e,s,n,r,i,o,c,a){return t.apply(this,arguments)};case 9:return function(e,s,n,r,i,o,c,a,l){return t.apply(this,arguments)};case 10:return function(e,s,n,r,i,o,c,a,l,u){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}function R(e,t){return function(){return t.call(this,e.apply(this,arguments))}}const V=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)};function H(e){return"[object String]"===Object.prototype.toString.call(e)}const U=r(function(e){return!!V(e)||!!e&&("object"==typeof e&&(!H(e)&&(0===e.length||e.length>0&&(e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1)))))});var G="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";function z(e,t,s){return function(n,r,i){if(U(i))return e(n,r,i);if(null==i)return r;if("function"==typeof i["fantasy-land/reduce"])return t(n,r,i,"fantasy-land/reduce");if(null!=i[G])return s(n,r,i[G]());if("function"==typeof i.next)return s(n,r,i);if("function"==typeof i.reduce)return t(n,r,i,"reduce");throw new TypeError("reduce: list must be array or iterable")}}function X(e,t,s){for(var n=0,r=s.length;n<r;){if((t=e["@@transducer/step"](t,s[n]))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}n+=1}return e["@@transducer/result"](t)}var W=g(function(e,t){return q(e.length,function(){return e.apply(t,arguments)})});const K=W;function Y(e,t,s){for(var n=s.next();!n.done;){if((t=e["@@transducer/step"](t,n.value))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}n=s.next()}return e["@@transducer/result"](t)}function Q(e,t,s,n){return e["@@transducer/result"](s[n](K(e["@@transducer/step"],e),t))}const Z=z(X,Q,Y);var ee=function(){function e(e){this.f=e}return e.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(e){return e},e.prototype["@@transducer/step"]=function(e,t){return this.f(e,t)},e}();const te=D(function(e,t,s){return Z("function"==typeof e?new ee(e):e,t,s)});function se(e,t){return function(){var s=arguments.length;if(0===s)return t();var n=arguments[s-1];return V(n)||"function"!=typeof n[e]?t.apply(this,arguments):n[e].apply(n,Array.prototype.slice.call(arguments,0,s-1))}}const ne=D(se("slice",function(e,t,s){return Array.prototype.slice.call(s,e,t)}));const re=r(se("tail",ne(1,1/0)));function ie(){if(0===arguments.length)throw new Error("pipe requires at least one argument");return q(arguments[0].length,te(R,arguments[0],re(arguments)))}const oe=r(function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)});const ce="function"==typeof Object.is?Object.is:function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};var ae=function(e,t){switch(arguments.length){case 0:return ae;case 1:return function t(s){return 0===arguments.length?t:ce(e,s)};default:return ce(e,t)}};const le=ae;function ue(e){for(var t,s=[];!(t=e.next()).done;)s.push(t.value);return s}function he(e,t,s){for(var n=0,r=s.length;n<r;){if(e(t,s[n]))return!0;n+=1}return!1}function de(e,t,s,n){var r=ue(e);function i(e,t){return pe(e,t,s.slice(),n.slice())}return!he(function(e,t){return!he(i,t,e)},ue(t),r)}function pe(e,t,s,n){if(ce(e,t))return!0;var r=oe(e);if(r!==oe(t))return!1;if("function"==typeof e["fantasy-land/equals"]||"function"==typeof t["fantasy-land/equals"])return"function"==typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](t)&&"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](e);if("function"==typeof e.equals||"function"==typeof t.equals)return"function"==typeof e.equals&&e.equals(t)&&"function"==typeof t.equals&&t.equals(e);switch(r){case"Arguments":case"Array":case"Object":if("function"==typeof e.constructor&&"Promise"===function(e){var t=String(e).match(/^function (\w*)/);return null==t?"":t[1]}(e.constructor))return e===t;break;case"Boolean":case"Number":case"String":if(typeof e!=typeof t||!ce(e.valueOf(),t.valueOf()))return!1;break;case"Date":if(!ce(e.valueOf(),t.valueOf()))return!1;break;case"Error":return e.name===t.name&&e.message===t.message;case"RegExp":if(e.source!==t.source||e.global!==t.global||e.ignoreCase!==t.ignoreCase||e.multiline!==t.multiline||e.sticky!==t.sticky||e.unicode!==t.unicode)return!1}for(var i=s.length-1;i>=0;){if(s[i]===e)return n[i]===t;i-=1}switch(r){case"Map":return e.size===t.size&&de(e.entries(),t.entries(),s.concat([e]),n.concat([t]));case"Set":return e.size===t.size&&de(e.values(),t.values(),s.concat([e]),n.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var o=E(e);if(o.length!==E(t).length)return!1;var c=s.concat([e]),a=n.concat([t]);for(i=o.length-1;i>=0;){var l=o[i];if(!x(l,t)||!pe(t[l],e[l],c,a))return!1;i-=1}return!0}const me=g(function(e,t){return pe(e,t,[],[])});function fe(e,t){return function(e,t,s){var n,r;if("function"==typeof e.indexOf)switch(typeof t){case"number":if(0===t){for(n=1/t;s<e.length;){if(0===(r=e[s])&&1/r===n)return s;s+=1}return-1}if(t!=t){for(;s<e.length;){if("number"==typeof(r=e[s])&&r!=r)return s;s+=1}return-1}return e.indexOf(t,s);case"string":case"boolean":case"function":case"undefined":return e.indexOf(t,s);case"object":if(null===t)return e.indexOf(t,s)}for(;s<e.length;){if(me(e[s],t))return s;s+=1}return-1}(t,e,0)>=0}function ye(e,t){for(var s=0,n=t.length,r=Array(n);s<n;)r[s]=e(t[s]),s+=1;return r}function ge(e){return'"'+e.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0").replace(/"/g,'\\"')+'"'}var xe=function(e){return(e<10?"0":"")+e};const be="function"==typeof Date.prototype.toISOString?function(e){return e.toISOString()}:function(e){return e.getUTCFullYear()+"-"+xe(e.getUTCMonth()+1)+"-"+xe(e.getUTCDate())+"T"+xe(e.getUTCHours())+":"+xe(e.getUTCMinutes())+":"+xe(e.getUTCSeconds())+"."+(e.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"};function ve(e,t,s){return function(){if(0===arguments.length)return s();var n=arguments[arguments.length-1];if(!V(n)){for(var r=0;r<e.length;){if("function"==typeof n[e[r]])return n[e[r]].apply(n,Array.prototype.slice.call(arguments,0,-1));r+=1}if(function(e){return null!=e&&"function"==typeof e["@@transducer/step"]}(n))return t.apply(null,Array.prototype.slice.call(arguments,0,-1))(n)}return s.apply(this,arguments)}}function Se(e){return"[object Object]"===Object.prototype.toString.call(e)}const we=function(){return this.xf["@@transducer/init"]()},Oe=function(e){return this.xf["@@transducer/result"](e)};var je=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=we,e.prototype["@@transducer/result"]=Oe,e.prototype["@@transducer/step"]=function(e,t){return this.f(t)?this.xf["@@transducer/step"](e,t):e},e}();function ke(e){return function(t){return new je(e,t)}}var Ee=g(ve(["fantasy-land/filter","filter"],ke,function(e,t){return Se(t)?y(function(s,n){return e(t[n])&&(s[n]=t[n]),s},{},E(t)):(s=t,"[object Map]"===Object.prototype.toString.call(s)?function(e,t){for(var s=new Map,n=t.entries(),r=n.next();!r.done;)e(r.value[1])&&s.set(r.value[0],r.value[1]),r=n.next();return s}(e,t):function(e,t){for(var s=0,n=t.length,r=[];s<n;)e(t[s])&&(r[r.length]=t[s]),s+=1;return r}(e,t));var s}));const Ae=Ee;const Fe=g(function(e,t){return Ae((s=e,function(){return!s.apply(this,arguments)}),t);var s});function Ne(e,t){var s=function(s){var n=t.concat([e]);return fe(s,n)?"<Circular>":Ne(s,n)},n=function(e,t){return ye(function(t){return ge(t)+": "+s(e[t])},t.slice().sort())};switch(Object.prototype.toString.call(e)){case"[object Arguments]":return"(function() { return arguments; }("+ye(s,e).join(", ")+"))";case"[object Array]":return"["+ye(s,e).concat(n(e,Fe(function(e){return/^\d+$/.test(e)},E(e)))).join(", ")+"]";case"[object Boolean]":return"object"==typeof e?"new Boolean("+s(e.valueOf())+")":e.toString();case"[object Date]":return"new Date("+(isNaN(e.valueOf())?s(NaN):ge(be(e)))+")";case"[object Map]":return"new Map("+s(Array.from(e))+")";case"[object Null]":return"null";case"[object Number]":return"object"==typeof e?"new Number("+s(e.valueOf())+")":1/e==-1/0?"-0":e.toString(10);case"[object Set]":return"new Set("+s(Array.from(e).sort())+")";case"[object String]":return"object"==typeof e?"new String("+s(e.valueOf())+")":ge(e);case"[object Undefined]":return"undefined";default:if("function"==typeof e.toString){var r=e.toString();if("[object Object]"!==r)return r}return"{"+n(e,E(e)).join(", ")+"}"}}const Ie=r(function(e){return Ne(e,[])});const Me=D(function(e,t,s){return e(_(t,s))});function Te(e){var t=Object.prototype.toString.call(e);return"[object Function]"===t||"[object AsyncFunction]"===t||"[object GeneratorFunction]"===t||"[object AsyncGeneratorFunction]"===t}const Pe=g(function(e,t){return e&&t});function De(e,t,s){for(var n=s.next();!n.done;)t=e(t,n.value),n=s.next();return t}function Ce(e,t,s,n){return s[n](e,t)}const $e=z(y,Ce,De);var Je=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=we,e.prototype["@@transducer/result"]=Oe,e.prototype["@@transducer/step"]=function(e,t){return this.xf["@@transducer/step"](e,this.f(t))},e}();const Le=function(e){return function(t){return new Je(e,t)}};function _e(e,t,s){return function(){for(var r=[],i=0,o=e,c=0,a=!1;c<t.length||i<arguments.length;){var l;c<t.length&&(!n(t[c])||i>=arguments.length)?l=t[c]:(l=arguments[i],i+=1),r[c]=l,n(l)?a=!0:o-=1,c+=1}return!a&&o<=0?s.apply(this,r):q(Math.max(0,o),_e(e,r,s))}}var Be=g(function(e,t){return 1===e?r(t):q(e,_e(e,[],t))});const qe=Be;var Re=g(ve(["fantasy-land/map","map"],Le,function(e,t){switch(Object.prototype.toString.call(t)){case"[object Function]":return qe(t.length,function(){return e.call(this,t.apply(this,arguments))});case"[object Object]":return y(function(s,n){return s[n]=e(t[n]),s},{},E(t));default:return ye(e,t)}}));const Ve=Re;const He=g(function(e,t){return"function"==typeof t["fantasy-land/ap"]?t["fantasy-land/ap"](e):"function"==typeof e.ap?e.ap(t):"function"==typeof e?function(s){return e(s)(t(s))}:$e(function(e,s){return function(e,t){var s;t=t||[];var n=(e=e||[]).length,r=t.length,i=[];for(s=0;s<n;)i[i.length]=e[s],s+=1;for(s=0;s<r;)i[i.length]=t[s],s+=1;return i}(e,Ve(s,t))},[],e)});var Ue=g(function(e,t){var s=qe(e,t);return qe(e,function(){return y(He,Ve(s,arguments[0]),Array.prototype.slice.call(arguments,1))})});const Ge=Ue;var ze=r(function(e){return Ge(e.length,e)});const Xe=ze;const We=g(function(e,t){return Te(e)?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:Xe(Pe)(e,t)});const Ke=me(null);const Ye=Xe(r(function(e){return!e}));const Qe=Ye(Ke);function Ze(e){return Ze="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ze(e)}const et=function(e){return"object"===Ze(e)};const tt=qe(1,We(Qe,et));const st=g(function(e,t){if(e===t)return t;function s(e,t){if(e>t!=t>e)return t>e?t:e}var n=s(e,t);if(void 0!==n)return n;var r=s(typeof e,typeof t);if(void 0!==r)return r===typeof e?e:t;var i=Ie(e),o=s(i,Ie(t));return void 0!==o&&o===i?e:t});const nt=g(function(e,t){return Ve(J(e),t)});const rt=r(function(e){return qe(te(st,0,nt("length",e)),function(){for(var t=0,s=e.length;t<s;){if(e[t].apply(this,arguments))return!0;t+=1}return!1})});const it=qe(1,ie(oe,le("GeneratorFunction")));const ot=qe(1,ie(oe,le("AsyncFunction")));const ct=rt([ie(oe,le("Function")),it,ot]);var at=ie(oe,le("Object")),lt=ie(Ie,me(Ie(Object))),ut=Me(We(ct,lt),["constructor"]);const ht=qe(1,function(e){if(!tt(e)||!at(e))return!1;var t=Object.getPrototypeOf(e);return!!Ke(t)||ut(t)});const dt=qe(1,ie(oe,le("String")));var pt=r(function(e){return qe(e.length,e)});const mt=pt;const ft=g(function(e,t){return qe(e+1,function(){var s=arguments[e];if(null!=s&&Te(s[t]))return s[t].apply(s,Array.prototype.slice.call(arguments,0,e));throw new TypeError(Ie(s)+' does not have a method named "'+t+'"')})});const yt=ft(1,"split");var gt=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=we,e.prototype["@@transducer/result"]=Oe,e.prototype["@@transducer/step"]=function(e,t){if(this.f){if(this.f(t))return e;this.f=null}return this.xf["@@transducer/step"](e,t)},e}();function xt(e){return function(t){return new gt(e,t)}}const bt=g(ve(["dropWhile"],xt,function(e,t){for(var s=0,n=t.length;s<n&&e(t[s]);)s+=1;return ne(s,1/0,t)}));const vt=ft(1,"join");var St=r(function(e){return qe(e.length,function(t,s){var n=Array.prototype.slice.call(arguments,0);return n[0]=s,n[1]=t,e.apply(this,n)})});const wt=St(g(fe));const Ot=mt(function(e,t){return ie(yt(""),bt(wt(e)),vt(""))(t)}),jt=new WeakMap,kt=e=>{if(jt.has(e))return jt.get(e);const t={},s=(e,n,r)=>("string"==typeof e.element&&(t[e.element]=e.$visitor?[...r,"$visitor"]:r),F((e,t)=>{const i=[...r,t];if(ht(e)&&P("$ref",e)&&L(dt,"$ref",e)){const t=B(["$ref"],e),s=Ot("#/",t),r=B(s.split("/"),n),{$ref:i,...o}=e;return Object.keys(o).length>0&&ht(r)?{...r,...o}:r}return ht(e)?s(e,n,i):e},e)),n=s(e,e,[]);return n.elementMap=t,jt.set(e,n),n};function Et(e,t,s){if(s||(s=new At),function(e){var t=typeof e;return null==e||"object"!=t&&"function"!=t}(e))return e;var n,r=function(n){var r=s.get(e);if(r)return r;for(var i in s.set(e,n),e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=t?Et(e[i],!0,s):e[i]);return n};switch(oe(e)){case"Object":return r(Object.create(Object.getPrototypeOf(e)));case"Array":return r(Array(e.length));case"Date":return new Date(e.valueOf());case"RegExp":return n=e,new RegExp(n.source,n.flags?n.flags:(n.global?"g":"")+(n.ignoreCase?"i":"")+(n.multiline?"m":"")+(n.sticky?"y":"")+(n.unicode?"u":"")+(n.dotAll?"s":""));case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":return e.slice();default:return e}}var At=function(){function e(){this.map={},this.length=0}return e.prototype.set=function(e,t){var s=this.hash(e),n=this.map[s];n||(this.map[s]=n=[]),n.push([e,t]),this.length+=1},e.prototype.hash=function(e){var t=[];for(var s in e)t.push(Object.prototype.toString.call(e[s]));return t.join()},e.prototype.get=function(e){if(this.length<=180)for(var t in this.map)for(var s=this.map[t],n=0;n<s.length;n+=1){if((i=s[n])[0]===e)return i[1]}else{var r=this.hash(e);if(s=this.map[r])for(n=0;n<s.length;n+=1){var i;if((i=s[n])[0]===e)return i[1]}}},e}();const Ft=r(function(e){return null!=e&&"function"==typeof e.clone?e.clone():Et(e,!0)});class Nt{get(e){return this[e]}set(e,t){this[e]=t}hasKey(e){return Object.hasOwn(this,e)}keys(){return Object.keys(this)}remove(e){delete this[e]}get isEmpty(){return 0===Object.keys(this).length}get isFrozen(){return Object.isFrozen(this)}freeze(){for(const e of Object.values(this))e instanceof this.Element?e.freeze():(Array.isArray(e)||null!==e&&"object"==typeof e)&&Object.freeze(e);Object.freeze(this)}cloneShallow(){const e=new Nt;return Object.assign(e,this),e}merge(e){const t=this.cloneShallow();for(const[s,n]of Object.entries(e)){const e=t.get(s);Array.isArray(e)&&Array.isArray(n)?t.set(s,[...e,...n]):t.set(s,n)}return t}cloneDeep(){const e=new Nt;for(const[t,s]of Object.entries(this))s instanceof this.Element?e.set(t,this.cloneDeepElement(s)):e.set(t,Ft(s));return e}}const It=Nt;const Mt=class{key;value;constructor(e,t){this.key=e,this.value=t}toValue(){return{key:this.key?.toValue(),value:this.value?.toValue()}}};class Tt{elements;constructor(e){this.elements=e??[]}toValue(){return this.elements.map(e=>({key:e.key?.toValue(),value:e.value?.toValue()}))}map(e,t){return this.elements.map(s=>{const n=s.value,r=s.key;if(void 0===n||void 0===r)throw new Error("MemberElement must have both key and value");return void 0!==t?e.call(t,n,r,s):e(n,r,s)})}filter(e,t){const s=this.elements.filter(s=>{const n=s.value,r=s.key;return void 0!==n&&void 0!==r&&(void 0!==t?e.call(t,n,r,s):e(n,r,s))});return new Tt(s)}reject(e,t){const s=[];for(const n of this.elements){const r=n.value,i=n.key;void 0!==r&&void 0!==i&&(e.call(t,r,i,n)||s.push(n))}return new Tt(s)}forEach(e,t){this.elements.forEach((s,n)=>{const r=s.value,i=s.key;void 0!==r&&void 0!==i&&(void 0!==t?e.call(t,r,i,s,n):e(r,i,s,n))})}find(e,t){return this.elements.find(s=>{const n=s.value,r=s.key;return void 0!==n&&void 0!==r&&(void 0!==t?e.call(t,n,r,s):e(n,r,s))})}keys(){return this.elements.map(e=>e.key?.toValue()).filter(e=>void 0!==e)}values(){return this.elements.map(e=>e.value?.toValue()).filter(e=>void 0!==e)}get length(){return this.elements.length}get isEmpty(){return 0===this.length}get first(){return this.elements[0]}get(e){return this.elements[e]}push(e){return this.elements.push(e),this}includesKey(e){return this.elements.some(t=>t.key?.equals(e))}[Symbol.iterator](){return this.elements[Symbol.iterator]()}}const Pt=Tt,Dt=Object.freeze(new It);class Ct{parent;style;startLine;startCharacter;startOffset;endLine;endCharacter;endOffset;_storedElement="element";_content;_meta;_attributes;constructor(e,t,s){void 0!==t&&(this.meta=t),void 0!==s&&(this.attributes=s),void 0!==e&&(this.content=e)}get element(){return this._storedElement}set element(e){this._storedElement=e}get content(){return this._content}set content(e){if(e instanceof Ct)this._content=e;else if(null!=e&&"string"!=typeof e&&"number"!=typeof e&&"boolean"!=typeof e&&"bigint"!=typeof e&&"symbol"!=typeof e)if(e instanceof Mt)this._content=e;else if(e instanceof Pt)this._content=e.elements;else if(Array.isArray(e))this._content=e.map(e=>this.refract(e));else{if("object"!=typeof e)throw new Error("Cannot set content to value of type "+typeof e);this._content=Object.entries(e).map(([e,t])=>new this.MemberElement(e,t))}else this._content=e}get meta(){if(!this._meta){if(this.isFrozen)return Dt;this._meta=new It}return this._meta}set meta(e){if(e instanceof It)this._meta=e;else if(e&&"object"==typeof e){const t=new It;Object.assign(t,e),this._meta=t}}get attributes(){if(!this._attributes){if(this.isFrozen){const e=new this.ObjectElement;return e.freeze(),e}this._attributes=new this.ObjectElement}return this._attributes}set attributes(e){e instanceof Ct?this._attributes=e:this.attributes.set(e??{})}get id(){if(!this.hasMetaProperty("id")){if(this.isFrozen)return"";this.setMetaProperty("id","")}return this.meta.get("id")}set id(e){this.setMetaProperty("id",e)}get classes(){if(!this.hasMetaProperty("classes")){if(this.isFrozen)return[];this.setMetaProperty("classes",[])}return this.meta.get("classes")}set classes(e){this.setMetaProperty("classes",e)}get links(){if(!this.hasMetaProperty("links")){if(this.isFrozen){const e=new this.ArrayElement;return e.freeze(),e}this.setMetaProperty("links",new this.ArrayElement)}return this.meta.get("links")}set links(e){this.setMetaProperty("links",e)}get children(){const{_content:e}=this;if(Array.isArray(e))return e;if(e instanceof Mt){const t=[];return e.key&&t.push(e.key),e.value&&t.push(e.value),t}return e instanceof Ct?[e]:[]}get isFrozen(){return Object.isFrozen(this)}freeze(){if(!this.isFrozen){this._meta&&this._meta.freeze(),this._attributes&&(this._attributes.parent=this,this._attributes.freeze());for(const e of this.children)e.parent=this,e.freeze();Array.isArray(this._content)&&Object.freeze(this._content),Object.freeze(this)}}toValue(){const{_content:e}=this;return e instanceof Ct||e instanceof Mt?e.toValue():Array.isArray(e)?e.map(e=>e.toValue()):e}equals(e){const t=e instanceof Ct?e.toValue():e;return me(this.toValue(),t)}primitive(){}set(e){return this.content=e,this}toRef(e){const t=this.id;if(""===t)throw new Error("Cannot create reference to an element without an ID");const s=new this.RefElement(t);return"string"==typeof e&&(s.path=this.refract(e)),s}getMetaProperty(e,t){return this.hasMetaProperty(e)?this.meta.get(e):t}setMetaProperty(e,t){this.meta.set(e,t)}hasMetaProperty(e){return void 0!==this._meta&&this._meta.hasKey(e)}get isMetaEmpty(){return void 0===this._meta||this._meta.isEmpty}getAttributesProperty(e,t){if(!this.hasAttributesProperty(e)){if(this.isFrozen){const e=this.refract(t);return e.freeze(),e}this.attributes.set(e,t)}return this.attributes.get(e)}setAttributesProperty(e,t){this.attributes.set(e,t)}hasAttributesProperty(e){return!this.isAttributesEmpty&&this.attributes.hasKey(e)}get isAttributesEmpty(){return void 0===this._attributes||this.attributes.isEmpty}}const $t=Ct;class Jt extends $t{constructor(e,t,s){super(e||[],t,s)}get length(){return this._content.length}get isEmpty(){return 0===this.length}get first(){return this._content[0]}get second(){return this._content[1]}get last(){return this._content.at(-1)}push(...e){for(const t of e)this._content.push(this.refract(t));return this}shift(){return this._content.shift()}unshift(e){this._content.unshift(this.refract(e))}includes(e){return this._content.some(t=>t.equals(e))}findElements(e,t){const s=t||{},n=!!s.recursive,r=void 0===s.results?[]:s.results;for(let t=0;t<this._content.length;t+=1){const s=this._content[t],i=s;n&&"function"==typeof i.findElements&&i.findElements(e,{results:r,recursive:n}),e(s,t,void 0)&&r.push(s)}return r}find(e){const t=this.findElements(e,{recursive:!0});return new this.ArrayElement(t)}findByElement(e){return this.find(t=>t.element===e)}findByClass(e){return this.find(t=>{const s=t.classes;return"function"==typeof s.includes&&s.includes(e)})}getById(e){return this.find(t=>t.id===e).first}concat(e){return new(0,this.constructor)(this._content.concat(e._content))}[Symbol.iterator](){return this._content[Symbol.iterator]()}}const Lt=Jt;const _t=class extends $t{constructor(e,t,s,n){super(new Mt,s,n),this.element="member",void 0!==e&&(this.key=e),arguments.length>=2&&(this.value=t)}primitive(){return"member"}get key(){return this._content.key}set key(e){this._content.key=this.refract(e)}get value(){return this._content.value}set value(e){this._content.value=void 0===e?void 0:this.refract(e)}};const Bt=class extends Lt{constructor(e,t,s){super(e||[],t,s),this.element="object"}primitive(){return"object"}toValue(){return this._content.reduce((e,t)=>(e[t.key.toValue()]=t.value?t.value.toValue():void 0,e),{})}get(e){const t=this.getMember(e);if(t)return t.value}getValue(e){const t=this.get(e);if(t)return t.toValue()}getMember(e){if(void 0!==e)return this._content.find(t=>t.key.toValue()===e)}remove(e){let t=null;return this.content=this._content.filter(s=>s.key.toValue()!==e||(t=s,!1)),t}getKey(e){const t=this.getMember(e);if(t)return t.key}set(e,t){if("string"==typeof e){const s=this.getMember(e);s?s.value=t:this._content.push(new _t(e,t))}else if("object"==typeof e&&!Array.isArray(e))for(const t of Object.keys(e))this.set(t,e[t]);return this}keys(){return this._content.map(e=>e.key.toValue())}values(){return this._content.map(e=>e.value.toValue())}hasKey(e){return this._content.some(t=>t.key.equals(e))}items(){return this._content.map(e=>[e.key.toValue(),e.value.toValue()])}map(e,t){return this._content.map(s=>e.call(t,s.value,s.key,s))}compactMap(e,t){const s=[];return this.forEach((n,r,i)=>{const o=e.call(t,n,r,i);o&&s.push(o)}),s}filter(e,t){return new Pt(this._content).filter(e,t)}reject(e,t){const s=[];for(const n of this._content)e.call(t,n.value,n.key,n)||s.push(n);return new Pt(s)}forEach(e,t){this._content.forEach(s=>e.call(t,s.value,s.key,s))}reduce(e,t){let s,n;void 0!==t?(s=0,n=this.refract(t)):(s=1,n=this._content[0]?.value);for(let t=s;t<this._content.length;t+=1){const s=this._content[t],r=e(n,s.value,s.key,s,this);n=void 0===r?r:this.refract(r)}return n}empty(){return new this.constructor([])}};const qt=class extends Bt{constructor(e,t,s){super(e,t,s),this.element="JSONSchemaDraft4"}get idField(){return this.get("id")}set idField(e){this.set("id",e)}get $schema(){return this.get("$schema")}set $schema(e){this.set("$schema",e)}get multipleOf(){return this.get("multipleOf")}set multipleOf(e){this.set("multipleOf",e)}get maximum(){return this.get("maximum")}set maximum(e){this.set("maximum",e)}get exclusiveMaximum(){return this.get("exclusiveMaximum")}set exclusiveMaximum(e){this.set("exclusiveMaximum",e)}get minimum(){return this.get("minimum")}set minimum(e){this.set("minimum",e)}get exclusiveMinimum(){return this.get("exclusiveMinimum")}set exclusiveMinimum(e){this.set("exclusiveMinimum",e)}get maxLength(){return this.get("maxLength")}set maxLength(e){this.set("maxLength",e)}get minLength(){return this.get("minLength")}set minLength(e){this.set("minLength",e)}get pattern(){return this.get("pattern")}set pattern(e){this.set("pattern",e)}get additionalItems(){return this.get("additionalItems")}set additionalItems(e){this.set("additionalItems",e)}get itemsField(){return this.get("items")}set itemsField(e){this.set("items",e)}get maxItems(){return this.get("maxItems")}set maxItems(e){this.set("maxItems",e)}get minItems(){return this.get("minItems")}set minItems(e){this.set("minItems",e)}get uniqueItems(){return this.get("uniqueItems")}set uniqueItems(e){this.set("uniqueItems",e)}get maxProperties(){return this.get("maxProperties")}set maxProperties(e){this.set("maxProperties",e)}get minProperties(){return this.get("minProperties")}set minProperties(e){this.set("minProperties",e)}get required(){return this.get("required")}set required(e){this.set("required",e)}get properties(){return this.get("properties")}set properties(e){this.set("properties",e)}get additionalProperties(){return this.get("additionalProperties")}set additionalProperties(e){this.set("additionalProperties",e)}get patternProperties(){return this.get("patternProperties")}set patternProperties(e){this.set("patternProperties",e)}get dependencies(){return this.get("dependencies")}set dependencies(e){this.set("dependencies",e)}get enum(){return this.get("enum")}set enum(e){this.set("enum",e)}get type(){return this.get("type")}set type(e){this.set("type",e)}get allOf(){return this.get("allOf")}set allOf(e){this.set("allOf",e)}get anyOf(){return this.get("anyOf")}set anyOf(e){this.set("anyOf",e)}get oneOf(){return this.get("oneOf")}set oneOf(e){this.set("oneOf",e)}get not(){return this.get("not")}set not(e){this.set("not",e)}get definitions(){return this.get("definitions")}set definitions(e){this.set("definitions",e)}get title(){return this.get("title")}set title(e){this.set("title",e)}get description(){return this.get("description")}set description(e){this.set("description",e)}get default(){return this.get("default")}set default(e){this.set("default",e)}get format(){return this.get("format")}set format(e){this.set("format",e)}get base(){return this.get("base")}set base(e){this.set("base",e)}get linksField(){return this.get("links")}set linksField(e){this.set("links",e)}get media(){return this.get("media")}set media(e){this.set("media",e)}get readOnly(){return this.get("readOnly")}set readOnly(e){this.set("readOnly",e)}};const Rt=class extends Bt{constructor(e,t,s){super(e,t,s),this.element="JSONReference",this.classes.push("json-reference")}get $ref(){return this.get("$ref")}set $ref(e){this.set("$ref",e)}};const Vt=class extends Bt{constructor(e,t,s){super(e,t,s),this.element="media"}get binaryEncoding(){return this.get("binaryEncoding")}set binaryEncoding(e){this.set("binaryEncoding",e)}get type(){return this.get("type")}set type(e){this.set("type",e)}};const Ht=class extends Bt{constructor(e,t,s){super(e,t,s),this.element="linkDescription"}get href(){return this.get("href")}set href(e){this.set("href",e)}get rel(){return this.get("rel")}set rel(e){this.set("rel",e)}get title(){return this.get("title")}set title(e){this.set("title",e)}get targetSchema(){return this.get("targetSchema")}set targetSchema(e){this.set("targetSchema",e)}get mediaType(){return this.get("mediaType")}set mediaType(e){this.set("mediaType",e)}get method(){return this.get("method")}set method(e){this.set("method",e)}get encType(){return this.get("encType")}set encType(e){this.set("encType",e)}get schema(){return this.get("schema")}set schema(e){this.set("schema",e)}};const Ut=class extends $t{constructor(e,t,s){super(e,t,s),this.element="string"}primitive(){return"string"}get length(){return this.content?.length??0}};const Gt=class extends $t{constructor(e,t,s){super(e,t,s),this.element="number"}primitive(){return"number"}};const zt=class extends $t{constructor(e,t,s){super(e??null,t,s),this.element="null"}primitive(){return"null"}set(e){throw new Error("Cannot set the value of null")}};const Xt=class extends $t{constructor(e,t,s){super(e,t,s),this.element="boolean"}primitive(){return"boolean"}};const Wt=class extends Lt{constructor(e,t,s){super(e||[],t,s),this.element="array"}primitive(){return"array"}get(e){return this._content[e]}getValue(e){const t=this.get(e);if(t)return t.toValue()}set(e,t){return"number"==typeof e&&void 0!==t?this._content[e]=this.refract(t):this.content=e,this}remove(e){return this._content.splice(e,1)[0]??null}map(e,t){return this._content.map(e,t)}flatMap(e,t){return this._content.flatMap(e,t)}compactMap(e,t){const s=[];for(const n of this._content){const r=e.call(t,n);r&&s.push(r)}return s}filter(e,t){const s=this._content.filter(e,t);return new this.constructor(s)}reject(e,t){const s=[];for(const n of this._content)e.call(t,n)||s.push(n);return new this.constructor(s)}reduce(e,t){let s,n;void 0!==t?(s=0,n=this.refract(t)):(s=1,n=this.first);for(let t=s;t<this.length;t+=1){const s=e(n,this._content[t],t,this);n=void 0===s?s:this.refract(s)}return n}forEach(e,t){this._content.forEach((s,n)=>{e.call(t,s,n)})}empty(){return new this.constructor([])}},Kt=e=>e instanceof $t,Yt=e=>e instanceof Ut,Qt=e=>e instanceof Gt,Zt=e=>e instanceof zt,es=e=>e instanceof Xt,ts=e=>e instanceof Wt,ss=e=>e instanceof Bt,ns=e=>e instanceof _t,rs=e=>void 0!==e.style,is=e=>"number"==typeof e.startLine&&"number"==typeof e.startCharacter&&"number"==typeof e.startOffset&&"number"==typeof e.endLine&&"number"==typeof e.endCharacter&&"number"==typeof e.endOffset,os=(e,t)=>0===t.length||!!Kt(e)&&(!e.isMetaEmpty&&(!!e.hasMetaProperty("classes")&&t.every(t=>e.classes.includes(t))));class cs extends Ut{constructor(e,t,s){super(e,t,s),this.element="sourceMap"}static transfer(e,t){t.startLine=e.startLine,t.startCharacter=e.startCharacter,t.startOffset=e.startOffset,t.endLine=e.endLine,t.endCharacter=e.endCharacter,t.endOffset=e.endOffset}static from(e){const{startLine:t,startCharacter:s,startOffset:n,endLine:r,endCharacter:i,endOffset:o}=e;if("number"!=typeof t||"number"!=typeof s||"number"!=typeof n||"number"!=typeof r||"number"!=typeof i||"number"!=typeof o)return;const c="sm1:"+[t,s,n,r,i,o].map(ls).join("");const a=new cs(c);return a.startLine=t,a.startCharacter=s,a.startOffset=n,a.endLine=r,a.endCharacter=i,a.endOffset=o,a}applyTo(e){this.content&&([e.startLine,e.startCharacter,e.startOffset,e.endLine,e.endCharacter,e.endOffset]=function(e){const t=e.startsWith("sm1:")?e.slice(4):e,s=[];let n=0;for(let e=0;e<6;e++){const e=us(t,n);s.push(e.value),n=e.next}return s}(this.content))}}const as="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function ls(e){let t=e>>>0,s="";do{let e=31&t;t>>>=5,0!==t&&(e|=32),s+=as[e]}while(0!==t);return s}function us(e,t=0){let s=0,n=0,r=t;for(;;){const t=e[r++],i=as.indexOf(t);if(-1===i)throw new Error(`Invalid Base64 VLQ char: ${t}`);if(s|=(31&i)<<n,n+=5,!!!(32&i))break}return{value:s>>>0,next:r}}const hs=cs;const ds=class extends u{constructor(e,t){if(super(e,t),null!=t&&"object"==typeof t){const{cause:e,...s}=t;Object.assign(this,s)}}};const ps=class extends ds{value;constructor(e,t){super(e,t),void 0!==t&&(this.value=t.value)}};const ms=class extends ps{};const fs=class extends ps{},ys=(e,t)=>{const{visited:s=new WeakMap}=t,n={...t,visited:s};if(s.has(e))return s.get(e);const r=vs(e);s.set(e,r);const{content:i}=e;return Array.isArray(i)?r.content=i.map(e=>ys(e,n)):Kt(i)?r.content=ys(i,n):r.content=i instanceof Mt?gs(i,n):i,r},gs=(e,t)=>{const{visited:s=new WeakMap}=t,n={...t,visited:s};if(s.has(e))return s.get(e);const{key:r,value:i}=e,o=void 0!==r?ys(r,n):void 0,c=void 0!==i?ys(i,n):void 0,a=new Mt(o,c);return s.set(e,a),a},xs=(e,t={})=>{if(e instanceof Mt)return gs(e,t);if(e instanceof Pt)return((e,t)=>{const{visited:s=new WeakMap}=t,n={...t,visited:s};if(s.has(e))return s.get(e);const r=[...e].map(e=>ys(e,n)),i=new Pt(r);return s.set(e,i),i})(e,t);if(Kt(e))return ys(e,t);throw new ms("Value provided to cloneDeep function couldn't be cloned",{value:e})};xs.safe=e=>{try{return xs(e)}catch{return e}};const bs=e=>{const{key:t,value:s}=e;return new Mt(t,s)},vs=e=>{const t=new(0,e.constructor);t.element=e.element,e.isMetaEmpty||(t.meta=e.meta.cloneDeep()),e.isAttributesEmpty||(t.attributes=xs(e.attributes)),is(e)&&hs.transfer(e,t),rs(e)&&(t.style=Ft(e.style));const{content:s}=e;return Kt(s)?t.content=vs(s):Array.isArray(s)?t.content=[...s]:t.content=s instanceof Mt?bs(s):s,t},Ss=e=>{if(e instanceof Mt)return bs(e);if(e instanceof Pt)return(e=>{const t=[...e];return new Pt(t)})(e);if(Kt(e))return vs(e);throw new fs("Value provided to cloneShallow function couldn't be cloned",{value:e})};Ss.safe=e=>{try{return Ss(e)}catch{return e}};const ws=class extends $t{constructor(e,t,s){super(e||[],t,s),this.element="link"}get relation(){if(this.hasAttributesProperty("relation"))return this.attributes.get("relation")}set relation(e){this.attributes.set("relation",e)}get href(){if(this.hasAttributesProperty("href"))return this.attributes.get("href")}set href(e){this.attributes.set("href",e)}};const Os=class extends $t{constructor(e,t,s){super(e||[],t,s),this.element="ref",this.path||(this.path="element")}get path(){if(this.hasAttributesProperty("path"))return this.attributes.get("path")}set path(e){this.attributes.set("path",e)}};const js=class extends Ut{constructor(e,t,s){super(e,t,s),this.element="annotation"}get code(){if(this.hasAttributesProperty("code"))return this.attributes.get("code")}set code(e){this.attributes.set("code",e)}};const ks=class extends Ut{constructor(e,t,s){super(e,t,s),this.element="comment"}};const Es=class extends Wt{constructor(e,t,s){super(e,t,s),this.element="parseResult"}get api(){return this.filter(e=>os(e,["api"])).first}get results(){return this.filter(e=>os(e,["result"]))}get result(){return this.results.first}get annotations(){return this.filter(e=>"annotation"===e.element)}get warnings(){return this.filter(e=>"annotation"===e.element&&os(e,["warning"]))}get errors(){return this.filter(e=>"annotation"===e.element&&os(e,["error"]))}get isEmpty(){return 0===this.reject(e=>"annotation"===e.element).length}replaceResult(e){const{result:t}=this;if(void 0===t)return!1;const s=this._content,n=s.findIndex(e=>e===t);return-1!==n&&(s[n]=e,!0)}},As=e=>e instanceof ws,Fs=e=>e instanceof Os,Ns=e=>{if(!Kt(e))return e;if(Yt(e)||Qt(e)||es(e)||Zt(e))return e.toValue();const t=new WeakMap,s=e=>{if(!Kt(e))return e;if(ss(e)){if(t.has(e))return t.get(e);const n={};return t.set(e,n),e.forEach((e,t)=>{const r=s(t),i=s(e);"string"==typeof r&&(n[r]=i)}),n}if(ts(e)){if(t.has(e))return t.get(e);const n=[];return t.set(e,n),e.forEach(e=>n.push(s(e))),n}return Fs(e)?String(e.toValue()):As(e)?Yt(e.href)?e.href.toValue():"":e.toValue()};return s(e)},Is=e=>{const t=e.isMetaEmpty?void 0:e.meta.cloneDeep(),s=e.isAttributesEmpty?void 0:xs(e.attributes);return new e.constructor(void 0,t,s)},Ms=(e,t)=>t.clone&&t.isMergeableElement(e)?Ps(Is(e),e,t):e,Ts={clone:!0,isMergeableElement:e=>ss(e)||ts(e),arrayElementMerge:(e,t,s)=>new(0,e.constructor)(e.concat(t).map(e=>Ms(e,s))),objectElementMerge:(e,t,s)=>{const n=ss(e)?Is(e):Is(t);return ss(e)&&e.forEach((e,t,r)=>{const i=Ss(r);i.value=Ms(e,s),n.content.push(i)}),t.forEach((t,r,i)=>{const o=Ns(r);let c;if(ss(e)&&e.hasKey(o)&&s.isMergeableElement(t)){const n=e.get(o);c=Ss(i),c.value=((e,t)=>{if("function"!=typeof t.customMerge)return Ps;const s=t.customMerge(e,t);return"function"==typeof s?s:Ps})(r,s)(n,t,s)}else c=Ss(i),c.value=Ms(t,s);n.remove(o),n.content.push(c)}),n},customMerge:void 0,customMetaMerge:void 0,customAttributesMerge:void 0},Ps=(e,t,s)=>{const n={...Ts,...s};n.isMergeableElement=n.isMergeableElement??Ts.isMergeableElement,n.arrayElementMerge=n.arrayElementMerge??Ts.arrayElementMerge,n.objectElementMerge=n.objectElementMerge??Ts.objectElementMerge;const r=ts(t);if(!(r===ts(e)))return Ms(t,n);const i=r&&"function"==typeof n.arrayElementMerge?n.arrayElementMerge(e,t,n):n.objectElementMerge(e,t,n);return e.isMetaEmpty||t.isMetaEmpty?e.isMetaEmpty?t.isMetaEmpty||(i.meta=t.meta.cloneDeep()):i.meta=e.meta.cloneDeep():i.meta=(e=>"function"!=typeof e.customMetaMerge?e=>e.cloneDeep():e.customMetaMerge)(n)(e.meta,t.meta),e.isAttributesEmpty||t.isAttributesEmpty?e.isAttributesEmpty?t.isAttributesEmpty||(i.attributes=xs(t.attributes)):i.attributes=xs(e.attributes):i.attributes=(e=>"function"!=typeof e.customAttributesMerge?e=>xs(e):e.customAttributesMerge)(n)(e.attributes,t.attributes),i};Ps.all=(e,t)=>{if(!Array.isArray(e))throw new TypeError("First argument of deepmerge should be an array.");return 0===e.length?new Bt:e.reduce((e,s)=>Ps(e,s,t),Is(e[0]))};const Ds=Ps;class Cs extends Bt{constructor(e,t,s){super(e,t,s),this.element="__styles__"}static transfer(e,t){t.style=e.style}static from(e){if(e.style)return new Cs(e.style)}applyTo(e){e.style=this.toValue()}}const $s=Cs;const Js=class{element;consume=!1;consumeSafe=!1;constructor(e){Object.assign(this,e)}copyMetaAndAttributes(e,t){e.isMetaEmpty||t.isMetaEmpty?e.isMetaEmpty||(t.meta=e.meta.cloneDeep()):t.meta=t.meta.merge(e.meta),e.isAttributesEmpty||t.isAttributesEmpty?e.isAttributesEmpty||(t.attributes=xs(e.attributes)):t.attributes=Ds(t.attributes,e.attributes),hs.transfer(e,t),$s.transfer(e,t)}};const Ls=class extends Js{enter(e){this.element=this.consume?e.node:xs(e.node),e.stop()}};const _s=r(function(e){return function(){return e}});const Bs=g(function(e,t){return null==t||t!=t?e:t});const qs=_s(void 0);const Rs=me(qs());const Vs=r(function(e){return qe(te(st,0,nt("length",e)),function(){for(var t=0,s=e.length;t<s;){if(!e[t].apply(this,arguments))return!1;t+=1}return!0})});var Hs=r(function(e){return null!=e&&"function"==typeof e["fantasy-land/empty"]?e["fantasy-land/empty"]():null!=e&&null!=e.constructor&&"function"==typeof e.constructor["fantasy-land/empty"]?e.constructor["fantasy-land/empty"]():null!=e&&"function"==typeof e.empty?e.empty():null!=e&&null!=e.constructor&&"function"==typeof e.constructor.empty?e.constructor.empty():e==Set||e instanceof Set?new Set:e==Map||e instanceof Map?new Map:V(e)?[]:H(e)?"":Se(e)?{}:v(e)?function(){return arguments}():function(e){var t=Object.prototype.toString.call(e);return"[object Uint8ClampedArray]"===t||"[object Int8Array]"===t||"[object Uint8Array]"===t||"[object Int16Array]"===t||"[object Uint16Array]"===t||"[object Int32Array]"===t||"[object Uint32Array]"===t||"[object Float32Array]"===t||"[object Float64Array]"===t||"[object BigInt64Array]"===t||"[object BigUint64Array]"===t}(e)?e.constructor.from(""):void 0});const Us=Hs;const Gs=r(function(e){return null!=e&&me(e,Us(e))});const zs=r(function(e){return!Gs(e)});const Xs=g(function(e,t){return e||t});const Ws=qe(1,We(Qe,g(function(e,t){return Te(e)?function(){return e.apply(this,arguments)||t.apply(this,arguments)}:Xe(Xs)(e,t)})(et,ct)));var Ks=Ye(Ws);const Ys=Vs([dt,Ks,zs]);const Qs=g(function(e,t){for(var s={},n=0;n<e.length;)e[n]in t&&(s[e[n]]=t[e[n]]),n+=1;return s});function Zs(){this.grammarObject="grammarObject",this.rules=[],this.rules[0]={name:"json-pointer",lower:"json-pointer",index:0,isBkr:!1},this.rules[1]={name:"reference-token",lower:"reference-token",index:1,isBkr:!1},this.rules[2]={name:"unescaped",lower:"unescaped",index:2,isBkr:!1},this.rules[3]={name:"escaped",lower:"escaped",index:3,isBkr:!1},this.rules[4]={name:"array-location",lower:"array-location",index:4,isBkr:!1},this.rules[5]={name:"array-index",lower:"array-index",index:5,isBkr:!1},this.rules[6]={name:"array-dash",lower:"array-dash",index:6,isBkr:!1},this.rules[7]={name:"slash",lower:"slash",index:7,isBkr:!1},this.udts=[],this.rules[0].opcodes=[],this.rules[0].opcodes[0]={type:3,min:0,max:1/0},this.rules[0].opcodes[1]={type:2,children:[2,3]},this.rules[0].opcodes[2]={type:4,index:7},this.rules[0].opcodes[3]={type:4,index:1},this.rules[1].opcodes=[],this.rules[1].opcodes[0]={type:3,min:0,max:1/0},this.rules[1].opcodes[1]={type:1,children:[2,3]},this.rules[1].opcodes[2]={type:4,index:2},this.rules[1].opcodes[3]={type:4,index:3},this.rules[2].opcodes=[],this.rules[2].opcodes[0]={type:1,children:[1,2,3]},this.rules[2].opcodes[1]={type:5,min:0,max:46},this.rules[2].opcodes[2]={type:5,min:48,max:125},this.rules[2].opcodes[3]={type:5,min:127,max:1114111},this.rules[3].opcodes=[],this.rules[3].opcodes[0]={type:2,children:[1,2]},this.rules[3].opcodes[1]={type:7,string:[126]},this.rules[3].opcodes[2]={type:1,children:[3,4]},this.rules[3].opcodes[3]={type:7,string:[48]},this.rules[3].opcodes[4]={type:7,string:[49]},this.rules[4].opcodes=[],this.rules[4].opcodes[0]={type:1,children:[1,2]},this.rules[4].opcodes[1]={type:4,index:5},this.rules[4].opcodes[2]={type:4,index:6},this.rules[5].opcodes=[],this.rules[5].opcodes[0]={type:1,children:[1,2]},this.rules[5].opcodes[1]={type:6,string:[48]},this.rules[5].opcodes[2]={type:2,children:[3,4]},this.rules[5].opcodes[3]={type:5,min:49,max:57},this.rules[5].opcodes[4]={type:3,min:0,max:1/0},this.rules[5].opcodes[5]={type:5,min:48,max:57},this.rules[6].opcodes=[],this.rules[6].opcodes[0]={type:7,string:[45]},this.rules[7].opcodes=[],this.rules[7].opcodes[0]={type:7,string:[47]},this.toString=function(){let e="";return e+="; JavaScript Object Notation (JSON) Pointer ABNF syntax\n",e+="; https://datatracker.ietf.org/doc/html/rfc6901\n",e+="json-pointer = *( slash reference-token ) ; MODIFICATION: surrogate text rule used\n",e+="reference-token = *( unescaped / escaped )\n",e+="unescaped = %x00-2E / %x30-7D / %x7F-10FFFF\n",e+=" ; %x2F ('/') and %x7E ('~') are excluded from 'unescaped'\n",e+='escaped = "~" ( "0" / "1" )\n',e+=" ; representing '~' and '/', respectively\n",e+="\n",e+="; https://datatracker.ietf.org/doc/html/rfc6901#section-4\n",e+="array-location = array-index / array-dash\n",e+="array-index = %x30 / ( %x31-39 *(%x30-39) )\n",e+=' ; "0", or digits without a leading "0"\n',e+='array-dash = "-"\n',e+="\n",e+="; Surrogate named rules\n",e+='slash = "/"\n','; JavaScript Object Notation (JSON) Pointer ABNF syntax\n; https://datatracker.ietf.org/doc/html/rfc6901\njson-pointer = *( slash reference-token ) ; MODIFICATION: surrogate text rule used\nreference-token = *( unescaped / escaped )\nunescaped = %x00-2E / %x30-7D / %x7F-10FFFF\n ; %x2F (\'/\') and %x7E (\'~\') are excluded from \'unescaped\'\nescaped = "~" ( "0" / "1" )\n ; representing \'~\' and \'/\', respectively\n\n; https://datatracker.ietf.org/doc/html/rfc6901#section-4\narray-location = array-index / array-dash\narray-index = %x30 / ( %x31-39 *(%x30-39) )\n ; "0", or digits without a leading "0"\narray-dash = "-"\n\n; Surrogate named rules\nslash = "/"\n'}}class en extends Error{constructor(e,t=void 0){if(super(e,t),this.name=this.constructor.name,"string"==typeof e&&(this.message=e),"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error(e).stack,null!=t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"cause")&&!("cause"in this)){const{cause:e}=t;this.cause=e,e instanceof Error&&"stack"in e&&(this.stack=`${this.stack}\nCAUSE: ${e.stack}`)}if(null!=t&&"object"==typeof t){const{cause:e,...s}=t;Object.assign(this,s)}}}const tn=en;const sn=function(){const e=rn,t=nn,s=this,n="parser.js: Parser(): ";s.ast=void 0,s.stats=void 0,s.trace=void 0,s.callbacks=[];let r,i,o,c,a,l,u,h=0,d=0,p=0,m=0,f=0,y=new function(){this.state=e.ACTIVE,this.phraseLength=0,this.refresh=()=>{this.state=e.ACTIVE,this.phraseLength=0}};s.parse=(g,x,v,S)=>{const w=`${n}parse(): `;h=0,d=0,p=0,m=0,f=0,r=void 0,i=void 0,o=void 0,c=void 0,y.refresh(),a=void 0,l=void 0,u=void 0,c=t.stringToChars(v),r=g.rules,i=g.udts;const O=x.toLowerCase();let j;for(const e in r)if(r.hasOwnProperty(e)&&O===r[e].lower){j=r[e].index;break}if(void 0===j)throw new Error(`${w}start rule name '${startRule}' not recognized`);(()=>{const e=`${n}initializeCallbacks(): `;let t,o;for(a=[],l=[],t=0;t<r.length;t+=1)a[t]=void 0;for(t=0;t<i.length;t+=1)l[t]=void 0;const c=[];for(t=0;t<r.length;t+=1)c.push(r[t].lower);for(t=0;t<i.length;t+=1)c.push(i[t].lower);for(const n in s.callbacks)if(s.callbacks.hasOwnProperty(n)){if(t=c.indexOf(n.toLowerCase()),t<0)throw new Error(`${e}syntax callback '${n}' not a rule or udt name`);if(o=s.callbacks[n]?s.callbacks[n]:void 0,"function"!=typeof o&&void 0!==o)throw new Error(`${e}syntax callback[${n}] must be function reference or falsy)`);t<r.length?a[t]=o:l[t-r.length]=o}})(),s.trace&&s.trace.init(r,i,c),s.stats&&s.stats.init(r,i),s.ast&&s.ast.init(r,i,c),u=S,o=[{type:e.RNM,index:j}],b(0,0),o=void 0;let k=!1;switch(y.state){case e.ACTIVE:throw new Error(`${w}final state should never be 'ACTIVE'`);case e.NOMATCH:k=!1;break;case e.EMPTY:case e.MATCH:k=y.phraseLength===c.length;break;default:throw new Error("unrecognized state")}return{success:k,state:y.state,stateName:e.idName(y.state),length:c.length,matched:y.phraseLength,maxMatched:f,maxTreeDepth:p,nodeHits:m}};const g=(t,s,r,i)=>{if(s.phraseLength>r){let e=`${n}opRNM(${t.name}): callback function error: `;throw e+=`sysData.phraseLength: ${s.phraseLength}`,e+=` must be <= remaining chars: ${r}`,new Error(e)}switch(s.state){case e.ACTIVE:if(!i)throw new Error(`${n}opRNM(${t.name}): callback function return error. ACTIVE state not allowed.`);break;case e.EMPTY:s.phraseLength=0;break;case e.MATCH:0===s.phraseLength&&(s.state=e.EMPTY);break;case e.NOMATCH:s.phraseLength=0;break;default:throw new Error(`${n}opRNM(${t.name}): callback function return error. Unrecognized return state: ${s.state}`)}},x=(t,a)=>{let d,p,m;const f=o[t],g=i[f.index];y.UdtIndex=g.index,h||(m=s.ast&&s.ast.udtDefined(f.index),m&&(p=r.length+f.index,d=s.ast.getLength(),s.ast.down(p,g.name)));const x=c.length-a;l[f.index](y,c,a,u),((t,s,r)=>{if(s.phraseLength>r){let e=`${n}opUDT(${t.name}): callback function error: `;throw e+=`sysData.phraseLength: ${s.phraseLength}`,e+=` must be <= remaining chars: ${r}`,new Error(e)}switch(s.state){case e.ACTIVE:throw new Error(`${n}opUDT(${t.name}) ACTIVE state return not allowed.`);case e.EMPTY:if(!t.empty)throw new Error(`${n}opUDT(${t.name}) may not return EMPTY.`);s.phraseLength=0;break;case e.MATCH:if(0===s.phraseLength){if(!t.empty)throw new Error(`${n}opUDT(${t.name}) may not return EMPTY.`);s.state=e.EMPTY}break;case e.NOMATCH:s.phraseLength=0;break;default:throw new Error(`${n}opUDT(${t.name}): callback function return error. Unrecognized return state: ${s.state}`)}})(g,y,x),h||m&&(y.state===e.NOMATCH?s.ast.setLength(d):s.ast.up(p,g.name,a,y.phraseLength))},b=(t,i)=>{const l=`${n}opExecute(): `,v=o[t];switch(m+=1,d>p&&(p=d),d+=1,y.refresh(),s.trace&&s.trace.down(v,i),v.type){case e.ALT:((t,s)=>{const n=o[t];for(let t=0;t<n.children.length&&(b(n.children[t],s),y.state===e.NOMATCH);t+=1);})(t,i);break;case e.CAT:((t,n)=>{let r,i,c,a;const l=o[t];s.ast&&(i=s.ast.getLength()),r=!0,c=n,a=0;for(let t=0;t<l.children.length;t+=1){if(b(l.children[t],c),y.state===e.NOMATCH){r=!1;break}c+=y.phraseLength,a+=y.phraseLength}r?(y.state=0===a?e.EMPTY:e.MATCH,y.phraseLength=a):(y.state=e.NOMATCH,y.phraseLength=0,s.ast&&s.ast.setLength(i))})(t,i);break;case e.REP:((t,n)=>{let r,i,a,l;const u=o[t];if(0===u.max)return y.state=e.EMPTY,void(y.phraseLength=0);for(i=n,a=0,l=0,s.ast&&(r=s.ast.getLength());!(i>=c.length)&&(b(t+1,i),y.state!==e.NOMATCH)&&y.state!==e.EMPTY&&(l+=1,a+=y.phraseLength,i+=y.phraseLength,l!==u.max););y.state===e.EMPTY||l>=u.min?(y.state=0===a?e.EMPTY:e.MATCH,y.phraseLength=a):(y.state=e.NOMATCH,y.phraseLength=0,s.ast&&s.ast.setLength(r))})(t,i);break;case e.RNM:((t,n)=>{let i,l,d;const p=o[t],m=r[p.index],f=a[m.index];if(h||(l=s.ast&&s.ast.ruleDefined(p.index),l&&(i=s.ast.getLength(),s.ast.down(p.index,r[p.index].name))),f){const t=c.length-n;f(y,c,n,u),g(m,y,t,!0),y.state===e.ACTIVE&&(d=o,o=m.opcodes,b(0,n),o=d,f(y,c,n,u),g(m,y,t,!1))}else d=o,o=m.opcodes,b(0,n,y),o=d;h||l&&(y.state===e.NOMATCH?s.ast.setLength(i):s.ast.up(p.index,m.name,n,y.phraseLength))})(t,i);break;case e.TRG:((t,s)=>{const n=o[t];y.state=e.NOMATCH,s<c.length&&n.min<=c[s]&&c[s]<=n.max&&(y.state=e.MATCH,y.phraseLength=1)})(t,i);break;case e.TBS:((t,s)=>{const n=o[t],r=n.string.length;if(y.state=e.NOMATCH,s+r<=c.length){for(let e=0;e<r;e+=1)if(c[s+e]!==n.string[e])return;y.state=e.MATCH,y.phraseLength=r}})(t,i);break;case e.TLS:((t,s)=>{let n;const r=o[t];y.state=e.NOMATCH;const i=r.string.length;if(0!==i){if(s+i<=c.length){for(let e=0;e<i;e+=1)if(n=c[s+e],n>=65&&n<=90&&(n+=32),n!==r.string[e])return;y.state=e.MATCH,y.phraseLength=i}}else y.state=e.EMPTY})(t,i);break;case e.UDT:x(t,i);break;case e.AND:((t,s)=>{switch(h+=1,b(t+1,s),h-=1,y.phraseLength=0,y.state){case e.EMPTY:case e.MATCH:y.state=e.EMPTY;break;case e.NOMATCH:y.state=e.NOMATCH;break;default:throw new Error(`opAND: invalid state ${y.state}`)}})(t,i);break;case e.NOT:((t,s)=>{switch(h+=1,b(t+1,s),h-=1,y.phraseLength=0,y.state){case e.EMPTY:case e.MATCH:y.state=e.NOMATCH;break;case e.NOMATCH:y.state=e.EMPTY;break;default:throw new Error(`opNOT: invalid state ${y.state}`)}})(t,i);break;default:throw new Error(`${l}unrecognized operator`)}h||i+y.phraseLength>f&&(f=i+y.phraseLength),s.stats&&s.stats.collect(v,y),s.trace&&s.trace.up(v,y.state,i,y.phraseLength),d-=1}},nn={stringToChars:e=>[...e].map(e=>e.codePointAt(0)),charsToString:(e,t,s)=>{let n=e;for(;!(void 0===t||t<0);){if(void 0===s){n=e.slice(t);break}if(s<=0)return"";n=e.slice(t,t+s);break}return String.fromCodePoint(...n)}},rn={ALT:1,CAT:2,REP:3,RNM:4,TRG:5,TBS:6,TLS:7,UDT:11,AND:12,NOT:13,ACTIVE:100,MATCH:101,EMPTY:102,NOMATCH:103,SEM_PRE:200,SEM_POST:201,SEM_OK:300,idName:e=>{switch(e){case rn.ALT:return"ALT";case rn.CAT:return"CAT";case rn.REP:return"REP";case rn.RNM:return"RNM";case rn.TRG:return"TRG";case rn.TBS:return"TBS";case rn.TLS:return"TLS";case rn.UDT:return"UDT";case rn.AND:return"AND";case rn.NOT:return"NOT";case rn.ACTIVE:return"ACTIVE";case rn.EMPTY:return"EMPTY";case rn.MATCH:return"MATCH";case rn.NOMATCH:return"NOMATCH";case rn.SEM_PRE:return"SEM_PRE";case rn.SEM_POST:return"SEM_POST";case rn.SEM_OK:return"SEM_OK";default:return"UNRECOGNIZED STATE"}}};new Zs;new Zs,new sn,new Zs,new sn,new Zs,new sn,new Zs,new sn;const on=e=>{if("string"!=typeof e&&"number"!=typeof e)throw new TypeError("Reference token must be a string or number");return String(e).replace(/~/g,"~0").replace(/\//g,"~1")};const cn=class extends tn{},an=e=>{if(!Array.isArray(e))throw new TypeError("Reference tokens must be a list of strings or numbers");try{return 0===e.length?"":`/${e.map(e=>{if("string"!=typeof e&&"number"!=typeof e)throw new TypeError("Reference token must be a string or number");return on(String(e))}).join("/")}`}catch(t){throw new cn("Unexpected error during JSON Pointer compilation",{cause:t,referenceTokens:e})}};class ln extends Error{constructor(e,t=void 0){if(super(e,t),this.name=this.constructor.name,"string"==typeof e&&(this.message=e),"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error(e).stack,null!=t&&"object"==typeof t&&Object.hasOwn(t,"cause")&&!("cause"in this)){const{cause:e}=t;this.cause=e,e instanceof Error&&"stack"in e&&(this.stack=`${this.stack}\nCAUSE: ${e.stack}`)}if(null!=t&&"object"==typeof t){const{cause:e,...s}=t;Object.assign(this,s)}}}const un=ln;new function(){this.grammarObject="grammarObject",this.rules=[],this.rules[0]={name:"jsonpath-query",lower:"jsonpath-query",index:0,isBkr:!1},this.rules[1]={name:"segments",lower:"segments",index:1,isBkr:!1},this.rules[2]={name:"B",lower:"b",index:2,isBkr:!1},this.rules[3]={name:"S",lower:"s",index:3,isBkr:!1},this.rules[4]={name:"root-identifier",lower:"root-identifier",index:4,isBkr:!1},this.rules[5]={name:"selector",lower:"selector",index:5,isBkr:!1},this.rules[6]={name:"name-selector",lower:"name-selector",index:6,isBkr:!1},this.rules[7]={name:"string-literal",lower:"string-literal",index:7,isBkr:!1},this.rules[8]={name:"double-quoted",lower:"double-quoted",index:8,isBkr:!1},this.rules[9]={name:"single-quoted",lower:"single-quoted",index:9,isBkr:!1},this.rules[10]={name:"ESC",lower:"esc",index:10,isBkr:!1},this.rules[11]={name:"unescaped",lower:"unescaped",index:11,isBkr:!1},this.rules[12]={name:"escapable",lower:"escapable",index:12,isBkr:!1},this.rules[13]={name:"hexchar",lower:"hexchar",index:13,isBkr:!1},this.rules[14]={name:"non-surrogate",lower:"non-surrogate",index:14,isBkr:!1},this.rules[15]={name:"high-surrogate",lower:"high-surrogate",index:15,isBkr:!1},this.rules[16]={name:"low-surrogate",lower:"low-surrogate",index:16,isBkr:!1},this.rules[17]={name:"HEXDIG",lower:"hexdig",index:17,isBkr:!1},this.rules[18]={name:"wildcard-selector",lower:"wildcard-selector",index:18,isBkr:!1},this.rules[19]={name:"index-selector",lower:"index-selector",index:19,isBkr:!1},this.rules[20]={name:"int",lower:"int",index:20,isBkr:!1},this.rules[21]={name:"DIGIT1",lower:"digit1",index:21,isBkr:!1},this.rules[22]={name:"slice-selector",lower:"slice-selector",index:22,isBkr:!1},this.rules[23]={name:"start",lower:"start",index:23,isBkr:!1},this.rules[24]={name:"end",lower:"end",index:24,isBkr:!1},this.rules[25]={name:"step",lower:"step",index:25,isBkr:!1},this.rules[26]={name:"filter-selector",lower:"filter-selector",index:26,isBkr:!1},this.rules[27]={name:"logical-expr",lower:"logical-expr",index:27,isBkr:!1},this.rules[28]={name:"logical-or-expr",lower:"logical-or-expr",index:28,isBkr:!1},this.rules[29]={name:"logical-and-expr",lower:"logical-and-expr",index:29,isBkr:!1},this.rules[30]={name:"basic-expr",lower:"basic-expr",index:30,isBkr:!1},this.rules[31]={name:"paren-expr",lower:"paren-expr",index:31,isBkr:!1},this.rules[32]={name:"logical-not-op",lower:"logical-not-op",index:32,isBkr:!1},this.rules[33]={name:"test-expr",lower:"test-expr",index:33,isBkr:!1},this.rules[34]={name:"filter-query",lower:"filter-query",index:34,isBkr:!1},this.rules[35]={name:"rel-query",lower:"rel-query",index:35,isBkr:!1},this.rules[36]={name:"current-node-identifier",lower:"current-node-identifier",index:36,isBkr:!1},this.rules[37]={name:"comparison-expr",lower:"comparison-expr",index:37,isBkr:!1},this.rules[38]={name:"literal",lower:"literal",index:38,isBkr:!1},this.rules[39]={name:"comparable",lower:"comparable",index:39,isBkr:!1},this.rules[40]={name:"comparison-op",lower:"comparison-op",index:40,isBkr:!1},this.rules[41]={name:"singular-query",lower:"singular-query",index:41,isBkr:!1},this.rules[42]={name:"rel-singular-query",lower:"rel-singular-query",index:42,isBkr:!1},this.rules[43]={name:"abs-singular-query",lower:"abs-singular-query",index:43,isBkr:!1},this.rules[44]={name:"singular-query-segments",lower:"singular-query-segments",index:44,isBkr:!1},this.rules[45]={name:"name-segment",lower:"name-segment",index:45,isBkr:!1},this.rules[46]={name:"index-segment",lower:"index-segment",index:46,isBkr:!1},this.rules[47]={name:"number",lower:"number",index:47,isBkr:!1},this.rules[48]={name:"frac",lower:"frac",index:48,isBkr:!1},this.rules[49]={name:"exp",lower:"exp",index:49,isBkr:!1},this.rules[50]={name:"true",lower:"true",index:50,isBkr:!1},this.rules[51]={name:"false",lower:"false",index:51,isBkr:!1},this.rules[52]={name:"null",lower:"null",index:52,isBkr:!1},this.rules[53]={name:"function-name",lower:"function-name",index:53,isBkr:!1},this.rules[54]={name:"function-name-first",lower:"function-name-first",index:54,isBkr:!1},this.rules[55]={name:"function-name-char",lower:"function-name-char",index:55,isBkr:!1},this.rules[56]={name:"LCALPHA",lower:"lcalpha",index:56,isBkr:!1},this.rules[57]={name:"function-expr",lower:"function-expr",index:57,isBkr:!1},this.rules[58]={name:"function-argument",lower:"function-argument",index:58,isBkr:!1},this.rules[59]={name:"segment",lower:"segment",index:59,isBkr:!1},this.rules[60]={name:"child-segment",lower:"child-segment",index:60,isBkr:!1},this.rules[61]={name:"bracketed-selection",lower:"bracketed-selection",index:61,isBkr:!1},this.rules[62]={name:"member-name-shorthand",lower:"member-name-shorthand",index:62,isBkr:!1},this.rules[63]={name:"name-first",lower:"name-first",index:63,isBkr:!1},this.rules[64]={name:"name-char",lower:"name-char",index:64,isBkr:!1},this.rules[65]={name:"DIGIT",lower:"digit",index:65,isBkr:!1},this.rules[66]={name:"ALPHA",lower:"alpha",index:66,isBkr:!1},this.rules[67]={name:"descendant-segment",lower:"descendant-segment",index:67,isBkr:!1},this.rules[68]={name:"normalized-path",lower:"normalized-path",index:68,isBkr:!1},this.rules[69]={name:"normal-index-segment",lower:"normal-index-segment",index:69,isBkr:!1},this.rules[70]={name:"normal-selector",lower:"normal-selector",index:70,isBkr:!1},this.rules[71]={name:"normal-name-selector",lower:"normal-name-selector",index:71,isBkr:!1},this.rules[72]={name:"normal-single-quoted",lower:"normal-single-quoted",index:72,isBkr:!1},this.rules[73]={name:"normal-unescaped",lower:"normal-unescaped",index:73,isBkr:!1},this.rules[74]={name:"normal-escapable",lower:"normal-escapable",index:74,isBkr:!1},this.rules[75]={name:"normal-hexchar",lower:"normal-hexchar",index:75,isBkr:!1},this.rules[76]={name:"normal-HEXDIG",lower:"normal-hexdig",index:76,isBkr:!1},this.rules[77]={name:"normal-index-selector",lower:"normal-index-selector",index:77,isBkr:!1},this.rules[78]={name:"dot-prefix",lower:"dot-prefix",index:78,isBkr:!1},this.rules[79]={name:"double-dot-prefix",lower:"double-dot-prefix",index:79,isBkr:!1},this.rules[80]={name:"left-bracket",lower:"left-bracket",index:80,isBkr:!1},this.rules[81]={name:"right-bracket",lower:"right-bracket",index:81,isBkr:!1},this.rules[82]={name:"left-paren",lower:"left-paren",index:82,isBkr:!1},this.rules[83]={name:"right-paren",lower:"right-paren",index:83,isBkr:!1},this.rules[84]={name:"comma",lower:"comma",index:84,isBkr:!1},this.rules[85]={name:"colon",lower:"colon",index:85,isBkr:!1},this.rules[86]={name:"dquote",lower:"dquote",index:86,isBkr:!1},this.rules[87]={name:"squote",lower:"squote",index:87,isBkr:!1},this.rules[88]={name:"questionmark",lower:"questionmark",index:88,isBkr:!1},this.rules[89]={name:"disjunction",lower:"disjunction",index:89,isBkr:!1},this.rules[90]={name:"conjunction",lower:"conjunction",index:90,isBkr:!1},this.udts=[],this.rules[0].opcodes=[],this.rules[0].opcodes[0]={type:2,children:[1,2]},this.rules[0].opcodes[1]={type:4,index:4},this.rules[0].opcodes[2]={type:4,index:1},this.rules[1].opcodes=[],this.rules[1].opcodes[0]={type:3,min:0,max:1/0},this.rules[1].opcodes[1]={type:2,children:[2,3]},this.rules[1].opcodes[2]={type:4,index:3},this.rules[1].opcodes[3]={type:4,index:59},this.rules[2].opcodes=[],this.rules[2].opcodes[0]={type:1,children:[1,2,3,4]},this.rules[2].opcodes[1]={type:6,string:[32]},this.rules[2].opcodes[2]={type:6,string:[9]},this.rules[2].opcodes[3]={type:6,string:[10]},this.rules[2].opcodes[4]={type:6,string:[13]},this.rules[3].opcodes=[],this.rules[3].opcodes[0]={type:3,min:0,max:1/0},this.rules[3].opcodes[1]={type:4,index:2},this.rules[4].opcodes=[],this.rules[4].opcodes[0]={type:7,string:[36]},this.rules[5].opcodes=[],this.rules[5].opcodes[0]={type:1,children:[1,2,3,4,5]},this.rules[5].opcodes[1]={type:4,index:6},this.rules[5].opcodes[2]={type:4,index:18},this.rules[5].opcodes[3]={type:4,index:22},this.rules[5].opcodes[4]={type:4,index:19},this.rules[5].opcodes[5]={type:4,index:26},this.rules[6].opcodes=[],this.rules[6].opcodes[0]={type:4,index:7},this.rules[7].opcodes=[],this.rules[7].opcodes[0]={type:1,children:[1,6]},this.rules[7].opcodes[1]={type:2,children:[2,3,5]},this.rules[7].opcodes[2]={type:4,index:86},this.rules[7].opcodes[3]={type:3,min:0,max:1/0},this.rules[7].opcodes[4]={type:4,index:8},this.rules[7].opcodes[5]={type:4,index:86},this.rules[7].opcodes[6]={type:2,children:[7,8,10]},this.rules[7].opcodes[7]={type:4,index:87},this.rules[7].opcodes[8]={type:3,min:0,max:1/0},this.rules[7].opcodes[9]={type:4,index:9},this.rules[7].opcodes[10]={type:4,index:87},this.rules[8].opcodes=[],this.rules[8].opcodes[0]={type:1,children:[1,2,3,6]},this.rules[8].opcodes[1]={type:4,index:11},this.rules[8].opcodes[2]={type:6,string:[39]},this.rules[8].opcodes[3]={type:2,children:[4,5]},this.rules[8].opcodes[4]={type:4,index:10},this.rules[8].opcodes[5]={type:6,string:[34]},this.rules[8].opcodes[6]={type:2,children:[7,8]},this.rules[8].opcodes[7]={type:4,index:10},this.rules[8].opcodes[8]={type:4,index:12},this.rules[9].opcodes=[],this.rules[9].opcodes[0]={type:1,children:[1,2,3,6]},this.rules[9].opcodes[1]={type:4,index:11},this.rules[9].opcodes[2]={type:6,string:[34]},this.rules[9].opcodes[3]={type:2,children:[4,5]},this.rules[9].opcodes[4]={type:4,index:10},this.rules[9].opcodes[5]={type:6,string:[39]},this.rules[9].opcodes[6]={type:2,children:[7,8]},this.rules[9].opcodes[7]={type:4,index:10},this.rules[9].opcodes[8]={type:4,index:12},this.rules[10].opcodes=[],this.rules[10].opcodes[0]={type:6,string:[92]},this.rules[11].opcodes=[],this.rules[11].opcodes[0]={type:1,children:[1,2,3,4,5]},this.rules[11].opcodes[1]={type:5,min:32,max:33},this.rules[11].opcodes[2]={type:5,min:35,max:38},this.rules[11].opcodes[3]={type:5,min:40,max:91},this.rules[11].opcodes[4]={type:5,min:93,max:55295},this.rules[11].opcodes[5]={type:5,min:57344,max:1114111},this.rules[12].opcodes=[],this.rules[12].opcodes[0]={type:1,children:[1,2,3,4,5,6,7,8]},this.rules[12].opcodes[1]={type:6,string:[98]},this.rules[12].opcodes[2]={type:6,string:[102]},this.rules[12].opcodes[3]={type:6,string:[110]},this.rules[12].opcodes[4]={type:6,string:[114]},this.rules[12].opcodes[5]={type:6,string:[116]},this.rules[12].opcodes[6]={type:7,string:[47]},this.rules[12].opcodes[7]={type:7,string:[92]},this.rules[12].opcodes[8]={type:2,children:[9,10]},this.rules[12].opcodes[9]={type:6,string:[117]},this.rules[12].opcodes[10]={type:4,index:13},this.rules[13].opcodes=[],this.rules[13].opcodes[0]={type:1,children:[1,2]},this.rules[13].opcodes[1]={type:4,index:14},this.rules[13].opcodes[2]={type:2,children:[3,4,5,6]},this.rules[13].opcodes[3]={type:4,index:15},this.rules[13].opcodes[4]={type:7,string:[92]},this.rules[13].opcodes[5]={type:6,string:[117]},this.rules[13].opcodes[6]={type:4,index:16},this.rules[14].opcodes=[],this.rules[14].opcodes[0]={type:1,children:[1,11]},this.rules[14].opcodes[1]={type:2,children:[2,9]},this.rules[14].opcodes[2]={type:1,children:[3,4,5,6,7,8]},this.rules[14].opcodes[3]={type:4,index:65},this.rules[14].opcodes[4]={type:7,string:[97]},this.rules[14].opcodes[5]={type:7,string:[98]},this.rules[14].opcodes[6]={type:7,string:[99]},this.rules[14].opcodes[7]={type:7,string:[101]},this.rules[14].opcodes[8]={type:7,string:[102]},this.rules[14].opcodes[9]={type:3,min:3,max:3},this.rules[14].opcodes[10]={type:4,index:17},this.rules[14].opcodes[11]={type:2,children:[12,13,14]},this.rules[14].opcodes[12]={type:7,string:[100]},this.rules[14].opcodes[13]={type:5,min:48,max:55},this.rules[14].opcodes[14]={type:3,min:2,max:2},this.rules[14].opcodes[15]={type:4,index:17},this.rules[15].opcodes=[],this.rules[15].opcodes[0]={type:2,children:[1,2,7]},this.rules[15].opcodes[1]={type:7,string:[100]},this.rules[15].opcodes[2]={type:1,children:[3,4,5,6]},this.rules[15].opcodes[3]={type:7,string:[56]},this.rules[15].opcodes[4]={type:7,string:[57]},this.rules[15].opcodes[5]={type:7,string:[97]},this.rules[15].opcodes[6]={type:7,string:[98]},this.rules[15].opcodes[7]={type:3,min:2,max:2},this.rules[15].opcodes[8]={type:4,index:17},this.rules[16].opcodes=[],this.rules[16].opcodes[0]={type:2,children:[1,2,7]},this.rules[16].opcodes[1]={type:7,string:[100]},this.rules[16].opcodes[2]={type:1,children:[3,4,5,6]},this.rules[16].opcodes[3]={type:7,string:[99]},this.rules[16].opcodes[4]={type:7,string:[100]},this.rules[16].opcodes[5]={type:7,string:[101]},this.rules[16].opcodes[6]={type:7,string:[102]},this.rules[16].opcodes[7]={type:3,min:2,max:2},this.rules[16].opcodes[8]={type:4,index:17},this.rules[17].opcodes=[],this.rules[17].opcodes[0]={type:1,children:[1,2,3,4,5,6,7]},this.rules[17].opcodes[1]={type:4,index:65},this.rules[17].opcodes[2]={type:7,string:[97]},this.rules[17].opcodes[3]={type:7,string:[98]},this.rules[17].opcodes[4]={type:7,string:[99]},this.rules[17].opcodes[5]={type:7,string:[100]},this.rules[17].opcodes[6]={type:7,string:[101]},this.rules[17].opcodes[7]={type:7,string:[102]},this.rules[18].opcodes=[],this.rules[18].opcodes[0]={type:7,string:[42]},this.rules[19].opcodes=[],this.rules[19].opcodes[0]={type:4,index:20},this.rules[20].opcodes=[],this.rules[20].opcodes[0]={type:1,children:[1,2]},this.rules[20].opcodes[1]={type:7,string:[48]},this.rules[20].opcodes[2]={type:2,children:[3,5,6]},this.rules[20].opcodes[3]={type:3,min:0,max:1},this.rules[20].opcodes[4]={type:7,string:[45]},this.rules[20].opcodes[5]={type:4,index:21},this.rules[20].opcodes[6]={type:3,min:0,max:1/0},this.rules[20].opcodes[7]={type:4,index:65},this.rules[21].opcodes=[],this.rules[21].opcodes[0]={type:5,min:49,max:57},this.rules[22].opcodes=[],this.rules[22].opcodes[0]={type:2,children:[1,5,6,7,11]},this.rules[22].opcodes[1]={type:3,min:0,max:1},this.rules[22].opcodes[2]={type:2,children:[3,4]},this.rules[22].opcodes[3]={type:4,index:23},this.rules[22].opcodes[4]={type:4,index:3},this.rules[22].opcodes[5]={type:4,index:85},this.rules[22].opcodes[6]={type:4,index:3},this.rules[22].opcodes[7]={type:3,min:0,max:1},this.rules[22].opcodes[8]={type:2,children:[9,10]},this.rules[22].opcodes[9]={type:4,index:24},this.rules[22].opcodes[10]={type:4,index:3},this.rules[22].opcodes[11]={type:3,min:0,max:1},this.rules[22].opcodes[12]={type:2,children:[13,14]},this.rules[22].opcodes[13]={type:4,index:85},this.rules[22].opcodes[14]={type:3,min:0,max:1},this.rules[22].opcodes[15]={type:2,children:[16,17]},this.rules[22].opcodes[16]={type:4,index:3},this.rules[22].opcodes[17]={type:4,index:25},this.rules[23].opcodes=[],this.rules[23].opcodes[0]={type:4,index:20},this.rules[24].opcodes=[],this.rules[24].opcodes[0]={type:4,index:20},this.rules[25].opcodes=[],this.rules[25].opcodes[0]={type:4,index:20},this.rules[26].opcodes=[],this.rules[26].opcodes[0]={type:2,children:[1,2,3]},this.rules[26].opcodes[1]={type:4,index:88},this.rules[26].opcodes[2]={type:4,index:3},this.rules[26].opcodes[3]={type:4,index:27},this.rules[27].opcodes=[],this.rules[27].opcodes[0]={type:4,index:28},this.rules[28].opcodes=[],this.rules[28].opcodes[0]={type:2,children:[1,2]},this.rules[28].opcodes[1]={type:4,index:29},this.rules[28].opcodes[2]={type:3,min:0,max:1/0},this.rules[28].opcodes[3]={type:2,children:[4,5,6,7]},this.rules[28].opcodes[4]={type:4,index:3},this.rules[28].opcodes[5]={type:4,index:89},this.rules[28].opcodes[6]={type:4,index:3},this.rules[28].opcodes[7]={type:4,index:29},this.rules[29].opcodes=[],this.rules[29].opcodes[0]={type:2,children:[1,2]},this.rules[29].opcodes[1]={type:4,index:30},this.rules[29].opcodes[2]={type:3,min:0,max:1/0},this.rules[29].opcodes[3]={type:2,children:[4,5,6,7]},this.rules[29].opcodes[4]={type:4,index:3},this.rules[29].opcodes[5]={type:4,index:90},this.rules[29].opcodes[6]={type:4,index:3},this.rules[29].opcodes[7]={type:4,index:30},this.rules[30].opcodes=[],this.rules[30].opcodes[0]={type:1,children:[1,2,3]},this.rules[30].opcodes[1]={type:4,index:31},this.rules[30].opcodes[2]={type:4,index:37},this.rules[30].opcodes[3]={type:4,index:33},this.rules[31].opcodes=[],this.rules[31].opcodes[0]={type:2,children:[1,5,6,7,8,9]},this.rules[31].opcodes[1]={type:3,min:0,max:1},this.rules[31].opcodes[2]={type:2,children:[3,4]},this.rules[31].opcodes[3]={type:4,index:32},this.rules[31].opcodes[4]={type:4,index:3},this.rules[31].opcodes[5]={type:4,index:82},this.rules[31].opcodes[6]={type:4,index:3},this.rules[31].opcodes[7]={type:4,index:27},this.rules[31].opcodes[8]={type:4,index:3},this.rules[31].opcodes[9]={type:4,index:83},this.rules[32].opcodes=[],this.rules[32].opcodes[0]={type:7,string:[33]},this.rules[33].opcodes=[],this.rules[33].opcodes[0]={type:2,children:[1,5]},this.rules[33].opcodes[1]={type:3,min:0,max:1},this.rules[33].opcodes[2]={type:2,children:[3,4]},this.rules[33].opcodes[3]={type:4,index:32},this.rules[33].opcodes[4]={type:4,index:3},this.rules[33].opcodes[5]={type:1,children:[6,7]},this.rules[33].opcodes[6]={type:4,index:34},this.rules[33].opcodes[7]={type:4,index:57},this.rules[34].opcodes=[],this.rules[34].opcodes[0]={type:1,children:[1,2]},this.rules[34].opcodes[1]={type:4,index:35},this.rules[34].opcodes[2]={type:4,index:0},this.rules[35].opcodes=[],this.rules[35].opcodes[0]={type:2,children:[1,2]},this.rules[35].opcodes[1]={type:4,index:36},this.rules[35].opcodes[2]={type:4,index:1},this.rules[36].opcodes=[],this.rules[36].opcodes[0]={type:7,string:[64]},this.rules[37].opcodes=[],this.rules[37].opcodes[0]={type:2,children:[1,2,3,4,5]},this.rules[37].opcodes[1]={type:4,index:39},this.rules[37].opcodes[2]={type:4,index:3},this.rules[37].opcodes[3]={type:4,index:40},this.rules[37].opcodes[4]={type:4,index:3},this.rules[37].opcodes[5]={type:4,index:39},this.rules[38].opcodes=[],this.rules[38].opcodes[0]={type:1,children:[1,2,3,4,5]},this.rules[38].opcodes[1]={type:4,index:47},this.rules[38].opcodes[2]={type:4,index:7},this.rules[38].opcodes[3]={type:4,index:50},this.rules[38].opcodes[4]={type:4,index:51},this.rules[38].opcodes[5]={type:4,index:52},this.rules[39].opcodes=[],this.rules[39].opcodes[0]={type:1,children:[1,2,3]},this.rules[39].opcodes[1]={type:4,index:41},this.rules[39].opcodes[2]={type:4,index:57},this.rules[39].opcodes[3]={type:4,index:38},this.rules[40].opcodes=[],this.rules[40].opcodes[0]={type:1,children:[1,2,3,4,5,6]},this.rules[40].opcodes[1]={type:7,string:[61,61]},this.rules[40].opcodes[2]={type:7,string:[33,61]},this.rules[40].opcodes[3]={type:7,string:[60,61]},this.rules[40].opcodes[4]={type:7,string:[62,61]},this.rules[40].opcodes[5]={type:7,string:[60]},this.rules[40].opcodes[6]={type:7,string:[62]},this.rules[41].opcodes=[],this.rules[41].opcodes[0]={type:1,children:[1,2]},this.rules[41].opcodes[1]={type:4,index:42},this.rules[41].opcodes[2]={type:4,index:43},this.rules[42].opcodes=[],this.rules[42].opcodes[0]={type:2,children:[1,2]},this.rules[42].opcodes[1]={type:4,index:36},this.rules[42].opcodes[2]={type:4,index:44},this.rules[43].opcodes=[],this.rules[43].opcodes[0]={type:2,children:[1,2]},this.rules[43].opcodes[1]={type:4,index:4},this.rules[43].opcodes[2]={type:4,index:44},this.rules[44].opcodes=[],this.rules[44].opcodes[0]={type:3,min:0,max:1/0},this.rules[44].opcodes[1]={type:2,children:[2,3]},this.rules[44].opcodes[2]={type:4,index:3},this.rules[44].opcodes[3]={type:1,children:[4,5]},this.rules[44].opcodes[4]={type:4,index:45},this.rules[44].opcodes[5]={type:4,index:46},this.rules[45].opcodes=[],this.rules[45].opcodes[0]={type:1,children:[1,5]},this.rules[45].opcodes[1]={type:2,children:[2,3,4]},this.rules[45].opcodes[2]={type:4,index:80},this.rules[45].opcodes[3]={type:4,index:6},this.rules[45].opcodes[4]={type:4,index:81},this.rules[45].opcodes[5]={type:2,children:[6,7]},this.rules[45].opcodes[6]={type:4,index:78},this.rules[45].opcodes[7]={type:4,index:62},this.rules[46].opcodes=[],this.rules[46].opcodes[0]={type:2,children:[1,2,3]},this.rules[46].opcodes[1]={type:4,index:80},this.rules[46].opcodes[2]={type:4,index:19},this.rules[46].opcodes[3]={type:4,index:81},this.rules[47].opcodes=[],this.rules[47].opcodes[0]={type:2,children:[1,4,6]},this.rules[47].opcodes[1]={type:1,children:[2,3]},this.rules[47].opcodes[2]={type:4,index:20},this.rules[47].opcodes[3]={type:7,string:[45,48]},this.rules[47].opcodes[4]={type:3,min:0,max:1},this.rules[47].opcodes[5]={type:4,index:48},this.rules[47].opcodes[6]={type:3,min:0,max:1},this.rules[47].opcodes[7]={type:4,index:49},this.rules[48].opcodes=[],this.rules[48].opcodes[0]={type:2,children:[1,2]},this.rules[48].opcodes[1]={type:7,string:[46]},this.rules[48].opcodes[2]={type:3,min:1,max:1/0},this.rules[48].opcodes[3]={type:4,index:65},this.rules[49].opcodes=[],this.rules[49].opcodes[0]={type:2,children:[1,2,6]},this.rules[49].opcodes[1]={type:7,string:[101]},this.rules[49].opcodes[2]={type:3,min:0,max:1},this.rules[49].opcodes[3]={type:1,children:[4,5]},this.rules[49].opcodes[4]={type:7,string:[45]},this.rules[49].opcodes[5]={type:7,string:[43]},this.rules[49].opcodes[6]={type:3,min:1,max:1/0},this.rules[49].opcodes[7]={type:4,index:65},this.rules[50].opcodes=[],this.rules[50].opcodes[0]={type:6,string:[116,114,117,101]},this.rules[51].opcodes=[],this.rules[51].opcodes[0]={type:6,string:[102,97,108,115,101]},this.rules[52].opcodes=[],this.rules[52].opcodes[0]={type:6,string:[110,117,108,108]},this.rules[53].opcodes=[],this.rules[53].opcodes[0]={type:2,children:[1,2]},this.rules[53].opcodes[1]={type:4,index:54},this.rules[53].opcodes[2]={type:3,min:0,max:1/0},this.rules[53].opcodes[3]={type:4,index:55},this.rules[54].opcodes=[],this.rules[54].opcodes[0]={type:4,index:56},this.rules[55].opcodes=[],this.rules[55].opcodes[0]={type:1,children:[1,2,3]},this.rules[55].opcodes[1]={type:4,index:54},this.rules[55].opcodes[2]={type:7,string:[95]},this.rules[55].opcodes[3]={type:4,index:65},this.rules[56].opcodes=[],this.rules[56].opcodes[0]={type:5,min:97,max:122},this.rules[57].opcodes=[],this.rules[57].opcodes[0]={type:2,children:[1,2,3,4,13,14]},this.rules[57].opcodes[1]={type:4,index:53},this.rules[57].opcodes[2]={type:4,index:82},this.rules[57].opcodes[3]={type:4,index:3},this.rules[57].opcodes[4]={type:3,min:0,max:1},this.rules[57].opcodes[5]={type:2,children:[6,7]},this.rules[57].opcodes[6]={type:4,index:58},this.rules[57].opcodes[7]={type:3,min:0,max:1/0},this.rules[57].opcodes[8]={type:2,children:[9,10,11,12]},this.rules[57].opcodes[9]={type:4,index:3},this.rules[57].opcodes[10]={type:4,index:84},this.rules[57].opcodes[11]={type:4,index:3},this.rules[57].opcodes[12]={type:4,index:58},this.rules[57].opcodes[13]={type:4,index:3},this.rules[57].opcodes[14]={type:4,index:83},this.rules[58].opcodes=[],this.rules[58].opcodes[0]={type:1,children:[1,2,3,4]},this.rules[58].opcodes[1]={type:4,index:27},this.rules[58].opcodes[2]={type:4,index:34},this.rules[58].opcodes[3]={type:4,index:57},this.rules[58].opcodes[4]={type:4,index:38},this.rules[59].opcodes=[],this.rules[59].opcodes[0]={type:1,children:[1,2]},this.rules[59].opcodes[1]={type:4,index:60},this.rules[59].opcodes[2]={type:4,index:67},this.rules[60].opcodes=[],this.rules[60].opcodes[0]={type:1,children:[1,2]},this.rules[60].opcodes[1]={type:4,index:61},this.rules[60].opcodes[2]={type:2,children:[3,4]},this.rules[60].opcodes[3]={type:4,index:78},this.rules[60].opcodes[4]={type:1,children:[5,6]},this.rules[60].opcodes[5]={type:4,index:18},this.rules[60].opcodes[6]={type:4,index:62},this.rules[61].opcodes=[],this.rules[61].opcodes[0]={type:2,children:[1,2,3,4,10,11]},this.rules[61].opcodes[1]={type:4,index:80},this.rules[61].opcodes[2]={type:4,index:3},this.rules[61].opcodes[3]={type:4,index:5},this.rules[61].opcodes[4]={type:3,min:0,max:1/0},this.rules[61].opcodes[5]={type:2,children:[6,7,8,9]},this.rules[61].opcodes[6]={type:4,index:3},this.rules[61].opcodes[7]={type:4,index:84},this.rules[61].opcodes[8]={type:4,index:3},this.rules[61].opcodes[9]={type:4,index:5},this.rules[61].opcodes[10]={type:4,index:3},this.rules[61].opcodes[11]={type:4,index:81},this.rules[62].opcodes=[],this.rules[62].opcodes[0]={type:2,children:[1,2]},this.rules[62].opcodes[1]={type:4,index:63},this.rules[62].opcodes[2]={type:3,min:0,max:1/0},this.rules[62].opcodes[3]={type:4,index:64},this.rules[63].opcodes=[],this.rules[63].opcodes[0]={type:1,children:[1,2,3,4]},this.rules[63].opcodes[1]={type:4,index:66},this.rules[63].opcodes[2]={type:7,string:[95]},this.rules[63].opcodes[3]={type:5,min:128,max:55295},this.rules[63].opcodes[4]={type:5,min:57344,max:1114111},this.rules[64].opcodes=[],this.rules[64].opcodes[0]={type:1,children:[1,2]},this.rules[64].opcodes[1]={type:4,index:63},this.rules[64].opcodes[2]={type:4,index:65},this.rules[65].opcodes=[],this.rules[65].opcodes[0]={type:5,min:48,max:57},this.rules[66].opcodes=[],this.rules[66].opcodes[0]={type:1,children:[1,2]},this.rules[66].opcodes[1]={type:5,min:65,max:90},this.rules[66].opcodes[2]={type:5,min:97,max:122},this.rules[67].opcodes=[],this.rules[67].opcodes[0]={type:2,children:[1,2]},this.rules[67].opcodes[1]={type:4,index:79},this.rules[67].opcodes[2]={type:1,children:[3,4,5]},this.rules[67].opcodes[3]={type:4,index:61},this.rules[67].opcodes[4]={type:4,index:18},this.rules[67].opcodes[5]={type:4,index:62},this.rules[68].opcodes=[],this.rules[68].opcodes[0]={type:2,children:[1,2]},this.rules[68].opcodes[1]={type:4,index:4},this.rules[68].opcodes[2]={type:3,min:0,max:1/0},this.rules[68].opcodes[3]={type:4,index:69},this.rules[69].opcodes=[],this.rules[69].opcodes[0]={type:2,children:[1,2,3]},this.rules[69].opcodes[1]={type:4,index:80},this.rules[69].opcodes[2]={type:4,index:70},this.rules[69].opcodes[3]={type:4,index:81},this.rules[70].opcodes=[],this.rules[70].opcodes[0]={type:1,children:[1,2]},this.rules[70].opcodes[1]={type:4,index:71},this.rules[70].opcodes[2]={type:4,index:77},this.rules[71].opcodes=[],this.rules[71].opcodes[0]={type:2,children:[1,2,4]},this.rules[71].opcodes[1]={type:4,index:87},this.rules[71].opcodes[2]={type:3,min:0,max:1/0},this.rules[71].opcodes[3]={type:4,index:72},this.rules[71].opcodes[4]={type:4,index:87},this.rules[72].opcodes=[],this.rules[72].opcodes[0]={type:1,children:[1,2]},this.rules[72].opcodes[1]={type:4,index:73},this.rules[72].opcodes[2]={type:2,children:[3,4]},this.rules[72].opcodes[3]={type:4,index:10},this.rules[72].opcodes[4]={type:4,index:74},this.rules[73].opcodes=[],this.rules[73].opcodes[0]={type:1,children:[1,2,3,4]},this.rules[73].opcodes[1]={type:5,min:32,max:38},this.rules[73].opcodes[2]={type:5,min:40,max:91},this.rules[73].opcodes[3]={type:5,min:93,max:55295},this.rules[73].opcodes[4]={type:5,min:57344,max:1114111},this.rules[74].opcodes=[],this.rules[74].opcodes[0]={type:1,children:[1,2,3,4,5,6,7,8]},this.rules[74].opcodes[1]={type:6,string:[98]},this.rules[74].opcodes[2]={type:6,string:[102]},this.rules[74].opcodes[3]={type:6,string:[110]},this.rules[74].opcodes[4]={type:6,string:[114]},this.rules[74].opcodes[5]={type:6,string:[116]},this.rules[74].opcodes[6]={type:7,string:[39]},this.rules[74].opcodes[7]={type:7,string:[92]},this.rules[74].opcodes[8]={type:2,children:[9,10]},this.rules[74].opcodes[9]={type:6,string:[117]},this.rules[74].opcodes[10]={type:4,index:75},this.rules[75].opcodes=[],this.rules[75].opcodes[0]={type:2,children:[1,2,3]},this.rules[75].opcodes[1]={type:7,string:[48]},this.rules[75].opcodes[2]={type:7,string:[48]},this.rules[75].opcodes[3]={type:1,children:[4,7,10,13]},this.rules[75].opcodes[4]={type:2,children:[5,6]},this.rules[75].opcodes[5]={type:7,string:[48]},this.rules[75].opcodes[6]={type:5,min:48,max:55},this.rules[75].opcodes[7]={type:2,children:[8,9]},this.rules[75].opcodes[8]={type:7,string:[48]},this.rules[75].opcodes[9]={type:6,string:[98]},this.rules[75].opcodes[10]={type:2,children:[11,12]},this.rules[75].opcodes[11]={type:7,string:[48]},this.rules[75].opcodes[12]={type:5,min:101,max:102},this.rules[75].opcodes[13]={type:2,children:[14,15]},this.rules[75].opcodes[14]={type:7,string:[49]},this.rules[75].opcodes[15]={type:4,index:76},this.rules[76].opcodes=[],this.rules[76].opcodes[0]={type:1,children:[1,2]},this.rules[76].opcodes[1]={type:4,index:65},this.rules[76].opcodes[2]={type:5,min:97,max:102},this.rules[77].opcodes=[],this.rules[77].opcodes[0]={type:1,children:[1,2]},this.rules[77].opcodes[1]={type:7,string:[48]},this.rules[77].opcodes[2]={type:2,children:[3,4]},this.rules[77].opcodes[3]={type:4,index:21},this.rules[77].opcodes[4]={type:3,min:0,max:1/0},this.rules[77].opcodes[5]={type:4,index:65},this.rules[78].opcodes=[],this.rules[78].opcodes[0]={type:7,string:[46]},this.rules[79].opcodes=[],this.rules[79].opcodes[0]={type:7,string:[46,46]},this.rules[80].opcodes=[],this.rules[80].opcodes[0]={type:7,string:[91]},this.rules[81].opcodes=[],this.rules[81].opcodes[0]={type:7,string:[93]},this.rules[82].opcodes=[],this.rules[82].opcodes[0]={type:7,string:[40]},this.rules[83].opcodes=[],this.rules[83].opcodes[0]={type:7,string:[41]},this.rules[84].opcodes=[],this.rules[84].opcodes[0]={type:7,string:[44]},this.rules[85].opcodes=[],this.rules[85].opcodes[0]={type:7,string:[58]},this.rules[86].opcodes=[],this.rules[86].opcodes[0]={type:6,string:[34]},this.rules[87].opcodes=[],this.rules[87].opcodes[0]={type:6,string:[39]},this.rules[88].opcodes=[],this.rules[88].opcodes[0]={type:7,string:[63]},this.rules[89].opcodes=[],this.rules[89].opcodes[0]={type:7,string:[124,124]},this.rules[90].opcodes=[],this.rules[90].opcodes[0]={type:7,string:[38,38]},this.toString=function(){let e="";return e+="; JSONPath: Query Expressions for JSON\n",e+="; https://www.rfc-editor.org/rfc/rfc9535\n",e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#section-2.1.1\n",e+="jsonpath-query = root-identifier segments\n",e+="segments = *(S segment)\n",e+="\n",e+="B = %x20 / ; Space\n",e+=" %x09 / ; Horizontal tab\n",e+=" %x0A / ; Line feed or New line\n",e+=" %x0D ; Carriage return\n",e+="S = *B ; optional blank space\n",e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#section-2.2.1\n",e+='root-identifier = "$"\n',e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#section-2.3\n",e+="selector = name-selector /\n",e+=" wildcard-selector /\n",e+=" slice-selector /\n",e+=" index-selector /\n",e+=" filter-selector\n",e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#section-2.3.1.1\n",e+="name-selector = string-literal\n",e+="\n",e+='string-literal = dquote *double-quoted dquote / ; "string", MODIFICATION: surrogate text rule used\n',e+=" squote *single-quoted squote ; 'string', MODIFICATION: surrogate text rule used\n",e+="\n",e+="double-quoted = unescaped /\n",e+=" %x27 / ; '\n",e+=' ESC %x22 / ; \\"\n',e+=" ESC escapable\n",e+="\n",e+="single-quoted = unescaped /\n",e+=' %x22 / ; "\n',e+=" ESC %x27 / ; \\'\n",e+=" ESC escapable\n",e+="\n",e+="ESC = %x5C ; \\ backslash\n",e+="\n",e+="unescaped = %x20-21 / ; see RFC 8259\n",e+=' ; omit 0x22 "\n',e+=" %x23-26 /\n",e+=" ; omit 0x27 '\n",e+=" %x28-5B /\n",e+=" ; omit 0x5C \\\n",e+=" %x5D-D7FF /\n",e+=" ; skip surrogate code points\n",e+=" %xE000-10FFFF\n",e+="\n",e+="escapable = %x62 / ; b BS backspace U+0008\n",e+=" %x66 / ; f FF form feed U+000C\n",e+=" %x6E / ; n LF line feed U+000A\n",e+=" %x72 / ; r CR carriage return U+000D\n",e+=" %x74 / ; t HT horizontal tab U+0009\n",e+=' "/" / ; / slash (solidus) U+002F\n',e+=' "\\" / ; \\ backslash (reverse solidus) U+005C\n',e+=" (%x75 hexchar) ; uXXXX U+XXXX\n",e+="\n",e+="hexchar = non-surrogate /\n",e+=' (high-surrogate "\\" %x75 low-surrogate)\n',e+='non-surrogate = ((DIGIT / "A"/"B"/"C" / "E"/"F") 3HEXDIG) /\n',e+=' ("D" %x30-37 2HEXDIG )\n',e+='high-surrogate = "D" ("8"/"9"/"A"/"B") 2HEXDIG\n',e+='low-surrogate = "D" ("C"/"D"/"E"/"F") 2HEXDIG\n',e+="\n",e+='HEXDIG = DIGIT / "A" / "B" / "C" / "D" / "E" / "F"\n',e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#section-2.3.2.1\n",e+='wildcard-selector = "*"\n',e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#section-2.3.3.1\n",e+="index-selector = int ; decimal integer\n",e+="\n",e+='int = "0" /\n',e+=' (["-"] DIGIT1 *DIGIT) ; - optional\n',e+="DIGIT1 = %x31-39 ; 1-9 non-zero digit\n",e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#section-2.3.4.1\n",e+="slice-selector = [start S] colon S [end S] [colon [S step ]] ; MODIFICATION: surrogate text rule used\n",e+="\n",e+="start = int ; included in selection\n",e+="end = int ; not included in selection\n",e+="step = int ; default: 1\n",e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#section-2.3.5.1\n",e+="filter-selector = questionmark S logical-expr ; MODIFICATION: surrogate text rule used\n",e+="\n",e+="logical-expr = logical-or-expr\n",e+="logical-or-expr = logical-and-expr *(S disjunction S logical-and-expr) ; MODIFICATION: surrogate text rule used\n",e+=" ; disjunction\n",e+=" ; binds less tightly than conjunction\n",e+="logical-and-expr = basic-expr *(S conjunction S basic-expr) ; MODIFICATION: surrogate text rule used\n",e+=" ; conjunction\n",e+=" ; binds more tightly than disjunction\n",e+="\n",e+="basic-expr = paren-expr /\n",e+=" comparison-expr /\n",e+=" test-expr\n",e+="\n",e+="paren-expr = [logical-not-op S] left-paren S logical-expr S right-paren ; MODIFICATION: surrogate text rule used\n",e+=" ; parenthesized expression\n",e+='logical-not-op = "!" ; logical NOT operator\n',e+="\n",e+="test-expr = [logical-not-op S]\n",e+=" (filter-query / ; existence/non-existence\n",e+=" function-expr) ; LogicalType or NodesType\n",e+="filter-query = rel-query / jsonpath-query\n",e+="rel-query = current-node-identifier segments\n",e+='current-node-identifier = "@"\n',e+="\n",e+="comparison-expr = comparable S comparison-op S comparable\n",e+="literal = number / string-literal /\n",e+=" true / false / null\n",e+="comparable = singular-query / ; singular query value\n",e+=" function-expr / ; ValueType\n",e+=" literal\n",e+=" ; MODIFICATION: https://www.rfc-editor.org/errata/eid8352\n",e+='comparison-op = "==" / "!=" /\n',e+=' "<=" / ">=" /\n',e+=' "<" / ">"\n',e+="\n",e+="singular-query = rel-singular-query / abs-singular-query\n",e+="rel-singular-query = current-node-identifier singular-query-segments\n",e+="abs-singular-query = root-identifier singular-query-segments\n",e+="singular-query-segments = *(S (name-segment / index-segment))\n",e+="name-segment = (left-bracket name-selector right-bracket) / ; MODIFICATION: surrogate text rule used\n",e+=" (dot-prefix member-name-shorthand) ; MODIFICATION: surrogate text rule used\n",e+="index-segment = left-bracket index-selector right-bracket ; MODIFICATION: surrogate text rule used\n",e+="\n",e+='number = (int / "-0") [ frac ] [ exp ] ; decimal number\n',e+='frac = "." 1*DIGIT ; decimal fraction\n',e+='exp = "e" [ "-" / "+" ] 1*DIGIT ; decimal exponent\n',e+="true = %x74.72.75.65 ; true\n",e+="false = %x66.61.6c.73.65 ; false\n",e+="null = %x6e.75.6c.6c ; null\n",e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#section-2.4\n",e+="function-name = function-name-first *function-name-char\n",e+="function-name-first = LCALPHA\n",e+='function-name-char = function-name-first / "_" / DIGIT\n',e+='LCALPHA = %x61-7A ; "a".."z"\n',e+="\n",e+="function-expr = function-name left-paren S [function-argument ; MODIFICATION: surrogate text rule used\n",e+=" *(S comma S function-argument)] S right-paren ; MODIFICATION: surrogate text rule used\n",e+="function-argument = logical-expr / ; MODIFICATION: https://www.rfc-editor.org/errata/eid8343\n",e+=" filter-query / ; (includes singular-query)\n",e+=" function-expr /\n",e+=" literal\n",e+="\n",e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#section-2.5\n",e+="segment = child-segment / descendant-segment\n",e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#section-2.5.1.1\n",e+="child-segment = bracketed-selection /\n",e+=" (dot-prefix ; MODIFICATION: surrogate text rule used\n",e+=" (wildcard-selector /\n",e+=" member-name-shorthand))\n",e+="\n",e+="bracketed-selection = left-bracket S selector *(S comma S selector) S right-bracket\n",e+=" ; MODIFICATION: surrogate text rule used\n",e+="\n",e+="member-name-shorthand = name-first *name-char\n",e+="name-first = ALPHA /\n",e+=' "_" /\n',e+=" %x80-D7FF /\n",e+=" ; skip surrogate code points\n",e+=" %xE000-10FFFF\n",e+="name-char = name-first / DIGIT\n",e+="\n",e+="DIGIT = %x30-39 ; 0-9\n",e+="ALPHA = %x41-5A / %x61-7A ; A-Z / a-z\n",e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#section-2.5.2.1\n",e+="descendant-segment = double-dot-prefix (bracketed-selection / ; MODIFICATION: surrogate text rule used\n",e+=" wildcard-selector /\n",e+=" member-name-shorthand)\n",e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#name-normalized-paths\n",e+="normalized-path = root-identifier *(normal-index-segment)\n",e+="normal-index-segment = left-bracket normal-selector right-bracket ; MODIFICATION: surrogate text rule used\n",e+="normal-selector = normal-name-selector / normal-index-selector\n",e+="normal-name-selector = squote *normal-single-quoted squote ; 'string', MODIFICATION: surrogate text rule used\n",e+="normal-single-quoted = normal-unescaped /\n",e+=" ESC normal-escapable\n",e+="normal-unescaped = ; omit %x0-1F control codes\n",e+=" %x20-26 /\n",e+=" ; omit 0x27 '\n",e+=" %x28-5B /\n",e+=" ; omit 0x5C \\\n",e+=" %x5D-D7FF /\n",e+=" ; skip surrogate code points\n",e+=" %xE000-10FFFF\n",e+="\n",e+="normal-escapable = %x62 / ; b BS backspace U+0008\n",e+=" %x66 / ; f FF form feed U+000C\n",e+=" %x6E / ; n LF line feed U+000A\n",e+=" %x72 / ; r CR carriage return U+000D\n",e+=" %x74 / ; t HT horizontal tab U+0009\n",e+=" \"'\" / ; ' apostrophe U+0027\n",e+=' "\\" / ; \\ backslash (reverse solidus) U+005C\n',e+=" (%x75 normal-hexchar)\n",e+=" ; certain values u00xx U+00XX\n",e+='normal-hexchar = "0" "0"\n',e+=" (\n",e+=' ("0" %x30-37) / ; "00"-"07"\n',e+=" ; omit U+0008-U+000A BS HT LF\n",e+=' ("0" %x62) / ; "0b"\n',e+=" ; omit U+000C-U+000D FF CR\n",e+=' ("0" %x65-66) / ; "0e"-"0f"\n',e+=' ("1" normal-HEXDIG)\n',e+=" )\n",e+='normal-HEXDIG = DIGIT / %x61-66 ; "0"-"9", "a"-"f"\n',e+='normal-index-selector = "0" / (DIGIT1 *DIGIT)\n',e+=" ; non-negative decimal integer\n",e+="\n",e+="; Surrogate named rules\n",e+='dot-prefix = "."\n',e+='double-dot-prefix = ".."\n',e+='left-bracket = "["\n',e+='right-bracket = "]"\n',e+='left-paren = "("\n',e+='right-paren = ")"\n',e+='comma = ","\n',e+='colon = ":"\n',e+='dquote = %x22 ; "\n',e+="squote = %x27 ; '\n",e+='questionmark = "?"\n',e+='disjunction = "||"\n',e+='conjunction = "&&"\n','; JSONPath: Query Expressions for JSON\n; https://www.rfc-editor.org/rfc/rfc9535\n\n; https://www.rfc-editor.org/rfc/rfc9535#section-2.1.1\njsonpath-query = root-identifier segments\nsegments = *(S segment)\n\nB = %x20 / ; Space\n %x09 / ; Horizontal tab\n %x0A / ; Line feed or New line\n %x0D ; Carriage return\nS = *B ; optional blank space\n\n; https://www.rfc-editor.org/rfc/rfc9535#section-2.2.1\nroot-identifier = "$"\n\n; https://www.rfc-editor.org/rfc/rfc9535#section-2.3\nselector = name-selector /\n wildcard-selector /\n slice-selector /\n index-selector /\n filter-selector\n\n; https://www.rfc-editor.org/rfc/rfc9535#section-2.3.1.1\nname-selector = string-literal\n\nstring-literal = dquote *double-quoted dquote / ; "string", MODIFICATION: surrogate text rule used\n squote *single-quoted squote ; \'string\', MODIFICATION: surrogate text rule used\n\ndouble-quoted = unescaped /\n %x27 / ; \'\n ESC %x22 / ; \\"\n ESC escapable\n\nsingle-quoted = unescaped /\n %x22 / ; "\n ESC %x27 / ; \\\'\n ESC escapable\n\nESC = %x5C ; \\ backslash\n\nunescaped = %x20-21 / ; see RFC 8259\n ; omit 0x22 "\n %x23-26 /\n ; omit 0x27 \'\n %x28-5B /\n ; omit 0x5C \\\n %x5D-D7FF /\n ; skip surrogate code points\n %xE000-10FFFF\n\nescapable = %x62 / ; b BS backspace U+0008\n %x66 / ; f FF form feed U+000C\n %x6E / ; n LF line feed U+000A\n %x72 / ; r CR carriage return U+000D\n %x74 / ; t HT horizontal tab U+0009\n "/" / ; / slash (solidus) U+002F\n "\\" / ; \\ backslash (reverse solidus) U+005C\n (%x75 hexchar) ; uXXXX U+XXXX\n\nhexchar = non-surrogate /\n (high-surrogate "\\" %x75 low-surrogate)\nnon-surrogate = ((DIGIT / "A"/"B"/"C" / "E"/"F") 3HEXDIG) /\n ("D" %x30-37 2HEXDIG )\nhigh-surrogate = "D" ("8"/"9"/"A"/"B") 2HEXDIG\nlow-surrogate = "D" ("C"/"D"/"E"/"F") 2HEXDIG\n\nHEXDIG = DIGIT / "A" / "B" / "C" / "D" / "E" / "F"\n\n; https://www.rfc-editor.org/rfc/rfc9535#section-2.3.2.1\nwildcard-selector = "*"\n\n; https://www.rfc-editor.org/rfc/rfc9535#section-2.3.3.1\nindex-selector = int ; decimal integer\n\nint = "0" /\n (["-"] DIGIT1 *DIGIT) ; - optional\nDIGIT1 = %x31-39 ; 1-9 non-zero digit\n\n; https://www.rfc-editor.org/rfc/rfc9535#section-2.3.4.1\nslice-selector = [start S] colon S [end S] [colon [S step ]] ; MODIFICATION: surrogate text rule used\n\nstart = int ; included in selection\nend = int ; not included in selection\nstep = int ; default: 1\n\n; https://www.rfc-editor.org/rfc/rfc9535#section-2.3.5.1\nfilter-selector = questionmark S logical-expr ; MODIFICATION: surrogate text rule used\n\nlogical-expr = logical-or-expr\nlogical-or-expr = logical-and-expr *(S disjunction S logical-and-expr) ; MODIFICATION: surrogate text rule used\n ; disjunction\n ; binds less tightly than conjunction\nlogical-and-expr = basic-expr *(S conjunction S basic-expr) ; MODIFICATION: surrogate text rule used\n ; conjunction\n ; binds more tightly than disjunction\n\nbasic-expr = paren-expr /\n comparison-expr /\n test-expr\n\nparen-expr = [logical-not-op S] left-paren S logical-expr S right-paren ; MODIFICATION: surrogate text rule used\n ; parenthesized expression\nlogical-not-op = "!" ; logical NOT operator\n\ntest-expr = [logical-not-op S]\n (filter-query / ; existence/non-existence\n function-expr) ; LogicalType or NodesType\nfilter-query = rel-query / jsonpath-query\nrel-query = current-node-identifier segments\ncurrent-node-identifier = "@"\n\ncomparison-expr = comparable S comparison-op S comparable\nliteral = number / string-literal /\n true / false / null\ncomparable = singular-query / ; singular query value\n function-expr / ; ValueType\n literal\n ; MODIFICATION: https://www.rfc-editor.org/errata/eid8352\ncomparison-op = "==" / "!=" /\n "<=" / ">=" /\n "<" / ">"\n\nsingular-query = rel-singular-query / abs-singular-query\nrel-singular-query = current-node-identifier singular-query-segments\nabs-singular-query = root-identifier singular-query-segments\nsingular-query-segments = *(S (name-segment / index-segment))\nname-segment = (left-bracket name-selector right-bracket) / ; MODIFICATION: surrogate text rule used\n (dot-prefix member-name-shorthand) ; MODIFICATION: surrogate text rule used\nindex-segment = left-bracket index-selector right-bracket ; MODIFICATION: surrogate text rule used\n\nnumber = (int / "-0") [ frac ] [ exp ] ; decimal number\nfrac = "." 1*DIGIT ; decimal fraction\nexp = "e" [ "-" / "+" ] 1*DIGIT ; decimal exponent\ntrue = %x74.72.75.65 ; true\nfalse = %x66.61.6c.73.65 ; false\nnull = %x6e.75.6c.6c ; null\n\n; https://www.rfc-editor.org/rfc/rfc9535#section-2.4\nfunction-name = function-name-first *function-name-char\nfunction-name-first = LCALPHA\nfunction-name-char = function-name-first / "_" / DIGIT\nLCALPHA = %x61-7A ; "a".."z"\n\nfunction-expr = function-name left-paren S [function-argument ; MODIFICATION: surrogate text rule used\n *(S comma S function-argument)] S right-paren ; MODIFICATION: surrogate text rule used\nfunction-argument = logical-expr / ; MODIFICATION: https://www.rfc-editor.org/errata/eid8343\n filter-query / ; (includes singular-query)\n function-expr /\n literal\n\n\n; https://www.rfc-editor.org/rfc/rfc9535#section-2.5\nsegment = child-segment / descendant-segment\n\n; https://www.rfc-editor.org/rfc/rfc9535#section-2.5.1.1\nchild-segment = bracketed-selection /\n (dot-prefix ; MODIFICATION: surrogate text rule used\n (wildcard-selector /\n member-name-shorthand))\n\nbracketed-selection = left-bracket S selector *(S comma S selector) S right-bracket\n ; MODIFICATION: surrogate text rule used\n\nmember-name-shorthand = name-first *name-char\nname-first = ALPHA /\n "_" /\n %x80-D7FF /\n ; skip surrogate code points\n %xE000-10FFFF\nname-char = name-first / DIGIT\n\nDIGIT = %x30-39 ; 0-9\nALPHA = %x41-5A / %x61-7A ; A-Z / a-z\n\n; https://www.rfc-editor.org/rfc/rfc9535#section-2.5.2.1\ndescendant-segment = double-dot-prefix (bracketed-selection / ; MODIFICATION: surrogate text rule used\n wildcard-selector /\n member-name-shorthand)\n\n; https://www.rfc-editor.org/rfc/rfc9535#name-normalized-paths\nnormalized-path = root-identifier *(normal-index-segment)\nnormal-index-segment = left-bracket normal-selector right-bracket ; MODIFICATION: surrogate text rule used\nnormal-selector = normal-name-selector / normal-index-selector\nnormal-name-selector = squote *normal-single-quoted squote ; \'string\', MODIFICATION: surrogate text rule used\nnormal-single-quoted = normal-unescaped /\n ESC normal-escapable\nnormal-unescaped = ; omit %x0-1F control codes\n %x20-26 /\n ; omit 0x27 \'\n %x28-5B /\n ; omit 0x5C \\\n %x5D-D7FF /\n ; skip surrogate code points\n %xE000-10FFFF\n\nnormal-escapable = %x62 / ; b BS backspace U+0008\n %x66 / ; f FF form feed U+000C\n %x6E / ; n LF line feed U+000A\n %x72 / ; r CR carriage return U+000D\n %x74 / ; t HT horizontal tab U+0009\n "\'" / ; \' apostrophe U+0027\n "\\" / ; \\ backslash (reverse solidus) U+005C\n (%x75 normal-hexchar)\n ; certain values u00xx U+00XX\nnormal-hexchar = "0" "0"\n (\n ("0" %x30-37) / ; "00"-"07"\n ; omit U+0008-U+000A BS HT LF\n ("0" %x62) / ; "0b"\n ; omit U+000C-U+000D FF CR\n ("0" %x65-66) / ; "0e"-"0f"\n ("1" normal-HEXDIG)\n )\nnormal-HEXDIG = DIGIT / %x61-66 ; "0"-"9", "a"-"f"\nnormal-index-selector = "0" / (DIGIT1 *DIGIT)\n ; non-negative decimal integer\n\n; Surrogate named rules\ndot-prefix = "."\ndouble-dot-prefix = ".."\nleft-bracket = "["\nright-bracket = "]"\nleft-paren = "("\nright-paren = ")"\ncomma = ","\ncolon = ":"\ndquote = %x22 ; "\nsquote = %x27 ; \'\nquestionmark = "?"\ndisjunction = "||"\nconjunction = "&&"\n'}};const hn=class extends un{},dn=e=>{if(!Array.isArray(e))throw new hn("Selectors must be an array, got: "+typeof e,{selectors:e});try{return`$${e.map(e=>{if("string"==typeof e)return`['${(e=>{if("string"!=typeof e)throw new TypeError("Selector must be a string");let t="";for(const s of e){const e=s.codePointAt(0);switch(e){case 8:t+="\\b";break;case 9:t+="\\t";break;case 10:t+="\\n";break;case 12:t+="\\f";break;case 13:t+="\\r";break;case 39:t+="\\'";break;case 92:t+="\\\\";break;default:t+=e<=31?`\\u${e.toString(16).padStart(4,"0")}`:s}}return t})(e)}']`;if("number"==typeof e){if(!Number.isSafeInteger(e)||e<0)throw new TypeError(`Index selector must be a non-negative safe integer, got: ${e}`);return`[${e}]`}throw new TypeError("Selector must be a string or non-negative integer, got: "+typeof e)}).join("")}`}catch(t){throw new hn("Failed to compile normalized JSONPath",{cause:t,selectors:e})}},pn=(e,t,s,n)=>{const{realm:r}=e,{value:i}=s;if(r.isObject(t)&&r.hasProperty(t,i)){n(r.getProperty(t,i),i)}},mn=(e,t,s,n)=>{const{realm:r}=e,{value:i}=s;if(!r.isArray(t))return;const o=r.getLength(t),c=((e,t)=>e>=0?e:t+e)(i,o);if(c>=0&&c<o){n(r.getElement(t,c),c)}},fn=(e,t,s,n)=>{const{realm:r}=e;for(const[e,s]of r.entries(t))n(s,e)},yn=(e,t)=>e>=0?Math.min(e,t):Math.max(t+e,0),gn=(e,t,s,n)=>{const{realm:r}=e,{start:i,end:o,step:c}=s;if(!r.isArray(t))return;const a=((e,t,s,n)=>{const r=s??1;if(0===r)return null;let i,o;if(r>0){const s=0,r=n,c=null!==e?yn(e,n):s,a=null!==t?yn(t,n):r;i=Math.max(c,0),o=Math.min(a,n)}else{const s=n-1,r=-n-1,c=null!==e?e>=0?Math.min(e,n-1):Math.max(n+e,-1):s,a=null!==t?t>=0?Math.min(t,n-1):Math.max(n+t,-1):r;o=Math.min(c,n-1),i=Math.max(a,-1)}return{lower:i,upper:o,step:r}})(i,o,c,r.getLength(t));if(null===a)return;const{lower:l,upper:u,step:h}=a;if(h>0)for(let e=l;e<u;e+=h){n(r.getElement(t,e),e)}else for(let e=u;e>l;e+=h){n(r.getElement(t,e),e)}},xn=(e,t,s,n)=>n.value,bn=(e,t,s)=>{const{realm:n}=e,{selector:r}=s;switch(r.type){case"NameSelector":{const{value:e}=r;return n.isObject(t)&&n.hasProperty(t,e)?n.getProperty(t,e):void 0}case"IndexSelector":{const{value:e}=r;if(!n.isArray(t))return;const s=n.getLength(t),i=e>=0?e:s+e;return i>=0&&i<s?n.getElement(t,i):void 0}default:return}},vn=(e,t,s,n)=>{const{selectors:r}=s;for(const s of r)Tn(e,t,s,n)},Sn=(e,t,s)=>{const n=[],r=e=>{n.push(e)},{selector:i}=s;switch(i.type){case"BracketedSelection":vn(e,t,i,r);break;case"NameSelector":case"WildcardSelector":case"IndexSelector":case"SliceSelector":case"FilterSelector":Tn(e,t,i,r)}return n},wn=(e,t,s,n)=>{let r=s;for(const t of n){const s=[];if("DescendantSegment"===t.type){const n=r=>{const{realm:i}=e,o=Sn(e,r,t);s.push(...o);for(const[,e]of i.entries(r))n(e)};for(const e of r)n(e)}else for(const n of r){const r=Sn(e,n,t);s.push(...r)}r=s}return r},On=(e,t,s,n)=>{const{query:r}=n;let i;switch(r.type){case"RelQuery":i=((e,t,s,n)=>{const{segments:r}=n;return 0===r.length?[s]:wn(e,0,[s],r)})(e,0,s,r);break;case"JsonPathQuery":i=((e,t,s,n)=>{const{segments:r}=n;return 0===r.length?[t]:wn(e,0,[t],r)})(e,t,0,r);break;default:i=[]}return o=i,Object.defineProperty(o,"_isNodelist",{value:!0,enumerable:!1,writable:!1}),o;var o};let jn;const kn=(e,t,s,n)=>{const{name:r,arguments:i}=n,o=e.functions[r];if("function"!=typeof o)return;const c=i.map(n=>((e,t,s,n)=>{switch(n.type){case"Literal":case"RelSingularQuery":case"AbsSingularQuery":case"FunctionExpr":return En(e,t,s,n);case"FilterQuery":return On(e,t,s,n);case"TestExpr":return"FilterQuery"===n.expression.type?On(e,t,s,n.expression):"FunctionExpr"===n.expression.type?En(e,t,s,n.expression):jn(e,t,s,n);case"LogicalOrExpr":case"LogicalAndExpr":case"LogicalNotExpr":case"ComparisonExpr":return jn(e,t,s,n);default:return}})(e,t,s,n));return o(e.realm,...c)},En=(e,t,s,n)=>{switch(n.type){case"Literal":return xn(e,t,s,n);case"RelSingularQuery":return((e,t,s,n)=>{let r=s;for(const t of n.segments)if(r=bn(e,r,t),void 0===r)return;return r})(e,0,s,n);case"AbsSingularQuery":return((e,t,s,n)=>{let r=t;for(const t of n.segments)if(r=bn(e,r,t),void 0===r)return;return r})(e,t,0,n);case"FunctionExpr":return kn(e,t,s,n);default:return}},An=(e,t,s,n)=>{const{left:r,op:i,right:o}=n,c=En(e,t,s,r),a=En(e,t,s,o);return e.realm.compare(c,i,a)},Fn=e=>Array.isArray(e),Nn=(e,t,s,n)=>{switch(n.type){case"LogicalOrExpr":return!!Nn(e,t,s,n.left)||Nn(e,t,s,n.right);case"LogicalAndExpr":return!!Nn(e,t,s,n.left)&&Nn(e,t,s,n.right);case"LogicalNotExpr":return!Nn(e,t,s,n.expression);case"TestExpr":{const{expression:r}=n;if("FilterQuery"===r.type){return On(e,t,s,r).length>0}if("FunctionExpr"===r.type){const n=kn(e,t,s,r);return"boolean"==typeof n?n:void 0!==n&&(Fn(n)?n.length>0:Boolean(n))}return!1}case"ComparisonExpr":return An(e,t,s,n);default:return!1}};jn=Nn;const In=Nn,Mn=(e,t,s,n)=>{const{realm:r,root:i}=e,{expression:o}=s;for(const[s,c]of r.entries(t)){In(e,i,c,o)&&n(c,s)}},Tn=(e,t,s,n)=>{switch(s.type){case"NameSelector":pn(e,t,s,n);break;case"IndexSelector":mn(e,t,s,n);break;case"WildcardSelector":fn(e,t,s,n);break;case"SliceSelector":gn(e,t,s,n);break;case"FilterSelector":Mn(e,t,s,n)}};new Map;class Pn{node;key;index;parent;parentPath;inList;revisited=!1;#e=!1;#t=!1;#s=!1;#n=!1;#r;#i=!1;constructor(e,t,s,n,r){this.node=e,this.parent=t,this.parentPath=s,this.key=n,this.index=r&&"number"==typeof n?n:void 0,this.inList=r}get shouldSkip(){return this.#e}get shouldStop(){return this.#t}get removed(){return this.#s}isRoot(){return null===this.parentPath}get depth(){let e=0,t=this.parentPath;for(;null!==t;)e+=1,t=t.parentPath;return e}getAncestry(){const e=[];let t=this.parentPath;for(;null!==t;)e.push(t),t=t.parentPath;return e}getAncestorNodes(){return this.getAncestry().map(e=>e.node)}getPathKeys(){const e=[];let t=this;for(;null!==t&&void 0!==t.key;){const{key:s,parent:n,parentPath:r}=t;if(ns(n)&&"value"===s){if(!Yt(n.key))throw new TypeError("MemberElement.key must be a StringElement");e.unshift(n.key.toValue())}else ts(r?.node)&&"number"==typeof s&&e.unshift(s);t=t.parentPath}return e}formatPath(e="jsonpointer"){const t=this.getPathKeys();return 0===t.length?"jsonpath"===e?"$":"":"jsonpath"===e?dn(t):an(t)}findParent(e){let t=this.parentPath;for(;null!==t;){if(e(t))return t;t=t.parentPath}return null}find(e){return e(this)?this:this.findParent(e)}skip(){this.#e=!0}stop(){this.#t=!0}replaceWith(e){this.#i&&console.warn("Warning: replaceWith() called on a stale Path. This path belongs to a node whose visit has already completed. The replacement will have no effect. To replace a parent node, do so from the parent's own visitor."),this.#n=!0,this.#r=e,this.node=e}remove(){this.#i&&console.warn("Warning: remove() called on a stale Path. This path belongs to a node whose visit has already completed. The removal will have no effect. To remove a parent node, do so from the parent's own visitor."),this.#s=!0}_getReplacementNode(){return this.#r}_wasReplaced(){return this.#n}_reset(){this.#e=!1,this.#t=!1,this.#s=!1,this.#n=!1,this.#r=void 0}_markStale(){this.#i=!0}}const Dn=qe(1,We(Ws,ie(Ie,me("[object Promise]")))),Cn=e=>{const t=e?.element;return void 0===t||"element"===t?"Element":`${t.charAt(0).toUpperCase()}${t.slice(1)}Element`},$n=e=>Kt(e),Jn=e=>Ss(e),Ln=(e,t,s)=>{ns(e)?e.value=s:Array.isArray(e)?e[t]=null===s?void 0:s:null===s?delete e[t]:e[t]=s},_n=e=>ns(e)?["key","value"]:ts(e)||ss(e)?["content"]:[],Bn=(e,t)=>{if(void 0!==e[t])return e[t];const s=t.length;for(const n in e){if(!n.includes("|"))continue;const r=n.indexOf(t);if(-1===r)continue;const i=0===r||"|"===n[r-1],o=r+s===n.length||"|"===n[r+s];if(i&&o)return e[n]}},qn=(e,t,s)=>{if(void 0===t)return null;const n=e,r=s?"leave":"enter",i=Bn(n,t);if(!s&&"function"==typeof i)return i;if(null!=i){const e=i[r];if("function"==typeof e)return e}const o=n[r];if("function"==typeof o)return o;if(null!=o){const e=Bn(o,t);if("function"==typeof e)return e}return null},Rn=(e,t={})=>{const{visitFnGetter:s=qn,nodeTypeGetter:n=Cn,exposeEdits:r=!1}=t,i=Symbol("internal-skip"),o=Symbol("break"),c=new Array(e.length).fill(i);return{enter(t){let a=t.node,l=!1;for(let u=0;u<e.length;u+=1)if(c[u]===i){const i=s(e[u],n(a),!1);if("function"==typeof i){const s=Hn(t,a),n=i.call(e[u],s);if(Dn(n))throw new ds("Async visitor not supported in sync mode",{visitor:e[u],visitFn:i});if(s.shouldStop&&(c[u]=o),s.shouldSkip&&(c[u]=a),s.removed)return void t.remove();if(s._wasReplaced()){const e=s._getReplacementNode();if(!r)return t.replaceWith(e),e;a=e,l=!0}else if(void 0!==n){if(!r)return t.replaceWith(n),n;a=n,l=!0}}}if(c.every(e=>e===o)&&t.stop(),l)return t.replaceWith(a),a},leave(t){const r=t.node;for(let a=0;a<e.length;a+=1)if(c[a]===i){const i=s(e[a],n(r),!0);if("function"==typeof i){const s=Hn(t,r),n=i.call(e[a],s);if(Dn(n))throw new ds("Async visitor not supported in sync mode",{visitor:e[a],visitFn:i});if(s.shouldStop&&(c[a]=o),s.removed)return void t.remove();if(s._wasReplaced()){const e=s._getReplacementNode();return t.replaceWith(e),e}if(void 0!==n)return t.replaceWith(n),n}}else c[a]===r&&(c[a]=i);c.every(e=>e===o)&&t.stop()}}},Vn=(e,t={})=>{const{visitFnGetter:s=qn,nodeTypeGetter:n=Cn,exposeEdits:r=!1}=t,i=Symbol("internal-skip"),o=Symbol("break"),c=new Array(e.length).fill(i);return{async enter(t){let a=t.node,l=!1;for(let u=0;u<e.length;u+=1)if(c[u]===i){const i=s(e[u],n(a),!1);if("function"==typeof i){const s=Hn(t,a),n=await i.call(e[u],s);if(s.shouldStop&&(c[u]=o),s.shouldSkip&&(c[u]=a),s.removed)return void t.remove();if(s._wasReplaced()){const e=s._getReplacementNode();if(!r)return t.replaceWith(e),e;a=e,l=!0}else if(void 0!==n){if(!r)return t.replaceWith(n),n;a=n,l=!0}}}if(c.every(e=>e===o)&&t.stop(),l)return t.replaceWith(a),a},async leave(t){const r=t.node;for(let a=0;a<e.length;a+=1)if(c[a]===i){const i=s(e[a],n(r),!0);if("function"==typeof i){const s=Hn(t,r),n=await i.call(e[a],s);if(s.shouldStop&&(c[a]=o),s.removed)return void t.remove();if(s._wasReplaced()){const e=s._getReplacementNode();return t.replaceWith(e),e}if(void 0!==n)return t.replaceWith(n),n}}else c[a]===r&&(c[a]=i);c.every(e=>e===o)&&t.stop()}}};function Hn(e,t){const s=new Pn(t,e.parent,e.parentPath,e.key,e.inList);return s.revisited=e.revisited,s}Rn[Symbol.for("nodejs.util.promisify.custom")]=Vn;const Un=e=>!0===e?"skip":!1===e||void 0===e?"never":e;function*Gn(e,t,s){const{keyMap:n,state:r,nodeTypeGetter:i,nodePredicate:o,nodeCloneFn:c,detectCycles:a,skipVisited:l,mutable:u,mutationFn:h}=s,d="function"==typeof n,p="never"!==l?new WeakSet:null;let m,f,y=Array.isArray(e),g=[e],x=-1,b=[],v=e,S=null,w=null;const O=[];do{x+=1;const e=x===g.length;let s,j=!1;const k=e&&0!==b.length;if(e){if(s=0===O.length?void 0:S?.key,v=f,f=O.pop(),w=S?.parentPath?.parentPath??null,k)if(u)for(const[e,t]of b)h(v,e,t);else if(y){v=v.slice();let e=0;for(const[t,s]of b){const n=t-e;null===s?(v.splice(n,1),e+=1):v[n]=s}}else{v=c(v);for(const[e,t]of b)v[e]=t}if(void 0!==m){x=m.index,g=m.keys,b=m.edits;const e=m.inArray;if(w=m.parentPath,j=m.revisitNoDescend,m=m.prev,k&&!u){const t=e?x:g[x];b.push([t,v])}y=e}}else if(void 0!==f&&(s=y?x:g[x],v=f[s],void 0===v))continue;if(!Array.isArray(v)){if(!o(v))throw new ds(`Invalid AST Node: ${String(v)}`,{node:v});if(a&&O.includes(v))continue;if("never"!==l&&!e)if(p.has(v)){if("enter-only"!==l)continue;j=!0}else p.add(v);S=new Pn(v,f,w,s,y),S.revisited=j;const n=qn(t,i(v),e);if(n){for(const[e,s]of Object.entries(r))t[e]=s;const i=yield{visitFn:n,path:S,isLeaving:e};if(S.shouldStop)break;if(S.removed){if(b.push([s,null]),!e)continue}else if(S._wasReplaced()){const t=S._getReplacementNode();if(b.push([s,t]),!e){if(S.shouldSkip)continue;if(!o(t))continue;v=t}}else if(S.shouldSkip){if(!e)continue}else if(void 0!==i&&(b.push([s,i]),!e)){if(!o(i))continue;v=i}S._markStale()}}if(!e){if(m={inArray:y,index:x,keys:g,edits:b,parentPath:w,revisitNoDescend:j,prev:m},y=Array.isArray(v),j)g=[];else if(y)g=v;else if(d)g=n(v);else{const e=i(v);g=void 0!==e?n[e]??[]:[]}x=-1,b=[],void 0!==f&&O.push(f),f=v,w=S}}while(void 0!==m);return 0!==b.length?b.at(-1)[1]:e}const zn=(e,t,s={})=>{const n=Gn(e,t,{keyMap:s.keyMap??_n,state:s.state??{},nodeTypeGetter:s.nodeTypeGetter??Cn,nodePredicate:s.nodePredicate??$n,nodeCloneFn:s.nodeCloneFn??Jn,detectCycles:s.detectCycles??!0,skipVisited:Un(s.skipVisited),mutable:s.mutable??!1,mutationFn:s.mutationFn??Ln});let r=n.next();for(;!r.done;){const e=r.value,s=e.visitFn.call(t,e.path);if(Dn(s))throw new ds("Async visitor not supported in sync mode",{visitor:t,visitFn:e.visitFn});r=n.next(s)}return r.value},Xn=async(e,t,s={})=>{const n=Gn(e,t,{keyMap:s.keyMap??_n,state:s.state??{},nodeTypeGetter:s.nodeTypeGetter??Cn,nodePredicate:s.nodePredicate??$n,nodeCloneFn:s.nodeCloneFn??Jn,detectCycles:s.detectCycles??!0,skipVisited:Un(s.skipVisited),mutable:s.mutable??!1,mutationFn:s.mutationFn??Ln});let r=n.next();for(;!r.done;){const e=r.value,s=await e.visitFn.call(t,e.path);r=n.next(s)}return r.value};zn[Symbol.for("nodejs.util.promisify.custom")]=Xn,Pn.prototype.traverse=function(e,t){return zn(this.node,e,t)},Pn.prototype.traverseAsync=function(e,t){return Xn(this.node,e,t)};const Wn=class extends Js{specObj;passingOptionsNames=["specObj","parent","consume"];constructor({specObj:e,...t}){super({...t}),this.specObj=e}retrievePassingOptions(){return Qs(this.passingOptionsNames,this)}retrieveFixedFields(e){const t=B(["visitors",...e,"fixedFields"],this.specObj);return"object"==typeof t&&null!==t?Object.keys(t):[]}retrieveVisitor(e){return Me(ct,["visitors",...e],this.specObj)?B(["visitors",...e],this.specObj):B(["visitors",...e,"$visitor"],this.specObj)}retrieveVisitorInstance(e,t={}){const s=this.retrievePassingOptions();return new(this.retrieveVisitor(e))({...s,...t})}toRefractedElement(e,t,s={}){const n=this.retrieveVisitorInstance(e,s);return n instanceof Ls&&n?.constructor===Ls?this.consume?t:xs(t):(zn(t,n,s),n.element)}};const Kn=class extends Wn{specPath;ignoredFields;constructor({specPath:e,ignoredFields:t,...s}){super({...s}),this.specPath=e,this.ignoredFields=t||[]}ObjectElement(e){const t=e.node,s=this.specPath(t),n=this.retrieveFixedFields(s);t.forEach((e,t,r)=>{const i=Ns(t);if(Yt(t)&&n.includes(i)&&!this.ignoredFields.includes(i)){const n=this.toRefractedElement([...s,"fixedFields",i],e),o=new _t(this.consume?t:xs(t),n);this.copyMetaAndAttributes(r,o),this.element.content.push(o),this.consume&&this.consumeSafe&&!r.isFrozen&&(r.value=void 0)}else this.ignoredFields.includes(i)||this.element.content.push(this.consume?r:xs(r))}),this.copyMetaAndAttributes(t,this.element),e.stop()}},Yn=(e,t,s=[])=>{const n=Object.getOwnPropertyDescriptors(t);for(let e of s)delete n[e];Object.defineProperties(e,n)},Qn=(e,t=[e])=>{const s=Object.getPrototypeOf(e);return null===s?t:Qn(s,[...t,s])},Zn=(e,t,s=[])=>{var n;const r=null!==(n=((...e)=>{if(0===e.length)return;let t;const s=e.map(e=>Qn(e));for(;s.every(e=>e.length>0);){const e=s.map(e=>e.pop()),n=e[0];if(!e.every(e=>e===n))break;t=n}return t})(...e))&&void 0!==n?n:Object.prototype,i=Object.create(r),o=Qn(r);for(let t of e){let e=Qn(t);for(let t=e.length-1;t>=0;t--){let n=e[t];-1===o.indexOf(n)&&(Yn(i,n,["constructor",...s]),o.push(n))}}return i.constructor=t,i},er=e=>e.filter((t,s)=>e.indexOf(t)==s),tr=(e,t)=>{const s=t.map(e=>Qn(e));let n=0,r=!0;for(;r;){r=!1;for(let i=t.length-1;i>=0;i--){const t=s[i][n];if(null!=t&&(r=!0,null!=Object.getOwnPropertyDescriptor(t,e)))return s[i][0]}n++}},sr=(e,t=Object.prototype)=>new Proxy({},{getPrototypeOf:()=>t,setPrototypeOf(){throw Error("Cannot set prototype of Proxies created by ts-mixer")},getOwnPropertyDescriptor:(t,s)=>Object.getOwnPropertyDescriptor(tr(s,e)||{},s),defineProperty(){throw new Error("Cannot define new properties on Proxies created by ts-mixer")},has:(s,n)=>void 0!==tr(n,e)||void 0!==t[n],get:(s,n)=>(tr(n,e)||t)[n],set(t,s,n){const r=tr(s,e);if(void 0===r)throw new Error("Cannot set new properties on Proxies created by ts-mixer");return r[s]=n,!0},deleteProperty(){throw new Error("Cannot delete properties on Proxies created by ts-mixer")},ownKeys:()=>e.map(Object.getOwnPropertyNames).reduce((e,t)=>t.concat(e.filter(e=>t.indexOf(e)<0)))}),nr=null,rr="copy",ir="copy",or="deep",cr=new WeakMap,ar=e=>cr.get(e),lr=(e,t)=>{var s,n;const r=er([...Object.getOwnPropertyNames(e),...Object.getOwnPropertyNames(t)]),i={};for(let o of r)i[o]=er([...null!==(s=null==e?void 0:e[o])&&void 0!==s?s:[],...null!==(n=null==t?void 0:t[o])&&void 0!==n?n:[]]);return i},ur=(e,t)=>{var s,n,r,i;return{property:lr(null!==(s=null==e?void 0:e.property)&&void 0!==s?s:{},null!==(n=null==t?void 0:t.property)&&void 0!==n?n:{}),method:lr(null!==(r=null==e?void 0:e.method)&&void 0!==r?r:{},null!==(i=null==t?void 0:t.method)&&void 0!==i?i:{})}},hr=(e,t)=>{var s,n,r,i,o,c;return{class:er([...null!==(s=null==e?void 0:e.class)&&void 0!==s?s:[],...null!==(n=null==t?void 0:t.class)&&void 0!==n?n:[]]),static:ur(null!==(r=null==e?void 0:e.static)&&void 0!==r?r:{},null!==(i=null==t?void 0:t.static)&&void 0!==i?i:{}),instance:ur(null!==(o=null==e?void 0:e.instance)&&void 0!==o?o:{},null!==(c=null==t?void 0:t.instance)&&void 0!==c?c:{})}},dr=new Map,pr=(...e)=>{const t=((...e)=>{var t;const s=new Set,n=new Set([...e]);for(;n.size>0;)for(let e of n){const r=[...Qn(e.prototype).map(e=>e.constructor),...null!==(t=ar(e))&&void 0!==t?t:[]].filter(e=>!s.has(e));for(let e of r)n.add(e);s.add(e),n.delete(e)}return[...s]})(...e).map(e=>dr.get(e)).filter(e=>!!e);return 0==t.length?{}:1==t.length?t[0]:t.reduce((e,t)=>hr(e,t))},mr=e=>{let t=dr.get(e);return t||(t={},dr.set(e,t)),t};function fr(...e){var t,s,n;const r=e.map(e=>e.prototype),i=nr;if(null!==i){const e=r.map(e=>e[i]).filter(e=>"function"==typeof e),t=function(...t){for(let s of e)s.apply(this,t)},s={[i]:t};r.push(s)}function o(...t){for(const s of e)Yn(this,new s(...t));null!==i&&"function"==typeof this[i]&&this[i].apply(this,t)}var c,a;o.prototype="copy"===ir?Zn(r,o):(c=r,a=o,sr([...c,{constructor:a}])),Object.setPrototypeOf(o,"copy"===rr?Zn(e,null,["prototype"]):sr(e,Function.prototype));let l=o;if("none"!==or){const r="deep"===or?pr(...e):((...e)=>{const t=e.map(e=>mr(e));return 0===t.length?{}:1===t.length?t[0]:t.reduce((e,t)=>hr(e,t))})(...e);for(let e of null!==(t=null==r?void 0:r.class)&&void 0!==t?t:[]){const t=e(l);t&&(l=t)}yr(null!==(s=null==r?void 0:r.static)&&void 0!==s?s:{},l),yr(null!==(n=null==r?void 0:r.instance)&&void 0!==n?n:{},l.prototype)}var u,h;return u=l,h=e,cr.set(u,h),l}const yr=(e,t)=>{const s=e.property,n=e.method;if(s)for(let e in s)for(let n of s[e])n(t,e);if(n)for(let e in n)for(let s of n[e])s(t,e,Object.getOwnPropertyDescriptor(t,e))};const gr=function(){return!1};const xr=class extends Wn{specPath;ignoredFields;fieldPatternPredicate=gr;constructor({specPath:e,ignoredFields:t,fieldPatternPredicate:s,...n}){super({...n}),this.specPath=e,this.ignoredFields=t||[],"function"==typeof s&&(this.fieldPatternPredicate=s)}ObjectElement(e){const t=e.node;t.forEach((e,t,s)=>{const n=Ns(t);if(!this.ignoredFields.includes(n)&&this.fieldPatternPredicate(n)){const n=this.specPath(e),r=this.toRefractedElement(n,e),i=new _t(this.consume?t:xs(t),r);this.copyMetaAndAttributes(s,i),i.classes.push("patterned-field"),this.element.content.push(i),this.consume&&this.consumeSafe&&!s.isFrozen&&(s.value=void 0)}else this.ignoredFields.includes(n)||this.element.content.push(this.consume?s:xs(s))}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const br=class extends xr{constructor(e){super(e),this.fieldPatternPredicate=Ys}};const vr=class{parent;constructor({parent:e}){this.parent=e}},Sr=fr(Kn,vr,Ls),wr=fr(Kn,Ls),Or=fr(Kn,Ls),jr=fr(Kn,Ls),kr=fr(Wn,vr,Ls),Er=fr(Wn,vr,Ls),Ar=fr(Wn,vr,Ls),Fr=fr(Wn,vr,Ls),Nr=fr(Wn,vr,Ls),Ir=fr(br,vr,Ls),Mr=fr(br,vr,Ls),Tr=fr(br,vr,Ls),Pr=fr(br,vr,Ls);const Dr=class extends Sr{constructor(e){super(e),this.element=new qt,this.consumeSafe=!0,this.specPath=_s(["document","objects","JSONSchema"])}get defaultDialectIdentifier(){return"http://json-schema.org/draft-04/schema#"}ObjectElement(e){const t=e.node;return this.handleDialectIdentifier(t),this.handleSchemaIdentifier(t),this.parent=this.element,Kn.prototype.ObjectElement.call(this,e)}handleDialectIdentifier(e){if(Rs(this.parent)&&!Yt(e.get("$schema")))this.element.meta.set("inheritedDialectIdentifier",this.defaultDialectIdentifier);else if(this.parent instanceof qt&&!Yt(e.get("$schema"))){const e=Bs(this.parent.meta.get("inheritedDialectIdentifier"),Ns(this.parent.$schema));this.element.meta.set("inheritedDialectIdentifier",e)}}handleSchemaIdentifier(e,t="id"){const s=void 0!==this.parent?[...this.parent.meta.get("ancestorsSchemaIdentifiers")??[]]:[],n=Ns(e.get(t));Ys(n)&&s.push(n),this.element.meta.set("ancestorsSchemaIdentifiers",s)}},Cr=e=>ss(e)&&e.hasKey("$ref");const $r=class extends Fr{ObjectElement(e){const t=e.node,s=Cr(t)?["document","objects","JSONReference"]:["document","objects","JSONSchema"];this.element=this.toRefractedElement(s,t),e.stop()}ArrayElement(e){const t=e.node;this.element=new Wt,this.element.classes.push("json-schema-items"),t.forEach(e=>{const t=Cr(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],s=this.toRefractedElement(t,e);this.element.push(s)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const Jr=class extends Ls{ArrayElement(e){super.enter(e),this.element.classes.push("json-schema-required")}};const Lr=class extends Pr{constructor(e){super(e),this.element=new Bt,this.element.classes.push("json-schema-properties"),this.specPath=e=>Cr(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}};const _r=class extends Tr{constructor(e){super(e),this.element=new Bt,this.element.classes.push("json-schema-patternProperties"),this.specPath=e=>Cr(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}};const Br=class extends Mr{constructor(e){super(e),this.element=new Bt,this.element.classes.push("json-schema-dependencies"),this.specPath=e=>Cr(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}};const qr=class extends Ls{ArrayElement(e){super.enter(e),this.element.classes.push("json-schema-enum")}};const Rr=class extends Ls{StringElement(e){super.enter(e),this.element.classes.push("json-schema-type")}ArrayElement(e){super.enter(e),this.element.classes.push("json-schema-type")}};const Vr=class extends kr{constructor(e){super(e),this.element=new Wt,this.element.classes.push("json-schema-allOf")}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=Cr(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],s=this.toRefractedElement(t,e);this.element.push(s)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const Hr=class extends Er{constructor(e){super(e),this.element=new Wt,this.element.classes.push("json-schema-anyOf")}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=Cr(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],s=this.toRefractedElement(t,e);this.element.push(s)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const Ur=class extends Ar{constructor(e){super(e),this.element=new Wt,this.element.classes.push("json-schema-oneOf")}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=Cr(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],s=this.toRefractedElement(t,e);this.element.push(s)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const Gr=class extends Ir{constructor(e){super(e),this.element=new Bt,this.element.classes.push("json-schema-definitions"),this.specPath=e=>Cr(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}};const zr=class extends Nr{constructor(e){super(e),this.element=new Wt,this.element.classes.push("json-schema-links")}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=this.toRefractedElement(["document","objects","LinkDescription"],e);this.element.push(t)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const Xr=class extends wr{constructor(e){super(e),this.element=new Rt,this.specPath=_s(["document","objects","JSONReference"])}ObjectElement(e){Kn.prototype.ObjectElement.call(this,e),Yt(this.element.$ref)&&this.element.classes.push("reference-element")}};const Wr=class extends Ls{StringElement(e){super.enter(e),this.element.classes.push("reference-value")}};const Kr=function(){return!0};const Yr=D(function(e,t,s){return qe(Math.max(e.length,t.length,s.length),function(){return e.apply(this,arguments)?t.apply(this,arguments):s.apply(this,arguments)})});const Qr=r(function(e){return function(t,s){return e(t,s)?-1:e(s,t)?1:0}});var Zr=g(function(e,t){return Array.prototype.slice.call(t,0).sort(e)});const ei=Zr;const ti=r(function(e){return i(0,e)});function si(e){return e&&e["@@transducer/reduced"]?e:{"@@transducer/value":e,"@@transducer/reduced":!0}}const ni=r(si);const ri=Ye(N);const ii=qe(1,ct(Array.isArray)?Array.isArray:ie(oe,le("Array")));const oi=We(ii,zs);function ci(e){return function(e){if(Array.isArray(e))return ai(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return ai(e,t);var s={}.toString.call(e).slice(8,-1);return"Object"===s&&e.constructor&&(s=e.constructor.name),"Map"===s||"Set"===s?Array.from(e):"Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?ai(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ai(e,t){(null==t||t>e.length)&&(t=e.length);for(var s=0,n=Array(t);s<t;s++)n[s]=e[s];return n}var li=ie(ei(Qr(function(e,t){return e.length>t.length})),ti,J("length")),ui=mt(function(e,t,s){var n=s.apply(void 0,ci(e));return ri(n)?ni(n):t});const hi=Yr(oi,function(e){var t=li(e);return qe(t,function(){for(var t=arguments.length,s=new Array(t),n=0;n<t;n++)s[n]=arguments[n];return te(ui(s),void 0,e)})},qs);const di=class extends Wn{alternator;constructor({alternator:e,...t}){super({...t}),this.alternator=e}enter(e){const t=e.node,s=this.alternator.map(({predicate:e,specPath:t})=>Yr(e,_s(t),qs)),n=hi(s)(t);this.element=this.toRefractedElement(n,t),e.stop()}};const pi=class extends di{constructor(e){super(e),this.alternator=[{predicate:Cr,specPath:["document","objects","JSONReference"]},{predicate:Kr,specPath:["document","objects","JSONSchema"]}]}};const mi=class extends jr{constructor(e){super(e),this.element=new Vt,this.specPath=_s(["document","objects","Media"])}};const fi=class extends Or{constructor(e){super(e),this.element=new Ht,this.specPath=_s(["document","objects","LinkDescription"])}},yi={visitors:{value:Ls,JSONSchemaOrJSONReferenceVisitor:pi,document:{objects:{JSONSchema:{element:"JSONSchemaDraft4",$visitor:Dr,fixedFields:{id:{$ref:"#/visitors/value",alias:"idField"},$schema:{$ref:"#/visitors/value"},multipleOf:{$ref:"#/visitors/value"},maximum:{$ref:"#/visitors/value"},exclusiveMaximum:{$ref:"#/visitors/value"},minimum:{$ref:"#/visitors/value"},exclusiveMinimum:{$ref:"#/visitors/value"},maxLength:{$ref:"#/visitors/value"},minLength:{$ref:"#/visitors/value"},pattern:{$ref:"#/visitors/value"},additionalItems:pi,items:{$visitor:$r,alias:"itemsField"},maxItems:{$ref:"#/visitors/value"},minItems:{$ref:"#/visitors/value"},uniqueItems:{$ref:"#/visitors/value"},maxProperties:{$ref:"#/visitors/value"},minProperties:{$ref:"#/visitors/value"},required:Jr,properties:Lr,additionalProperties:pi,patternProperties:_r,dependencies:Br,enum:qr,type:Rr,allOf:Vr,anyOf:Hr,oneOf:Ur,not:pi,definitions:Gr,title:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},default:{$ref:"#/visitors/value"},format:{$ref:"#/visitors/value"},base:{$ref:"#/visitors/value"},links:{$visitor:zr,alias:"linksField"},media:{$ref:"#/visitors/document/objects/Media"},readOnly:{$ref:"#/visitors/value"}}},JSONReference:{element:"JSONReference",$visitor:Xr,fixedFields:{$ref:Wr}},Media:{element:"media",$visitor:mi,fixedFields:{binaryEncoding:{$ref:"#/visitors/value"},type:{$ref:"#/visitors/value"}}},LinkDescription:{element:"linkDescription",$visitor:fi,fixedFields:{href:{$ref:"#/visitors/value"},rel:{$ref:"#/visitors/value"},title:{$ref:"#/visitors/value"},targetSchema:pi,mediaType:{$ref:"#/visitors/value"},method:{$ref:"#/visitors/value"},encType:{$ref:"#/visitors/value"},schema:pi}}}}}},gi=kt(yi),xi=e=>Object.entries(e).map(([e,t])=>ht(t)?{name:e,...t}:{name:e,$visitor:t});Object.defineProperty(qt,"fixedFields",{get:()=>xi(gi.visitors.document.objects.JSONSchema.fixedFields),enumerable:!0}),Object.defineProperty(Rt,"fixedFields",{get:()=>xi(gi.visitors.document.objects.JSONReference.fixedFields),enumerable:!0}),Object.defineProperty(Vt,"fixedFields",{get:()=>xi(gi.visitors.document.objects.Media.fixedFields),enumerable:!0}),Object.defineProperty(Ht,"fixedFields",{get:()=>xi(gi.visitors.document.objects.LinkDescription.fixedFields),enumerable:!0});const bi=class extends qt{constructor(e,t,s){super(e,t,s),this.element="JSONSchemaDraft6"}get idField(){throw new h("id keyword from Core vocabulary has been renamed to $id.")}set idField(e){throw new h("id keyword from Core vocabulary has been renamed to $id.")}get $id(){return this.get("$id")}set $id(e){this.set("$id",e)}get exclusiveMaximum(){return this.get("exclusiveMaximum")}set exclusiveMaximum(e){this.set("exclusiveMaximum",e)}get exclusiveMinimum(){return this.get("exclusiveMinimum")}set exclusiveMinimum(e){this.set("exclusiveMinimum",e)}get containsField(){return this.get("contains")}set containsField(e){this.set("contains",e)}get itemsField(){return this.get("items")}set itemsField(e){this.set("items",e)}get propertyNames(){return this.get("propertyNames")}set propertyNames(e){this.set("propertyNames",e)}get const(){return this.get("const")}set const(e){this.set("const",e)}get not(){return this.get("not")}set not(e){this.set("not",e)}get examples(){return this.get("examples")}set examples(e){this.set("examples",e)}};const vi=class extends Ht{get hrefSchema(){return this.get("hrefSchema")}set hrefSchema(e){this.set("hrefSchema",e)}get targetSchema(){return this.get("targetSchema")}set targetSchema(e){this.set("targetSchema",e)}get schema(){throw new h("schema keyword from Hyper-Schema vocabulary has been renamed to submissionSchema.")}set schema(e){throw new h("schema keyword from Hyper-Schema vocabulary has been renamed to submissionSchema.")}get submissionSchema(){return this.get("submissionSchema")}set submissionSchema(e){this.set("submissionSchema",e)}get method(){throw new h("method keyword from Hyper-Schema vocabulary has been removed.")}set method(e){throw new h("method keyword from Hyper-Schema vocabulary has been removed.")}get encType(){throw new h("encType keyword from Hyper-Schema vocabulary has been renamed to submissionEncType.")}set encType(e){throw new h("encType keyword from Hyper-Schema vocabulary has been renamed to submissionEncType.")}get submissionEncType(){return this.get("submissionEncType")}set submissionEncType(e){this.set("submissionEncType",e)}};var Si=D(function e(t,s,n){if(0===t.length)return s;var r=t[0];if(t.length>1){var i=$(r,n);(N(i)||"object"!=typeof i)&&(i=C(t[1])?[]:{}),s=e(Array.prototype.slice.call(t,1),s,i)}return function(e,t,s){if(C(e)&&V(s)){var n=e<0?s.length+e:e,r=[].concat(s);return r[n]=t,r}var i={};for(var o in s)i[o]=s[o];return i[e]=t,i}(r,s,n)});const wi=Si;const Oi=D(function(e,t,s){var n=Array.prototype.slice.call(s,0);return n.splice(e,t),n});var ji=D(function(e,t,s){return wi([e],t,s)});const ki=ji;var Ei=g(function e(t,s){if(null==s)return s;switch(t.length){case 0:return s;case 1:return function(e,t){if(null==t)return t;if(C(e)&&V(t))return Oi(e,1,t);var s={};for(var n in t)s[n]=t[n];return delete s[e],s}(t[0],s);default:var n=t[0],r=Array.prototype.slice.call(t,1);return null==s[n]?function(e,t){if(C(e)&&V(t))return[].concat(t);var s={};for(var n in t)s[n]=t[n];return s}(n,s):ki(n,e(r,s[n]),s)}});const Ai=Ei;const Fi=class extends Dr{constructor(e){super(e),this.element=new bi}get defaultDialectIdentifier(){return"http://json-schema.org/draft-06/schema#"}BooleanElement(e){this.enter(e),this.element.classes.push("boolean-json-schema")}handleSchemaIdentifier(e,t="$id"){return super.handleSchemaIdentifier(e,t)}};const Ni=class extends $r{BooleanElement(e){this.element=this.toRefractedElement(["document","objects","JSONSchema"],e.node),e.stop()}};const Ii=class extends Ls{ArrayElement(e){this.enter(e),this.element.classes.push("json-schema-examples")}};const Mi=class extends fi{constructor(e){super(e),this.element=new vi}},Ti=ie(wi(["visitors","document","objects","JSONSchema","element"],"JSONSchemaDraft6"),wi(["visitors","document","objects","JSONSchema","$visitor"],Fi),Ai(["visitors","document","objects","JSONSchema","fixedFields","id"]),wi(["visitors","document","objects","JSONSchema","fixedFields","$id"],{$ref:"#/visitors/value"}),wi(["visitors","document","objects","JSONSchema","fixedFields","contains"],{$visitor:yi.visitors.JSONSchemaOrJSONReferenceVisitor,alias:"containsField"}),wi(["visitors","document","objects","JSONSchema","fixedFields","items"],{$visitor:Ni,alias:"itemsField"}),wi(["visitors","document","objects","JSONSchema","fixedFields","propertyNames"],yi.visitors.JSONSchemaOrJSONReferenceVisitor),wi(["visitors","document","objects","JSONSchema","fixedFields","const"],{$ref:"#/visitors/value"}),wi(["visitors","document","objects","JSONSchema","fixedFields","examples"],Ii),wi(["visitors","document","objects","LinkDescription","$visitor"],Mi),wi(["visitors","document","objects","LinkDescription","fixedFields","hrefSchema"],yi.visitors.JSONSchemaOrJSONReferenceVisitor),Ai(["visitors","document","objects","LinkDescription","fixedFields","schema"]),wi(["visitors","document","objects","LinkDescription","fixedFields","submissionSchema"],yi.visitors.JSONSchemaOrJSONReferenceVisitor),Ai(["visitors","document","objects","LinkDescription","fixedFields","method"]),Ai(["visitors","document","objects","LinkDescription","fixedFields","encType"]),wi(["visitors","document","objects","LinkDescription","fixedFields","submissionEncType"],{$ref:"#/visitors/value"}))(yi),Pi=kt(Ti),Di=e=>Object.entries(e).map(([e,t])=>ht(t)?{name:e,...t}:{name:e,$visitor:t});Object.defineProperty(bi,"fixedFields",{get:()=>Di(Pi.visitors.document.objects.JSONSchema.fixedFields),enumerable:!0}),Object.defineProperty(vi,"fixedFields",{get:()=>Di(Pi.visitors.document.objects.LinkDescription.fixedFields),enumerable:!0});const Ci=class extends bi{constructor(e,t,s){super(e,t,s),this.element="JSONSchemaDraft7"}get $comment(){return this.get("$comment")}set $comment(e){this.set("$comment",e)}get itemsField(){return this.get("items")}set itemsField(e){this.set("items",e)}get if(){return this.get("if")}set if(e){this.set("if",e)}get then(){return this.get("then")}set then(e){this.set("then",e)}get else(){return this.get("else")}set else(e){this.set("else",e)}get not(){return this.get("not")}set not(e){this.set("not",e)}get contentEncoding(){return this.get("contentEncoding")}set contentEncoding(e){this.set("contentEncoding",e)}get contentMediaType(){return this.get("contentMediaType")}set contentMediaType(e){this.set("contentMediaType",e)}get media(){throw new h('media keyword from Hyper-Schema vocabulary has been moved to validation vocabulary as "contentMediaType" / "contentEncoding"')}set media(e){throw new h('media keyword from Hyper-Schema vocabulary has been moved to validation vocabulary as "contentMediaType" / "contentEncoding"')}get writeOnly(){return this.get("writeOnly")}set writeOnly(e){this.set("writeOnly",e)}};const $i=class extends vi{get anchor(){return this.get("anchor")}set anchor(e){this.set("anchor",e)}get anchorPointer(){return this.get("anchorPointer")}set anchorPointer(e){this.set("anchorPointer",e)}get templatePointers(){return this.get("templatePointers")}set templatePointers(e){this.set("templatePointers",e)}get templateRequired(){return this.get("templateRequired")}set templateRequired(e){this.set("templateRequired",e)}get targetSchema(){return this.get("targetSchema")}set targetSchema(e){this.set("targetSchema",e)}get mediaType(){throw new h("mediaType keyword from Hyper-Schema vocabulary has been renamed to targetMediaType.")}set mediaType(e){throw new h("mediaType keyword from Hyper-Schema vocabulary has been renamed to targetMediaType.")}get targetMediaType(){return this.get("targetMediaType")}set targetMediaType(e){this.set("targetMediaType",e)}get targetHints(){return this.get("targetHints")}set targetHints(e){this.set("targetHints",e)}get description(){return this.get("description")}set description(e){this.set("description",e)}get $comment(){return this.get("$comment")}set $comment(e){this.set("$comment",e)}get hrefSchema(){return this.get("hrefSchema")}set hrefSchema(e){this.set("hrefSchema",e)}get headerSchema(){return this.get("headerSchema")}set headerSchema(e){this.set("headerSchema",e)}get submissionSchema(){return this.get("submissionSchema")}set submissionSchema(e){this.set("submissionSchema",e)}get submissionEncType(){throw new h("submissionEncType keyword from Hyper-Schema vocabulary has been renamed to submissionMediaType.")}set submissionEncType(e){throw new h("submissionEncType keyword from Hyper-Schema vocabulary has been renamed to submissionMediaType.")}get submissionMediaType(){return this.get("submissionMediaType")}set submissionMediaType(e){this.set("submissionMediaType",e)}};const Ji=class extends Fi{constructor(e){super(e),this.element=new Ci}get defaultDialectIdentifier(){return"http://json-schema.org/draft-07/schema#"}};const Li=class extends Mi{constructor(e){super(e),this.element=new $i}},_i=ie(wi(["visitors","document","objects","JSONSchema","element"],"JSONSchemaDraft7"),wi(["visitors","document","objects","JSONSchema","$visitor"],Ji),wi(["visitors","document","objects","JSONSchema","fixedFields","$comment"],Ti.visitors.value),wi(["visitors","document","objects","JSONSchema","fixedFields","if"],Ti.visitors.JSONSchemaOrJSONReferenceVisitor),wi(["visitors","document","objects","JSONSchema","fixedFields","then"],Ti.visitors.JSONSchemaOrJSONReferenceVisitor),wi(["visitors","document","objects","JSONSchema","fixedFields","else"],Ti.visitors.JSONSchemaOrJSONReferenceVisitor),Ai(["visitors","document","objects","JSONSchema","fixedFields","media"]),wi(["visitors","document","objects","JSONSchema","fixedFields","contentEncoding"],Ti.visitors.value),wi(["visitors","document","objects","JSONSchema","fixedFields","contentMediaType"],Ti.visitors.value),wi(["visitors","document","objects","JSONSchema","fixedFields","writeOnly"],Ti.visitors.value),wi(["visitors","document","objects","LinkDescription","$visitor"],Li),wi(["visitors","document","objects","LinkDescription","fixedFields","anchor"],Ti.visitors.value),wi(["visitors","document","objects","LinkDescription","fixedFields","anchorPointer"],Ti.visitors.value),Ai(["visitors","document","objects","LinkDescription","fixedFields","mediaType"]),wi(["visitors","document","objects","LinkDescription","fixedFields","targetMediaType"],Ti.visitors.value),wi(["visitors","document","objects","LinkDescription","fixedFields","targetHints"],Ti.visitors.value),wi(["visitors","document","objects","LinkDescription","fixedFields","description"],Ti.visitors.value),wi(["visitors","document","objects","LinkDescription","fixedFields","$comment"],Ti.visitors.value),wi(["visitors","document","objects","LinkDescription","fixedFields","headerSchema"],Ti.visitors.JSONSchemaOrJSONReferenceVisitor),Ai(["visitors","document","objects","LinkDescription","fixedFields","submissionEncType"]),wi(["visitors","document","objects","LinkDescription","fixedFields","submissionMediaType"],Ti.visitors.value))(Ti),Bi=kt(_i),qi=e=>Object.entries(e).map(([e,t])=>ht(t)?{name:e,...t}:{name:e,$visitor:t});Object.defineProperty(Ci,"fixedFields",{get:()=>qi(Bi.visitors.document.objects.JSONSchema.fixedFields),enumerable:!0}),Object.defineProperty($i,"fixedFields",{get:()=>qi(Bi.visitors.document.objects.LinkDescription.fixedFields),enumerable:!0});const Ri=class extends Ci{constructor(e,t,s){super(e,t,s),this.element="JSONSchema201909"}get $vocabulary(){return this.get("$vocabulary")}set $vocabulary(e){this.set("$vocabulary",e)}get $anchor(){return this.get("$anchor")}set $anchor(e){this.set("$anchor",e)}get $recursiveAnchor(){return this.get("$recursiveAnchor")}set $recursiveAnchor(e){this.set("$recursiveAnchor",e)}get $recursiveRef(){return this.get("$recursiveRef")}set $recursiveRef(e){this.set("$recursiveRef",e)}get $ref(){return this.get("$ref")}set $ref(e){this.set("$ref",e)}get $defs(){return this.get("$defs")}set $defs(e){this.set("$defs",e)}get definitions(){throw new h("definitions keyword from Validation vocabulary has been renamed to $defs.")}set definitions(e){throw new h("definitions keyword from Validation vocabulary has been renamed to $defs.")}get not(){return this.get("not")}set not(e){this.set("not",e)}get if(){return this.get("if")}set if(e){this.set("if",e)}get then(){return this.get("then")}set then(e){this.set("then",e)}get else(){return this.get("else")}set else(e){this.set("else",e)}get dependentSchemas(){return this.get("dependentSchemas")}set dependentSchemas(e){this.set("dependentSchemas",e)}get dependencies(){throw new h("dependencies keyword from Validation vocabulary has been renamed to dependentSchemas.")}set dependencies(e){throw new h("dependencies keyword from Validation vocabulary has been renamed to dependentSchemas.")}get itemsField(){return this.get("items")}set itemsField(e){this.set("items",e)}get contains(){return this.get("contains")}set contains(e){this.set("contains",e)}get additionalProperties(){return this.get("additionalProperties")}set additionalProperties(e){this.set("additionalProperties",e)}get additionalItems(){return this.get("additionalItems")}set additionalItems(e){this.set("additionalItems",e)}get propertyNames(){return this.get("propertyNames")}set propertyNames(e){this.set("propertyNames",e)}get unevaluatedItems(){return this.get("unevaluatedItems")}set unevaluatedItems(e){this.set("unevaluatedItems",e)}get unevaluatedProperties(){return this.get("unevaluatedProperties")}set unevaluatedProperties(e){this.set("unevaluatedProperties",e)}get maxContains(){return this.get("maxContains")}set maxContains(e){this.set("maxContains",e)}get minContains(){return this.get("minContains")}set minContains(e){this.set("minContains",e)}get dependentRequired(){return this.get("dependentRequired")}set dependentRequired(e){this.set("dependentRequired",e)}get deprecated(){return this.get("deprecated")}set deprecated(e){this.set("deprecated",e)}get contentSchema(){return this.get("contentSchema")}set contentSchema(e){this.set("contentSchema",e)}};const Vi=class extends $i{constructor(e,t,s){super(e,t,s),this.element="linkDescription"}get targetSchema(){return this.get("targetSchema")}set targetSchema(e){this.set("targetSchema",e)}get hrefSchema(){return this.get("hrefSchema")}set hrefSchema(e){this.set("hrefSchema",e)}get headerSchema(){return this.get("headerSchema")}set headerSchema(e){this.set("headerSchema",e)}get submissionSchema(){return this.get("submissionSchema")}set submissionSchema(e){this.set("submissionSchema",e)}};const Hi=class extends Ji{constructor(e){super(e),this.element=new Ri}get defaultDialectIdentifier(){return"https://json-schema.org/draft/2019-09/schema"}ObjectElement(e){const t=e.node;this.handleDialectIdentifier(t),this.handleSchemaIdentifier(t),this.parent=this.element,Kn.prototype.ObjectElement.call(this,e),Yt(this.element.$ref)&&(this.element.classes.push("reference-element"),this.element.meta.set("referenced-element","schema"))}};const Ui=class extends Ls{ObjectElement(e){this.enter(e),this.element.classes.push("json-schema-$vocabulary")}};const Gi=class extends Ls{StringElement(e){this.enter(e),this.element.classes.push("reference-value")}},zi=fr(Wn,vr,Ls),Xi=fr(br,vr,Ls);const Wi=class extends Xi{constructor(e){super(e),this.element=new Bt,this.element.classes.push("json-schema-$defs"),this.specPath=_s(["document","objects","JSONSchema"])}};const Ki=class extends zi{constructor(e){super(e),this.element=new Wt,this.element.classes.push("json-schema-allOf")}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=this.toRefractedElement(["document","objects","JSONSchema"],e);this.element.push(t)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const Yi=class extends zi{constructor(e){super(e),this.element=new Wt,this.element.classes.push("json-schema-anyOf")}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=this.toRefractedElement(["document","objects","JSONSchema"],e);this.element.push(t)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const Qi=class extends zi{constructor(e){super(e),this.element=new Wt,this.element.classes.push("json-schema-oneOf")}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=this.toRefractedElement(["document","objects","JSONSchema"],e);this.element.push(t)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const Zi=class extends Xi{constructor(e){super(e),this.element=new Bt,this.element.classes.push("json-schema-dependentSchemas"),this.specPath=_s(["document","objects","JSONSchema"])}};const eo=class extends zi{ObjectElement(e){this.element=this.toRefractedElement(["document","objects","JSONSchema"],e.node),e.stop()}ArrayElement(e){const t=e.node;this.element=new Wt,this.element.classes.push("json-schema-items"),t.forEach(e=>{const t=this.toRefractedElement(["document","objects","JSONSchema"],e);this.element.push(t)}),this.copyMetaAndAttributes(t,this.element),e.stop()}BooleanElement(e){this.element=this.toRefractedElement(["document","objects","JSONSchema"],e.node),e.stop()}};const to=class extends Xi{constructor(e){super(e),this.element=new Bt,this.element.classes.push("json-schema-properties"),this.specPath=_s(["document","objects","JSONSchema"])}};const so=class extends Xi{constructor(e){super(e),this.element=new Bt,this.element.classes.push("json-schema-patternProperties"),this.specPath=_s(["document","objects","JSONSchema"])}};const no=class extends Ls{ObjectElement(e){this.enter(e),this.element.classes.push("json-schema-dependentRequired")}};const ro=class extends Li{constructor(e){super(e),this.element=new Vi}},io=ie(wi(["visitors","document","objects","JSONSchema","element"],"JSONSchema201909"),wi(["visitors","document","objects","JSONSchema","$visitor"],Hi),wi(["visitors","document","objects","JSONSchema","fixedFields","$vocabulary"],Ui),wi(["visitors","document","objects","JSONSchema","fixedFields","$anchor"],_i.visitors.value),wi(["visitors","document","objects","JSONSchema","fixedFields","$recursiveAnchor"],_i.visitors.value),wi(["visitors","document","objects","JSONSchema","fixedFields","$recursiveRef"],_i.visitors.value),Ai(["visitors","document","objects","JSONReference","$visitor"]),wi(["visitors","document","objects","JSONSchema","fixedFields","$ref"],Gi),Ai(["visitors","document","objects","JSONSchema","fixedFields","definitions"]),wi(["visitors","document","objects","JSONSchema","fixedFields","$defs"],Wi),wi(["visitors","document","objects","JSONSchema","fixedFields","allOf"],Ki),wi(["visitors","document","objects","JSONSchema","fixedFields","anyOf"],Yi),wi(["visitors","document","objects","JSONSchema","fixedFields","oneOf"],Qi),wi(["visitors","document","objects","JSONSchema","fixedFields","not"],Hi),wi(["visitors","document","objects","JSONSchema","fixedFields","if"],Hi),wi(["visitors","document","objects","JSONSchema","fixedFields","then"],Hi),wi(["visitors","document","objects","JSONSchema","fixedFields","else"],Hi),Ai(["visitors","document","objects","JSONSchema","fixedFields","dependencies"]),wi(["visitors","document","objects","JSONSchema","fixedFields","dependentSchemas"],Zi),wi(["visitors","document","objects","JSONSchema","fixedFields","items"],{$visitor:eo,alias:"itemsField"}),wi(["visitors","document","objects","JSONSchema","fixedFields","contains"],Hi),wi(["visitors","document","objects","JSONSchema","fixedFields","properties"],to),wi(["visitors","document","objects","JSONSchema","fixedFields","patternProperties"],so),wi(["visitors","document","objects","JSONSchema","fixedFields","additionalProperties"],Hi),wi(["visitors","document","objects","JSONSchema","fixedFields","additionalItems"],Hi),wi(["visitors","document","objects","JSONSchema","fixedFields","propertyNames"],Hi),wi(["visitors","document","objects","JSONSchema","fixedFields","unevaluatedItems"],Hi),wi(["visitors","document","objects","JSONSchema","fixedFields","unevaluatedProperties"],Hi),wi(["visitors","document","objects","JSONSchema","fixedFields","maxContains"],_i.visitors.value),wi(["visitors","document","objects","JSONSchema","fixedFields","minContains"],_i.visitors.value),wi(["visitors","document","objects","JSONSchema","fixedFields","dependentRequired"],no),wi(["visitors","document","objects","JSONSchema","fixedFields","deprecated"],_i.visitors.value),wi(["visitors","document","objects","JSONSchema","fixedFields","contentSchema"],Hi),wi(["visitors","document","objects","LinkDescription","element"],"linkDescription"),wi(["visitors","document","objects","LinkDescription","$visitor"],ro),wi(["visitors","document","objects","LinkDescription","fixedFields","targetSchema"],Hi),wi(["visitors","document","objects","LinkDescription","fixedFields","hrefSchema"],Hi),wi(["visitors","document","objects","LinkDescription","fixedFields","headerSchema"],Hi),wi(["visitors","document","objects","LinkDescription","fixedFields","submissionSchema"],Hi))(_i),oo=kt(io),co=e=>Object.entries(e).map(([e,t])=>ht(t)?{name:e,...t}:{name:e,$visitor:t});Object.defineProperty(Ri,"fixedFields",{get:()=>co(oo.visitors.document.objects.JSONSchema.fixedFields),enumerable:!0}),Object.defineProperty(Vi,"fixedFields",{get:()=>co(oo.visitors.document.objects.LinkDescription.fixedFields),enumerable:!0});const ao=class extends Ri{constructor(e,t,s){super(e,t,s),this.element="JSONSchema202012"}get $dynamicAnchor(){return this.get("$dynamicAnchor")}set $dynamicAnchor(e){this.set("$dynamicAnchor",e)}get $recursiveAnchor(){throw new h("$recursiveAnchor keyword from Core vocabulary has been renamed to $dynamicAnchor.")}set $recursiveAnchor(e){throw new h("$recursiveAnchor keyword from Core vocabulary has been renamed to $dynamicAnchor.")}get $dynamicRef(){return this.get("$dynamicRef")}set $dynamicRef(e){this.set("$dynamicRef",e)}get $recursiveRef(){throw new h("$recursiveRef keyword from Core vocabulary has been renamed to $dynamicRef.")}set $recursiveRef(e){throw new h("$recursiveRef keyword from Core vocabulary has been renamed to $dynamicRef.")}get prefixItems(){return this.get("prefixItems")}set prefixItems(e){this.set("prefixItems",e)}};const lo=class extends Vi{get targetSchema(){return this.get("targetSchema")}set targetSchema(e){this.set("targetSchema",e)}get hrefSchema(){return this.get("hrefSchema")}set hrefSchema(e){this.set("hrefSchema",e)}get headerSchema(){return this.get("headerSchema")}set headerSchema(e){this.set("headerSchema",e)}get submissionSchema(){return this.get("submissionSchema")}set submissionSchema(e){this.set("submissionSchema",e)}},uo={namespace:e=>{const{base:t}=e;return t.register("JSONSchema202012",ao),t.register("linkDescription",lo),t}},ho={JSONSchema202012Element:{prefixItems(...e){const t=new Wt(...e);return t.classes.push("json-schema-prefixItems"),t},items:(...e)=>new ao(...e),contains:(...e)=>new ao(...e),required(...e){const t=new Wt(...e);return t.classes.push("json-schema-required"),t},properties(...e){const t=new Bt(...e);return t.classes.push("json-schema-properties"),t},additionalProperties:(...e)=>new ao(...e),patternProperties(...e){const t=new Bt(...e);return t.classes.push("json-schema-patternProperties"),t},dependentSchemas(...e){const t=new Bt(...e);return t.classes.push("json-schema-dependentSchemas"),t},propertyNames:(...e)=>new ao(...e),enum(...e){const t=new Wt(...e);return t.classes.push("json-schema-enum"),t},allOf(...e){const t=new Wt(...e);return t.classes.push("json-schema-allOf"),t},anyOf(...e){const t=new Wt(...e);return t.classes.push("json-schema-anyOf"),t},oneOf(...e){const t=new Wt(...e);return t.classes.push("json-schema-oneOf"),t},if:(...e)=>new ao(...e),then:(...e)=>new ao(...e),else:(...e)=>new ao(...e),not:(...e)=>new ao(...e),$defs(...e){const t=new Bt(...e);return t.classes.push("json-schema-$defs"),t},examples(...e){const t=new Wt(...e);return t.classes.push("json-schema-examples"),t},links(...e){const t=new Wt(...e);return t.classes.push("json-schema-links"),t},$vocabulary(...e){const t=new Bt(...e);return t.classes.push("json-schema-$vocabulary"),t},unevaluatedItems:(...e)=>new ao(...e),unevaluatedProperties:(...e)=>new ao(...e),$dependentRequired(...e){const t=new Bt(...e);return t.classes.push("json-schema-$dependentRequired"),t},contentSchema:(...e)=>new ao(...e),type(...e){const t=new Wt(...e);return t.classes.push("json-schema-type"),t}},LinkDescriptionElement:{hrefSchema:(...e)=>new ao(...e),targetSchema:(...e)=>new ao(...e),submissionSchema:(...e)=>new ao(...e),templatePointers:(...e)=>new Bt(...e),templateRequired:(...e)=>new Wt(...e),targetHints:(...e)=>new Bt(...e),headerSchema:(...e)=>new ao(...e)},"json-schema-prefixItems":{"<*>":function(...e){return new ao(...e)}},"json-schema-properties":{"[key: *]":function(...e){return new ao(...e)}},"json-schema-patternProperties":{"[key: *]":function(...e){return new ao(...e)}},"json-schema-dependentSchemas":{"[key: *]":function(...e){return new ao(...e)}},"json-schema-allOf":{"<*>":function(...e){return new ao(...e)}},"json-schema-anyOf":{"<*>":function(...e){return new ao(...e)}},"json-schema-oneOf":{"<*>":function(...e){return new ao(...e)}},"json-schema-$defs":{"[key: *]":function(...e){return new ao(...e)}},"json-schema-links":{"<*>":function(...e){return new lo(...e)}}},po=(e,t)=>{const s=Cn(e),n=e.isMetaEmpty?void 0:e.classes.at(0),r=ho[s]||ho[n];return void 0===r?void 0:Object.hasOwn(r,"[key: *]")?r["[key: *]"]:r[t]},mo=()=>()=>({visitor:{StringElement(e){const t=e.node;if(!(e=>Yt(e)&&os(e,["yaml-e-node","yaml-e-scalar"]))(t))return;const s=e.getAncestorNodes().reverse().filter(Kt),n=s.at(-1);let r,i;if(ts(n)?(i=t,r=po(n,"<*>")):ns(n)&&(i=s.at(-2),r=po(i,Ns(n.key))),"function"!=typeof r)return;const o=r.call({context:i},void 0,t.isMetaEmpty?void 0:t.meta.cloneDeep(),t.isAttributesEmpty?void 0:xs(t.attributes));hs.transfer(t,o),$s.transfer(t,o),e.replaceWith(o)}}});var fo=D(function(e,t,s){var n,r={};for(n in s=s||{},t=t||{})x(n,t)&&(r[n]=x(n,s)?e(n,t[n],s[n]):t[n]);for(n in s)x(n,s)&&!x(n,r)&&(r[n]=s[n]);return r});const yo=fo;var go=D(function e(t,s,n){return yo(function(s,n,r){return Se(n)&&Se(r)?e(t,n,r):t(s,n,r)},s,n)});const xo=go;const bo=g(function(e,t){return xo(function(e,t,s){return s},e,t)});const vo=D(function(e,t,s){return Bs(e,J(t,s))});const So=ne(0,-1);var wo=g(function(e,t){return e.apply(this,t)});const Oo=wo;const jo=Ye(ct);const ko=We(ii,Gs);const Eo=qe(3,function(e,t,s){var n=B(e,s),r=B(So(e),s);if(!jo(n)&&!ko(e)){var i=K(n,r);return Oo(i,t)}});const Ao=class{namespace;constructor(e){this.namespace=e||new this.Namespace}serialise(e){if(!(e instanceof this.namespace.elements.Element))throw new TypeError(`Given element \`${e}\` is not an Element instance`);const t={element:e.element};if(!e.isMetaEmpty){const s=this.serialiseMeta(e);s&&(t.meta=s.meta,s.rawKeys.length>0&&(t.__meta_raw__=s.rawKeys))}if(e.isAttributesEmpty||(t.attributes=this.serialiseObject(e.attributes)),!(e instanceof hs)){const s=hs.from(e);s&&(t.meta||(t.meta={}),t.meta.__mappings__=this.serialise(s))}if(!(e instanceof $s)){const s=$s.from(e);s&&(t.meta||(t.meta={}),t.meta.__styles__=this.serialise(s))}const s=this.serialiseContent(e.content);return void 0!==s&&(t.content=s),t}deserialise(e){if(!e.element)throw new Error("Given value is not an object containing an element name");const t=new(this.namespace.getElementClass(e.element));let s,n;t.element!==e.element&&(t.element=e.element);let r=e.meta;if(e.meta?.__mappings__||e.meta?.__styles__){const{__mappings__:t,__styles__:i,...o}=e.meta;s=t,n=i,r=Object.keys(o).length>0?o:void 0}const i=e.__meta_raw__?new Set(e.__meta_raw__):void 0;if(r)for(const[e,s]of Object.entries(r)){const n=this.deserialise(s);t.setMetaProperty(e,i?.has(e)?n.toValue():n)}if(s){this.deserialise(s).applyTo(t)}if(n){this.deserialise(n).applyTo(t)}e.attributes&&this.deserialiseObject(e.attributes,t.attributes);const o=this.deserialiseContent(e.content);return void 0===o&&null!==t.content||(t.content=o),t}serialiseContent(e){if(e instanceof this.namespace.elements.Element)return this.serialise(e);if(e instanceof this.namespace.KeyValuePair){const t=e,s={key:this.serialise(t.key)};return t.value&&(s.value=this.serialise(t.value)),s}if(e&&Array.isArray(e)){if(0===e.length)return;return e.map(e=>this.serialise(e))}return e}deserialiseContent(e){if(e){if(e.element)return this.deserialise(e);if(e.key){const t=new this.namespace.KeyValuePair(this.deserialise(e.key));return e.value&&(t.value=this.deserialise(e.value)),t}if(Array.isArray(e))return e.map(e=>this.deserialise(e))}return e}serialiseMeta(e){const t={},s=[];let n=!1;for(const[r,i]of Object.entries(e.meta))if(i instanceof this.namespace.elements.Element)t[r]=this.serialise(i),n=!0;else if(void 0!==i){const o=e.refract(i);t[r]=this.serialise(o),s.push(r),n=!0}return n?{meta:t,rawKeys:s}:void 0}serialiseObject(e){const t={};if(e.forEach((e,s)=>{e&&(t[s.toValue()]=this.serialise(e))}),0!==Object.keys(t).length)return t}deserialiseObject(e,t){Object.keys(e).forEach(s=>{t.set(s,this.deserialise(e[s]))})}},Fo=e=>null===e,No=e=>"string"==typeof e,Io=e=>"number"==typeof e,Mo=e=>"boolean"==typeof e,To=e=>null!==e&&"object"==typeof e;class Po{elementMap={};elementDetection=[];Element;KeyValuePair;_elements;_attributeElementKeys=[];_attributeElementArrayKeys=[];constructor(e){this.Element=$t,this.KeyValuePair=Mt,e&&e.noDefault||this.useDefault()}use(e){return e.namespace&&e.namespace({base:this}),e.load&&e.load({base:this}),this}useDefault(){return this.register("null",zt).register("string",Ut).register("number",Gt).register("boolean",Xt).register("array",Wt).register("object",Bt).register("member",_t).register("ref",Os).register("link",ws).register("sourceMap",hs),this.detect(Fo,zt,!1).detect(No,Ut,!1).detect(Io,Gt,!1).detect(Mo,Xt,!1).detect(Array.isArray,Wt,!1).detect(To,Bt,!1),this}register(e,t){return this._elements=void 0,this.elementMap[e]=t,this}unregister(e){return this._elements=void 0,delete this.elementMap[e],this}detect(e,t,s){return void 0===s||s?this.elementDetection.unshift([e,t]):this.elementDetection.push([e,t]),this}toElement(e){if(e instanceof this.Element)return e;let t;for(const[s,n]of this.elementDetection)if(s(e)){t=new n(e);break}return t}getElementClass(e){const t=this.elementMap[e];return void 0===t?this.Element:t}fromRefract(e){return this.serialiser.deserialise(e)}toRefract(e){return this.serialiser.serialise(e)}get elements(){return void 0===this._elements&&(this._elements={Element:this.Element},Object.keys(this.elementMap).forEach(e=>{const t=e[0].toUpperCase()+e.substring(1);this._elements[t]=this.elementMap[e]})),this._elements}get serialiser(){return new Ao(this)}}Ao.prototype.Namespace=Po;const Do=Po,Co=new Do,$o={isElement:Kt,isStringElement:Yt,isNumberElement:Qt,isNullElement:Zt,isBooleanElement:es,isArrayElement:ts,isObjectElement:ss,isMemberElement:ns,isPrimitiveElement:e=>ss(e)&&"object"===e.element||ts(e)&&"array"===e.element||es(e)&&"boolean"===e.element||Qt(e)&&"number"===e.element||Yt(e)&&"string"===e.element||Zt(e)&&"null"===e.element||ns(e)&&"member"===e.element,isLinkElement:As,isRefElement:Fs,isAnnotationElement:e=>e instanceof js,isCommentElement:e=>e instanceof ks,isParseResultElement:e=>e instanceof Es,isSourceMapElement:e=>e instanceof hs,hasElementStyle:rs,hasElementSourceMap:is,includesSymbols:(e,t)=>{if(0===t.length)return!0;if(!e.hasAttributesProperty("symbols"))return!1;const s=e.attributes.get("symbols");return!!ts(s)&&t.every(e=>s.includes(e))},includesClasses:os},Jo={toolboxCreator:()=>({predicates:$o,namespace:Co}),visitorOptions:{exposeEdits:!0}},Lo=(e,t,s={})=>{if(0===t.length)return e;const n=bo(Jo,s),{toolboxCreator:r,visitorOptions:i,traverseOptions:o}=n,c=r(),a=t.map(e=>e(c)),l=Rn(a.map(vo({},"visitor")),i);a.forEach(Eo(["pre"],[]));const u=zn(e,l,o);return a.forEach(Eo(["post"],[])),u};function _o(e){return void 0===e?new zt:Bo(e)}function Bo(e){if(e instanceof $t)return e;if("string"==typeof e)return new Ut(e);if("number"==typeof e)return new Gt(e);if("boolean"==typeof e)return new Xt(e);if(null===e)return new zt;if(Array.isArray(e))return new Wt(e.map(_o));if("object"==typeof e)return new Bt(e);throw new Error("Cannot refract value of type "+typeof e)}Lo[Symbol.for("nodejs.util.promisify.custom")]=async(e,t,s={})=>{if(0===t.length)return e;const n=bo(Jo,s),{toolboxCreator:r,visitorOptions:i,traverseOptions:o}=n,c=r(),a=t.map(e=>e(c)),l=Vn(a.map(vo({},"visitor")),i);await Promise.allSettled(a.map(Eo(["pre"],[])));const u=await Xn(e,l,o);return await Promise.allSettled(a.map(Eo(["post"],[]))),u},$t.prototype.ObjectElement=Bt,$t.prototype.ArrayElement=Wt,$t.prototype.RefElement=Os,$t.prototype.MemberElement=_t,$t.prototype.refract=Bo,It.prototype.Element=$t,It.prototype.cloneDeepElement=e=>xs(e);const qo=class extends Hi{constructor(e){super(e),this.element=new ao}get defaultDialectIdentifier(){return"https://json-schema.org/draft/2020-12/schema"}};const Ro=class extends zi{constructor(e){super(e),this.element=new Wt,this.element.classes.push("json-schema-prefixItems")}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=this.toRefractedElement(["document","objects","JSONSchema"],e);this.element.push(t)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const Vo=class extends ro{constructor(e){super(e),this.element=new lo}},Ho=ie(wi(["visitors","document","objects","JSONSchema","element"],"JSONSchema202012"),wi(["visitors","document","objects","JSONSchema","$visitor"],qo),Ai(["visitors","document","objects","JSONSchema","fixedFields","$recursiveAnchor"]),wi(["visitors","document","objects","JSONSchema","fixedFields","$dynamicAnchor"],io.visitors.value),Ai(["visitors","document","objects","JSONSchema","fixedFields","$recursiveRef"]),wi(["visitors","document","objects","JSONSchema","fixedFields","$dynamicRef"],io.visitors.value),wi(["visitors","document","objects","JSONSchema","fixedFields","not"],qo),wi(["visitors","document","objects","JSONSchema","fixedFields","if"],qo),wi(["visitors","document","objects","JSONSchema","fixedFields","then"],qo),wi(["visitors","document","objects","JSONSchema","fixedFields","else"],qo),wi(["visitors","document","objects","JSONSchema","fixedFields","prefixItems"],Ro),wi(["visitors","document","objects","JSONSchema","fixedFields","items"],qo),wi(["visitors","document","objects","JSONSchema","fixedFields","contains"],qo),wi(["visitors","document","objects","JSONSchema","fixedFields","additionalProperties"],qo),Ai(["visitors","document","objects","JSONSchema","fixedFields","additionalItems"]),wi(["visitors","document","objects","JSONSchema","fixedFields","propertyNames"],qo),wi(["visitors","document","objects","JSONSchema","fixedFields","unevaluatedItems"],qo),wi(["visitors","document","objects","JSONSchema","fixedFields","unevaluatedProperties"],qo),wi(["visitors","document","objects","JSONSchema","fixedFields","contentSchema"],qo),wi(["visitors","document","objects","LinkDescription","element"],"linkDescription"),wi(["visitors","document","objects","LinkDescription","$visitor"],Vo),wi(["visitors","document","objects","LinkDescription","fixedFields","targetSchema"],qo),wi(["visitors","document","objects","LinkDescription","fixedFields","hrefSchema"],qo),wi(["visitors","document","objects","LinkDescription","fixedFields","headerSchema"],qo),wi(["visitors","document","objects","LinkDescription","fixedFields","submissionSchema"],qo))(io);const Uo=e=>es(e)&&os(e,["boolean-json-schema"]),Go=e=>e instanceof ao,zo=e=>e instanceof lo,Xo=()=>{const e=new Do,t={...s,isStringElement:Yt};return e.use(uo),{predicates:t,namespace:e}},Wo=(e,{element:t="JSONSchema202012",plugins:s=[],specificationObj:n=Ho,consume:r=!1}={})=>{const i=Bo(e),o=kt(n),c=o.elementMap[t];if(!c)throw new Error(`Unknown element type: "${t}"`);const a=new(B(c,o))({specObj:o,consume:r});return zn(i,a),Lo(a.element,s,{toolboxCreator:Xo})},Ko=(e,t={})=>Wo(e,{...t,element:"JSONSchema202012"}),Yo=(e,t={})=>Wo(e,{...t,element:"linkDescription"}),Qo=Wo;return t})());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@speclynx/apidom-ns-json-schema-2020-12",
3
- "version": "4.10.0",
3
+ "version": "4.11.1",
4
4
  "description": "JSON Schema 2020-12 namespace for ApiDOM.",
5
5
  "keywords": [
6
6
  "apidom",
@@ -57,14 +57,14 @@
57
57
  "author": "Vladimir Gorej",
58
58
  "license": "Apache-2.0",
59
59
  "dependencies": {
60
- "@babel/runtime-corejs3": "^7.28.4",
61
- "@speclynx/apidom-core": "4.10.0",
62
- "@speclynx/apidom-datamodel": "4.10.0",
63
- "@speclynx/apidom-error": "4.10.0",
64
- "@speclynx/apidom-ns-json-schema-2019-09": "4.10.0",
65
- "@speclynx/apidom-traverse": "4.10.0",
60
+ "@babel/runtime-corejs3": "^7.29.7",
61
+ "@speclynx/apidom-core": "4.11.1",
62
+ "@speclynx/apidom-datamodel": "4.11.1",
63
+ "@speclynx/apidom-error": "4.11.1",
64
+ "@speclynx/apidom-ns-json-schema-2019-09": "4.11.1",
65
+ "@speclynx/apidom-traverse": "4.11.1",
66
66
  "ramda": "~0.32.0",
67
- "ramda-adjunct": "^6.0.0",
67
+ "ramda-adjunct": "^6.1.0",
68
68
  "ts-mixer": "^6.0.4"
69
69
  },
70
70
  "files": [
@@ -77,5 +77,5 @@
77
77
  "README.md",
78
78
  "CHANGELOG.md"
79
79
  ],
80
- "gitHead": "cc5b227c468c8bd1a56611f535a71a4018beebf8"
80
+ "gitHead": "76396e154f0b561793c096c852aaef9d8e01818b"
81
81
  }