@speclynx/apidom-core 1.12.2 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/NOTICE +16 -7
  3. package/README.md +102 -330
  4. package/dist/apidom-core.browser.js +13110 -10559
  5. package/dist/apidom-core.browser.min.js +1 -1
  6. package/package.json +7 -12
  7. package/src/identity/index.cjs +8 -6
  8. package/src/identity/index.mjs +6 -4
  9. package/src/index.cjs +13 -79
  10. package/src/index.mjs +3 -13
  11. package/src/merge/deepmerge.cjs +22 -20
  12. package/src/merge/deepmerge.mjs +9 -7
  13. package/src/merge/merge-right.cjs +2 -2
  14. package/src/merge/merge-right.mjs +1 -1
  15. package/src/namespace.cjs +4 -36
  16. package/src/namespace.mjs +2 -30
  17. package/src/refractor/plugins/dispatcher/index.cjs +5 -12
  18. package/src/refractor/plugins/dispatcher/index.mjs +5 -12
  19. package/src/refractor/plugins/element-identity.cjs +2 -2
  20. package/src/refractor/plugins/element-identity.mjs +2 -2
  21. package/src/refractor/plugins/semantic-element-identity.cjs +5 -10
  22. package/src/refractor/plugins/semantic-element-identity.mjs +5 -9
  23. package/src/refractor/toolbox.cjs +22 -5
  24. package/src/refractor/toolbox.mjs +25 -6
  25. package/src/specification.cjs +51 -0
  26. package/src/specification.mjs +47 -0
  27. package/src/transcluder/Transcluder.cjs +8 -8
  28. package/src/transcluder/Transcluder.mjs +1 -1
  29. package/src/transformers/from.mjs +2 -2
  30. package/src/transformers/serializers/json.cjs +2 -2
  31. package/src/transformers/serializers/json.mjs +1 -1
  32. package/src/transformers/serializers/value.cjs +50 -0
  33. package/src/transformers/serializers/value.mjs +47 -0
  34. package/src/transformers/serializers/yaml-1-2.cjs +22 -18
  35. package/src/transformers/serializers/yaml-1-2.mjs +22 -18
  36. package/src/transformers/sexprs.cjs +20 -23
  37. package/src/transformers/sexprs.mjs +20 -22
  38. package/src/transformers/to-string.mjs +2 -2
  39. package/types/apidom-core.d.ts +67 -519
  40. package/src/clone/errors/CloneError.cjs +0 -22
  41. package/src/clone/errors/CloneError.mjs +0 -19
  42. package/src/clone/errors/DeepCloneError.cjs +0 -11
  43. package/src/clone/errors/DeepCloneError.mjs +0 -6
  44. package/src/clone/errors/ShallowCloneError.cjs +0 -11
  45. package/src/clone/errors/ShallowCloneError.mjs +0 -6
  46. package/src/clone/index.cjs +0 -155
  47. package/src/clone/index.mjs +0 -146
  48. package/src/elements/Annotation.cjs +0 -23
  49. package/src/elements/Annotation.mjs +0 -20
  50. package/src/elements/Comment.cjs +0 -15
  51. package/src/elements/Comment.mjs +0 -12
  52. package/src/elements/ParseResult.cjs +0 -53
  53. package/src/elements/ParseResult.mjs +0 -50
  54. package/src/elements/SourceMap.cjs +0 -39
  55. package/src/elements/SourceMap.mjs +0 -36
  56. package/src/predicates/helpers.cjs +0 -85
  57. package/src/predicates/helpers.mjs +0 -77
  58. package/src/predicates/index.cjs +0 -208
  59. package/src/predicates/index.mjs +0 -198
  60. package/src/refractor/index.cjs +0 -46
  61. package/src/refractor/index.mjs +0 -40
  62. package/src/refractor/registration.cjs +0 -34
  63. package/src/refractor/registration.mjs +0 -19
  64. package/src/transformers/serializers/value/ast/ephemeral-array.cjs +0 -21
  65. package/src/transformers/serializers/value/ast/ephemeral-array.mjs +0 -17
  66. package/src/transformers/serializers/value/ast/ephemeral-object.cjs +0 -20
  67. package/src/transformers/serializers/value/ast/ephemeral-object.mjs +0 -16
  68. package/src/transformers/serializers/value/index.cjs +0 -85
  69. package/src/transformers/serializers/value/index.mjs +0 -80
  70. package/src/transformers/serializers/value/visitor.cjs +0 -52
  71. package/src/transformers/serializers/value/visitor.mjs +0 -47
  72. package/src/traversal/filter.cjs +0 -18
  73. package/src/traversal/filter.mjs +0 -14
  74. package/src/traversal/find.cjs +0 -19
  75. package/src/traversal/find.mjs +0 -15
  76. package/src/traversal/findAtOffset.cjs +0 -65
  77. package/src/traversal/findAtOffset.mjs +0 -60
  78. package/src/traversal/index.cjs +0 -19
  79. package/src/traversal/index.mjs +0 -7
  80. package/src/traversal/parents.cjs +0 -38
  81. package/src/traversal/parents.mjs +0 -34
  82. package/src/traversal/reject.cjs +0 -15
  83. package/src/traversal/reject.mjs +0 -10
  84. package/src/traversal/some.cjs +0 -15
  85. package/src/traversal/some.mjs +0 -10
  86. package/src/traversal/traverse.cjs +0 -60
  87. package/src/traversal/traverse.mjs +0 -53
  88. package/src/traversal/visitor.cjs +0 -123
  89. package/src/traversal/visitor.mjs +0 -115
  90. package/src/util.cjs +0 -28
  91. package/src/util.mjs +0 -24
  92. package/types/minim.d.ts +0 -236
@@ -1 +1 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.apidomCore=e():t.apidomCore=e()}(self,()=>(()=>{var t={88:(t,e,n)=>{var r=n(4700);t.exports=function(t){return r(this,t).get(t)}},155:t=>{t.exports=function(t,e){return null==t?void 0:t[e]}},195:(t,e,n)=>{var r=n(4882),s=n(8121),i=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return s(t);var e=[];for(var n in Object(t))i.call(t,n)&&"constructor"!=n&&e.push(n);return e}},353:(t,e,n)=>{var r=n(1340),s=n(3934),i=n(8861),o=n(1182),a=n(8486),c=n(3142),u=n(5853),l=n(8666),h="[object Arguments]",f="[object Array]",p="[object Object]",m=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,d,y,b){var g=c(t),v=c(e),_=g?f:a(t),E=v?f:a(e),w=(_=_==h?p:_)==p,j=(E=E==h?p:E)==p,x=_==E;if(x&&u(t)){if(!u(e))return!1;g=!0,w=!1}if(x&&!w)return b||(b=new r),g||l(t)?s(t,e,n,d,y,b):i(t,e,_,n,d,y,b);if(!(1&n)){var O=w&&m.call(t,"__wrapped__"),S=j&&m.call(e,"__wrapped__");if(O||S){var A=O?t.value():t,M=S?e.value():e;return b||(b=new r),y(A,M,n,d,b)}}return!!x&&(b||(b=new r),o(t,e,n,d,y,b))}},358:(t,e,n)=>{var r=n(6137),s=n(3283),i=n(3142),o=n(5853),a=n(9632),c=n(8666),u=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=i(t),l=!n&&s(t),h=!n&&!l&&o(t),f=!n&&!l&&!h&&c(t),p=n||l||h||f,m=p?r(t.length,String):[],d=m.length;for(var y in t)!e&&!u.call(t,y)||p&&("length"==y||h&&("offset"==y||"parent"==y)||f&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||a(y,d))||m.push(y);return m}},393:(t,e,n)=>{var r=n(8244),s=n(7979),i=n(1211);t.exports=function(t){return r(t,i,s)}},394:t=>{t.exports=class{constructor(t){this.namespace=t||new this.Namespace}serialise(t){if(!(t instanceof this.namespace.elements.Element))throw new TypeError(`Given element \`${t}\` is not an Element instance`);const e={element:t.element};t._meta&&t._meta.length>0&&(e.meta=this.serialiseObject(t.meta)),t._attributes&&t._attributes.length>0&&(e.attributes=this.serialiseObject(t.attributes));const n=this.serialiseContent(t.content);return void 0!==n&&(e.content=n),e}deserialise(t){if(!t.element)throw new Error("Given value is not an object containing an element name");const e=new(this.namespace.getElementClass(t.element));e.element!==t.element&&(e.element=t.element),t.meta&&this.deserialiseObject(t.meta,e.meta),t.attributes&&this.deserialiseObject(t.attributes,e.attributes);const n=this.deserialiseContent(t.content);return void 0===n&&null!==e.content||(e.content=n),e}serialiseContent(t){if(t instanceof this.namespace.elements.Element)return this.serialise(t);if(t instanceof this.namespace.KeyValuePair){const e={key:this.serialise(t.key)};return t.value&&(e.value=this.serialise(t.value)),e}if(t&&t.map){if(0===t.length)return;return t.map(this.serialise,this)}return t}deserialiseContent(t){if(t){if(t.element)return this.deserialise(t);if(t.key){const e=new this.namespace.KeyValuePair(this.deserialise(t.key));return t.value&&(e.value=this.deserialise(t.value)),e}if(t.map)return t.map(this.deserialise,this)}return t}serialiseObject(t){const e={};if(t.forEach((t,n)=>{t&&(e[n.toValue()]=this.serialise(t))}),0!==Object.keys(e).length)return e}deserialiseObject(t,e){Object.keys(t).forEach(n=>{e.set(n,this.deserialise(t[n]))})}}},547:t=>{t.exports=function(t){return null!=t&&"object"==typeof t}},593:(t,e,n)=>{const r=n(8631);t.exports=class extends r{constructor(t,e,n){super(t||[],e,n),this.element="ref",this.path||(this.path="element")}get path(){return this.attributes.get("path")}set path(t){this.attributes.set("path",t)}}},674:(t,e,n)=>{var r=n(7379),s=n(5387),i=n(547),o={};o["[object Float32Array]"]=o["[object Float64Array]"]=o["[object Int8Array]"]=o["[object Int16Array]"]=o["[object Int32Array]"]=o["[object Uint8Array]"]=o["[object Uint8ClampedArray]"]=o["[object Uint16Array]"]=o["[object Uint32Array]"]=!0,o["[object Arguments]"]=o["[object Array]"]=o["[object ArrayBuffer]"]=o["[object Boolean]"]=o["[object DataView]"]=o["[object Date]"]=o["[object Error]"]=o["[object Function]"]=o["[object Map]"]=o["[object Number]"]=o["[object Object]"]=o["[object RegExp]"]=o["[object Set]"]=o["[object String]"]=o["[object WeakMap]"]=!1,t.exports=function(t){return i(t)&&s(t.length)&&!!o[r(t)]}},986:(t,e,n)=>{var r=n(7379),s=n(547);t.exports=function(t){return"number"==typeof t||s(t)&&"[object Number]"==r(t)}},1112:(t,e,n)=>{var r=n(4497),s=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(r){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return s.call(e,t)?e[t]:void 0}},1129:t=>{t.exports=function(t,e){for(var n=-1,r=e.length,s=t.length;++n<r;)t[s+n]=e[n];return t}},1182:(t,e,n)=>{var r=n(393),s=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,i,o,a){var c=1&n,u=r(t),l=u.length;if(l!=r(e).length&&!c)return!1;for(var h=l;h--;){var f=u[h];if(!(c?f in e:s.call(e,f)))return!1}var p=a.get(t),m=a.get(e);if(p&&m)return p==e&&m==t;var d=!0;a.set(t,e),a.set(e,t);for(var y=c;++h<l;){var b=t[f=u[h]],g=e[f];if(i)var v=c?i(g,b,f,e,t,a):i(b,g,f,t,e,a);if(!(void 0===v?b===g||o(b,g,n,i,a):v)){d=!1;break}y||(y="constructor"==f)}if(d&&!y){var _=t.constructor,E=e.constructor;_==E||!("constructor"in t)||!("constructor"in e)||"function"==typeof _&&_ instanceof _&&"function"==typeof E&&E instanceof E||(d=!1)}return a.delete(t),a.delete(e),d}},1211:(t,e,n)=>{var r=n(358),s=n(195),i=n(6529);t.exports=function(t){return i(t)?r(t):s(t)}},1340:(t,e,n)=>{var r=n(1386),s=n(4103),i=n(1779),o=n(4162),a=n(7462),c=n(6638);function u(t){var e=this.__data__=new r(t);this.size=e.size}u.prototype.clear=s,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=c,t.exports=u},1386:(t,e,n)=>{var r=n(2393),s=n(2049),i=n(7144),o=n(7452),a=n(3964);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=s,c.prototype.get=i,c.prototype.has=o,c.prototype.set=a,t.exports=c},1517:t=>{t.exports=function(t){if("function"!=typeof t)throw new TypeError("Expected a function");return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}},1580:t=>{t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},1623:(t,e,n)=>{var r=n(8942).Uint8Array;t.exports=r},1779:t=>{t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},1877:t=>{t.exports=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}},1950:(t,e,n)=>{var r=n(8942)["__core-js_shared__"];t.exports=r},2049:(t,e,n)=>{var r=n(7034),s=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=r(e,t);return!(n<0)&&(n==e.length-1?e.pop():s.call(e,n,1),--this.size,!0)}},2306:(t,e,n)=>{t=n.nmd(t);var r=n(4967),s=e&&!e.nodeType&&e,i=s&&t&&!t.nodeType&&t,o=i&&i.exports===s&&r.process,a=function(){try{var t=i&&i.require&&i.require("util").types;return t||o&&o.binding&&o.binding("util")}catch(t){}}();t.exports=a},2322:t=>{class e{constructor(t,e){this.key=t,this.value=e}clone(){const t=new e;return this.key&&(t.key=this.key.clone()),this.value&&(t.value=this.value.clone()),t}}t.exports=e},2393:t=>{t.exports=function(){this.__data__=[],this.size=0}},2536:(t,e,n)=>{const r=n(8631);t.exports=class extends r{constructor(t,e,n){super(t,e,n),this.element="number"}primitive(){return"number"}}},2555:(t,e,n)=>{const r=n(8631);t.exports=class extends r{constructor(t,e,n){super(t,e,n),this.element="boolean"}primitive(){return"boolean"}}},2563:(t,e,n)=>{var r=n(7379),s=n(547);t.exports=function(t){return!0===t||!1===t||s(t)&&"[object Boolean]"==r(t)}},3004:(t,e,n)=>{const r=n(8631);t.exports=class extends r{constructor(t,e,n){super(t||null,e,n),this.element="null"}primitive(){return"null"}set(){return new Error("Cannot set the value of null")}}},3103:(t,e,n)=>{var r=n(4715)(n(8942),"DataView");t.exports=r},3142:t=>{var e=Array.isArray;t.exports=e},3148:(t,e,n)=>{const r=n(394);t.exports=class extends r{serialise(t){if(!(t instanceof this.namespace.elements.Element))throw new TypeError(`Given element \`${t}\` is not an Element instance`);let e;t._attributes&&t.attributes.get("variable")&&(e=t.attributes.get("variable"));const n={element:t.element};t._meta&&t._meta.length>0&&(n.meta=this.serialiseObject(t.meta));const r="enum"===t.element||-1!==t.attributes.keys().indexOf("enumerations");if(r){const e=this.enumSerialiseAttributes(t);e&&(n.attributes=e)}else if(t._attributes&&t._attributes.length>0){let{attributes:r}=t;r.get("metadata")&&(r=r.clone(),r.set("meta",r.get("metadata")),r.remove("metadata")),"member"===t.element&&e&&(r=r.clone(),r.remove("variable")),r.length>0&&(n.attributes=this.serialiseObject(r))}if(r)n.content=this.enumSerialiseContent(t,n);else if(this[`${t.element}SerialiseContent`])n.content=this[`${t.element}SerialiseContent`](t,n);else if(void 0!==t.content){let r;e&&t.content.key?(r=t.content.clone(),r.key.attributes.set("variable",e),r=this.serialiseContent(r)):r=this.serialiseContent(t.content),this.shouldSerialiseContent(t,r)&&(n.content=r)}else this.shouldSerialiseContent(t,t.content)&&t instanceof this.namespace.elements.Array&&(n.content=[]);return n}shouldSerialiseContent(t,e){return"parseResult"===t.element||"httpRequest"===t.element||"httpResponse"===t.element||"category"===t.element||"link"===t.element||void 0!==e&&(!Array.isArray(e)||0!==e.length)}refSerialiseContent(t,e){return delete e.attributes,{href:t.toValue(),path:t.path.toValue()}}sourceMapSerialiseContent(t){return t.toValue()}dataStructureSerialiseContent(t){return[this.serialiseContent(t.content)]}enumSerialiseAttributes(t){const e=t.attributes.clone(),n=e.remove("enumerations")||new this.namespace.elements.Array([]),r=e.get("default");let s=e.get("samples")||new this.namespace.elements.Array([]);if(r&&r.content&&(r.content.attributes&&r.content.attributes.remove("typeAttributes"),e.set("default",new this.namespace.elements.Array([r.content]))),s.forEach(t=>{t.content&&t.content.element&&t.content.attributes.remove("typeAttributes")}),t.content&&0!==n.length&&s.unshift(t.content),s=s.map(t=>t instanceof this.namespace.elements.Array?[t]:new this.namespace.elements.Array([t.content])),s.length&&e.set("samples",s),e.length>0)return this.serialiseObject(e)}enumSerialiseContent(t){if(t._attributes){const e=t.attributes.get("enumerations");if(e&&e.length>0)return e.content.map(t=>{const e=t.clone();return e.attributes.remove("typeAttributes"),this.serialise(e)})}if(t.content){const e=t.content.clone();return e.attributes.remove("typeAttributes"),[this.serialise(e)]}return[]}deserialise(t){if("string"==typeof t)return new this.namespace.elements.String(t);if("number"==typeof t)return new this.namespace.elements.Number(t);if("boolean"==typeof t)return new this.namespace.elements.Boolean(t);if(null===t)return new this.namespace.elements.Null;if(Array.isArray(t))return new this.namespace.elements.Array(t.map(this.deserialise,this));const e=this.namespace.getElementClass(t.element),n=new e;n.element!==t.element&&(n.element=t.element),t.meta&&this.deserialiseObject(t.meta,n.meta),t.attributes&&this.deserialiseObject(t.attributes,n.attributes);const r=this.deserialiseContent(t.content);if(void 0===r&&null!==n.content||(n.content=r),"enum"===n.element){n.content&&n.attributes.set("enumerations",n.content);let t=n.attributes.get("samples");if(n.attributes.remove("samples"),t){const r=t;t=new this.namespace.elements.Array,r.forEach(r=>{r.forEach(r=>{const s=new e(r);s.element=n.element,t.push(s)})});const s=t.shift();n.content=s?s.content:void 0,n.attributes.set("samples",t)}else n.content=void 0;let r=n.attributes.get("default");if(r&&r.length>0){r=r.get(0);const t=new e(r);t.element=n.element,n.attributes.set("default",t)}}else if("dataStructure"===n.element&&Array.isArray(n.content))[n.content]=n.content;else if("category"===n.element){const t=n.attributes.get("meta");t&&(n.attributes.set("metadata",t),n.attributes.remove("meta"))}else"member"===n.element&&n.key&&n.key._attributes&&n.key._attributes.getValue("variable")&&(n.attributes.set("variable",n.key.attributes.get("variable")),n.key.attributes.remove("variable"));return n}serialiseContent(t){if(t instanceof this.namespace.elements.Element)return this.serialise(t);if(t instanceof this.namespace.KeyValuePair){const e={key:this.serialise(t.key)};return t.value&&(e.value=this.serialise(t.value)),e}return t&&t.map?t.map(this.serialise,this):t}deserialiseContent(t){if(t){if(t.element)return this.deserialise(t);if(t.key){const e=new this.namespace.KeyValuePair(this.deserialise(t.key));return t.value&&(e.value=this.deserialise(t.value)),e}if(t.map)return t.map(this.deserialise,this)}return t}shouldRefract(t){return!!(t._attributes&&t.attributes.keys().length||t._meta&&t.meta.keys().length)||"enum"!==t.element&&(t.element!==t.primitive()||"member"===t.element)}convertKeyToRefract(t,e){return this.shouldRefract(e)?this.serialise(e):"enum"===e.element?this.serialiseEnum(e):"array"===e.element?e.map(e=>this.shouldRefract(e)||"default"===t?this.serialise(e):"array"===e.element||"object"===e.element||"enum"===e.element?e.children.map(t=>this.serialise(t)):e.toValue()):"object"===e.element?(e.content||[]).map(this.serialise,this):e.toValue()}serialiseEnum(t){return t.children.map(t=>this.serialise(t))}serialiseObject(t){const e={};return t.forEach((t,n)=>{if(t){const r=n.toValue();e[r]=this.convertKeyToRefract(r,t)}}),e}deserialiseObject(t,e){Object.keys(t).forEach(n=>{e.set(n,this.deserialise(t[n]))})}}},3212:(t,e,n)=>{var r=n(8250),s=n(1877),i=n(8006);function o(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new r;++e<n;)this.add(t[e])}o.prototype.add=o.prototype.push=s,o.prototype.has=i,t.exports=o},3283:(t,e,n)=>{var r=n(6027),s=n(547),i=Object.prototype,o=i.hasOwnProperty,a=i.propertyIsEnumerable,c=r(function(){return arguments}())?r:function(t){return s(t)&&o.call(t,"callee")&&!a.call(t,"callee")};t.exports=c},3305:(t,e,n)=>{var r=n(4497);t.exports=function(){this.__data__=r?r(null):{},this.size=0}},3311:(t,e,n)=>{const r=n(1517),s=n(4123);class i extends s{map(t,e){return this.elements.map(n=>t.bind(e)(n.value,n.key,n))}filter(t,e){return new i(this.elements.filter(n=>t.bind(e)(n.value,n.key,n)))}reject(t,e){return this.filter(r(t.bind(e)))}forEach(t,e){return this.elements.forEach((n,r)=>{t.bind(e)(n.value,n.key,n,r)})}keys(){return this.map((t,e)=>e.toValue())}values(){return this.map(t=>t.toValue())}}t.exports=i},3655:(t,e,n)=>{var r=n(7379),s=n(1580);t.exports=function(t){if(!s(t))return!1;var e=r(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},3766:t=>{t.exports=function(t,e){return function(n){return t(e(n))}}},3934:(t,e,n)=>{var r=n(3212),s=n(6465),i=n(5568);t.exports=function(t,e,n,o,a,c){var u=1&n,l=t.length,h=e.length;if(l!=h&&!(u&&h>l))return!1;var f=c.get(t),p=c.get(e);if(f&&p)return f==e&&p==t;var m=-1,d=!0,y=2&n?new r:void 0;for(c.set(t,e),c.set(e,t);++m<l;){var b=t[m],g=e[m];if(o)var v=u?o(g,b,m,e,t,c):o(b,g,m,t,e,c);if(void 0!==v){if(v)continue;d=!1;break}if(y){if(!s(e,function(t,e){if(!i(y,e)&&(b===t||a(b,t,n,o,c)))return y.push(e)})){d=!1;break}}else if(b!==g&&!a(b,g,n,o,c)){d=!1;break}}return c.delete(t),c.delete(e),d}},3964:(t,e,n)=>{var r=n(7034);t.exports=function(t,e){var n=this.__data__,s=r(n,t);return s<0?(++this.size,n.push([t,e])):n[s][1]=e,this}},4066:t=>{var e=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return e.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},4103:(t,e,n)=>{var r=n(1386);t.exports=function(){this.__data__=new r,this.size=0}},4123:(t,e,n)=>{const r=n(1517);function s(t){return"string"==typeof t?e=>e.element===t:t.constructor&&t.extend?e=>e instanceof t:t}class i{constructor(t){this.elements=t||[]}toValue(){return this.elements.map(t=>t.toValue())}map(t,e){return this.elements.map(t,e)}flatMap(t,e){return this.map(t,e).reduce((t,e)=>t.concat(e),[])}compactMap(t,e){const n=[];return this.forEach(r=>{const s=t.bind(e)(r);s&&n.push(s)}),n}filter(t,e){return t=s(t),new i(this.elements.filter(t,e))}reject(t,e){return t=s(t),new i(this.elements.filter(r(t),e))}find(t,e){return t=s(t),this.elements.find(t,e)}forEach(t,e){this.elements.forEach(t,e)}reduce(t,e){return this.elements.reduce(t,e)}includes(t){return this.elements.some(e=>e.equals(t))}shift(){return this.elements.shift()}unshift(t){this.elements.unshift(this.refract(t))}push(t){return this.elements.push(this.refract(t)),this}add(t){this.push(t)}get(t){return this.elements[t]}getValue(t){const e=this.elements[t];if(e)return e.toValue()}get length(){return this.elements.length}get isEmpty(){return 0===this.elements.length}get first(){return this.elements[0]}}"undefined"!=typeof Symbol&&(i.prototype[Symbol.iterator]=function(){return this.elements[Symbol.iterator]()}),t.exports=i},4162:t=>{t.exports=function(t){return this.__data__.get(t)}},4279:t=>{"use strict";var e=(()=>{var t=Object.defineProperty,e=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,r=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable,o=(e,n,r)=>n in e?t(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r,a=(t,e)=>{for(var n in e||(e={}))s.call(e,n)&&o(t,n,e[n]);if(r)for(var n of r(e))i.call(e,n)&&o(t,n,e[n]);return t},c=(t,e,n)=>o(t,"symbol"!=typeof e?e+"":e,n),u={};((e,n)=>{for(var r in n)t(e,r,{get:n[r],enumerable:!0})})(u,{DEFAULT_OPTIONS:()=>h,DEFAULT_UUID_LENGTH:()=>l,default:()=>m});var l=6,h={dictionary:"alphanum",shuffle:!0,debug:!1,length:l,counter:0},f=class{constructor(t={}){c(this,"counter"),c(this,"debug"),c(this,"dict"),c(this,"version"),c(this,"dictIndex",0),c(this,"dictRange",[]),c(this,"lowerBound",0),c(this,"upperBound",0),c(this,"dictLength",0),c(this,"uuidLength"),c(this,"_digit_first_ascii",48),c(this,"_digit_last_ascii",58),c(this,"_alpha_lower_first_ascii",97),c(this,"_alpha_lower_last_ascii",123),c(this,"_hex_last_ascii",103),c(this,"_alpha_upper_first_ascii",65),c(this,"_alpha_upper_last_ascii",91),c(this,"_number_dict_ranges",{digits:[this._digit_first_ascii,this._digit_last_ascii]}),c(this,"_alpha_dict_ranges",{lowerCase:[this._alpha_lower_first_ascii,this._alpha_lower_last_ascii],upperCase:[this._alpha_upper_first_ascii,this._alpha_upper_last_ascii]}),c(this,"_alpha_lower_dict_ranges",{lowerCase:[this._alpha_lower_first_ascii,this._alpha_lower_last_ascii]}),c(this,"_alpha_upper_dict_ranges",{upperCase:[this._alpha_upper_first_ascii,this._alpha_upper_last_ascii]}),c(this,"_alphanum_dict_ranges",{digits:[this._digit_first_ascii,this._digit_last_ascii],lowerCase:[this._alpha_lower_first_ascii,this._alpha_lower_last_ascii],upperCase:[this._alpha_upper_first_ascii,this._alpha_upper_last_ascii]}),c(this,"_alphanum_lower_dict_ranges",{digits:[this._digit_first_ascii,this._digit_last_ascii],lowerCase:[this._alpha_lower_first_ascii,this._alpha_lower_last_ascii]}),c(this,"_alphanum_upper_dict_ranges",{digits:[this._digit_first_ascii,this._digit_last_ascii],upperCase:[this._alpha_upper_first_ascii,this._alpha_upper_last_ascii]}),c(this,"_hex_dict_ranges",{decDigits:[this._digit_first_ascii,this._digit_last_ascii],alphaDigits:[this._alpha_lower_first_ascii,this._hex_last_ascii]}),c(this,"_dict_ranges",{_number_dict_ranges:this._number_dict_ranges,_alpha_dict_ranges:this._alpha_dict_ranges,_alpha_lower_dict_ranges:this._alpha_lower_dict_ranges,_alpha_upper_dict_ranges:this._alpha_upper_dict_ranges,_alphanum_dict_ranges:this._alphanum_dict_ranges,_alphanum_lower_dict_ranges:this._alphanum_lower_dict_ranges,_alphanum_upper_dict_ranges:this._alphanum_upper_dict_ranges,_hex_dict_ranges:this._hex_dict_ranges}),c(this,"log",(...t)=>{const e=[...t];e[0]="[short-unique-id] ".concat(t[0]),!0!==this.debug||"undefined"==typeof console||null===console||console.log(...e)}),c(this,"_normalizeDictionary",(t,e)=>{let n;if(t&&Array.isArray(t)&&t.length>1)n=t;else{n=[],this.dictIndex=0;const e="_".concat(t,"_dict_ranges"),r=this._dict_ranges[e];let s=0;for(const[,t]of Object.entries(r)){const[e,n]=t;s+=Math.abs(n-e)}n=new Array(s);let i=0;for(const[,t]of Object.entries(r)){this.dictRange=t,this.lowerBound=this.dictRange[0],this.upperBound=this.dictRange[1];const e=this.lowerBound<=this.upperBound,r=this.lowerBound,s=this.upperBound;if(e)for(let t=r;t<s;t++)n[i++]=String.fromCharCode(t),this.dictIndex=t;else for(let t=r;t>s;t--)n[i++]=String.fromCharCode(t),this.dictIndex=t}n.length=i}if(e){for(let t=n.length-1;t>0;t--){const e=Math.floor(Math.random()*(t+1));[n[t],n[e]]=[n[e],n[t]]}}return n}),c(this,"setDictionary",(t,e)=>{this.dict=this._normalizeDictionary(t,e),this.dictLength=this.dict.length,this.setCounter(0)}),c(this,"seq",()=>this.sequentialUUID()),c(this,"sequentialUUID",()=>{const t=this.dictLength,e=this.dict;let n=this.counter;const r=[];do{const s=n%t;n=Math.trunc(n/t),r.push(e[s])}while(0!==n);const s=r.join("");return this.counter+=1,s}),c(this,"rnd",(t=this.uuidLength||l)=>this.randomUUID(t)),c(this,"randomUUID",(t=this.uuidLength||l)=>{if(null==t||t<1)throw new Error("Invalid UUID Length Provided");const e=new Array(t),n=this.dictLength,r=this.dict;for(let s=0;s<t;s++){const t=Math.floor(Math.random()*n);e[s]=r[t]}return e.join("")}),c(this,"fmt",(t,e)=>this.formattedUUID(t,e)),c(this,"formattedUUID",(t,e)=>{const n={$r:this.randomUUID,$s:this.sequentialUUID,$t:this.stamp};return t.replace(/\$[rs]\d{0,}|\$t0|\$t[1-9]\d{1,}/g,t=>{const r=t.slice(0,2),s=Number.parseInt(t.slice(2),10);return"$s"===r?n[r]().padStart(s,"0"):"$t"===r&&e?n[r](s,e):n[r](s)})}),c(this,"availableUUIDs",(t=this.uuidLength)=>Number.parseFloat(([...new Set(this.dict)].length**t).toFixed(0))),c(this,"_collisionCache",new Map),c(this,"approxMaxBeforeCollision",(t=this.availableUUIDs(this.uuidLength))=>{const e=t,n=this._collisionCache.get(e);if(void 0!==n)return n;const r=Number.parseFloat(Math.sqrt(Math.PI/2*t).toFixed(20));return this._collisionCache.set(e,r),r}),c(this,"collisionProbability",(t=this.availableUUIDs(this.uuidLength),e=this.uuidLength)=>Number.parseFloat((this.approxMaxBeforeCollision(t)/this.availableUUIDs(e)).toFixed(20))),c(this,"uniqueness",(t=this.availableUUIDs(this.uuidLength))=>{const e=Number.parseFloat((1-this.approxMaxBeforeCollision(t)/t).toFixed(20));return e>1?1:e<0?0:e}),c(this,"getVersion",()=>this.version),c(this,"stamp",(t,e)=>{const n=Math.floor(+(e||new Date)/1e3).toString(16);if("number"==typeof t&&0===t)return n;if("number"!=typeof t||t<10)throw new Error(["Param finalLength must be a number greater than or equal to 10,","or 0 if you want the raw hexadecimal timestamp"].join("\n"));const r=t-9,s=Math.round(Math.random()*(r>15?15:r)),i=this.randomUUID(r);return"".concat(i.substring(0,s)).concat(n).concat(i.substring(s)).concat(s.toString(16))}),c(this,"parseStamp",(t,e)=>{if(e&&!/t0|t[1-9]\d{1,}/.test(e))throw new Error("Cannot extract date from a formated UUID with no timestamp in the format");const n=e?e.replace(/\$[rs]\d{0,}|\$t0|\$t[1-9]\d{1,}/g,t=>{const e={$r:t=>[...Array(t)].map(()=>"r").join(""),$s:t=>[...Array(t)].map(()=>"s").join(""),$t:t=>[...Array(t)].map(()=>"t").join("")},n=t.slice(0,2),r=Number.parseInt(t.slice(2),10);return e[n](r)}).replace(/^(.*?)(t{8,})(.*)$/g,(e,n,r)=>t.substring(n.length,n.length+r.length)):t;if(8===n.length)return new Date(1e3*Number.parseInt(n,16));if(n.length<10)throw new Error("Stamp length invalid");const r=Number.parseInt(n.substring(n.length-1),16);return new Date(1e3*Number.parseInt(n.substring(r,r+8),16))}),c(this,"setCounter",t=>{this.counter=t}),c(this,"validate",(t,e)=>{const n=e?this._normalizeDictionary(e):this.dict;return t.split("").every(t=>n.includes(t))});const e=a(a({},h),t);this.counter=0,this.debug=!1,this.dict=[],this.version="5.3.2";const{dictionary:n,shuffle:r,length:s,counter:i}=e;this.uuidLength=s,this.setDictionary(n,r),this.setCounter(i),this.debug=e.debug,this.log(this.dict),this.log("Generator instantiated with Dictionary Size ".concat(this.dictLength," and counter set to ").concat(this.counter)),this.log=this.log.bind(this),this.setDictionary=this.setDictionary.bind(this),this.setCounter=this.setCounter.bind(this),this.seq=this.seq.bind(this),this.sequentialUUID=this.sequentialUUID.bind(this),this.rnd=this.rnd.bind(this),this.randomUUID=this.randomUUID.bind(this),this.fmt=this.fmt.bind(this),this.formattedUUID=this.formattedUUID.bind(this),this.availableUUIDs=this.availableUUIDs.bind(this),this.approxMaxBeforeCollision=this.approxMaxBeforeCollision.bind(this),this.collisionProbability=this.collisionProbability.bind(this),this.uniqueness=this.uniqueness.bind(this),this.getVersion=this.getVersion.bind(this),this.stamp=this.stamp.bind(this),this.parseStamp=this.parseStamp.bind(this)}};c(f,"default",f);var p,m=f;return p=u,((r,i,o,a)=>{if(i&&"object"==typeof i||"function"==typeof i)for(let c of n(i))s.call(r,c)||c===o||t(r,c,{get:()=>i[c],enumerable:!(a=e(i,c))||a.enumerable});return r})(t({},"__esModule",{value:!0}),p)})();t.exports=e.default,"undefined"!=typeof window&&(e=e.default)},4497:(t,e,n)=>{var r=n(4715)(Object,"create");t.exports=r},4512:(t,e,n)=>{var r=n(4715)(n(8942),"Set");t.exports=r},4687:(t,e,n)=>{var r=n(353),s=n(547);t.exports=function t(e,n,i,o,a){return e===n||(null==e||null==n||!s(e)&&!s(n)?e!=e&&n!=n:r(e,n,i,o,t,a))}},4700:(t,e,n)=>{var r=n(9067);t.exports=function(t,e){var n=t.__data__;return r(e)?n["string"==typeof e?"string":"hash"]:n.map}},4715:(t,e,n)=>{var r=n(9624),s=n(155);t.exports=function(t,e){var n=s(t,e);return r(n)?n:void 0}},4732:(t,e,n)=>{var r=n(4700);t.exports=function(t){return r(this,t).has(t)}},4759:(t,e,n)=>{var r,s=n(1950),i=(r=/[^.]+$/.exec(s&&s.keys&&s.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";t.exports=function(t){return!!i&&i in t}},4772:t=>{t.exports=function(){return!1}},4882:t=>{var e=Object.prototype;t.exports=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||e)}},4967:(t,e,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;t.exports=r},5071:(t,e,n)=>{var r=n(4497);t.exports=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=r&&void 0===e?"__lodash_hash_undefined__":e,this}},5098:(t,e,n)=>{var r=n(3305),s=n(9361),i=n(1112),o=n(5276),a=n(5071);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=s,c.prototype.get=i,c.prototype.has=o,c.prototype.set=a,t.exports=c},5276:(t,e,n)=>{var r=n(4497),s=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return r?void 0!==e[t]:s.call(e,t)}},5387:t=>{t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},5568:t=>{t.exports=function(t,e){return t.has(e)}},5642:(t,e,n)=>{const r=n(1517),s=n(1580),i=n(9796),o=n(7309),a=n(3311);t.exports=class extends i{constructor(t,e,n){super(t||[],e,n),this.element="object"}primitive(){return"object"}toValue(){return this.content.reduce((t,e)=>(t[e.key.toValue()]=e.value?e.value.toValue():void 0,t),{})}get(t){const e=this.getMember(t);if(e)return e.value}getMember(t){if(void 0!==t)return this.content.find(e=>e.key.toValue()===t)}remove(t){let e=null;return this.content=this.content.filter(n=>n.key.toValue()!==t||(e=n,!1)),e}getKey(t){const e=this.getMember(t);if(e)return e.key}set(t,e){if(s(t))return Object.keys(t).forEach(e=>{this.set(e,t[e])}),this;const n=t,r=this.getMember(n);return r?r.value=e:this.content.push(new o(n,e)),this}keys(){return this.content.map(t=>t.key.toValue())}values(){return this.content.map(t=>t.value.toValue())}hasKey(t){return this.content.some(e=>e.key.equals(t))}items(){return this.content.map(t=>[t.key.toValue(),t.value.toValue()])}map(t,e){return this.content.map(n=>t.bind(e)(n.value,n.key,n))}compactMap(t,e){const n=[];return this.forEach((r,s,i)=>{const o=t.bind(e)(r,s,i);o&&n.push(o)}),n}filter(t,e){return new a(this.content).filter(t,e)}reject(t,e){return this.filter(r(t),e)}forEach(t,e){return this.content.forEach(n=>t.bind(e)(n.value,n.key,n))}}},5650:(t,e,n)=>{var r=n(8942).Symbol;t.exports=r},5681:(t,e,n)=>{var r=n(4700);t.exports=function(t){var e=r(this,t).delete(t);return this.size-=e?1:0,e}},5735:(t,e,n)=>{const r=n(9310),s=n(8138),i=n(986),o=n(2563),a=n(1580),c=n(394),u=n(7547);class l{constructor(t){this.elementMap={},this.elementDetection=[],this.Element=u.Element,this.KeyValuePair=u.KeyValuePair,t&&t.noDefault||this.useDefault(),this._attributeElementKeys=[],this._attributeElementArrayKeys=[]}use(t){return t.namespace&&t.namespace({base:this}),t.load&&t.load({base:this}),this}useDefault(){return this.register("null",u.NullElement).register("string",u.StringElement).register("number",u.NumberElement).register("boolean",u.BooleanElement).register("array",u.ArrayElement).register("object",u.ObjectElement).register("member",u.MemberElement).register("ref",u.RefElement).register("link",u.LinkElement),this.detect(r,u.NullElement,!1).detect(s,u.StringElement,!1).detect(i,u.NumberElement,!1).detect(o,u.BooleanElement,!1).detect(Array.isArray,u.ArrayElement,!1).detect(a,u.ObjectElement,!1),this}register(t,e){return this._elements=void 0,this.elementMap[t]=e,this}unregister(t){return this._elements=void 0,delete this.elementMap[t],this}detect(t,e,n){return void 0===n||n?this.elementDetection.unshift([t,e]):this.elementDetection.push([t,e]),this}toElement(t){if(t instanceof this.Element)return t;let e;for(let n=0;n<this.elementDetection.length;n+=1){const r=this.elementDetection[n][0],s=this.elementDetection[n][1];if(r(t)){e=new s(t);break}}return e}getElementClass(t){const e=this.elementMap[t];return void 0===e?this.Element:e}fromRefract(t){return this.serialiser.deserialise(t)}toRefract(t){return this.serialiser.serialise(t)}get elements(){return void 0===this._elements&&(this._elements={Element:this.Element},Object.keys(this.elementMap).forEach(t=>{const e=t[0].toUpperCase()+t.substr(1);this._elements[e]=this.elementMap[t]})),this._elements}get serialiser(){return new c(this)}}c.prototype.Namespace=l,t.exports=l},5853:(t,e,n)=>{t=n.nmd(t);var r=n(8942),s=n(4772),i=e&&!e.nodeType&&e,o=i&&t&&!t.nodeType&&t,a=o&&o.exports===i?r.Buffer:void 0,c=(a?a.isBuffer:void 0)||s;t.exports=c},5894:t=>{t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}},6027:(t,e,n)=>{var r=n(7379),s=n(547);t.exports=function(t){return s(t)&&"[object Arguments]"==r(t)}},6137:t=>{t.exports=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}},6285:t=>{t.exports=function(t,e){return t===e||t!=t&&e!=e}},6343:(t,e,n)=>{var r=n(4687);t.exports=function(t,e){return r(t,e)}},6465:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}},6529:(t,e,n)=>{var r=n(3655),s=n(5387);t.exports=function(t){return null!=t&&s(t.length)&&!r(t)}},6638:(t,e,n)=>{var r=n(1386),s=n(9770),i=n(8250);t.exports=function(t,e){var n=this.__data__;if(n instanceof r){var o=n.__data__;if(!s||o.length<199)return o.push([t,e]),this.size=++n.size,this;n=this.__data__=new i(o)}return n.set(t,e),this.size=n.size,this}},7034:(t,e,n)=>{var r=n(6285);t.exports=function(t,e){for(var n=t.length;n--;)if(r(t[n][0],e))return n;return-1}},7144:(t,e,n)=>{var r=n(7034);t.exports=function(t){var e=this.__data__,n=r(e,t);return n<0?void 0:e[n][1]}},7309:(t,e,n)=>{const r=n(2322),s=n(8631);t.exports=class extends s{constructor(t,e,n,s){super(new r,n,s),this.element="member",this.key=t,this.value=e}get key(){return this.content.key}set key(t){this.content.key=this.refract(t)}get value(){return this.content.value}set value(t){this.content.value=this.refract(t)}}},7379:(t,e,n)=>{var r=n(5650),s=n(8870),i=n(9005),o=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":o&&o in Object(t)?s(t):i(t)}},7452:(t,e,n)=>{var r=n(7034);t.exports=function(t){return r(this.__data__,t)>-1}},7462:t=>{t.exports=function(t){return this.__data__.has(t)}},7547:(t,e,n)=>{const r=n(8631),s=n(3004),i=n(8712),o=n(2536),a=n(2555),c=n(9796),u=n(7309),l=n(5642),h=n(9620),f=n(593),p=n(4123),m=n(3311),d=n(2322);function y(t){if(t instanceof r)return t;if("string"==typeof t)return new i(t);if("number"==typeof t)return new o(t);if("boolean"==typeof t)return new a(t);if(null===t)return new s;if(Array.isArray(t))return new c(t.map(y));if("object"==typeof t){return new l(t)}return t}r.prototype.ObjectElement=l,r.prototype.RefElement=f,r.prototype.MemberElement=u,r.prototype.refract=y,p.prototype.refract=y,t.exports={Element:r,NullElement:s,StringElement:i,NumberElement:o,BooleanElement:a,ArrayElement:c,MemberElement:u,ObjectElement:l,LinkElement:h,RefElement:f,refract:y,ArraySlice:p,ObjectSlice:m,KeyValuePair:d}},7979:(t,e,n)=>{var r=n(9847),s=n(9306),i=Object.prototype.propertyIsEnumerable,o=Object.getOwnPropertySymbols,a=o?function(t){return null==t?[]:(t=Object(t),r(o(t),function(e){return i.call(t,e)}))}:s;t.exports=a},8006:t=>{t.exports=function(t){return this.__data__.has(t)}},8121:(t,e,n)=>{var r=n(3766)(Object.keys,Object);t.exports=r},8138:(t,e,n)=>{var r=n(7379),s=n(3142),i=n(547);t.exports=function(t){return"string"==typeof t||!s(t)&&i(t)&&"[object String]"==r(t)}},8244:(t,e,n)=>{var r=n(1129),s=n(3142);t.exports=function(t,e,n){var i=e(t);return s(t)?i:r(i,n(t))}},8250:(t,e,n)=>{var r=n(9753),s=n(5681),i=n(88),o=n(4732),a=n(9068);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=s,c.prototype.get=i,c.prototype.has=o,c.prototype.set=a,t.exports=c},8326:(t,e,n)=>{const r=n(5735),s=n(7547);e.g$=r,e.KeyValuePair=n(2322),e.G6=s.ArraySlice,e.ot=s.ObjectSlice,e.Hg=s.Element,e.Om=s.StringElement,e.kT=s.NumberElement,e.bd=s.BooleanElement,e.Os=s.NullElement,e.wE=s.ArrayElement,e.Sh=s.ObjectElement,e.Pr=s.MemberElement,e.sI=s.RefElement,e.Ft=s.LinkElement,e.e=s.refract,n(394),n(3148)},8486:(t,e,n)=>{var r=n(3103),s=n(9770),i=n(9413),o=n(4512),a=n(9270),c=n(7379),u=n(4066),l="[object Map]",h="[object Promise]",f="[object Set]",p="[object WeakMap]",m="[object DataView]",d=u(r),y=u(s),b=u(i),g=u(o),v=u(a),_=c;(r&&_(new r(new ArrayBuffer(1)))!=m||s&&_(new s)!=l||i&&_(i.resolve())!=h||o&&_(new o)!=f||a&&_(new a)!=p)&&(_=function(t){var e=c(t),n="[object Object]"==e?t.constructor:void 0,r=n?u(n):"";if(r)switch(r){case d:return m;case y:return l;case b:return h;case g:return f;case v:return p}return e}),t.exports=_},8631:(t,e,n)=>{const r=n(6343),s=n(2322),i=n(4123);class o{constructor(t,e,n){e&&(this.meta=e),n&&(this.attributes=n),this.content=t}freeze(){Object.isFrozen(this)||(this._meta&&(this.meta.parent=this,this.meta.freeze()),this._attributes&&(this.attributes.parent=this,this.attributes.freeze()),this.children.forEach(t=>{t.parent=this,t.freeze()},this),this.content&&Array.isArray(this.content)&&Object.freeze(this.content),Object.freeze(this))}primitive(){}clone(){const t=new this.constructor;return t.element=this.element,this.meta.length&&(t._meta=this.meta.clone()),this.attributes.length&&(t._attributes=this.attributes.clone()),this.content?this.content.clone?t.content=this.content.clone():Array.isArray(this.content)?t.content=this.content.map(t=>t.clone()):t.content=this.content:t.content=this.content,t}toValue(){return this.content instanceof o?this.content.toValue():this.content instanceof s?{key:this.content.key.toValue(),value:this.content.value?this.content.value.toValue():void 0}:this.content&&this.content.map?this.content.map(t=>t.toValue(),this):this.content}toRef(t){if(""===this.id.toValue())throw Error("Cannot create reference to an element that does not contain an ID");const e=new this.RefElement(this.id.toValue());return t&&(e.path=t),e}findRecursive(...t){if(arguments.length>1&&!this.isFrozen)throw new Error("Cannot find recursive with multiple element names without first freezing the element. Call `element.freeze()`");const e=t.pop();let n=new i;const r=(t,e)=>(t.push(e),t),o=(t,n)=>{n.element===e&&t.push(n);const i=n.findRecursive(e);return i&&i.reduce(r,t),n.content instanceof s&&(n.content.key&&o(t,n.content.key),n.content.value&&o(t,n.content.value)),t};return this.content&&(this.content.element&&o(n,this.content),Array.isArray(this.content)&&this.content.reduce(o,n)),t.isEmpty||(n=n.filter(e=>{let n=e.parents.map(t=>t.element);for(const e in t){const r=t[e],s=n.indexOf(r);if(-1===s)return!1;n=n.splice(0,s)}return!0})),n}set(t){return this.content=t,this}equals(t){return r(this.toValue(),t)}getMetaProperty(t,e){if(!this.meta.hasKey(t)){if(this.isFrozen){const t=this.refract(e);return t.freeze(),t}this.meta.set(t,e)}return this.meta.get(t)}setMetaProperty(t,e){this.meta.set(t,e)}get element(){return this._storedElement||"element"}set element(t){this._storedElement=t}get content(){return this._content}set content(t){if(t instanceof o)this._content=t;else if(t instanceof i)this.content=t.elements;else if("string"==typeof t||"number"==typeof t||"boolean"==typeof t||"null"===t||null==t)this._content=t;else if(t instanceof s)this._content=t;else if(Array.isArray(t))this._content=t.map(this.refract);else{if("object"!=typeof t)throw new Error("Cannot set content to given value");this._content=Object.keys(t).map(e=>new this.MemberElement(e,t[e]))}}get meta(){if(!this._meta){if(this.isFrozen){const t=new this.ObjectElement;return t.freeze(),t}this._meta=new this.ObjectElement}return this._meta}set meta(t){t instanceof this.ObjectElement?this._meta=t:this.meta.set(t||{})}get attributes(){if(!this._attributes){if(this.isFrozen){const t=new this.ObjectElement;return t.freeze(),t}this._attributes=new this.ObjectElement}return this._attributes}set attributes(t){t instanceof this.ObjectElement?this._attributes=t:this.attributes.set(t||{})}get id(){return this.getMetaProperty("id","")}set id(t){this.setMetaProperty("id",t)}get classes(){return this.getMetaProperty("classes",[])}set classes(t){this.setMetaProperty("classes",t)}get title(){return this.getMetaProperty("title","")}set title(t){this.setMetaProperty("title",t)}get description(){return this.getMetaProperty("description","")}set description(t){this.setMetaProperty("description",t)}get links(){return this.getMetaProperty("links",[])}set links(t){this.setMetaProperty("links",t)}get isFrozen(){return Object.isFrozen(this)}get parents(){let{parent:t}=this;const e=new i;for(;t;)e.push(t),t=t.parent;return e}get children(){if(Array.isArray(this.content))return new i(this.content);if(this.content instanceof s){const t=new i([this.content.key]);return this.content.value&&t.push(this.content.value),t}return this.content instanceof o?new i([this.content]):new i}get recursiveChildren(){const t=new i;return this.children.forEach(e=>{t.push(e),e.recursiveChildren.forEach(e=>{t.push(e)})}),t}}t.exports=o},8666:(t,e,n)=>{var r=n(674),s=n(9460),i=n(2306),o=i&&i.isTypedArray,a=o?s(o):r;t.exports=a},8712:(t,e,n)=>{const r=n(8631);t.exports=class extends r{constructor(t,e,n){super(t,e,n),this.element="string"}primitive(){return"string"}get length(){return this.content.length}}},8861:(t,e,n)=>{var r=n(5650),s=n(1623),i=n(6285),o=n(3934),a=n(5894),c=n(9828),u=r?r.prototype:void 0,l=u?u.valueOf:void 0;t.exports=function(t,e,n,r,u,h,f){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!h(new s(t),new s(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return i(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var p=a;case"[object Set]":var m=1&r;if(p||(p=c),t.size!=e.size&&!m)return!1;var d=f.get(t);if(d)return d==e;r|=2,f.set(t,e);var y=o(p(t),p(e),r,u,h,f);return f.delete(t),y;case"[object Symbol]":if(l)return l.call(t)==l.call(e)}return!1}},8870:(t,e,n)=>{var r=n(5650),s=Object.prototype,i=s.hasOwnProperty,o=s.toString,a=r?r.toStringTag:void 0;t.exports=function(t){var e=i.call(t,a),n=t[a];try{t[a]=void 0;var r=!0}catch(t){}var s=o.call(t);return r&&(e?t[a]=n:delete t[a]),s}},8942:(t,e,n)=>{var r=n(4967),s="object"==typeof self&&self&&self.Object===Object&&self,i=r||s||Function("return this")();t.exports=i},9005:t=>{var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},9067:t=>{t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},9068:(t,e,n)=>{var r=n(4700);t.exports=function(t,e){var n=r(this,t),s=n.size;return n.set(t,e),this.size+=n.size==s?0:1,this}},9270:(t,e,n)=>{var r=n(4715)(n(8942),"WeakMap");t.exports=r},9306:t=>{t.exports=function(){return[]}},9310:t=>{t.exports=function(t){return null===t}},9361:t=>{t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},9413:(t,e,n)=>{var r=n(4715)(n(8942),"Promise");t.exports=r},9460:t=>{t.exports=function(t){return function(e){return t(e)}}},9620:(t,e,n)=>{const r=n(8631);t.exports=class extends r{constructor(t,e,n){super(t||[],e,n),this.element="link"}get relation(){return this.attributes.get("relation")}set relation(t){this.attributes.set("relation",t)}get href(){return this.attributes.get("href")}set href(t){this.attributes.set("href",t)}}},9624:(t,e,n)=>{var r=n(3655),s=n(4759),i=n(1580),o=n(4066),a=/^\[object .+?Constructor\]$/,c=Function.prototype,u=Object.prototype,l=c.toString,h=u.hasOwnProperty,f=RegExp("^"+l.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!i(t)||s(t))&&(r(t)?f:a).test(o(t))}},9632:t=>{var e=/^(?:0|[1-9]\d*)$/;t.exports=function(t,n){var r=typeof t;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&e.test(t))&&t>-1&&t%1==0&&t<n}},9753:(t,e,n)=>{var r=n(5098),s=n(1386),i=n(9770);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||s),string:new r}}},9770:(t,e,n)=>{var r=n(4715)(n(8942),"Map");t.exports=r},9796:(t,e,n)=>{const r=n(1517),s=n(8631),i=n(4123);class o extends s{constructor(t,e,n){super(t||[],e,n),this.element="array"}primitive(){return"array"}get(t){return this.content[t]}getValue(t){const e=this.get(t);if(e)return e.toValue()}getIndex(t){return this.content[t]}set(t,e){return this.content[t]=this.refract(e),this}remove(t){const e=this.content.splice(t,1);return e.length?e[0]:null}map(t,e){return this.content.map(t,e)}flatMap(t,e){return this.map(t,e).reduce((t,e)=>t.concat(e),[])}compactMap(t,e){const n=[];return this.forEach(r=>{const s=t.bind(e)(r);s&&n.push(s)}),n}filter(t,e){return new i(this.content.filter(t,e))}reject(t,e){return this.filter(r(t),e)}reduce(t,e){let n,r;void 0!==e?(n=0,r=this.refract(e)):(n=1,r="object"===this.primitive()?this.first.value:this.first);for(let e=n;e<this.length;e+=1){const n=this.content[e];r="object"===this.primitive()?this.refract(t(r,n.value,n.key,n,this)):this.refract(t(r,n,e,this))}return r}forEach(t,e){this.content.forEach((n,r)=>{t.bind(e)(n,this.refract(r))})}shift(){return this.content.shift()}unshift(t){this.content.unshift(this.refract(t))}push(t){return this.content.push(this.refract(t)),this}add(t){this.push(t)}findElements(t,e){const n=e||{},r=!!n.recursive,s=void 0===n.results?[]:n.results;return this.forEach((e,n,i)=>{r&&void 0!==e.findElements&&e.findElements(t,{results:s,recursive:r}),t(e,n,i)&&s.push(e)}),s}find(t){return new i(this.findElements(t,{recursive:!0}))}findByElement(t){return this.find(e=>e.element===t)}findByClass(t){return this.find(e=>e.classes.includes(t))}getById(t){return this.find(e=>e.id.toValue()===t).first}includes(t){return this.content.some(e=>e.equals(t))}contains(t){return this.includes(t)}empty(){return new this.constructor([])}"fantasy-land/empty"(){return this.empty()}concat(t){return new this.constructor(this.content.concat(t.content))}"fantasy-land/concat"(t){return this.concat(t)}"fantasy-land/map"(t){return new this.constructor(this.map(t))}"fantasy-land/chain"(t){return this.map(e=>t(e),this).reduce((t,e)=>t.concat(e),this.empty())}"fantasy-land/filter"(t){return new this.constructor(this.content.filter(t))}"fantasy-land/reduce"(t,e){return this.content.reduce(t,e)}get length(){return this.content.length}get isEmpty(){return 0===this.content.length}get first(){return this.getIndex(0)}get second(){return this.getIndex(1)}get last(){return this.getIndex(this.length-1)}}o.empty=function(){return new this},o["fantasy-land/empty"]=o.empty,"undefined"!=typeof Symbol&&(o.prototype[Symbol.iterator]=function(){return this.content[Symbol.iterator]()}),t.exports=o},9828:t=>{t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}},9847:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,s=0,i=[];++n<r;){var o=t[n];e(o,n,t)&&(i[s++]=o)}return i}}},e={};function n(r){var s=e[r];if(void 0!==s)return s.exports;var i=e[r]={id:r,loaded:!1,exports:{}};return t[r](i,i.exports,n),i.loaded=!0,i.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);var r={};return(()=>{"use strict";n.r(r),n.d(r,{AnnotationElement:()=>Xt,ArrayElement:()=>Gt.wE,ArraySlice:()=>Gt.G6,BREAK:()=>Qe,BooleanElement:()=>Gt.bd,CloneError:()=>on,CommentElement:()=>Qt,DeepCloneError:()=>an,Element:()=>Gt.Hg,ElementIdentityError:()=>jn,IdentityManager:()=>xn,KeyValuePair:()=>Gt.KeyValuePair,LinkElement:()=>Gt.Ft,MediaTypes:()=>Pn,MemberElement:()=>Gt.Pr,Namespace:()=>Re,NullElement:()=>Gt.Os,NumberElement:()=>Gt.kT,ObjectElement:()=>Gt.Sh,ObjectSlice:()=>Gt.ot,ParseResultElement:()=>se,RefElement:()=>Gt.sI,ShallowCloneError:()=>cn,SourceMapElement:()=>oe,StringElement:()=>Gt.Om,Transcluder:()=>rr,cloneDeep:()=>un,cloneNode:()=>mn,cloneShallow:()=>fn,createNamespace:()=>ze,createPredicate:()=>fe,deepmerge:()=>Ir,defaultIdentityManager:()=>On,dehydrate:()=>xr,dereference:()=>vr,dispatchRefractorPlugins:()=>_n,filter:()=>Cn,find:()=>Nn,findAtOffset:()=>Kn,from:()=>_r,getNodeType:()=>pn,hasElementSourceMap:()=>Me,includesClasses:()=>Pe,includesSymbols:()=>ke,isAnnotationElement:()=>je,isArrayElement:()=>ve,isBooleanElement:()=>be,isElement:()=>pe,isLinkElement:()=>Ee,isMemberElement:()=>_e,isNullElement:()=>ye,isNumberElement:()=>de,isObjectElement:()=>ge,isParseResultElement:()=>Oe,isPrimitiveElement:()=>Ae,isRefElement:()=>we,isSourceMapElement:()=>Se,isStringElement:()=>me,keyMap:()=>yn,mergeAllVisitors:()=>rn,mergeLeft:()=>Tr,mergeRight:()=>Nr,namespace:()=>$e,parents:()=>Qn,refract:()=>Gt.e,refractorPluginElementIdentity:()=>Sn,refractorPluginSemanticElementIdentity:()=>An,reject:()=>In,sexprs:()=>Ar,some:()=>Hn,toJSON:()=>Er,toString:()=>Or,toValue:()=>Ln,toYAML:()=>jr,transclude:()=>nr,traverse:()=>Xn,visit:()=>gn});var t={};function e(t){return null!=t&&"object"==typeof t&&!0===t["@@functional/placeholder"]}function s(t){return function n(r){return 0===arguments.length||e(r)?n:t.apply(this,arguments)}}function i(t){return function n(r,i){switch(arguments.length){case 0:return n;case 1:return e(r)?n:s(function(e){return t(r,e)});default:return e(r)&&e(i)?n:e(r)?s(function(e){return t(e,i)}):e(i)?s(function(e){return t(r,e)}):t(r,i)}}}function o(t){return function n(r,o,a){switch(arguments.length){case 0:return n;case 1:return e(r)?n:i(function(e,n){return t(r,e,n)});case 2:return e(r)&&e(o)?n:e(r)?i(function(e,n){return t(e,o,n)}):e(o)?i(function(e,n){return t(r,e,n)}):s(function(e){return t(r,o,e)});default:return e(r)&&e(o)&&e(a)?n:e(r)&&e(o)?i(function(e,n){return t(e,n,a)}):e(r)&&e(a)?i(function(e,n){return t(e,o,n)}):e(o)&&e(a)?i(function(e,n){return t(r,e,n)}):e(r)?s(function(e){return t(e,o,a)}):e(o)?s(function(e){return t(r,e,a)}):e(a)?s(function(e){return t(r,o,e)}):t(r,o,a)}}}function a(t){return"[object Object]"===Object.prototype.toString.call(t)}function c(t,e){return Object.prototype.hasOwnProperty.call(e,t)}n.r(t),n.d(t,{hasElementSourceMap:()=>Me,includesClasses:()=>Pe,includesSymbols:()=>ke,isAnnotationElement:()=>je,isArrayElement:()=>ve,isBooleanElement:()=>be,isCommentElement:()=>xe,isElement:()=>pe,isLinkElement:()=>Ee,isMemberElement:()=>_e,isNullElement:()=>ye,isNumberElement:()=>de,isObjectElement:()=>ge,isParseResultElement:()=>Oe,isPrimitiveElement:()=>Ae,isRefElement:()=>we,isSourceMapElement:()=>Se,isStringElement:()=>me});const u=o(function(t,e,n){var r,s={};for(r in n=n||{},e=e||{})c(r,e)&&(s[r]=c(r,n)?t(r,e[r],n[r]):e[r]);for(r in n)c(r,n)&&!c(r,s)&&(s[r]=n[r]);return s});const l=o(function t(e,n,r){return u(function(n,r,s){return a(r)&&a(s)?t(e,r,s):e(n,r,s)},n,r)});const h=i(function(t,e){return l(function(t,e,n){return n},t,e)});const f=i(function(t,e){return null==e||e!=e?t:e}),p=Number.isInteger||function(t){return(t|0)===t};function m(t,e){return e[t<0?e.length+t:t]}const d=i(function(t,e){if(null!=e)return p(t)?m(t,e):e[t]});const y=o(function(t,e,n){return f(t,d(e,n))});function b(t,e){switch(t){case 0:return function(){return e.apply(this,arguments)};case 1:return function(t){return e.apply(this,arguments)};case 2:return function(t,n){return e.apply(this,arguments)};case 3:return function(t,n,r){return e.apply(this,arguments)};case 4:return function(t,n,r,s){return e.apply(this,arguments)};case 5:return function(t,n,r,s,i){return e.apply(this,arguments)};case 6:return function(t,n,r,s,i,o){return e.apply(this,arguments)};case 7:return function(t,n,r,s,i,o,a){return e.apply(this,arguments)};case 8:return function(t,n,r,s,i,o,a,c){return e.apply(this,arguments)};case 9:return function(t,n,r,s,i,o,a,c,u){return e.apply(this,arguments)};case 10:return function(t,n,r,s,i,o,a,c,u,l){return e.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}function g(t,n,r){return function(){for(var s=[],i=0,o=t,a=0,c=!1;a<n.length||i<arguments.length;){var u;a<n.length&&(!e(n[a])||i>=arguments.length)?u=n[a]:(u=arguments[i],i+=1),s[a]=u,e(u)?c=!0:o-=1,a+=1}return!c&&o<=0?r.apply(this,s):b(Math.max(0,o),g(t,s,r))}}const v=i(function(t,e){return 1===t?s(e):b(t,g(t,[],e))});function _(t,e){for(var n=e,r=0;r<t.length;r+=1){if(null==n)return;var s=t[r];n=p(s)?m(s,n):n[s]}return n}const E=i(_),w=Array.isArray||function(t){return null!=t&&t.length>=0&&"[object Array]"===Object.prototype.toString.call(t)};function j(t,e){return function(){var n=arguments.length;if(0===n)return e();var r=arguments[n-1];return w(r)||"function"!=typeof r[t]?e.apply(this,arguments):r[t].apply(r,Array.prototype.slice.call(arguments,0,n-1))}}const x=o(j("slice",function(t,e,n){return Array.prototype.slice.call(n,t,e)}));const O=x(0,-1);const S=i(function(t,e){return b(t.length,function(){return t.apply(e,arguments)})});const A=i(function(t,e){return t.apply(this,e)});function M(t,e,n){for(var r=0,s=n.length;r<s;)e=t(e,n[r]),r+=1;return e}function k(t){return"[object String]"===Object.prototype.toString.call(t)}const P=s(function(t){return!!w(t)||!!t&&("object"==typeof t&&(!k(t)&&(0===t.length||t.length>0&&(t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1)))))});var C="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";function I(t,e,n){return function(r,s,i){if(P(i))return t(r,s,i);if(null==i)return s;if("function"==typeof i["fantasy-land/reduce"])return e(r,s,i,"fantasy-land/reduce");if(null!=i[C])return n(r,s,i[C]());if("function"==typeof i.next)return n(r,s,i);if("function"==typeof i.reduce)return e(r,s,i,"reduce");throw new TypeError("reduce: list must be array or iterable")}}function U(t,e,n){for(var r=n.next();!r.done;)e=t(e,r.value),r=n.next();return e}function N(t,e,n,r){return n[r](t,e)}const V=I(M,N,U);function T(t,e,n){return function(){if(0===arguments.length)return n();var r=arguments[arguments.length-1];if(!w(r)){for(var s=0;s<t.length;){if("function"==typeof r[t[s]])return r[t[s]].apply(r,Array.prototype.slice.call(arguments,0,-1));s+=1}if(function(t){return null!=t&&"function"==typeof t["@@transducer/step"]}(r))return e.apply(null,Array.prototype.slice.call(arguments,0,-1))(r)}return n.apply(this,arguments)}}function B(t,e){for(var n=0,r=e.length,s=Array(r);n<r;)s[n]=t(e[n]),n+=1;return s}const D=function(){return this.xf["@@transducer/init"]()},F=function(t){return this.xf["@@transducer/result"](t)};var R=function(){function t(t,e){this.xf=e,this.f=t}return t.prototype["@@transducer/init"]=D,t.prototype["@@transducer/result"]=F,t.prototype["@@transducer/step"]=function(t,e){return this.xf["@@transducer/step"](t,this.f(e))},t}();const q=function(t){return function(e){return new R(t,e)}};var z=Object.prototype.toString;const $=function(){return"[object Arguments]"===z.call(arguments)?function(t){return"[object Arguments]"===z.call(t)}:function(t){return c("callee",t)}}();var L=!{toString:null}.propertyIsEnumerable("toString"),G=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],K=function(){return arguments.propertyIsEnumerable("length")}(),W=function(t,e){for(var n=0;n<t.length;){if(t[n]===e)return!0;n+=1}return!1},H="function"!=typeof Object.keys||K?s(function(t){if(Object(t)!==t)return[];var e,n,r=[],s=K&&$(t);for(e in t)!c(e,t)||s&&"length"===e||(r[r.length]=e);if(L)for(n=G.length-1;n>=0;)c(e=G[n],t)&&!W(r,e)&&(r[r.length]=e),n-=1;return r}):s(function(t){return Object(t)!==t?[]:Object.keys(t)});const J=H;const Y=i(T(["fantasy-land/map","map"],q,function(t,e){switch(Object.prototype.toString.call(e)){case"[object Function]":return v(e.length,function(){return t.call(this,e.apply(this,arguments))});case"[object Object]":return M(function(n,r){return n[r]=t(e[r]),n},{},J(e));default:return B(t,e)}}));const X=i(function(t,e){return"function"==typeof e["fantasy-land/ap"]?e["fantasy-land/ap"](t):"function"==typeof t.ap?t.ap(e):"function"==typeof t?function(n){return t(n)(e(n))}:V(function(t,n){return function(t,e){var n;e=e||[];var r=(t=t||[]).length,s=e.length,i=[];for(n=0;n<r;)i[i.length]=t[n],n+=1;for(n=0;n<s;)i[i.length]=e[n],n+=1;return i}(t,Y(n,e))},[],t)});const Z=i(function(t,e){var n=v(t,e);return v(t,function(){return M(X,Y(n,arguments[0]),Array.prototype.slice.call(arguments,1))})});const Q=s(function(t){return Z(t.length,t)});const tt=Q(s(function(t){return!t}));function et(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}function nt(t,e,n){for(var r=0,s=n.length;r<s;){if(t(e,n[r]))return!0;r+=1}return!1}const rt="function"==typeof Object.is?Object.is:function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e};const st=s(function(t){return null===t?"Null":void 0===t?"Undefined":Object.prototype.toString.call(t).slice(8,-1)});function it(t,e,n,r){var s=et(t);function i(t,e){return ot(t,e,n.slice(),r.slice())}return!nt(function(t,e){return!nt(i,e,t)},et(e),s)}function ot(t,e,n,r){if(rt(t,e))return!0;var s,i,o=st(t);if(o!==st(e))return!1;if("function"==typeof t["fantasy-land/equals"]||"function"==typeof e["fantasy-land/equals"])return"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](e)&&"function"==typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](t);if("function"==typeof t.equals||"function"==typeof e.equals)return"function"==typeof t.equals&&t.equals(e)&&"function"==typeof e.equals&&e.equals(t);switch(o){case"Arguments":case"Array":case"Object":if("function"==typeof t.constructor&&"Promise"===(s=t.constructor,null==(i=String(s).match(/^function (\w*)/))?"":i[1]))return t===e;break;case"Boolean":case"Number":case"String":if(typeof t!=typeof e||!rt(t.valueOf(),e.valueOf()))return!1;break;case"Date":if(!rt(t.valueOf(),e.valueOf()))return!1;break;case"Error":return t.name===e.name&&t.message===e.message;case"RegExp":if(t.source!==e.source||t.global!==e.global||t.ignoreCase!==e.ignoreCase||t.multiline!==e.multiline||t.sticky!==e.sticky||t.unicode!==e.unicode)return!1}for(var a=n.length-1;a>=0;){if(n[a]===t)return r[a]===e;a-=1}switch(o){case"Map":return t.size===e.size&&it(t.entries(),e.entries(),n.concat([t]),r.concat([e]));case"Set":return t.size===e.size&&it(t.values(),e.values(),n.concat([t]),r.concat([e]));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 u=J(t);if(u.length!==J(e).length)return!1;var l=n.concat([t]),h=r.concat([e]);for(a=u.length-1;a>=0;){var f=u[a];if(!c(f,e)||!ot(e[f],t[f],l,h))return!1;a-=1}return!0}const at=i(function(t,e){return ot(t,e,[],[])});function ct(t,e){return function(t,e,n){var r,s;if("function"==typeof t.indexOf)switch(typeof e){case"number":if(0===e){for(r=1/e;n<t.length;){if(0===(s=t[n])&&1/s===r)return n;n+=1}return-1}if(e!=e){for(;n<t.length;){if("number"==typeof(s=t[n])&&s!=s)return n;n+=1}return-1}return t.indexOf(e,n);case"string":case"boolean":case"function":case"undefined":return t.indexOf(e,n);case"object":if(null===e)return t.indexOf(e,n)}for(;n<t.length;){if(at(t[n],e))return n;n+=1}return-1}(e,t,0)>=0}function ut(t){return'"'+t.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 lt=function(t){return(t<10?"0":"")+t};const ht="function"==typeof Date.prototype.toISOString?function(t){return t.toISOString()}:function(t){return t.getUTCFullYear()+"-"+lt(t.getUTCMonth()+1)+"-"+lt(t.getUTCDate())+"T"+lt(t.getUTCHours())+":"+lt(t.getUTCMinutes())+":"+lt(t.getUTCSeconds())+"."+(t.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"};var ft=function(){function t(t,e){this.xf=e,this.f=t}return t.prototype["@@transducer/init"]=D,t.prototype["@@transducer/result"]=F,t.prototype["@@transducer/step"]=function(t,e){return this.f(e)?this.xf["@@transducer/step"](t,e):t},t}();function pt(t){return function(e){return new ft(t,e)}}var mt=i(T(["fantasy-land/filter","filter"],pt,function(t,e){return a(e)?M(function(n,r){return t(e[r])&&(n[r]=e[r]),n},{},J(e)):(n=e,"[object Map]"===Object.prototype.toString.call(n)?function(t,e){for(var n=new Map,r=e.entries(),s=r.next();!s.done;)t(s.value[1])&&n.set(s.value[0],s.value[1]),s=r.next();return n}(t,e):function(t,e){for(var n=0,r=e.length,s=[];n<r;)t(e[n])&&(s[s.length]=e[n]),n+=1;return s}(t,e));var n}));const dt=mt;const yt=i(function(t,e){return dt((n=t,function(){return!n.apply(this,arguments)}),e);var n});function bt(t,e){var n=function(n){var r=e.concat([t]);return ct(n,r)?"<Circular>":bt(n,r)},r=function(t,e){return B(function(e){return ut(e)+": "+n(t[e])},e.slice().sort())};switch(Object.prototype.toString.call(t)){case"[object Arguments]":return"(function() { return arguments; }("+B(n,t).join(", ")+"))";case"[object Array]":return"["+B(n,t).concat(r(t,yt(function(t){return/^\d+$/.test(t)},J(t)))).join(", ")+"]";case"[object Boolean]":return"object"==typeof t?"new Boolean("+n(t.valueOf())+")":t.toString();case"[object Date]":return"new Date("+(isNaN(t.valueOf())?n(NaN):ut(ht(t)))+")";case"[object Map]":return"new Map("+n(Array.from(t))+")";case"[object Null]":return"null";case"[object Number]":return"object"==typeof t?"new Number("+n(t.valueOf())+")":1/t==-1/0?"-0":t.toString(10);case"[object Set]":return"new Set("+n(Array.from(t).sort())+")";case"[object String]":return"object"==typeof t?"new String("+n(t.valueOf())+")":ut(t);case"[object Undefined]":return"undefined";default:if("function"==typeof t.toString){var s=t.toString();if("[object Object]"!==s)return s}return"{"+r(t,J(t)).join(", ")+"}"}}const gt=s(function(t){return bt(t,[])});const vt=i(function(t,e){if(t===e)return e;function n(t,e){if(t>e!=e>t)return e>t?e:t}var r=n(t,e);if(void 0!==r)return r;var s=n(typeof t,typeof e);if(void 0!==s)return s===typeof t?t:e;var i=gt(t),o=n(i,gt(e));return void 0!==o&&o===i?t:e});const _t=i(function(t,e){return Y(d(t),e)});function Et(t,e,n){for(var r=0,s=n.length;r<s;){if((e=t["@@transducer/step"](e,n[r]))&&e["@@transducer/reduced"]){e=e["@@transducer/value"];break}r+=1}return t["@@transducer/result"](e)}function wt(t,e,n){for(var r=n.next();!r.done;){if((e=t["@@transducer/step"](e,r.value))&&e["@@transducer/reduced"]){e=e["@@transducer/value"];break}r=n.next()}return t["@@transducer/result"](e)}function jt(t,e,n,r){return t["@@transducer/result"](n[r](S(t["@@transducer/step"],t),e))}const xt=I(Et,jt,wt);var Ot=function(){function t(t){this.f=t}return t.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},t.prototype["@@transducer/result"]=function(t){return t},t.prototype["@@transducer/step"]=function(t,e){return this.f(t,e)},t}();const St=o(function(t,e,n){return xt("function"==typeof t?new Ot(t):t,e,n)});const At=s(function(t){return v(St(vt,0,_t("length",t)),function(){for(var e=0,n=t.length;e<n;){if(t[e].apply(this,arguments))return!0;e+=1}return!1})});function Mt(t,e){return function(){return e.call(this,t.apply(this,arguments))}}const kt=s(j("tail",x(1,1/0)));function Pt(){if(0===arguments.length)throw new Error("pipe requires at least one argument");return b(arguments[0].length,St(Mt,arguments[0],kt(arguments)))}var Ct=function(t,e){switch(arguments.length){case 0:return Ct;case 1:return function e(n){return 0===arguments.length?e:rt(t,n)};default:return rt(t,e)}};const It=Ct;const Ut=v(1,Pt(st,It("GeneratorFunction")));const Nt=v(1,Pt(st,It("AsyncFunction")));const Vt=At([Pt(st,It("Function")),Ut,Nt]);const Tt=tt(Vt);function Bt(t){var e=Object.prototype.toString.call(t);return"[object Function]"===e||"[object AsyncFunction]"===e||"[object GeneratorFunction]"===e||"[object AsyncGeneratorFunction]"===e}const Dt=i(function(t,e){return t&&e});const Ft=i(function(t,e){return Bt(t)?function(){return t.apply(this,arguments)&&e.apply(this,arguments)}:Q(Dt)(t,e)});var Rt=s(function(t){return null!=t&&"function"==typeof t["fantasy-land/empty"]?t["fantasy-land/empty"]():null!=t&&null!=t.constructor&&"function"==typeof t.constructor["fantasy-land/empty"]?t.constructor["fantasy-land/empty"]():null!=t&&"function"==typeof t.empty?t.empty():null!=t&&null!=t.constructor&&"function"==typeof t.constructor.empty?t.constructor.empty():t==Set||t instanceof Set?new Set:t==Map||t instanceof Map?new Map:w(t)?[]:k(t)?"":a(t)?{}:$(t)?function(){return arguments}():function(t){var e=Object.prototype.toString.call(t);return"[object Uint8ClampedArray]"===e||"[object Int8Array]"===e||"[object Uint8Array]"===e||"[object Int16Array]"===e||"[object Uint16Array]"===e||"[object Int32Array]"===e||"[object Uint32Array]"===e||"[object Float32Array]"===e||"[object Float64Array]"===e||"[object BigInt64Array]"===e||"[object BigUint64Array]"===e}(t)?t.constructor.from(""):void 0});const qt=Rt;const zt=s(function(t){return null!=t&&at(t,qt(t))});const $t=Ft(v(1,Vt(Array.isArray)?Array.isArray:Pt(st,It("Array"))),zt);const Lt=v(3,function(t,e,n){var r=E(t,n),s=E(O(t),n);if(!Tt(r)&&!$t(t)){var i=S(r,s);return A(i,e)}});var Gt=n(8326);var Kt=function(){function t(t,e){this.xf=e,this.f=t,this.all=!0}return t.prototype["@@transducer/init"]=D,t.prototype["@@transducer/result"]=function(t){return this.all&&(t=this.xf["@@transducer/step"](t,!0)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,e){var n;return this.f(e)||(this.all=!1,t=(n=this.xf["@@transducer/step"](t,!1))&&n["@@transducer/reduced"]?n:{"@@transducer/value":n,"@@transducer/reduced":!0}),t},t}();function Wt(t){return function(e){return new Kt(t,e)}}const Ht=i(T(["all"],Wt,function(t,e){for(var n=0;n<e.length;){if(!t(e[n]))return!1;n+=1}return!0}));const Jt=s(function(t){return v(t.length,function(e,n){var r=Array.prototype.slice.call(arguments,0);return r[0]=n,r[1]=e,t.apply(this,r)})})(i(ct));class Yt extends Gt.Om{constructor(t,e,n){super(t,e,n),this.element="annotation"}get code(){return this.attributes.get("code")}set code(t){this.attributes.set("code",t)}}const Xt=Yt;class Zt extends Gt.Om{constructor(t,e,n){super(t,e,n),this.element="comment"}}const Qt=Zt;const te=s(function(t){return function(){return t}});const ee=te(void 0);const ne=at(ee());class re extends Gt.wE{constructor(t,e,n){super(t,e,n),this.element="parseResult"}get api(){return this.children.filter(t=>t.classes.contains("api")).first}get results(){return this.children.filter(t=>t.classes.contains("result"))}get result(){return this.results.first}get annotations(){return this.children.filter(t=>"annotation"===t.element)}get warnings(){return this.children.filter(t=>"annotation"===t.element&&t.classes.contains("warning"))}get errors(){return this.children.filter(t=>"annotation"===t.element&&t.classes.contains("error"))}get isEmpty(){return this.children.reject(t=>"annotation"===t.element).isEmpty}replaceResult(t){const{result:e}=this;if(ne(e))return!1;const n=this.content.findIndex(t=>t===e);return-1!==n&&(this.content[n]=t,!0)}}const se=re;class ie extends Gt.wE{constructor(t,e,n){super(t,e,n),this.element="sourceMap"}get positionStart(){return this.children.filter(t=>t.classes.contains("position")).get(0)}get positionEnd(){return this.children.filter(t=>t.classes.contains("position")).get(1)}set position(t){if(void 0===t)return;const e=new Gt.wE([t.start.row,t.start.column,t.start.char]),n=new Gt.wE([t.end.row,t.end.column,t.end.char]);e.classes.push("position"),n.classes.push("position"),this.push(e).push(n)}}const oe=ie,ae=(t,e)=>"object"==typeof e&&null!==e&&t in e&&"function"==typeof e[t],ce=t=>"object"==typeof t&&null!=t&&"_storedElement"in t&&"string"==typeof t._storedElement&&"_content"in t,ue=(t,e)=>"object"==typeof e&&null!==e&&"primitive"in e&&("function"==typeof e.primitive&&e.primitive()===t),le=(t,e)=>"object"==typeof e&&null!==e&&"classes"in e&&(Array.isArray(e.classes)||e.classes instanceof Gt.wE)&&e.classes.includes(t),he=(t,e)=>"object"==typeof e&&null!==e&&"element"in e&&e.element===t,fe=t=>t({hasMethod:ae,hasBasicElementProps:ce,primitiveEq:ue,isElementType:he,hasClass:le}),pe=fe(({hasBasicElementProps:t,primitiveEq:e})=>n=>n instanceof Gt.Hg||t(n)&&e(void 0,n)),me=fe(({hasBasicElementProps:t,primitiveEq:e})=>n=>n instanceof Gt.Om||t(n)&&e("string",n)),de=fe(({hasBasicElementProps:t,primitiveEq:e})=>n=>n instanceof Gt.kT||t(n)&&e("number",n)),ye=fe(({hasBasicElementProps:t,primitiveEq:e})=>n=>n instanceof Gt.Os||t(n)&&e("null",n)),be=fe(({hasBasicElementProps:t,primitiveEq:e})=>n=>n instanceof Gt.bd||t(n)&&e("boolean",n)),ge=fe(({hasBasicElementProps:t,primitiveEq:e,hasMethod:n})=>r=>r instanceof Gt.Sh||t(r)&&e("object",r)&&n("keys",r)&&n("values",r)&&n("items",r)),ve=fe(({hasBasicElementProps:t,primitiveEq:e,hasMethod:n})=>r=>r instanceof Gt.wE&&!(r instanceof Gt.Sh)||t(r)&&e("array",r)&&n("push",r)&&n("unshift",r)&&n("map",r)&&n("reduce",r)),_e=fe(({hasBasicElementProps:t,isElementType:e,primitiveEq:n})=>r=>r instanceof Gt.Pr||t(r)&&e("member",r)&&n(void 0,r)),Ee=fe(({hasBasicElementProps:t,isElementType:e,primitiveEq:n})=>r=>r instanceof Gt.Ft||t(r)&&e("link",r)&&n(void 0,r)),we=fe(({hasBasicElementProps:t,isElementType:e,primitiveEq:n})=>r=>r instanceof Gt.sI||t(r)&&e("ref",r)&&n(void 0,r)),je=fe(({hasBasicElementProps:t,isElementType:e,primitiveEq:n})=>r=>r instanceof Xt||t(r)&&e("annotation",r)&&n("array",r)),xe=fe(({hasBasicElementProps:t,isElementType:e,primitiveEq:n})=>r=>r instanceof Qt||t(r)&&e("comment",r)&&n("string",r)),Oe=fe(({hasBasicElementProps:t,isElementType:e,primitiveEq:n})=>r=>r instanceof se||t(r)&&e("parseResult",r)&&n("array",r)),Se=fe(({hasBasicElementProps:t,isElementType:e,primitiveEq:n})=>r=>r instanceof oe||t(r)&&e("sourceMap",r)&&n("array",r)),Ae=t=>he("object",t)||he("array",t)||he("boolean",t)||he("number",t)||he("string",t)||he("null",t)||he("member",t),Me=t=>Se(t.meta.get("sourceMap")),ke=(t,e)=>{if(0===t.length)return!0;const n=e.attributes.get("symbols");return!!ve(n)&&Ht(Jt(n.toValue()),t)},Pe=(t,e)=>0===t.length||Ht(Jt(e.classes.toValue()),t);const Ce=o(function(t,e,n){return t(_(e,n))});const Ie=at(null);var Ue=tt(Ie);function Ne(t){return Ne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ne(t)}const Ve=v(1,Ft(Ue,function(t){return"object"===Ne(t)}));var Te=Pt(st,It("Object")),Be=Pt(gt,at(gt(Object))),De=Ce(Ft(Vt,Be),["constructor"]);const Fe=v(1,function(t){if(!Ve(t)||!Te(t))return!1;var e=Object.getPrototypeOf(t);return!!Ie(e)||De(e)});class Re extends Gt.g${constructor(){super(),this.register("annotation",Xt),this.register("comment",Qt),this.register("parseResult",se),this.register("sourceMap",oe)}}const qe=new Re,ze=t=>{const e=new Re;return Fe(t)&&e.use(t),e},$e=qe,Le=()=>({predicates:{...t},namespace:$e});const Ge=function(){return!1};const Ke=v(1,Pt(st,It("String")));class We extends AggregateError{constructor(t,e,n){super(t,e,n),this.name=this.constructor.name,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}const He=We;class Je extends Error{static[Symbol.hasInstance](t){return super[Symbol.hasInstance](t)||Function.prototype[Symbol.hasInstance].call(He,t)}constructor(t,e){super(t,e),this.name=this.constructor.name,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}const Ye=Je;const Xe=class extends Ye{constructor(t,e){if(super(t,e),null!=e&&"object"==typeof e){const{cause:t,...n}=e;Object.assign(this,n)}}},Ze=(t,e,n)=>{const r=t[e];if(null!=r){if(!n&&"function"==typeof r)return r;const t=n?r.leave:r.enter;if("function"==typeof t)return t}else{const r=n?t.leave:t.enter;if(null!=r){if("function"==typeof r)return r;const t=r[e];if("function"==typeof t)return t}}return null},Qe={},tn=t=>t?.type,en=t=>"string"==typeof tn(t),nn=t=>Object.create(Object.getPrototypeOf(t),Object.getOwnPropertyDescriptors(t)),rn=(t,{visitFnGetter:e=Ze,nodeTypeGetter:n=tn,breakSymbol:r=Qe,deleteNodeSymbol:s=null,skipVisitingNodeSymbol:i=!1,exposeEdits:o=!1}={})=>{const a=Symbol("skip"),c=new Array(t.length).fill(a);return{enter(u,l,h,f,p,m){let d=u,y=!1;const b={...m,replaceWith(t,e){m.replaceWith(t,e),d=t}};for(let u=0;u<t.length;u+=1)if(c[u]===a){const a=e(t[u],n(d),!1);if("function"==typeof a){const e=a.call(t[u],d,l,h,f,p,b);if("function"==typeof e?.then)throw new Xe("Async visitor not supported in sync mode",{visitor:t[u],visitFn:a});if(e===i)c[u]=d;else if(e===r)c[u]=r;else{if(e===s)return e;if(void 0!==e){if(!o)return e;d=e,y=!0}}}}return y?d:void 0},leave(s,o,u,l,h,f){let p=s;const m={...f,replaceWith(t,e){f.replaceWith(t,e),p=t}};for(let s=0;s<t.length;s+=1)if(c[s]===a){const a=e(t[s],n(p),!0);if("function"==typeof a){const e=a.call(t[s],p,o,u,l,h,m);if("function"==typeof e?.then)throw new Xe("Async visitor not supported in sync mode",{visitor:t[s],visitFn:a});if(e===r)c[s]=r;else if(void 0!==e&&e!==i)return e}}else c[s]===p&&(c[s]=a)}}};rn[Symbol.for("nodejs.util.promisify.custom")]=(t,{visitFnGetter:e=Ze,nodeTypeGetter:n=tn,breakSymbol:r=Qe,deleteNodeSymbol:s=null,skipVisitingNodeSymbol:i=!1,exposeEdits:o=!1}={})=>{const a=Symbol("skip"),c=new Array(t.length).fill(a);return{async enter(u,l,h,f,p,m){let d=u,y=!1;const b={...m,replaceWith(t,e){m.replaceWith(t,e),d=t}};for(let u=0;u<t.length;u+=1)if(c[u]===a){const a=e(t[u],n(d),!1);if("function"==typeof a){const e=await a.call(t[u],d,l,h,f,p,b);if(e===i)c[u]=d;else if(e===r)c[u]=r;else{if(e===s)return e;if(void 0!==e){if(!o)return e;d=e,y=!0}}}}return y?d:void 0},async leave(s,o,u,l,h,f){let p=s;const m={...f,replaceWith(t,e){f.replaceWith(t,e),p=t}};for(let s=0;s<t.length;s+=1)if(c[s]===a){const a=e(t[s],n(p),!0);if("function"==typeof a){const e=await a.call(t[s],p,o,u,l,h,m);if(e===r)c[s]=r;else if(void 0!==e&&e!==i)return e}}else c[s]===p&&(c[s]=a)}}};const sn=(t,e,{keyMap:n=null,state:r={},breakSymbol:s=Qe,deleteNodeSymbol:i=null,skipVisitingNodeSymbol:o=!1,visitFnGetter:a=Ze,nodeTypeGetter:c=tn,nodePredicate:u=en,nodeCloneFn:l=nn,detectCycles:h=!0}={})=>{const f=n||{};let p,m,d=Array.isArray(t),y=[t],b=-1,g=[],v=t;const _=[],E=[];do{b+=1;const t=b===y.length;let n;const w=t&&0!==g.length;if(t){if(n=0===E.length?void 0:_.pop(),v=m,m=E.pop(),w)if(d){v=v.slice();let t=0;for(const[e,n]of g){const r=e-t;n===i?(v.splice(r,1),t+=1):v[r]=n}}else{v=l(v);for(const[t,e]of g)v[t]=e}b=p.index,y=p.keys,g=p.edits,d=p.inArray,p=p.prev}else if(m!==i&&void 0!==m){if(n=d?b:y[b],v=m[n],v===i||void 0===v)continue;_.push(n)}let j;if(!Array.isArray(v)){if(!u(v))throw new Xe(`Invalid AST Node: ${String(v)}`,{node:v});if(h&&E.includes(v)){_.pop();continue}const i=a(e,c(v),t);if(i){for(const[t,n]of Object.entries(r))e[t]=n;const s={replaceWith(e,r){"function"==typeof r?r(e,v,n,m,_,E):m&&(m[n]=e),t||(v=e)}};j=i.call(e,v,n,m,_,E,s)}if("function"==typeof j?.then)throw new Xe("Async visitor not supported in sync mode",{visitor:e,visitFn:i});if(j===s)break;if(j===o){if(!t){_.pop();continue}}else if(void 0!==j&&(g.push([n,j]),!t)){if(!u(j)){_.pop();continue}v=j}}void 0===j&&w&&g.push([n,v]),t||(p={inArray:d,index:b,keys:y,edits:g,prev:p},d=Array.isArray(v),y=d?v:f[c(v)]??[],b=-1,g=[],m!==i&&void 0!==m&&E.push(m),m=v)}while(void 0!==p);return 0!==g.length?g.at(-1)[1]:t};sn[Symbol.for("nodejs.util.promisify.custom")]=async(t,e,{keyMap:n=null,state:r={},breakSymbol:s=Qe,deleteNodeSymbol:i=null,skipVisitingNodeSymbol:o=!1,visitFnGetter:a=Ze,nodeTypeGetter:c=tn,nodePredicate:u=en,nodeCloneFn:l=nn,detectCycles:h=!0}={})=>{const f=n||{};let p,m,d=Array.isArray(t),y=[t],b=-1,g=[],v=t;const _=[],E=[];do{b+=1;const t=b===y.length;let n;const w=t&&0!==g.length;if(t){if(n=0===E.length?void 0:_.pop(),v=m,m=E.pop(),w)if(d){v=v.slice();let t=0;for(const[e,n]of g){const r=e-t;n===i?(v.splice(r,1),t+=1):v[r]=n}}else{v=l(v);for(const[t,e]of g)v[t]=e}b=p.index,y=p.keys,g=p.edits,d=p.inArray,p=p.prev}else if(m!==i&&void 0!==m){if(n=d?b:y[b],v=m[n],v===i||void 0===v)continue;_.push(n)}let j;if(!Array.isArray(v)){if(!u(v))throw new Xe(`Invalid AST Node: ${String(v)}`,{node:v});if(h&&E.includes(v)){_.pop();continue}const i=a(e,c(v),t);if(i){for(const[t,n]of Object.entries(r))e[t]=n;const s={replaceWith(e,r){"function"==typeof r?r(e,v,n,m,_,E):m&&(m[n]=e),t||(v=e)}};j=await i.call(e,v,n,m,_,E,s)}if(j===s)break;if(j===o){if(!t){_.pop();continue}}else if(void 0!==j&&(g.push([n,j]),!t)){if(!u(j)){_.pop();continue}v=j}}void 0===j&&w&&g.push([n,v]),t||(p={inArray:d,index:b,keys:y,edits:g,prev:p},d=Array.isArray(v),y=d?v:f[c(v)]??[],b=-1,g=[],m!==i&&void 0!==m&&E.push(m),m=v)}while(void 0!==p);return 0!==g.length?g.at(-1)[1]:t};const on=class extends Xe{value;constructor(t,e){super(t,e),void 0!==e&&(this.value=e.value)}};const an=class extends on{};const cn=class extends on{},un=(t,e={})=>{const{visited:n=new WeakMap}=e,r={...e,visited:n};if(n.has(t))return n.get(t);if(t instanceof Gt.KeyValuePair){const{key:e,value:s}=t,i=pe(e)?un(e,r):e,o=pe(s)?un(s,r):s,a=new Gt.KeyValuePair(i,o);return n.set(t,a),a}if(t instanceof Gt.ot){const e=t=>un(t,r),s=[...t].map(e),i=new Gt.ot(s);return n.set(t,i),i}if(t instanceof Gt.G6){const e=t=>un(t,r),s=[...t].map(e),i=new Gt.G6(s);return n.set(t,i),i}if(pe(t)){const e=fn(t);if(n.set(t,e),t.content)if(pe(t.content))e.content=un(t.content,r);else if(t.content instanceof Gt.KeyValuePair)e.content=un(t.content,r);else if(Array.isArray(t.content)){const n=t=>un(t,r);e.content=t.content.map(n)}else e.content=t.content;else e.content=t.content;return e}throw new an("Value provided to cloneDeep function couldn't be cloned",{value:t})};un.safe=t=>{try{return un(t)}catch{return t}};const ln=t=>{const{key:e,value:n}=t;return new Gt.KeyValuePair(e,n)},hn=t=>{const e=new t.constructor;if(e.element=t.element,t.meta.length>0&&(e._meta=un(t.meta)),t.attributes.length>0&&(e._attributes=un(t.attributes)),pe(t.content)){const n=t.content;e.content=hn(n)}else Array.isArray(t.content)?e.content=[...t.content]:t.content instanceof Gt.KeyValuePair?e.content=ln(t.content):e.content=t.content;return e},fn=t=>{if(t instanceof Gt.KeyValuePair)return ln(t);if(t instanceof Gt.ot)return(t=>{const e=[...t];return new Gt.ot(e)})(t);if(t instanceof Gt.G6)return(t=>{const e=[...t];return new Gt.G6(e)})(t);if(pe(t))return hn(t);throw new cn("Value provided to cloneShallow function couldn't be cloned",{value:t})};fn.safe=t=>{try{return fn(t)}catch{return t}};const pn=t=>ge(t)?"ObjectElement":ve(t)?"ArrayElement":_e(t)?"MemberElement":me(t)?"StringElement":be(t)?"BooleanElement":de(t)?"NumberElement":ye(t)?"NullElement":Ee(t)?"LinkElement":we(t)?"RefElement":void 0,mn=t=>pe(t)?fn(t):nn(t),dn=Pt(pn,Ke),yn={ObjectElement:["content"],ArrayElement:["content"],MemberElement:["key","value"],StringElement:[],BooleanElement:[],NumberElement:[],NullElement:[],RefElement:[],LinkElement:[],Annotation:[],Comment:[],ParseResultElement:["content"],SourceMap:["content"]};class bn{result;predicate;returnOnTrue;returnOnFalse;constructor({predicate:t=Ge,returnOnTrue:e,returnOnFalse:n}={}){this.result=[],this.predicate=t,this.returnOnTrue=e,this.returnOnFalse=n}enter(t){return this.predicate(t)?(this.result.push(t),this.returnOnTrue):this.returnOnFalse}}const gn=(t,e,{keyMap:n=yn,...r}={})=>sn(t,e,{keyMap:n,nodeTypeGetter:pn,nodePredicate:dn,nodeCloneFn:mn,...r});gn[Symbol.for("nodejs.util.promisify.custom")]=async(t,e,{keyMap:n=yn,...r}={})=>sn[Symbol.for("nodejs.util.promisify.custom")](t,e,{keyMap:n,nodeTypeGetter:pn,nodePredicate:dn,nodeCloneFn:mn,...r});const vn={toolboxCreator:Le,visitorOptions:{nodeTypeGetter:pn,exposeEdits:!0}},_n=(t,e,n={})=>{if(0===e.length)return t;const r=h(vn,n),{toolboxCreator:s,visitorOptions:i}=r,o=s(),a=e.map(t=>t(o)),c=rn(a.map(y({},"visitor")),{...i});a.forEach(Lt(["pre"],[]));const u=gn(t,c,i);return a.forEach(Lt(["post"],[])),u};_n[Symbol.for("nodejs.util.promisify.custom")]=async(t,e,n={})=>{if(0===e.length)return t;const r=h(vn,n),{toolboxCreator:s,visitorOptions:i}=r,o=s(),a=e.map(t=>t(o)),c=rn[Symbol.for("nodejs.util.promisify.custom")],u=gn[Symbol.for("nodejs.util.promisify.custom")],l=c(a.map(y({},"visitor")),{...i});await Promise.allSettled(a.map(Lt(["pre"],[])));const f=await u(t,l,i);return await Promise.allSettled(a.map(Lt(["post"],[]))),f};var En=n(4279),wn=n.n(En);const jn=class extends Xe{value;constructor(t,e){super(t,e),void 0!==e&&(this.value=e.value)}};class xn{uuid;identityMap;constructor({length:t=6}={}){this.uuid=new(wn())({length:t}),this.identityMap=new WeakMap}identify(t){if(!pe(t))throw new jn("Cannot not identify the element. `element` is neither structurally compatible nor a subclass of an Element class.",{value:t});if(t.meta.hasKey("id")&&me(t.meta.get("id"))&&!t.meta.get("id").equals(""))return t.id;if(this.identityMap.has(t))return this.identityMap.get(t);const e=new Gt.Om(this.generateId());return this.identityMap.set(t,e),e}forget(t){return!!this.identityMap.has(t)&&(this.identityMap.delete(t),!0)}generateId(){return this.uuid.randomUUID()}}const On=new xn,Sn=({length:t=6}={})=>()=>{let e;return{pre(){e=new xn({length:t})},visitor:{enter(t){t.id=e.identify(t)}},post(){e=null}}},An=({length:t=6}={})=>({predicates:e})=>{let n;return{pre(){n=new xn({length:t})},visitor:{enter(t){e.isPrimitiveElement(t)||(t.id=n.identify(t))}},post(){n=null}}};const Mn=class extends Ye{};const kn=class extends Mn{};const Pn=class extends Array{unknownMediaType="application/octet-stream";filterByFormat(){throw new kn("filterByFormat method in MediaTypes class is not yet implemented.")}findBy(){throw new kn("findBy method in MediaTypes class is not yet implemented.")}latest(){throw new kn("latest method in MediaTypes class is not yet implemented.")}},Cn=(t,e)=>{const n=new bn({predicate:t});return gn(e,n),new Gt.G6(n.result)},In=(t,e)=>Cn(tt(t),e);const Un=o(function(t,e,n){return f(t,_(e,n))}),Nn=(t,e)=>{const n=new bn({predicate:t,returnOnTrue:Qe});return gn(e,n),Un(void 0,[0],n.result)};const Vn=s(function(t){return m(-1,t)});const Tn=v(1,Pt(st,It("Number")));const Bn=function(){return!0},Dn=t=>"string"==typeof t?.type?t.type:pn(t),Fn={EphemeralObject:["content"],EphemeralArray:["content"],...yn},Rn=(t,e,{keyMap:n=Fn,...r}={})=>gn(t,e,{keyMap:n,nodeTypeGetter:Dn,nodePredicate:Bn,detectCycles:!1,deleteNodeSymbol:Symbol.for("delete-node"),skipVisitingNodeSymbol:Symbol.for("skip-visiting-node"),...r});Rn[Symbol.for("nodejs.util.promisify.custom")]=async(t,{keyMap:e=Fn,...n}={})=>gn[Symbol.for("nodejs.util.promisify.custom")](t,visitor,{keyMap:e,nodeTypeGetter:Dn,nodePredicate:Bn,detectCycles:!1,deleteNodeSymbol:Symbol.for("delete-node"),skipVisitingNodeSymbol:Symbol.for("skip-visiting-node"),...n});const qn=class{type="EphemeralArray";content=[];reference=void 0;constructor(t){this.content=t,this.reference=[]}toReference(){return this.reference}toArray(){return this.reference.push(...this.content),this.reference}};const zn=class{type="EphemeralObject";content=[];reference=void 0;constructor(t){this.content=t,this.reference={}}toReference(){return this.reference}toObject(){return Object.assign(this.reference,Object.fromEntries(this.content))}};class $n{ObjectElement={enter:t=>{if(this.references.has(t))return this.references.get(t).toReference();const e=new zn(t.content);return this.references.set(t,e),e}};EphemeralObject={leave:t=>t.toObject()};MemberElement={enter:t=>[t.key,t.value]};ArrayElement={enter:t=>{if(this.references.has(t))return this.references.get(t).toReference();const e=new qn(t.content);return this.references.set(t,e),e}};EphemeralArray={leave:t=>t.toArray()};references=new WeakMap;BooleanElement(t){return t.toValue()}NumberElement(t){return t.toValue()}StringElement(t){return t.toValue()}NullElement(){return null}RefElement(t,...e){const n=e[3];return"EphemeralObject"===n[n.length-1]?.type?Symbol.for("delete-node"):String(t.toValue())}LinkElement(t){return me(t.href)?t.href.toValue():""}}const Ln=t=>pe(t)?me(t)||de(t)||be(t)||ye(t)?t.toValue():Rn(t,new $n):t;class Gn{result;offset;includeRightBound;constructor({offset:t=0,includeRightBound:e=!1}={}){this.result=[],this.offset=t,this.includeRightBound=e}enter(t){if(!Me(t))return;const e=t.getMetaProperty("sourceMap"),n=Ln(e.positionStart.get(2)),r=Ln(e.positionEnd.get(2));if(!(this.offset>=n&&(this.offset<r||this.includeRightBound&&this.offset<=r)))return!1;this.result.push(t)}}const Kn=(t,e)=>{let n,r;Tn(t)?(n=t,r=!1):(n=Un(0,["offset"],t),r=Un(!1,["includeRightBound"],t));const s=new Gn({offset:n,includeRightBound:r});return gn(e,s),Vn(s.result)};const Wn=tt(ne),Hn=(t,e)=>Wn(Nn(t,e));const Jn=te(ee());class Yn extends bn{callback;constructor({callback:t=Jn,...e}={}){super({...e}),this.callback=t}enter(t){return this.predicate(t)?(this.callback(t),this.returnOnTrue):this.returnOnFalse}}const Xn=(t,e)=>{let n,r;Vt(t)?(n=t,r=pe):(n=Un(Jn,["callback"],t),r=Un(pe,["predicate"],t));const s=new Yn({callback:n,predicate:r});gn(e,s)};class Zn{parentEdges;parent;constructor(){this.parentEdges=new WeakMap}ObjectElement(t){this.parentEdges.set(t,this.parent),this.parent=t}ArrayElement(t){this.parentEdges.set(t,this.parent),this.parent=t}MemberElement(t){this.parentEdges.set(t,this.parent),this.parent=t}enter(t){this.parentEdges.set(t,this.parent)}}const Qn=t=>{const e=new Zn;return gn(t,e),e.parentEdges},tr=(t,e=new WeakMap)=>(_e(t)?(e.set(t.key,t),tr(t.key,e),e.set(t.value,t),tr(t.value,e)):t.children.forEach(n=>{e.set(n,t),tr(n,e)}),e);const er=class{element;edges;constructor({element:t}){this.element=t}transclude(t,e){if(t===this.element)return e;if(t===e)return this.element;this.edges=this.edges??tr(this.element);const n=this.edges.get(t);return ne(n)?void 0:(ge(n)?((t,e,n)=>{const r=n.get(t);ge(r)&&(r.content=r.map((s,i,o)=>o===t?(n.delete(t),n.set(e,r),e):o))})(t,e,this.edges):ve(n)?((t,e,n)=>{const r=n.get(t);ve(r)&&(r.content=r.map(s=>s===t?(n.delete(t),n.set(e,r),e):s))})(t,e,this.edges):_e(n)&&((t,e,n)=>{const r=n.get(t);_e(r)&&(r.key===t&&(r.key=e,n.delete(t),n.set(e,r)),r.value===t&&(r.value=e,n.delete(t),n.set(e,r)))})(t,e,this.edges),this.element)}},nr=(t,e,n)=>new er({element:n}).transclude(t,e),rr=er;const sr=i(function(t,e){return M(function(n,r){return n[r]=t(e[r],r,e),n},{},J(e))});const ir=s(function(t){return null==t});var or=i(function(t,e){if(0===t.length||ir(e))return!1;for(var n=e,r=0;r<t.length;){if(ir(n)||!c(t[r],n))return!1;n=n[t[r]],r+=1}return!0});const ar=or;var cr=i(function(t,e){return ar([t],e)});const ur=cr;const lr=o(function(t,e,n){return t(d(e,n))});const hr=s(function(t){return v(t.length,t)});const fr=i(function(t,e){return v(t+1,function(){var n=arguments[t];if(null!=n&&Bt(n[e]))return n[e].apply(n,Array.prototype.slice.call(arguments,0,t));throw new TypeError(gt(n)+' does not have a method named "'+e+'"')})});const pr=fr(1,"split");var mr=function(){function t(t,e){this.xf=e,this.f=t}return t.prototype["@@transducer/init"]=D,t.prototype["@@transducer/result"]=F,t.prototype["@@transducer/step"]=function(t,e){if(this.f){if(this.f(e))return t;this.f=null}return this.xf["@@transducer/step"](t,e)},t}();function dr(t){return function(e){return new mr(t,e)}}const yr=i(T(["dropWhile"],dr,function(t,e){for(var n=0,r=e.length;n<r&&t(e[n]);)n+=1;return x(n,1/0,e)}));const br=fr(1,"join");const gr=hr(function(t,e){return Pt(pr(""),yr(Jt(t)),br(""))(e)}),vr=(t,e)=>{const n=f(t,e);return sr(t=>{if(Fe(t)&&ur("$ref",t)&&lr(Ke,"$ref",t)){const e=E(["$ref"],t),r=gr("#/",e);return E(r.split("/"),n)}return Fe(t)?vr(t,n):t},t)},_r=(t,e=$e)=>{if(Ke(t))try{return e.fromRefract(JSON.parse(t))}catch{}return Fe(t)&&ur("element",t)?e.fromRefract(t):e.toElement(t)},Er=(t,e,n)=>JSON.stringify(Ln(t),e,n);class wr{static indentChar=" ";result;indent;constructor({directive:t=!1,indent:e=0}={}){this.result=t?"%YAML 1.2\n---\n":"",this.indent=e}NumberElement(t){this.result+=Ln(t)}BooleanElement(t){const e=Ln(t);this.result+=e?"true":"false"}StringElement(t){this.result+=JSON.stringify(Ln(t))}NullElement(){this.result+="null"}ArrayElement(t){return 0===t.length?(this.result+="[]",!1):(t.forEach(t=>{const e=new wr({indent:this.indent+1}),n=wr.indentChar.repeat(this.indent);gn(t,e);const{result:r}=e;this.result+=r.startsWith("\n")?`\n${n}-${r}`:`\n${n}- ${r}`}),!1)}ObjectElement(t){return 0===t.length?(this.result+="{}",!1):(t.forEach((t,e)=>{const n=new wr({indent:this.indent+1}),r=new wr({indent:this.indent+1}),s=wr.indentChar.repeat(this.indent);gn(e,n),gn(t,r);const{result:i}=n,{result:o}=r;this.result+=o.startsWith("\n")?`\n${s}${i}:${o}`:`\n${s}${i}: ${o}`}),!1)}}const jr=(t,{directive:e=!1}={})=>{const n=new wr({directive:e});return gn(t,n),n.result},xr=(t,e=$e)=>e.toRefract(t),Or=(t,e=$e)=>{const n=xr(t,e);return JSON.stringify(n)};class Sr{result="";nestingLevel=0;enter(t){const{element:e}=t,n=e.charAt(0).toUpperCase()+e.slice(1),r=" ".repeat(this.nestingLevel);this.result+=this.nestingLevel>0?"\n":"",this.result+=`${r}(${n}Element`,this.nestingLevel+=1}leave(){this.nestingLevel-=1,this.result+=")"}}const Ar=t=>{const e=new Sr;return gn(t,e),e.result},Mr=t=>{const e=t.meta.length>0?un(t.meta):void 0,n=t.attributes.length>0?un(t.attributes):void 0;return new t.constructor(void 0,e,n)},kr=(t,e)=>e.clone&&e.isMergeableElement(t)?Cr(Mr(t),t,e):t,Pr={clone:!0,isMergeableElement:t=>ge(t)||ve(t),arrayElementMerge:(t,e,n)=>t.concat(e)["fantasy-land/map"](t=>kr(t,n)),objectElementMerge:(t,e,n)=>{const r=ge(t)?Mr(t):Mr(e);return ge(t)&&t.forEach((t,e,s)=>{const i=fn(s);i.value=kr(t,n),r.content.push(i)}),e.forEach((e,s,i)=>{const o=Ln(s);let a;if(ge(t)&&t.hasKey(o)&&n.isMergeableElement(e)){const r=t.get(o);a=fn(i),a.value=((t,e)=>{if("function"!=typeof e.customMerge)return Cr;const n=e.customMerge(t,e);return"function"==typeof n?n:Cr})(s,n)(r,e,n)}else a=fn(i),a.value=kr(e,n);r.remove(o),r.content.push(a)}),r},customMerge:void 0,customMetaMerge:void 0,customAttributesMerge:void 0},Cr=(t,e,n)=>{const r={...Pr,...n};r.isMergeableElement=r.isMergeableElement??Pr.isMergeableElement,r.arrayElementMerge=r.arrayElementMerge??Pr.arrayElementMerge,r.objectElementMerge=r.objectElementMerge??Pr.objectElementMerge;const s=ve(e);if(!(s===ve(t)))return kr(e,r);const i=s&&"function"==typeof r.arrayElementMerge?r.arrayElementMerge(t,e,r):r.objectElementMerge(t,e,r);return i.meta=(t=>"function"!=typeof t.customMetaMerge?t=>un(t):t.customMetaMerge)(r)(t.meta,e.meta),i.attributes=(t=>"function"!=typeof t.customAttributesMerge?t=>un(t):t.customAttributesMerge)(r)(t.attributes,e.attributes),i};Cr.all=(t,e)=>{if(!Array.isArray(t))throw new TypeError("First argument of deepmerge should be an array.");return 0===t.length?new Gt.Sh:t.reduce((t,n)=>Cr(t,n,e),Mr(t[0]))};const Ir=Cr,Ur=(t,e,n)=>{const r={...Pr,...n,customMerge:()=>(t,e)=>e,clone:!1};return Ir(t,e,r)};Ur.all=(t,e)=>{if(!Array.isArray(t))throw new TypeError("First argument of mergeRight should be an array.");return 0===t.length?new Gt.Sh:t.reduce((t,n)=>Ur(t,n,e),Mr(t[0]))};const Nr=Ur,Vr=(...[t,e,n])=>Nr(e,t,n);Vr.all=(...[t,e])=>Nr.all([...t].reverse(),e);const Tr=Vr})(),r})());
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.apidomCore=t():e.apidomCore=t()}(self,()=>(()=>{"use strict";var e={279:e=>{var t=(()=>{var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,s=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable,o=(t,r,s)=>r in t?e(t,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[r]=s,a=(e,t)=>{for(var r in t||(t={}))n.call(t,r)&&o(e,r,t[r]);if(s)for(var r of s(t))i.call(t,r)&&o(e,r,t[r]);return e},c=(e,t,r)=>o(e,"symbol"!=typeof t?t+"":t,r),l={};((t,r)=>{for(var s in r)e(t,s,{get:r[s],enumerable:!0})})(l,{DEFAULT_OPTIONS:()=>p,DEFAULT_UUID_LENGTH:()=>u,default:()=>f});var u=6,p={dictionary:"alphanum",shuffle:!0,debug:!1,length:u,counter:0},h=class{constructor(e={}){c(this,"counter"),c(this,"debug"),c(this,"dict"),c(this,"version"),c(this,"dictIndex",0),c(this,"dictRange",[]),c(this,"lowerBound",0),c(this,"upperBound",0),c(this,"dictLength",0),c(this,"uuidLength"),c(this,"_digit_first_ascii",48),c(this,"_digit_last_ascii",58),c(this,"_alpha_lower_first_ascii",97),c(this,"_alpha_lower_last_ascii",123),c(this,"_hex_last_ascii",103),c(this,"_alpha_upper_first_ascii",65),c(this,"_alpha_upper_last_ascii",91),c(this,"_number_dict_ranges",{digits:[this._digit_first_ascii,this._digit_last_ascii]}),c(this,"_alpha_dict_ranges",{lowerCase:[this._alpha_lower_first_ascii,this._alpha_lower_last_ascii],upperCase:[this._alpha_upper_first_ascii,this._alpha_upper_last_ascii]}),c(this,"_alpha_lower_dict_ranges",{lowerCase:[this._alpha_lower_first_ascii,this._alpha_lower_last_ascii]}),c(this,"_alpha_upper_dict_ranges",{upperCase:[this._alpha_upper_first_ascii,this._alpha_upper_last_ascii]}),c(this,"_alphanum_dict_ranges",{digits:[this._digit_first_ascii,this._digit_last_ascii],lowerCase:[this._alpha_lower_first_ascii,this._alpha_lower_last_ascii],upperCase:[this._alpha_upper_first_ascii,this._alpha_upper_last_ascii]}),c(this,"_alphanum_lower_dict_ranges",{digits:[this._digit_first_ascii,this._digit_last_ascii],lowerCase:[this._alpha_lower_first_ascii,this._alpha_lower_last_ascii]}),c(this,"_alphanum_upper_dict_ranges",{digits:[this._digit_first_ascii,this._digit_last_ascii],upperCase:[this._alpha_upper_first_ascii,this._alpha_upper_last_ascii]}),c(this,"_hex_dict_ranges",{decDigits:[this._digit_first_ascii,this._digit_last_ascii],alphaDigits:[this._alpha_lower_first_ascii,this._hex_last_ascii]}),c(this,"_dict_ranges",{_number_dict_ranges:this._number_dict_ranges,_alpha_dict_ranges:this._alpha_dict_ranges,_alpha_lower_dict_ranges:this._alpha_lower_dict_ranges,_alpha_upper_dict_ranges:this._alpha_upper_dict_ranges,_alphanum_dict_ranges:this._alphanum_dict_ranges,_alphanum_lower_dict_ranges:this._alphanum_lower_dict_ranges,_alphanum_upper_dict_ranges:this._alphanum_upper_dict_ranges,_hex_dict_ranges:this._hex_dict_ranges}),c(this,"log",(...e)=>{const t=[...e];t[0]="[short-unique-id] ".concat(e[0]),!0!==this.debug||"undefined"==typeof console||null===console||console.log(...t)}),c(this,"_normalizeDictionary",(e,t)=>{let r;if(e&&Array.isArray(e)&&e.length>1)r=e;else{r=[],this.dictIndex=0;const t="_".concat(e,"_dict_ranges"),s=this._dict_ranges[t];let n=0;for(const[,e]of Object.entries(s)){const[t,r]=e;n+=Math.abs(r-t)}r=new Array(n);let i=0;for(const[,e]of Object.entries(s)){this.dictRange=e,this.lowerBound=this.dictRange[0],this.upperBound=this.dictRange[1];const t=this.lowerBound<=this.upperBound,s=this.lowerBound,n=this.upperBound;if(t)for(let e=s;e<n;e++)r[i++]=String.fromCharCode(e),this.dictIndex=e;else for(let e=s;e>n;e--)r[i++]=String.fromCharCode(e),this.dictIndex=e}r.length=i}if(t){for(let e=r.length-1;e>0;e--){const t=Math.floor(Math.random()*(e+1));[r[e],r[t]]=[r[t],r[e]]}}return r}),c(this,"setDictionary",(e,t)=>{this.dict=this._normalizeDictionary(e,t),this.dictLength=this.dict.length,this.setCounter(0)}),c(this,"seq",()=>this.sequentialUUID()),c(this,"sequentialUUID",()=>{const e=this.dictLength,t=this.dict;let r=this.counter;const s=[];do{const n=r%e;r=Math.trunc(r/e),s.push(t[n])}while(0!==r);const n=s.join("");return this.counter+=1,n}),c(this,"rnd",(e=this.uuidLength||u)=>this.randomUUID(e)),c(this,"randomUUID",(e=this.uuidLength||u)=>{if(null==e||e<1)throw new Error("Invalid UUID Length Provided");const t=new Array(e),r=this.dictLength,s=this.dict;for(let n=0;n<e;n++){const e=Math.floor(Math.random()*r);t[n]=s[e]}return t.join("")}),c(this,"fmt",(e,t)=>this.formattedUUID(e,t)),c(this,"formattedUUID",(e,t)=>{const r={$r:this.randomUUID,$s:this.sequentialUUID,$t:this.stamp};return e.replace(/\$[rs]\d{0,}|\$t0|\$t[1-9]\d{1,}/g,e=>{const s=e.slice(0,2),n=Number.parseInt(e.slice(2),10);return"$s"===s?r[s]().padStart(n,"0"):"$t"===s&&t?r[s](n,t):r[s](n)})}),c(this,"availableUUIDs",(e=this.uuidLength)=>Number.parseFloat(([...new Set(this.dict)].length**e).toFixed(0))),c(this,"_collisionCache",new Map),c(this,"approxMaxBeforeCollision",(e=this.availableUUIDs(this.uuidLength))=>{const t=e,r=this._collisionCache.get(t);if(void 0!==r)return r;const s=Number.parseFloat(Math.sqrt(Math.PI/2*e).toFixed(20));return this._collisionCache.set(t,s),s}),c(this,"collisionProbability",(e=this.availableUUIDs(this.uuidLength),t=this.uuidLength)=>Number.parseFloat((this.approxMaxBeforeCollision(e)/this.availableUUIDs(t)).toFixed(20))),c(this,"uniqueness",(e=this.availableUUIDs(this.uuidLength))=>{const t=Number.parseFloat((1-this.approxMaxBeforeCollision(e)/e).toFixed(20));return t>1?1:t<0?0:t}),c(this,"getVersion",()=>this.version),c(this,"stamp",(e,t)=>{const r=Math.floor(+(t||new Date)/1e3).toString(16);if("number"==typeof e&&0===e)return r;if("number"!=typeof e||e<10)throw new Error(["Param finalLength must be a number greater than or equal to 10,","or 0 if you want the raw hexadecimal timestamp"].join("\n"));const s=e-9,n=Math.round(Math.random()*(s>15?15:s)),i=this.randomUUID(s);return"".concat(i.substring(0,n)).concat(r).concat(i.substring(n)).concat(n.toString(16))}),c(this,"parseStamp",(e,t)=>{if(t&&!/t0|t[1-9]\d{1,}/.test(t))throw new Error("Cannot extract date from a formated UUID with no timestamp in the format");const r=t?t.replace(/\$[rs]\d{0,}|\$t0|\$t[1-9]\d{1,}/g,e=>{const t={$r:e=>[...Array(e)].map(()=>"r").join(""),$s:e=>[...Array(e)].map(()=>"s").join(""),$t:e=>[...Array(e)].map(()=>"t").join("")},r=e.slice(0,2),s=Number.parseInt(e.slice(2),10);return t[r](s)}).replace(/^(.*?)(t{8,})(.*)$/g,(t,r,s)=>e.substring(r.length,r.length+s.length)):e;if(8===r.length)return new Date(1e3*Number.parseInt(r,16));if(r.length<10)throw new Error("Stamp length invalid");const s=Number.parseInt(r.substring(r.length-1),16);return new Date(1e3*Number.parseInt(r.substring(s,s+8),16))}),c(this,"setCounter",e=>{this.counter=e}),c(this,"validate",(e,t)=>{const r=t?this._normalizeDictionary(t):this.dict;return e.split("").every(e=>r.includes(e))});const t=a(a({},p),e);this.counter=0,this.debug=!1,this.dict=[],this.version="5.3.2";const{dictionary:r,shuffle:s,length:n,counter:i}=t;this.uuidLength=n,this.setDictionary(r,s),this.setCounter(i),this.debug=t.debug,this.log(this.dict),this.log("Generator instantiated with Dictionary Size ".concat(this.dictLength," and counter set to ").concat(this.counter)),this.log=this.log.bind(this),this.setDictionary=this.setDictionary.bind(this),this.setCounter=this.setCounter.bind(this),this.seq=this.seq.bind(this),this.sequentialUUID=this.sequentialUUID.bind(this),this.rnd=this.rnd.bind(this),this.randomUUID=this.randomUUID.bind(this),this.fmt=this.fmt.bind(this),this.formattedUUID=this.formattedUUID.bind(this),this.availableUUIDs=this.availableUUIDs.bind(this),this.approxMaxBeforeCollision=this.approxMaxBeforeCollision.bind(this),this.collisionProbability=this.collisionProbability.bind(this),this.uniqueness=this.uniqueness.bind(this),this.getVersion=this.getVersion.bind(this),this.stamp=this.stamp.bind(this),this.parseStamp=this.parseStamp.bind(this)}};c(h,"default",h);var d,f=h;return d=l,((s,i,o,a)=>{if(i&&"object"==typeof i||"function"==typeof i)for(let c of r(i))n.call(s,c)||c===o||e(s,c,{get:()=>i[c],enumerable:!(a=t(i,c))||a.enumerable});return s})(e({},"__esModule",{value:!0}),d)})();e.exports=t.default,"undefined"!=typeof window&&(t=t.default)}},t={};function r(s){var n=t[s];if(void 0!==n)return n.exports;var i=t[s]={exports:{}};return e[s](i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var s in t)r.o(t,s)&&!r.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var s={};r.r(s),r.d(s,{ElementIdentityError:()=>qr,IdentityManager:()=>Lr,MediaTypes:()=>zr,Transcluder:()=>Zr,createToolbox:()=>Fr,deepmerge:()=>Bs,defaultIdentityManager:()=>$r,dehydrate:()=>Ts,dispatchRefractorPlugins:()=>Nr,from:()=>ks,mergeLeft:()=>qs,mergeRight:()=>Ps,refractorPluginElementIdentity:()=>Hr,refractorPluginSemanticElementIdentity:()=>Gr,resolveSpecification:()=>_s,sexprs:()=>Ms,toJSON:()=>As,toString:()=>Ss,toValue:()=>Es,toYAML:()=>Os,transclude:()=>Jr});const n=function(){const e=o,t=i,r=this,s="parser.js: Parser(): ";r.ast=void 0,r.stats=void 0,r.trace=void 0,r.callbacks=[];let n,a,c,l,u,p,h,d=0,f=0,m=0,y=0,g=0,x=new function(){this.state=e.ACTIVE,this.phraseLength=0,this.refresh=()=>{this.state=e.ACTIVE,this.phraseLength=0}};r.parse=(i,o,b,w)=>{const _=`${s}parse(): `;d=0,f=0,m=0,y=0,g=0,n=void 0,a=void 0,c=void 0,l=void 0,x.refresh(),u=void 0,p=void 0,h=void 0,l=t.stringToChars(b),n=i.rules,a=i.udts;const k=o.toLowerCase();let E;for(const e in n)if(n.hasOwnProperty(e)&&k===n[e].lower){E=n[e].index;break}if(void 0===E)throw new Error(`${_}start rule name '${startRule}' not recognized`);(()=>{const e=`${s}initializeCallbacks(): `;let t,i;for(u=[],p=[],t=0;t<n.length;t+=1)u[t]=void 0;for(t=0;t<a.length;t+=1)p[t]=void 0;const o=[];for(t=0;t<n.length;t+=1)o.push(n[t].lower);for(t=0;t<a.length;t+=1)o.push(a[t].lower);for(const s in r.callbacks)if(r.callbacks.hasOwnProperty(s)){if(t=o.indexOf(s.toLowerCase()),t<0)throw new Error(`${e}syntax callback '${s}' not a rule or udt name`);if(i=r.callbacks[s]?r.callbacks[s]:void 0,"function"!=typeof i&&void 0!==i)throw new Error(`${e}syntax callback[${s}] must be function reference or falsy)`);t<n.length?u[t]=i:p[t-n.length]=i}})(),r.trace&&r.trace.init(n,a,l),r.stats&&r.stats.init(n,a),r.ast&&r.ast.init(n,a,l),h=w,c=[{type:e.RNM,index:E}],v(0,0),c=void 0;let A=!1;switch(x.state){case e.ACTIVE:throw new Error(`${_}final state should never be 'ACTIVE'`);case e.NOMATCH:A=!1;break;case e.EMPTY:case e.MATCH:A=x.phraseLength===l.length;break;default:throw new Error("unrecognized state")}return{success:A,state:x.state,stateName:e.idName(x.state),length:l.length,matched:x.phraseLength,maxMatched:g,maxTreeDepth:m,nodeHits:y}};const b=(t,r,n,i)=>{if(r.phraseLength>n){let e=`${s}opRNM(${t.name}): callback function error: `;throw e+=`sysData.phraseLength: ${r.phraseLength}`,e+=` must be <= remaining chars: ${n}`,new Error(e)}switch(r.state){case e.ACTIVE:if(!i)throw new Error(`${s}opRNM(${t.name}): callback function return error. ACTIVE state not allowed.`);break;case e.EMPTY:r.phraseLength=0;break;case e.MATCH:0===r.phraseLength&&(r.state=e.EMPTY);break;case e.NOMATCH:r.phraseLength=0;break;default:throw new Error(`${s}opRNM(${t.name}): callback function return error. Unrecognized return state: ${r.state}`)}},w=(t,i)=>{let o,u,f;const m=c[t],y=a[m.index];x.UdtIndex=y.index,d||(f=r.ast&&r.ast.udtDefined(m.index),f&&(u=n.length+m.index,o=r.ast.getLength(),r.ast.down(u,y.name)));const g=l.length-i;p[m.index](x,l,i,h),((t,r,n)=>{if(r.phraseLength>n){let e=`${s}opUDT(${t.name}): callback function error: `;throw e+=`sysData.phraseLength: ${r.phraseLength}`,e+=` must be <= remaining chars: ${n}`,new Error(e)}switch(r.state){case e.ACTIVE:throw new Error(`${s}opUDT(${t.name}) ACTIVE state return not allowed.`);case e.EMPTY:if(!t.empty)throw new Error(`${s}opUDT(${t.name}) may not return EMPTY.`);r.phraseLength=0;break;case e.MATCH:if(0===r.phraseLength){if(!t.empty)throw new Error(`${s}opUDT(${t.name}) may not return EMPTY.`);r.state=e.EMPTY}break;case e.NOMATCH:r.phraseLength=0;break;default:throw new Error(`${s}opUDT(${t.name}): callback function return error. Unrecognized return state: ${r.state}`)}})(y,x,g),d||f&&(x.state===e.NOMATCH?r.ast.setLength(o):r.ast.up(u,y.name,i,x.phraseLength))},v=(t,i)=>{const o=`${s}opExecute(): `,a=c[t];switch(y+=1,f>m&&(m=f),f+=1,x.refresh(),r.trace&&r.trace.down(a,i),a.type){case e.ALT:((t,r)=>{const s=c[t];for(let t=0;t<s.children.length&&(v(s.children[t],r),x.state===e.NOMATCH);t+=1);})(t,i);break;case e.CAT:((t,s)=>{let n,i,o,a;const l=c[t];r.ast&&(i=r.ast.getLength()),n=!0,o=s,a=0;for(let t=0;t<l.children.length;t+=1){if(v(l.children[t],o),x.state===e.NOMATCH){n=!1;break}o+=x.phraseLength,a+=x.phraseLength}n?(x.state=0===a?e.EMPTY:e.MATCH,x.phraseLength=a):(x.state=e.NOMATCH,x.phraseLength=0,r.ast&&r.ast.setLength(i))})(t,i);break;case e.REP:((t,s)=>{let n,i,o,a;const u=c[t];if(0===u.max)return x.state=e.EMPTY,void(x.phraseLength=0);for(i=s,o=0,a=0,r.ast&&(n=r.ast.getLength());!(i>=l.length)&&(v(t+1,i),x.state!==e.NOMATCH)&&x.state!==e.EMPTY&&(a+=1,o+=x.phraseLength,i+=x.phraseLength,a!==u.max););x.state===e.EMPTY||a>=u.min?(x.state=0===o?e.EMPTY:e.MATCH,x.phraseLength=o):(x.state=e.NOMATCH,x.phraseLength=0,r.ast&&r.ast.setLength(n))})(t,i);break;case e.RNM:((t,s)=>{let i,o,a;const p=c[t],f=n[p.index],m=u[f.index];if(d||(o=r.ast&&r.ast.ruleDefined(p.index),o&&(i=r.ast.getLength(),r.ast.down(p.index,n[p.index].name))),m){const t=l.length-s;m(x,l,s,h),b(f,x,t,!0),x.state===e.ACTIVE&&(a=c,c=f.opcodes,v(0,s),c=a,m(x,l,s,h),b(f,x,t,!1))}else a=c,c=f.opcodes,v(0,s,x),c=a;d||o&&(x.state===e.NOMATCH?r.ast.setLength(i):r.ast.up(p.index,f.name,s,x.phraseLength))})(t,i);break;case e.TRG:((t,r)=>{const s=c[t];x.state=e.NOMATCH,r<l.length&&s.min<=l[r]&&l[r]<=s.max&&(x.state=e.MATCH,x.phraseLength=1)})(t,i);break;case e.TBS:((t,r)=>{const s=c[t],n=s.string.length;if(x.state=e.NOMATCH,r+n<=l.length){for(let e=0;e<n;e+=1)if(l[r+e]!==s.string[e])return;x.state=e.MATCH,x.phraseLength=n}})(t,i);break;case e.TLS:((t,r)=>{let s;const n=c[t];x.state=e.NOMATCH;const i=n.string.length;if(0!==i){if(r+i<=l.length){for(let e=0;e<i;e+=1)if(s=l[r+e],s>=65&&s<=90&&(s+=32),s!==n.string[e])return;x.state=e.MATCH,x.phraseLength=i}}else x.state=e.EMPTY})(t,i);break;case e.UDT:w(t,i);break;case e.AND:((t,r)=>{switch(d+=1,v(t+1,r),d-=1,x.phraseLength=0,x.state){case e.EMPTY:case e.MATCH:x.state=e.EMPTY;break;case e.NOMATCH:x.state=e.NOMATCH;break;default:throw new Error(`opAND: invalid state ${x.state}`)}})(t,i);break;case e.NOT:((t,r)=>{switch(d+=1,v(t+1,r),d-=1,x.phraseLength=0,x.state){case e.EMPTY:case e.MATCH:x.state=e.NOMATCH;break;case e.NOMATCH:x.state=e.EMPTY;break;default:throw new Error(`opNOT: invalid state ${x.state}`)}})(t,i);break;default:throw new Error(`${o}unrecognized operator`)}d||i+x.phraseLength>g&&(g=i+x.phraseLength),r.stats&&r.stats.collect(a,x),r.trace&&r.trace.up(a,x.state,i,x.phraseLength),f-=1}},i={stringToChars:e=>[...e].map(e=>e.codePointAt(0)),charsToString:(e,t,r)=>{let s=e;for(;!(void 0===t||t<0);){if(void 0===r){s=e.slice(t);break}if(r<=0)return"";s=e.slice(t,t+r);break}return String.fromCodePoint(...s)}},o={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 o.ALT:return"ALT";case o.CAT:return"CAT";case o.REP:return"REP";case o.RNM:return"RNM";case o.TRG:return"TRG";case o.TBS:return"TBS";case o.TLS:return"TLS";case o.UDT:return"UDT";case o.AND:return"AND";case o.NOT:return"NOT";case o.ACTIVE:return"ACTIVE";case o.EMPTY:return"EMPTY";case o.MATCH:return"MATCH";case o.NOMATCH:return"NOMATCH";case o.SEM_PRE:return"SEM_PRE";case o.SEM_POST:return"SEM_POST";case o.SEM_OK:return"SEM_OK";default:return"UNRECOGNIZED STATE"}}};function a(){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 c 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,...r}=t;Object.assign(this,r)}}}const l=c;new a;new a,new n,new a,new n,new a,new n,new a,new n;const u=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 p=class extends l{},h=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 u(String(e))}).join("/")}`}catch(t){throw new p("Unexpected error during JSON Pointer compilation",{cause:t,referenceTokens:e})}};class d 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,...r}=t;Object.assign(this,r)}}}const f=d;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 m=e=>{if("string"!=typeof e)throw new TypeError("Selector must be a string");let t="";for(const r of e){const e=r.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")}`:r}}return t};const y=class extends f{},g=e=>{if(!Array.isArray(e))throw new y("Selectors must be an array, got: "+typeof e,{selectors:e});try{return`$${e.map(e=>{if("string"==typeof e)return`['${m(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 y("Failed to compile normalized JSONPath",{cause:t,selectors:e})}};class x{node;key;index;parent;parentPath;inList;#e=!1;#t=!1;#r=!1;#s=!1;#n;#i=!1;constructor(e,t,r,s,n){this.node=e,this.parent=t,this.parentPath=r,this.key=s,this.index=n&&"number"==typeof s?s:void 0,this.inList=n}get shouldSkip(){return this.#e}get shouldStop(){return this.#t}get removed(){return this.#r}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;)e.unshift(t.key),t=t.parentPath;return e}formatPath(e="jsonpointer"){const t=this.getPathKeys();return 0===t.length?"jsonpath"===e?"$":"":"jsonpath"===e?g(t):h(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.#s=!0,this.#n=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.#r=!0}_getReplacementNode(){return this.#n}_wasReplaced(){return this.#s}_reset(){this.#e=!1,this.#t=!1,this.#r=!1,this.#s=!1,this.#n=void 0}_markStale(){this.#i=!0}}class b extends AggregateError{constructor(e,t,r){super(e,t,r),this.name=this.constructor.name,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}const w=b;class v extends Error{static[Symbol.hasInstance](e){return super[Symbol.hasInstance](e)||Function.prototype[Symbol.hasInstance].call(w,e)}constructor(e,t){super(e,t),this.name=this.constructor.name,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}const _=v;const k=class extends _{constructor(e,t){if(super(e,t),null!=t&&"object"==typeof t){const{cause:e,...r}=t;Object.assign(this,r)}}};function E(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,r){return t.apply(this,arguments)};case 3:return function(e,r,s){return t.apply(this,arguments)};case 4:return function(e,r,s,n){return t.apply(this,arguments)};case 5:return function(e,r,s,n,i){return t.apply(this,arguments)};case 6:return function(e,r,s,n,i,o){return t.apply(this,arguments)};case 7:return function(e,r,s,n,i,o,a){return t.apply(this,arguments)};case 8:return function(e,r,s,n,i,o,a,c){return t.apply(this,arguments)};case 9:return function(e,r,s,n,i,o,a,c,l){return t.apply(this,arguments)};case 10:return function(e,r,s,n,i,o,a,c,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 A(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]}function I(e){return function t(r){return 0===arguments.length||A(r)?t:e.apply(this,arguments)}}function O(e){return function t(r,s){switch(arguments.length){case 0:return t;case 1:return A(r)?t:I(function(t){return e(r,t)});default:return A(r)&&A(s)?t:A(r)?I(function(t){return e(t,s)}):A(s)?I(function(t){return e(r,t)}):e(r,s)}}}function T(e,t,r){return function(){for(var s=[],n=0,i=e,o=0,a=!1;o<t.length||n<arguments.length;){var c;o<t.length&&(!A(t[o])||n>=arguments.length)?c=t[o]:(c=arguments[n],n+=1),s[o]=c,A(c)?a=!0:i-=1,o+=1}return!a&&i<=0?r.apply(this,s):E(Math.max(0,i),T(e,s,r))}}const S=O(function(e,t){return 1===e?I(t):E(e,T(e,[],t))});function M(e){var t=Object.prototype.toString.call(e);return"[object Function]"===t||"[object AsyncFunction]"===t||"[object GeneratorFunction]"===t||"[object AsyncGeneratorFunction]"===t}const C=O(function(e,t){return e&&t});function D(e,t,r){for(var s=0,n=r.length;s<n;)t=e(t,r[s]),s+=1;return t}const j=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)};function F(e){return"[object String]"===Object.prototype.toString.call(e)}const B=I(function(e){return!!j(e)||!!e&&("object"==typeof e&&(!F(e)&&(0===e.length||e.length>0&&(e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1)))))});var N="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";function P(e,t,r){return function(s,n,i){if(B(i))return e(s,n,i);if(null==i)return n;if("function"==typeof i["fantasy-land/reduce"])return t(s,n,i,"fantasy-land/reduce");if(null!=i[N])return r(s,n,i[N]());if("function"==typeof i.next)return r(s,n,i);if("function"==typeof i.reduce)return t(s,n,i,"reduce");throw new TypeError("reduce: list must be array or iterable")}}function U(e,t,r){for(var s=r.next();!s.done;)t=e(t,s.value),s=r.next();return t}function q(e,t,r,s){return r[s](e,t)}const L=P(D,q,U);function $(e,t,r){return function(){if(0===arguments.length)return r();var s=arguments[arguments.length-1];if(!j(s)){for(var n=0;n<e.length;){if("function"==typeof s[e[n]])return s[e[n]].apply(s,Array.prototype.slice.call(arguments,0,-1));n+=1}if(function(e){return null!=e&&"function"==typeof e["@@transducer/step"]}(s))return t.apply(null,Array.prototype.slice.call(arguments,0,-1))(s)}return r.apply(this,arguments)}}function H(e,t){for(var r=0,s=t.length,n=Array(s);r<s;)n[r]=e(t[r]),r+=1;return n}const G=function(){return this.xf["@@transducer/init"]()},R=function(e){return this.xf["@@transducer/result"](e)};var V=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=G,e.prototype["@@transducer/result"]=R,e.prototype["@@transducer/step"]=function(e,t){return this.xf["@@transducer/step"](e,this.f(t))},e}();const z=function(e){return function(t){return new V(e,t)}};function X(e,t){return Object.prototype.hasOwnProperty.call(t,e)}var W=Object.prototype.toString;const Y=function(){return"[object Arguments]"===W.call(arguments)?function(e){return"[object Arguments]"===W.call(e)}:function(e){return X("callee",e)}}();var K=!{toString:null}.propertyIsEnumerable("toString"),J=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],Z=function(){return arguments.propertyIsEnumerable("length")}(),Q=function(e,t){for(var r=0;r<e.length;){if(e[r]===t)return!0;r+=1}return!1},ee="function"!=typeof Object.keys||Z?I(function(e){if(Object(e)!==e)return[];var t,r,s=[],n=Z&&Y(e);for(t in e)!X(t,e)||n&&"length"===t||(s[s.length]=t);if(K)for(r=J.length-1;r>=0;)X(t=J[r],e)&&!Q(s,t)&&(s[s.length]=t),r-=1;return s}):I(function(e){return Object(e)!==e?[]:Object.keys(e)});const te=ee;const re=O($(["fantasy-land/map","map"],z,function(e,t){switch(Object.prototype.toString.call(t)){case"[object Function]":return S(t.length,function(){return e.call(this,t.apply(this,arguments))});case"[object Object]":return D(function(r,s){return r[s]=e(t[s]),r},{},te(t));default:return H(e,t)}}));const se=O(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(r){return e(r)(t(r))}:L(function(e,r){return function(e,t){var r;t=t||[];var s=(e=e||[]).length,n=t.length,i=[];for(r=0;r<s;)i[i.length]=e[r],r+=1;for(r=0;r<n;)i[i.length]=t[r],r+=1;return i}(e,re(r,t))},[],e)});const ne=O(function(e,t){var r=S(e,t);return S(e,function(){return D(se,re(r,arguments[0]),Array.prototype.slice.call(arguments,1))})});const ie=I(function(e){return ne(e.length,e)});const oe=O(function(e,t){return M(e)?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:ie(C)(e,t)});function ae(e,t){return function(){return t.call(this,e.apply(this,arguments))}}function ce(e){return function t(r,s,n){switch(arguments.length){case 0:return t;case 1:return A(r)?t:O(function(t,s){return e(r,t,s)});case 2:return A(r)&&A(s)?t:A(r)?O(function(t,r){return e(t,s,r)}):A(s)?O(function(t,s){return e(r,t,s)}):I(function(t){return e(r,s,t)});default:return A(r)&&A(s)&&A(n)?t:A(r)&&A(s)?O(function(t,r){return e(t,r,n)}):A(r)&&A(n)?O(function(t,r){return e(t,s,r)}):A(s)&&A(n)?O(function(t,s){return e(r,t,s)}):A(r)?I(function(t){return e(t,s,n)}):A(s)?I(function(t){return e(r,t,n)}):A(n)?I(function(t){return e(r,s,t)}):e(r,s,n)}}}function le(e,t,r){for(var s=0,n=r.length;s<n;){if((t=e["@@transducer/step"](t,r[s]))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}s+=1}return e["@@transducer/result"](t)}const ue=O(function(e,t){return E(e.length,function(){return e.apply(t,arguments)})});function pe(e,t,r){for(var s=r.next();!s.done;){if((t=e["@@transducer/step"](t,s.value))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}s=r.next()}return e["@@transducer/result"](t)}function he(e,t,r,s){return e["@@transducer/result"](r[s](ue(e["@@transducer/step"],e),t))}const de=P(le,he,pe);var fe=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 me=ce(function(e,t,r){return de("function"==typeof e?new fe(e):e,t,r)});function ye(e,t){return function(){var r=arguments.length;if(0===r)return t();var s=arguments[r-1];return j(s)||"function"!=typeof s[e]?t.apply(this,arguments):s[e].apply(s,Array.prototype.slice.call(arguments,0,r-1))}}const ge=ce(ye("slice",function(e,t,r){return Array.prototype.slice.call(r,e,t)}));const xe=I(ye("tail",ge(1,1/0)));function be(){if(0===arguments.length)throw new Error("pipe requires at least one argument");return E(arguments[0].length,me(ae,arguments[0],xe(arguments)))}function we(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}function ve(e,t,r){for(var s=0,n=r.length;s<n;){if(e(t,r[s]))return!0;s+=1}return!1}const _e="function"==typeof Object.is?Object.is:function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};const ke=I(function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)});function Ee(e,t,r,s){var n=we(e);function i(e,t){return Ae(e,t,r.slice(),s.slice())}return!ve(function(e,t){return!ve(i,t,e)},we(t),n)}function Ae(e,t,r,s){if(_e(e,t))return!0;var n,i,o=ke(e);if(o!==ke(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(o){case"Arguments":case"Array":case"Object":if("function"==typeof e.constructor&&"Promise"===(n=e.constructor,null==(i=String(n).match(/^function (\w*)/))?"":i[1]))return e===t;break;case"Boolean":case"Number":case"String":if(typeof e!=typeof t||!_e(e.valueOf(),t.valueOf()))return!1;break;case"Date":if(!_e(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 a=r.length-1;a>=0;){if(r[a]===e)return s[a]===t;a-=1}switch(o){case"Map":return e.size===t.size&&Ee(e.entries(),t.entries(),r.concat([e]),s.concat([t]));case"Set":return e.size===t.size&&Ee(e.values(),t.values(),r.concat([e]),s.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 c=te(e);if(c.length!==te(t).length)return!1;var l=r.concat([e]),u=s.concat([t]);for(a=c.length-1;a>=0;){var p=c[a];if(!X(p,t)||!Ae(t[p],e[p],l,u))return!1;a-=1}return!0}const Ie=O(function(e,t){return Ae(e,t,[],[])});function Oe(e,t){return function(e,t,r){var s,n;if("function"==typeof e.indexOf)switch(typeof t){case"number":if(0===t){for(s=1/t;r<e.length;){if(0===(n=e[r])&&1/n===s)return r;r+=1}return-1}if(t!=t){for(;r<e.length;){if("number"==typeof(n=e[r])&&n!=n)return r;r+=1}return-1}return e.indexOf(t,r);case"string":case"boolean":case"function":case"undefined":return e.indexOf(t,r);case"object":if(null===t)return e.indexOf(t,r)}for(;r<e.length;){if(Ie(e[r],t))return r;r+=1}return-1}(t,e,0)>=0}function Te(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 Se=function(e){return(e<10?"0":"")+e};const Me="function"==typeof Date.prototype.toISOString?function(e){return e.toISOString()}:function(e){return e.getUTCFullYear()+"-"+Se(e.getUTCMonth()+1)+"-"+Se(e.getUTCDate())+"T"+Se(e.getUTCHours())+":"+Se(e.getUTCMinutes())+":"+Se(e.getUTCSeconds())+"."+(e.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"};function Ce(e){return"[object Object]"===Object.prototype.toString.call(e)}var De=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=G,e.prototype["@@transducer/result"]=R,e.prototype["@@transducer/step"]=function(e,t){return this.f(t)?this.xf["@@transducer/step"](e,t):e},e}();function je(e){return function(t){return new De(e,t)}}var Fe=O($(["fantasy-land/filter","filter"],je,function(e,t){return Ce(t)?D(function(r,s){return e(t[s])&&(r[s]=t[s]),r},{},te(t)):(r=t,"[object Map]"===Object.prototype.toString.call(r)?function(e,t){for(var r=new Map,s=t.entries(),n=s.next();!n.done;)e(n.value[1])&&r.set(n.value[0],n.value[1]),n=s.next();return r}(e,t):function(e,t){for(var r=0,s=t.length,n=[];r<s;)e(t[r])&&(n[n.length]=t[r]),r+=1;return n}(e,t));var r}));const Be=Fe;const Ne=O(function(e,t){return Be((r=e,function(){return!r.apply(this,arguments)}),t);var r});function Pe(e,t){var r=function(r){var s=t.concat([e]);return Oe(r,s)?"<Circular>":Pe(r,s)},s=function(e,t){return H(function(t){return Te(t)+": "+r(e[t])},t.slice().sort())};switch(Object.prototype.toString.call(e)){case"[object Arguments]":return"(function() { return arguments; }("+H(r,e).join(", ")+"))";case"[object Array]":return"["+H(r,e).concat(s(e,Ne(function(e){return/^\d+$/.test(e)},te(e)))).join(", ")+"]";case"[object Boolean]":return"object"==typeof e?"new Boolean("+r(e.valueOf())+")":e.toString();case"[object Date]":return"new Date("+(isNaN(e.valueOf())?r(NaN):Te(Me(e)))+")";case"[object Map]":return"new Map("+r(Array.from(e))+")";case"[object Null]":return"null";case"[object Number]":return"object"==typeof e?"new Number("+r(e.valueOf())+")":1/e==-1/0?"-0":e.toString(10);case"[object Set]":return"new Set("+r(Array.from(e).sort())+")";case"[object String]":return"object"==typeof e?"new String("+r(e.valueOf())+")":Te(e);case"[object Undefined]":return"undefined";default:if("function"==typeof e.toString){var n=e.toString();if("[object Object]"!==n)return n}return"{"+s(e,te(e)).join(", ")+"}"}}const Ue=I(function(e){return Pe(e,[])});const qe=O(function(e,t){return e||t});const Le=O(function(e,t){return M(e)?function(){return e.apply(this,arguments)||t.apply(this,arguments)}:ie(qe)(e,t)});const $e=ie(I(function(e){return!e}));const He=Ie(null);const Ge=$e(He);const Re=O(function(e,t){if(e===t)return t;function r(e,t){if(e>t!=t>e)return t>e?t:e}var s=r(e,t);if(void 0!==s)return s;var n=r(typeof e,typeof t);if(void 0!==n)return n===typeof e?e:t;var i=Ue(e),o=r(i,Ue(t));return void 0!==o&&o===i?e:t}),Ve=Number.isInteger||function(e){return(e|0)===e};function ze(e,t){return t[e<0?t.length+e:e]}const Xe=O(function(e,t){if(null!=t)return Ve(e)?ze(e,t):t[e]});const We=O(function(e,t){return re(Xe(e),t)});const Ye=I(function(e){return S(me(Re,0,We("length",e)),function(){for(var t=0,r=e.length;t<r;){if(e[t].apply(this,arguments))return!0;t+=1}return!1})});var Ke=function(e,t){switch(arguments.length){case 0:return Ke;case 1:return function t(r){return 0===arguments.length?t:_e(e,r)};default:return _e(e,t)}};const Je=Ke;const Ze=S(1,be(ke,Je("GeneratorFunction")));const Qe=S(1,be(ke,Je("AsyncFunction")));const et=Ye([be(ke,Je("Function")),Ze,Qe]);function tt(e){return tt="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},tt(e)}const rt=function(e){return"object"===tt(e)};var st=S(1,oe(Ge,Le(rt,et)));const nt=S(1,oe(st,be(Ue,Ie("[object Promise]"))));const it=class{key;value;constructor(e,t){this.key=e,this.value=t}toValue(){return{key:this.key?.toValue(),value:this.value?.toValue()}}};class ot{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(r=>{const s=r.value,n=r.key;if(void 0===s||void 0===n)throw new Error("MemberElement must have both key and value");return void 0!==t?e.call(t,s,n,r):e(s,n,r)})}filter(e,t){const r=this.elements.filter(r=>{const s=r.value,n=r.key;return void 0!==s&&void 0!==n&&(void 0!==t?e.call(t,s,n,r):e(s,n,r))});return new ot(r)}reject(e,t){const r=[];for(const s of this.elements){const n=s.value,i=s.key;void 0!==n&&void 0!==i&&(e.call(t,n,i,s)||r.push(s))}return new ot(r)}forEach(e,t){this.elements.forEach((r,s)=>{const n=r.value,i=r.key;void 0!==n&&void 0!==i&&(void 0!==t?e.call(t,n,i,r,s):e(n,i,r,s))})}find(e,t){return this.elements.find(r=>{const s=r.value,n=r.key;return void 0!==s&&void 0!==n&&(void 0!==t?e.call(t,s,n,r):e(s,n,r))})}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 at=ot;class ct{parent;startLine;startCharacter;startOffset;endLine;endCharacter;endOffset;_storedElement="element";_content;_meta;_attributes;constructor(e,t,r){void 0!==t&&(this.meta=t),void 0!==r&&(this.attributes=r),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 it)this._content=e;else if(e instanceof at)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){const e=new this.ObjectElement;return e.freeze(),e}this._meta=new this.ObjectElement}return this._meta}set meta(e){e instanceof ct?this._meta=e:this.meta.set(e??{})}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(){return this.getMetaProperty("id","")}set id(e){this.setMetaProperty("id",e)}get classes(){return this.getMetaProperty("classes",[])}set classes(e){this.setMetaProperty("classes",e)}get links(){return this.getMetaProperty("links",[])}set links(e){this.setMetaProperty("links",e)}get children(){const{_content:e}=this;if(Array.isArray(e))return e;if(e instanceof it){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.parent=this,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 it?e.toValue():Array.isArray(e)?e.map(e=>e.toValue()):e}equals(e){return Ie(this.toValue(),e)}primitive(){}set(e){return this.content=e,this}toRef(e){const t=this.id.toValue();if(""===t)throw new Error("Cannot create reference to an element without an ID");const r=new this.RefElement(t);return"string"==typeof e&&(r.path=this.refract(e)),r}getMetaProperty(e,t){if(!this.meta.hasKey(e)){if(this.isFrozen){const e=this.refract(t);return e.freeze(),e}this.meta.set(e,t)}return this.meta.get(e)}setMetaProperty(e,t){this.meta.set(e,t)}hasMetaProperty(e){return!this.isMetaEmpty&&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 lt=ct;const ut=class extends lt{constructor(e,t,r){super(e,t,r),this.element="string"}primitive(){return"string"}get length(){return this.content?.length??0}};const pt=class extends lt{constructor(e,t,r){super(e,t,r),this.element="number"}primitive(){return"number"}};const ht=class extends lt{constructor(e,t,r){super(e??null,t,r),this.element="null"}primitive(){return"null"}set(e){throw new Error("Cannot set the value of null")}};const dt=class extends lt{constructor(e,t,r){super(e,t,r),this.element="boolean"}primitive(){return"boolean"}};class ft extends lt{constructor(e,t,r){super(e||[],t,r)}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 r=t||{},s=!!r.recursive,n=void 0===r.results?[]:r.results;for(let t=0;t<this._content.length;t+=1){const r=this._content[t],i=r;s&&"function"==typeof i.findElements&&i.findElements(e,{results:n,recursive:s}),e(r,t,void 0)&&n.push(r)}return n}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 r=t.classes;return"function"==typeof r.includes&&r.includes(e)})}getById(e){return this.find(t=>t.id.toValue()===e).first}concat(e){return new(0,this.constructor)(this._content.concat(e._content))}[Symbol.iterator](){return this._content[Symbol.iterator]()}}const mt=ft;const yt=class extends mt{constructor(e,t,r){super(e||[],t,r),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 r=[];for(const s of this._content){const n=e.call(t,s);n&&r.push(n)}return r}filter(e,t){const r=this._content.filter(e,t);return new this.constructor(r)}reject(e,t){const r=[];for(const s of this._content)e.call(t,s)||r.push(s);return new this.constructor(r)}reduce(e,t){let r,s;void 0!==t?(r=0,s=this.refract(t)):(r=1,s=this.first);for(let t=r;t<this.length;t+=1){const r=e(s,this._content[t],t,this);s=void 0===r?r:this.refract(r)}return s}forEach(e,t){this._content.forEach((r,s)=>{e.call(t,r,s)})}empty(){return new this.constructor([])}};const gt=class extends lt{constructor(e,t,r,s){super(new it,r,s),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 xt=class extends mt{constructor(e,t,r){super(e||[],t,r),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(r=>r.key.toValue()!==e||(t=r,!1)),t}getKey(e){const t=this.getMember(e);if(t)return t.key}set(e,t){if("string"==typeof e){const r=this.getMember(e);r?r.value=t:this._content.push(new gt(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(r=>e.call(t,r.value,r.key,r))}compactMap(e,t){const r=[];return this.forEach((s,n,i)=>{const o=e.call(t,s,n,i);o&&r.push(o)}),r}filter(e,t){return new at(this._content).filter(e,t)}reject(e,t){const r=[];for(const s of this._content)e.call(t,s.value,s.key,s)||r.push(s);return new at(r)}forEach(e,t){this._content.forEach(r=>e.call(t,r.value,r.key,r))}reduce(e,t){let r,s;void 0!==t?(r=0,s=this.refract(t)):(r=1,s=this._content[0]?.value);for(let t=r;t<this._content.length;t+=1){const r=this._content[t],n=e(s,r.value,r.key,r,this);s=void 0===n?n:this.refract(n)}return s}empty(){return new this.constructor([])}},bt=e=>e instanceof lt,wt=e=>e instanceof ut,vt=e=>e instanceof pt,_t=e=>e instanceof ht,kt=e=>e instanceof dt,Et=e=>e instanceof yt,At=e=>e instanceof xt,It=e=>e instanceof gt,Ot=e=>At(e)&&"object"===e.element||Et(e)&&"array"===e.element||kt(e)&&"boolean"===e.element||vt(e)&&"number"===e.element||wt(e)&&"string"===e.element||_t(e)&&"null"===e.element||It(e)&&"member"===e.element,Tt=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,St=(e,t)=>0===t.length||!!bt(e)&&(!e.isMetaEmpty&&(!!e.hasMetaProperty("classes")&&t.every(t=>e.classes.includes(t))));class Mt extends ut{constructor(e,t,r){super(e,t,r),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:r,startOffset:s,endLine:n,endCharacter:i,endOffset:o}=e;if("number"!=typeof t||"number"!=typeof r||"number"!=typeof s||"number"!=typeof n||"number"!=typeof i||"number"!=typeof o)return;const a="sm1:"+[t,r,s,n,i,o].map(Dt).join("");const c=new Mt(a);return c.startLine=t,c.startCharacter=r,c.startOffset=s,c.endLine=n,c.endCharacter=i,c.endOffset=o,c}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,r=[];let s=0;for(let e=0;e<6;e++){const e=jt(t,s);r.push(e.value),s=e.next}return r}(this.content))}}const Ct="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Dt(e){let t=e>>>0,r="";do{let e=31&t;t>>>=5,0!==t&&(e|=32),r+=Ct[e]}while(0!==t);return r}function jt(e,t=0){let r=0,s=0,n=t;for(;;){const t=e[n++],i=Ct.indexOf(t);if(-1===i)throw new Error(`Invalid Base64 VLQ char: ${t}`);if(r|=(31&i)<<s,s+=5,!!!(32&i))break}return{value:r>>>0,next:n}}const Ft=Mt;const Bt=class extends k{value;constructor(e,t){super(e,t),void 0!==t&&(this.value=t.value)}};const Nt=class extends Bt{};const Pt=class extends Bt{},Ut=(e,t)=>{const{visited:r=new WeakMap}=t,s={...t,visited:r};if(r.has(e))return r.get(e);const n=Ht(e);r.set(e,n);const{content:i}=e;return Array.isArray(i)?n.content=i.map(e=>Ut(e,s)):bt(i)?n.content=Ut(i,s):n.content=i instanceof it?qt(i,s):i,n},qt=(e,t)=>{const{visited:r=new WeakMap}=t,s={...t,visited:r};if(r.has(e))return r.get(e);const{key:n,value:i}=e,o=void 0!==n?Ut(n,s):void 0,a=void 0!==i?Ut(i,s):void 0,c=new it(o,a);return r.set(e,c),c},Lt=(e,t={})=>{if(e instanceof it)return qt(e,t);if(e instanceof at)return((e,t)=>{const{visited:r=new WeakMap}=t,s={...t,visited:r};if(r.has(e))return r.get(e);const n=[...e].map(e=>Ut(e,s)),i=new at(n);return r.set(e,i),i})(e,t);if(bt(e))return Ut(e,t);throw new Nt("Value provided to cloneDeep function couldn't be cloned",{value:e})};Lt.safe=e=>{try{return Lt(e)}catch{return e}};const $t=e=>{const{key:t,value:r}=e;return new it(t,r)},Ht=e=>{const t=new(0,e.constructor);t.element=e.element,e.isMetaEmpty||(t.meta=Lt(e.meta)),e.isAttributesEmpty||(t.attributes=Lt(e.attributes)),Tt(e)&&Ft.transfer(e,t);const{content:r}=e;return bt(r)?t.content=Ht(r):Array.isArray(r)?t.content=[...r]:t.content=r instanceof it?$t(r):r,t},Gt=e=>{if(e instanceof it)return $t(e);if(e instanceof at)return(e=>{const t=[...e];return new at(t)})(e);if(bt(e))return Ht(e);throw new Pt("Value provided to cloneShallow function couldn't be cloned",{value:e})};Gt.safe=e=>{try{return Gt(e)}catch{return e}};const Rt=e=>{const t=e?.element;return void 0===t||"element"===t?"Element":`${t.charAt(0).toUpperCase()}${t.slice(1)}Element`},Vt=e=>bt(e),zt=e=>Gt(e),Xt=(e,t,r)=>{It(e)?e.value=r:Array.isArray(e)?e[t]=null===r?void 0:r:null===r?delete e[t]:e[t]=r},Wt=e=>It(e)?["key","value"]:Et(e)||At(e)?["content"]:[],Yt=(e,t)=>{if(void 0!==e[t])return e[t];const r=t.length;for(const s in e){if(!s.includes("|"))continue;const n=s.indexOf(t);if(-1===n)continue;const i=0===n||"|"===s[n-1],o=n+r===s.length||"|"===s[n+r];if(i&&o)return e[s]}},Kt=(e,t,r)=>{if(void 0===t)return null;const s=e,n=r?"leave":"enter",i=Yt(s,t);if(!r&&"function"==typeof i)return i;if(null!=i){const e=i[n];if("function"==typeof e)return e}const o=s[n];if("function"==typeof o)return o;if(null!=o){const e=Yt(o,t);if("function"==typeof e)return e}return null},Jt=(e,t={})=>{const{visitFnGetter:r=Kt,nodeTypeGetter:s=Rt,exposeEdits:n=!1}=t,i=Symbol("internal-skip"),o=Symbol("break"),a=new Array(e.length).fill(i);return{enter(t){let c=t.node,l=!1;for(let u=0;u<e.length;u+=1)if(a[u]===i){const i=r(e[u],s(c),!1);if("function"==typeof i){const r=Qt(t,c),s=i.call(e[u],r);if(nt(s))throw new k("Async visitor not supported in sync mode",{visitor:e[u],visitFn:i});if(r.shouldStop){a[u]=o;break}if(r.shouldSkip&&(a[u]=c),r.removed)return void t.remove();if(r._wasReplaced()){const e=r._getReplacementNode();if(!n)return t.replaceWith(e),e;c=e,l=!0}else if(void 0!==s){if(!n)return t.replaceWith(s),s;c=s,l=!0}}}if(l)return t.replaceWith(c),c},leave(t){const n=t.node;for(let c=0;c<e.length;c+=1)if(a[c]===i){const i=r(e[c],s(n),!0);if("function"==typeof i){const r=Qt(t,n),s=i.call(e[c],r);if(nt(s))throw new k("Async visitor not supported in sync mode",{visitor:e[c],visitFn:i});if(r.shouldStop){a[c]=o;break}if(r.removed)return void t.remove();if(r._wasReplaced()){const e=r._getReplacementNode();return t.replaceWith(e),e}if(void 0!==s)return t.replaceWith(s),s}}else a[c]===n&&(a[c]=i)}}},Zt=(e,t={})=>{const{visitFnGetter:r=Kt,nodeTypeGetter:s=Rt,exposeEdits:n=!1}=t,i=Symbol("internal-skip"),o=Symbol("break"),a=new Array(e.length).fill(i);return{async enter(t){let c=t.node,l=!1;for(let u=0;u<e.length;u+=1)if(a[u]===i){const i=r(e[u],s(c),!1);if("function"==typeof i){const r=Qt(t,c),s=await i.call(e[u],r);if(r.shouldStop){a[u]=o;break}if(r.shouldSkip&&(a[u]=c),r.removed)return void t.remove();if(r._wasReplaced()){const e=r._getReplacementNode();if(!n)return t.replaceWith(e),e;c=e,l=!0}else if(void 0!==s){if(!n)return t.replaceWith(s),s;c=s,l=!0}}}if(l)return t.replaceWith(c),c},async leave(t){const n=t.node;for(let c=0;c<e.length;c+=1)if(a[c]===i){const i=r(e[c],s(n),!0);if("function"==typeof i){const r=Qt(t,n),s=await i.call(e[c],r);if(r.shouldStop){a[c]=o;break}if(r.removed)return void t.remove();if(r._wasReplaced()){const e=r._getReplacementNode();return t.replaceWith(e),e}if(void 0!==s)return t.replaceWith(s),s}}else a[c]===n&&(a[c]=i)}}};function Qt(e,t){return new x(t,e.parent,e.parentPath,e.key,e.inList)}function*er(e,t,r){const{keyMap:s,state:n,nodeTypeGetter:i,nodePredicate:o,nodeCloneFn:a,detectCycles:c,mutable:l,mutationFn:u}=r,p="function"==typeof s;let h,d,f=Array.isArray(e),m=[e],y=-1,g=[],b=e,w=null,v=null;const _=[];do{y+=1;const e=y===m.length;let r;const E=e&&0!==g.length;if(e){if(r=0===_.length?void 0:w?.key,b=d,d=_.pop(),v=w?.parentPath?.parentPath??null,E)if(l)for(const[e,t]of g)u(b,e,t);else if(f){b=b.slice();let e=0;for(const[t,r]of g){const s=t-e;null===r?(b.splice(s,1),e+=1):b[s]=r}}else{b=a(b);for(const[e,t]of g)b[e]=t}if(void 0!==h){y=h.index,m=h.keys,g=h.edits;const e=h.inArray;if(v=h.parentPath,h=h.prev,E&&!l){const t=e?y:m[y];g.push([t,b])}f=e}}else if(void 0!==d&&(r=f?y:m[y],b=d[r],void 0===b))continue;if(!Array.isArray(b)){if(!o(b))throw new k(`Invalid AST Node: ${String(b)}`,{node:b});if(c&&_.includes(b))continue;w=new x(b,d,v,r,f);const s=Kt(t,i(b),e);if(s){for(const[e,r]of Object.entries(n))t[e]=r;const i=yield{visitFn:s,path:w,isLeaving:e};if(w.shouldStop)break;if(w.shouldSkip&&!e)continue;if(w.removed){if(g.push([r,null]),!e)continue}else if(w._wasReplaced()){const t=w._getReplacementNode();if(g.push([r,t]),!e){if(!o(t))continue;b=t}}else if(void 0!==i&&(g.push([r,i]),!e)){if(!o(i))continue;b=i}w._markStale()}}if(!e){if(h={inArray:f,index:y,keys:m,edits:g,parentPath:v,prev:h},f=Array.isArray(b),f)m=b;else if(p)m=s(b);else{const e=i(b);m=void 0!==e?s[e]??[]:[]}y=-1,g=[],void 0!==d&&_.push(d),d=b,v=w}}while(void 0!==h);return 0!==g.length?g.at(-1)[1]:e}Jt[Symbol.for("nodejs.util.promisify.custom")]=Zt;const tr=(e,t,r={})=>{const s=er(e,t,{keyMap:r.keyMap??Wt,state:r.state??{},nodeTypeGetter:r.nodeTypeGetter??Rt,nodePredicate:r.nodePredicate??Vt,nodeCloneFn:r.nodeCloneFn??zt,detectCycles:r.detectCycles??!0,mutable:r.mutable??!1,mutationFn:r.mutationFn??Xt});let n=s.next();for(;!n.done;){const e=n.value,r=e.visitFn.call(t,e.path);if(nt(r))throw new k("Async visitor not supported in sync mode",{visitor:t,visitFn:e.visitFn});n=s.next(r)}return n.value},rr=async(e,t,r={})=>{const s=er(e,t,{keyMap:r.keyMap??Wt,state:r.state??{},nodeTypeGetter:r.nodeTypeGetter??Rt,nodePredicate:r.nodePredicate??Vt,nodeCloneFn:r.nodeCloneFn??zt,detectCycles:r.detectCycles??!0,mutable:r.mutable??!1,mutationFn:r.mutationFn??Xt});let n=s.next();for(;!n.done;){const e=n.value,r=await e.visitFn.call(t,e.path);n=s.next(r)}return n.value};tr[Symbol.for("nodejs.util.promisify.custom")]=rr,x.prototype.traverse=function(e,t){return tr(this.node,e,t)},x.prototype.traverseAsync=function(e,t){return rr(this.node,e,t)};const sr=ce(function(e,t,r){var s,n={};for(s in r=r||{},t=t||{})X(s,t)&&(n[s]=X(s,r)?e(s,t[s],r[s]):t[s]);for(s in r)X(s,r)&&!X(s,n)&&(n[s]=r[s]);return n});const nr=ce(function e(t,r,s){return sr(function(r,s,n){return Ce(s)&&Ce(n)?e(t,s,n):t(r,s,n)},r,s)});const ir=O(function(e,t){return nr(function(e,t,r){return r},e,t)});const or=O(function(e,t){return null==t||t!=t?e:t});const ar=ce(function(e,t,r){return or(e,Xe(t,r))});function cr(e,t){for(var r=t,s=0;s<e.length;s+=1){if(null==r)return;var n=e[s];r=Ve(n)?ze(n,r):r[n]}return r}const lr=O(cr);const ur=ge(0,-1);const pr=O(function(e,t){return e.apply(this,t)});const hr=$e(et);var dr=I(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:j(e)?[]:F(e)?"":Ce(e)?{}:Y(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 fr=dr;const mr=I(function(e){return null!=e&&Ie(e,fr(e))});const yr=oe(S(1,et(Array.isArray)?Array.isArray:be(ke,Je("Array"))),mr);const gr=S(3,function(e,t,r){var s=lr(e,r),n=lr(ur(e),r);if(!hr(s)&&!yr(e)){var i=ue(s,n);return pr(i,t)}});const xr=class extends lt{constructor(e,t,r){super(e||[],t,r),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 br=class extends lt{constructor(e,t,r){super(e||[],t,r),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 wr=class extends ut{constructor(e,t,r){super(e,t,r),this.element="annotation"}get code(){if(this.hasAttributesProperty("code"))return this.attributes.get("code")}set code(e){this.attributes.set("code",e)}};const vr=class extends ut{constructor(e,t,r){super(e,t,r),this.element="comment"}};const _r=class extends yt{constructor(e,t,r){super(e,t,r),this.element="parseResult"}get api(){return this.filter(e=>St(e,["api"])).first}get results(){return this.filter(e=>St(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&&St(e,["warning"]))}get errors(){return this.filter(e=>"annotation"===e.element&&St(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 r=this._content,s=r.findIndex(e=>e===t);return-1!==s&&(r[s]=e,!0)}},kr=e=>e instanceof xr,Er=e=>e instanceof br;const Ar=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||(t.meta=this.serialiseObject(e.meta)),e.isAttributesEmpty||(t.attributes=this.serialiseObject(e.attributes)),!(e instanceof Ft)){const r=Ft.from(e);r&&(t.meta||(t.meta={}),t.meta.__mappings__=this.serialise(r))}const r=this.serialiseContent(e.content);return void 0!==r&&(t.content=r),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 r;t.element!==e.element&&(t.element=e.element);let s=e.meta;if(e.meta?.__mappings__){const{__mappings__:t,...n}=e.meta;r=t,s=Object.keys(n).length>0?n:void 0}if(s&&this.deserialiseObject(s,t.meta),r){this.deserialise(r).applyTo(t)}e.attributes&&this.deserialiseObject(e.attributes,t.attributes);const n=this.deserialiseContent(e.content);return void 0===n&&null!==t.content||(t.content=n),t}serialiseContent(e){if(e instanceof this.namespace.elements.Element)return this.serialise(e);if(e instanceof this.namespace.KeyValuePair){const t=e,r={key:this.serialise(t.key)};return t.value&&(r.value=this.serialise(t.value)),r}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}serialiseObject(e){const t={};if(e.forEach((e,r)=>{e&&(t[r.toValue()]=this.serialise(e))}),0!==Object.keys(t).length)return t}deserialiseObject(e,t){Object.keys(e).forEach(r=>{t.set(r,this.deserialise(e[r]))})}},Ir=e=>null===e,Or=e=>"string"==typeof e,Tr=e=>"number"==typeof e,Sr=e=>"boolean"==typeof e,Mr=e=>null!==e&&"object"==typeof e;class Cr{elementMap={};elementDetection=[];Element;KeyValuePair;_elements;_attributeElementKeys=[];_attributeElementArrayKeys=[];constructor(e){this.Element=lt,this.KeyValuePair=it,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",ht).register("string",ut).register("number",pt).register("boolean",dt).register("array",yt).register("object",xt).register("member",gt).register("ref",br).register("link",xr).register("sourceMap",Ft),this.detect(Ir,ht,!1).detect(Or,ut,!1).detect(Tr,pt,!1).detect(Sr,dt,!1).detect(Array.isArray,yt,!1).detect(Mr,xt,!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,r){return void 0===r||r?this.elementDetection.unshift([e,t]):this.elementDetection.push([e,t]),this}toElement(e){if(e instanceof this.Element)return e;let t;for(const[r,s]of this.elementDetection)if(r(e)){t=new s(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 Ar(this)}}Ar.prototype.Namespace=Cr;const Dr=new Cr,jr={isElement:bt,isStringElement:wt,isNumberElement:vt,isNullElement:_t,isBooleanElement:kt,isArrayElement:Et,isObjectElement:At,isMemberElement:It,isPrimitiveElement:Ot,isLinkElement:kr,isRefElement:Er,isAnnotationElement:e=>e instanceof wr,isCommentElement:e=>e instanceof vr,isParseResultElement:e=>e instanceof _r,isSourceMapElement:e=>e instanceof Ft,hasElementSourceMap:Tt,includesSymbols:(e,t)=>{if(0===t.length)return!0;if(!e.hasAttributesProperty("symbols"))return!1;const r=e.attributes.get("symbols");return!!Et(r)&&t.every(e=>r.includes(e))},includesClasses:St},Fr=()=>({predicates:jr,namespace:Dr}),Br={toolboxCreator:Fr,visitorOptions:{exposeEdits:!0}},Nr=(e,t,r={})=>{if(0===t.length)return e;const s=ir(Br,r),{toolboxCreator:n,visitorOptions:i}=s,o=n(),a=t.map(e=>e(o)),c=Jt(a.map(ar({},"visitor")),i);a.forEach(gr(["pre"],[]));const l=tr(e,c);return a.forEach(gr(["post"],[])),l};Nr[Symbol.for("nodejs.util.promisify.custom")]=async(e,t,r={})=>{if(0===t.length)return e;const s=ir(Br,r),{toolboxCreator:n,visitorOptions:i}=s,o=n(),a=t.map(e=>e(o)),c=Zt(a.map(ar({},"visitor")),i);await Promise.allSettled(a.map(gr(["pre"],[])));const l=await rr(e,c);return await Promise.allSettled(a.map(gr(["post"],[]))),l};var Pr=r(279),Ur=r.n(Pr);const qr=class extends k{value;constructor(e,t){super(e,t),void 0!==t&&(this.value=t.value)}};class Lr{uuid;identityMap;constructor({length:e=6}={}){this.uuid=new(Ur())({length:e}),this.identityMap=new WeakMap}identify(e){if(!bt(e))throw new qr("Cannot not identify the element. `element` is neither structurally compatible nor a subclass of an Element class.",{value:e});if(e.hasMetaProperty("id")){const t=e.meta.get("id");if(wt(t)&&!t.equals(""))return e.id}if(this.identityMap.has(e))return this.identityMap.get(e);const t=new ut(this.generateId());return this.identityMap.set(e,t),t}forget(e){return!!this.identityMap.has(e)&&(this.identityMap.delete(e),!0)}generateId(){return this.uuid.randomUUID()}}const $r=new Lr,Hr=({length:e=6}={})=>()=>{let t;return{pre(){t=new Lr({length:e})},visitor:{enter(e){e.node.id=t.identify(e.node)}},post(){t=null}}},Gr=({length:e=6}={})=>()=>{let t;return{pre(){t=new Lr({length:e})},visitor:{enter(e){Ot(e.node)||(e.node.id=t.identify(e.node))}},post(){t=null}}};const Rr=class extends _{};const Vr=class extends Rr{};const zr=class extends Array{unknownMediaType="application/octet-stream";filterByFormat(){throw new Vr("filterByFormat method in MediaTypes class is not yet implemented.")}findBy(){throw new Vr("findBy method in MediaTypes class is not yet implemented.")}latest(){throw new Vr("latest method in MediaTypes class is not yet implemented.")}};var Xr=I(function(e){return function(){return e}})(void 0);const Wr=Ie(Xr()),Yr=(e,t=new WeakMap)=>(It(e)?(t.set(e.key,e),Yr(e.key,t),t.set(e.value,e),Yr(e.value,t)):e.children.forEach(r=>{t.set(r,e),Yr(r,t)}),t);const Kr=class{element;edges;constructor({element:e}){this.element=e}transclude(e,t){if(e===this.element)return t;if(e===t)return this.element;this.edges=this.edges??Yr(this.element);const r=this.edges.get(e);return Wr(r)?void 0:(At(r)?((e,t,r)=>{const s=r.get(e);At(s)&&(s.content=s.map((n,i,o)=>o===e?(r.delete(e),r.set(t,s),t):o))})(e,t,this.edges):Et(r)?((e,t,r)=>{const s=r.get(e);Et(s)&&(s.content=s.map(n=>n===e?(r.delete(e),r.set(t,s),t):n))})(e,t,this.edges):It(r)&&((e,t,r)=>{const s=r.get(e);It(s)&&(s.key===e&&(s.key=t,r.delete(e),r.set(t,s)),s.value===e&&(s.value=t,r.delete(e),r.set(t,s)))})(e,t,this.edges),this.element)}},Jr=(e,t,r)=>new Kr({element:r}).transclude(e,t),Zr=Kr;const Qr=O(function(e,t){return D(function(r,s){return r[s]=e(t[s],s,t),r},{},te(t))});const es=I(function(e){return null==e});var ts=O(function(e,t){if(0===e.length||es(t))return!1;for(var r=t,s=0;s<e.length;){if(es(r)||!X(e[s],r))return!1;r=r[e[s]],s+=1}return!0});const rs=ts;var ss=O(function(e,t){return rs([e],t)});const ns=ss;const is=ce(function(e,t,r){return e(Xe(t,r))});const os=ce(function(e,t,r){return e(cr(t,r))});const as=S(1,oe(Ge,rt));var cs=be(ke,Je("Object")),ls=os(oe(et,be(Ue,Ie(Ue(Object)))),["constructor"]);const us=S(1,function(e){if(!as(e)||!cs(e))return!1;var t=Object.getPrototypeOf(e);return!!He(t)||ls(t)});const ps=S(1,be(ke,Je("String")));const hs=I(function(e){return S(e.length,e)});const ds=O(function(e,t){return S(e+1,function(){var r=arguments[e];if(null!=r&&M(r[t]))return r[t].apply(r,Array.prototype.slice.call(arguments,0,e));throw new TypeError(Ue(r)+' does not have a method named "'+t+'"')})});const fs=ds(1,"split");var ms=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=G,e.prototype["@@transducer/result"]=R,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 ys(e){return function(t){return new ms(e,t)}}const gs=O($(["dropWhile"],ys,function(e,t){for(var r=0,s=t.length;r<s&&e(t[r]);)r+=1;return ge(r,1/0,t)}));const xs=ds(1,"join");const bs=I(function(e){return S(e.length,function(t,r){var s=Array.prototype.slice.call(arguments,0);return s[0]=r,s[1]=t,e.apply(this,s)})})(O(Oe));const ws=hs(function(e,t){return be(fs(""),gs(bs(e)),xs(""))(t)}),vs=new WeakMap,_s=e=>{if(vs.has(e))return vs.get(e);const t={},r=(e,s,n)=>("string"==typeof e.element&&(t[e.element]=e.$visitor?[...n,"$visitor"]:n),Qr((e,t)=>{const i=[...n,t];if(us(e)&&ns("$ref",e)&&is(ps,"$ref",e)){const t=lr(["$ref"],e),r=ws("#/",t);return lr(r.split("/"),s)}return us(e)?r(e,s,i):e},e)),s=r(e,e,[]);return s.elementMap=t,vs.set(e,s),s},ks=(e,t=Dr)=>{if(ps(e))try{return t.fromRefract(JSON.parse(e))}catch{}return us(e)&&ns("element",e)?t.fromRefract(e):t.toElement(e)},Es=e=>{if(!bt(e))return e;if(wt(e)||vt(e)||kt(e)||_t(e))return e.toValue();const t=new WeakMap,r=e=>{if(!bt(e))return e;if(At(e)){if(t.has(e))return t.get(e);const s={};return t.set(e,s),e.forEach((e,t)=>{const n=r(t),i=r(e);"string"==typeof n&&(s[n]=i)}),s}if(Et(e)){if(t.has(e))return t.get(e);const s=[];return t.set(e,s),e.forEach(e=>s.push(r(e))),s}return Er(e)?String(e.toValue()):kr(e)?wt(e.href)?e.href.toValue():"":e.toValue()};return r(e)},As=(e,t,r)=>JSON.stringify(Es(e),t,r);class Is{static indentChar=" ";result;indent;constructor({directive:e=!1,indent:t=0}={}){this.result=e?"%YAML 1.2\n---\n":"",this.indent=t}NumberElement(e){this.result+=Es(e.node)}BooleanElement(e){const t=Es(e.node);this.result+=t?"true":"false"}StringElement(e){this.result+=JSON.stringify(Es(e.node))}NullElement(){this.result+="null"}ArrayElement(e){const t=e.node;if(0===t.length)return this.result+="[]",void e.skip();t.forEach(e=>{const t=new Is({indent:this.indent+1}),r=Is.indentChar.repeat(this.indent);tr(e,t);const{result:s}=t;this.result+=s.startsWith("\n")?`\n${r}-${s}`:`\n${r}- ${s}`}),e.skip()}ObjectElement(e){const t=e.node;if(0===t.length)return this.result+="{}",void e.skip();t.forEach((e,t)=>{const r=new Is({indent:this.indent+1}),s=new Is({indent:this.indent+1}),n=Is.indentChar.repeat(this.indent);tr(t,r),tr(e,s);const{result:i}=r,{result:o}=s;this.result+=o.startsWith("\n")?`\n${n}${i}:${o}`:`\n${n}${i}: ${o}`}),e.skip()}}const Os=(e,{directive:t=!1}={})=>{const r=new Is({directive:t});return tr(e,r),r.result},Ts=(e,t=Dr)=>t.toRefract(e),Ss=(e,t=Dr)=>{const r=Ts(e,t);return JSON.stringify(r)},Ms=e=>{let t="",r=0;return tr(e,{enter(e){const{element:s}=e.node,n=s.charAt(0).toUpperCase()+s.slice(1),i=" ".repeat(r);t+=r>0?"\n":"",t+=`${i}(${n}Element`,r+=1},leave(){r-=1,t+=")"}}),t},Cs=e=>{const t=e.isMetaEmpty?void 0:Lt(e.meta),r=e.isAttributesEmpty?void 0:Lt(e.attributes);return new e.constructor(void 0,t,r)},Ds=(e,t)=>t.clone&&t.isMergeableElement(e)?Fs(Cs(e),e,t):e,js={clone:!0,isMergeableElement:e=>At(e)||Et(e),arrayElementMerge:(e,t,r)=>new(0,e.constructor)(e.concat(t).map(e=>Ds(e,r))),objectElementMerge:(e,t,r)=>{const s=At(e)?Cs(e):Cs(t);return At(e)&&e.forEach((e,t,n)=>{const i=Gt(n);i.value=Ds(e,r),s.content.push(i)}),t.forEach((t,n,i)=>{const o=Es(n);let a;if(At(e)&&e.hasKey(o)&&r.isMergeableElement(t)){const s=e.get(o);a=Gt(i),a.value=((e,t)=>{if("function"!=typeof t.customMerge)return Fs;const r=t.customMerge(e,t);return"function"==typeof r?r:Fs})(n,r)(s,t,r)}else a=Gt(i),a.value=Ds(t,r);s.remove(o),s.content.push(a)}),s},customMerge:void 0,customMetaMerge:void 0,customAttributesMerge:void 0},Fs=(e,t,r)=>{const s={...js,...r};s.isMergeableElement=s.isMergeableElement??js.isMergeableElement,s.arrayElementMerge=s.arrayElementMerge??js.arrayElementMerge,s.objectElementMerge=s.objectElementMerge??js.objectElementMerge;const n=Et(t);if(!(n===Et(e)))return Ds(t,s);const i=n&&"function"==typeof s.arrayElementMerge?s.arrayElementMerge(e,t,s):s.objectElementMerge(e,t,s);return i.meta=(e=>"function"!=typeof e.customMetaMerge?e=>Lt(e):e.customMetaMerge)(s)(e.meta,t.meta),i.attributes=(e=>"function"!=typeof e.customAttributesMerge?e=>Lt(e):e.customAttributesMerge)(s)(e.attributes,t.attributes),i};Fs.all=(e,t)=>{if(!Array.isArray(e))throw new TypeError("First argument of deepmerge should be an array.");return 0===e.length?new xt:e.reduce((e,r)=>Fs(e,r,t),Cs(e[0]))};const Bs=Fs,Ns=(e,t,r)=>{const s={...js,...r,customMerge:()=>(e,t)=>t,clone:!1};return Bs(e,t,s)};Ns.all=(e,t)=>{if(!Array.isArray(e))throw new TypeError("First argument of mergeRight should be an array.");return 0===e.length?new xt:e.reduce((e,r)=>Ns(e,r,t),Cs(e[0]))};const Ps=Ns,Us=(...[e,t,r])=>Ps(t,e,r);Us.all=(...[e,t])=>Ps.all([...e].reverse(),t);const qs=Us;return s})());