apiuikit 1.11.0 → 2.0.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 (162) hide show
  1. package/README.md +2 -52
  2. package/dist/{CodeSamples-DHBJ8w0h.js → CodeSamples-DqJT72uU.js} +648 -636
  3. package/dist/{CodeSamples-zwenaP41.cjs → CodeSamples-ILzruYIb.cjs} +33 -33
  4. package/dist/{LogoExtension-B35DbEgK.cjs → LogoExtension-pwW1l7NO.cjs} +1 -1
  5. package/dist/{LogoExtension-vr6PCtIB.js → LogoExtension-yx9jporL.js} +1 -1
  6. package/dist/apiuikit.cjs.js +1 -1
  7. package/dist/apiuikit.css +1 -1
  8. package/dist/apiuikit.es.js +1 -1
  9. package/dist/c-B4BAHWS4.cjs +1 -0
  10. package/dist/{c-Bz1-FJiA.js → c-C0DTNf68.js} +122 -63
  11. package/dist/components/AsyncCodeSample.d.ts +1 -1
  12. package/dist/components/Authorization.d.ts +5 -5
  13. package/dist/components/Bindings.d.ts +1 -1
  14. package/dist/components/ChannelAddress.d.ts +1 -1
  15. package/dist/components/CodeBlock.d.ts +1 -1
  16. package/dist/components/CodeSamples.d.ts +1 -1
  17. package/dist/components/CollapsiblePanel.d.ts +1 -1
  18. package/dist/components/ContentTab.d.ts +1 -1
  19. package/dist/components/CopyButton.d.ts +1 -1
  20. package/dist/components/DefinitionListItem.d.ts +1 -1
  21. package/dist/components/DocumentTopBar.d.ts +1 -1
  22. package/dist/components/ErrorBoundary.d.ts +1 -1
  23. package/dist/components/Examples.d.ts +1 -1
  24. package/dist/components/InfoMetadata.d.ts +1 -1
  25. package/dist/components/MarkdownExportMenu.d.ts +1 -1
  26. package/dist/components/MethodBadge.d.ts +1 -1
  27. package/dist/components/Navigation/AsyncAPINavigation.d.ts +1 -1
  28. package/dist/components/Navigation/Navigation.d.ts +1 -1
  29. package/dist/components/Navigation/OpenAPINavigation.d.ts +1 -1
  30. package/dist/components/Navigation/SpecNavigation.d.ts +1 -1
  31. package/dist/components/QueryParameters.d.ts +1 -1
  32. package/dist/components/RenderExtensions.d.ts +1 -1
  33. package/dist/components/Reply.d.ts +1 -1
  34. package/dist/components/SearchPanel.d.ts +1 -1
  35. package/dist/components/Section.d.ts +8 -1
  36. package/dist/components/ServerAddressBanner.d.ts +1 -1
  37. package/dist/components/TabToggle.d.ts +1 -1
  38. package/dist/components/Tabs.d.ts +2 -2
  39. package/dist/components/Tag.d.ts +1 -1
  40. package/dist/components/VerticalNavigation.d.ts +1 -1
  41. package/dist/components/schema/ExpandToggle.d.ts +1 -1
  42. package/dist/components/schema/SchemaCaseDetail.d.ts +1 -1
  43. package/dist/components/schema/SchemaConstraints.d.ts +1 -1
  44. package/dist/components/schema/SchemaFieldMeta.d.ts +1 -1
  45. package/dist/components/schema/SchemaIfThenElseBranch.d.ts +1 -1
  46. package/dist/components/schema/SchemaMapBranch.d.ts +1 -1
  47. package/dist/components/schema/SchemaNode.d.ts +1 -1
  48. package/dist/components/schema/SchemaNotBranch.d.ts +2 -2
  49. package/dist/components/schema/SchemaTab.d.ts +1 -1
  50. package/dist/components/schema/SchemaTree.d.ts +1 -1
  51. package/dist/components/schema/SchemaTreeBranch.d.ts +1 -1
  52. package/dist/components/schema/SchemaTreeRow.d.ts +1 -1
  53. package/dist/components/schema/SchemaTypeLabel.d.ts +1 -1
  54. package/dist/components/schema/SchemaUnionBranch.d.ts +1 -1
  55. package/dist/config/config.d.ts +17 -0
  56. package/dist/containers/AsyncAPI/AsyncAPI.d.ts +6 -1
  57. package/dist/containers/AsyncAPI/AsyncAPIDocumentProvider.d.ts +1 -1
  58. package/dist/containers/AsyncAPI/AsyncAPIRenderer.d.ts +6 -1
  59. package/dist/containers/AsyncAPI/Layout.d.ts +7 -1
  60. package/dist/containers/Information/InformationSection.d.ts +2 -2
  61. package/dist/containers/Information/OpenAPIInformation.d.ts +1 -1
  62. package/dist/containers/Messages/Message.d.ts +1 -1
  63. package/dist/containers/Messages/MessageDetails.d.ts +1 -1
  64. package/dist/containers/Messages/Messages.d.ts +1 -1
  65. package/dist/containers/OpenAPI/Layout.d.ts +7 -1
  66. package/dist/containers/OpenAPI/OpenAPI.d.ts +6 -1
  67. package/dist/containers/OpenAPI/OpenAPIDocumentProvider.d.ts +1 -1
  68. package/dist/containers/OpenAPI/OpenAPIRenderer.d.ts +6 -1
  69. package/dist/containers/Operation/Operation.d.ts +1 -1
  70. package/dist/containers/Operation/Operations.d.ts +1 -1
  71. package/dist/containers/Path/OperationCallbacks.d.ts +1 -1
  72. package/dist/containers/Path/PathOperation.d.ts +1 -1
  73. package/dist/containers/Path/Paths.d.ts +1 -1
  74. package/dist/containers/Path/ResponseLinks.d.ts +1 -1
  75. package/dist/containers/Schema/Schemas.d.ts +1 -1
  76. package/dist/containers/Server/OpenAPIServer.d.ts +1 -1
  77. package/dist/containers/Server/OpenAPIServers.d.ts +1 -1
  78. package/dist/containers/Server/Server.d.ts +1 -1
  79. package/dist/containers/Server/Servers.d.ts +1 -1
  80. package/dist/contexts/useSpec.d.ts +5 -0
  81. package/dist/{crystal-BcGgviMR.cjs → crystal-BA1RB3o9.cjs} +1 -1
  82. package/dist/{crystal-BtD5fR4q.js → crystal-C5EKc8oK.js} +29 -18
  83. package/dist/{csharp-AnFv7wyC.js → csharp-B6YWt0KR.js} +47 -47
  84. package/dist/csharp-IihVQN8U.cjs +1 -0
  85. package/dist/{go-BpetKc7b.cjs → go-By8nj0Vi.cjs} +1 -1
  86. package/dist/{go-CkZ9_bn0.js → go-C8VcBUsu.js} +7 -2
  87. package/dist/helpers/openapiParser.d.ts +1 -1
  88. package/dist/helpers/parser.d.ts +1 -1
  89. package/dist/hooks/useDocumentProviderValue.d.ts +1 -0
  90. package/dist/hooks/useSpecLayoutController.d.ts +17 -1
  91. package/dist/icons/ArrowDown.d.ts +1 -1
  92. package/dist/icons/ArrowRight.d.ts +1 -1
  93. package/dist/icons/AtSymbol.d.ts +1 -1
  94. package/dist/icons/BookOpen.d.ts +1 -1
  95. package/dist/icons/Check.d.ts +1 -1
  96. package/dist/icons/Clipboard.d.ts +1 -1
  97. package/dist/icons/Connection.d.ts +1 -1
  98. package/dist/icons/Copy.d.ts +1 -1
  99. package/dist/icons/ExternalLink.d.ts +1 -1
  100. package/dist/icons/Globe.d.ts +1 -1
  101. package/dist/icons/IconWrapper.d.ts +1 -1
  102. package/dist/icons/Info.d.ts +1 -1
  103. package/dist/icons/Link.d.ts +1 -1
  104. package/dist/icons/Message.d.ts +1 -1
  105. package/dist/icons/Operation.d.ts +1 -1
  106. package/dist/icons/Scale.d.ts +1 -1
  107. package/dist/icons/Schema.d.ts +1 -1
  108. package/dist/icons/Server.d.ts +1 -1
  109. package/dist/icons/ShieldCheck.d.ts +1 -1
  110. package/dist/icons/Tag.d.ts +1 -1
  111. package/dist/icons/Variable.d.ts +1 -1
  112. package/dist/index-1SEMQuYi.js +1704 -0
  113. package/dist/{index-AwzSLIDS.js → index-6q1VqGzf.js} +10357 -10196
  114. package/dist/{index-DsSuZh0k.js → index-BI2__AB3.js} +3637 -3400
  115. package/dist/index-CI3MIo1V.cjs +137 -0
  116. package/dist/index-Ccy_JZ0T.cjs +4 -0
  117. package/dist/index-CfELqow6.cjs +107 -0
  118. package/dist/index-DNsQrlh-.cjs +178 -0
  119. package/dist/{index-D2A8jEpz.js → index-Dbr8eb7Z.js} +4838 -4658
  120. package/dist/index.d.ts +1 -0
  121. package/dist/{java-BicX26Pg.js → java-BoRJOXvw.js} +48 -39
  122. package/dist/java-DFXAwvvK.cjs +1 -0
  123. package/dist/{kotlin-kGuORR5a.cjs → kotlin-B3HlgtFq.cjs} +2 -2
  124. package/dist/{kotlin-BwB8b-YX.js → kotlin-CIEA64JZ.js} +3 -1
  125. package/dist/markdown-assets/protoToJsonSchema-B7uaS_Ic.js +83 -0
  126. package/dist/markdown-assets/{protoToJsonSchema-CBPWaboT.js → protoToJsonSchema-CWtEPUyE.js} +1807 -1788
  127. package/dist/markdown.cjs +37 -37
  128. package/dist/markdown.es.js +927 -900
  129. package/dist/{php-DF4zG2hq.cjs → php-BMUCoWpx.cjs} +2 -2
  130. package/dist/{php-BL35ZHWM.js → php-DJ7KS8rT.js} +39 -33
  131. package/dist/plugins/OperationPluginTabs.d.ts +1 -1
  132. package/dist/plugins/PluginSlot.d.ts +2 -2
  133. package/dist/{protoToJsonSchema-CZm3Y6FF.js → protoToJsonSchema-CbZrqF4-.js} +787 -769
  134. package/dist/protoToJsonSchema-QVW5EW0-.cjs +83 -0
  135. package/dist/{protobufSchemaParser-XBkxg_an.cjs → protobufSchemaParser-BEVutm25.cjs} +1 -1
  136. package/dist/{protobufSchemaParser-BblMCnwh.js → protobufSchemaParser-CtnNrHbS.js} +2 -2
  137. package/dist/public/createSectionRoot.d.ts +1 -1
  138. package/dist/public/openapiSections.d.ts +5 -5
  139. package/dist/public/schemasSection.d.ts +1 -1
  140. package/dist/public/sections.d.ts +5 -5
  141. package/dist/{ruby-nPcbuC2a.cjs → ruby-CGL4kvvH.cjs} +1 -1
  142. package/dist/{ruby-CvOid-1s.js → ruby-t1jbZ0Fv.js} +2 -2
  143. package/dist/{rust-BocnJ3Ns.js → rust-DY-oA2gr.js} +40 -26
  144. package/dist/rust-_vvcEGSJ.cjs +1 -0
  145. package/dist/swift-BAji1QIq.cjs +1 -0
  146. package/dist/{swift-C35Eof-I.js → swift-CdDIFB_j.js} +25 -11
  147. package/dist/utils/theme.d.ts +14 -0
  148. package/package.json +4 -4
  149. package/dist/App.d.ts +0 -2
  150. package/dist/c-C_Sx7N-F.cjs +0 -1
  151. package/dist/csharp-yuAGIuP4.cjs +0 -1
  152. package/dist/index-D0oLUuyJ.cjs +0 -178
  153. package/dist/index-DCDYBZcY.js +0 -1461
  154. package/dist/index-DWjbhYHQ.cjs +0 -107
  155. package/dist/index-QekxGfhl.cjs +0 -139
  156. package/dist/index-d8kJa7YD.cjs +0 -4
  157. package/dist/java-BIk0G-rH.cjs +0 -1
  158. package/dist/main.d.ts +0 -0
  159. package/dist/markdown-assets/protoToJsonSchema-CgkcluFJ.js +0 -83
  160. package/dist/protoToJsonSchema-BLyZqSxO.cjs +0 -83
  161. package/dist/rust-DKnYCg2f.cjs +0 -1
  162. package/dist/swift-CAnH__EC.cjs +0 -1
@@ -0,0 +1,137 @@
1
+ "use strict";var ru=Object.defineProperty;var nu=(t,e,r)=>e in t?ru(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var Xe=(t,e,r)=>nu(t,typeof e!="symbol"?e+"":e,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const zn=require("./index-DNsQrlh-.cjs");function Kn(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}function ht(t,e,r=[]){const n={};for(const[s,i]of Object.entries(t)){const o=[...r,s];if(Array.isArray(i)){n[s]=i.map((a,f)=>typeof a=="object"&&!Array.isArray(a)&&a!==null?ht(a,e,[...o,f.toString()]):a);continue}if(typeof i=="object"&&i!==null){n[s]=ht(i,e,o);continue}n[s]=i}return e(n,r)}const Ze="application/json";function Za(t){const e=t["x-example"],r=t["x-examples"];return delete t["x-example"],delete t["x-examples"],{xExample:e,xExamples:r}}function yt(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)&&Object.keys(t).length>0}function su(t){return yt(t)&&Object.values(t).every(e=>typeof e=="object"&&e!==null&&!Array.isArray(e))}function iu(t){if(typeof t!="object"||t===null)return!0;const e=t,r=["enum","const","not","format","multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","maxItems","minItems","uniqueItems","maxProperties","minProperties","required"];return!(e.allOf||e.oneOf||e.anyOf||e.items||e.$ref||"additionalProperties"in e||r.some(n=>n in e)||typeof e.properties=="object"&&e.properties!==null&&Object.keys(e.properties).length>0)}function Go(t){const e=Object.keys(t);if(e.some(n=>{const s=t[n];return(s==null?void 0:s.example)!==void 0||(s==null?void 0:s.examples)!==void 0}))for(const n of e){const s=t[n];if(!s)continue;const i=s.example!==void 0||s.examples!==void 0;s.schema!==void 0&&!i&&Object.keys(s).length===1&&iu(s.schema)&&delete t[n]}}const ou=new Set(["summary","description","value","externalValue"]);function Qa(t){if(typeof t!="object"||t===null)return!1;const e=t,r="value"in e||"externalValue"in e,n=Object.keys(e).every(s=>ou.has(s));return r&&n}function Ft(t){return Qa(t)?t:{value:t}}const au=/^[a-zA-Z0-9*+.-]+\/[a-zA-Z0-9*+.+-]+$/;function qs(t){return au.test(t)}function cu(t){return Object.entries(t).reduce((e,[r,n])=>(e[r]={value:n},e),{})}const fu=t=>{switch(t){case"application":return"clientCredentials";case"accessCode":return"authorizationCode";case"implicit":return"implicit";case"password":return"password";default:return t}};function ec(t){var r,n,s;let e=t;if(e!==null&&typeof e=="object"&&typeof e.swagger=="string"&&((r=e.swagger)!=null&&r.startsWith("2.0")))e.openapi="3.0.4",delete e.swagger;else return e;if(e.host){const i=Array.isArray(e.schemes)&&((n=e.schemes)!=null&&n.length)?e.schemes:["http"];e.servers=i.map(o=>({url:`${o}://${e.host}${e.basePath??""}`})),delete e.basePath,delete e.schemes,delete e.host}else e.basePath&&(e.servers=[{url:e.basePath}],delete e.basePath);if(e.definitions&&(e.components=Object.assign({},e.components,{schemas:e.definitions}),delete e.definitions,e=ht(e,i=>(typeof i.$ref=="string"&&i.$ref.startsWith("#/definitions/")&&(i.$ref=i.$ref.replace(/^#\/definitions\//,"#/components/schemas/")),i))),e=ht(e,i=>(i.type==="file"&&(i.type="string",i.format="binary"),i)),Object.hasOwn(e,"parameters")){e=ht(e,f=>{if(typeof f.$ref=="string"&&f.$ref.startsWith("#/parameters/")){const c=f.$ref.split("/")[2];if(!c)return f;const u=e.parameters&&typeof e.parameters=="object"&&c in e.parameters?e.parameters[c]:void 0;u&&typeof u=="object"&&"in"in u&&(u.in==="body"||u.in==="formData")?f.$ref=f.$ref.replace(/^#\/parameters\//,"#/components/requestBodies/"):f.$ref=f.$ref.replace(/^#\/parameters\//,"#/components/parameters/")}return f}),e.components??(e.components={});const i={},o={},a=e.parameters&&typeof e.parameters=="object"?e.parameters:{};for(const[f,c]of Object.entries(a))if(c&&typeof c=="object"){if("$ref"in c){const u=Ds(c);i[f]=u}else if("in"in c)if(c.in==="body")o[f]=rc(c,e.consumes??[Ze]);else if(c.in==="formData")o[f]=nc([c],e.consumes);else{const u=Ds(c);i[f]=u}}Object.keys(i).length>0&&(e.components.parameters=i),Object.keys(o).length>0&&(e.components.requestBodies=o),delete e.parameters}if(Object.hasOwn(e,"responses")&&typeof e.responses=="object"&&e.responses!==null){e=ht(e,a=>(typeof a.$ref=="string"&&a.$ref.startsWith("#/responses/")&&(a.$ref=a.$ref.replace(/^#\/responses\//,"#/components/responses/")),a)),e.components??(e.components={});const i={},o=e.responses;for(const[a,f]of Object.entries(o))if(f&&typeof f=="object")if("$ref"in f)i[a]=f;else{const c=f,u=e.produces??[Ze];if(c.schema){typeof c.content!="object"&&(c.content={});for(const l of u)c.content[l]={schema:c.schema};delete c.schema}if(c.examples&&typeof c.examples=="object"){typeof c.content!="object"&&(c.content={});const l=u[0]??Ze;for(const[d,p]of Object.entries(c.examples))if(qs(d))typeof c.content[d]!="object"&&(c.content[d]={}),c.content[d].example=p;else{typeof c.content[l]!="object"&&(c.content[l]={});const h=c.content[l];typeof h.examples!="object"&&(h.examples={}),h.examples[d]=Ft(p)}delete c.examples}c.content&&typeof c.content=="object"&&Go(c.content),c.headers&&typeof c.headers=="object"&&(c.headers=Object.entries(c.headers).reduce((l,[d,p])=>p&&typeof p=="object"?{[d]:Jo(p),...l}:l,{})),i[a]=c}Object.keys(i).length>0&&(e.components.responses=i),delete e.responses}if(typeof e.paths=="object"){for(const i in e.paths)if(Object.hasOwn(e.paths,i)){const o=e.paths&&typeof e.paths=="object"&&i in e.paths?e.paths[i]:void 0;if(!o||typeof o!="object")continue;let a;for(const f in o)if(f==="parameters"&&Object.hasOwn(o,f)){const c=Yo(o.parameters,e.consumes??[Ze]);o.parameters=c.parameters,a=c.requestBody}else if(Object.hasOwn(o,f)){const c=o[f];if(a&&(c.requestBody=a),c.parameters){const u=Yo(c.parameters,c.consumes??e.consumes??[Ze]);c.parameters=u.parameters,u.requestBody&&(c.requestBody=u.requestBody)}if(delete c.consumes,c.responses){for(const u in c.responses)if(Object.hasOwn(c.responses,u)){const l=c.responses[u];if(l.headers&&typeof l.headers=="object"&&(l.headers=Object.entries(l.headers).reduce((d,[p,h])=>h&&typeof h=="object"?{[p]:Jo(h),...d}:d,{})),l.schema){const d=e.produces??c.produces??[Ze];typeof l.content!="object"&&(l.content={});for(const p of d)l.content[p]={schema:l.schema};delete l.schema}if(l.examples&&typeof l.examples=="object"){typeof l.content!="object"&&(l.content={});const p=(e.produces??c.produces??[Ze])[0]??Ze;for(const[h,y]of Object.entries(l.examples))if(qs(h))typeof l.content[h]!="object"&&(l.content[h]={}),l.content[h].example=y;else{typeof l.content[p]!="object"&&(l.content[p]={});const m=l.content[p];typeof m.examples!="object"&&(m.examples={}),m.examples[h]=Ft(y)}delete l.examples}l.content&&typeof l.content=="object"&&Go(l.content)}}delete c.produces,((s=c.parameters)==null?void 0:s.length)===0&&delete c.parameters}}}if(e.securityDefinitions){(typeof e.components!="object"||e.components===null)&&(e.components={}),e.components&&typeof e.components=="object"&&Object.assign(e.components,{securitySchemes:{}});for(const[i,o]of Object.entries(e.securityDefinitions))if(typeof o=="object")if("type"in o&&o.type==="oauth2"){const{flow:a,authorizationUrl:f,tokenUrl:c,scopes:u}=o;e.components&&typeof e.components=="object"&&"securitySchemes"in e.components&&e.components.securitySchemes&&Object.assign(e.components.securitySchemes,{[i]:{type:"oauth2",flows:{[fu(a||"implicit")]:Object.assign({},f&&{authorizationUrl:f},c&&{tokenUrl:c},u&&{scopes:u})}}})}else"type"in o&&o.type==="basic"?e.components&&typeof e.components=="object"&&"securitySchemes"in e.components&&e.components.securitySchemes&&Object.assign(e.components.securitySchemes,{[i]:{type:"http",scheme:"basic"}}):e.components&&typeof e.components=="object"&&"securitySchemes"in e.components&&e.components.securitySchemes&&Object.assign(e.components.securitySchemes,{[i]:o});delete e.securityDefinitions}return delete e.consumes,delete e.produces,e}function mi(t){return["type","format","default","items","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","maxItems","minItems","uniqueItems","enum","multipleOf"].reduce((r,n)=>(Object.hasOwn(t,n)&&(r[n]=t[n],delete t[n]),r),{})}function lu(t){if(t==="formData")throw new Error("Encountered a formData parameter which should have been filtered out by the caller");if(t==="body")throw new Error("Encountered a body parameter which should have been filtered out by the caller");return t}function Ds(t){if(Object.hasOwn(t,"$ref")&&typeof t.$ref=="string")return{$ref:t.$ref};const e=uu(t),r=mi(t),{xExample:n,xExamples:s}=Za(t);if(yt(n)?t.examples=cu(n):yt(s)&&(t.examples=Object.entries(s).reduce((i,[o,a])=>(i[o]=Ft(a),i),{})),delete t.collectionFormat,delete t.default,!t.in)throw new Error('Parameter object must have an "in" property');return{schema:r,...e,...t,in:lu(t.in)}}function Jo(t){if(Object.hasOwn(t,"$ref")&&typeof t.$ref=="string")return{$ref:t.$ref};const e=mi(t);return{...t,schema:e}}const tc={ssv:{style:"spaceDelimited",explode:!1},pipes:{style:"pipeDelimited",explode:!1},multi:{style:"form",explode:!0},csv:{style:"form",explode:!1},tsv:{}},Wo={ssv:{},pipes:{},multi:{},csv:{style:"simple",explode:!1},tsv:{}},ws={header:Wo,query:tc,path:Wo};function uu(t){if(t.type!=="array"||!(t.in==="query"||t.in==="path"||t.in==="header"))return{};const e=t.collectionFormat??"csv";return t.in in ws&&e in ws[t.in]?ws[t.in][e]:{}}function du(t){if(t.type!=="array"||typeof t.collectionFormat!="string")return;const e=tc[t.collectionFormat];if(!(!e||Object.keys(e).length===0))return e}function rc(t,e){const{xExample:r,xExamples:n}=Za(t);delete t.name,delete t.in;const{schema:s,...i}=t,o={content:{},...i};if(o.content)for(const a of e){if(o.content[a]={schema:s},yt(n)&&a in n){const f=n[a];yt(f)&&Object.values(f).every(u=>Qa(u))?o.content[a].examples=f:su(f)?o.content[a].examples=Object.entries(f).reduce((u,[l,d])=>(u[l]=Ft(d),u),{}):o.content[a].examples={default:Ft(f)}}else yt(n)&&!Object.keys(n).some(qs)&&(o.content[a].examples=Object.entries(n).reduce((f,[c,u])=>(f[c]=Ft(u),f),{}));!o.content[a].examples&&yt(r)&&a in r&&(o.content[a].example=r[a])}return o}function nc(t,e=["multipart/form-data"]){var i;const r={content:{}},n=e.filter(o=>o==="multipart/form-data"||o==="application/x-www-form-urlencoded"),s=n.length>0?n:["multipart/form-data"];if(r.content)for(const o of s){r.content[o]={schema:{type:"object",properties:{},required:[]}};const a=(i=r.content)==null?void 0:i[o];if(a!=null&&a.schema&&typeof a.schema=="object"&&"properties"in a.schema){for(const f of t)if(f.name&&a.schema.properties){a.schema.properties[f.name]={...mi(structuredClone(f)),...f.description!==void 0?{description:f.description}:{}};const c=du(f);c&&(a.encoding??(a.encoding={}),a.encoding[f.name]=c),f.required&&Array.isArray(a.schema.required)&&a.schema.required.push(f.name)}}}return r}function Yo(t,e){const r={parameters:t.filter(i=>!(i.in==="body"||i.in==="formData")).map(i=>Ds(i))},n=structuredClone(t.find(i=>i.in==="body")??{});n&&Object.keys(n).length&&(r.requestBody=rc(n,e));const s=t.filter(i=>i.in==="formData");if(s.length>0){const i=nc(s,e);typeof r.requestBody!="object"?r.requestBody=i:r.requestBody={...r.requestBody,content:{...r.requestBody.content,...i.content}},typeof r.requestBody!="object"&&(r.requestBody={content:{}})}return r}const pu=new Set(["properties","items","allOf","anyOf","oneOf","not","additionalProperties","schema"]);function mu(t){return t?!!(t.some(e=>pu.has(e))||t.some(e=>e.endsWith("Schema"))||t.length>=2&&t[0]==="components"&&t[1]==="schemas"):!1}const hu=new Set(["properties","patternProperties","$defs","definitions"]);function An(t){const e=t==null?void 0:t[t.length-1];return e===void 0?!1:e==="schemas"&&(t==null?void 0:t[t.length-2])==="components"?!0:hu.has(e)}const yu=new Set(["example","default","const","enum"]);function gu(t){if(!t)return!1;for(const[e,r]of t.entries())if(yu.has(r)&&!An(t.slice(0,e))||r==="value"&&t[e-2]==="examples"&&!An(t.slice(0,e-2)))return!0;return!1}function sc(t){let e=t;return e===null||typeof e.openapi!="string"||!e.openapi.startsWith("3.0")||(e.openapi="3.1.1",e=ht(e,$u)),e}const $u=(t,e)=>{if(gu(e))return t;if(t.type!==void 0&&t.nullable===!0)t.type=[t.type,"null"],delete t.nullable;else if(t.nullable===!0&&t.type===void 0){if(typeof t.$ref=="string"){const{nullable:i,$ref:o,...a}=t;return{...a,anyOf:[{$ref:o},{type:"null"}]}}if(Array.isArray(t.allOf)){const{nullable:i,allOf:o,...a}=t,f=o.length===1?o[0]:{allOf:o};return{...a,anyOf:[f,{type:"null"}]}}}t.exclusiveMinimum===!0?(t.exclusiveMinimum=t.minimum,delete t.minimum):t.exclusiveMinimum===!1&&delete t.exclusiveMinimum,t.exclusiveMaximum===!0?(t.exclusiveMaximum=t.maximum,delete t.maximum):t.exclusiveMaximum===!1&&delete t.exclusiveMaximum;const r=e==null?void 0:e.some((i,o)=>i==="examples"&&o>0?!An(e.slice(0,o)):!1);if(t.example!==void 0&&!r&&!An(e)&&(mu(e)?t.examples=[t.example]:t.examples={default:{value:t.example}},delete t.example),t.type==="object"&&t.properties!==void 0){const i=e==null?void 0:e.slice(0,-1);if((i==null?void 0:i.some((a,f)=>a==="content"&&(e==null?void 0:e[f+1])==="multipart/form-data"))&&t.properties!==null)for(const a of Object.values(t.properties))typeof a=="object"&&a!==null&&"type"in a&&"format"in a&&a.type==="string"&&a.format==="binary"&&(a.contentMediaType="application/octet-stream",delete a.format)}if(e!=null&&e.includes("content")&&(e!=null&&e.includes("application/octet-stream")))return{};const{format:n,...s}=t;if(t.type==="string"){if(t.format==="binary")return{...s,type:"string",contentMediaType:"application/octet-stream"};if(t.format==="base64")return{...s,type:"string",contentEncoding:"base64"};if(t.format==="byte"){const i=e==null?void 0:e.slice(0,-1),o=i==null?void 0:i.find((a,f)=>(e==null?void 0:e[f-1])==="content");return{...s,type:"string",contentEncoding:"base64",contentMediaType:o}}}return t["x-webhooks"]!==void 0&&(e===void 0||e.length===0)&&(t.webhooks=t["x-webhooks"],delete t["x-webhooks"]),t},Wt=t=>{if(t===null||typeof t!="object")return!1;const e=Object.getPrototypeOf(t);return e===Object.prototype||e===null},bu={title:"A JSON Schema for Swagger 2.0 API.",id:"http://swagger.io/v2/schema.json#",$schema:"http://json-schema.org/draft-04/schema#",type:"object",required:["swagger","info","paths"],additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{swagger:{type:"string",enum:["2.0"],description:"The Swagger version of this document."},info:{$ref:"#/definitions/info"},host:{type:"string",pattern:"^[^{}/ :\\\\]+(?::\\d+)?$",description:"The host (name or ip) of the API. Example: 'swagger.io'"},basePath:{type:"string",pattern:"^/",description:"The base path to the API. Example: '/api'."},schemes:{$ref:"#/definitions/schemesList"},consumes:{description:"A list of MIME types accepted by the API.",allOf:[{$ref:"#/definitions/mediaTypeList"}]},produces:{description:"A list of MIME types the API can produce.",allOf:[{$ref:"#/definitions/mediaTypeList"}]},paths:{$ref:"#/definitions/paths"},definitions:{$ref:"#/definitions/definitions"},parameters:{$ref:"#/definitions/parameterDefinitions"},responses:{$ref:"#/definitions/responseDefinitions"},security:{$ref:"#/definitions/security"},securityDefinitions:{$ref:"#/definitions/securityDefinitions"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:!0},externalDocs:{$ref:"#/definitions/externalDocs"}},definitions:{info:{type:"object",description:"General information about the API.",required:["version","title"],additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{title:{type:"string",description:"A unique and precise title of the API."},version:{type:"string",description:"A semantic version number of the API."},description:{type:"string",description:"A longer description of the API. Should be different from the title. GitHub Flavored Markdown is allowed."},termsOfService:{type:"string",description:"The terms of service for the API."},contact:{$ref:"#/definitions/contact"},license:{$ref:"#/definitions/license"}}},contact:{type:"object",description:"Contact information for the owners of the API.",additionalProperties:!1,properties:{name:{type:"string",description:"The identifying name of the contact person/organization."},url:{type:"string",description:"The URL pointing to the contact information.",format:"uri"},email:{type:"string",description:"The email address of the contact person/organization.",format:"email"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},license:{type:"object",required:["name"],additionalProperties:!1,properties:{name:{type:"string",description:"The name of the license type. It's encouraged to use an OSI compatible license."},url:{type:"string",description:"The URL pointing to the license.",format:"uri"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},paths:{type:"object",description:"Relative paths to the individual endpoints. They must be relative to the 'basePath'.",patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"},"^/":{oneOf:[{$ref:"#/definitions/pathItem"},{$ref:"#/definitions/jsonReference"}]}},additionalProperties:!1},definitions:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},description:"One or more JSON objects describing the schemas being consumed and produced by the API."},parameterDefinitions:{type:"object",additionalProperties:{$ref:"#/definitions/parameter"},description:"One or more JSON representations for parameters"},responseDefinitions:{type:"object",additionalProperties:{$ref:"#/definitions/response"},description:"One or more JSON representations for responses"},externalDocs:{type:"object",additionalProperties:!1,description:"information about external documentation",required:["url"],properties:{description:{type:"string"},url:{type:"string",format:"uri"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},examples:{type:"object",additionalProperties:!0},mimeType:{type:"string",description:"The MIME type of the HTTP message."},operation:{type:"object",required:["responses"],additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{tags:{type:"array",items:{type:"string"},uniqueItems:!0},summary:{type:"string",description:"A brief summary of the operation."},description:{type:"string",description:"A longer description of the operation, GitHub Flavored Markdown is allowed."},externalDocs:{$ref:"#/definitions/externalDocs"},operationId:{type:"string",description:"A unique identifier of the operation."},produces:{description:"A list of MIME types the API can produce.",allOf:[{$ref:"#/definitions/mediaTypeList"}]},consumes:{description:"A list of MIME types the API can consume.",allOf:[{$ref:"#/definitions/mediaTypeList"}]},parameters:{$ref:"#/definitions/parametersList"},responses:{$ref:"#/definitions/responses"},schemes:{$ref:"#/definitions/schemesList"},deprecated:{type:"boolean",default:!1},security:{$ref:"#/definitions/security"}}},pathItem:{type:"object",additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{$ref:{type:"string"},get:{$ref:"#/definitions/operation"},put:{$ref:"#/definitions/operation"},post:{$ref:"#/definitions/operation"},delete:{$ref:"#/definitions/operation"},options:{$ref:"#/definitions/operation"},head:{$ref:"#/definitions/operation"},patch:{$ref:"#/definitions/operation"},parameters:{$ref:"#/definitions/parametersList"}}},responses:{type:"object",description:"Response objects names can either be any valid HTTP status code or 'default'.",minProperties:1,additionalProperties:!1,patternProperties:{"^([0-9]{3})$|^(default)$":{$ref:"#/definitions/responseValue"},"^x-":{$ref:"#/definitions/vendorExtension"}},not:{type:"object",additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}}},responseValue:{oneOf:[{$ref:"#/definitions/response"},{$ref:"#/definitions/jsonReference"}]},response:{type:"object",required:["description"],properties:{description:{type:"string"},schema:{oneOf:[{$ref:"#/definitions/schema"},{$ref:"#/definitions/fileSchema"}]},headers:{$ref:"#/definitions/headers"},examples:{$ref:"#/definitions/examples"}},additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},headers:{type:"object",additionalProperties:{$ref:"#/definitions/header"}},header:{type:"object",additionalProperties:!1,required:["type"],properties:{type:{type:"string",enum:["string","number","integer","boolean","array"]},format:{type:"string"},items:{$ref:"#/definitions/primitivesItems"},collectionFormat:{$ref:"#/definitions/collectionFormat"},default:{$ref:"#/definitions/default"},maximum:{$ref:"#/definitions/maximum"},exclusiveMaximum:{$ref:"#/definitions/exclusiveMaximum"},minimum:{$ref:"#/definitions/minimum"},exclusiveMinimum:{$ref:"#/definitions/exclusiveMinimum"},maxLength:{$ref:"#/definitions/maxLength"},minLength:{$ref:"#/definitions/minLength"},pattern:{$ref:"#/definitions/pattern"},maxItems:{$ref:"#/definitions/maxItems"},minItems:{$ref:"#/definitions/minItems"},uniqueItems:{$ref:"#/definitions/uniqueItems"},enum:{$ref:"#/definitions/enum"},multipleOf:{$ref:"#/definitions/multipleOf"},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},vendorExtension:{description:"Any property starting with x- is valid.",additionalProperties:!0,additionalItems:!0},bodyParameter:{type:"object",required:["name","in","schema"],patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{description:{type:"string",description:"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},name:{type:"string",description:"The name of the parameter."},in:{type:"string",description:"Determines the location of the parameter.",enum:["body"]},required:{type:"boolean",description:"Determines whether or not this parameter is required or optional.",default:!1},schema:{$ref:"#/definitions/schema"}},additionalProperties:!1},headerParameterSubSchema:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{required:{type:"boolean",description:"Determines whether or not this parameter is required or optional.",default:!1},in:{type:"string",description:"Determines the location of the parameter.",enum:["header"]},description:{type:"string",description:"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},name:{type:"string",description:"The name of the parameter."},type:{type:"string",enum:["string","number","boolean","integer","array"]},format:{type:"string"},items:{$ref:"#/definitions/primitivesItems"},collectionFormat:{$ref:"#/definitions/collectionFormat"},default:{$ref:"#/definitions/default"},maximum:{$ref:"#/definitions/maximum"},exclusiveMaximum:{$ref:"#/definitions/exclusiveMaximum"},minimum:{$ref:"#/definitions/minimum"},exclusiveMinimum:{$ref:"#/definitions/exclusiveMinimum"},maxLength:{$ref:"#/definitions/maxLength"},minLength:{$ref:"#/definitions/minLength"},pattern:{$ref:"#/definitions/pattern"},maxItems:{$ref:"#/definitions/maxItems"},minItems:{$ref:"#/definitions/minItems"},uniqueItems:{$ref:"#/definitions/uniqueItems"},enum:{$ref:"#/definitions/enum"},multipleOf:{$ref:"#/definitions/multipleOf"}}},queryParameterSubSchema:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{required:{type:"boolean",description:"Determines whether or not this parameter is required or optional.",default:!1},in:{type:"string",description:"Determines the location of the parameter.",enum:["query"]},description:{type:"string",description:"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},name:{type:"string",description:"The name of the parameter."},allowEmptyValue:{type:"boolean",default:!1,description:"allows sending a parameter by name only or with an empty value."},type:{type:"string",enum:["string","number","boolean","integer","array"]},format:{type:"string"},items:{$ref:"#/definitions/primitivesItems"},collectionFormat:{$ref:"#/definitions/collectionFormatWithMulti"},default:{$ref:"#/definitions/default"},maximum:{$ref:"#/definitions/maximum"},exclusiveMaximum:{$ref:"#/definitions/exclusiveMaximum"},minimum:{$ref:"#/definitions/minimum"},exclusiveMinimum:{$ref:"#/definitions/exclusiveMinimum"},maxLength:{$ref:"#/definitions/maxLength"},minLength:{$ref:"#/definitions/minLength"},pattern:{$ref:"#/definitions/pattern"},maxItems:{$ref:"#/definitions/maxItems"},minItems:{$ref:"#/definitions/minItems"},uniqueItems:{$ref:"#/definitions/uniqueItems"},enum:{$ref:"#/definitions/enum"},multipleOf:{$ref:"#/definitions/multipleOf"}}},formDataParameterSubSchema:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{required:{type:"boolean",description:"Determines whether or not this parameter is required or optional.",default:!1},in:{type:"string",description:"Determines the location of the parameter.",enum:["formData"]},description:{type:"string",description:"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},name:{type:"string",description:"The name of the parameter."},allowEmptyValue:{type:"boolean",default:!1,description:"allows sending a parameter by name only or with an empty value."},type:{type:"string",enum:["string","number","boolean","integer","array","file"]},format:{type:"string"},items:{$ref:"#/definitions/primitivesItems"},collectionFormat:{$ref:"#/definitions/collectionFormatWithMulti"},default:{$ref:"#/definitions/default"},maximum:{$ref:"#/definitions/maximum"},exclusiveMaximum:{$ref:"#/definitions/exclusiveMaximum"},minimum:{$ref:"#/definitions/minimum"},exclusiveMinimum:{$ref:"#/definitions/exclusiveMinimum"},maxLength:{$ref:"#/definitions/maxLength"},minLength:{$ref:"#/definitions/minLength"},pattern:{$ref:"#/definitions/pattern"},maxItems:{$ref:"#/definitions/maxItems"},minItems:{$ref:"#/definitions/minItems"},uniqueItems:{$ref:"#/definitions/uniqueItems"},enum:{$ref:"#/definitions/enum"},multipleOf:{$ref:"#/definitions/multipleOf"}}},pathParameterSubSchema:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},required:["required"],properties:{required:{type:"boolean",enum:[!0],description:"Determines whether or not this parameter is required or optional."},in:{type:"string",description:"Determines the location of the parameter.",enum:["path"]},description:{type:"string",description:"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},name:{type:"string",description:"The name of the parameter."},type:{type:"string",enum:["string","number","boolean","integer","array"]},format:{type:"string"},items:{$ref:"#/definitions/primitivesItems"},collectionFormat:{$ref:"#/definitions/collectionFormat"},default:{$ref:"#/definitions/default"},maximum:{$ref:"#/definitions/maximum"},exclusiveMaximum:{$ref:"#/definitions/exclusiveMaximum"},minimum:{$ref:"#/definitions/minimum"},exclusiveMinimum:{$ref:"#/definitions/exclusiveMinimum"},maxLength:{$ref:"#/definitions/maxLength"},minLength:{$ref:"#/definitions/minLength"},pattern:{$ref:"#/definitions/pattern"},maxItems:{$ref:"#/definitions/maxItems"},minItems:{$ref:"#/definitions/minItems"},uniqueItems:{$ref:"#/definitions/uniqueItems"},enum:{$ref:"#/definitions/enum"},multipleOf:{$ref:"#/definitions/multipleOf"}}},nonBodyParameter:{type:"object",required:["name","in","type"],oneOf:[{$ref:"#/definitions/headerParameterSubSchema"},{$ref:"#/definitions/formDataParameterSubSchema"},{$ref:"#/definitions/queryParameterSubSchema"},{$ref:"#/definitions/pathParameterSubSchema"}]},parameter:{oneOf:[{$ref:"#/definitions/bodyParameter"},{$ref:"#/definitions/nonBodyParameter"}]},schema:{type:"object",description:"A deterministic version of a JSON Schema object.",patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{$ref:{type:"string"},format:{type:"string"},title:{$ref:"http://json-schema.org/draft-04/schema#/properties/title"},description:{$ref:"http://json-schema.org/draft-04/schema#/properties/description"},default:{$ref:"http://json-schema.org/draft-04/schema#/properties/default"},multipleOf:{$ref:"http://json-schema.org/draft-04/schema#/properties/multipleOf"},maximum:{$ref:"http://json-schema.org/draft-04/schema#/properties/maximum"},exclusiveMaximum:{$ref:"http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum"},minimum:{$ref:"http://json-schema.org/draft-04/schema#/properties/minimum"},exclusiveMinimum:{$ref:"http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum"},maxLength:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},minLength:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},pattern:{$ref:"http://json-schema.org/draft-04/schema#/properties/pattern"},maxItems:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},minItems:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},uniqueItems:{$ref:"http://json-schema.org/draft-04/schema#/properties/uniqueItems"},maxProperties:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},minProperties:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},required:{$ref:"http://json-schema.org/draft-04/schema#/definitions/stringArray"},enum:{$ref:"http://json-schema.org/draft-04/schema#/properties/enum"},additionalProperties:{anyOf:[{$ref:"#/definitions/schema"},{type:"boolean"}],default:{}},type:{$ref:"http://json-schema.org/draft-04/schema#/properties/type"},items:{anyOf:[{$ref:"#/definitions/schema"},{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}}],default:{}},allOf:{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}},properties:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},default:{}},discriminator:{type:"string"},readOnly:{type:"boolean",default:!1},xml:{$ref:"#/definitions/xml"},externalDocs:{$ref:"#/definitions/externalDocs"},example:{}},additionalProperties:!1},fileSchema:{type:"object",description:"A deterministic version of a JSON Schema object.",patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},required:["type"],properties:{format:{type:"string"},title:{$ref:"http://json-schema.org/draft-04/schema#/properties/title"},description:{$ref:"http://json-schema.org/draft-04/schema#/properties/description"},default:{$ref:"http://json-schema.org/draft-04/schema#/properties/default"},required:{$ref:"http://json-schema.org/draft-04/schema#/definitions/stringArray"},type:{type:"string",enum:["file"]},readOnly:{type:"boolean",default:!1},externalDocs:{$ref:"#/definitions/externalDocs"},example:{}},additionalProperties:!1},primitivesItems:{type:"object",additionalProperties:!1,properties:{type:{type:"string",enum:["string","number","integer","boolean","array"]},format:{type:"string"},items:{$ref:"#/definitions/primitivesItems"},collectionFormat:{$ref:"#/definitions/collectionFormat"},default:{$ref:"#/definitions/default"},maximum:{$ref:"#/definitions/maximum"},exclusiveMaximum:{$ref:"#/definitions/exclusiveMaximum"},minimum:{$ref:"#/definitions/minimum"},exclusiveMinimum:{$ref:"#/definitions/exclusiveMinimum"},maxLength:{$ref:"#/definitions/maxLength"},minLength:{$ref:"#/definitions/minLength"},pattern:{$ref:"#/definitions/pattern"},maxItems:{$ref:"#/definitions/maxItems"},minItems:{$ref:"#/definitions/minItems"},uniqueItems:{$ref:"#/definitions/uniqueItems"},enum:{$ref:"#/definitions/enum"},multipleOf:{$ref:"#/definitions/multipleOf"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},security:{type:"array",items:{$ref:"#/definitions/securityRequirement"},uniqueItems:!0},securityRequirement:{type:"object",additionalProperties:{type:"array",items:{type:"string"},uniqueItems:!0}},xml:{type:"object",additionalProperties:!1,properties:{name:{type:"string"},namespace:{type:"string"},prefix:{type:"string"},attribute:{type:"boolean",default:!1},wrapped:{type:"boolean",default:!1}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},tag:{type:"object",additionalProperties:!1,required:["name"],properties:{name:{type:"string"},description:{type:"string"},externalDocs:{$ref:"#/definitions/externalDocs"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},securityDefinitions:{type:"object",additionalProperties:{oneOf:[{$ref:"#/definitions/basicAuthenticationSecurity"},{$ref:"#/definitions/apiKeySecurity"},{$ref:"#/definitions/oauth2ImplicitSecurity"},{$ref:"#/definitions/oauth2PasswordSecurity"},{$ref:"#/definitions/oauth2ApplicationSecurity"},{$ref:"#/definitions/oauth2AccessCodeSecurity"}]}},basicAuthenticationSecurity:{type:"object",additionalProperties:!1,required:["type"],properties:{type:{type:"string",enum:["basic"]},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},apiKeySecurity:{type:"object",additionalProperties:!1,required:["type","name","in"],properties:{type:{type:"string",enum:["apiKey"]},name:{type:"string"},in:{type:"string",enum:["header","query"]},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},oauth2ImplicitSecurity:{type:"object",additionalProperties:!1,required:["type","flow","authorizationUrl"],properties:{type:{type:"string",enum:["oauth2"]},flow:{type:"string",enum:["implicit"]},scopes:{$ref:"#/definitions/oauth2Scopes"},authorizationUrl:{type:"string",format:"uri"},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},oauth2PasswordSecurity:{type:"object",additionalProperties:!1,required:["type","flow","tokenUrl"],properties:{type:{type:"string",enum:["oauth2"]},flow:{type:"string",enum:["password"]},scopes:{$ref:"#/definitions/oauth2Scopes"},tokenUrl:{type:"string",format:"uri"},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},oauth2ApplicationSecurity:{type:"object",additionalProperties:!1,required:["type","flow","tokenUrl"],properties:{type:{type:"string",enum:["oauth2"]},flow:{type:"string",enum:["application"]},scopes:{$ref:"#/definitions/oauth2Scopes"},tokenUrl:{type:"string",format:"uri"},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},oauth2AccessCodeSecurity:{type:"object",additionalProperties:!1,required:["type","flow","authorizationUrl","tokenUrl"],properties:{type:{type:"string",enum:["oauth2"]},flow:{type:"string",enum:["accessCode"]},scopes:{$ref:"#/definitions/oauth2Scopes"},authorizationUrl:{type:"string",format:"uri"},tokenUrl:{type:"string",format:"uri"},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},oauth2Scopes:{type:"object",additionalProperties:{type:"string"}},mediaTypeList:{type:"array",items:{$ref:"#/definitions/mimeType"},uniqueItems:!0},parametersList:{type:"array",description:"The parameters needed to send a valid API call.",additionalItems:!1,items:{oneOf:[{$ref:"#/definitions/parameter"},{$ref:"#/definitions/jsonReference"}]},uniqueItems:!0},schemesList:{type:"array",description:"The transfer protocol of the API.",items:{type:"string",enum:["http","https","ws","wss"]},uniqueItems:!0},collectionFormat:{type:"string",enum:["csv","ssv","tsv","pipes"],default:"csv"},collectionFormatWithMulti:{type:"string",enum:["csv","ssv","tsv","pipes","multi"],default:"csv"},title:{$ref:"http://json-schema.org/draft-04/schema#/properties/title"},description:{$ref:"http://json-schema.org/draft-04/schema#/properties/description"},default:{$ref:"http://json-schema.org/draft-04/schema#/properties/default"},multipleOf:{$ref:"http://json-schema.org/draft-04/schema#/properties/multipleOf"},maximum:{$ref:"http://json-schema.org/draft-04/schema#/properties/maximum"},exclusiveMaximum:{$ref:"http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum"},minimum:{$ref:"http://json-schema.org/draft-04/schema#/properties/minimum"},exclusiveMinimum:{$ref:"http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum"},maxLength:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},minLength:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},pattern:{$ref:"http://json-schema.org/draft-04/schema#/properties/pattern"},maxItems:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},minItems:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},uniqueItems:{$ref:"http://json-schema.org/draft-04/schema#/properties/uniqueItems"},enum:{$ref:"http://json-schema.org/draft-04/schema#/properties/enum"},jsonReference:{type:"object",required:["$ref"],additionalProperties:!1,properties:{$ref:{type:"string"}}}}},vu={id:"https://spec.openapis.org/oas/3.0/schema/2021-09-28",$schema:"http://json-schema.org/draft-04/schema#",description:"The description of OpenAPI v3.0.x documents, as defined by https://spec.openapis.org/oas/v3.0.3",type:"object",required:["openapi","info","paths"],properties:{openapi:{type:"string",pattern:"^3\\.0\\.\\d(-.+)?$"},info:{$ref:"#/definitions/Info"},externalDocs:{$ref:"#/definitions/ExternalDocumentation"},servers:{type:"array",items:{$ref:"#/definitions/Server"}},security:{type:"array",items:{$ref:"#/definitions/SecurityRequirement"}},tags:{type:"array",items:{$ref:"#/definitions/Tag"},uniqueItems:!0},paths:{$ref:"#/definitions/Paths"},components:{$ref:"#/definitions/Components"}},patternProperties:{"^x-":{}},additionalProperties:!1,definitions:{Reference:{type:"object",required:["$ref"],patternProperties:{"^\\$ref$":{type:"string",format:"uri-reference"}}},Info:{type:"object",required:["title","version"],properties:{title:{type:"string"},description:{type:"string"},termsOfService:{type:"string",format:"uri-reference"},contact:{$ref:"#/definitions/Contact"},license:{$ref:"#/definitions/License"},version:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:!1},Contact:{type:"object",properties:{name:{type:"string"},url:{type:"string",format:"uri-reference"},email:{type:"string",format:"email"}},patternProperties:{"^x-":{}},additionalProperties:!1},License:{type:"object",required:["name"],properties:{name:{type:"string"},url:{type:"string",format:"uri-reference"}},patternProperties:{"^x-":{}},additionalProperties:!1},Server:{type:"object",required:["url"],properties:{url:{type:"string"},description:{type:"string"},variables:{type:"object",additionalProperties:{$ref:"#/definitions/ServerVariable"}}},patternProperties:{"^x-":{}},additionalProperties:!1},ServerVariable:{type:"object",required:["default"],properties:{enum:{type:"array",items:{type:"string"}},default:{type:"string"},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:!1},Components:{type:"object",properties:{schemas:{type:"object",patternProperties:{"^[a-zA-Z0-9\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Schema"},{$ref:"#/definitions/Reference"}]}}},responses:{type:"object",patternProperties:{"^[a-zA-Z0-9\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/Response"}]}}},parameters:{type:"object",patternProperties:{"^[a-zA-Z0-9\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/Parameter"}]}}},examples:{type:"object",patternProperties:{"^[a-zA-Z0-9\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/Example"}]}}},requestBodies:{type:"object",patternProperties:{"^[a-zA-Z0-9\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/RequestBody"}]}}},headers:{type:"object",patternProperties:{"^[a-zA-Z0-9\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/Header"}]}}},securitySchemes:{type:"object",patternProperties:{"^[a-zA-Z0-9\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/SecurityScheme"}]}}},links:{type:"object",patternProperties:{"^[a-zA-Z0-9\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/Link"}]}}},callbacks:{type:"object",patternProperties:{"^[a-zA-Z0-9\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/Callback"}]}}}},patternProperties:{"^x-":{}},additionalProperties:!1},Schema:{type:"object",properties:{title:{type:"string"},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{type:"integer",minimum:0},minLength:{type:"integer",minimum:0,default:0},pattern:{type:"string",format:"regex"},maxItems:{type:"integer",minimum:0},minItems:{type:"integer",minimum:0,default:0},uniqueItems:{type:"boolean",default:!1},maxProperties:{type:"integer",minimum:0},minProperties:{type:"integer",minimum:0,default:0},required:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0},enum:{type:"array",items:{},minItems:1,uniqueItems:!1},type:{type:"string",enum:["array","boolean","integer","number","object","string"]},not:{oneOf:[{$ref:"#/definitions/Schema"},{$ref:"#/definitions/Reference"}]},allOf:{type:"array",items:{oneOf:[{$ref:"#/definitions/Schema"},{$ref:"#/definitions/Reference"}]}},oneOf:{type:"array",items:{oneOf:[{$ref:"#/definitions/Schema"},{$ref:"#/definitions/Reference"}]}},anyOf:{type:"array",items:{oneOf:[{$ref:"#/definitions/Schema"},{$ref:"#/definitions/Reference"}]}},items:{oneOf:[{$ref:"#/definitions/Schema"},{$ref:"#/definitions/Reference"}]},properties:{type:"object",additionalProperties:{oneOf:[{$ref:"#/definitions/Schema"},{$ref:"#/definitions/Reference"}]}},additionalProperties:{oneOf:[{$ref:"#/definitions/Schema"},{$ref:"#/definitions/Reference"},{type:"boolean"}],default:!0},description:{type:"string"},format:{type:"string"},default:{},nullable:{type:"boolean",default:!1},discriminator:{$ref:"#/definitions/Discriminator"},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},example:{},externalDocs:{$ref:"#/definitions/ExternalDocumentation"},deprecated:{type:"boolean",default:!1},xml:{$ref:"#/definitions/XML"}},patternProperties:{"^x-":{}},additionalProperties:!1},Discriminator:{type:"object",required:["propertyName"],properties:{propertyName:{type:"string"},mapping:{type:"object",additionalProperties:{type:"string"}}}},XML:{type:"object",properties:{name:{type:"string"},namespace:{type:"string",format:"uri"},prefix:{type:"string"},attribute:{type:"boolean",default:!1},wrapped:{type:"boolean",default:!1}},patternProperties:{"^x-":{}},additionalProperties:!1},Response:{type:"object",required:["description"],properties:{description:{type:"string"},headers:{type:"object",additionalProperties:{oneOf:[{$ref:"#/definitions/Header"},{$ref:"#/definitions/Reference"}]}},content:{type:"object",additionalProperties:{$ref:"#/definitions/MediaType"}},links:{type:"object",additionalProperties:{oneOf:[{$ref:"#/definitions/Link"},{$ref:"#/definitions/Reference"}]}}},patternProperties:{"^x-":{}},additionalProperties:!1},MediaType:{type:"object",properties:{schema:{oneOf:[{$ref:"#/definitions/Schema"},{$ref:"#/definitions/Reference"}]},example:{},examples:{type:"object",additionalProperties:{oneOf:[{$ref:"#/definitions/Example"},{$ref:"#/definitions/Reference"}]}},encoding:{type:"object",additionalProperties:{$ref:"#/definitions/Encoding"}}},patternProperties:{"^x-":{}},additionalProperties:!1,allOf:[{$ref:"#/definitions/ExampleXORExamples"}]},Example:{type:"object",properties:{summary:{type:"string"},description:{type:"string"},value:{},externalValue:{type:"string",format:"uri-reference"}},patternProperties:{"^x-":{}},additionalProperties:!1},Header:{type:"object",properties:{description:{type:"string"},required:{type:"boolean",default:!1},deprecated:{type:"boolean",default:!1},allowEmptyValue:{type:"boolean",default:!1},style:{type:"string",enum:["simple"],default:"simple"},explode:{type:"boolean"},allowReserved:{type:"boolean",default:!1},schema:{oneOf:[{$ref:"#/definitions/Schema"},{$ref:"#/definitions/Reference"}]},content:{type:"object",additionalProperties:{$ref:"#/definitions/MediaType"},minProperties:1,maxProperties:1},example:{},examples:{type:"object",additionalProperties:{oneOf:[{$ref:"#/definitions/Example"},{$ref:"#/definitions/Reference"}]}}},patternProperties:{"^x-":{}},additionalProperties:!1,allOf:[{$ref:"#/definitions/ExampleXORExamples"},{$ref:"#/definitions/SchemaXORContent"}]},Paths:{type:"object",patternProperties:{"^\\/":{$ref:"#/definitions/PathItemOrReference"},"^x-":{}},additionalProperties:!1},PathItem:{type:"object",properties:{summary:{type:"string"},description:{type:"string"},servers:{type:"array",items:{$ref:"#/definitions/Server"}},parameters:{type:"array",items:{oneOf:[{$ref:"#/definitions/Parameter"},{$ref:"#/definitions/Reference"}]},uniqueItems:!0}},patternProperties:{"^(get|put|post|delete|options|head|patch|trace)$":{$ref:"#/definitions/Operation"},"^x-":{}},additionalProperties:!1},PathItemOrReference:{oneOf:[{$ref:"#/definitions/PathItem"},{$ref:"#/definitions/Reference"}]},Operation:{type:"object",required:["responses"],properties:{tags:{type:"array",items:{type:"string"}},summary:{type:"string"},description:{type:"string"},externalDocs:{$ref:"#/definitions/ExternalDocumentation"},operationId:{type:"string"},parameters:{type:"array",items:{oneOf:[{$ref:"#/definitions/Parameter"},{$ref:"#/definitions/Reference"}]},uniqueItems:!0},requestBody:{oneOf:[{$ref:"#/definitions/RequestBody"},{$ref:"#/definitions/Reference"}]},responses:{$ref:"#/definitions/Responses"},callbacks:{type:"object",additionalProperties:{oneOf:[{$ref:"#/definitions/Callback"},{$ref:"#/definitions/Reference"}]}},deprecated:{type:"boolean",default:!1},security:{type:"array",items:{$ref:"#/definitions/SecurityRequirement"}},servers:{type:"array",items:{$ref:"#/definitions/Server"}}},patternProperties:{"^x-":{}},additionalProperties:!1},Responses:{type:"object",properties:{default:{oneOf:[{$ref:"#/definitions/Response"},{$ref:"#/definitions/Reference"}]}},patternProperties:{"^[1-5](?:\\d{2}|XX)$":{oneOf:[{$ref:"#/definitions/Response"},{$ref:"#/definitions/Reference"}]},"^x-":{}},minProperties:1,additionalProperties:!1},SecurityRequirement:{type:"object",additionalProperties:{type:"array",items:{type:"string"}}},Tag:{type:"object",required:["name"],properties:{name:{type:"string"},description:{type:"string"},externalDocs:{$ref:"#/definitions/ExternalDocumentation"}},patternProperties:{"^x-":{}},additionalProperties:!1},ExternalDocumentation:{type:"object",required:["url"],properties:{description:{type:"string"},url:{type:"string",format:"uri-reference"}},patternProperties:{"^x-":{}},additionalProperties:!1},ExampleXORExamples:{description:"Example and examples are mutually exclusive",not:{required:["example","examples"]}},SchemaXORContent:{description:"Schema and content are mutually exclusive, at least one is required",not:{required:["schema","content"]},oneOf:[{required:["schema"]},{required:["content"],description:"Some properties are not allowed if content is present",allOf:[{not:{required:["style"]}},{not:{required:["explode"]}},{not:{required:["allowReserved"]}},{not:{required:["example"]}},{not:{required:["examples"]}}]}]},Parameter:{type:"object",properties:{name:{type:"string"},in:{type:"string"},description:{type:"string"},required:{type:"boolean",default:!1},deprecated:{type:"boolean",default:!1},allowEmptyValue:{type:"boolean",default:!1},style:{type:"string"},explode:{type:"boolean"},allowReserved:{type:"boolean",default:!1},schema:{oneOf:[{$ref:"#/definitions/Schema"},{$ref:"#/definitions/Reference"}]},content:{type:"object",additionalProperties:{$ref:"#/definitions/MediaType"},minProperties:1,maxProperties:1},example:{},examples:{type:"object",additionalProperties:{oneOf:[{$ref:"#/definitions/Example"},{$ref:"#/definitions/Reference"}]}}},patternProperties:{"^x-":{}},additionalProperties:!1,required:["name","in"],allOf:[{$ref:"#/definitions/ExampleXORExamples"},{$ref:"#/definitions/SchemaXORContent"},{$ref:"#/definitions/ParameterLocation"}]},ParameterLocation:{description:"Parameter location",oneOf:[{description:"Parameter in path",required:["required"],properties:{in:{enum:["path"]},style:{enum:["matrix","label","simple"],default:"simple"},required:{enum:[!0]}}},{description:"Parameter in query",properties:{in:{enum:["query"]},style:{enum:["form","spaceDelimited","pipeDelimited","deepObject"],default:"form"}}},{description:"Parameter in header",properties:{in:{enum:["header"]},style:{enum:["simple"],default:"simple"}}},{description:"Parameter in cookie",properties:{in:{enum:["cookie"]},style:{enum:["form"],default:"form"}}}]},RequestBody:{type:"object",required:["content"],properties:{description:{type:"string"},content:{type:"object",additionalProperties:{$ref:"#/definitions/MediaType"}},required:{type:"boolean",default:!1}},patternProperties:{"^x-":{}},additionalProperties:!1},SecurityScheme:{oneOf:[{$ref:"#/definitions/APIKeySecurityScheme"},{$ref:"#/definitions/HTTPSecurityScheme"},{$ref:"#/definitions/OAuth2SecurityScheme"},{$ref:"#/definitions/OpenIdConnectSecurityScheme"}],discriminator:{propertyName:"type"}},APIKeySecurityScheme:{type:"object",required:["type","name","in"],properties:{type:{type:"string",enum:["apiKey"]},name:{type:"string"},in:{type:"string",enum:["header","query","cookie"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:!1},HTTPSecurityScheme:{type:"object",required:["scheme","type"],properties:{scheme:{type:"string"},bearerFormat:{type:"string"},description:{type:"string"},type:{type:"string",enum:["http"]}},patternProperties:{"^x-":{}},additionalProperties:!1,oneOf:[{description:"Bearer",properties:{scheme:{type:"string",pattern:"^[Bb][Ee][Aa][Rr][Ee][Rr]$"}}},{description:"Non Bearer",not:{required:["bearerFormat"]},properties:{scheme:{not:{type:"string",pattern:"^[Bb][Ee][Aa][Rr][Ee][Rr]$"}}}}]},OAuth2SecurityScheme:{type:"object",required:["type","flows"],properties:{type:{type:"string",enum:["oauth2"]},flows:{$ref:"#/definitions/OAuthFlows"},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:!1},OpenIdConnectSecurityScheme:{type:"object",required:["type","openIdConnectUrl"],properties:{type:{type:"string",enum:["openIdConnect"]},openIdConnectUrl:{type:"string",format:"uri-reference"},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:!1},OAuthFlows:{type:"object",properties:{implicit:{$ref:"#/definitions/ImplicitOAuthFlow"},password:{$ref:"#/definitions/PasswordOAuthFlow"},clientCredentials:{$ref:"#/definitions/ClientCredentialsFlow"},authorizationCode:{$ref:"#/definitions/AuthorizationCodeOAuthFlow"}},patternProperties:{"^x-":{}},additionalProperties:!1},ImplicitOAuthFlow:{type:"object",required:["authorizationUrl","scopes"],properties:{authorizationUrl:{type:"string",format:"uri-reference"},refreshUrl:{type:"string",format:"uri-reference"},scopes:{type:"object",additionalProperties:{type:"string"}}},patternProperties:{"^x-":{}},additionalProperties:!1},PasswordOAuthFlow:{type:"object",required:["tokenUrl","scopes"],properties:{tokenUrl:{type:"string",format:"uri-reference"},refreshUrl:{type:"string",format:"uri-reference"},scopes:{type:"object",additionalProperties:{type:"string"}}},patternProperties:{"^x-":{}},additionalProperties:!1},ClientCredentialsFlow:{type:"object",required:["tokenUrl","scopes"],properties:{tokenUrl:{type:"string",format:"uri-reference"},refreshUrl:{type:"string",format:"uri-reference"},scopes:{type:"object",additionalProperties:{type:"string"}}},patternProperties:{"^x-":{}},additionalProperties:!1},AuthorizationCodeOAuthFlow:{type:"object",required:["authorizationUrl","tokenUrl","scopes"],properties:{authorizationUrl:{type:"string",format:"uri-reference"},tokenUrl:{type:"string",format:"uri-reference"},refreshUrl:{type:"string",format:"uri-reference"},scopes:{type:"object",additionalProperties:{type:"string"}}},patternProperties:{"^x-":{}},additionalProperties:!1},Link:{type:"object",properties:{operationId:{type:"string"},operationRef:{type:"string",format:"uri-reference"},parameters:{type:"object",additionalProperties:{}},requestBody:{},description:{type:"string"},server:{$ref:"#/definitions/Server"}},patternProperties:{"^x-":{}},additionalProperties:!1,not:{description:"Operation Id and Operation Ref are mutually exclusive",required:["operationId","operationRef"]}},Callback:{type:"object",additionalProperties:{$ref:"#/definitions/PathItem"},patternProperties:{"^x-":{}}},Encoding:{type:"object",properties:{contentType:{type:"string"},headers:{type:"object",additionalProperties:{oneOf:[{$ref:"#/definitions/Header"},{$ref:"#/definitions/Reference"}]}},style:{type:"string",enum:["form","spaceDelimited","pipeDelimited","deepObject"]},explode:{type:"boolean"},allowReserved:{type:"boolean",default:!1}},additionalProperties:!1}}},wu={$id:"https://spec.openapis.org/oas/3.1/schema/2022-10-07",$schema:"https://json-schema.org/draft/2020-12/schema",description:"The description of OpenAPI v3.1.x documents without schema validation, as defined by https://spec.openapis.org/oas/v3.1.0",type:"object",properties:{openapi:{type:"string",pattern:"^3\\.1\\.\\d+(-.+)?$"},info:{$ref:"#/$defs/info"},jsonSchemaDialect:{type:"string",format:"uri-reference",default:"https://spec.openapis.org/oas/3.1/dialect/base"},servers:{type:"array",items:{$ref:"#/$defs/server"},default:[{url:"/"}]},paths:{$ref:"#/$defs/paths"},webhooks:{type:"object",additionalProperties:{$ref:"#/$defs/path-item-or-reference"}},components:{$ref:"#/$defs/components"},security:{type:"array",items:{$ref:"#/$defs/security-requirement"}},tags:{type:"array",items:{$ref:"#/$defs/tag"}},externalDocs:{$ref:"#/$defs/external-documentation"}},required:["openapi","info"],anyOf:[{required:["paths"]},{required:["components"]},{required:["webhooks"]}],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1,$defs:{info:{$comment:"https://spec.openapis.org/oas/v3.1.0#info-object",type:"object",properties:{title:{type:"string"},summary:{type:"string"},description:{type:"string"},termsOfService:{type:"string",format:"uri-reference"},contact:{$ref:"#/$defs/contact"},license:{$ref:"#/$defs/license"},version:{type:"string"}},required:["title","version"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},contact:{$comment:"https://spec.openapis.org/oas/v3.1.0#contact-object",type:"object",properties:{name:{type:"string"},url:{type:"string",format:"uri-reference"},email:{type:"string",format:"email"}},$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},license:{$comment:"https://spec.openapis.org/oas/v3.1.0#license-object",type:"object",properties:{name:{type:"string"},identifier:{type:"string"},url:{type:"string",format:"uri-reference"}},required:["name"],dependentSchemas:{identifier:{not:{required:["url"]}}},$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},server:{$comment:"https://spec.openapis.org/oas/v3.1.0#server-object",type:"object",properties:{url:{type:"string"},description:{type:"string"},variables:{type:"object",additionalProperties:{$ref:"#/$defs/server-variable"}}},required:["url"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"server-variable":{$comment:"https://spec.openapis.org/oas/v3.1.0#server-variable-object",type:"object",properties:{enum:{type:"array",items:{type:"string"},minItems:1},default:{type:"string"},description:{type:"string"}},required:["default"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},components:{$comment:"https://spec.openapis.org/oas/v3.1.0#components-object",type:"object",properties:{schemas:{type:"object",additionalProperties:{$ref:"#/$defs/schema"}},responses:{type:"object",additionalProperties:{$ref:"#/$defs/response-or-reference"}},parameters:{type:"object",additionalProperties:{$ref:"#/$defs/parameter-or-reference"}},examples:{type:"object",additionalProperties:{$ref:"#/$defs/example-or-reference"}},requestBodies:{type:"object",additionalProperties:{$ref:"#/$defs/request-body-or-reference"}},headers:{type:"object",additionalProperties:{$ref:"#/$defs/header-or-reference"}},securitySchemes:{type:"object",additionalProperties:{$ref:"#/$defs/security-scheme-or-reference"}},links:{type:"object",additionalProperties:{$ref:"#/$defs/link-or-reference"}},callbacks:{type:"object",additionalProperties:{$ref:"#/$defs/callbacks-or-reference"}},pathItems:{type:"object",additionalProperties:{$ref:"#/$defs/path-item-or-reference"}}},patternProperties:{"^(schemas|responses|parameters|examples|requestBodies|headers|securitySchemes|links|callbacks|pathItems)$":{$comment:"Enumerating all of the property names in the regex above is necessary for unevaluatedProperties to work as expected",propertyNames:{pattern:"^[a-zA-Z0-9._-]+$"}}},$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},paths:{$comment:"https://spec.openapis.org/oas/v3.1.0#paths-object",type:"object",patternProperties:{"^/":{$ref:"#/$defs/path-item-or-reference"}},$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"path-item":{$comment:"https://spec.openapis.org/oas/v3.1.0#path-item-object",type:"object",properties:{summary:{type:"string"},description:{type:"string"},servers:{type:"array",items:{$ref:"#/$defs/server"}},parameters:{type:"array",items:{$ref:"#/$defs/parameter-or-reference"}},get:{$ref:"#/$defs/operation"},put:{$ref:"#/$defs/operation"},post:{$ref:"#/$defs/operation"},delete:{$ref:"#/$defs/operation"},options:{$ref:"#/$defs/operation"},head:{$ref:"#/$defs/operation"},patch:{$ref:"#/$defs/operation"},trace:{$ref:"#/$defs/operation"}},$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"path-item-or-reference":{if:{type:"object",required:["$ref"]},then:{$ref:"#/$defs/reference"},else:{$ref:"#/$defs/path-item"}},operation:{$comment:"https://spec.openapis.org/oas/v3.1.0#operation-object",type:"object",properties:{tags:{type:"array",items:{type:"string"}},summary:{type:"string"},description:{type:"string"},externalDocs:{$ref:"#/$defs/external-documentation"},operationId:{type:"string"},parameters:{type:"array",items:{$ref:"#/$defs/parameter-or-reference"}},requestBody:{$ref:"#/$defs/request-body-or-reference"},responses:{$ref:"#/$defs/responses"},callbacks:{type:"object",additionalProperties:{$ref:"#/$defs/callbacks-or-reference"}},deprecated:{default:!1,type:"boolean"},security:{type:"array",items:{$ref:"#/$defs/security-requirement"}},servers:{type:"array",items:{$ref:"#/$defs/server"}}},$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"external-documentation":{$comment:"https://spec.openapis.org/oas/v3.1.0#external-documentation-object",type:"object",properties:{description:{type:"string"},url:{type:"string",format:"uri-reference"}},required:["url"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},parameter:{$comment:"https://spec.openapis.org/oas/v3.1.0#parameter-object",type:"object",properties:{name:{type:"string"},in:{enum:["query","header","path","cookie"]},description:{type:"string"},required:{default:!1,type:"boolean"},deprecated:{default:!1,type:"boolean"},schema:{$ref:"#/$defs/schema"},content:{$ref:"#/$defs/content",minProperties:1,maxProperties:1}},required:["name","in"],oneOf:[{required:["schema"]},{required:["content"]}],if:{properties:{in:{const:"query"}},required:["in"]},then:{properties:{allowEmptyValue:{default:!1,type:"boolean"}}},dependentSchemas:{schema:{properties:{style:{type:"string"},explode:{type:"boolean"}},allOf:[{$ref:"#/$defs/examples"},{$ref:"#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-path"},{$ref:"#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-header"},{$ref:"#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-query"},{$ref:"#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-cookie"},{$ref:"#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-form"}],$defs:{"styles-for-path":{if:{properties:{in:{const:"path"}},required:["in"]},then:{properties:{name:{pattern:"[^/#?]+$"},style:{default:"simple",enum:["matrix","label","simple"]},required:{const:!0}},required:["required"]}},"styles-for-header":{if:{properties:{in:{const:"header"}},required:["in"]},then:{properties:{style:{default:"simple",const:"simple"}}}},"styles-for-query":{if:{properties:{in:{const:"query"}},required:["in"]},then:{properties:{style:{default:"form",enum:["form","spaceDelimited","pipeDelimited","deepObject"]},allowReserved:{default:!1,type:"boolean"}}}},"styles-for-cookie":{if:{properties:{in:{const:"cookie"}},required:["in"]},then:{properties:{style:{default:"form",const:"form"}}}},"styles-for-form":{if:{properties:{style:{const:"form"}},required:["style"]},then:{properties:{explode:{default:!0}}},else:{properties:{explode:{default:!1}}}}}}},$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"parameter-or-reference":{if:{type:"object",required:["$ref"]},then:{$ref:"#/$defs/reference"},else:{$ref:"#/$defs/parameter"}},"request-body":{$comment:"https://spec.openapis.org/oas/v3.1.0#request-body-object",type:"object",properties:{description:{type:"string"},content:{$ref:"#/$defs/content"},required:{default:!1,type:"boolean"}},required:["content"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"request-body-or-reference":{if:{type:"object",required:["$ref"]},then:{$ref:"#/$defs/reference"},else:{$ref:"#/$defs/request-body"}},content:{$comment:"https://spec.openapis.org/oas/v3.1.0#fixed-fields-10",type:"object",additionalProperties:{$ref:"#/$defs/media-type"},propertyNames:{format:"media-range"}},"media-type":{$comment:"https://spec.openapis.org/oas/v3.1.0#media-type-object",type:"object",properties:{schema:{$ref:"#/$defs/schema"},encoding:{type:"object",additionalProperties:{$ref:"#/$defs/encoding"}}},allOf:[{$ref:"#/$defs/specification-extensions"},{$ref:"#/$defs/examples"}],unevaluatedProperties:!1},encoding:{$comment:"https://spec.openapis.org/oas/v3.1.0#encoding-object",type:"object",properties:{contentType:{type:"string",format:"media-range"},headers:{type:"object",additionalProperties:{$ref:"#/$defs/header-or-reference"}},style:{default:"form",enum:["form","spaceDelimited","pipeDelimited","deepObject"]},explode:{type:"boolean"},allowReserved:{default:!1,type:"boolean"}},allOf:[{$ref:"#/$defs/specification-extensions"},{$ref:"#/$defs/encoding/$defs/explode-default"}],unevaluatedProperties:!1,$defs:{"explode-default":{if:{properties:{style:{const:"form"}},required:["style"]},then:{properties:{explode:{default:!0}}},else:{properties:{explode:{default:!1}}}}}},responses:{$comment:"https://spec.openapis.org/oas/v3.1.0#responses-object",type:"object",properties:{default:{$ref:"#/$defs/response-or-reference"}},patternProperties:{"^[1-5](?:[0-9]{2}|XX)$":{$ref:"#/$defs/response-or-reference"}},minProperties:1,$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},response:{$comment:"https://spec.openapis.org/oas/v3.1.0#response-object",type:"object",properties:{description:{type:"string"},headers:{type:"object",additionalProperties:{$ref:"#/$defs/header-or-reference"}},content:{$ref:"#/$defs/content"},links:{type:"object",additionalProperties:{$ref:"#/$defs/link-or-reference"}}},required:["description"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"response-or-reference":{if:{type:"object",required:["$ref"]},then:{$ref:"#/$defs/reference"},else:{$ref:"#/$defs/response"}},callbacks:{$comment:"https://spec.openapis.org/oas/v3.1.0#callback-object",type:"object",$ref:"#/$defs/specification-extensions",additionalProperties:{$ref:"#/$defs/path-item-or-reference"}},"callbacks-or-reference":{if:{type:"object",required:["$ref"]},then:{$ref:"#/$defs/reference"},else:{$ref:"#/$defs/callbacks"}},example:{$comment:"https://spec.openapis.org/oas/v3.1.0#example-object",type:"object",properties:{summary:{type:"string"},description:{type:"string"},value:!0,externalValue:{type:"string",format:"uri-reference"}},not:{required:["value","externalValue"]},$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"example-or-reference":{if:{type:"object",required:["$ref"]},then:{$ref:"#/$defs/reference"},else:{$ref:"#/$defs/example"}},link:{$comment:"https://spec.openapis.org/oas/v3.1.0#link-object",type:"object",properties:{operationRef:{type:"string",format:"uri-reference"},operationId:{type:"string"},parameters:{$ref:"#/$defs/map-of-strings"},requestBody:!0,description:{type:"string"},body:{$ref:"#/$defs/server"}},oneOf:[{required:["operationRef"]},{required:["operationId"]}],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"link-or-reference":{if:{type:"object",required:["$ref"]},then:{$ref:"#/$defs/reference"},else:{$ref:"#/$defs/link"}},header:{$comment:"https://spec.openapis.org/oas/v3.1.0#header-object",type:"object",properties:{description:{type:"string"},required:{default:!1,type:"boolean"},deprecated:{default:!1,type:"boolean"},schema:{$ref:"#/$defs/schema"},content:{$ref:"#/$defs/content",minProperties:1,maxProperties:1}},oneOf:[{required:["schema"]},{required:["content"]}],dependentSchemas:{schema:{properties:{style:{default:"simple",const:"simple"},explode:{default:!1,type:"boolean"}},$ref:"#/$defs/examples"}},$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"header-or-reference":{if:{type:"object",required:["$ref"]},then:{$ref:"#/$defs/reference"},else:{$ref:"#/$defs/header"}},tag:{$comment:"https://spec.openapis.org/oas/v3.1.0#tag-object",type:"object",properties:{name:{type:"string"},description:{type:"string"},externalDocs:{$ref:"#/$defs/external-documentation"}},required:["name"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},reference:{$comment:"https://spec.openapis.org/oas/v3.1.0#reference-object",type:"object",properties:{$ref:{type:"string",format:"uri-reference"},summary:{type:"string"},description:{type:"string"}},unevaluatedProperties:!1},schema:{$comment:"https://spec.openapis.org/oas/v3.1.0#schema-object",$dynamicAnchor:"meta",type:["object","boolean"]},"security-scheme":{$comment:"https://spec.openapis.org/oas/v3.1.0#security-scheme-object",type:"object",properties:{type:{enum:["apiKey","http","mutualTLS","oauth2","openIdConnect"]},description:{type:"string"}},required:["type"],allOf:[{$ref:"#/$defs/specification-extensions"},{$ref:"#/$defs/security-scheme/$defs/type-apikey"},{$ref:"#/$defs/security-scheme/$defs/type-http"},{$ref:"#/$defs/security-scheme/$defs/type-http-bearer"},{$ref:"#/$defs/security-scheme/$defs/type-oauth2"},{$ref:"#/$defs/security-scheme/$defs/type-oidc"}],unevaluatedProperties:!1,$defs:{"type-apikey":{if:{properties:{type:{const:"apiKey"}},required:["type"]},then:{properties:{name:{type:"string"},in:{enum:["query","header","cookie"]}},required:["name","in"]}},"type-http":{if:{properties:{type:{const:"http"}},required:["type"]},then:{properties:{scheme:{type:"string"}},required:["scheme"]}},"type-http-bearer":{if:{properties:{type:{const:"http"},scheme:{type:"string",pattern:"^[Bb][Ee][Aa][Rr][Ee][Rr]$"}},required:["type","scheme"]},then:{properties:{bearerFormat:{type:"string"}}}},"type-oauth2":{if:{properties:{type:{const:"oauth2"}},required:["type"]},then:{properties:{flows:{$ref:"#/$defs/oauth-flows"}},required:["flows"]}},"type-oidc":{if:{properties:{type:{const:"openIdConnect"}},required:["type"]},then:{properties:{openIdConnectUrl:{type:"string",format:"uri-reference"}},required:["openIdConnectUrl"]}}}},"security-scheme-or-reference":{if:{type:"object",required:["$ref"]},then:{$ref:"#/$defs/reference"},else:{$ref:"#/$defs/security-scheme"}},"oauth-flows":{type:"object",properties:{implicit:{$ref:"#/$defs/oauth-flows/$defs/implicit"},password:{$ref:"#/$defs/oauth-flows/$defs/password"},clientCredentials:{$ref:"#/$defs/oauth-flows/$defs/client-credentials"},authorizationCode:{$ref:"#/$defs/oauth-flows/$defs/authorization-code"}},$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1,$defs:{implicit:{type:"object",properties:{authorizationUrl:{type:"string",format:"uri-reference"},refreshUrl:{type:"string",format:"uri-reference"},scopes:{$ref:"#/$defs/map-of-strings"}},required:["authorizationUrl","scopes"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},password:{type:"object",properties:{tokenUrl:{type:"string",format:"uri-reference"},refreshUrl:{type:"string",format:"uri-reference"},scopes:{$ref:"#/$defs/map-of-strings"}},required:["tokenUrl","scopes"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"client-credentials":{type:"object",properties:{tokenUrl:{type:"string",format:"uri-reference"},refreshUrl:{type:"string",format:"uri-reference"},scopes:{$ref:"#/$defs/map-of-strings"}},required:["tokenUrl","scopes"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"authorization-code":{type:"object",properties:{authorizationUrl:{type:"string",format:"uri-reference"},tokenUrl:{type:"string",format:"uri-reference"},refreshUrl:{type:"string",format:"uri-reference"},scopes:{$ref:"#/$defs/map-of-strings"}},required:["authorizationUrl","tokenUrl","scopes"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1}}},"security-requirement":{$comment:"https://spec.openapis.org/oas/v3.1.0#security-requirement-object",type:"object",additionalProperties:{type:"array",items:{type:"string"}}},"specification-extensions":{$comment:"https://spec.openapis.org/oas/v3.1.0#specification-extensions",patternProperties:{"^x-":!0}},examples:{properties:{example:!0,examples:{type:"object",additionalProperties:{$ref:"#/$defs/example-or-reference"}}}},"map-of-strings":{type:"object",additionalProperties:{type:"string"}}}},_u={$id:"https://spec.openapis.org/oas/3.2/schema/2025-09-17",$schema:"https://json-schema.org/draft/2020-12/schema",description:"The description of OpenAPI v3.2.x Documents without Schema Object validation",type:"object",properties:{openapi:{type:"string",pattern:"^3\\.2\\.\\d+(-.+)?$"},$self:{type:"string",format:"uri-reference",$comment:"MUST NOT contain a fragment",pattern:"^[^#]*$"},info:{$ref:"#/$defs/info"},jsonSchemaDialect:{type:"string",format:"uri-reference",default:"https://spec.openapis.org/oas/3.2/dialect/2025-09-17"},servers:{type:"array",items:{$ref:"#/$defs/server"},default:[{url:"/"}]},paths:{$ref:"#/$defs/paths"},webhooks:{type:"object",additionalProperties:{$ref:"#/$defs/path-item-or-reference"}},components:{$ref:"#/$defs/components"},security:{type:"array",items:{$ref:"#/$defs/security-requirement"}},tags:{type:"array",items:{$ref:"#/$defs/tag"}},externalDocs:{$ref:"#/$defs/external-documentation"}},required:["openapi","info"],anyOf:[{required:["paths"]},{required:["components"]},{required:["webhooks"]}],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1,$defs:{info:{$comment:"https://spec.openapis.org/oas/v3.2#info-object",type:"object",properties:{title:{type:"string"},summary:{type:"string"},description:{type:"string"},termsOfService:{type:"string",format:"uri-reference"},contact:{$ref:"#/$defs/contact"},license:{$ref:"#/$defs/license"},version:{type:"string"}},required:["title","version"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},contact:{$comment:"https://spec.openapis.org/oas/v3.2#contact-object",type:"object",properties:{name:{type:"string"},url:{type:"string",format:"uri-reference"},email:{type:"string",format:"email"}},$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},license:{$comment:"https://spec.openapis.org/oas/v3.2#license-object",type:"object",properties:{name:{type:"string"},identifier:{type:"string"},url:{type:"string",format:"uri-reference"}},required:["name"],dependentSchemas:{identifier:{not:{required:["url"]}}},$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},server:{$comment:"https://spec.openapis.org/oas/v3.2#server-object",type:"object",properties:{url:{type:"string"},description:{type:"string"},name:{type:"string"},variables:{type:"object",additionalProperties:{$ref:"#/$defs/server-variable"}}},required:["url"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"server-variable":{$comment:"https://spec.openapis.org/oas/v3.2#server-variable-object",type:"object",properties:{enum:{type:"array",items:{type:"string"},minItems:1},default:{type:"string"},description:{type:"string"}},required:["default"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},components:{$comment:"https://spec.openapis.org/oas/v3.2#components-object",type:"object",properties:{schemas:{type:"object",additionalProperties:{$ref:"#/$defs/schema"}},responses:{type:"object",additionalProperties:{$ref:"#/$defs/response-or-reference"}},parameters:{type:"object",additionalProperties:{$ref:"#/$defs/parameter-or-reference"}},examples:{type:"object",additionalProperties:{$ref:"#/$defs/example-or-reference"}},requestBodies:{type:"object",additionalProperties:{$ref:"#/$defs/request-body-or-reference"}},headers:{type:"object",additionalProperties:{$ref:"#/$defs/header-or-reference"}},securitySchemes:{type:"object",additionalProperties:{$ref:"#/$defs/security-scheme-or-reference"}},links:{type:"object",additionalProperties:{$ref:"#/$defs/link-or-reference"}},callbacks:{type:"object",additionalProperties:{$ref:"#/$defs/callbacks-or-reference"}},pathItems:{type:"object",additionalProperties:{$ref:"#/$defs/path-item-or-reference"}},mediaTypes:{type:"object",additionalProperties:{$ref:"#/$defs/media-type-or-reference"}}},patternProperties:{"^(?:schemas|responses|parameters|examples|requestBodies|headers|securitySchemes|links|callbacks|pathItems|mediaTypes)$":{$comment:"Enumerating all of the property names in the regex above is necessary for unevaluatedProperties to work as expected",propertyNames:{pattern:"^[a-zA-Z0-9._-]+$"}}},$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},paths:{$comment:"https://spec.openapis.org/oas/v3.2#paths-object",type:"object",patternProperties:{"^/":{$ref:"#/$defs/path-item-or-reference"}},$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"path-item":{$comment:"https://spec.openapis.org/oas/v3.2#path-item-object",type:"object",properties:{summary:{type:"string"},description:{type:"string"},servers:{type:"array",items:{$ref:"#/$defs/server"}},parameters:{$ref:"#/$defs/parameters"},additionalOperations:{type:"object",additionalProperties:{$ref:"#/$defs/operation"},propertyNames:{$comment:'RFC9110 restricts methods to "1*tchar" in ABNF',pattern:"^[a-zA-Z0-9!#$%&'*+.^_`|~-]+$",not:{enum:["GET","PUT","POST","DELETE","OPTIONS","HEAD","PATCH","TRACE","QUERY"]}}},get:{$ref:"#/$defs/operation"},put:{$ref:"#/$defs/operation"},post:{$ref:"#/$defs/operation"},delete:{$ref:"#/$defs/operation"},options:{$ref:"#/$defs/operation"},head:{$ref:"#/$defs/operation"},patch:{$ref:"#/$defs/operation"},trace:{$ref:"#/$defs/operation"},query:{$ref:"#/$defs/operation"}},$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"path-item-or-reference":{if:{type:"object",required:["$ref"]},then:{$ref:"#/$defs/reference"},else:{$ref:"#/$defs/path-item"}},operation:{$comment:"https://spec.openapis.org/oas/v3.2#operation-object",type:"object",properties:{tags:{type:"array",items:{type:"string"}},summary:{type:"string"},description:{type:"string"},externalDocs:{$ref:"#/$defs/external-documentation"},operationId:{type:"string"},parameters:{$ref:"#/$defs/parameters"},requestBody:{$ref:"#/$defs/request-body-or-reference"},responses:{$ref:"#/$defs/responses"},callbacks:{type:"object",additionalProperties:{$ref:"#/$defs/callbacks-or-reference"}},deprecated:{default:!1,type:"boolean"},security:{type:"array",items:{$ref:"#/$defs/security-requirement"}},servers:{type:"array",items:{$ref:"#/$defs/server"}}},$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"external-documentation":{$comment:"https://spec.openapis.org/oas/v3.2#external-documentation-object",type:"object",properties:{description:{type:"string"},url:{type:"string",format:"uri-reference"}},required:["url"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},parameters:{type:"array",items:{$ref:"#/$defs/parameter-or-reference"},not:{allOf:[{contains:{type:"object",properties:{in:{const:"query"}},required:["in"]}},{contains:{type:"object",properties:{in:{const:"querystring"}},required:["in"]}}]},contains:{type:"object",properties:{in:{const:"querystring"}},required:["in"]},minContains:0,maxContains:1},parameter:{$comment:"https://spec.openapis.org/oas/v3.2#parameter-object",type:"object",properties:{name:{type:"string"},in:{enum:["query","querystring","header","path","cookie"]},description:{type:"string"},required:{default:!1,type:"boolean"},deprecated:{default:!1,type:"boolean"},schema:{$ref:"#/$defs/schema"},content:{$ref:"#/$defs/content",minProperties:1,maxProperties:1}},required:["name","in"],oneOf:[{required:["schema"]},{required:["content"]}],allOf:[{$ref:"#/$defs/examples"},{$ref:"#/$defs/specification-extensions"},{if:{properties:{in:{const:"query"}}},then:{properties:{allowEmptyValue:{default:!1,type:"boolean"}}}},{if:{properties:{in:{const:"querystring"}}},then:{required:["content"]}}],dependentSchemas:{schema:{properties:{style:{type:"string"},explode:{type:"boolean"},allowReserved:{default:!1,type:"boolean"}},allOf:[{$ref:"#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-path"},{$ref:"#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-header"},{$ref:"#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-query"},{$ref:"#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-cookie"},{$ref:"#/$defs/styles-for-form"}],$defs:{"styles-for-path":{if:{properties:{in:{const:"path"}}},then:{properties:{style:{default:"simple",enum:["matrix","label","simple"]},required:{const:!0}},required:["required"]}},"styles-for-header":{if:{properties:{in:{const:"header"}}},then:{properties:{style:{default:"simple",const:"simple"}}}},"styles-for-query":{if:{properties:{in:{const:"query"}}},then:{properties:{style:{default:"form",enum:["form","spaceDelimited","pipeDelimited","deepObject"]}}}},"styles-for-cookie":{if:{properties:{in:{const:"cookie"}}},then:{properties:{style:{default:"form",enum:["form","cookie"]}}}}}}},unevaluatedProperties:!1},"parameter-or-reference":{if:{type:"object",required:["$ref"]},then:{$ref:"#/$defs/reference"},else:{$ref:"#/$defs/parameter"}},"request-body":{$comment:"https://spec.openapis.org/oas/v3.2#request-body-object",type:"object",properties:{description:{type:"string"},content:{$ref:"#/$defs/content"},required:{default:!1,type:"boolean"}},required:["content"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"request-body-or-reference":{if:{type:"object",required:["$ref"]},then:{$ref:"#/$defs/reference"},else:{$ref:"#/$defs/request-body"}},content:{$comment:"https://spec.openapis.org/oas/v3.2#fixed-fields-10",type:"object",additionalProperties:{$ref:"#/$defs/media-type-or-reference"},propertyNames:{format:"media-range"}},"media-type":{$comment:"https://spec.openapis.org/oas/v3.2#media-type-object",type:"object",properties:{description:{type:"string"},schema:{$ref:"#/$defs/schema"},itemSchema:{$ref:"#/$defs/schema"},encoding:{type:"object",additionalProperties:{$ref:"#/$defs/encoding"}},prefixEncoding:{type:"array",items:{$ref:"#/$defs/encoding"}},itemEncoding:{$ref:"#/$defs/encoding"}},dependentSchemas:{encoding:{properties:{prefixEncoding:!1,itemEncoding:!1}}},allOf:[{$ref:"#/$defs/examples"},{$ref:"#/$defs/specification-extensions"}],unevaluatedProperties:!1},"media-type-or-reference":{if:{type:"object",required:["$ref"]},then:{$ref:"#/$defs/reference"},else:{$ref:"#/$defs/media-type"}},encoding:{$comment:"https://spec.openapis.org/oas/v3.2#encoding-object",type:"object",properties:{contentType:{type:"string",format:"media-range"},headers:{type:"object",additionalProperties:{$ref:"#/$defs/header-or-reference"}},style:{enum:["form","spaceDelimited","pipeDelimited","deepObject"]},explode:{type:"boolean"},allowReserved:{type:"boolean"},encoding:{type:"object",additionalProperties:{$ref:"#/$defs/encoding"}},prefixEncoding:{type:"array",items:{$ref:"#/$defs/encoding"}},itemEncoding:{$ref:"#/$defs/encoding"}},dependentSchemas:{encoding:{properties:{prefixEncoding:!1,itemEncoding:!1}},style:{properties:{allowReserved:{default:!1}}},explode:{properties:{style:{default:"form"},allowReserved:{default:!1}}},allowReserved:{properties:{style:{default:"form"}}}},allOf:[{$ref:"#/$defs/specification-extensions"},{$ref:"#/$defs/styles-for-form"}],unevaluatedProperties:!1},responses:{$comment:"https://spec.openapis.org/oas/v3.2#responses-object",type:"object",properties:{default:{$ref:"#/$defs/response-or-reference"}},patternProperties:{"^[1-5](?:[0-9]{2}|XX)$":{$ref:"#/$defs/response-or-reference"}},minProperties:1,$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1,if:{$comment:"either default, or at least one response code property must exist",patternProperties:{"^[1-5](?:[0-9]{2}|XX)$":!1}},then:{required:["default"]}},response:{$comment:"https://spec.openapis.org/oas/v3.2#response-object",type:"object",properties:{summary:{type:"string"},description:{type:"string"},headers:{type:"object",additionalProperties:{$ref:"#/$defs/header-or-reference"}},content:{$ref:"#/$defs/content"},links:{type:"object",additionalProperties:{$ref:"#/$defs/link-or-reference"}}},$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"response-or-reference":{if:{type:"object",required:["$ref"]},then:{$ref:"#/$defs/reference"},else:{$ref:"#/$defs/response"}},callbacks:{$comment:"https://spec.openapis.org/oas/v3.2#callback-object",type:"object",$ref:"#/$defs/specification-extensions",additionalProperties:{$ref:"#/$defs/path-item"}},"callbacks-or-reference":{if:{type:"object",required:["$ref"]},then:{$ref:"#/$defs/reference"},else:{$ref:"#/$defs/callbacks"}},example:{$comment:"https://spec.openapis.org/oas/v3.2#example-object",type:"object",properties:{summary:{type:"string"},description:{type:"string"},dataValue:!0,serializedValue:{type:"string"},value:!0,externalValue:{type:"string",format:"uri-reference"}},allOf:[{not:{required:["value","externalValue"]}},{not:{required:["value","dataValue"]}},{not:{required:["value","serializedValue"]}},{not:{required:["serializedValue","externalValue"]}}],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"example-or-reference":{if:{type:"object",required:["$ref"]},then:{$ref:"#/$defs/reference"},else:{$ref:"#/$defs/example"}},link:{$comment:"https://spec.openapis.org/oas/v3.2#link-object",type:"object",properties:{operationRef:{type:"string",format:"uri-reference"},operationId:{type:"string"},parameters:{$ref:"#/$defs/map-of-strings"},requestBody:!0,description:{type:"string"},server:{$ref:"#/$defs/server"}},oneOf:[{required:["operationRef"]},{required:["operationId"]}],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"link-or-reference":{if:{type:"object",required:["$ref"]},then:{$ref:"#/$defs/reference"},else:{$ref:"#/$defs/link"}},header:{$comment:"https://spec.openapis.org/oas/v3.2#header-object",type:"object",properties:{description:{type:"string"},required:{default:!1,type:"boolean"},deprecated:{default:!1,type:"boolean"},schema:{$ref:"#/$defs/schema"},content:{$ref:"#/$defs/content",minProperties:1,maxProperties:1}},oneOf:[{required:["schema"]},{required:["content"]}],dependentSchemas:{schema:{properties:{style:{default:"simple",const:"simple"},explode:{default:!1,type:"boolean"},allowReserved:{default:!1,type:"boolean"}}}},allOf:[{$ref:"#/$defs/examples"},{$ref:"#/$defs/specification-extensions"}],unevaluatedProperties:!1},"header-or-reference":{if:{type:"object",required:["$ref"]},then:{$ref:"#/$defs/reference"},else:{$ref:"#/$defs/header"}},tag:{$comment:"https://spec.openapis.org/oas/v3.2#tag-object",type:"object",properties:{name:{type:"string"},summary:{type:"string"},description:{type:"string"},externalDocs:{$ref:"#/$defs/external-documentation"},parent:{type:"string"},kind:{type:"string"}},required:["name"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},reference:{$comment:"https://spec.openapis.org/oas/v3.2#reference-object",type:"object",properties:{$ref:{type:"string",format:"uri-reference"},summary:{type:"string"},description:{type:"string"}}},schema:{$comment:"https://spec.openapis.org/oas/v3.2#schema-object",$dynamicAnchor:"meta",type:["object","boolean"]},"security-scheme":{$comment:"https://spec.openapis.org/oas/v3.2#security-scheme-object",type:"object",properties:{type:{enum:["apiKey","http","mutualTLS","oauth2","openIdConnect"]},description:{type:"string"},deprecated:{default:!1,type:"boolean"}},required:["type"],allOf:[{$ref:"#/$defs/specification-extensions"},{$ref:"#/$defs/security-scheme/$defs/type-apikey"},{$ref:"#/$defs/security-scheme/$defs/type-http"},{$ref:"#/$defs/security-scheme/$defs/type-http-bearer"},{$ref:"#/$defs/security-scheme/$defs/type-oauth2"},{$ref:"#/$defs/security-scheme/$defs/type-oidc"}],unevaluatedProperties:!1,$defs:{"type-apikey":{if:{properties:{type:{const:"apiKey"}}},then:{properties:{name:{type:"string"},in:{enum:["query","header","cookie"]}},required:["name","in"]}},"type-http":{if:{properties:{type:{const:"http"}}},then:{properties:{scheme:{type:"string"}},required:["scheme"]}},"type-http-bearer":{if:{properties:{type:{const:"http"},scheme:{type:"string",pattern:"^[Bb][Ee][Aa][Rr][Ee][Rr]$"}},required:["type","scheme"]},then:{properties:{bearerFormat:{type:"string"}}}},"type-oauth2":{if:{properties:{type:{const:"oauth2"}}},then:{properties:{flows:{$ref:"#/$defs/oauth-flows"},oauth2MetadataUrl:{type:"string",format:"uri-reference"}},required:["flows"]}},"type-oidc":{if:{properties:{type:{const:"openIdConnect"}}},then:{properties:{openIdConnectUrl:{type:"string",format:"uri-reference"}},required:["openIdConnectUrl"]}}}},"security-scheme-or-reference":{if:{type:"object",required:["$ref"]},then:{$ref:"#/$defs/reference"},else:{$ref:"#/$defs/security-scheme"}},"oauth-flows":{type:"object",properties:{implicit:{$ref:"#/$defs/oauth-flows/$defs/implicit"},password:{$ref:"#/$defs/oauth-flows/$defs/password"},clientCredentials:{$ref:"#/$defs/oauth-flows/$defs/client-credentials"},authorizationCode:{$ref:"#/$defs/oauth-flows/$defs/authorization-code"},deviceAuthorization:{$ref:"#/$defs/oauth-flows/$defs/device-authorization"}},$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1,$defs:{implicit:{type:"object",properties:{authorizationUrl:{type:"string",format:"uri-reference"},refreshUrl:{type:"string",format:"uri-reference"},scopes:{$ref:"#/$defs/map-of-strings"}},required:["authorizationUrl","scopes"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},password:{type:"object",properties:{tokenUrl:{type:"string",format:"uri-reference"},refreshUrl:{type:"string",format:"uri-reference"},scopes:{$ref:"#/$defs/map-of-strings"}},required:["tokenUrl","scopes"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"client-credentials":{type:"object",properties:{tokenUrl:{type:"string",format:"uri-reference"},refreshUrl:{type:"string",format:"uri-reference"},scopes:{$ref:"#/$defs/map-of-strings"}},required:["tokenUrl","scopes"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"authorization-code":{type:"object",properties:{authorizationUrl:{type:"string",format:"uri-reference"},tokenUrl:{type:"string",format:"uri-reference"},refreshUrl:{type:"string",format:"uri-reference"},scopes:{$ref:"#/$defs/map-of-strings"}},required:["authorizationUrl","tokenUrl","scopes"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"device-authorization":{type:"object",properties:{deviceAuthorizationUrl:{type:"string",format:"uri-reference"},tokenUrl:{type:"string",format:"uri-reference"},refreshUrl:{type:"string",format:"uri-reference"},scopes:{$ref:"#/$defs/map-of-strings"}},required:["deviceAuthorizationUrl","tokenUrl","scopes"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1}}},"security-requirement":{$comment:"https://spec.openapis.org/oas/v3.2#security-requirement-object",type:"object",additionalProperties:{type:"array",items:{type:"string"}}},"specification-extensions":{$comment:"https://spec.openapis.org/oas/v3.2#specification-extensions",patternProperties:{"^x-":!0}},examples:{properties:{example:!0,examples:{type:"object",additionalProperties:{$ref:"#/$defs/example-or-reference"}}},not:{required:["example","examples"]}},"map-of-strings":{type:"object",additionalProperties:{type:"string"}},"styles-for-form":{if:{properties:{style:{const:"form"}},required:["style"]},then:{properties:{explode:{default:!0}}},else:{properties:{explode:{default:!1}}}}}},ic={"2.0":bu,"3.0":vu,"3.1":wu,"3.2":_u},oc=Object.keys(ic),$e={EMPTY_OR_INVALID:"Can't find JSON, YAML or filename in data.",OPENAPI_VERSION_NOT_SUPPORTED:"Can't find supported Swagger/OpenAPI version in the provided document, version must be a string.",INVALID_REFERENCE:"Can't resolve reference: %s",EXTERNAL_REFERENCE_NOT_FOUND:"Can't resolve external reference: %s",SELF_REFERENCE:"Can't resolve reference to itself: %s",FILE_DOES_NOT_EXIST:"File does not exist: %s",NO_CONTENT:"No content found"};function hi(t){if(t===null)return{version:void 0,specificationType:void 0,specificationVersion:void 0};if(Wt(t))for(const e of new Set(oc)){const r=e==="2.0"?"swagger":"openapi",n=t[r];if(typeof n=="string"&&n.startsWith(e))return{version:e,specificationType:r,specificationVersion:n}}return{version:void 0,specificationType:void 0,specificationVersion:void 0}}function Le(t){return t==null?void 0:t.find(e=>e.isEntrypoint)}function xr(t,e,r=[]){const n={};for(const[s,i]of Object.entries(t)){const o=[...r,s];if(Array.isArray(i)){n[s]=i.map((a,f)=>typeof a=="object"&&!Array.isArray(a)&&a!==null?xr(a,e,[...o,f.toString()]):a);continue}if(typeof i=="object"&&i!==null){n[s]=xr(i,e,o);continue}n[s]=i}return e(n,r)}function ac(t){const e=[];return!t||typeof t!="object"?e:(xr(t,r=>(r.$ref&&typeof r.$ref=="string"&&!r.$ref.startsWith("#")&&e.push(r.$ref.split("#")[0]),r)),[...new Set(e)])}function yi(t){return typeof t<"u"&&Array.isArray(t)&&t.length>0&&t.some(e=>e.isEntrypoint===!0)}const gi=Symbol.for("yaml.alias"),Ls=Symbol.for("yaml.document"),ot=Symbol.for("yaml.map"),cc=Symbol.for("yaml.pair"),Ke=Symbol.for("yaml.scalar"),Yt=Symbol.for("yaml.seq"),xe=Symbol.for("yaml.node.type"),Xt=t=>!!t&&typeof t=="object"&&t[xe]===gi,Dr=t=>!!t&&typeof t=="object"&&t[xe]===Ls,Lr=t=>!!t&&typeof t=="object"&&t[xe]===ot,le=t=>!!t&&typeof t=="object"&&t[xe]===cc,ne=t=>!!t&&typeof t=="object"&&t[xe]===Ke,Fr=t=>!!t&&typeof t=="object"&&t[xe]===Yt;function ce(t){if(t&&typeof t=="object")switch(t[xe]){case ot:case Yt:return!0}return!1}function fe(t){if(t&&typeof t=="object")switch(t[xe]){case gi:case ot:case Ke:case Yt:return!0}return!1}const fc=t=>(ne(t)||ce(t))&&!!t.anchor,lt=Symbol("break visit"),Pu=Symbol("skip children"),jr=Symbol("remove node");function Zt(t,e){const r=Eu(e);Dr(t)?Mt(null,t.contents,r,Object.freeze([t]))===jr&&(t.contents=null):Mt(null,t,r,Object.freeze([]))}Zt.BREAK=lt;Zt.SKIP=Pu;Zt.REMOVE=jr;function Mt(t,e,r,n){const s=Su(t,e,r,n);if(fe(s)||le(s))return ju(t,n,s),Mt(t,s,r,n);if(typeof s!="symbol"){if(ce(e)){n=Object.freeze(n.concat(e));for(let i=0;i<e.items.length;++i){const o=Mt(i,e.items[i],r,n);if(typeof o=="number")i=o-1;else{if(o===lt)return lt;o===jr&&(e.items.splice(i,1),i-=1)}}}else if(le(e)){n=Object.freeze(n.concat(e));const i=Mt("key",e.key,r,n);if(i===lt)return lt;i===jr&&(e.key=null);const o=Mt("value",e.value,r,n);if(o===lt)return lt;o===jr&&(e.value=null)}}return s}function Eu(t){return typeof t=="object"&&(t.Collection||t.Node||t.Value)?Object.assign({Alias:t.Node,Map:t.Node,Scalar:t.Node,Seq:t.Node},t.Value&&{Map:t.Value,Scalar:t.Value,Seq:t.Value},t.Collection&&{Map:t.Collection,Seq:t.Collection},t):t}function Su(t,e,r,n){var s,i,o,a,f;if(typeof r=="function")return r(t,e,n);if(Lr(e))return(s=r.Map)==null?void 0:s.call(r,t,e,n);if(Fr(e))return(i=r.Seq)==null?void 0:i.call(r,t,e,n);if(le(e))return(o=r.Pair)==null?void 0:o.call(r,t,e,n);if(ne(e))return(a=r.Scalar)==null?void 0:a.call(r,t,e,n);if(Xt(e))return(f=r.Alias)==null?void 0:f.call(r,t,e,n)}function ju(t,e,r){const n=e[e.length-1];if(ce(n))n.items[t]=r;else if(le(n))t==="key"?n.key=r:n.value=r;else if(Dr(n))n.contents=r;else{const s=Xt(n)?"alias":"scalar";throw new Error(`Cannot replace node with ${s} parent`)}}const Ou={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},ku=t=>t.replace(/[!,[\]{}]/g,e=>Ou[e]);class we{constructor(e,r){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},we.defaultYaml,e),this.tags=Object.assign({},we.defaultTags,r)}clone(){const e=new we(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new we(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:we.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},we.defaultTags);break}return e}add(e,r){this.atNextDocument&&(this.yaml={explicit:we.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},we.defaultTags),this.atNextDocument=!1);const n=e.trim().split(/[ \t]+/),s=n.shift();switch(s){case"%TAG":{if(n.length!==2&&(r(0,"%TAG directive should contain exactly two parts"),n.length<2))return!1;const[i,o]=n;return this.tags[i]=o,!0}case"%YAML":{if(this.yaml.explicit=!0,n.length!==1)return r(0,"%YAML directive should contain exactly one part"),!1;const[i]=n;if(i==="1.1"||i==="1.2")return this.yaml.version=i,!0;{const o=/^\d+\.\d+$/.test(i);return r(6,`Unsupported YAML version ${i}`,o),!1}}default:return r(0,`Unknown directive ${s}`,!0),!1}}tagName(e,r){if(e==="!")return"!";if(e[0]!=="!")return r(`Not a valid tag: ${e}`),null;if(e[1]==="<"){const o=e.slice(2,-1);return o==="!"||o==="!!"?(r(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&r("Verbatim tags must end with a >"),o)}const[,n,s]=e.match(/^(.*!)([^!]*)$/s);s||r(`The ${e} tag has no suffix`);const i=this.tags[n];if(i)try{return i+decodeURIComponent(s)}catch(o){return r(String(o)),null}return n==="!"?e:(r(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[r,n]of Object.entries(this.tags))if(e.startsWith(n))return r+ku(e.substring(n.length));return e[0]==="!"?e:`!<${e}>`}toString(e){const r=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],n=Object.entries(this.tags);let s;if(e&&n.length>0&&fe(e.contents)){const i={};Zt(e.contents,(o,a)=>{fe(a)&&a.tag&&(i[a.tag]=!0)}),s=Object.keys(i)}else s=[];for(const[i,o]of n)i==="!!"&&o==="tag:yaml.org,2002:"||(!e||s.some(a=>a.startsWith(o)))&&r.push(`%TAG ${i} ${o}`);return r.join(`
2
+ `)}}we.defaultYaml={explicit:!1,version:"1.2"};we.defaultTags={"!!":"tag:yaml.org,2002:"};function lc(t){if(/[\x00-\x19\s,[\]{}]/.test(t)){const r=`Anchor must not contain whitespace or control characters: ${JSON.stringify(t)}`;throw new Error(r)}return!0}function uc(t){const e=new Set;return Zt(t,{Value(r,n){n.anchor&&e.add(n.anchor)}}),e}function dc(t,e){for(let r=1;;++r){const n=`${t}${r}`;if(!e.has(n))return n}}function Iu(t,e){const r=[],n=new Map;let s=null;return{onAnchor:i=>{r.push(i),s??(s=uc(t));const o=dc(e,s);return s.add(o),o},setAnchors:()=>{for(const i of r){const o=n.get(i);if(typeof o=="object"&&o.anchor&&(ne(o.node)||ce(o.node)))o.node.anchor=o.anchor;else{const a=new Error("Failed to resolve repeated object (this should not happen)");throw a.source=i,a}}},sourceObjects:n}}function qt(t,e,r,n){if(n&&typeof n=="object")if(Array.isArray(n))for(let s=0,i=n.length;s<i;++s){const o=n[s],a=qt(t,n,String(s),o);a===void 0?delete n[s]:a!==o&&(n[s]=a)}else if(n instanceof Map)for(const s of Array.from(n.keys())){const i=n.get(s),o=qt(t,n,s,i);o===void 0?n.delete(s):o!==i&&n.set(s,o)}else if(n instanceof Set)for(const s of Array.from(n)){const i=qt(t,n,s,s);i===void 0?n.delete(s):i!==s&&(n.delete(s),n.add(i))}else for(const[s,i]of Object.entries(n)){const o=qt(t,n,s,i);o===void 0?delete n[s]:o!==i&&(n[s]=o)}return t.call(e,r,n)}function Ne(t,e,r){if(Array.isArray(t))return t.map((n,s)=>Ne(n,String(s),r));if(t&&typeof t.toJSON=="function"){if(!r||!fc(t))return t.toJSON(e,r);const n={aliasCount:0,count:1,res:void 0};r.anchors.set(t,n),r.onCreate=i=>{n.res=i,delete r.onCreate};const s=t.toJSON(e,r);return r.onCreate&&r.onCreate(s),s}return typeof t=="bigint"&&!(r!=null&&r.keep)?Number(t):t}class $i{constructor(e){Object.defineProperty(this,xe,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:r,maxAliasCount:n,onAnchor:s,reviver:i}={}){if(!Dr(e))throw new TypeError("A document argument is required");const o={anchors:new Map,doc:e,keep:!0,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},a=Ne(this,"",o);if(typeof s=="function")for(const{count:f,res:c}of o.anchors.values())s(c,f);return typeof i=="function"?qt(i,{"":a},"",a):a}}class bi extends $i{constructor(e){super(gi),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,r){if((r==null?void 0:r.maxAliasCount)===0)throw new ReferenceError("Alias resolution is disabled");let n;r!=null&&r.aliasResolveCache?n=r.aliasResolveCache:(n=[],Zt(e,{Node:(i,o)=>{(Xt(o)||fc(o))&&n.push(o)}}),r&&(r.aliasResolveCache=n));let s;for(const i of n){if(i===this)break;i.anchor===this.source&&(s=i)}if(s&&r){const{anchors:i,doc:o,maxAliasCount:a}=r;let f=i.get(s);if(f||(Ne(s,null,r),f=i.get(s)),(f==null?void 0:f.res)===void 0){const c="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(c)}if(a>=0&&(f.count+=1,f.aliasCount===0&&(f.aliasCount=wn(o,s,i)),f.count*f.aliasCount>a)){const c="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(c)}}return s}toJSON(e,r){if(!r)return{source:this.source};const n=this.resolve(r.doc,r);if(!n){const s=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(s)}return r.anchors.get(n).res}toString(e,r,n){const s=`*${this.source}`;if(e){if(lc(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const i=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(i)}if(e.implicitKey)return`${s} `}return s}}function wn(t,e,r){if(Xt(e)){const n=e.resolve(t),s=r&&n&&r.get(n);return s?s.count*s.aliasCount:0}else if(ce(e)){let n=0;for(const s of e.items){const i=wn(t,s,r);i>n&&(n=i)}return n}else if(le(e)){const n=wn(t,e.key,r),s=wn(t,e.value,r);return Math.max(n,s)}return 1}const pc=t=>!t||typeof t!="function"&&typeof t!="object";class J extends $i{constructor(e){super(Ke),this.value=e}toJSON(e,r){return r!=null&&r.keep?this.value:Ne(this.value,e,r)}toString(){return String(this.value)}}J.BLOCK_FOLDED="BLOCK_FOLDED";J.BLOCK_LITERAL="BLOCK_LITERAL";J.PLAIN="PLAIN";J.QUOTE_DOUBLE="QUOTE_DOUBLE";J.QUOTE_SINGLE="QUOTE_SINGLE";const Au="tag:yaml.org,2002:";function Nu(t,e,r){if(e){const n=r.filter(i=>i.tag===e),s=n.find(i=>!i.format)??n[0];if(!s)throw new Error(`Tag ${e} not found`);return s}return r.find(n=>{var s;return((s=n.identify)==null?void 0:s.call(n,t))&&!n.format})}function Rr(t,e,r){var l,d,p;if(Dr(t)&&(t=t.contents),fe(t))return t;if(le(t)){const h=(d=(l=r.schema[ot]).createNode)==null?void 0:d.call(l,r.schema,null,r);return h.items.push(t),h}(t instanceof String||t instanceof Number||t instanceof Boolean||typeof BigInt<"u"&&t instanceof BigInt)&&(t=t.valueOf());const{aliasDuplicateObjects:n,onAnchor:s,onTagObj:i,schema:o,sourceObjects:a}=r;let f;if(n&&t&&typeof t=="object"){if(f=a.get(t),f)return f.anchor??(f.anchor=s(t)),new bi(f.anchor);f={anchor:null,node:null},a.set(t,f)}e!=null&&e.startsWith("!!")&&(e=Au+e.slice(2));let c=Nu(t,e,o.tags);if(!c){if(t&&typeof t.toJSON=="function"&&(t=t.toJSON()),!t||typeof t!="object"){const h=new J(t);return f&&(f.node=h),h}c=t instanceof Map?o[ot]:Symbol.iterator in Object(t)?o[Yt]:o[ot]}i&&(i(c),delete r.onTagObj);const u=c!=null&&c.createNode?c.createNode(r.schema,t,r):typeof((p=c==null?void 0:c.nodeClass)==null?void 0:p.from)=="function"?c.nodeClass.from(r.schema,t,r):new J(t);return e?u.tag=e:c.default||(u.tag=c.tag),f&&(f.node=u),u}function Nn(t,e,r){let n=r;for(let s=e.length-1;s>=0;--s){const i=e[s];if(typeof i=="number"&&Number.isInteger(i)&&i>=0){const o=[];o[i]=n,n=o}else n=new Map([[i,n]])}return Rr(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:t,sourceObjects:new Map})}const _r=t=>t==null||typeof t=="object"&&!!t[Symbol.iterator]().next().done;class mc extends $i{constructor(e,r){super(e),Object.defineProperty(this,"schema",{value:r,configurable:!0,enumerable:!1,writable:!0})}clone(e){const r=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(r.schema=e),r.items=r.items.map(n=>fe(n)||le(n)?n.clone(e):n),this.range&&(r.range=this.range.slice()),r}addIn(e,r){if(_r(e))this.add(r);else{const[n,...s]=e,i=this.get(n,!0);if(ce(i))i.addIn(s,r);else if(i===void 0&&this.schema)this.set(n,Nn(this.schema,s,r));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${s}`)}}deleteIn(e){const[r,...n]=e;if(n.length===0)return this.delete(r);const s=this.get(r,!0);if(ce(s))return s.deleteIn(n);throw new Error(`Expected YAML collection at ${r}. Remaining path: ${n}`)}getIn(e,r){const[n,...s]=e,i=this.get(n,!0);return s.length===0?!r&&ne(i)?i.value:i:ce(i)?i.getIn(s,r):void 0}hasAllNullValues(e){return this.items.every(r=>{if(!le(r))return!1;const n=r.value;return n==null||e&&ne(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){const[r,...n]=e;if(n.length===0)return this.has(r);const s=this.get(r,!0);return ce(s)?s.hasIn(n):!1}setIn(e,r){const[n,...s]=e;if(s.length===0)this.set(n,r);else{const i=this.get(n,!0);if(ce(i))i.setIn(s,r);else if(i===void 0&&this.schema)this.set(n,Nn(this.schema,s,r));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${s}`)}}}const Tu=t=>t.replace(/^(?!$)(?: $)?/gm,"#");function He(t,e){return/^\n+$/.test(t)?t.substring(1):e?t.replace(/^(?! *$)/gm,e):t}const gt=(t,e,r)=>t.endsWith(`
3
+ `)?He(r,e):r.includes(`
4
+ `)?`
5
+ `+He(r,e):(t.endsWith(" ")?"":" ")+r,hc="flow",Fs="block",_n="quoted";function Bn(t,e,r="flow",{indentAtStart:n,lineWidth:s=80,minContentWidth:i=20,onFold:o,onOverflow:a}={}){if(!s||s<0)return t;s<i&&(i=0);const f=Math.max(1+i,1+s-e.length);if(t.length<=f)return t;const c=[],u={};let l=s-e.length;typeof n=="number"&&(n>s-Math.max(2,i)?c.push(0):l=s-n);let d,p,h=!1,y=-1,m=-1,$=-1;r===Fs&&(y=Xo(t,y,e.length),y!==-1&&(l=y+f));for(let w;w=t[y+=1];){if(r===_n&&w==="\\"){switch(m=y,t[y+1]){case"x":y+=3;break;case"u":y+=5;break;case"U":y+=9;break;default:y+=1}$=y}if(w===`
6
+ `)r===Fs&&(y=Xo(t,y,e.length)),l=y+e.length+f,d=void 0;else{if(w===" "&&p&&p!==" "&&p!==`
7
+ `&&p!==" "){const E=t[y+1];E&&E!==" "&&E!==`
8
+ `&&E!==" "&&(d=y)}if(y>=l)if(d)c.push(d),l=d+f,d=void 0;else if(r===_n){for(;p===" "||p===" ";)p=w,w=t[y+=1],h=!0;const E=y>$+1?y-2:m-1;if(u[E])return t;c.push(E),u[E]=!0,l=E+f,d=void 0}else h=!0}p=w}if(h&&a&&a(),c.length===0)return t;o&&o();let b=t.slice(0,c[0]);for(let w=0;w<c.length;++w){const E=c[w],O=c[w+1]||t.length;E===0?b=`
9
+ ${e}${t.slice(0,O)}`:(r===_n&&u[E]&&(b+=`${t[E]}\\`),b+=`
10
+ ${e}${t.slice(E+1,O)}`)}return b}function Xo(t,e,r){let n=e,s=e+1,i=t[s];for(;i===" "||i===" ";)if(e<s+r)i=t[++e];else{do i=t[++e];while(i&&i!==`
11
+ `);n=e,s=e+1,i=t[s]}return n}const Hn=(t,e)=>({indentAtStart:e?t.indent.length:t.indentAtStart,lineWidth:t.options.lineWidth,minContentWidth:t.options.minContentWidth}),Gn=t=>/^(%|---|\.\.\.)/m.test(t);function xu(t,e,r){if(!e||e<0)return!1;const n=e-r,s=t.length;if(s<=n)return!1;for(let i=0,o=0;i<s;++i)if(t[i]===`
12
+ `){if(i-o>n)return!0;if(o=i+1,s-o<=n)return!1}return!0}function Or(t,e){const r=JSON.stringify(t);if(e.options.doubleQuotedAsJSON)return r;const{implicitKey:n}=e,s=e.options.doubleQuotedMinMultiLineLength,i=e.indent||(Gn(t)?" ":"");let o="",a=0;for(let f=0,c=r[f];c;c=r[++f])if(c===" "&&r[f+1]==="\\"&&r[f+2]==="n"&&(o+=r.slice(a,f)+"\\ ",f+=1,a=f,c="\\"),c==="\\")switch(r[f+1]){case"u":{o+=r.slice(a,f);const u=r.substr(f+2,4);switch(u){case"0000":o+="\\0";break;case"0007":o+="\\a";break;case"000b":o+="\\v";break;case"001b":o+="\\e";break;case"0085":o+="\\N";break;case"00a0":o+="\\_";break;case"2028":o+="\\L";break;case"2029":o+="\\P";break;default:u.substr(0,2)==="00"?o+="\\x"+u.substr(2):o+=r.substr(f,6)}f+=5,a=f+1}break;case"n":if(n||r[f+2]==='"'||r.length<s)f+=1;else{for(o+=r.slice(a,f)+`
13
+
14
+ `;r[f+2]==="\\"&&r[f+3]==="n"&&r[f+4]!=='"';)o+=`
15
+ `,f+=2;o+=i,r[f+2]===" "&&(o+="\\"),f+=1,a=f+1}break;default:f+=1}return o=a?o+r.slice(a):r,n?o:Bn(o,i,_n,Hn(e,!1))}function Vs(t,e){if(e.options.singleQuote===!1||e.implicitKey&&t.includes(`
16
+ `)||/[ \t]\n|\n[ \t]/.test(t))return Or(t,e);const r=e.indent||(Gn(t)?" ":""),n="'"+t.replace(/'/g,"''").replace(/\n+/g,`$&
17
+ ${r}`)+"'";return e.implicitKey?n:Bn(n,r,hc,Hn(e,!1))}function Dt(t,e){const{singleQuote:r}=e.options;let n;if(r===!1)n=Or;else{const s=t.includes('"'),i=t.includes("'");s&&!i?n=Vs:i&&!s?n=Or:n=r?Vs:Or}return n(t,e)}let Us;try{Us=new RegExp(`(^|(?<!
18
+ ))
19
+ +(?!
20
+ |$)`,"g")}catch{Us=/\n+(?!\n|$)/g}function Pn({comment:t,type:e,value:r},n,s,i){const{blockQuote:o,commentString:a,lineWidth:f}=n.options;if(!o||/\n[\t ]+$/.test(r))return Dt(r,n);const c=n.indent||(n.forceBlockIndent||Gn(r)?" ":""),u=o==="literal"?!0:o==="folded"||e===J.BLOCK_FOLDED?!1:e===J.BLOCK_LITERAL?!0:!xu(r,f,c.length);if(!r)return u?`|
21
+ `:`>
22
+ `;let l,d;for(d=r.length;d>0;--d){const O=r[d-1];if(O!==`
23
+ `&&O!==" "&&O!==" ")break}let p=r.substring(d);const h=p.indexOf(`
24
+ `);h===-1?l="-":r===p||h!==p.length-1?(l="+",i&&i()):l="",p&&(r=r.slice(0,-p.length),p[p.length-1]===`
25
+ `&&(p=p.slice(0,-1)),p=p.replace(Us,`$&${c}`));let y=!1,m,$=-1;for(m=0;m<r.length;++m){const O=r[m];if(O===" ")y=!0;else if(O===`
26
+ `)$=m;else break}let b=r.substring(0,$<m?$+1:m);b&&(r=r.substring(b.length),b=b.replace(/\n+/g,`$&${c}`));let E=(y?c?"2":"1":"")+l;if(t&&(E+=" "+a(t.replace(/ ?[\r\n]+/g," ")),s&&s()),!u){const O=r.replace(/\n+/g,`
27
+ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`);let M=!1;const C=Hn(n,!0);o!=="folded"&&e!==J.BLOCK_FOLDED&&(C.onOverflow=()=>{M=!0});const N=Bn(`${b}${O}${p}`,c,Fs,C);if(!M)return`>${E}
28
+ ${c}${N}`}return r=r.replace(/\n+/g,`$&${c}`),`|${E}
29
+ ${c}${b}${r}${p}`}function Ru(t,e,r,n){const{type:s,value:i}=t,{actualString:o,implicitKey:a,indent:f,indentStep:c,inFlow:u}=e;if(a&&i.includes(`
30
+ `)||u&&/[[\]{},]/.test(i))return Dt(i,e);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(i))return a||u||!i.includes(`
31
+ `)?Dt(i,e):Pn(t,e,r,n);if(!a&&!u&&s!==J.PLAIN&&i.includes(`
32
+ `))return Pn(t,e,r,n);if(Gn(i)){if(f==="")return e.forceBlockIndent=!0,Pn(t,e,r,n);if(a&&f===c)return Dt(i,e)}const l=i.replace(/\n+/g,`$&
33
+ ${f}`);if(o){const d=y=>{var m;return y.default&&y.tag!=="tag:yaml.org,2002:str"&&((m=y.test)==null?void 0:m.test(l))},{compat:p,tags:h}=e.doc.schema;if(h.some(d)||p!=null&&p.some(d))return Dt(i,e)}return a?l:Bn(l,f,hc,Hn(e,!1))}function vi(t,e,r,n){const{implicitKey:s,inFlow:i}=e,o=typeof t.value=="string"?t:Object.assign({},t,{value:String(t.value)});let{type:a}=t;a!==J.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(a=J.QUOTE_DOUBLE);const f=u=>{switch(u){case J.BLOCK_FOLDED:case J.BLOCK_LITERAL:return s||i?Dt(o.value,e):Pn(o,e,r,n);case J.QUOTE_DOUBLE:return Or(o.value,e);case J.QUOTE_SINGLE:return Vs(o.value,e);case J.PLAIN:return Ru(o,e,r,n);default:return null}};let c=f(a);if(c===null){const{defaultKeyType:u,defaultStringType:l}=e.options,d=s&&u||l;if(c=f(d),c===null)throw new Error(`Unsupported default string type ${d}`)}return c}function yc(t,e){const r=Object.assign({blockQuote:!0,commentString:Tu,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},t.schema.toStringOptions,e);let n;switch(r.collectionStyle){case"block":n=!1;break;case"flow":n=!0;break;default:n=null}return{anchors:new Set,doc:t,flowCollectionPadding:r.flowCollectionPadding?" ":"",indent:"",indentStep:typeof r.indent=="number"?" ".repeat(r.indent):" ",inFlow:n,options:r}}function Cu(t,e){var s;if(e.tag){const i=t.filter(o=>o.tag===e.tag);if(i.length>0)return i.find(o=>o.format===e.format)??i[0]}let r,n;if(ne(e)){n=e.value;let i=t.filter(o=>{var a;return(a=o.identify)==null?void 0:a.call(o,n)});if(i.length>1){const o=i.filter(a=>a.test);o.length>0&&(i=o)}r=i.find(o=>o.format===e.format)??i.find(o=>!o.format)}else n=e,r=t.find(i=>i.nodeClass&&n instanceof i.nodeClass);if(!r){const i=((s=n==null?void 0:n.constructor)==null?void 0:s.name)??(n===null?"null":typeof n);throw new Error(`Tag not resolved for ${i} value`)}return r}function Mu(t,e,{anchors:r,doc:n}){if(!n.directives)return"";const s=[],i=(ne(t)||ce(t))&&t.anchor;i&&lc(i)&&(r.add(i),s.push(`&${i}`));const o=t.tag??(e.default?null:e.tag);return o&&s.push(n.directives.tagString(o)),s.join(" ")}function Bt(t,e,r,n){var f;if(le(t))return t.toString(e,r,n);if(Xt(t)){if(e.doc.directives)return t.toString(e);if((f=e.resolvedAliases)!=null&&f.has(t))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(t):e.resolvedAliases=new Set([t]),t=t.resolve(e.doc)}let s;const i=fe(t)?t:e.doc.createNode(t,{onTagObj:c=>s=c});s??(s=Cu(e.doc.schema.tags,i));const o=Mu(i,s,e);o.length>0&&(e.indentAtStart=(e.indentAtStart??0)+o.length+1);const a=typeof s.stringify=="function"?s.stringify(i,e,r,n):ne(i)?vi(i,e,r,n):i.toString(e,r,n);return o?ne(i)||a[0]==="{"||a[0]==="["?`${o} ${a}`:`${o}
34
+ ${e.indent}${a}`:a}function qu({key:t,value:e},r,n,s){const{allNullValues:i,doc:o,indent:a,indentStep:f,options:{commentString:c,indentSeq:u,simpleKeys:l}}=r;let d=fe(t)&&t.comment||null;if(l){if(d)throw new Error("With simple keys, key nodes cannot have comments");if(ce(t)||!fe(t)&&typeof t=="object"){const C="With simple keys, collection cannot be used as a key value";throw new Error(C)}}let p=!l&&(!t||d&&e==null&&!r.inFlow||ce(t)||(ne(t)?t.type===J.BLOCK_FOLDED||t.type===J.BLOCK_LITERAL:typeof t=="object"));r=Object.assign({},r,{allNullValues:!1,implicitKey:!p&&(l||!i),indent:a+f});let h=!1,y=!1,m=Bt(t,r,()=>h=!0,()=>y=!0);if(!p&&!r.inFlow&&m.length>1024){if(l)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");p=!0}if(r.inFlow){if(i||e==null)return h&&n&&n(),m===""?"?":p?`? ${m}`:m}else if(i&&!l||e==null&&p)return m=`? ${m}`,d&&!h?m+=gt(m,r.indent,c(d)):y&&s&&s(),m;h&&(d=null),p?(d&&(m+=gt(m,r.indent,c(d))),m=`? ${m}
35
+ ${a}:`):(m=`${m}:`,d&&(m+=gt(m,r.indent,c(d))));let $,b,w;fe(e)?($=!!e.spaceBefore,b=e.commentBefore,w=e.comment):($=!1,b=null,w=null,e&&typeof e=="object"&&(e=o.createNode(e))),r.implicitKey=!1,!p&&!d&&ne(e)&&(r.indentAtStart=m.length+1),y=!1,!u&&f.length>=2&&!r.inFlow&&!p&&Fr(e)&&!e.flow&&!e.tag&&!e.anchor&&(r.indent=r.indent.substring(2));let E=!1;const O=Bt(e,r,()=>E=!0,()=>y=!0);let M=" ";if(d||$||b){if(M=$?`
36
+ `:"",b){const C=c(b);M+=`
37
+ ${He(C,r.indent)}`}O===""&&!r.inFlow?M===`
38
+ `&&w&&(M=`
39
+
40
+ `):M+=`
41
+ ${r.indent}`}else if(!p&&ce(e)){const C=O[0],N=O.indexOf(`
42
+ `),z=N!==-1,X=r.inFlow??e.flow??e.items.length===0;if(z||!X){let x=!1;if(z&&(C==="&"||C==="!")){let L=O.indexOf(" ");C==="&"&&L!==-1&&L<N&&O[L+1]==="!"&&(L=O.indexOf(" ",L+1)),(L===-1||N<L)&&(x=!0)}x||(M=`
43
+ ${r.indent}`)}}else(O===""||O[0]===`
44
+ `)&&(M="");return m+=M+O,r.inFlow?E&&n&&n():w&&!E?m+=gt(m,r.indent,c(w)):y&&s&&s(),m}function gc(t,e){(t==="debug"||t==="warn")&&console.warn(e)}const on="<<",Ge={identify:t=>t===on||typeof t=="symbol"&&t.description===on,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new J(Symbol(on)),{addToJSMap:$c}),stringify:()=>on},Du=(t,e)=>(Ge.identify(e)||ne(e)&&(!e.type||e.type===J.PLAIN)&&Ge.identify(e.value))&&(t==null?void 0:t.doc.schema.tags.some(r=>r.tag===Ge.tag&&r.default));function $c(t,e,r){const n=bc(t,r);if(Fr(n))for(const s of n.items)_s(t,e,s);else if(Array.isArray(n))for(const s of n)_s(t,e,s);else _s(t,e,n)}function _s(t,e,r){const n=bc(t,r);if(!Lr(n))throw new Error("Merge sources must be maps or map aliases");const s=n.toJSON(null,t,Map);for(const[i,o]of s)e instanceof Map?e.has(i)||e.set(i,o):e instanceof Set?e.add(i):Object.prototype.hasOwnProperty.call(e,i)||Object.defineProperty(e,i,{value:o,writable:!0,enumerable:!0,configurable:!0});return e}function bc(t,e){return t&&Xt(e)?e.resolve(t.doc,t):e}function vc(t,e,{key:r,value:n}){if(fe(r)&&r.addToJSMap)r.addToJSMap(t,e,n);else if(Du(t,r))$c(t,e,n);else{const s=Ne(r,"",t);if(e instanceof Map)e.set(s,Ne(n,s,t));else if(e instanceof Set)e.add(s);else{const i=Lu(r,s,t),o=Ne(n,i,t);i in e?Object.defineProperty(e,i,{value:o,writable:!0,enumerable:!0,configurable:!0}):e[i]=o}}return e}function Lu(t,e,r){if(e===null)return"";if(typeof e!="object")return String(e);if(fe(t)&&(r!=null&&r.doc)){const n=yc(r.doc,{});n.anchors=new Set;for(const i of r.anchors.keys())n.anchors.add(i.anchor);n.inFlow=!0,n.inStringifyKey=!0;const s=t.toString(n);if(!r.mapKeyWarned){let i=JSON.stringify(s);i.length>40&&(i=i.substring(0,36)+'..."'),gc(r.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${i}. Set mapAsMap: true to use object keys.`),r.mapKeyWarned=!0}return s}return JSON.stringify(e)}function wi(t,e,r){const n=Rr(t,void 0,r),s=Rr(e,void 0,r);return new Pe(n,s)}class Pe{constructor(e,r=null){Object.defineProperty(this,xe,{value:cc}),this.key=e,this.value=r}clone(e){let{key:r,value:n}=this;return fe(r)&&(r=r.clone(e)),fe(n)&&(n=n.clone(e)),new Pe(r,n)}toJSON(e,r){const n=r!=null&&r.mapAsMap?new Map:{};return vc(r,n,this)}toString(e,r,n){return e!=null&&e.doc?qu(this,e,r,n):JSON.stringify(this)}}function wc(t,e,r){return(e.inFlow??t.flow?Vu:Fu)(t,e,r)}function Fu({comment:t,items:e},r,{blockItemPrefix:n,flowChars:s,itemIndent:i,onChompKeep:o,onComment:a}){const{indent:f,options:{commentString:c}}=r,u=Object.assign({},r,{indent:i,type:null});let l=!1;const d=[];for(let h=0;h<e.length;++h){const y=e[h];let m=null;if(fe(y))!l&&y.spaceBefore&&d.push(""),Tn(r,d,y.commentBefore,l),y.comment&&(m=y.comment);else if(le(y)){const b=fe(y.key)?y.key:null;b&&(!l&&b.spaceBefore&&d.push(""),Tn(r,d,b.commentBefore,l))}l=!1;let $=Bt(y,u,()=>m=null,()=>l=!0);m&&($+=gt($,i,c(m))),l&&m&&(l=!1),d.push(n+$)}let p;if(d.length===0)p=s.start+s.end;else{p=d[0];for(let h=1;h<d.length;++h){const y=d[h];p+=y?`
45
+ ${f}${y}`:`
46
+ `}}return t?(p+=`
47
+ `+He(c(t),f),a&&a()):l&&o&&o(),p}function Vu({items:t},e,{flowChars:r,itemIndent:n}){const{indent:s,indentStep:i,flowCollectionPadding:o,options:{commentString:a}}=e;n+=i;const f=Object.assign({},e,{indent:n,inFlow:!0,type:null});let c=!1,u=0;const l=[];for(let h=0;h<t.length;++h){const y=t[h];let m=null;if(fe(y))y.spaceBefore&&l.push(""),Tn(e,l,y.commentBefore,!1),y.comment&&(m=y.comment);else if(le(y)){const b=fe(y.key)?y.key:null;b&&(b.spaceBefore&&l.push(""),Tn(e,l,b.commentBefore,!1),b.comment&&(c=!0));const w=fe(y.value)?y.value:null;w?(w.comment&&(m=w.comment),w.commentBefore&&(c=!0)):y.value==null&&(b!=null&&b.comment)&&(m=b.comment)}m&&(c=!0);let $=Bt(y,f,()=>m=null);c||(c=l.length>u||$.includes(`
48
+ `)),h<t.length-1?$+=",":e.options.trailingComma&&(e.options.lineWidth>0&&(c||(c=l.reduce((b,w)=>b+w.length+2,2)+($.length+2)>e.options.lineWidth)),c&&($+=",")),m&&($+=gt($,n,a(m))),l.push($),u=l.length}const{start:d,end:p}=r;if(l.length===0)return d+p;if(!c){const h=l.reduce((y,m)=>y+m.length+2,2);c=e.options.lineWidth>0&&h>e.options.lineWidth}if(c){let h=d;for(const y of l)h+=y?`
49
+ ${i}${s}${y}`:`
50
+ `;return`${h}
51
+ ${s}${p}`}else return`${d}${o}${l.join(" ")}${o}${p}`}function Tn({indent:t,options:{commentString:e}},r,n,s){if(n&&s&&(n=n.replace(/^\n+/,"")),n){const i=He(e(n),t);r.push(i.trimStart())}}function $t(t,e){const r=ne(e)?e.value:e;for(const n of t)if(le(n)&&(n.key===e||n.key===r||ne(n.key)&&n.key.value===r))return n}class Ae extends mc{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(ot,e),this.items=[]}static from(e,r,n){const{keepUndefined:s,replacer:i}=n,o=new this(e),a=(f,c)=>{if(typeof i=="function")c=i.call(r,f,c);else if(Array.isArray(i)&&!i.includes(f))return;(c!==void 0||s)&&o.items.push(wi(f,c,n))};if(r instanceof Map)for(const[f,c]of r)a(f,c);else if(r&&typeof r=="object")for(const f of Object.keys(r))a(f,r[f]);return typeof e.sortMapEntries=="function"&&o.items.sort(e.sortMapEntries),o}add(e,r){var o;let n;le(e)?n=e:!e||typeof e!="object"||!("key"in e)?n=new Pe(e,e==null?void 0:e.value):n=new Pe(e.key,e.value);const s=$t(this.items,n.key),i=(o=this.schema)==null?void 0:o.sortMapEntries;if(s){if(!r)throw new Error(`Key ${n.key} already set`);ne(s.value)&&pc(n.value)?s.value.value=n.value:s.value=n.value}else if(i){const a=this.items.findIndex(f=>i(n,f)<0);a===-1?this.items.push(n):this.items.splice(a,0,n)}else this.items.push(n)}delete(e){const r=$t(this.items,e);return r?this.items.splice(this.items.indexOf(r),1).length>0:!1}get(e,r){const n=$t(this.items,e),s=n==null?void 0:n.value;return(!r&&ne(s)?s.value:s)??void 0}has(e){return!!$t(this.items,e)}set(e,r){this.add(new Pe(e,r),!0)}toJSON(e,r,n){const s=n?new n:r!=null&&r.mapAsMap?new Map:{};r!=null&&r.onCreate&&r.onCreate(s);for(const i of this.items)vc(r,s,i);return s}toString(e,r,n){if(!e)return JSON.stringify(this);for(const s of this.items)if(!le(s))throw new Error(`Map items must all be pairs; found ${JSON.stringify(s)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),wc(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:n,onComment:r})}}const Qt={collection:"map",default:!0,nodeClass:Ae,tag:"tag:yaml.org,2002:map",resolve(t,e){return Lr(t)||e("Expected a mapping for this tag"),t},createNode:(t,e,r)=>Ae.from(t,e,r)};class vt extends mc{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(Yt,e),this.items=[]}add(e){this.items.push(e)}delete(e){const r=an(e);return typeof r!="number"?!1:this.items.splice(r,1).length>0}get(e,r){const n=an(e);if(typeof n!="number")return;const s=this.items[n];return!r&&ne(s)?s.value:s}has(e){const r=an(e);return typeof r=="number"&&r<this.items.length}set(e,r){const n=an(e);if(typeof n!="number")throw new Error(`Expected a valid index, not ${e}.`);const s=this.items[n];ne(s)&&pc(r)?s.value=r:this.items[n]=r}toJSON(e,r){const n=[];r!=null&&r.onCreate&&r.onCreate(n);let s=0;for(const i of this.items)n.push(Ne(i,String(s++),r));return n}toString(e,r,n){return e?wc(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:n,onComment:r}):JSON.stringify(this)}static from(e,r,n){const{replacer:s}=n,i=new this(e);if(r&&Symbol.iterator in Object(r)){let o=0;for(let a of r){if(typeof s=="function"){const f=r instanceof Set?a:String(o++);a=s.call(r,f,a)}i.items.push(Rr(a,void 0,n))}}return i}}function an(t){let e=ne(t)?t.value:t;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}const er={collection:"seq",default:!0,nodeClass:vt,tag:"tag:yaml.org,2002:seq",resolve(t,e){return Fr(t)||e("Expected a sequence for this tag"),t},createNode:(t,e,r)=>vt.from(t,e,r)},Jn={identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify(t,e,r,n){return e=Object.assign({actualString:!0},e),vi(t,e,r,n)}},Wn={identify:t=>t==null,createNode:()=>new J(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new J(null),stringify:({source:t},e)=>typeof t=="string"&&Wn.test.test(t)?t:e.options.nullStr},_i={identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>new J(t[0]==="t"||t[0]==="T"),stringify({source:t,value:e},r){if(t&&_i.test.test(t)){const n=t[0]==="t"||t[0]==="T";if(e===n)return t}return e?r.options.trueStr:r.options.falseStr}};function Fe({format:t,minFractionDigits:e,tag:r,value:n}){if(typeof n=="bigint")return String(n);const s=typeof n=="number"?n:Number(n);if(!isFinite(s))return isNaN(s)?".nan":s<0?"-.inf":".inf";let i=Object.is(n,-0)?"-0":JSON.stringify(n);if(!t&&e&&(!r||r==="tag:yaml.org,2002:float")&&/^-?\d/.test(i)&&!i.includes("e")){let o=i.indexOf(".");o<0&&(o=i.length,i+=".");let a=e-(i.length-o-1);for(;a-- >0;)i+="0"}return i}const _c={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Fe},Pc={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t),stringify(t){const e=Number(t.value);return isFinite(e)?e.toExponential():Fe(t)}},Ec={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(t){const e=new J(parseFloat(t)),r=t.indexOf(".");return r!==-1&&t[t.length-1]==="0"&&(e.minFractionDigits=t.length-r-1),e},stringify:Fe},Yn=t=>typeof t=="bigint"||Number.isInteger(t),Pi=(t,e,r,{intAsBigInt:n})=>n?BigInt(t):parseInt(t.substring(e),r);function Sc(t,e,r){const{value:n}=t;return Yn(n)&&n>=0?r+n.toString(e):Fe(t)}const jc={identify:t=>Yn(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(t,e,r)=>Pi(t,2,8,r),stringify:t=>Sc(t,8,"0o")},Oc={identify:Yn,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(t,e,r)=>Pi(t,0,10,r),stringify:Fe},kc={identify:t=>Yn(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(t,e,r)=>Pi(t,2,16,r),stringify:t=>Sc(t,16,"0x")},Uu=[Qt,er,Jn,Wn,_i,jc,Oc,kc,_c,Pc,Ec];function Zo(t){return typeof t=="bigint"||Number.isInteger(t)}const cn=({value:t})=>JSON.stringify(t),zu=[{identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify:cn},{identify:t=>t==null,createNode:()=>new J(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:cn},{identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:t=>t==="true",stringify:cn},{identify:Zo,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(t,e,{intAsBigInt:r})=>r?BigInt(t):parseInt(t,10),stringify:({value:t})=>Zo(t)?t.toString():JSON.stringify(t)},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:t=>parseFloat(t),stringify:cn}],Ku={default:!0,tag:"",test:/^/,resolve(t,e){return e(`Unresolved plain scalar ${JSON.stringify(t)}`),t}},Bu=[Qt,er].concat(zu,Ku),Ei={identify:t=>t instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(t,e){if(typeof atob=="function"){const r=atob(t.replace(/[\n\r]/g,"")),n=new Uint8Array(r.length);for(let s=0;s<r.length;++s)n[s]=r.charCodeAt(s);return n}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),t},stringify({comment:t,type:e,value:r},n,s,i){if(!r)return"";const o=r;let a;if(typeof btoa=="function"){let f="";for(let c=0;c<o.length;++c)f+=String.fromCharCode(o[c]);a=btoa(f)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e??(e=J.BLOCK_LITERAL),e!==J.QUOTE_DOUBLE){const f=Math.max(n.options.lineWidth-n.indent.length,n.options.minContentWidth),c=Math.ceil(a.length/f),u=new Array(c);for(let l=0,d=0;l<c;++l,d+=f)u[l]=a.substr(d,f);a=u.join(e===J.BLOCK_LITERAL?`
52
+ `:" ")}return vi({comment:t,type:e,value:a},n,s,i)}};function Ic(t,e){if(Fr(t))for(let r=0;r<t.items.length;++r){let n=t.items[r];if(!le(n)){if(Lr(n)){n.items.length>1&&e("Each pair must have its own sequence indicator");const s=n.items[0]||new Pe(new J(null));if(n.commentBefore&&(s.key.commentBefore=s.key.commentBefore?`${n.commentBefore}
53
+ ${s.key.commentBefore}`:n.commentBefore),n.comment){const i=s.value??s.key;i.comment=i.comment?`${n.comment}
54
+ ${i.comment}`:n.comment}n=s}t.items[r]=le(n)?n:new Pe(n)}}else e("Expected a sequence for this tag");return t}function Ac(t,e,r){const{replacer:n}=r,s=new vt(t);s.tag="tag:yaml.org,2002:pairs";let i=0;if(e&&Symbol.iterator in Object(e))for(let o of e){typeof n=="function"&&(o=n.call(e,String(i++),o));let a,f;if(Array.isArray(o))if(o.length===2)a=o[0],f=o[1];else throw new TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){const c=Object.keys(o);if(c.length===1)a=c[0],f=o[a];else throw new TypeError(`Expected tuple with one key, not ${c.length} keys`)}else a=o;s.items.push(wi(a,f,r))}return s}const Si={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Ic,createNode:Ac};class Vt extends vt{constructor(){super(),this.add=Ae.prototype.add.bind(this),this.delete=Ae.prototype.delete.bind(this),this.get=Ae.prototype.get.bind(this),this.has=Ae.prototype.has.bind(this),this.set=Ae.prototype.set.bind(this),this.tag=Vt.tag}toJSON(e,r){if(!r)return super.toJSON(e);const n=new Map;r!=null&&r.onCreate&&r.onCreate(n);for(const s of this.items){let i,o;if(le(s)?(i=Ne(s.key,"",r),o=Ne(s.value,i,r)):i=Ne(s,"",r),n.has(i))throw new Error("Ordered maps must not include duplicate keys");n.set(i,o)}return n}static from(e,r,n){const s=Ac(e,r,n),i=new this;return i.items=s.items,i}}Vt.tag="tag:yaml.org,2002:omap";const ji={collection:"seq",identify:t=>t instanceof Map,nodeClass:Vt,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,e){const r=Ic(t,e),n=[];for(const{key:s}of r.items)ne(s)&&(n.includes(s.value)?e(`Ordered maps must not include duplicate keys: ${s.value}`):n.push(s.value));return Object.assign(new Vt,r)},createNode:(t,e,r)=>Vt.from(t,e,r)};function Nc({value:t,source:e},r){return e&&(t?Tc:xc).test.test(e)?e:t?r.options.trueStr:r.options.falseStr}const Tc={identify:t=>t===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new J(!0),stringify:Nc},xc={identify:t=>t===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new J(!1),stringify:Nc},Hu={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Fe},Gu={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t.replace(/_/g,"")),stringify(t){const e=Number(t.value);return isFinite(e)?e.toExponential():Fe(t)}},Ju={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){const e=new J(parseFloat(t.replace(/_/g,""))),r=t.indexOf(".");if(r!==-1){const n=t.substring(r+1).replace(/_/g,"");n[n.length-1]==="0"&&(e.minFractionDigits=n.length)}return e},stringify:Fe},Vr=t=>typeof t=="bigint"||Number.isInteger(t);function Xn(t,e,r,{intAsBigInt:n}){const s=t[0];if((s==="-"||s==="+")&&(e+=1),t=t.substring(e).replace(/_/g,""),n){switch(r){case 2:t=`0b${t}`;break;case 8:t=`0o${t}`;break;case 16:t=`0x${t}`;break}const o=BigInt(t);return s==="-"?BigInt(-1)*o:o}const i=parseInt(t,r);return s==="-"?-1*i:i}function Oi(t,e,r){const{value:n}=t;if(Vr(n)){const s=n.toString(e);return n<0?"-"+r+s.substr(1):r+s}return Fe(t)}const Wu={identify:Vr,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(t,e,r)=>Xn(t,2,2,r),stringify:t=>Oi(t,2,"0b")},Yu={identify:Vr,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(t,e,r)=>Xn(t,1,8,r),stringify:t=>Oi(t,8,"0")},Xu={identify:Vr,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(t,e,r)=>Xn(t,0,10,r),stringify:Fe},Zu={identify:Vr,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(t,e,r)=>Xn(t,2,16,r),stringify:t=>Oi(t,16,"0x")};class Ut extends Ae{constructor(e){super(e),this.tag=Ut.tag}add(e){let r;le(e)?r=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?r=new Pe(e.key,null):r=new Pe(e,null),$t(this.items,r.key)||this.items.push(r)}get(e,r){const n=$t(this.items,e);return!r&&le(n)?ne(n.key)?n.key.value:n.key:n}set(e,r){if(typeof r!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof r}`);const n=$t(this.items,e);n&&!r?this.items.splice(this.items.indexOf(n),1):!n&&r&&this.items.push(new Pe(e))}toJSON(e,r){return super.toJSON(e,r,Set)}toString(e,r,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),r,n);throw new Error("Set items must all have null values")}static from(e,r,n){const{replacer:s}=n,i=new this(e);if(r&&Symbol.iterator in Object(r))for(let o of r)typeof s=="function"&&(o=s.call(r,o,o)),i.items.push(wi(o,null,n));return i}}Ut.tag="tag:yaml.org,2002:set";const ki={collection:"map",identify:t=>t instanceof Set,nodeClass:Ut,default:!1,tag:"tag:yaml.org,2002:set",createNode:(t,e,r)=>Ut.from(t,e,r),resolve(t,e){if(Lr(t)){if(t.hasAllNullValues(!0))return Object.assign(new Ut,t);e("Set items must all have null values")}else e("Expected a mapping for this tag");return t}};function Ii(t,e){const r=t[0],n=r==="-"||r==="+"?t.substring(1):t,s=o=>e?BigInt(o):Number(o),i=n.replace(/_/g,"").split(":").reduce((o,a)=>o*s(60)+s(a),s(0));return r==="-"?s(-1)*i:i}function Rc(t){let{value:e}=t,r=o=>o;if(typeof e=="bigint")r=o=>BigInt(o);else if(isNaN(e)||!isFinite(e))return Fe(t);let n="";e<0&&(n="-",e*=r(-1));const s=r(60),i=[e%s];return e<60?i.unshift(0):(e=(e-i[0])/s,i.unshift(e%s),e>=60&&(e=(e-i[0])/s,i.unshift(e))),n+i.map(o=>String(o).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const Cc={identify:t=>typeof t=="bigint"||Number.isInteger(t),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(t,e,{intAsBigInt:r})=>Ii(t,r),stringify:Rc},Mc={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:t=>Ii(t,!1),stringify:Rc},Zn={identify:t=>t instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(t){const e=t.match(Zn.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,r,n,s,i,o,a]=e.map(Number),f=e[7]?Number((e[7]+"00").substr(1,3)):0;let c=Date.UTC(r,n-1,s,i||0,o||0,a||0,f);const u=e[8];if(u&&u!=="Z"){let l=Ii(u,!1);Math.abs(l)<30&&(l*=60),c-=6e4*l}return new Date(c)},stringify:({value:t})=>(t==null?void 0:t.toISOString().replace(/(T00:00:00)?\.000Z$/,""))??""},Qo=[Qt,er,Jn,Wn,Tc,xc,Wu,Yu,Xu,Zu,Hu,Gu,Ju,Ei,Ge,ji,Si,ki,Cc,Mc,Zn],ea=new Map([["core",Uu],["failsafe",[Qt,er,Jn]],["json",Bu],["yaml11",Qo],["yaml-1.1",Qo]]),ta={binary:Ei,bool:_i,float:Ec,floatExp:Pc,floatNaN:_c,floatTime:Mc,int:Oc,intHex:kc,intOct:jc,intTime:Cc,map:Qt,merge:Ge,null:Wn,omap:ji,pairs:Si,seq:er,set:ki,timestamp:Zn},Qu={"tag:yaml.org,2002:binary":Ei,"tag:yaml.org,2002:merge":Ge,"tag:yaml.org,2002:omap":ji,"tag:yaml.org,2002:pairs":Si,"tag:yaml.org,2002:set":ki,"tag:yaml.org,2002:timestamp":Zn};function Ps(t,e,r){const n=ea.get(e);if(n&&!t)return r&&!n.includes(Ge)?n.concat(Ge):n.slice();let s=n;if(!s)if(Array.isArray(t))s=[];else{const i=Array.from(ea.keys()).filter(o=>o!=="yaml11").map(o=>JSON.stringify(o)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${i} or define customTags array`)}if(Array.isArray(t))for(const i of t)s=s.concat(i);else typeof t=="function"&&(s=t(s.slice()));return r&&(s=s.concat(Ge)),s.reduce((i,o)=>{const a=typeof o=="string"?ta[o]:o;if(!a){const f=JSON.stringify(o),c=Object.keys(ta).map(u=>JSON.stringify(u)).join(", ");throw new Error(`Unknown custom tag ${f}; use one of ${c}`)}return i.includes(a)||i.push(a),i},[])}const ed=(t,e)=>t.key<e.key?-1:t.key>e.key?1:0;class Ai{constructor({compat:e,customTags:r,merge:n,resolveKnownTags:s,schema:i,sortMapEntries:o,toStringDefaults:a}){this.compat=Array.isArray(e)?Ps(e,"compat"):e?Ps(null,e):null,this.name=typeof i=="string"&&i||"core",this.knownTags=s?Qu:{},this.tags=Ps(r,this.name,n),this.toStringOptions=a??null,Object.defineProperty(this,ot,{value:Qt}),Object.defineProperty(this,Ke,{value:Jn}),Object.defineProperty(this,Yt,{value:er}),this.sortMapEntries=typeof o=="function"?o:o===!0?ed:null}clone(){const e=Object.create(Ai.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}function td(t,e){var f;const r=[];let n=e.directives===!0;if(e.directives!==!1&&t.directives){const c=t.directives.toString(t);c?(r.push(c),n=!0):t.directives.docStart&&(n=!0)}n&&r.push("---");const s=yc(t,e),{commentString:i}=s.options;if(t.commentBefore){r.length!==1&&r.unshift("");const c=i(t.commentBefore);r.unshift(He(c,""))}let o=!1,a=null;if(t.contents){if(fe(t.contents)){if(t.contents.spaceBefore&&n&&r.push(""),t.contents.commentBefore){const l=i(t.contents.commentBefore);r.push(He(l,""))}s.forceBlockIndent=!!t.comment,a=t.contents.comment}const c=a?void 0:()=>o=!0;let u=Bt(t.contents,s,()=>a=null,c);a&&(u+=gt(u,"",i(a))),(u[0]==="|"||u[0]===">")&&r[r.length-1]==="---"?r[r.length-1]=`--- ${u}`:r.push(u)}else r.push(Bt(t.contents,s));if((f=t.directives)!=null&&f.docEnd)if(t.comment){const c=i(t.comment);c.includes(`
55
+ `)?(r.push("..."),r.push(He(c,""))):r.push(`... ${c}`)}else r.push("...");else{let c=t.comment;c&&o&&(c=c.replace(/^\n+/,"")),c&&((!o||a)&&r[r.length-1]!==""&&r.push(""),r.push(He(i(c),"")))}return r.join(`
56
+ `)+`
57
+ `}class Ur{constructor(e,r,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,xe,{value:Ls});let s=null;typeof r=="function"||Array.isArray(r)?s=r:n===void 0&&r&&(n=r,r=void 0);const i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},n);this.options=i;let{version:o}=i;n!=null&&n._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new we({version:o}),this.setSchema(o,n),this.contents=e===void 0?null:this.createNode(e,s,n)}clone(){const e=Object.create(Ur.prototype,{[xe]:{value:Ls}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=fe(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){Nt(this.contents)&&this.contents.add(e)}addIn(e,r){Nt(this.contents)&&this.contents.addIn(e,r)}createAlias(e,r){if(!e.anchor){const n=uc(this);e.anchor=!r||n.has(r)?dc(r||"a",n):r}return new bi(e.anchor)}createNode(e,r,n){let s;if(typeof r=="function")e=r.call({"":e},"",e),s=r;else if(Array.isArray(r)){const m=b=>typeof b=="number"||b instanceof String||b instanceof Number,$=r.filter(m).map(String);$.length>0&&(r=r.concat($)),s=r}else n===void 0&&r&&(n=r,r=void 0);const{aliasDuplicateObjects:i,anchorPrefix:o,flow:a,keepUndefined:f,onTagObj:c,tag:u}=n??{},{onAnchor:l,setAnchors:d,sourceObjects:p}=Iu(this,o||"a"),h={aliasDuplicateObjects:i??!0,keepUndefined:f??!1,onAnchor:l,onTagObj:c,replacer:s,schema:this.schema,sourceObjects:p},y=Rr(e,u,h);return a&&ce(y)&&(y.flow=!0),d(),y}createPair(e,r,n={}){const s=this.createNode(e,null,n),i=this.createNode(r,null,n);return new Pe(s,i)}delete(e){return Nt(this.contents)?this.contents.delete(e):!1}deleteIn(e){return _r(e)?this.contents==null?!1:(this.contents=null,!0):Nt(this.contents)?this.contents.deleteIn(e):!1}get(e,r){return ce(this.contents)?this.contents.get(e,r):void 0}getIn(e,r){return _r(e)?!r&&ne(this.contents)?this.contents.value:this.contents:ce(this.contents)?this.contents.getIn(e,r):void 0}has(e){return ce(this.contents)?this.contents.has(e):!1}hasIn(e){return _r(e)?this.contents!==void 0:ce(this.contents)?this.contents.hasIn(e):!1}set(e,r){this.contents==null?this.contents=Nn(this.schema,[e],r):Nt(this.contents)&&this.contents.set(e,r)}setIn(e,r){_r(e)?this.contents=r:this.contents==null?this.contents=Nn(this.schema,Array.from(e),r):Nt(this.contents)&&this.contents.setIn(e,r)}setSchema(e,r={}){typeof e=="number"&&(e=String(e));let n;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new we({version:"1.1"}),n={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new we({version:e}),n={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,n=null;break;default:{const s=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${s}`)}}if(r.schema instanceof Object)this.schema=r.schema;else if(n)this.schema=new Ai(Object.assign(n,r));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:r,mapAsMap:n,maxAliasCount:s,onAnchor:i,reviver:o}={}){const a={anchors:new Map,doc:this,keep:!e,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof s=="number"?s:100},f=Ne(this.contents,r??"",a);if(typeof i=="function")for(const{count:c,res:u}of a.anchors.values())i(u,c);return typeof o=="function"?qt(o,{"":f},"",f):f}toJSON(e,r){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:r})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){const r=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${r}`)}return td(this,e)}}function Nt(t){if(ce(t))return!0;throw new Error("Expected a YAML collection as document contents")}class qc extends Error{constructor(e,r,n,s){super(),this.name=e,this.code=n,this.message=s,this.pos=r}}class Pr extends qc{constructor(e,r,n){super("YAMLParseError",e,r,n)}}class rd extends qc{constructor(e,r,n){super("YAMLWarning",e,r,n)}}const ra=(t,e)=>r=>{if(r.pos[0]===-1)return;r.linePos=r.pos.map(a=>e.linePos(a));const{line:n,col:s}=r.linePos[0];r.message+=` at line ${n}, column ${s}`;let i=s-1,o=t.substring(e.lineStarts[n-1],e.lineStarts[n]).replace(/[\n\r]+$/,"");if(i>=60&&o.length>80){const a=Math.min(i-39,o.length-79);o="…"+o.substring(a),i-=a-1}if(o.length>80&&(o=o.substring(0,79)+"…"),n>1&&/^ *$/.test(o.substring(0,i))){let a=t.substring(e.lineStarts[n-2],e.lineStarts[n-1]);a.length>80&&(a=a.substring(0,79)+`…
58
+ `),o=a+o}if(/[^ ]/.test(o)){let a=1;const f=r.linePos[1];(f==null?void 0:f.line)===n&&f.col>s&&(a=Math.max(1,Math.min(f.col-s,80-i)));const c=" ".repeat(i)+"^".repeat(a);r.message+=`:
59
+
60
+ ${o}
61
+ ${c}
62
+ `}};function Ht(t,{flow:e,indicator:r,next:n,offset:s,onError:i,parentIndent:o,startOnNewline:a}){let f=!1,c=a,u=a,l="",d="",p=!1,h=!1,y=null,m=null,$=null,b=null,w=null,E=null,O=null;for(const N of t)switch(h&&(N.type!=="space"&&N.type!=="newline"&&N.type!=="comma"&&i(N.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),h=!1),y&&(c&&N.type!=="comment"&&N.type!=="newline"&&i(y,"TAB_AS_INDENT","Tabs are not allowed as indentation"),y=null),N.type){case"space":!e&&(r!=="doc-start"||(n==null?void 0:n.type)!=="flow-collection")&&N.source.includes(" ")&&(y=N),u=!0;break;case"comment":{u||i(N,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const z=N.source.substring(1)||" ";l?l+=d+z:l=z,d="",c=!1;break}case"newline":c?l?l+=N.source:(!E||r!=="seq-item-ind")&&(f=!0):d+=N.source,c=!0,p=!0,(m||$)&&(b=N),u=!0;break;case"anchor":m&&i(N,"MULTIPLE_ANCHORS","A node can have at most one anchor"),N.source.endsWith(":")&&i(N.offset+N.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),m=N,O??(O=N.offset),c=!1,u=!1,h=!0;break;case"tag":{$&&i(N,"MULTIPLE_TAGS","A node can have at most one tag"),$=N,O??(O=N.offset),c=!1,u=!1,h=!0;break}case r:(m||$)&&i(N,"BAD_PROP_ORDER",`Anchors and tags must be after the ${N.source} indicator`),E&&i(N,"UNEXPECTED_TOKEN",`Unexpected ${N.source} in ${e??"collection"}`),E=N,c=r==="seq-item-ind"||r==="explicit-key-ind",u=!1;break;case"comma":if(e){w&&i(N,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),w=N,c=!1,u=!1;break}default:i(N,"UNEXPECTED_TOKEN",`Unexpected ${N.type} token`),c=!1,u=!1}const M=t[t.length-1],C=M?M.offset+M.source.length:s;return h&&n&&n.type!=="space"&&n.type!=="newline"&&n.type!=="comma"&&(n.type!=="scalar"||n.source!=="")&&i(n.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),y&&(c&&y.indent<=o||(n==null?void 0:n.type)==="block-map"||(n==null?void 0:n.type)==="block-seq")&&i(y,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:w,found:E,spaceBefore:f,comment:l,hasNewline:p,anchor:m,tag:$,newlineAfterProp:b,end:C,start:O??C}}function Cr(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes(`
63
+ `))return!0;if(t.end){for(const e of t.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(const e of t.items){for(const r of e.start)if(r.type==="newline")return!0;if(e.sep){for(const r of e.sep)if(r.type==="newline")return!0}if(Cr(e.key)||Cr(e.value))return!0}return!1;default:return!0}}function zs(t,e,r){if((e==null?void 0:e.type)==="flow-collection"){const n=e.end[0];n.indent===t&&(n.source==="]"||n.source==="}")&&Cr(e)&&r(n,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function Dc(t,e,r){const{uniqueKeys:n}=t.options;if(n===!1)return!1;const s=typeof n=="function"?n:(i,o)=>i===o||ne(i)&&ne(o)&&i.value===o.value;return e.some(i=>s(i.key,r))}const na="All mapping items must start at the same column";function nd({composeNode:t,composeEmptyNode:e},r,n,s,i){var u;const o=(i==null?void 0:i.nodeClass)??Ae,a=new o(r.schema);r.atRoot&&(r.atRoot=!1);let f=n.offset,c=null;for(const l of n.items){const{start:d,key:p,sep:h,value:y}=l,m=Ht(d,{indicator:"explicit-key-ind",next:p??(h==null?void 0:h[0]),offset:f,onError:s,parentIndent:n.indent,startOnNewline:!0}),$=!m.found;if($){if(p&&(p.type==="block-seq"?s(f,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in p&&p.indent!==n.indent&&s(f,"BAD_INDENT",na)),!m.anchor&&!m.tag&&!h){c=m.end,m.comment&&(a.comment?a.comment+=`
64
+ `+m.comment:a.comment=m.comment);continue}(m.newlineAfterProp||Cr(p))&&s(p??d[d.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((u=m.found)==null?void 0:u.indent)!==n.indent&&s(f,"BAD_INDENT",na);r.atKey=!0;const b=m.end,w=p?t(r,p,m,s):e(r,b,d,null,m,s);r.schema.compat&&zs(n.indent,p,s),r.atKey=!1,Dc(r,a.items,w)&&s(b,"DUPLICATE_KEY","Map keys must be unique");const E=Ht(h??[],{indicator:"map-value-ind",next:y,offset:w.range[2],onError:s,parentIndent:n.indent,startOnNewline:!p||p.type==="block-scalar"});if(f=E.end,E.found){$&&((y==null?void 0:y.type)==="block-map"&&!E.hasNewline&&s(f,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),r.options.strict&&m.start<E.found.offset-1024&&s(w.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const O=y?t(r,y,E,s):e(r,f,h,null,E,s);r.schema.compat&&zs(n.indent,y,s),f=O.range[2];const M=new Pe(w,O);r.options.keepSourceTokens&&(M.srcToken=l),a.items.push(M)}else{$&&s(w.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),E.comment&&(w.comment?w.comment+=`
65
+ `+E.comment:w.comment=E.comment);const O=new Pe(w);r.options.keepSourceTokens&&(O.srcToken=l),a.items.push(O)}}return c&&c<f&&s(c,"IMPOSSIBLE","Map comment with trailing content"),a.range=[n.offset,f,c??f],a}function sd({composeNode:t,composeEmptyNode:e},r,n,s,i){const o=(i==null?void 0:i.nodeClass)??vt,a=new o(r.schema);r.atRoot&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let f=n.offset,c=null;for(const{start:u,value:l}of n.items){const d=Ht(u,{indicator:"seq-item-ind",next:l,offset:f,onError:s,parentIndent:n.indent,startOnNewline:!0});if(!d.found)if(d.anchor||d.tag||l)(l==null?void 0:l.type)==="block-seq"?s(d.end,"BAD_INDENT","All sequence items must start at the same column"):s(f,"MISSING_CHAR","Sequence item without - indicator");else{c=d.end,d.comment&&(a.comment=d.comment);continue}const p=l?t(r,l,d,s):e(r,d.end,u,null,d,s);r.schema.compat&&zs(n.indent,l,s),f=p.range[2],a.items.push(p)}return a.range=[n.offset,f,c??f],a}function zr(t,e,r,n){let s="";if(t){let i=!1,o="";for(const a of t){const{source:f,type:c}=a;switch(c){case"space":i=!0;break;case"comment":{r&&!i&&n(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const u=f.substring(1)||" ";s?s+=o+u:s=u,o="";break}case"newline":s&&(o+=f),i=!0;break;default:n(a,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}e+=f.length}}return{comment:s,offset:e}}const Es="Block collections are not allowed within flow collections",Ss=t=>t&&(t.type==="block-map"||t.type==="block-seq");function id({composeNode:t,composeEmptyNode:e},r,n,s,i){var m;const o=n.start.source==="{",a=o?"flow map":"flow sequence",f=(i==null?void 0:i.nodeClass)??(o?Ae:vt),c=new f(r.schema);c.flow=!0;const u=r.atRoot;u&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let l=n.offset+n.start.source.length;for(let $=0;$<n.items.length;++$){const b=n.items[$],{start:w,key:E,sep:O,value:M}=b,C=Ht(w,{flow:a,indicator:"explicit-key-ind",next:E??(O==null?void 0:O[0]),offset:l,onError:s,parentIndent:n.indent,startOnNewline:!1});if(!C.found){if(!C.anchor&&!C.tag&&!O&&!M){$===0&&C.comma?s(C.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`):$<n.items.length-1&&s(C.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${a}`),C.comment&&(c.comment?c.comment+=`
66
+ `+C.comment:c.comment=C.comment),l=C.end;continue}!o&&r.options.strict&&Cr(E)&&s(E,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if($===0)C.comma&&s(C.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`);else if(C.comma||s(C.start,"MISSING_CHAR",`Missing , between ${a} items`),C.comment){let N="";e:for(const z of w)switch(z.type){case"comma":case"space":break;case"comment":N=z.source.substring(1);break e;default:break e}if(N){let z=c.items[c.items.length-1];le(z)&&(z=z.value??z.key),z.comment?z.comment+=`
67
+ `+N:z.comment=N,C.comment=C.comment.substring(N.length+1)}}if(!o&&!O&&!C.found){const N=M?t(r,M,C,s):e(r,C.end,O,null,C,s);c.items.push(N),l=N.range[2],Ss(M)&&s(N.range,"BLOCK_IN_FLOW",Es)}else{r.atKey=!0;const N=C.end,z=E?t(r,E,C,s):e(r,N,w,null,C,s);Ss(E)&&s(z.range,"BLOCK_IN_FLOW",Es),r.atKey=!1;const X=Ht(O??[],{flow:a,indicator:"map-value-ind",next:M,offset:z.range[2],onError:s,parentIndent:n.indent,startOnNewline:!1});if(X.found){if(!o&&!C.found&&r.options.strict){if(O)for(const H of O){if(H===X.found)break;if(H.type==="newline"){s(H,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}C.start<X.found.offset-1024&&s(X.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else M&&("source"in M&&((m=M.source)==null?void 0:m[0])===":"?s(M,"MISSING_CHAR",`Missing space after : in ${a}`):s(X.start,"MISSING_CHAR",`Missing , or : between ${a} items`));const x=M?t(r,M,X,s):X.found?e(r,X.end,O,null,X,s):null;x?Ss(M)&&s(x.range,"BLOCK_IN_FLOW",Es):X.comment&&(z.comment?z.comment+=`
68
+ `+X.comment:z.comment=X.comment);const L=new Pe(z,x);if(r.options.keepSourceTokens&&(L.srcToken=b),o){const H=c;Dc(r,H.items,z)&&s(N,"DUPLICATE_KEY","Map keys must be unique"),H.items.push(L)}else{const H=new Ae(r.schema);H.flow=!0,H.items.push(L);const U=(x??z).range;H.range=[z.range[0],U[1],U[2]],c.items.push(H)}l=x?x.range[2]:X.end}}const d=o?"}":"]",[p,...h]=n.end;let y=l;if((p==null?void 0:p.source)===d)y=p.offset+p.source.length;else{const $=a[0].toUpperCase()+a.substring(1),b=u?`${$} must end with a ${d}`:`${$} in block collection must be sufficiently indented and end with a ${d}`;s(l,u?"MISSING_CHAR":"BAD_INDENT",b),p&&p.source.length!==1&&h.unshift(p)}if(h.length>0){const $=zr(h,y,r.options.strict,s);$.comment&&(c.comment?c.comment+=`
69
+ `+$.comment:c.comment=$.comment),c.range=[n.offset,y,$.offset]}else c.range=[n.offset,y,y];return c}function js(t,e,r,n,s,i){const o=r.type==="block-map"?nd(t,e,r,n,i):r.type==="block-seq"?sd(t,e,r,n,i):id(t,e,r,n,i),a=o.constructor;return s==="!"||s===a.tagName?(o.tag=a.tagName,o):(s&&(o.tag=s),o)}function od(t,e,r,n,s){var d;const i=n.tag,o=i?e.directives.tagName(i.source,p=>s(i,"TAG_RESOLVE_FAILED",p)):null;if(r.type==="block-seq"){const{anchor:p,newlineAfterProp:h}=n,y=p&&i?p.offset>i.offset?p:i:p??i;y&&(!h||h.offset<y.offset)&&s(y,"MISSING_CHAR","Missing newline after block sequence props")}const a=r.type==="block-map"?"map":r.type==="block-seq"?"seq":r.start.source==="{"?"map":"seq";if(!i||!o||o==="!"||o===Ae.tagName&&a==="map"||o===vt.tagName&&a==="seq")return js(t,e,r,s,o);let f=e.schema.tags.find(p=>p.tag===o&&p.collection===a);if(!f){const p=e.schema.knownTags[o];if((p==null?void 0:p.collection)===a)e.schema.tags.push(Object.assign({},p,{default:!1})),f=p;else return p?s(i,"BAD_COLLECTION_TYPE",`${p.tag} used for ${a} collection, but expects ${p.collection??"scalar"}`,!0):s(i,"TAG_RESOLVE_FAILED",`Unresolved tag: ${o}`,!0),js(t,e,r,s,o)}const c=js(t,e,r,s,o,f),u=((d=f.resolve)==null?void 0:d.call(f,c,p=>s(i,"TAG_RESOLVE_FAILED",p),e.options))??c,l=fe(u)?u:new J(u);return l.range=c.range,l.tag=o,f!=null&&f.format&&(l.format=f.format),l}function ad(t,e,r){const n=e.offset,s=cd(e,t.options.strict,r);if(!s)return{value:"",type:null,comment:"",range:[n,n,n]};const i=s.mode===">"?J.BLOCK_FOLDED:J.BLOCK_LITERAL,o=e.source?fd(e.source):[];let a=o.length;for(let y=o.length-1;y>=0;--y){const m=o[y][1];if(m===""||m==="\r")a=y;else break}if(a===0){const y=s.chomp==="+"&&o.length>0?`
70
+ `.repeat(Math.max(1,o.length-1)):"";let m=n+s.length;return e.source&&(m+=e.source.length),{value:y,type:i,comment:s.comment,range:[n,m,m]}}let f=e.indent+s.indent,c=e.offset+s.length,u=0;for(let y=0;y<a;++y){const[m,$]=o[y];if($===""||$==="\r")s.indent===0&&m.length>f&&(f=m.length);else{m.length<f&&r(c+m.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),s.indent===0&&(f=m.length),u=y,f===0&&!t.atRoot&&r(c,"BAD_INDENT","Block scalar values in collections must be indented");break}c+=m.length+$.length+1}for(let y=o.length-1;y>=a;--y)o[y][0].length>f&&(a=y+1);let l="",d="",p=!1;for(let y=0;y<u;++y)l+=o[y][0].slice(f)+`
71
+ `;for(let y=u;y<a;++y){let[m,$]=o[y];c+=m.length+$.length+1;const b=$[$.length-1]==="\r";if(b&&($=$.slice(0,-1)),$&&m.length<f){const E=`Block scalar lines must not be less indented than their ${s.indent?"explicit indentation indicator":"first line"}`;r(c-$.length-(b?2:1),"BAD_INDENT",E),m=""}i===J.BLOCK_LITERAL?(l+=d+m.slice(f)+$,d=`
72
+ `):m.length>f||$[0]===" "?(d===" "?d=`
73
+ `:!p&&d===`
74
+ `&&(d=`
75
+
76
+ `),l+=d+m.slice(f)+$,d=`
77
+ `,p=!0):$===""?d===`
78
+ `?l+=`
79
+ `:d=`
80
+ `:(l+=d+$,d=" ",p=!1)}switch(s.chomp){case"-":break;case"+":for(let y=a;y<o.length;++y)l+=`
81
+ `+o[y][0].slice(f);l[l.length-1]!==`
82
+ `&&(l+=`
83
+ `);break;default:l+=`
84
+ `}const h=n+s.length+e.source.length;return{value:l,type:i,comment:s.comment,range:[n,h,h]}}function cd({offset:t,props:e},r,n){if(e[0].type!=="block-scalar-header")return n(e[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:s}=e[0],i=s[0];let o=0,a="",f=-1;for(let d=1;d<s.length;++d){const p=s[d];if(!a&&(p==="-"||p==="+"))a=p;else{const h=Number(p);!o&&h?o=h:f===-1&&(f=t+d)}}f!==-1&&n(f,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${s}`);let c=!1,u="",l=s.length;for(let d=1;d<e.length;++d){const p=e[d];switch(p.type){case"space":c=!0;case"newline":l+=p.source.length;break;case"comment":r&&!c&&n(p,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),l+=p.source.length,u=p.source.substring(1);break;case"error":n(p,"UNEXPECTED_TOKEN",p.message),l+=p.source.length;break;default:{const h=`Unexpected token in block scalar header: ${p.type}`;n(p,"UNEXPECTED_TOKEN",h);const y=p.source;y&&typeof y=="string"&&(l+=y.length)}}}return{mode:i,indent:o,chomp:a,comment:u,length:l}}function fd(t){const e=t.split(/\n( *)/),r=e[0],n=r.match(/^( *)/),i=[n!=null&&n[1]?[n[1],r.slice(n[1].length)]:["",r]];for(let o=1;o<e.length;o+=2)i.push([e[o],e[o+1]]);return i}function ld(t,e,r){const{offset:n,type:s,source:i,end:o}=t;let a,f;const c=(d,p,h)=>r(n+d,p,h);switch(s){case"scalar":a=J.PLAIN,f=ud(i,c);break;case"single-quoted-scalar":a=J.QUOTE_SINGLE,f=dd(i,c);break;case"double-quoted-scalar":a=J.QUOTE_DOUBLE,f=pd(i,c);break;default:return r(t,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${s}`),{value:"",type:null,comment:"",range:[n,n+i.length,n+i.length]}}const u=n+i.length,l=zr(o,u,e,r);return{value:f,type:a,comment:l.comment,range:[n,u,l.offset]}}function ud(t,e){let r="";switch(t[0]){case" ":r="a tab character";break;case",":r="flow indicator character ,";break;case"%":r="directive indicator character %";break;case"|":case">":{r=`block scalar indicator ${t[0]}`;break}case"@":case"`":{r=`reserved character ${t[0]}`;break}}return r&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${r}`),Lc(t)}function dd(t,e){return(t[t.length-1]!=="'"||t.length===1)&&e(t.length,"MISSING_CHAR","Missing closing 'quote"),Lc(t.slice(1,-1)).replace(/''/g,"'")}function Lc(t){const e=/(.*?)\r?\n/sy;let r=e.exec(t);if(!r)return t;let n,s;try{n=new RegExp("(?<![ ])[ ]+$"),s=new RegExp("^[ ]+|(?<![ ])[ ]+$","g")}catch{n=/[ \t]+$/,s=/^[ \t]+|[ \t]+$/g}let i=r[1].replace(n,""),o=" ",a=e.lastIndex;for(;r=e.exec(t);){const c=r[1].replace(s,"");c===""?o===`
85
+ `?i+=o:o=`
86
+ `:(i+=o+c,o=" "),a=e.lastIndex}const f=/[ \t]*(.*)/sy;return f.lastIndex=a,r=f.exec(t),i+o+((r==null?void 0:r[1])??"")}function pd(t,e){let r="";for(let n=1;n<t.length-1;++n){const s=t[n];if(!(s==="\r"&&t[n+1]===`
87
+ `))if(s===`
88
+ `){const{fold:i,offset:o}=md(t,n);r+=i,n=o}else if(s==="\\"){let i=t[++n];const o=hd[i];if(o)r+=o;else if(i===`
89
+ `)for(i=t[n+1];i===" "||i===" ";)i=t[++n+1];else if(i==="\r"&&t[n+1]===`
90
+ `)for(i=t[++n+1];i===" "||i===" ";)i=t[++n+1];else if(i==="x"||i==="u"||i==="U"){const a=i==="x"?2:i==="u"?4:8;r+=yd(t,n+1,a,e),n+=a}else{const a=t.substr(n-1,2);e(n-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),r+=a}}else if(s===" "||s===" "){const i=n;let o=t[n+1];for(;o===" "||o===" ";)o=t[++n+1];o!==`
91
+ `&&!(o==="\r"&&t[n+2]===`
92
+ `)&&(r+=n>i?t.slice(i,n+1):s)}else r+=s}return(t[t.length-1]!=='"'||t.length===1)&&e(t.length,"MISSING_CHAR",'Missing closing "quote'),r}function md(t,e){let r="",n=t[e+1];for(;(n===" "||n===" "||n===`
93
+ `||n==="\r")&&!(n==="\r"&&t[e+2]!==`
94
+ `);)n===`
95
+ `&&(r+=`
96
+ `),e+=1,n=t[e+1];return r||(r=" "),{fold:r,offset:e}}const hd={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
97
+ `,r:"\r",t:" ",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function yd(t,e,r,n){const s=t.substr(e,r),o=s.length===r&&/^[0-9a-fA-F]+$/.test(s)?parseInt(s,16):NaN;try{return String.fromCodePoint(o)}catch{const a=t.substr(e-2,r+2);return n(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),a}}function Fc(t,e,r,n){const{value:s,type:i,comment:o,range:a}=e.type==="block-scalar"?ad(t,e,n):ld(e,t.options.strict,n),f=r?t.directives.tagName(r.source,l=>n(r,"TAG_RESOLVE_FAILED",l)):null;let c;t.options.stringKeys&&t.atKey?c=t.schema[Ke]:f?c=gd(t.schema,s,f,r,n):e.type==="scalar"?c=$d(t,s,e,n):c=t.schema[Ke];let u;try{const l=c.resolve(s,d=>n(r??e,"TAG_RESOLVE_FAILED",d),t.options);u=ne(l)?l:new J(l)}catch(l){const d=l instanceof Error?l.message:String(l);n(r??e,"TAG_RESOLVE_FAILED",d),u=new J(s)}return u.range=a,u.source=s,i&&(u.type=i),f&&(u.tag=f),c.format&&(u.format=c.format),o&&(u.comment=o),u}function gd(t,e,r,n,s){var a;if(r==="!")return t[Ke];const i=[];for(const f of t.tags)if(!f.collection&&f.tag===r)if(f.default&&f.test)i.push(f);else return f;for(const f of i)if((a=f.test)!=null&&a.test(e))return f;const o=t.knownTags[r];return o&&!o.collection?(t.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(s(n,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,r!=="tag:yaml.org,2002:str"),t[Ke])}function $d({atKey:t,directives:e,schema:r},n,s,i){const o=r.tags.find(a=>{var f;return(a.default===!0||t&&a.default==="key")&&((f=a.test)==null?void 0:f.test(n))})||r[Ke];if(r.compat){const a=r.compat.find(f=>{var c;return f.default&&((c=f.test)==null?void 0:c.test(n))})??r[Ke];if(o.tag!==a.tag){const f=e.tagString(o.tag),c=e.tagString(a.tag),u=`Value may be parsed as either ${f} or ${c}`;i(s,"TAG_RESOLVE_FAILED",u,!0)}}return o}function bd(t,e,r){if(e){r??(r=e.length);for(let n=r-1;n>=0;--n){let s=e[n];switch(s.type){case"space":case"comment":case"newline":t-=s.source.length;continue}for(s=e[++n];(s==null?void 0:s.type)==="space";)t+=s.source.length,s=e[++n];break}}return t}const vd={composeNode:Vc,composeEmptyNode:Ni};function Vc(t,e,r,n){const s=t.atKey,{spaceBefore:i,comment:o,anchor:a,tag:f}=r;let c,u=!0;switch(e.type){case"alias":c=wd(t,e,n),(a||f)&&n(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":c=Fc(t,e,f,n),a&&(c.anchor=a.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{c=od(vd,t,e,r,n),a&&(c.anchor=a.source.substring(1))}catch(l){const d=l instanceof Error?l.message:String(l);n(e,"RESOURCE_EXHAUSTION",d)}break;default:{const l=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;n(e,"UNEXPECTED_TOKEN",l),u=!1}}return c??(c=Ni(t,e.offset,void 0,null,r,n)),a&&c.anchor===""&&n(a,"BAD_ALIAS","Anchor cannot be an empty string"),s&&t.options.stringKeys&&(!ne(c)||typeof c.value!="string"||c.tag&&c.tag!=="tag:yaml.org,2002:str")&&n(f??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),i&&(c.spaceBefore=!0),o&&(e.type==="scalar"&&e.source===""?c.comment=o:c.commentBefore=o),t.options.keepSourceTokens&&u&&(c.srcToken=e),c}function Ni(t,e,r,n,{spaceBefore:s,comment:i,anchor:o,tag:a,end:f},c){const u={type:"scalar",offset:bd(e,r,n),indent:-1,source:""},l=Fc(t,u,a,c);return o&&(l.anchor=o.source.substring(1),l.anchor===""&&c(o,"BAD_ALIAS","Anchor cannot be an empty string")),s&&(l.spaceBefore=!0),i&&(l.comment=i,l.range[2]=f),l}function wd({options:t},{offset:e,source:r,end:n},s){const i=new bi(r.substring(1));i.source===""&&s(e,"BAD_ALIAS","Alias cannot be an empty string"),i.source.endsWith(":")&&s(e+r.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const o=e+r.length,a=zr(n,o,t.strict,s);return i.range=[e,o,a.offset],a.comment&&(i.comment=a.comment),i}function _d(t,e,{offset:r,start:n,value:s,end:i},o){const a=Object.assign({_directives:e},t),f=new Ur(void 0,a),c={atKey:!1,atRoot:!0,directives:f.directives,options:f.options,schema:f.schema},u=Ht(n,{indicator:"doc-start",next:s??(i==null?void 0:i[0]),offset:r,onError:o,parentIndent:0,startOnNewline:!0});u.found&&(f.directives.docStart=!0,s&&(s.type==="block-map"||s.type==="block-seq")&&!u.hasNewline&&o(u.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),f.contents=s?Vc(c,s,u,o):Ni(c,u.end,n,null,u,o);const l=f.contents.range[2],d=zr(i,l,!1,o);return d.comment&&(f.comment=d.comment),f.range=[r,l,d.offset],f}function $r(t){if(typeof t=="number")return[t,t+1];if(Array.isArray(t))return t.length===2?t:[t[0],t[1]];const{offset:e,source:r}=t;return[e,e+(typeof r=="string"?r.length:1)]}function sa(t){var s;let e="",r=!1,n=!1;for(let i=0;i<t.length;++i){const o=t[i];switch(o[0]){case"#":e+=(e===""?"":n?`
98
+
99
+ `:`
100
+ `)+(o.substring(1)||" "),r=!0,n=!1;break;case"%":((s=t[i+1])==null?void 0:s[0])!=="#"&&(i+=1),r=!1;break;default:r||(n=!0),r=!1}}return{comment:e,afterEmptyLine:n}}class Pd{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(r,n,s,i)=>{const o=$r(r);i?this.warnings.push(new rd(o,n,s)):this.errors.push(new Pr(o,n,s))},this.directives=new we({version:e.version||"1.2"}),this.options=e}decorate(e,r){const{comment:n,afterEmptyLine:s}=sa(this.prelude);if(n){const i=e.contents;if(r)e.comment=e.comment?`${e.comment}
101
+ ${n}`:n;else if(s||e.directives.docStart||!i)e.commentBefore=n;else if(ce(i)&&!i.flow&&i.items.length>0){let o=i.items[0];le(o)&&(o=o.key);const a=o.commentBefore;o.commentBefore=a?`${n}
102
+ ${a}`:n}else{const o=i.commentBefore;i.commentBefore=o?`${n}
103
+ ${o}`:n}}if(r){for(let i=0;i<this.errors.length;++i)e.errors.push(this.errors[i]);for(let i=0;i<this.warnings.length;++i)e.warnings.push(this.warnings[i])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:sa(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,r=!1,n=-1){for(const s of e)yield*this.next(s);yield*this.end(r,n)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(r,n,s)=>{const i=$r(e);i[0]+=r,this.onError(i,"BAD_DIRECTIVE",n,s)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{const r=_d(this.options,this.directives,e,this.onError);this.atDirectives&&!r.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(r,!1),this.doc&&(yield this.doc),this.doc=r,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{const r=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,n=new Pr($r(e),"UNEXPECTED_TOKEN",r);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case"doc-end":{if(!this.doc){const n="Unexpected doc-end without preceding document";this.errors.push(new Pr($r(e),"UNEXPECTED_TOKEN",n));break}this.doc.directives.docEnd=!0;const r=zr(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),r.comment){const n=this.doc.comment;this.doc.comment=n?`${n}
104
+ ${r.comment}`:r.comment}this.doc.range[2]=r.offset;break}default:this.errors.push(new Pr($r(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,r=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){const n=Object.assign({_directives:this.directives},this.options),s=new Ur(void 0,n);this.atDirectives&&this.onError(r,"MISSING_CHAR","Missing directives-end indicator line"),s.range=[0,r,r],this.decorate(s,!1),yield s}}}const Uc="\uFEFF",zc="",Kc="",Ks="";function Ed(t){switch(t){case Uc:return"byte-order-mark";case zc:return"doc-mode";case Kc:return"flow-error-end";case Ks:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
105
+ `:case`\r
106
+ `:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(t[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}function Ce(t){switch(t){case void 0:case" ":case`
107
+ `:case"\r":case" ":return!0;default:return!1}}const ia=new Set("0123456789ABCDEFabcdef"),Sd=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),fn=new Set(",[]{}"),jd=new Set(` ,[]{}
108
+ \r `),Os=t=>!t||jd.has(t);class Od{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,r=!1){if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!r;let n=this.next??"stream";for(;n&&(r||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,r=this.buffer[e];for(;r===" "||r===" ";)r=this.buffer[++e];return!r||r==="#"||r===`
109
+ `?!0:r==="\r"?this.buffer[e+1]===`
110
+ `:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let r=this.buffer[e];if(this.indentNext>0){let n=0;for(;r===" ";)r=this.buffer[++n+e];if(r==="\r"){const s=this.buffer[n+e+1];if(s===`
111
+ `||!s&&!this.atEnd)return e+n+1}return r===`
112
+ `||n>=this.indentNext||!r&&!this.atEnd?e+n:-1}if(r==="-"||r==="."){const n=this.buffer.substr(e,3);if((n==="---"||n==="...")&&Ce(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
113
+ `,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]==="\r"&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]===Uc&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let r=e.length,n=e.indexOf("#");for(;n!==-1;){const i=e[n-1];if(i===" "||i===" "){r=n-1;break}else n=e.indexOf("#",n+1)}for(;;){const i=e[r-1];if(i===" "||i===" ")r-=1;else break}const s=(yield*this.pushCount(r))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-s),this.pushNewline(),"stream"}if(this.atLineEnd()){const r=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-r),yield*this.pushNewline(),"stream"}return yield zc,yield*this.parseLineStart()}*parseLineStart(){const e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if(e==="-"||e==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");const r=this.peek(3);if((r==="---"||r==="...")&&Ce(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,r==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!Ce(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[e,r]=this.peek(2);if(!r&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&Ce(r)){const n=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=n,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const e=this.getLine();if(e===null)return this.setNext("doc");let r=yield*this.pushIndicators();switch(e[r]){case"#":yield*this.pushCount(e.length-r);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(Os),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return r+=yield*this.parseBlockScalarHeader(),r+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-r),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,r,n=-1;do e=yield*this.pushNewline(),e>0?(r=yield*this.pushSpaces(!1),this.indentValue=n=r):r=0,r+=yield*this.pushSpaces(!0);while(e+r>0);const s=this.getLine();if(s===null)return this.setNext("flow");if((n!==-1&&n<this.indentNext&&s[0]!=="#"||n===0&&(s.startsWith("---")||s.startsWith("..."))&&Ce(s[3]))&&!(n===this.indentNext-1&&this.flowLevel===1&&(s[0]==="]"||s[0]==="}")))return this.flowLevel=0,yield Kc,yield*this.parseLineStart();let i=0;for(;s[i]===",";)i+=yield*this.pushCount(1),i+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(i+=yield*this.pushIndicators(),s[i]){case void 0:return"flow";case"#":return yield*this.pushCount(s.length-i),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(Os),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const o=this.charAt(1);if(this.flowKey||Ce(o)||o===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const e=this.charAt(0);let r=this.buffer.indexOf(e,this.pos+1);if(e==="'")for(;r!==-1&&this.buffer[r+1]==="'";)r=this.buffer.indexOf("'",r+2);else for(;r!==-1;){let i=0;for(;this.buffer[r-1-i]==="\\";)i+=1;if(i%2===0)break;r=this.buffer.indexOf('"',r+1)}const n=this.buffer.substring(0,r);let s=n.indexOf(`
114
+ `,this.pos);if(s!==-1){for(;s!==-1;){const i=this.continueScalar(s+1);if(i===-1)break;s=n.indexOf(`
115
+ `,i)}s!==-1&&(r=s-(n[s-1]==="\r"?2:1))}if(r===-1){if(!this.atEnd)return this.setNext("quoted-scalar");r=this.buffer.length}return yield*this.pushToIndex(r+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){const r=this.buffer[++e];if(r==="+")this.blockScalarKeep=!0;else if(r>"0"&&r<="9")this.blockScalarIndent=Number(r)-1;else if(r!=="-")break}return yield*this.pushUntil(r=>Ce(r)||r==="#")}*parseBlockScalar(){let e=this.pos-1,r=0,n;e:for(let i=this.pos;n=this.buffer[i];++i)switch(n){case" ":r+=1;break;case`
116
+ `:e=i,r=0;break;case"\r":{const o=this.buffer[i+1];if(!o&&!this.atEnd)return this.setNext("block-scalar");if(o===`
117
+ `)break}default:break e}if(!n&&!this.atEnd)return this.setNext("block-scalar");if(r>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=r:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{const i=this.continueScalar(e+1);if(i===-1)break;e=this.buffer.indexOf(`
118
+ `,i)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let s=e+1;for(n=this.buffer[s];n===" ";)n=this.buffer[++s];if(n===" "){for(;n===" "||n===" "||n==="\r"||n===`
119
+ `;)n=this.buffer[++s];e=s-1}else if(!this.blockScalarKeep)do{let i=e-1,o=this.buffer[i];o==="\r"&&(o=this.buffer[--i]);const a=i;for(;o===" ";)o=this.buffer[--i];if(o===`
120
+ `&&i>=this.pos&&i+1+r>a)e=i;else break}while(!0);return yield Ks,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const e=this.flowLevel>0;let r=this.pos-1,n=this.pos-1,s;for(;s=this.buffer[++n];)if(s===":"){const i=this.buffer[n+1];if(Ce(i)||e&&fn.has(i))break;r=n}else if(Ce(s)){let i=this.buffer[n+1];if(s==="\r"&&(i===`
121
+ `?(n+=1,s=`
122
+ `,i=this.buffer[n+1]):r=n),i==="#"||e&&fn.has(i))break;if(s===`
123
+ `){const o=this.continueScalar(n+1);if(o===-1)break;n=Math.max(n,o-2)}}else{if(e&&fn.has(s))break;r=n}return!s&&!this.atEnd?this.setNext("plain-scalar"):(yield Ks,yield*this.pushToIndex(r+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,r){const n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(r&&(yield""),0)}*pushIndicators(){let e=0;e:for(;;){switch(this.charAt(0)){case"!":e+=yield*this.pushTag(),e+=yield*this.pushSpaces(!0);continue e;case"&":e+=yield*this.pushUntil(Os),e+=yield*this.pushSpaces(!0);continue e;case"-":case"?":case":":{const r=this.flowLevel>0,n=this.charAt(1);if(Ce(n)||r&&fn.has(n)){r?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,e+=yield*this.pushCount(1),e+=yield*this.pushSpaces(!0);continue e}}}break e}return e}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,r=this.buffer[e];for(;!Ce(r)&&r!==">";)r=this.buffer[++e];return yield*this.pushToIndex(r===">"?e+1:e,!1)}else{let e=this.pos+1,r=this.buffer[e];for(;r;)if(Sd.has(r))r=this.buffer[++e];else if(r==="%"&&ia.has(this.buffer[e+1])&&ia.has(this.buffer[e+2]))r=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){const e=this.buffer[this.pos];return e===`
124
+ `?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
125
+ `?yield*this.pushCount(2):0}*pushSpaces(e){let r=this.pos-1,n;do n=this.buffer[++r];while(n===" "||e&&n===" ");const s=r-this.pos;return s>0&&(yield this.buffer.substr(this.pos,s),this.pos=r),s}*pushUntil(e){let r=this.pos,n=this.buffer[r];for(;!e(n);)n=this.buffer[++r];return yield*this.pushToIndex(r,!1)}}class kd{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let r=0,n=this.lineStarts.length;for(;r<n;){const i=r+n>>1;this.lineStarts[i]<e?r=i+1:n=i}if(this.lineStarts[r]===e)return{line:r+1,col:1};if(r===0)return{line:0,col:e};const s=this.lineStarts[r-1];return{line:r,col:e-s+1}}}}function nt(t,e){for(let r=0;r<t.length;++r)if(t[r].type===e)return!0;return!1}function oa(t){for(let e=0;e<t.length;++e)switch(t[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function Bc(t){switch(t==null?void 0:t.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function ln(t){switch(t.type){case"document":return t.start;case"block-map":{const e=t.items[t.items.length-1];return e.sep??e.start}case"block-seq":return t.items[t.items.length-1].start;default:return[]}}function Tt(t){var r;if(t.length===0)return[];let e=t.length;e:for(;--e>=0;)switch(t[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;((r=t[++e])==null?void 0:r.type)==="space";);return t.splice(e,t.length)}function xn(t,e){if(e.length<1e5)Array.prototype.push.apply(t,e);else for(let r=0;r<e.length;++r)t.push(e[r])}function aa(t){if(t.start.type==="flow-seq-start")for(const e of t.items)e.sep&&!e.value&&!nt(e.start,"explicit-key-ind")&&!nt(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,Bc(e.value)?e.value.end?xn(e.value.end,e.sep):e.value.end=e.sep:xn(e.start,e.sep),delete e.sep)}class Id{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new Od,this.onNewLine=e}*parse(e,r=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const n of this.lexer.lex(e,r))yield*this.next(n);r||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}const r=Ed(e);if(r)if(r==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=r,yield*this.step(),r){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{const n=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:n,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const e=this.peek(1);if(this.type==="doc-end"&&(e==null?void 0:e.type)!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){const r=e??this.stack.pop();if(!r)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield r;else{const n=this.peek(1);switch(r.type==="block-scalar"?r.indent="indent"in n?n.indent:0:r.type==="flow-collection"&&n.type==="document"&&(r.indent=0),r.type==="flow-collection"&&aa(r),n.type){case"document":n.value=r;break;case"block-scalar":n.props.push(r);break;case"block-map":{const s=n.items[n.items.length-1];if(s.value){n.items.push({start:[],key:r,sep:[]}),this.onKeyLine=!0;return}else if(s.sep)s.value=r;else{Object.assign(s,{key:r,sep:[]}),this.onKeyLine=!s.explicitKey;return}break}case"block-seq":{const s=n.items[n.items.length-1];s.value?n.items.push({start:[],value:r}):s.value=r;break}case"flow-collection":{const s=n.items[n.items.length-1];!s||s.value?n.items.push({start:[],key:r,sep:[]}):s.sep?s.value=r:Object.assign(s,{key:r,sep:[]});return}default:yield*this.pop(),yield*this.pop(r)}if((n.type==="document"||n.type==="block-map"||n.type==="block-seq")&&(r.type==="block-map"||r.type==="block-seq")){const s=r.items[r.items.length-1];s&&!s.sep&&!s.value&&s.start.length>0&&oa(s.start)===-1&&(r.indent===0||s.start.every(i=>i.type!=="comment"||i.indent<r.indent))&&(n.type==="document"?n.end=s.start:n.items.push({start:s.start}),r.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{const e={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":{oa(e.start)!==-1?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}const r=this.startBlockValue(e);r?this.stack.push(r):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if(this.type==="map-value-ind"){const r=ln(this.peek(2)),n=Tt(r);let s;e.end?(s=e.end,s.push(this.sourceToken),delete e.end):s=[this.sourceToken];const i={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:s}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=i}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let r=this.source.indexOf(`
126
+ `)+1;for(;r!==0;)this.onNewLine(this.offset+r),r=this.source.indexOf(`
127
+ `,r)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){var n;const r=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,r.value){const s="end"in r.value?r.value.end:void 0,i=Array.isArray(s)?s[s.length-1]:void 0;(i==null?void 0:i.type)==="comment"?s==null||s.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"space":case"comment":if(r.value)e.items.push({start:[this.sourceToken]});else if(r.sep)r.sep.push(this.sourceToken);else{if(this.atIndentedComment(r.start,e.indent)){const s=e.items[e.items.length-2],i=(n=s==null?void 0:s.value)==null?void 0:n.end;if(Array.isArray(i)){xn(i,r.start),i.push(this.sourceToken),e.items.pop();return}}r.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const s=!this.onKeyLine&&this.indent===e.indent,i=s&&(r.sep||r.explicitKey)&&this.type!=="seq-item-ind";let o=[];if(i&&r.sep&&!r.value){const a=[];for(let f=0;f<r.sep.length;++f){const c=r.sep[f];switch(c.type){case"newline":a.push(f);break;case"space":break;case"comment":c.indent>e.indent&&(a.length=0);break;default:a.length=0}}a.length>=2&&(o=r.sep.splice(a[1]))}switch(this.type){case"anchor":case"tag":i||r.value?(o.push(this.sourceToken),e.items.push({start:o}),this.onKeyLine=!0):r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"explicit-key-ind":!r.sep&&!r.explicitKey?(r.start.push(this.sourceToken),r.explicitKey=!0):i||r.value?(o.push(this.sourceToken),e.items.push({start:o,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(r.explicitKey)if(r.sep)if(r.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(nt(r.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]});else if(Bc(r.key)&&!nt(r.sep,"newline")){const a=Tt(r.start),f=r.key,c=r.sep;c.push(this.sourceToken),delete r.key,delete r.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:f,sep:c}]})}else o.length>0?r.sep=r.sep.concat(o,this.sourceToken):r.sep.push(this.sourceToken);else if(nt(r.start,"newline"))Object.assign(r,{key:null,sep:[this.sourceToken]});else{const a=Tt(r.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:null,sep:[this.sourceToken]}]})}else r.sep?r.value||i?e.items.push({start:o,key:null,sep:[this.sourceToken]}):nt(r.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):r.sep.push(this.sourceToken):Object.assign(r,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const a=this.flowScalar(this.type);i||r.value?(e.items.push({start:o,key:a,sep:[]}),this.onKeyLine=!0):r.sep?this.stack.push(a):(Object.assign(r,{key:a,sep:[]}),this.onKeyLine=!0);return}default:{const a=this.startBlockValue(e);if(a){if(a.type==="block-seq"){if(!r.explicitKey&&r.sep&&!nt(r.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else s&&e.items.push({start:o});this.stack.push(a);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){var n;const r=e.items[e.items.length-1];switch(this.type){case"newline":if(r.value){const s="end"in r.value?r.value.end:void 0,i=Array.isArray(s)?s[s.length-1]:void 0;(i==null?void 0:i.type)==="comment"?s==null||s.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else r.start.push(this.sourceToken);return;case"space":case"comment":if(r.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(r.start,e.indent)){const s=e.items[e.items.length-2],i=(n=s==null?void 0:s.value)==null?void 0:n.end;if(Array.isArray(i)){xn(i,r.start),i.push(this.sourceToken),e.items.pop();return}}r.start.push(this.sourceToken)}return;case"anchor":case"tag":if(r.value||this.indent<=e.indent)break;r.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;r.value||nt(r.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):r.start.push(this.sourceToken);return}if(this.indent>e.indent){const s=this.startBlockValue(e);if(s){this.stack.push(s);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){const r=e.items[e.items.length-1];if(this.type==="flow-error-end"){let n;do yield*this.pop(),n=this.peek(1);while((n==null?void 0:n.type)==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!r||r.sep?e.items.push({start:[this.sourceToken]}):r.start.push(this.sourceToken);return;case"map-value-ind":!r||r.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):r.sep?r.sep.push(this.sourceToken):Object.assign(r,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!r||r.value?e.items.push({start:[this.sourceToken]}):r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const s=this.flowScalar(this.type);!r||r.value?e.items.push({start:[],key:s,sep:[]}):r.sep?this.stack.push(s):Object.assign(r,{key:s,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}const n=this.startBlockValue(e);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{const n=this.peek(2);if(n.type==="block-map"&&(this.type==="map-value-ind"&&n.indent===e.indent||this.type==="newline"&&!n.items[n.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&n.type!=="flow-collection"){const s=ln(n),i=Tt(s);aa(e);const o=e.end.splice(1,e.end.length);o.push(this.sourceToken);const a={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:i,key:e,sep:o}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=a}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let r=this.source.indexOf(`
128
+ `)+1;for(;r!==0;)this.onNewLine(this.offset+r),r=this.source.indexOf(`
129
+ `,r)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const r=ln(e),n=Tt(r);return n.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const r=ln(e),n=Tt(r);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,r){return this.type!=="comment"||this.indent<=r?!1:e.every(n=>n.type==="newline"||n.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function Ad(t){const e=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||e&&new kd||null,prettyErrors:e}}function Nd(t,e={}){const{lineCounter:r,prettyErrors:n}=Ad(e),s=new Id(r==null?void 0:r.addNewLine),i=new Pd(e);let o=null;for(const a of i.compose(s.parse(t),!0,t.length))if(!o)o=a;else if(o.options.logLevel!=="silent"){o.errors.push(new Pr(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return n&&r&&(o.errors.forEach(ra(t,r)),o.warnings.forEach(ra(t,r))),o}function Hc(t,e,r){let n;typeof e=="function"?n=e:r===void 0&&e&&typeof e=="object"&&(r=e);const s=Nd(t,r);if(!s)return null;if(s.warnings.forEach(i=>gc(s.options.logLevel,i)),s.errors.length>0){if(s.options.logLevel!=="silent")throw s.errors[0];s.errors=[]}return s.toJS(Object.assign({reviver:n},r))}function Td(t,e,r){let n=null;if(Array.isArray(e)&&(n=e),t===void 0){const{keepUndefined:s}={};if(!s)return}return Dr(t)&&!n?t.toString(r):new Ur(t,n,r).toString(r)}function Mr(t){if(t!==null){if(typeof t=="string"){if(t.trim()==="")return;try{return JSON.parse(t)}catch{const e=/^[^:]+:/.test(t),r=t.slice(0,50).trimStart().startsWith("{");return!e||r?void 0:Hc(t,{maxAliasCount:1e4,merge:!0})}}return yi(t),t}}function Kr(t,e={}){if(yi(t))return t;const r=Mr(t);return Array.isArray(r)?r:[{isEntrypoint:!0,specification:r,filename:null,dir:"./",references:ac(r),...e}]}function Gc(t){return decodeURI(t.replace(/~1/g,"/").replace(/~0/g,"~"))}function xd(t){return t.split("/").slice(1).map(Gc)}function Jc(t,e,r,n=[]){const s=structuredClone(t),i=Kr(s),o=Le(i),a=(r==null?void 0:r.specification)??o.specification;if(!Wt(a)){if(e!=null&&e.throwOnError)throw new Error($e.NO_CONTENT);return{valid:!1,errors:n,schema:a}}return Bs(a,i,o,new WeakSet,n,e),n=n.filter((f,c,u)=>c===u.findIndex(l=>l.message===f.message&&l.code===f.code)),{valid:n.length===0,errors:n,schema:a}}function Bs(t,e,r,n,s,i){var f;if(t===null||n.has(t))return;n.add(t);function o(c){return Bs(c.specification,e,c,n,s,i),c}const a=new Set;for(;t.$ref!==void 0;){if(a.has(t.$ref)){s.push({code:"SELF_REFERENCE",message:$e.SELF_REFERENCE.replace("%s",t.$ref)}),delete t.$ref;break}a.add(t.$ref);const u=Wc(t.$ref,i,r,e,o,s);if(typeof u!="object"||u===null)break;const l=t.$ref;delete t.$ref;for(const d of Object.keys(u))t[d]===void 0&&(t[d]=u[d]);l&&((f=i==null?void 0:i.onDereference)==null||f.call(i,{schema:t,ref:l,resolved:u}))}for(const c of Object.values(t))typeof c=="object"&&c!==null&&Bs(c,e,r,n,s,i)}function Wc(t,e,r,n,s,i){if(typeof t!="string"){if(e!=null&&e.throwOnError)throw new Error($e.INVALID_REFERENCE.replace("%s",t));i.push({code:"INVALID_REFERENCE",message:$e.INVALID_REFERENCE.replace("%s",t)});return}const[o,a]=t.split("#",2),f=o!==r.filename;if(o&&f){const u=n.find(l=>l.filename===o);if(!u){if(e!=null&&e.throwOnError)throw new Error($e.EXTERNAL_REFERENCE_NOT_FOUND.replace("%s",o));i.push({code:"EXTERNAL_REFERENCE_NOT_FOUND",message:$e.EXTERNAL_REFERENCE_NOT_FOUND.replace("%s",o)});return}return a===void 0?u.specification:Wc(`#${a}`,e,s(u),n,s,i)}const c=xd(a);try{return c.reduce((u,l)=>{if(typeof u!="object"||u===null||!(l in u))throw new Error($e.INVALID_REFERENCE.replace("%s",t));return u[l]},r.specification)}catch{if(e!=null&&e.throwOnError)throw new Error($e.INVALID_REFERENCE.replace("%s",t));i.push({code:"INVALID_REFERENCE",message:$e.INVALID_REFERENCE.replace("%s",t)})}}function Yc(t,e){const r=Kr(t),n=Le(r),s=Jc(r,e);return{specification:n.specification,errors:s.errors,schema:s.schema,...hi(n.specification)}}function Xc(t,e){const r=Kr(t);return{specification:xr(Le(r).specification,n=>e(n)?n:void 0)}}function Rd(t){try{return JSON.parse(t),!0}catch{return!1}}function Cd(t){if(!t.includes(`
130
+ `))return!1;try{return Hc(t,{maxAliasCount:1e4}),!0}catch{return!1}}const Md=(t,e,r)=>{const[n,s]=t.split("#",2);if(n)return r.has(n)?s?s.startsWith("/")?`${r.get(n)}${s}`:r.get(`${n}#${s}`):r.get(n):void 0;if(s)return s.startsWith("/")?s.slice(1):r.get(`${e}#${s}`)},Rn=t=>{if(t&&typeof t=="object"&&t.$id&&typeof t.$id=="string")return t.$id},ca=t=>t.join("/"),Zc=(t,e="",r=[],n=new Map,s=new WeakSet)=>{if(typeof t!="object"||t===null||s.has(t))return n;s.add(t);const i=Rn(t);i&&n.set(i,ca(r));const o=i??e;t.$anchor&&typeof t.$anchor=="string"&&n.set(`${o}#${t.$anchor}`,ca(r));for(const a in t)typeof t[a]=="object"&&t[a]!==null&&Zc(t[a],o,[...r,a],n,s);return n};function Hs(t,e){return e.reduce((r,n)=>{var i;return r.value===void 0?{context:"",value:void 0}:typeof r.value!="object"||r.value===null?{context:"",value:void 0}:{context:Rn(r.value)??r.context,value:(i=r.value)==null?void 0:i[n]}},{context:"",value:t})}function st(t){try{const e=new URL(t);return e.protocol==="http:"||e.protocol==="https:"}catch{return!1}}function qd(t){if(!/^\s*(\{)/.test(t.slice(0,500)))return!1;try{const e=JSON.parse(t);return Wt(e)}catch{return!1}}function Dd(t){return/^\s*(?:-\s*)?[\w\-]+\s*:\s*.+\n.*/.test(t)}function Ld(t){return!st(t)&&!Dd(t)&&!qd(t)}let fa=()=>{var t=(()=>{var e=Object.defineProperty,r=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,i=(j,I)=>{for(var R in I)e(j,R,{get:I[R],enumerable:!0})},o=(j,I,R,V)=>{if(I&&typeof I=="object"||typeof I=="function")for(let G of n(I))!s.call(j,G)&&G!==R&&e(j,G,{get:()=>I[G],enumerable:!(V=r(I,G))||V.enumerable});return j},a=j=>o(e({},"__esModule",{value:!0}),j),f={};i(f,{default:()=>eu});var c=j=>Array.isArray(j),u=j=>typeof j=="function",l=j=>j.length===0,d=j=>typeof j=="number",p=j=>typeof j=="object"&&j!==null,h=j=>j instanceof RegExp,y=j=>typeof j=="string",m=j=>j===void 0,$=j=>{const I=new Map;return R=>{const V=I.get(R);if(V)return V;const G=j(R);return I.set(R,G),G}},b=(j,I,R={})=>{const V={cache:{},input:j,index:0,indexMax:0,options:R,output:[]};if(ie(I)(V)&&V.index===j.length)return V.output;throw new Error(`Failed to parse at index ${V.indexMax}`)},w=(j,I)=>c(j)?E(j,I):y(j)?M(j,I):O(j,I),E=(j,I)=>{const R={};for(const V of j){if(V.length!==1)throw new Error(`Invalid character: "${V}"`);const G=V.charCodeAt(0);R[G]=!0}return V=>{const G=V.index,ee=V.input;for(;V.index<ee.length&&ee.charCodeAt(V.index)in R;)V.index+=1;const oe=V.index;if(oe>G){if(!m(I)&&!V.options.silent){const Re=V.input.slice(G,oe),Ve=u(I)?I(Re,ee,String(G)):I;m(Ve)||V.output.push(Ve)}V.indexMax=Math.max(V.indexMax,V.index)}return!0}},O=(j,I)=>{const R=j.source,V=j.flags.replace(/y|$/,"y"),G=new RegExp(R,V);return U(ee=>{G.lastIndex=ee.index;const oe=G.exec(ee.input);if(oe){if(!m(I)&&!ee.options.silent){const Re=u(I)?I(...oe,ee.input,String(ee.index)):I;m(Re)||ee.output.push(Re)}return ee.index+=oe[0].length,ee.indexMax=Math.max(ee.indexMax,ee.index),!0}else return!1})},M=(j,I)=>R=>{if(R.input.startsWith(j,R.index)){if(!m(I)&&!R.options.silent){const V=u(I)?I(j,R.input,String(R.index)):I;m(V)||R.output.push(V)}return R.index+=j.length,R.indexMax=Math.max(R.indexMax,R.index),!0}else return!1},C=(j,I,R,V)=>{const G=ie(j);return U(H(L(ee=>{let oe=0;for(;oe<R;){const Re=ee.index;if(!G(ee)||(oe+=1,ee.index===Re))break}return oe>=I})))},N=(j,I)=>C(j,0,1),z=(j,I)=>C(j,0,1/0),X=(j,I)=>{const R=j.map(ie);return U(H(L(V=>{for(let G=0,ee=R.length;G<ee;G++)if(!R[G](V))return!1;return!0})))},x=(j,I)=>{const R=j.map(ie);return U(H(V=>{for(let G=0,ee=R.length;G<ee;G++)if(R[G](V))return!0;return!1}))},L=(j,I=!1)=>{const R=ie(j);return V=>{const G=V.index,ee=V.output.length,oe=R(V);return(!oe||I)&&(V.index=G,V.output.length!==ee&&(V.output.length=ee)),oe}},H=(j,I)=>ie(j),U=(()=>{let j=0;return I=>{const R=ie(I),V=j+=1;return G=>{var zo;var ee;if(G.options.memoization===!1)return R(G);const oe=G.index,Re=(ee=G.cache)[V]||(ee[V]=new Map),Ve=Re.get(oe);if(Ve===!1)return!1;if(d(Ve))return G.index=Ve,!0;if(Ve)return G.index=Ve.index,(zo=Ve.output)!=null&&zo.length&&G.output.push(...Ve.output),!0;{const Ko=G.output.length;if(R(G)){const Bo=G.index,Ho=G.output.length;if(Ho>Ko){const tu=G.output.slice(Ko,Ho);Re.set(oe,{index:Bo,output:tu})}else Re.set(oe,Bo);return!0}else return Re.set(oe,!1),!1}}}})(),te=j=>{let I;return R=>(I||(I=ie(j())),I(R))},ie=$(j=>{if(u(j))return l(j)?te(j):j;if(y(j)||h(j))return w(j);if(c(j))return X(j);if(p(j))return x(Object.values(j));throw new Error("Invalid rule")}),pe="abcdefghijklmnopqrstuvwxyz",Oe=j=>{let I="";for(;j>0;){const R=(j-1)%26;I=pe[R]+I,j=Math.floor((j-1)/26)}return I},ke=j=>{let I=0;for(let R=0,V=j.length;R<V;R++)I=I*26+pe.indexOf(j[R])+1;return I},A=(j,I)=>{if(I<j)return A(I,j);const R=[];for(;j<=I;)R.push(j++);return R},_=(j,I,R)=>A(j,I).map(V=>String(V).padStart(R,"0")),k=(j,I)=>A(ke(j),ke(I)).map(Oe),P=j=>j,g=j=>v(I=>b(I,j,{memoization:!1}).join("")),v=j=>{const I={};return R=>I[R]??(I[R]=j(R))},S=w(/^\*\*\/\*$/,".*"),q=w(/^\*\*\/(\*)?([ a-zA-Z0-9._-]+)$/,(j,I,R)=>`.*${I?"":"(?:^|/)"}${R.replaceAll(".","\\.")}`),F=w(/^\*\*\/(\*)?([ a-zA-Z0-9._-]*)\{([ a-zA-Z0-9._-]+(?:,[ a-zA-Z0-9._-]+)*)\}$/,(j,I,R,V)=>`.*${I?"":"(?:^|/)"}${R.replaceAll(".","\\.")}(?:${V.replaceAll(",","|").replaceAll(".","\\.")})`),Z=w(/\\./,P),Q=w(/[$.*+?^(){}[\]\|]/,j=>`\\${j}`),ue=w(/./,P),Ye=w(/^(?:!!)*!(.*)$/,(j,I)=>`(?!^${Uo(I)}$).*?`),ar=w(/^(!!)+/,""),cr=x([Ye,ar]),fr=w(/\/(\*\*\/)+/,"(?:/.+/|/)"),lr=w(/^(\*\*\/)+/,"(?:^|.*/)"),ur=w(/\/(\*\*)$/,"(?:/.*|$)"),dr=w(/\*\*/,".*"),kt=x([fr,lr,ur,dr]),pr=w(/\*\/(?!\*\*\/)/,"[^/]*/"),mr=w(/\*/,"[^/]*"),It=x([pr,mr]),At=w("?","[^/]"),hr=w("[",P),yr=w("]",P),ct=w(/[!^]/,"^/"),gr=w(/[a-z]-[a-z]|[0-9]-[0-9]/i,P),nn=w(/[$.*+?^(){}[\|]/,j=>`\\${j}`),sn=w(/[^\]]/,P),bs=x([Z,nn,gr,sn]),Lo=X([hr,N(ct),z(bs),yr]),Il=w("{","(?:"),Al=w("}",")"),Nl=w(/(\d+)\.\.(\d+)/,(j,I,R)=>_(+I,+R,Math.min(I.length,R.length)).join("|")),Tl=w(/([a-z]+)\.\.([a-z]+)/,(j,I,R)=>k(I,R).join("|")),xl=w(/([A-Z]+)\.\.([A-Z]+)/,(j,I,R)=>k(I.toLowerCase(),R.toLowerCase()).join("|").toUpperCase()),Rl=x([Nl,Tl,xl]),Fo=X([Il,Rl,Al]),Cl=w("{","(?:"),Ml=w("}",")"),ql=w(",","|"),Dl=w(/[$.*+?^(){[\]\|]/,j=>`\\${j}`),Ll=w(/[^}]/,P),Fl=te(()=>Vo),Vl=x([kt,It,At,Lo,Fo,Fl,Z,Dl,ql,Ll]),Vo=X([Cl,z(Vl),Ml]),Ul=z(x([S,q,F,cr,kt,It,At,Lo,Fo,Vo,Z,Q,ue])),zl=Ul,Kl=g(zl),Uo=Kl,Bl=w(/\\./,P),Hl=w(/./,P),Gl=w(/\*\*\*+/,"*"),Jl=w(/([^/{[(!])\*\*/,(j,I)=>`${I}*`),Wl=w(/(^|.)\*\*(?=[^*/)\]}])/,(j,I)=>`${I}*`),Yl=z(x([Bl,Gl,Jl,Wl,Hl])),Xl=Yl,Zl=g(Xl),Ql=Zl,vs=(j,I)=>{const R=Array.isArray(j)?j:[j];if(!R.length)return!1;const V=R.map(vs.compile),G=R.every(oe=>/(\/(?:\*\*)?|\[\/\])$/.test(oe)),ee=I.replace(/[\\\/]+/g,"/").replace(/\/$/,G?"/":"");return V.some(oe=>oe.test(ee))};vs.compile=j=>new RegExp(`^${Uo(Ql(j))}$`,"s");var eu=vs;return a(f)})();return t.default||t},ks;const Fd=(t,e)=>(ks||(ks=fa(),fa=null),ks(t,e)),Vd=/^[A-Za-z]:\//;function Et(t=""){return t&&t.replace(/\\/g,"/").replace(Vd,e=>e.toUpperCase())}const Ud=/^[/\\]{2}/,zd=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,Qc=/^[A-Za-z]:$/,la=/^\/([A-Za-z]:)?$/,Kd=/.(\.[^./]+|\.)$/,Bd=/^[/\\]|^[a-zA-Z]:[/\\]/,Hd="/",Ti=function(t){if(t.length===0)return".";t=Et(t);const e=t.match(Ud),r=Gt(t),n=t[t.length-1]==="/";return t=xi(t,!r),t.length===0?r?"/":n?"./":".":(n&&(t+="/"),Qc.test(t)&&(t+="/"),e?r?`//${t}`:`//./${t}`:r&&!Gt(t)?`/${t}`:t)},Gd=function(...t){let e="";for(const r of t)if(r)if(e.length>0){const n=e[e.length-1]==="/",s=r[0]==="/";n&&s?e+=r.slice(1):e+=n||s?r:`/${r}`}else e+=r;return Ti(e)};function Jd(){return typeof process<"u"&&typeof process.cwd=="function"?process.cwd().replace(/\\/g,"/"):"/"}const Cn=function(...t){t=t.map(n=>Et(n));let e="",r=!1;for(let n=t.length-1;n>=-1&&!r;n--){const s=n>=0?t[n]:Jd();!s||s.length===0||(e=`${s}/${e}`,r=Gt(s))}return e=xi(e,!r),r&&!Gt(e)?`/${e}`:e.length>0?e:"."};function xi(t,e){let r="",n=0,s=-1,i=0,o=null;for(let a=0;a<=t.length;++a){if(a<t.length)o=t[a];else{if(o==="/")break;o="/"}if(o==="/"){if(!(s===a-1||i===1))if(i===2){if(r.length<2||n!==2||r[r.length-1]!=="."||r[r.length-2]!=="."){if(r.length>2){const f=r.lastIndexOf("/");f===-1?(r="",n=0):(r=r.slice(0,f),n=r.length-1-r.lastIndexOf("/")),s=a,i=0;continue}else if(r.length>0){r="",n=0,s=a,i=0;continue}}e&&(r+=r.length>0?"/..":"..",n=2)}else r.length>0?r+=`/${t.slice(s+1,a)}`:r=t.slice(s+1,a),n=a-s-1;s=a,i=0}else o==="."&&i!==-1?++i:i=-1}return r}const Gt=function(t){return zd.test(t)},Wd=function(t){return Et(t)},ef=function(t){if(t==="..")return"";const e=Kd.exec(Et(t));return e&&e[1]||""},Yd=function(t,e){const r=Cn(t).replace(la,"$1").split("/"),n=Cn(e).replace(la,"$1").split("/");if(n[0][1]===":"&&r[0][1]===":"&&r[0]!==n[0])return n.join("/");const s=[...r];for(const i of s){if(n[0]!==i)break;r.shift(),n.shift()}return[...r.map(()=>".."),...n].join("/")},tf=function(t){const e=Et(t).replace(/\/$/,"").split("/").slice(0,-1);return e.length===1&&Qc.test(e[0])&&(e[0]+="/"),e.join("/")||(Gt(t)?"/":".")},Xd=function(t){const e=t.ext?t.ext.startsWith(".")?t.ext:`.${t.ext}`:"",r=[t.root,t.dir,t.base??(t.name??"")+e].filter(Boolean);return Et(t.root?Cn(...r):r.join("/"))},rf=function(t,e){const r=Et(t).split("/");let n="";for(let s=r.length-1;s>=0;s--){const i=r[s];if(i){n=i;break}}return e&&n.endsWith(e)?n.slice(0,-e.length):n},Zd=function(t){var s,i;const e=((i=(s=Bd.exec(t))==null?void 0:s[0])==null?void 0:i.replace(/\\/g,"/"))||"",r=rf(t),n=ef(r);return{root:e,dir:tf(t),base:r,ext:n,name:r.slice(0,r.length-n.length)}},Qd=(t,e)=>Fd(e,Ti(t)),ua={__proto__:null,basename:rf,dirname:tf,extname:ef,format:Xd,isAbsolute:Gt,join:Gd,matchesGlob:Qd,normalize:Ti,normalizeString:xi,parse:Zd,relative:Yd,resolve:Cn,sep:Hd,toNamespacedPath:Wd},ep=(()=>{var t;return((t=globalThis.process)==null?void 0:t.platform)==="win32"?";":":"})(),tp={posix:void 0,win32:void 0},nf=(t=ep)=>new Proxy(ua,{get(e,r){return r==="delimiter"?t:r==="posix"?he:r==="win32"?rp:tp[r]||ua[r]}}),he=nf(":"),rp=nf(";"),np=(t,e)=>{if(st(e))return e;if(st(t)){const r=new URL(t);return r.pathname=he.posix.resolve("/",he.dirname(r.pathname),e),r.toString()}return he.resolve(he.dirname(t),e)},sp=new Set(["__proto__","prototype","constructor"]),ip=(t,e)=>{if(sp.has(t)){const r=`Prototype pollution key detected: "${t}"`;throw new Error(r)}};function op(t){return decodeURI(t.replace(/~1/g,"/").replace(/~0/g,"~"))}function Ri(t){return t.split("/").slice(1).map(op)}function Gs(t,e,r){if(e==="")throw new Error("Cannot set value at root ('') pointer");const n=Ri(e);n.forEach(i=>ip(i));let s=t;for(let i=0;i<n.length;i++){const o=n[i],a=i===n.length-1,f=n[i+1],c=/^\d+$/.test(f??"");a?s[o]=r:((!(o in s)||typeof s[o]!="object")&&(s[o]=c?[]:{}),s=s[o])}}const ap=(t,e)=>{if(st(t)&&st(e)){const s=new URL(t),i=new URL(e);if(s.origin!==i.origin)return t;const o=he.dirname(he.posix.resolve("/",i.pathname)),a=he.posix.resolve("/",s.pathname);return he.posix.relative(o,a)}if(st(e)){const s=new URL(e),i=he.dirname(he.posix.resolve("/",s.pathname));return s.pathname=he.posix.relative(i,he.posix.resolve("/",t)),s.toString()}if(st(t))return t;const r=he.dirname(he.resolve(e)),n=he.resolve(t);return he.relative(r,n)},cp=t=>{let r=0,n=0;const s=t.length,i=s&15,o=s-i,a=2277735313,f=1291169091,c=1390208809,u=944331445;for(let l=0;l<o;l+=16){let d=t.charCodeAt(l)&255|(t.charCodeAt(l+1)&255)<<8|(t.charCodeAt(l+2)&255)<<16|(t.charCodeAt(l+3)&255)<<24,p=t.charCodeAt(l+4)&255|(t.charCodeAt(l+5)&255)<<8|(t.charCodeAt(l+6)&255)<<16|(t.charCodeAt(l+7)&255)<<24,h=t.charCodeAt(l+8)&255|(t.charCodeAt(l+9)&255)<<8|(t.charCodeAt(l+10)&255)<<16|(t.charCodeAt(l+11)&255)<<24,y=t.charCodeAt(l+12)&255|(t.charCodeAt(l+13)&255)<<8|(t.charCodeAt(l+14)&255)<<16|(t.charCodeAt(l+15)&255)<<24;d=Math.imul(d,a),d=d<<15|d>>>17,d=Math.imul(d,f),r^=d,r=r<<13|r>>>19,r=Math.imul(r,5)+3864292196,p=Math.imul(p,f),p=p<<16|p>>>16,p=Math.imul(p,c),n^=p,n=n<<17|n>>>15,n=Math.imul(n,5)+461845907,h=Math.imul(h,c),h=h<<17|h>>>15,h=Math.imul(h,u),r^=h,r=r<<15|r>>>17,r=Math.imul(r,5)+1390208809,y=Math.imul(y,u),y=y<<18|y>>>14,y=Math.imul(y,a),n^=y,n=n<<13|n>>>19,n=Math.imul(n,5)+944331445}if(i>0){let l=0,d=0,p=0,h=0;i>=15&&(h^=(t.charCodeAt(o+14)&255)<<16),i>=14&&(h^=(t.charCodeAt(o+13)&255)<<8),i>=13&&(h^=t.charCodeAt(o+12)&255,h=Math.imul(h,u),h=h<<18|h>>>14,h=Math.imul(h,a),n^=h),i>=12&&(p^=(t.charCodeAt(o+11)&255)<<24),i>=11&&(p^=(t.charCodeAt(o+10)&255)<<16),i>=10&&(p^=(t.charCodeAt(o+9)&255)<<8),i>=9&&(p^=t.charCodeAt(o+8)&255,p=Math.imul(p,c),p=p<<17|p>>>15,p=Math.imul(p,u),r^=p),i>=8&&(d^=(t.charCodeAt(o+7)&255)<<24),i>=7&&(d^=(t.charCodeAt(o+6)&255)<<16),i>=6&&(d^=(t.charCodeAt(o+5)&255)<<8),i>=5&&(d^=t.charCodeAt(o+4)&255,d=Math.imul(d,f),d=d<<16|d>>>16,d=Math.imul(d,c),n^=d),i>=4&&(l^=(t.charCodeAt(o+3)&255)<<24),i>=3&&(l^=(t.charCodeAt(o+2)&255)<<16),i>=2&&(l^=(t.charCodeAt(o+1)&255)<<8),i>=1&&(l^=t.charCodeAt(o)&255,l=Math.imul(l,a),l=l<<15|l>>>17,l=Math.imul(l,f),r^=l)}return r^=s,n^=s,r+=n,n+=r,r^=r>>>16,r=Math.imul(r,2246822507),r^=r>>>13,r=Math.imul(r,3266489909),r^=r>>>16,n^=n>>>16,n=Math.imul(n,2246822507),n^=n>>>13,n=Math.imul(n,3266489909),n^=n>>>16,r+=n,n+=r,(r>>>0).toString(16).padStart(8,"0")+(n>>>0).toString(16).padStart(8,"0")};function fp(t){const r=cp(t).substring(0,7);return r.match(/^\d+$/)?"a"+r.substring(1):r}async function sf(t,e,r,n,s=0){if(s>=100)throw"Can not generate unique compressed values";const o=await t(n??e);return r[o]!==void 0&&r[o]!==e?sf(t,e,r,o,s+1):(r[o]=e,o)}const lp=(t,e)=>{const r=Object.fromEntries(Object.entries(e).map(([n,s])=>[s,n]));return{generate:async n=>{const s=r[n];if(s)return s;const i=await sf(t,n,e),o=i.match(/^\d+$/)?`a${i}`:i;return r[n]=o,o}}},up=t=>Wt(t)&&"$ref"in t&&typeof t.$ref=="string";function of(t){return t.startsWith("#")}function da(t,e){const r=e.find(n=>n.validate(t));return r?r.exec(t):Promise.resolve({ok:!1})}function Js(t,e){if(!of(t))throw"Please provide an internal ref";return`#/${e.map(Kn).join("/")}${t.substring(1)}`}function Ws(t,e){if(Array.isArray(t)){t.forEach(r=>Ws(r,e));return}if(Wt(t)&&(Object.values(t).forEach(r=>Ws(r,e)),typeof t=="object"&&"$ref"in t&&typeof t.$ref=="string")){const r=t.$ref;if(!of(r))return;t.$ref=Js(r,e)}}const Ys=(t,e,r,n,s,i=!1,o=new Set)=>{const a=Hs(e,Ri(r)).value;if(o.has(a))return;o.add(a),Gs(t,r,a);const f=c=>{if(!(!c||typeof c!="object")){"$ref"in c&&typeof c.$ref=="string"&&(c.$ref.startsWith(`#/${n}/${Kn(s)}`)||i)&&Ys(t,e,c.$ref.substring(1),n,s,i,o);for(const u of Object.values(c))f(u)}};f(a)},Is={externalDocuments:"x-ext",externalDocumentsMappings:"x-ext-urls"};async function dp(t,e){e.externalDocumentsKey=e.externalDocumentsKey??Is.externalDocuments,e.externalDocumentsMappingsKey=e.externalDocumentsMappingsKey??Is.externalDocumentsMappings;const r=e.cache??new Map,n=e.plugins.filter(m=>m.type==="loader"),s=e.plugins.filter(m=>m.type==="lifecycle"),o=await(async()=>{if(typeof t!="string")return t;const m=await da(t,n);if(m.ok&&typeof m.data=="object")return m.data;throw new Error("Failed to resolve input: Please provide a valid string value or pass a loader to process the input")})(),a=e.root??o,f=Zc(a),c=e.root!==void 0&&e.root!==o||e.depth!==void 0,u=e.visitedNodes??new Set,d=(()=>{const m=Rn(a);return m||(e.origin?e.origin:typeof t!="string"?"/":st(t)||Ld(t)?t:"/")})();a[e.externalDocumentsMappingsKey]===void 0&&(a[e.externalDocumentsMappingsKey]={});const{generate:p}=lp(e.compress??fp,a[e.externalDocumentsMappingsKey]),h=async(m,...$)=>{var w;const b=(w=e.hooks)==null?void 0:w[m];b&&await b(...$);for(const E of s){const O=E[m];O&&await O(...$)}},y=async(m,$=d,b=!1,w=0,E=[],O=null)=>{if(e.depth!==void 0&&w>e.depth||!Wt(m)&&!Array.isArray(m)||u.has(m))return;u.add(m);const M={path:E,resolutionCache:r,parentNode:O,rootNode:a,loaders:n};await h("onBeforeNodeProcess",m,M);const C=Rn(m);if(up(m)){const N=m.$ref,z="$global"in m&&typeof m.$global=="boolean"&&m.$global,X=Md(N,C??$,f);if(X!==void 0){if(c){const Oe=Ri(`/${X}`),ke=Oe.length>0?Hs(a,Oe.slice(0,-1)).value:void 0,A=Hs(a,Oe);await y(A.value,A.context,b,w+1,Oe,ke)}await h("onAfterNodeProcess",m,M);return}const[x,L=""]=N.split("#",2),H=np(C??$,x),U=ap(H,d),te=await p(U),ie=r.has(U);ie||r.set(U,da(H,n)),await h("onResolveStart",m);const pe=await r.get(U);if(pe.ok){ie||(z||Ws(pe.data,[Is.externalDocuments,te]),await y(pe.data,z?$:H,z,w+1,[e.externalDocumentsKey,te,a[e.externalDocumentsMappingsKey]]),Gs(a,`/${e.externalDocumentsMappingsKey}/${Kn(te)}`,U)),e.treeShake===!0?Ys(a,{[e.externalDocumentsKey]:{[te]:pe.data}},Js(`#${L}`,[e.externalDocumentsKey,te]).substring(1),e.externalDocumentsKey,te):ie||Gs(a,`/${e.externalDocumentsKey}/${te}`,pe.data),m.$ref=Js(`#${L}`,[e.externalDocumentsKey,te]),await h("onResolveSuccess",m),await h("onAfterNodeProcess",m,M);return}return await h("onResolveError",m),await h("onAfterNodeProcess",m,M),console.warn(`Failed to resolve external reference "${H}". The reference may be invalid, inaccessible, or missing a loader for this type of reference.`)}for(const N in m)N===e.externalDocumentsKey||N===e.externalDocumentsMappingsKey||await y(m[N],C??$,b,w+1,[...E,N],m);await h("onAfterNodeProcess",m,M)};return await y(o),!e.urlMap&&!c&&delete a[e.externalDocumentsMappingsKey],o}const af=(t,e)=>{for(const r in e)if(!(r in t))t[r]=e[r];else{const n=t[r],s=e[r];typeof n=="object"&&n!==null&&typeof s=="object"&&s!==null?af(n,s):t[r]=s}return t};function pp(t,e){const r=ec(t);return sc(r)}function Ci(t){return t?{specification:pp(yi(t)?Le(t).specification:Mr(t)),version:"3.1"}:{specification:null,version:"3.1"}}const mp=(t,e)=>{const r=[];for(const n of t)e.has(n)&&r.push(n);return r},un=(t,e)=>Array.isArray(t)?t.length?t:e:typeof t=="object"&&t!==null?Object.keys(t).length?t:e:t??e,pa=t=>{const e={},r=[];for(const n of t)if(typeof n=="object")for(const[s,i]of Object.entries(n)){if(!e[s]){e[s]=i;continue}const o=mp(new Set(Object.keys(e[s])),new Set(Object.keys(i)));e[s]={...e[s],...i},o.forEach(a=>r.push({method:a,path:s}))}return{paths:e,conflicts:r}},hp=t=>{const e=new Set,r=[];for(const n of t)for(const s of n)e.has(s.name)||r.push(s),e.add(s.name);return r},yp=t=>{const e=new Set,r=[];for(const n of t)for(const s of n)e.has(s.url)||r.push(s),e.add(s.url);return r},gp=t=>{const e={},r=[];for(const n of t)if(typeof n=="object")for(const[s,i]of Object.entries(n))for(const[o,a]of Object.entries(i))e[s]||(e[s]={}),e[s][o]?r.push({componentType:s,name:o}):e[s][o]=a;return{components:e,conflicts:r}},$p=async(t,e)=>{for(const r of t.keys())await dp(t[r],{treeShake:!1,urlMap:!1,plugins:[{type:"lifecycle",onBeforeNodeProcess:n=>{const s=n.$ref;if(typeof s!="string"||!s.startsWith("#/components/"))return;const i=s.split("/");i.length<4||(i[3]=`${e[r]??""}${i[3]}`,n.$ref=i.join("/"))}},{type:"lifecycle",onBeforeNodeProcess:(n,s)=>{if(s.path.length===2&&s.path[0]==="components"){const i=e[r];Object.keys(n).forEach(o=>{const a=`${i??""}${o}`,f=n[o];delete n[o],n[a]=f})}}}]})},bp=t=>t,vp=async(t,e)=>{const r=t.map(h=>Ci(h).specification);e!=null&&e.prefixComponents&&await $p(r,e.prefixComponents),r.reverse();const n=r.reduce((h,y)=>y.info&&typeof y.info=="object"?af(h,y.info):h,{}),{paths:s,conflicts:i}=pa(r.map(h=>h.paths??{})),{paths:o,conflicts:a}=pa(r.map(h=>h.webhooks??{})),f=hp(r.map(h=>h.tags??[])),c=yp(r.map(h=>h.servers??[])),{components:u,conflicts:l}=gp(r.map(h=>h.components??{})),d=r.reduce((h,y)=>({...h,...y}),{}),p=[...i.map(h=>({type:"path",...h})),...a.map(h=>({type:"webhook",...h})),...l.map(h=>({type:"component",...h}))];return p.length?{ok:!1,conflicts:p}:{ok:!0,document:bp({...d,info:n,paths:s,webhooks:un(o,void 0),tags:un(f,void 0),servers:un(c,void 0),components:un(u,void 0)})}};async function Mi(t,e){var f,c,u,l,d,p;const r=[];if((f=e==null?void 0:e.filesystem)!=null&&f.find(h=>h.filename===t))return{specification:(c=Le(e.filesystem))==null?void 0:c.specification,filesystem:e.filesystem,errors:r};const n=(u=e==null?void 0:e.plugins)==null?void 0:u.find(h=>h.check(t));let s=Mr(t);if(n)try{s=Mr(await n.get(t))}catch{if(e!=null&&e.throwOnError)throw new Error($e.EXTERNAL_REFERENCE_NOT_FOUND.replace("%s",t));return r.push({code:"EXTERNAL_REFERENCE_NOT_FOUND",message:$e.EXTERNAL_REFERENCE_NOT_FOUND.replace("%s",t)}),{specification:null,filesystem:[],errors:r}}if(s===void 0){if(e!=null&&e.throwOnError)throw new Error("No content to load");return r.push({code:"NO_CONTENT",message:$e.NO_CONTENT}),{specification:null,filesystem:[],errors:r}}let i=Kr(s,{filename:(e==null?void 0:e.filename)??null});const a=(e!=null&&e.filename?i.find(h=>h.filename===(e==null?void 0:e.filename)):Le(i)).references??ac(s);if(a.length===0)return{specification:(l=Le(i))==null?void 0:l.specification,filesystem:i,errors:r};for(const h of a){const y=(d=e==null?void 0:e.plugins)==null?void 0:d.find(w=>w.check(h));if(!y)continue;const m=y.check(h)&&y.resolvePath?y.resolvePath(t,h):h;if(i.find(w=>w.filename===h))continue;const{filesystem:$,errors:b}=await Mi(m,{...e,filename:h});r.push(...b),i=[...i,...$.map(w=>({...w,isEntrypoint:!1}))]}return{specification:(p=Le(i))==null?void 0:p.specification,filesystem:i,errors:r}}var Xs={exports:{}},bt={},Te={},Jt={},Br={},B={},qr={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class e{}t._CodeOrName=e,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends e{constructor(b){if(super(),!t.IDENTIFIER.test(b))throw new Error("CodeGen: name must be a valid identifier");this.str=b}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=r;class n extends e{constructor(b){super(),this._items=typeof b=="string"?[b]:b}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const b=this._items[0];return b===""||b==='""'}get str(){var b;return(b=this._str)!==null&&b!==void 0?b:this._str=this._items.reduce((w,E)=>`${w}${E}`,"")}get names(){var b;return(b=this._names)!==null&&b!==void 0?b:this._names=this._items.reduce((w,E)=>(E instanceof r&&(w[E.str]=(w[E.str]||0)+1),w),{})}}t._Code=n,t.nil=new n("");function s($,...b){const w=[$[0]];let E=0;for(;E<b.length;)a(w,b[E]),w.push($[++E]);return new n(w)}t._=s;const i=new n("+");function o($,...b){const w=[p($[0])];let E=0;for(;E<b.length;)w.push(i),a(w,b[E]),w.push(i,p($[++E]));return f(w),new n(w)}t.str=o;function a($,b){b instanceof n?$.push(...b._items):b instanceof r?$.push(b):$.push(l(b))}t.addCodeArg=a;function f($){let b=1;for(;b<$.length-1;){if($[b]===i){const w=c($[b-1],$[b+1]);if(w!==void 0){$.splice(b-1,3,w);continue}$[b++]="+"}b++}}function c($,b){if(b==='""')return $;if($==='""')return b;if(typeof $=="string")return b instanceof r||$[$.length-1]!=='"'?void 0:typeof b!="string"?`${$.slice(0,-1)}${b}"`:b[0]==='"'?$.slice(0,-1)+b.slice(1):void 0;if(typeof b=="string"&&b[0]==='"'&&!($ instanceof r))return`"${$}${b.slice(1)}`}function u($,b){return b.emptyStr()?$:$.emptyStr()?b:o`${$}${b}`}t.strConcat=u;function l($){return typeof $=="number"||typeof $=="boolean"||$===null?$:p(Array.isArray($)?$.join(","):$)}function d($){return new n(p($))}t.stringify=d;function p($){return JSON.stringify($).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.safeStringify=p;function h($){return typeof $=="string"&&t.IDENTIFIER.test($)?new n(`.${$}`):s`[${$}]`}t.getProperty=h;function y($){if(typeof $=="string"&&t.IDENTIFIER.test($))return new n(`${$}`);throw new Error(`CodeGen: invalid export name: ${$}, use explicit $id name mapping`)}t.getEsmExportName=y;function m($){return new n($.toString())}t.regexpCode=m})(qr);var Zs={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const e=qr;class r extends Error{constructor(c){super(`CodeGen: "code" for ${c} not defined`),this.value=c.value}}var n;(function(f){f[f.Started=0]="Started",f[f.Completed=1]="Completed"})(n||(t.UsedValueState=n={})),t.varKinds={const:new e.Name("const"),let:new e.Name("let"),var:new e.Name("var")};class s{constructor({prefixes:c,parent:u}={}){this._names={},this._prefixes=c,this._parent=u}toName(c){return c instanceof e.Name?c:this.name(c)}name(c){return new e.Name(this._newName(c))}_newName(c){const u=this._names[c]||this._nameGroup(c);return`${c}${u.index++}`}_nameGroup(c){var u,l;if(!((l=(u=this._parent)===null||u===void 0?void 0:u._prefixes)===null||l===void 0)&&l.has(c)||this._prefixes&&!this._prefixes.has(c))throw new Error(`CodeGen: prefix "${c}" is not allowed in this scope`);return this._names[c]={prefix:c,index:0}}}t.Scope=s;class i extends e.Name{constructor(c,u){super(u),this.prefix=c}setValue(c,{property:u,itemIndex:l}){this.value=c,this.scopePath=(0,e._)`.${new e.Name(u)}[${l}]`}}t.ValueScopeName=i;const o=(0,e._)`\n`;class a extends s{constructor(c){super(c),this._values={},this._scope=c.scope,this.opts={...c,_n:c.lines?o:e.nil}}get(){return this._scope}name(c){return new i(c,this._newName(c))}value(c,u){var l;if(u.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const d=this.toName(c),{prefix:p}=d,h=(l=u.key)!==null&&l!==void 0?l:u.ref;let y=this._values[p];if(y){const b=y.get(h);if(b)return b}else y=this._values[p]=new Map;y.set(h,d);const m=this._scope[p]||(this._scope[p]=[]),$=m.length;return m[$]=u.ref,d.setValue(u,{property:p,itemIndex:$}),d}getValue(c,u){const l=this._values[c];if(l)return l.get(u)}scopeRefs(c,u=this._values){return this._reduceValues(u,l=>{if(l.scopePath===void 0)throw new Error(`CodeGen: name "${l}" has no value`);return(0,e._)`${c}${l.scopePath}`})}scopeCode(c=this._values,u,l){return this._reduceValues(c,d=>{if(d.value===void 0)throw new Error(`CodeGen: name "${d}" has no value`);return d.value.code},u,l)}_reduceValues(c,u,l={},d){let p=e.nil;for(const h in c){const y=c[h];if(!y)continue;const m=l[h]=l[h]||new Map;y.forEach($=>{if(m.has($))return;m.set($,n.Started);let b=u($);if(b){const w=this.opts.es5?t.varKinds.var:t.varKinds.const;p=(0,e._)`${p}${w} ${$} = ${b};${this.opts._n}`}else if(b=d==null?void 0:d($))p=(0,e._)`${p}${b}${this.opts._n}`;else throw new r($);m.set($,n.Completed)})}return p}}t.ValueScope=a})(Zs);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const e=qr,r=Zs;var n=qr;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return n.Name}});var s=Zs;Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return s.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return s.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return s.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return s.varKinds}}),t.operators={GT:new e._Code(">"),GTE:new e._Code(">="),LT:new e._Code("<"),LTE:new e._Code("<="),EQ:new e._Code("==="),NEQ:new e._Code("!=="),NOT:new e._Code("!"),OR:new e._Code("||"),AND:new e._Code("&&"),ADD:new e._Code("+")};class i{optimizeNodes(){return this}optimizeNames(g,v){return this}}class o extends i{constructor(g,v,S){super(),this.varKind=g,this.name=v,this.rhs=S}render({es5:g,_n:v}){const S=g?r.varKinds.var:this.varKind,q=this.rhs===void 0?"":` = ${this.rhs}`;return`${S} ${this.name}${q};`+v}optimizeNames(g,v){if(g[this.name.str])return this.rhs&&(this.rhs=U(this.rhs,g,v)),this}get names(){return this.rhs instanceof e._CodeOrName?this.rhs.names:{}}}class a extends i{constructor(g,v,S){super(),this.lhs=g,this.rhs=v,this.sideEffects=S}render({_n:g}){return`${this.lhs} = ${this.rhs};`+g}optimizeNames(g,v){if(!(this.lhs instanceof e.Name&&!g[this.lhs.str]&&!this.sideEffects))return this.rhs=U(this.rhs,g,v),this}get names(){const g=this.lhs instanceof e.Name?{}:{...this.lhs.names};return H(g,this.rhs)}}class f extends a{constructor(g,v,S,q){super(g,S,q),this.op=v}render({_n:g}){return`${this.lhs} ${this.op}= ${this.rhs};`+g}}class c extends i{constructor(g){super(),this.label=g,this.names={}}render({_n:g}){return`${this.label}:`+g}}class u extends i{constructor(g){super(),this.label=g,this.names={}}render({_n:g}){return`break${this.label?` ${this.label}`:""};`+g}}class l extends i{constructor(g){super(),this.error=g}render({_n:g}){return`throw ${this.error};`+g}get names(){return this.error.names}}class d extends i{constructor(g){super(),this.code=g}render({_n:g}){return`${this.code};`+g}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(g,v){return this.code=U(this.code,g,v),this}get names(){return this.code instanceof e._CodeOrName?this.code.names:{}}}class p extends i{constructor(g=[]){super(),this.nodes=g}render(g){return this.nodes.reduce((v,S)=>v+S.render(g),"")}optimizeNodes(){const{nodes:g}=this;let v=g.length;for(;v--;){const S=g[v].optimizeNodes();Array.isArray(S)?g.splice(v,1,...S):S?g[v]=S:g.splice(v,1)}return g.length>0?this:void 0}optimizeNames(g,v){const{nodes:S}=this;let q=S.length;for(;q--;){const F=S[q];F.optimizeNames(g,v)||(te(g,F.names),S.splice(q,1))}return S.length>0?this:void 0}get names(){return this.nodes.reduce((g,v)=>L(g,v.names),{})}}class h extends p{render(g){return"{"+g._n+super.render(g)+"}"+g._n}}class y extends p{}class m extends h{}m.kind="else";class $ extends h{constructor(g,v){super(v),this.condition=g}render(g){let v=`if(${this.condition})`+super.render(g);return this.else&&(v+="else "+this.else.render(g)),v}optimizeNodes(){super.optimizeNodes();const g=this.condition;if(g===!0)return this.nodes;let v=this.else;if(v){const S=v.optimizeNodes();v=this.else=Array.isArray(S)?new m(S):S}if(v)return g===!1?v instanceof $?v:v.nodes:this.nodes.length?this:new $(ie(g),v instanceof $?[v]:v.nodes);if(!(g===!1||!this.nodes.length))return this}optimizeNames(g,v){var S;if(this.else=(S=this.else)===null||S===void 0?void 0:S.optimizeNames(g,v),!!(super.optimizeNames(g,v)||this.else))return this.condition=U(this.condition,g,v),this}get names(){const g=super.names;return H(g,this.condition),this.else&&L(g,this.else.names),g}}$.kind="if";class b extends h{}b.kind="for";class w extends b{constructor(g){super(),this.iteration=g}render(g){return`for(${this.iteration})`+super.render(g)}optimizeNames(g,v){if(super.optimizeNames(g,v))return this.iteration=U(this.iteration,g,v),this}get names(){return L(super.names,this.iteration.names)}}class E extends b{constructor(g,v,S,q){super(),this.varKind=g,this.name=v,this.from=S,this.to=q}render(g){const v=g.es5?r.varKinds.var:this.varKind,{name:S,from:q,to:F}=this;return`for(${v} ${S}=${q}; ${S}<${F}; ${S}++)`+super.render(g)}get names(){const g=H(super.names,this.from);return H(g,this.to)}}class O extends b{constructor(g,v,S,q){super(),this.loop=g,this.varKind=v,this.name=S,this.iterable=q}render(g){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(g)}optimizeNames(g,v){if(super.optimizeNames(g,v))return this.iterable=U(this.iterable,g,v),this}get names(){return L(super.names,this.iterable.names)}}class M extends h{constructor(g,v,S){super(),this.name=g,this.args=v,this.async=S}render(g){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(g)}}M.kind="func";class C extends p{render(g){return"return "+super.render(g)}}C.kind="return";class N extends h{render(g){let v="try"+super.render(g);return this.catch&&(v+=this.catch.render(g)),this.finally&&(v+=this.finally.render(g)),v}optimizeNodes(){var g,v;return super.optimizeNodes(),(g=this.catch)===null||g===void 0||g.optimizeNodes(),(v=this.finally)===null||v===void 0||v.optimizeNodes(),this}optimizeNames(g,v){var S,q;return super.optimizeNames(g,v),(S=this.catch)===null||S===void 0||S.optimizeNames(g,v),(q=this.finally)===null||q===void 0||q.optimizeNames(g,v),this}get names(){const g=super.names;return this.catch&&L(g,this.catch.names),this.finally&&L(g,this.finally.names),g}}class z extends h{constructor(g){super(),this.error=g}render(g){return`catch(${this.error})`+super.render(g)}}z.kind="catch";class X extends h{render(g){return"finally"+super.render(g)}}X.kind="finally";class x{constructor(g,v={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...v,_n:v.lines?`
131
+ `:""},this._extScope=g,this._scope=new r.Scope({parent:g}),this._nodes=[new y]}toString(){return this._root.render(this.opts)}name(g){return this._scope.name(g)}scopeName(g){return this._extScope.name(g)}scopeValue(g,v){const S=this._extScope.value(g,v);return(this._values[S.prefix]||(this._values[S.prefix]=new Set)).add(S),S}getScopeValue(g,v){return this._extScope.getValue(g,v)}scopeRefs(g){return this._extScope.scopeRefs(g,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(g,v,S,q){const F=this._scope.toName(v);return S!==void 0&&q&&(this._constants[F.str]=S),this._leafNode(new o(g,F,S)),F}const(g,v,S){return this._def(r.varKinds.const,g,v,S)}let(g,v,S){return this._def(r.varKinds.let,g,v,S)}var(g,v,S){return this._def(r.varKinds.var,g,v,S)}assign(g,v,S){return this._leafNode(new a(g,v,S))}add(g,v){return this._leafNode(new f(g,t.operators.ADD,v))}code(g){return typeof g=="function"?g():g!==e.nil&&this._leafNode(new d(g)),this}object(...g){const v=["{"];for(const[S,q]of g)v.length>1&&v.push(","),v.push(S),(S!==q||this.opts.es5)&&(v.push(":"),(0,e.addCodeArg)(v,q));return v.push("}"),new e._Code(v)}if(g,v,S){if(this._blockNode(new $(g)),v&&S)this.code(v).else().code(S).endIf();else if(v)this.code(v).endIf();else if(S)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(g){return this._elseNode(new $(g))}else(){return this._elseNode(new m)}endIf(){return this._endBlockNode($,m)}_for(g,v){return this._blockNode(g),v&&this.code(v).endFor(),this}for(g,v){return this._for(new w(g),v)}forRange(g,v,S,q,F=this.opts.es5?r.varKinds.var:r.varKinds.let){const Z=this._scope.toName(g);return this._for(new E(F,Z,v,S),()=>q(Z))}forOf(g,v,S,q=r.varKinds.const){const F=this._scope.toName(g);if(this.opts.es5){const Z=v instanceof e.Name?v:this.var("_arr",v);return this.forRange("_i",0,(0,e._)`${Z}.length`,Q=>{this.var(F,(0,e._)`${Z}[${Q}]`),S(F)})}return this._for(new O("of",q,F,v),()=>S(F))}forIn(g,v,S,q=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(g,(0,e._)`Object.keys(${v})`,S);const F=this._scope.toName(g);return this._for(new O("in",q,F,v),()=>S(F))}endFor(){return this._endBlockNode(b)}label(g){return this._leafNode(new c(g))}break(g){return this._leafNode(new u(g))}return(g){const v=new C;if(this._blockNode(v),this.code(g),v.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(C)}try(g,v,S){if(!v&&!S)throw new Error('CodeGen: "try" without "catch" and "finally"');const q=new N;if(this._blockNode(q),this.code(g),v){const F=this.name("e");this._currNode=q.catch=new z(F),v(F)}return S&&(this._currNode=q.finally=new X,this.code(S)),this._endBlockNode(z,X)}throw(g){return this._leafNode(new l(g))}block(g,v){return this._blockStarts.push(this._nodes.length),g&&this.code(g).endBlock(v),this}endBlock(g){const v=this._blockStarts.pop();if(v===void 0)throw new Error("CodeGen: not in self-balancing block");const S=this._nodes.length-v;if(S<0||g!==void 0&&S!==g)throw new Error(`CodeGen: wrong number of nodes: ${S} vs ${g} expected`);return this._nodes.length=v,this}func(g,v=e.nil,S,q){return this._blockNode(new M(g,v,S)),q&&this.code(q).endFunc(),this}endFunc(){return this._endBlockNode(M)}optimize(g=1){for(;g-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(g){return this._currNode.nodes.push(g),this}_blockNode(g){this._currNode.nodes.push(g),this._nodes.push(g)}_endBlockNode(g,v){const S=this._currNode;if(S instanceof g||v&&S instanceof v)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${v?`${g.kind}/${v.kind}`:g.kind}"`)}_elseNode(g){const v=this._currNode;if(!(v instanceof $))throw new Error('CodeGen: "else" without "if"');return this._currNode=v.else=g,this}get _root(){return this._nodes[0]}get _currNode(){const g=this._nodes;return g[g.length-1]}set _currNode(g){const v=this._nodes;v[v.length-1]=g}}t.CodeGen=x;function L(P,g){for(const v in g)P[v]=(P[v]||0)+(g[v]||0);return P}function H(P,g){return g instanceof e._CodeOrName?L(P,g.names):P}function U(P,g,v){if(P instanceof e.Name)return S(P);if(!q(P))return P;return new e._Code(P._items.reduce((F,Z)=>(Z instanceof e.Name&&(Z=S(Z)),Z instanceof e._Code?F.push(...Z._items):F.push(Z),F),[]));function S(F){const Z=v[F.str];return Z===void 0||g[F.str]!==1?F:(delete g[F.str],Z)}function q(F){return F instanceof e._Code&&F._items.some(Z=>Z instanceof e.Name&&g[Z.str]===1&&v[Z.str]!==void 0)}}function te(P,g){for(const v in g)P[v]=(P[v]||0)-(g[v]||0)}function ie(P){return typeof P=="boolean"||typeof P=="number"||P===null?!P:(0,e._)`!${k(P)}`}t.not=ie;const pe=_(t.operators.AND);function Oe(...P){return P.reduce(pe)}t.and=Oe;const ke=_(t.operators.OR);function A(...P){return P.reduce(ke)}t.or=A;function _(P){return(g,v)=>g===e.nil?v:v===e.nil?g:(0,e._)`${k(g)} ${P} ${k(v)}`}function k(P){return P instanceof e.Name?P:(0,e._)`(${P})`}})(B);var T={};Object.defineProperty(T,"__esModule",{value:!0});T.checkStrictMode=T.getErrorPath=T.Type=T.useFunc=T.setEvaluated=T.evaluatedPropsToName=T.mergeEvaluated=T.eachItem=T.unescapeJsonPointer=T.escapeJsonPointer=T.escapeFragment=T.unescapeFragment=T.schemaRefOrVal=T.schemaHasRulesButRef=T.schemaHasRules=T.checkUnknownRules=T.alwaysValidSchema=T.toHash=void 0;const re=B,wp=qr;function _p(t){const e={};for(const r of t)e[r]=!0;return e}T.toHash=_p;function Pp(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(cf(t,e),!ff(e,t.self.RULES.all))}T.alwaysValidSchema=Pp;function cf(t,e=t.schema){const{opts:r,self:n}=t;if(!r.strictSchema||typeof e=="boolean")return;const s=n.RULES.keywords;for(const i in e)s[i]||df(t,`unknown keyword: "${i}"`)}T.checkUnknownRules=cf;function ff(t,e){if(typeof t=="boolean")return!t;for(const r in t)if(e[r])return!0;return!1}T.schemaHasRules=ff;function Ep(t,e){if(typeof t=="boolean")return!t;for(const r in t)if(r!=="$ref"&&e.all[r])return!0;return!1}T.schemaHasRulesButRef=Ep;function Sp({topSchemaRef:t,schemaPath:e},r,n,s){if(!s){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,re._)`${r}`}return(0,re._)`${t}${e}${(0,re.getProperty)(n)}`}T.schemaRefOrVal=Sp;function jp(t){return lf(decodeURIComponent(t))}T.unescapeFragment=jp;function Op(t){return encodeURIComponent(qi(t))}T.escapeFragment=Op;function qi(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}T.escapeJsonPointer=qi;function lf(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}T.unescapeJsonPointer=lf;function kp(t,e){if(Array.isArray(t))for(const r of t)e(r);else e(t)}T.eachItem=kp;function ma({mergeNames:t,mergeToName:e,mergeValues:r,resultToName:n}){return(s,i,o,a)=>{const f=o===void 0?i:o instanceof re.Name?(i instanceof re.Name?t(s,i,o):e(s,i,o),o):i instanceof re.Name?(e(s,o,i),i):r(i,o);return a===re.Name&&!(f instanceof re.Name)?n(s,f):f}}T.mergeEvaluated={props:ma({mergeNames:(t,e,r)=>t.if((0,re._)`${r} !== true && ${e} !== undefined`,()=>{t.if((0,re._)`${e} === true`,()=>t.assign(r,!0),()=>t.assign(r,(0,re._)`${r} || {}`).code((0,re._)`Object.assign(${r}, ${e})`))}),mergeToName:(t,e,r)=>t.if((0,re._)`${r} !== true`,()=>{e===!0?t.assign(r,!0):(t.assign(r,(0,re._)`${r} || {}`),Di(t,r,e))}),mergeValues:(t,e)=>t===!0?!0:{...t,...e},resultToName:uf}),items:ma({mergeNames:(t,e,r)=>t.if((0,re._)`${r} !== true && ${e} !== undefined`,()=>t.assign(r,(0,re._)`${e} === true ? true : ${r} > ${e} ? ${r} : ${e}`)),mergeToName:(t,e,r)=>t.if((0,re._)`${r} !== true`,()=>t.assign(r,e===!0?!0:(0,re._)`${r} > ${e} ? ${r} : ${e}`)),mergeValues:(t,e)=>t===!0?!0:Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})};function uf(t,e){if(e===!0)return t.var("props",!0);const r=t.var("props",(0,re._)`{}`);return e!==void 0&&Di(t,r,e),r}T.evaluatedPropsToName=uf;function Di(t,e,r){Object.keys(r).forEach(n=>t.assign((0,re._)`${e}${(0,re.getProperty)(n)}`,!0))}T.setEvaluated=Di;const ha={};function Ip(t,e){return t.scopeValue("func",{ref:e,code:ha[e.code]||(ha[e.code]=new wp._Code(e.code))})}T.useFunc=Ip;var Qs;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(Qs||(T.Type=Qs={}));function Ap(t,e,r){if(t instanceof re.Name){const n=e===Qs.Num;return r?n?(0,re._)`"[" + ${t} + "]"`:(0,re._)`"['" + ${t} + "']"`:n?(0,re._)`"/" + ${t}`:(0,re._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,re.getProperty)(t).toString():"/"+qi(t)}T.getErrorPath=Ap;function df(t,e,r=t.opts.strictSchema){if(r){if(e=`strict mode: ${e}`,r===!0)throw new Error(e);t.self.logger.warn(e)}}T.checkStrictMode=df;var je={};Object.defineProperty(je,"__esModule",{value:!0});const ge=B,Np={data:new ge.Name("data"),valCxt:new ge.Name("valCxt"),instancePath:new ge.Name("instancePath"),parentData:new ge.Name("parentData"),parentDataProperty:new ge.Name("parentDataProperty"),rootData:new ge.Name("rootData"),dynamicAnchors:new ge.Name("dynamicAnchors"),vErrors:new ge.Name("vErrors"),errors:new ge.Name("errors"),this:new ge.Name("this"),self:new ge.Name("self"),scope:new ge.Name("scope"),json:new ge.Name("json"),jsonPos:new ge.Name("jsonPos"),jsonLen:new ge.Name("jsonLen"),jsonPart:new ge.Name("jsonPart")};je.default=Np;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const e=B,r=T,n=je;t.keywordError={message:({keyword:m})=>(0,e.str)`must pass "${m}" keyword validation`},t.keyword$DataError={message:({keyword:m,schemaType:$})=>$?(0,e.str)`"${m}" keyword must be ${$} ($data)`:(0,e.str)`"${m}" keyword is invalid ($data)`};function s(m,$=t.keywordError,b,w){const{it:E}=m,{gen:O,compositeRule:M,allErrors:C}=E,N=l(m,$,b);w??(M||C)?f(O,N):c(E,(0,e._)`[${N}]`)}t.reportError=s;function i(m,$=t.keywordError,b){const{it:w}=m,{gen:E,compositeRule:O,allErrors:M}=w,C=l(m,$,b);f(E,C),O||M||c(w,n.default.vErrors)}t.reportExtraError=i;function o(m,$){m.assign(n.default.errors,$),m.if((0,e._)`${n.default.vErrors} !== null`,()=>m.if($,()=>m.assign((0,e._)`${n.default.vErrors}.length`,$),()=>m.assign(n.default.vErrors,null)))}t.resetErrorsCount=o;function a({gen:m,keyword:$,schemaValue:b,data:w,errsCount:E,it:O}){if(E===void 0)throw new Error("ajv implementation error");const M=m.name("err");m.forRange("i",E,n.default.errors,C=>{m.const(M,(0,e._)`${n.default.vErrors}[${C}]`),m.if((0,e._)`${M}.instancePath === undefined`,()=>m.assign((0,e._)`${M}.instancePath`,(0,e.strConcat)(n.default.instancePath,O.errorPath))),m.assign((0,e._)`${M}.schemaPath`,(0,e.str)`${O.errSchemaPath}/${$}`),O.opts.verbose&&(m.assign((0,e._)`${M}.schema`,b),m.assign((0,e._)`${M}.data`,w))})}t.extendErrors=a;function f(m,$){const b=m.const("err",$);m.if((0,e._)`${n.default.vErrors} === null`,()=>m.assign(n.default.vErrors,(0,e._)`[${b}]`),(0,e._)`${n.default.vErrors}.push(${b})`),m.code((0,e._)`${n.default.errors}++`)}function c(m,$){const{gen:b,validateName:w,schemaEnv:E}=m;E.$async?b.throw((0,e._)`new ${m.ValidationError}(${$})`):(b.assign((0,e._)`${w}.errors`,$),b.return(!1))}const u={keyword:new e.Name("keyword"),schemaPath:new e.Name("schemaPath"),params:new e.Name("params"),propertyName:new e.Name("propertyName"),message:new e.Name("message"),schema:new e.Name("schema"),parentSchema:new e.Name("parentSchema")};function l(m,$,b){const{createErrors:w}=m.it;return w===!1?(0,e._)`{}`:d(m,$,b)}function d(m,$,b={}){const{gen:w,it:E}=m,O=[p(E,b),h(m,b)];return y(m,$,O),w.object(...O)}function p({errorPath:m},{instancePath:$}){const b=$?(0,e.str)`${m}${(0,r.getErrorPath)($,r.Type.Str)}`:m;return[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,b)]}function h({keyword:m,it:{errSchemaPath:$}},{schemaPath:b,parentSchema:w}){let E=w?$:(0,e.str)`${$}/${m}`;return b&&(E=(0,e.str)`${E}${(0,r.getErrorPath)(b,r.Type.Str)}`),[u.schemaPath,E]}function y(m,{params:$,message:b},w){const{keyword:E,data:O,schemaValue:M,it:C}=m,{opts:N,propertyName:z,topSchemaRef:X,schemaPath:x}=C;w.push([u.keyword,E],[u.params,typeof $=="function"?$(m):$||(0,e._)`{}`]),N.messages&&w.push([u.message,typeof b=="function"?b(m):b]),N.verbose&&w.push([u.schema,M],[u.parentSchema,(0,e._)`${X}${x}`],[n.default.data,O]),z&&w.push([u.propertyName,z])}})(Br);Object.defineProperty(Jt,"__esModule",{value:!0});Jt.boolOrEmptySchema=Jt.topBoolOrEmptySchema=void 0;const Tp=Br,xp=B,Rp=je,Cp={message:"boolean schema is false"};function Mp(t){const{gen:e,schema:r,validateName:n}=t;r===!1?pf(t,!1):typeof r=="object"&&r.$async===!0?e.return(Rp.default.data):(e.assign((0,xp._)`${n}.errors`,null),e.return(!0))}Jt.topBoolOrEmptySchema=Mp;function qp(t,e){const{gen:r,schema:n}=t;n===!1?(r.var(e,!1),pf(t)):r.var(e,!0)}Jt.boolOrEmptySchema=qp;function pf(t,e){const{gen:r,data:n}=t,s={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,Tp.reportError)(s,Cp,void 0,e)}var de={},wt={};Object.defineProperty(wt,"__esModule",{value:!0});wt.getRules=wt.isJSONType=void 0;const Dp=["string","number","integer","boolean","null","object","array"],Lp=new Set(Dp);function Fp(t){return typeof t=="string"&&Lp.has(t)}wt.isJSONType=Fp;function Vp(){const t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...t,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}}wt.getRules=Vp;var Je={};Object.defineProperty(Je,"__esModule",{value:!0});Je.shouldUseRule=Je.shouldUseGroup=Je.schemaHasRulesForType=void 0;function Up({schema:t,self:e},r){const n=e.RULES.types[r];return n&&n!==!0&&mf(t,n)}Je.schemaHasRulesForType=Up;function mf(t,e){return e.rules.some(r=>hf(t,r))}Je.shouldUseGroup=mf;function hf(t,e){var r;return t[e.keyword]!==void 0||((r=e.definition.implements)===null||r===void 0?void 0:r.some(n=>t[n]!==void 0))}Je.shouldUseRule=hf;Object.defineProperty(de,"__esModule",{value:!0});de.reportTypeError=de.checkDataTypes=de.checkDataType=de.coerceAndCheckDataType=de.getJSONTypes=de.getSchemaTypes=de.DataType=void 0;const zp=wt,Kp=Je,Bp=Br,W=B,yf=T;var zt;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(zt||(de.DataType=zt={}));function Hp(t){const e=gf(t.type);if(e.includes("null")){if(t.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&t.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');t.nullable===!0&&e.push("null")}return e}de.getSchemaTypes=Hp;function gf(t){const e=Array.isArray(t)?t:t?[t]:[];if(e.every(zp.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}de.getJSONTypes=gf;function Gp(t,e){const{gen:r,data:n,opts:s}=t,i=Jp(e,s.coerceTypes),o=e.length>0&&!(i.length===0&&e.length===1&&(0,Kp.schemaHasRulesForType)(t,e[0]));if(o){const a=Li(e,n,s.strictNumbers,zt.Wrong);r.if(a,()=>{i.length?Wp(t,e,i):Fi(t)})}return o}de.coerceAndCheckDataType=Gp;const $f=new Set(["string","number","integer","boolean","null"]);function Jp(t,e){return e?t.filter(r=>$f.has(r)||e==="array"&&r==="array"):[]}function Wp(t,e,r){const{gen:n,data:s,opts:i}=t,o=n.let("dataType",(0,W._)`typeof ${s}`),a=n.let("coerced",(0,W._)`undefined`);i.coerceTypes==="array"&&n.if((0,W._)`${o} == 'object' && Array.isArray(${s}) && ${s}.length == 1`,()=>n.assign(s,(0,W._)`${s}[0]`).assign(o,(0,W._)`typeof ${s}`).if(Li(e,s,i.strictNumbers),()=>n.assign(a,s))),n.if((0,W._)`${a} !== undefined`);for(const c of r)($f.has(c)||c==="array"&&i.coerceTypes==="array")&&f(c);n.else(),Fi(t),n.endIf(),n.if((0,W._)`${a} !== undefined`,()=>{n.assign(s,a),Yp(t,a)});function f(c){switch(c){case"string":n.elseIf((0,W._)`${o} == "number" || ${o} == "boolean"`).assign(a,(0,W._)`"" + ${s}`).elseIf((0,W._)`${s} === null`).assign(a,(0,W._)`""`);return;case"number":n.elseIf((0,W._)`${o} == "boolean" || ${s} === null
132
+ || (${o} == "string" && ${s} && ${s} == +${s})`).assign(a,(0,W._)`+${s}`);return;case"integer":n.elseIf((0,W._)`${o} === "boolean" || ${s} === null
133
+ || (${o} === "string" && ${s} && ${s} == +${s} && !(${s} % 1))`).assign(a,(0,W._)`+${s}`);return;case"boolean":n.elseIf((0,W._)`${s} === "false" || ${s} === 0 || ${s} === null`).assign(a,!1).elseIf((0,W._)`${s} === "true" || ${s} === 1`).assign(a,!0);return;case"null":n.elseIf((0,W._)`${s} === "" || ${s} === 0 || ${s} === false`),n.assign(a,null);return;case"array":n.elseIf((0,W._)`${o} === "string" || ${o} === "number"
134
+ || ${o} === "boolean" || ${s} === null`).assign(a,(0,W._)`[${s}]`)}}}function Yp({gen:t,parentData:e,parentDataProperty:r},n){t.if((0,W._)`${e} !== undefined`,()=>t.assign((0,W._)`${e}[${r}]`,n))}function ei(t,e,r,n=zt.Correct){const s=n===zt.Correct?W.operators.EQ:W.operators.NEQ;let i;switch(t){case"null":return(0,W._)`${e} ${s} null`;case"array":i=(0,W._)`Array.isArray(${e})`;break;case"object":i=(0,W._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":i=o((0,W._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":i=o();break;default:return(0,W._)`typeof ${e} ${s} ${t}`}return n===zt.Correct?i:(0,W.not)(i);function o(a=W.nil){return(0,W.and)((0,W._)`typeof ${e} == "number"`,a,r?(0,W._)`isFinite(${e})`:W.nil)}}de.checkDataType=ei;function Li(t,e,r,n){if(t.length===1)return ei(t[0],e,r,n);let s;const i=(0,yf.toHash)(t);if(i.array&&i.object){const o=(0,W._)`typeof ${e} != "object"`;s=i.null?o:(0,W._)`!${e} || ${o}`,delete i.null,delete i.array,delete i.object}else s=W.nil;i.number&&delete i.integer;for(const o in i)s=(0,W.and)(s,ei(o,e,r,n));return s}de.checkDataTypes=Li;const Xp={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,W._)`{type: ${t}}`:(0,W._)`{type: ${e}}`};function Fi(t){const e=Zp(t);(0,Bp.reportError)(e,Xp)}de.reportTypeError=Fi;function Zp(t){const{gen:e,data:r,schema:n}=t,s=(0,yf.schemaRefOrVal)(t,n,"type");return{gen:e,keyword:"type",data:r,schema:n.type,schemaCode:s,schemaValue:s,parentSchema:n,params:{},it:t}}var Qn={};Object.defineProperty(Qn,"__esModule",{value:!0});Qn.assignDefaults=void 0;const xt=B,Qp=T;function em(t,e){const{properties:r,items:n}=t.schema;if(e==="object"&&r)for(const s in r)ya(t,s,r[s].default);else e==="array"&&Array.isArray(n)&&n.forEach((s,i)=>ya(t,i,s.default))}Qn.assignDefaults=em;function ya(t,e,r){const{gen:n,compositeRule:s,data:i,opts:o}=t;if(r===void 0)return;const a=(0,xt._)`${i}${(0,xt.getProperty)(e)}`;if(s){(0,Qp.checkStrictMode)(t,`default is ignored for: ${a}`);return}let f=(0,xt._)`${a} === undefined`;o.useDefaults==="empty"&&(f=(0,xt._)`${f} || ${a} === null || ${a} === ""`),n.if(f,(0,xt._)`${a} = ${(0,xt.stringify)(r)}`)}var ze={},Y={};Object.defineProperty(Y,"__esModule",{value:!0});Y.validateUnion=Y.validateArray=Y.usePattern=Y.callValidateCode=Y.schemaProperties=Y.allSchemaProperties=Y.noPropertyInData=Y.propertyInData=Y.isOwnProperty=Y.hasPropFunc=Y.reportMissingProp=Y.checkMissingProp=Y.checkReportMissingProp=void 0;const se=B,Vi=T,Qe=je,tm=T;function rm(t,e){const{gen:r,data:n,it:s}=t;r.if(zi(r,n,e,s.opts.ownProperties),()=>{t.setParams({missingProperty:(0,se._)`${e}`},!0),t.error()})}Y.checkReportMissingProp=rm;function nm({gen:t,data:e,it:{opts:r}},n,s){return(0,se.or)(...n.map(i=>(0,se.and)(zi(t,e,i,r.ownProperties),(0,se._)`${s} = ${i}`)))}Y.checkMissingProp=nm;function sm(t,e){t.setParams({missingProperty:e},!0),t.error()}Y.reportMissingProp=sm;function bf(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,se._)`Object.prototype.hasOwnProperty`})}Y.hasPropFunc=bf;function Ui(t,e,r){return(0,se._)`${bf(t)}.call(${e}, ${r})`}Y.isOwnProperty=Ui;function im(t,e,r,n){const s=(0,se._)`${e}${(0,se.getProperty)(r)} !== undefined`;return n?(0,se._)`${s} && ${Ui(t,e,r)}`:s}Y.propertyInData=im;function zi(t,e,r,n){const s=(0,se._)`${e}${(0,se.getProperty)(r)} === undefined`;return n?(0,se.or)(s,(0,se.not)(Ui(t,e,r))):s}Y.noPropertyInData=zi;function vf(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}Y.allSchemaProperties=vf;function om(t,e){return vf(e).filter(r=>!(0,Vi.alwaysValidSchema)(t,e[r]))}Y.schemaProperties=om;function am({schemaCode:t,data:e,it:{gen:r,topSchemaRef:n,schemaPath:s,errorPath:i},it:o},a,f,c){const u=c?(0,se._)`${t}, ${e}, ${n}${s}`:e,l=[[Qe.default.instancePath,(0,se.strConcat)(Qe.default.instancePath,i)],[Qe.default.parentData,o.parentData],[Qe.default.parentDataProperty,o.parentDataProperty],[Qe.default.rootData,Qe.default.rootData]];o.opts.dynamicRef&&l.push([Qe.default.dynamicAnchors,Qe.default.dynamicAnchors]);const d=(0,se._)`${u}, ${r.object(...l)}`;return f!==se.nil?(0,se._)`${a}.call(${f}, ${d})`:(0,se._)`${a}(${d})`}Y.callValidateCode=am;const cm=(0,se._)`new RegExp`;function fm({gen:t,it:{opts:e}},r){const n=e.unicodeRegExp?"u":"",{regExp:s}=e.code,i=s(r,n);return t.scopeValue("pattern",{key:i.toString(),ref:i,code:(0,se._)`${s.code==="new RegExp"?cm:(0,tm.useFunc)(t,s)}(${r}, ${n})`})}Y.usePattern=fm;function lm(t){const{gen:e,data:r,keyword:n,it:s}=t,i=e.name("valid");if(s.allErrors){const a=e.let("valid",!0);return o(()=>e.assign(a,!1)),a}return e.var(i,!0),o(()=>e.break()),i;function o(a){const f=e.const("len",(0,se._)`${r}.length`);e.forRange("i",0,f,c=>{t.subschema({keyword:n,dataProp:c,dataPropType:Vi.Type.Num},i),e.if((0,se.not)(i),a)})}}Y.validateArray=lm;function um(t){const{gen:e,schema:r,keyword:n,it:s}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(f=>(0,Vi.alwaysValidSchema)(s,f))&&!s.opts.unevaluated)return;const o=e.let("valid",!1),a=e.name("_valid");e.block(()=>r.forEach((f,c)=>{const u=t.subschema({keyword:n,schemaProp:c,compositeRule:!0},a);e.assign(o,(0,se._)`${o} || ${a}`),t.mergeValidEvaluated(u,a)||e.if((0,se.not)(o))})),t.result(o,()=>t.reset(),()=>t.error(!0))}Y.validateUnion=um;Object.defineProperty(ze,"__esModule",{value:!0});ze.validateKeywordUsage=ze.validSchemaType=ze.funcKeywordCode=ze.macroKeywordCode=void 0;const ve=B,ut=je,dm=Y,pm=Br;function mm(t,e){const{gen:r,keyword:n,schema:s,parentSchema:i,it:o}=t,a=e.macro.call(o.self,s,i,o),f=wf(r,n,a);o.opts.validateSchema!==!1&&o.self.validateSchema(a,!0);const c=r.name("valid");t.subschema({schema:a,schemaPath:ve.nil,errSchemaPath:`${o.errSchemaPath}/${n}`,topSchemaRef:f,compositeRule:!0},c),t.pass(c,()=>t.error(!0))}ze.macroKeywordCode=mm;function hm(t,e){var r;const{gen:n,keyword:s,schema:i,parentSchema:o,$data:a,it:f}=t;gm(f,e);const c=!a&&e.compile?e.compile.call(f.self,i,o,f):e.validate,u=wf(n,s,c),l=n.let("valid");t.block$data(l,d),t.ok((r=e.valid)!==null&&r!==void 0?r:l);function d(){if(e.errors===!1)y(),e.modifying&&ga(t),m(()=>t.error());else{const $=e.async?p():h();e.modifying&&ga(t),m(()=>ym(t,$))}}function p(){const $=n.let("ruleErrs",null);return n.try(()=>y((0,ve._)`await `),b=>n.assign(l,!1).if((0,ve._)`${b} instanceof ${f.ValidationError}`,()=>n.assign($,(0,ve._)`${b}.errors`),()=>n.throw(b))),$}function h(){const $=(0,ve._)`${u}.errors`;return n.assign($,null),y(ve.nil),$}function y($=e.async?(0,ve._)`await `:ve.nil){const b=f.opts.passContext?ut.default.this:ut.default.self,w=!("compile"in e&&!a||e.schema===!1);n.assign(l,(0,ve._)`${$}${(0,dm.callValidateCode)(t,u,b,w)}`,e.modifying)}function m($){var b;n.if((0,ve.not)((b=e.valid)!==null&&b!==void 0?b:l),$)}}ze.funcKeywordCode=hm;function ga(t){const{gen:e,data:r,it:n}=t;e.if(n.parentData,()=>e.assign(r,(0,ve._)`${n.parentData}[${n.parentDataProperty}]`))}function ym(t,e){const{gen:r}=t;r.if((0,ve._)`Array.isArray(${e})`,()=>{r.assign(ut.default.vErrors,(0,ve._)`${ut.default.vErrors} === null ? ${e} : ${ut.default.vErrors}.concat(${e})`).assign(ut.default.errors,(0,ve._)`${ut.default.vErrors}.length`),(0,pm.extendErrors)(t)},()=>t.error())}function gm({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function wf(t,e,r){if(r===void 0)throw new Error(`keyword "${e}" failed to compile`);return t.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,ve.stringify)(r)})}function $m(t,e,r=!1){return!e.length||e.some(n=>n==="array"?Array.isArray(t):n==="object"?t&&typeof t=="object"&&!Array.isArray(t):typeof t==n||r&&typeof t>"u")}ze.validSchemaType=$m;function bm({schema:t,opts:e,self:r,errSchemaPath:n},s,i){if(Array.isArray(s.keyword)?!s.keyword.includes(i):s.keyword!==i)throw new Error("ajv implementation error");const o=s.dependencies;if(o!=null&&o.some(a=>!Object.prototype.hasOwnProperty.call(t,a)))throw new Error(`parent schema must have dependencies of ${i}: ${o.join(",")}`);if(s.validateSchema&&!s.validateSchema(t[i])){const f=`keyword "${i}" value is invalid at path "${n}": `+r.errorsText(s.validateSchema.errors);if(e.validateSchema==="log")r.logger.error(f);else throw new Error(f)}}ze.validateKeywordUsage=bm;var at={};Object.defineProperty(at,"__esModule",{value:!0});at.extendSubschemaMode=at.extendSubschemaData=at.getSubschema=void 0;const Ue=B,_f=T;function vm(t,{keyword:e,schemaProp:r,schema:n,schemaPath:s,errSchemaPath:i,topSchemaRef:o}){if(e!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){const a=t.schema[e];return r===void 0?{schema:a,schemaPath:(0,Ue._)`${t.schemaPath}${(0,Ue.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:a[r],schemaPath:(0,Ue._)`${t.schemaPath}${(0,Ue.getProperty)(e)}${(0,Ue.getProperty)(r)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,_f.escapeFragment)(r)}`}}if(n!==void 0){if(s===void 0||i===void 0||o===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:s,topSchemaRef:o,errSchemaPath:i}}throw new Error('either "keyword" or "schema" must be passed')}at.getSubschema=vm;function wm(t,e,{dataProp:r,dataPropType:n,data:s,dataTypes:i,propertyName:o}){if(s!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:a}=e;if(r!==void 0){const{errorPath:c,dataPathArr:u,opts:l}=e,d=a.let("data",(0,Ue._)`${e.data}${(0,Ue.getProperty)(r)}`,!0);f(d),t.errorPath=(0,Ue.str)`${c}${(0,_f.getErrorPath)(r,n,l.jsPropertySyntax)}`,t.parentDataProperty=(0,Ue._)`${r}`,t.dataPathArr=[...u,t.parentDataProperty]}if(s!==void 0){const c=s instanceof Ue.Name?s:a.let("data",s,!0);f(c),o!==void 0&&(t.propertyName=o)}i&&(t.dataTypes=i);function f(c){t.data=c,t.dataLevel=e.dataLevel+1,t.dataTypes=[],e.definedProperties=new Set,t.parentData=e.data,t.dataNames=[...e.dataNames,c]}}at.extendSubschemaData=wm;function _m(t,{jtdDiscriminator:e,jtdMetadata:r,compositeRule:n,createErrors:s,allErrors:i}){n!==void 0&&(t.compositeRule=n),s!==void 0&&(t.createErrors=s),i!==void 0&&(t.allErrors=i),t.jtdDiscriminator=e,t.jtdMetadata=r}at.extendSubschemaMode=_m;var ye={},Pf=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,s,i;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(s=n;s--!==0;)if(!t(e[s],r[s]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(r).length)return!1;for(s=n;s--!==0;)if(!Object.prototype.hasOwnProperty.call(r,i[s]))return!1;for(s=n;s--!==0;){var o=i[s];if(!t(e[o],r[o]))return!1}return!0}return e!==e&&r!==r},Ef={exports:{}},it=Ef.exports=function(t,e,r){typeof e=="function"&&(r=e,e={}),r=e.cb||r;var n=typeof r=="function"?r:r.pre||function(){},s=r.post||function(){};En(e,n,s,t,"",t)};it.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};it.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};it.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};it.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function En(t,e,r,n,s,i,o,a,f,c){if(n&&typeof n=="object"&&!Array.isArray(n)){e(n,s,i,o,a,f,c);for(var u in n){var l=n[u];if(Array.isArray(l)){if(u in it.arrayKeywords)for(var d=0;d<l.length;d++)En(t,e,r,l[d],s+"/"+u+"/"+d,i,s,u,n,d)}else if(u in it.propsKeywords){if(l&&typeof l=="object")for(var p in l)En(t,e,r,l[p],s+"/"+u+"/"+Pm(p),i,s,u,n,p)}else(u in it.keywords||t.allKeys&&!(u in it.skipKeywords))&&En(t,e,r,l,s+"/"+u,i,s,u,n)}r(n,s,i,o,a,f,c)}}function Pm(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}var Em=Ef.exports;Object.defineProperty(ye,"__esModule",{value:!0});ye.getSchemaRefs=ye.resolveUrl=ye.normalizeId=ye._getFullPath=ye.getFullPath=ye.inlineRef=void 0;const Sm=T,jm=Pf,Om=Em,km=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function Im(t,e=!0){return typeof t=="boolean"?!0:e===!0?!ti(t):e?Sf(t)<=e:!1}ye.inlineRef=Im;const Am=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function ti(t){for(const e in t){if(Am.has(e))return!0;const r=t[e];if(Array.isArray(r)&&r.some(ti)||typeof r=="object"&&ti(r))return!0}return!1}function Sf(t){let e=0;for(const r in t){if(r==="$ref")return 1/0;if(e++,!km.has(r)&&(typeof t[r]=="object"&&(0,Sm.eachItem)(t[r],n=>e+=Sf(n)),e===1/0))return 1/0}return e}function jf(t,e="",r){r!==!1&&(e=Kt(e));const n=t.parse(e);return Of(t,n)}ye.getFullPath=jf;function Of(t,e){return t.serialize(e).split("#")[0]+"#"}ye._getFullPath=Of;const Nm=/#\/?$/;function Kt(t){return t?t.replace(Nm,""):""}ye.normalizeId=Kt;function Tm(t,e,r){return r=Kt(r),t.resolve(e,r)}ye.resolveUrl=Tm;const xm=/^[a-z_][-a-z0-9._]*$/i;function Rm(t,e){if(typeof t=="boolean")return{};const{schemaId:r,uriResolver:n}=this.opts,s=Kt(t[r]||e),i={"":s},o=jf(n,s,!1),a={},f=new Set;return Om(t,{allKeys:!0},(l,d,p,h)=>{if(h===void 0)return;const y=o+d;let m=i[h];typeof l[r]=="string"&&(m=$.call(this,l[r])),b.call(this,l.$anchor),b.call(this,l.$dynamicAnchor),i[d]=m;function $(w){const E=this.opts.uriResolver.resolve;if(w=Kt(m?E(m,w):w),f.has(w))throw u(w);f.add(w);let O=this.refs[w];return typeof O=="string"&&(O=this.refs[O]),typeof O=="object"?c(l,O.schema,w):w!==Kt(y)&&(w[0]==="#"?(c(l,a[w],w),a[w]=l):this.refs[w]=y),w}function b(w){if(typeof w=="string"){if(!xm.test(w))throw new Error(`invalid anchor "${w}"`);$.call(this,`#${w}`)}}}),a;function c(l,d,p){if(d!==void 0&&!jm(l,d))throw u(p)}function u(l){return new Error(`reference "${l}" resolves to more than one schema`)}}ye.getSchemaRefs=Rm;Object.defineProperty(Te,"__esModule",{value:!0});Te.getData=Te.KeywordCxt=Te.validateFunctionCode=void 0;const kf=Jt,$a=de,Ki=Je,Mn=de,Cm=Qn,kr=ze,As=at,D=B,K=je,Mm=ye,We=T,br=Br;function qm(t){if(Nf(t)&&(Tf(t),Af(t))){Fm(t);return}If(t,()=>(0,kf.topBoolOrEmptySchema)(t))}Te.validateFunctionCode=qm;function If({gen:t,validateName:e,schema:r,schemaEnv:n,opts:s},i){s.code.es5?t.func(e,(0,D._)`${K.default.data}, ${K.default.valCxt}`,n.$async,()=>{t.code((0,D._)`"use strict"; ${ba(r,s)}`),Lm(t,s),t.code(i)}):t.func(e,(0,D._)`${K.default.data}, ${Dm(s)}`,n.$async,()=>t.code(ba(r,s)).code(i))}function Dm(t){return(0,D._)`{${K.default.instancePath}="", ${K.default.parentData}, ${K.default.parentDataProperty}, ${K.default.rootData}=${K.default.data}${t.dynamicRef?(0,D._)`, ${K.default.dynamicAnchors}={}`:D.nil}}={}`}function Lm(t,e){t.if(K.default.valCxt,()=>{t.var(K.default.instancePath,(0,D._)`${K.default.valCxt}.${K.default.instancePath}`),t.var(K.default.parentData,(0,D._)`${K.default.valCxt}.${K.default.parentData}`),t.var(K.default.parentDataProperty,(0,D._)`${K.default.valCxt}.${K.default.parentDataProperty}`),t.var(K.default.rootData,(0,D._)`${K.default.valCxt}.${K.default.rootData}`),e.dynamicRef&&t.var(K.default.dynamicAnchors,(0,D._)`${K.default.valCxt}.${K.default.dynamicAnchors}`)},()=>{t.var(K.default.instancePath,(0,D._)`""`),t.var(K.default.parentData,(0,D._)`undefined`),t.var(K.default.parentDataProperty,(0,D._)`undefined`),t.var(K.default.rootData,K.default.data),e.dynamicRef&&t.var(K.default.dynamicAnchors,(0,D._)`{}`)})}function Fm(t){const{schema:e,opts:r,gen:n}=t;If(t,()=>{r.$comment&&e.$comment&&Rf(t),Bm(t),n.let(K.default.vErrors,null),n.let(K.default.errors,0),r.unevaluated&&Vm(t),xf(t),Jm(t)})}function Vm(t){const{gen:e,validateName:r}=t;t.evaluated=e.const("evaluated",(0,D._)`${r}.evaluated`),e.if((0,D._)`${t.evaluated}.dynamicProps`,()=>e.assign((0,D._)`${t.evaluated}.props`,(0,D._)`undefined`)),e.if((0,D._)`${t.evaluated}.dynamicItems`,()=>e.assign((0,D._)`${t.evaluated}.items`,(0,D._)`undefined`))}function ba(t,e){const r=typeof t=="object"&&t[e.schemaId];return r&&(e.code.source||e.code.process)?(0,D._)`/*# sourceURL=${r} */`:D.nil}function Um(t,e){if(Nf(t)&&(Tf(t),Af(t))){zm(t,e);return}(0,kf.boolOrEmptySchema)(t,e)}function Af({schema:t,self:e}){if(typeof t=="boolean")return!t;for(const r in t)if(e.RULES.all[r])return!0;return!1}function Nf(t){return typeof t.schema!="boolean"}function zm(t,e){const{schema:r,gen:n,opts:s}=t;s.$comment&&r.$comment&&Rf(t),Hm(t),Gm(t);const i=n.const("_errs",K.default.errors);xf(t,i),n.var(e,(0,D._)`${i} === ${K.default.errors}`)}function Tf(t){(0,We.checkUnknownRules)(t),Km(t)}function xf(t,e){if(t.opts.jtd)return va(t,[],!1,e);const r=(0,$a.getSchemaTypes)(t.schema),n=(0,$a.coerceAndCheckDataType)(t,r);va(t,r,!n,e)}function Km(t){const{schema:e,errSchemaPath:r,opts:n,self:s}=t;e.$ref&&n.ignoreKeywordsWithRef&&(0,We.schemaHasRulesButRef)(e,s.RULES)&&s.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function Bm(t){const{schema:e,opts:r}=t;e.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,We.checkStrictMode)(t,"default is ignored in the schema root")}function Hm(t){const e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,Mm.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function Gm(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function Rf({gen:t,schemaEnv:e,schema:r,errSchemaPath:n,opts:s}){const i=r.$comment;if(s.$comment===!0)t.code((0,D._)`${K.default.self}.logger.log(${i})`);else if(typeof s.$comment=="function"){const o=(0,D.str)`${n}/$comment`,a=t.scopeValue("root",{ref:e.root});t.code((0,D._)`${K.default.self}.opts.$comment(${i}, ${o}, ${a}.schema)`)}}function Jm(t){const{gen:e,schemaEnv:r,validateName:n,ValidationError:s,opts:i}=t;r.$async?e.if((0,D._)`${K.default.errors} === 0`,()=>e.return(K.default.data),()=>e.throw((0,D._)`new ${s}(${K.default.vErrors})`)):(e.assign((0,D._)`${n}.errors`,K.default.vErrors),i.unevaluated&&Wm(t),e.return((0,D._)`${K.default.errors} === 0`))}function Wm({gen:t,evaluated:e,props:r,items:n}){r instanceof D.Name&&t.assign((0,D._)`${e}.props`,r),n instanceof D.Name&&t.assign((0,D._)`${e}.items`,n)}function va(t,e,r,n){const{gen:s,schema:i,data:o,allErrors:a,opts:f,self:c}=t,{RULES:u}=c;if(i.$ref&&(f.ignoreKeywordsWithRef||!(0,We.schemaHasRulesButRef)(i,u))){s.block(()=>qf(t,"$ref",u.all.$ref.definition));return}f.jtd||Ym(t,e),s.block(()=>{for(const d of u.rules)l(d);l(u.post)});function l(d){(0,Ki.shouldUseGroup)(i,d)&&(d.type?(s.if((0,Mn.checkDataType)(d.type,o,f.strictNumbers)),wa(t,d),e.length===1&&e[0]===d.type&&r&&(s.else(),(0,Mn.reportTypeError)(t)),s.endIf()):wa(t,d),a||s.if((0,D._)`${K.default.errors} === ${n||0}`))}}function wa(t,e){const{gen:r,schema:n,opts:{useDefaults:s}}=t;s&&(0,Cm.assignDefaults)(t,e.type),r.block(()=>{for(const i of e.rules)(0,Ki.shouldUseRule)(n,i)&&qf(t,i.keyword,i.definition,e.type)})}function Ym(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(Xm(t,e),t.opts.allowUnionTypes||Zm(t,e),Qm(t,t.dataTypes))}function Xm(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(r=>{Cf(t.dataTypes,r)||Bi(t,`type "${r}" not allowed by context "${t.dataTypes.join(",")}"`)}),th(t,e)}}function Zm(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&Bi(t,"use allowUnionTypes to allow union type keyword")}function Qm(t,e){const r=t.self.RULES.all;for(const n in r){const s=r[n];if(typeof s=="object"&&(0,Ki.shouldUseRule)(t.schema,s)){const{type:i}=s.definition;i.length&&!i.some(o=>eh(e,o))&&Bi(t,`missing type "${i.join(",")}" for keyword "${n}"`)}}}function eh(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function Cf(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function th(t,e){const r=[];for(const n of t.dataTypes)Cf(e,n)?r.push(n):e.includes("integer")&&n==="number"&&r.push("integer");t.dataTypes=r}function Bi(t,e){const r=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${r}" (strictTypes)`,(0,We.checkStrictMode)(t,e,t.opts.strictTypes)}class Mf{constructor(e,r,n){if((0,kr.validateKeywordUsage)(e,r,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=r.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,We.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=r,this.$data)this.schemaCode=e.gen.const("vSchema",Df(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,kr.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=e.gen.const("_errs",K.default.errors))}result(e,r,n){this.failResult((0,D.not)(e),r,n)}failResult(e,r,n){this.gen.if(e),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,r){this.failResult((0,D.not)(e),void 0,r)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:r}=this;this.fail((0,D._)`${r} !== undefined && (${(0,D.or)(this.invalid$data(),e)})`)}error(e,r,n){if(r){this.setParams(r),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,r){(e?br.reportExtraError:br.reportError)(this,this.def.error,r)}$dataError(){(0,br.reportError)(this,this.def.$dataError||br.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,br.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,r){r?Object.assign(this.params,e):this.params=e}block$data(e,r,n=D.nil){this.gen.block(()=>{this.check$data(e,n),r()})}check$data(e=D.nil,r=D.nil){if(!this.$data)return;const{gen:n,schemaCode:s,schemaType:i,def:o}=this;n.if((0,D.or)((0,D._)`${s} === undefined`,r)),e!==D.nil&&n.assign(e,!0),(i.length||o.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==D.nil&&n.assign(e,!1)),n.else()}invalid$data(){const{gen:e,schemaCode:r,schemaType:n,def:s,it:i}=this;return(0,D.or)(o(),a());function o(){if(n.length){if(!(r instanceof D.Name))throw new Error("ajv implementation error");const f=Array.isArray(n)?n:[n];return(0,D._)`${(0,Mn.checkDataTypes)(f,r,i.opts.strictNumbers,Mn.DataType.Wrong)}`}return D.nil}function a(){if(s.validateSchema){const f=e.scopeValue("validate$data",{ref:s.validateSchema});return(0,D._)`!${f}(${r})`}return D.nil}}subschema(e,r){const n=(0,As.getSubschema)(this.it,e);(0,As.extendSubschemaData)(n,this.it,e),(0,As.extendSubschemaMode)(n,e);const s={...this.it,...n,items:void 0,props:void 0};return Um(s,r),s}mergeEvaluated(e,r){const{it:n,gen:s}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=We.mergeEvaluated.props(s,e.props,n.props,r)),n.items!==!0&&e.items!==void 0&&(n.items=We.mergeEvaluated.items(s,e.items,n.items,r)))}mergeValidEvaluated(e,r){const{it:n,gen:s}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return s.if(r,()=>this.mergeEvaluated(e,D.Name)),!0}}Te.KeywordCxt=Mf;function qf(t,e,r,n){const s=new Mf(t,r,e);"code"in r?r.code(s,n):s.$data&&r.validate?(0,kr.funcKeywordCode)(s,r):"macro"in r?(0,kr.macroKeywordCode)(s,r):(r.compile||r.validate)&&(0,kr.funcKeywordCode)(s,r)}const rh=/^\/(?:[^~]|~0|~1)*$/,nh=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Df(t,{dataLevel:e,dataNames:r,dataPathArr:n}){let s,i;if(t==="")return K.default.rootData;if(t[0]==="/"){if(!rh.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);s=t,i=K.default.rootData}else{const c=nh.exec(t);if(!c)throw new Error(`Invalid JSON-pointer: ${t}`);const u=+c[1];if(s=c[2],s==="#"){if(u>=e)throw new Error(f("property/index",u));return n[e-u]}if(u>e)throw new Error(f("data",u));if(i=r[e-u],!s)return i}let o=i;const a=s.split("/");for(const c of a)c&&(i=(0,D._)`${i}${(0,D.getProperty)((0,We.unescapeJsonPointer)(c))}`,o=(0,D._)`${o} && ${i}`);return o;function f(c,u){return`Cannot access ${c} ${u} levels up, current level is ${e}`}}Te.getData=Df;var tr={};Object.defineProperty(tr,"__esModule",{value:!0});class sh extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}tr.default=sh;var St={};Object.defineProperty(St,"__esModule",{value:!0});const Ns=ye;class ih extends Error{constructor(e,r,n,s){super(s||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,Ns.resolveUrl)(e,r,n),this.missingSchema=(0,Ns.normalizeId)((0,Ns.getFullPath)(e,this.missingRef))}}St.default=ih;var _e={};Object.defineProperty(_e,"__esModule",{value:!0});_e.resolveSchema=_e.getCompilingSchema=_e.resolveRef=_e.compileSchema=_e.SchemaEnv=void 0;const Me=B,oh=tr,ft=je,De=ye,_a=T,ah=Te;class es{constructor(e){var r;this.refs={},this.dynamicAnchors={};let n;typeof e.schema=="object"&&(n=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(r=e.baseId)!==null&&r!==void 0?r:(0,De.normalizeId)(n==null?void 0:n[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=n==null?void 0:n.$async,this.refs={}}}_e.SchemaEnv=es;function Hi(t){const e=Lf.call(this,t);if(e)return e;const r=(0,De.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:n,lines:s}=this.opts.code,{ownProperties:i}=this.opts,o=new Me.CodeGen(this.scope,{es5:n,lines:s,ownProperties:i});let a;t.$async&&(a=o.scopeValue("Error",{ref:oh.default,code:(0,Me._)`require("ajv/dist/runtime/validation_error").default`}));const f=o.scopeName("validate");t.validateName=f;const c={gen:o,allErrors:this.opts.allErrors,data:ft.default.data,parentData:ft.default.parentData,parentDataProperty:ft.default.parentDataProperty,dataNames:[ft.default.data],dataPathArr:[Me.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:o.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,Me.stringify)(t.schema)}:{ref:t.schema}),validateName:f,ValidationError:a,schema:t.schema,schemaEnv:t,rootId:r,baseId:t.baseId||r,schemaPath:Me.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Me._)`""`,opts:this.opts,self:this};let u;try{this._compilations.add(t),(0,ah.validateFunctionCode)(c),o.optimize(this.opts.code.optimize);const l=o.toString();u=`${o.scopeRefs(ft.default.scope)}return ${l}`,this.opts.code.process&&(u=this.opts.code.process(u,t));const p=new Function(`${ft.default.self}`,`${ft.default.scope}`,u)(this,this.scope.get());if(this.scope.value(f,{ref:p}),p.errors=null,p.schema=t.schema,p.schemaEnv=t,t.$async&&(p.$async=!0),this.opts.code.source===!0&&(p.source={validateName:f,validateCode:l,scopeValues:o._values}),this.opts.unevaluated){const{props:h,items:y}=c;p.evaluated={props:h instanceof Me.Name?void 0:h,items:y instanceof Me.Name?void 0:y,dynamicProps:h instanceof Me.Name,dynamicItems:y instanceof Me.Name},p.source&&(p.source.evaluated=(0,Me.stringify)(p.evaluated))}return t.validate=p,t}catch(l){throw delete t.validate,delete t.validateName,u&&this.logger.error("Error compiling schema, function code:",u),l}finally{this._compilations.delete(t)}}_e.compileSchema=Hi;function ch(t,e,r){var n;r=(0,De.resolveUrl)(this.opts.uriResolver,e,r);const s=t.refs[r];if(s)return s;let i=uh.call(this,t,r);if(i===void 0){const o=(n=t.localRefs)===null||n===void 0?void 0:n[r],{schemaId:a}=this.opts;o&&(i=new es({schema:o,schemaId:a,root:t,baseId:e}))}if(i!==void 0)return t.refs[r]=fh.call(this,i)}_e.resolveRef=ch;function fh(t){return(0,De.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:Hi.call(this,t)}function Lf(t){for(const e of this._compilations)if(lh(e,t))return e}_e.getCompilingSchema=Lf;function lh(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function uh(t,e){let r;for(;typeof(r=this.refs[e])=="string";)e=r;return r||this.schemas[e]||ts.call(this,t,e)}function ts(t,e){const r=this.opts.uriResolver.parse(e),n=(0,De._getFullPath)(this.opts.uriResolver,r);let s=(0,De.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&n===s)return Ts.call(this,r,t);const i=(0,De.normalizeId)(n),o=this.refs[i]||this.schemas[i];if(typeof o=="string"){const a=ts.call(this,t,o);return typeof(a==null?void 0:a.schema)!="object"?void 0:Ts.call(this,r,a)}if(typeof(o==null?void 0:o.schema)=="object"){if(o.validate||Hi.call(this,o),i===(0,De.normalizeId)(e)){const{schema:a}=o,{schemaId:f}=this.opts,c=a[f];return c&&(s=(0,De.resolveUrl)(this.opts.uriResolver,s,c)),new es({schema:a,schemaId:f,root:t,baseId:s})}return Ts.call(this,r,o)}}_e.resolveSchema=ts;const dh=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Ts(t,{baseId:e,schema:r,root:n}){var s;if(((s=t.fragment)===null||s===void 0?void 0:s[0])!=="/")return;for(const a of t.fragment.slice(1).split("/")){if(typeof r=="boolean")return;const f=r[(0,_a.unescapeFragment)(a)];if(f===void 0)return;r=f;const c=typeof r=="object"&&r[this.opts.schemaId];!dh.has(a)&&c&&(e=(0,De.resolveUrl)(this.opts.uriResolver,e,c))}let i;if(typeof r!="boolean"&&r.$ref&&!(0,_a.schemaHasRulesButRef)(r,this.RULES)){const a=(0,De.resolveUrl)(this.opts.uriResolver,e,r.$ref);i=ts.call(this,n,a)}const{schemaId:o}=this.opts;if(i=i||new es({schema:r,schemaId:o,root:n,baseId:e}),i.schema!==i.root.schema)return i}const ph="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",mh="Meta-schema for $data reference (JSON AnySchema extension proposal)",hh="object",yh=["$data"],gh={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},$h=!1,bh={$id:ph,description:mh,type:hh,required:yh,properties:gh,additionalProperties:$h};var Gi={},rs={exports:{}};const vh=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),Ji=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),wh=RegExp.prototype.test.bind(/^\d*$/u),rr=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),Wi=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),Ff=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/]$/u),Yi=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/?]$/u),_h=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:]$/u),Se=new Array(256);{const t="0123456789ABCDEF";for(let e=0;e<256;e++)Se[e]="%"+t[e>>4]+t[e&15]}function be(t){return t<2048?Se[192|t>>6]+Se[128|t&63]:t<65536?Se[224|t>>12]+Se[128|t>>6&63]+Se[128|t&63]:Se[240|t>>18]+Se[128|t>>12&63]+Se[128|t>>6&63]+Se[128|t&63]}const Ph=RegExp.prototype.test.bind(/^[\dA-Fa-f]{1,4}$/),Eh=RegExp.prototype.test.bind(/^[vV][\dA-Fa-f]+\.[A-Za-z\d\-._~!$&'()*+,;=:]+$/),Sh=RegExp.prototype.test.bind(/^[A-Za-z\d\-._~]$/),jh=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function Oh(t){if(t.length===0)return!1;for(let e=0;e<t.length;e++)if(!Sh(t[e])){if(t[e]==="%"&&e+2<t.length&&rr(t.slice(e+1,e+3))){e+=2;continue}return!1}return!0}function Pa(t){let e=-1,r=0,n=-1,s=0;for(let a=0;a<t.length;a++)t[a]==="0"?(n===-1&&(n=a),s++,s>r&&(r=s,e=n)):(n=-1,s=0);if(r<2)return t.join(":");const i=t.slice(0,e).join(":"),o=t.slice(e+r).join(":");return i+"::"+o}function kh(t){const e=t.indexOf("::");if(e!==-1&&t.indexOf("::",e+1)!==-1)return;const r=e===-1?t.split(":"):t.slice(0,e).split(":"),n=e===-1?[]:t.slice(e+2).split(":");e!==-1&&(r.length===1&&r[0]===""&&(r.length=0),n.length===1&&n[0]===""&&(n.length=0));const s=r.concat(n);let i=0;for(let a=0;a<s.length;a++){const f=s[a];if(f==="")return;if(f.indexOf(".")!==-1){if(a!==s.length-1||e!==-1&&n.length===0||!Ji(f))return;i+=2;continue}if(!Ph(f))return;s[a]=parseInt(f,16).toString(16),i++}if(e===-1)return i!==8?void 0:Pa(s);if(i>=8)return;const o=s.slice(0,r.length);for(let a=i;a<8;a++)o.push("0");for(let a=r.length;a<s.length;a++)o.push(s[a]);return Pa(o)}function ri(t){const e=t[0]==="["&&t[t.length-1]==="]";if((t[0]==="["||t[t.length-1]==="]")&&!e)return{host:t,isIPV6:!1,error:!0};let n=e?t.slice(1,-1):t;if(e&&Eh(n))return n=n.toLowerCase(),{host:`[${n}]`,escapedHost:n,isIPV6:!1,isIPVFuture:!0};if(Ih(n,":")<2)return{host:t,isIPV6:!1,error:e};let s="";const i=n.indexOf("%");if(i!==-1){const a=n.slice(i,i+3).toLowerCase()==="%25"?3:1;if(s=n.slice(i+a),!Oh(s))return{host:t,isIPV6:!1,error:!0};n=n.slice(0,i)}const o=kh(n);return o===void 0?{host:t,isIPV6:!1,error:!0}:{host:o+(s?"%"+s:""),escapedHost:o+(s?"%25"+s:""),isIPV6:!0}}function Ih(t,e){let r=0;for(let n=0;n<t.length;n++)t[n]===e&&r++;return r}function Ah(t){let e=t;const r=[];let n=-1,s=0;for(;s=e.length;){if(s===1){if(e===".")break;if(e==="/"){r.push("/");break}else{r.push(e);break}}else if(s===2){if(e[0]==="."){if(e[1]===".")break;if(e[1]==="/"){e=e.slice(2);continue}}else if(e[0]==="/"&&(e[1]==="."||e[1]==="/")){r.push("/");break}}else if(s===3&&e==="/.."){r.length!==0&&r.pop(),r.push("/");break}if(e[0]==="."){if(e[1]==="."){if(e[2]==="/"){e=e.slice(3);continue}}else if(e[1]==="/"){e=e.slice(2);continue}}else if(e[0]==="/"&&e[1]==="."){if(e[2]==="/"){e=e.slice(2);continue}else if(e[2]==="."&&e[3]==="/"){e=e.slice(3),r.length!==0&&r.pop();continue}}if((n=e.indexOf("/",1))===-1){r.push(e);break}else r.push(e.slice(0,n)),e=e.slice(n)}return r.join("")}const Nh={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},Th=/[@/?#:]/g,xh=/[@/?#]/g;function Vf(t,e){const r=e?xh:Th;return r.lastIndex=0,t.replace(r,n=>Nh[n])}function Uf(t,e=!1){if(t.indexOf("%")===-1)return t;let r="";for(let n=0;n<t.length;n++){if(t[n]==="%"&&n+2<t.length){const s=t.slice(n+1,n+3);if(rr(s)){const i=s.toUpperCase(),o=String.fromCharCode(parseInt(i,16));e&&Wi(o)?r+=o:r+="%"+i,n+=2;continue}}r+=t[n]}return r}function Rh(t){let e="";for(let r=0;r<t.length;r++){const n=t[r];if(n==="%"&&r+2<t.length){const s=t.slice(r+1,r+3);if(rr(s)){const i=s.toUpperCase(),o=String.fromCharCode(parseInt(i,16));o!=="."&&Wi(o)?e+=o:e+="%"+i,r+=2;continue}}if(Ff(n))e+=n;else{const s=t.charCodeAt(r);if(s<128)e+=zf(s)?n:Se[s];else if(s<55296||s>57343)e+=be(s);else if(s<=56319&&r+1<t.length){const i=t.charCodeAt(r+1);i>=56320&&i<=57343?(e+=be(65536+(s-55296<<10)+(i-56320)),r++):e+=be(65533)}else e+=be(65533)}}return e}function Ch(t,e=!1){let r="",n=e&&t[0]!=="/";for(let s=0;s<t.length;s++){const i=t[s];if(i==="%"&&s+2<t.length){const o=t.slice(s+1,s+3);if(rr(o)){r+="%"+o.toUpperCase(),s+=2;continue}}if(i==="/"&&(n=!1),Ff(i)&&(i!==":"||!n))r+=i;else{const o=t.charCodeAt(s);if(o<128)r+=Se[o];else if(o<55296||o>57343)r+=be(o);else if(o<=56319&&s+1<t.length){const a=t.charCodeAt(s+1);a>=56320&&a<=57343?(r+=be(65536+(o-55296<<10)+(a-56320)),s++):r+=be(65533)}else r+=be(65533)}}return r}function Xi(t,e){let r="";for(let n=0;n<t.length;n++){const s=t[n];if(s==="%"&&n+2<t.length){const i=t.slice(n+1,n+3);if(rr(i)){r+="%"+i.toUpperCase(),n+=2;continue}}if(e(s))r+=s;else{const i=t.charCodeAt(n);if(i<128)r+=Se[i];else if(i<55296||i>57343)r+=be(i);else if(i<=56319&&n+1<t.length){const o=t.charCodeAt(n+1);o>=56320&&o<=57343?(r+=be(65536+(i-55296<<10)+(o-56320)),n++):r+=be(65533)}else r+=be(65533)}}return r}function Mh(t){return Xi(t,_h)}function qh(t){return Xi(t,Yi)}function Dh(t){return Xi(t,Yi)}function zf(t){return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===42||t===43||t===45||t===46||t===47||t===64||t===95}function Lh(t){let e="";for(let r=0;r<t.length;r++){const n=t[r];if(n==="%"&&r+2<t.length){const s=t.slice(r+1,r+3);if(rr(s)){const i=s.toUpperCase(),o=String.fromCharCode(parseInt(i,16));Wi(o)?e+=o:e+="%"+i,r+=2;continue}}if(Yi(n))e+=n;else{const s=t.charCodeAt(r);if(s<128)e+=zf(s)?n:Se[s];else if(s<55296||s>57343)e+=be(s);else if(s<=56319&&r+1<t.length){const i=t.charCodeAt(r+1);i>=56320&&i<=57343?(e+=be(65536+(s-55296<<10)+(i-56320)),r++):e+=be(65533)}else e+=be(65533)}}return e}function Fh(t){const e=[];if(t.userinfo!==void 0&&(e.push(Mh(t.userinfo)),e.push("@")),t.host!==void 0){let r=t.host;if(!Ji(r)){let n=ri(r);n.isIPV6!==!0&&n.isIPVFuture!==!0&&(r=Uf(r,!0),n=ri(r)),n.isIPV6===!0||n.isIPVFuture===!0?r=`[${n.escapedHost}]`:r=Vf(r,!1)}e.push(r)}if(typeof t.port=="number"||typeof t.port=="string"){const r=String(t.port);if(!wh(r))throw new TypeError("URI port is malformed.");e.push(":"),e.push(r)}return e.length?e.join(""):void 0}var Kf={nonSimpleDomain:jh,recomposeAuthority:Fh,reescapeHostDelimiters:Vf,normalizePercentEncoding:Uf,normalizePathEncoding:Rh,serializePathEncoding:Ch,normalizeQueryFragmentEncoding:Lh,encodeQuery:qh,encodeFragment:Dh,removeDotSegments:Ah,isIPv4:Ji,isUUID:vh,normalizeIPv6:ri};const{isUUID:Vh}=Kf,Uh=/^([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-./:;=@]|%[\da-f]{2})+)$/iu;function Bf(t){return t.secure===!0?!0:t.secure===!1?!1:t.scheme?t.scheme.length===3&&(t.scheme[0]==="w"||t.scheme[0]==="W")&&(t.scheme[1]==="s"||t.scheme[1]==="S")&&(t.scheme[2]==="s"||t.scheme[2]==="S"):!1}function Hf(t){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t}function Gf(t){const e=String(t.scheme).toLowerCase()==="https";return(t.port===(e?443:80)||t.port==="")&&(t.port=void 0),t.path||(t.path="/"),t}function zh(t){return t.secure=Bf(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t}function Kh(t){if((t.port===(Bf(t)?443:80)||t.port==="")&&(t.port=void 0),typeof t.secure=="boolean"&&(t.scheme=t.secure?"wss":"ws",t.secure=void 0),t.resourceName){const e=t.resourceName.indexOf("?"),r=e===-1?t.resourceName:t.resourceName.slice(0,e);t.path=r&&r!=="/"?r:void 0,t.query=e===-1?void 0:t.resourceName.slice(e+1),t.resourceName=void 0}return t.fragment=void 0,t}function Bh(t,e){if(!t.path)return t.error="URN can not be parsed",t;const r=t.path.match(Uh);if(r&&r[0]===t.path){const n=e.scheme||t.scheme||"urn";t.nid=r[1].toLowerCase(),t.nss=r[2];const s=`${n}:${e.nid||t.nid}`,i=Zi(s);t.path=void 0,i&&(t=i.parse(t,e))}else t.error=t.error||"URN can not be parsed.";return t}function Hh(t,e){if(t.nid===void 0)throw new Error("URN without nid cannot be serialized");const r=e.scheme||t.scheme||"urn",n=t.nid.toLowerCase(),s=`${r}:${e.nid||n}`,i=Zi(s);i&&(t=i.serialize(t,e));const o=t,a=t.nss;return o.path=`${n||e.nid}:${a}`,e.skipEscape=!0,o}function Gh(t,e){const r=t;return r.uuid=r.nss,r.nss=void 0,!e.tolerant&&(!r.uuid||!Vh(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function Jh(t){const e=t;return e.nss=(t.uuid||"").toLowerCase(),e}const Jf={scheme:"http",domainHost:!0,parse:Hf,serialize:Gf},Wh={scheme:"https",domainHost:Jf.domainHost,parse:Hf,serialize:Gf},Sn={scheme:"ws",domainHost:!0,parse:zh,serialize:Kh},Yh={scheme:"wss",domainHost:Sn.domainHost,parse:Sn.parse,serialize:Sn.serialize},Xh={scheme:"urn",parse:Bh,serialize:Hh,skipNormalize:!0},Zh={scheme:"urn:uuid",parse:Gh,serialize:Jh,skipNormalize:!0},qn={http:Jf,https:Wh,ws:Sn,wss:Yh,urn:Xh,"urn:uuid":Zh};Object.setPrototypeOf(qn,null);function Zi(t){return t&&(qn[t]||qn[t.toLowerCase()])||void 0}var Qh={SCHEMES:qn,getSchemeHandler:Zi};const{normalizeIPv6:Wf,removeDotSegments:Er,recomposeAuthority:ey,normalizePercentEncoding:ni,normalizePathEncoding:ty,serializePathEncoding:Ea,normalizeQueryFragmentEncoding:Sa,encodeQuery:ry,encodeFragment:ny,reescapeHostDelimiters:sy,isIPv4:Yf,nonSimpleDomain:iy}=Kf,{SCHEMES:Xf,getSchemeHandler:Qi}=Qh,Zf=/^[A-Za-z][A-Za-z0-9+.-]*$/u,Qf="URI scheme is malformed.";function ja(t){const e=unescape(String(t));if(!Zf.test(e))throw new TypeError(Qf);return e}function oy(t,e){return typeof t=="string"?t=my(t,e):typeof t=="object"&&(t=Ln(_t(t,e),e)),t}function ay(t,e,r){const n=r?Object.assign({scheme:"null"},r):{scheme:"null"},{parsed:s,malformedAuthorityOrPort:i,malformedPercentEncoding:o,malformedSchemeSpecific:a,malformedHost:f,malformedScheme:c}=Dn(t,n),{parsed:u,malformedAuthorityOrPort:l,malformedPercentEncoding:d,malformedSchemeSpecific:p,malformedHost:h,malformedScheme:y}=Dn(e,n);if(i||l||o||d||a||p||f||h||c||y)throw new Error(s.error||u.error||"URI is malformed.");const m=el(s,u,n,!0),$=Qi(r&&r.scheme||m.scheme),b=m.host,w=b!==void 0&&b!==""&&(Yf(b)||Wf(b).isIPV6);tl(m,r||{},$,w);const E=b&&b.indexOf("%")!==-1&&!new RegExp("\\P{ASCII}","u").test(b);if(m.error&&!E)throw new Error(m.error);return n.skipEscape=!0,_t(m,n)}function el(t,e,r,n){const s={};return n||(t=Ln(_t(t,r),r),e=Ln(_t(e,r),r)),r=r||{},!r.tolerant&&e.scheme?(s.scheme=e.scheme,s.userinfo=e.userinfo,s.host=e.host,s.port=e.port,s.path=Er(e.path||""),s.query=e.query):(e.userinfo!==void 0||e.host!==void 0||e.port!==void 0?(s.userinfo=e.userinfo,s.host=e.host,s.port=e.port,s.path=Er(e.path||""),s.query=e.query):(e.path?(e.path[0]==="/"?s.path=Er(e.path):((t.userinfo!==void 0||t.host!==void 0||t.port!==void 0)&&!t.path?s.path="/"+e.path:t.path?s.path=t.path.slice(0,t.path.lastIndexOf("/")+1)+e.path:s.path=e.path,s.path=Er(s.path)),s.query=e.query):(s.path=t.path,e.query!==void 0?s.query=e.query:s.query=t.query),s.userinfo=t.userinfo,s.host=t.host,s.port=t.port),s.scheme=t.scheme),s.fragment=e.fragment,s}function cy(t,e,r){const n=Oa(t,r),s=Oa(e,r);return n!==void 0&&s!==void 0&&n===s}function _t(t,e){const r={host:t.host,scheme:t.scheme,userinfo:t.userinfo,port:t.port,path:t.path,query:t.query,nid:t.nid,nss:t.nss,uuid:t.uuid,fragment:t.fragment,reference:t.reference,resourceName:t.resourceName,secure:t.secure,error:""},n=Object.assign({},e),s=[];r.scheme&&(r.scheme=ja(r.scheme));const i=Qi(n.scheme||r.scheme);i&&i.serialize&&i.serialize(r,n);const o=r.userinfo!==void 0||r.host!==void 0||r.port!==void 0,a=!n.skipEscape&&r.scheme===void 0&&!o;r.path!==void 0&&(n.skipEscape?r.path=ni(r.path):r.path=Ea(r.path,a)),n.reference!=="suffix"&&r.scheme&&(r.scheme=ja(r.scheme),s.push(r.scheme,":"));const f=ey(r);if(f!==void 0&&(n.reference!=="suffix"&&s.push("//"),s.push(f),r.path&&r.path[0]!=="/"&&s.push("/")),r.path!==void 0){let c=r.path;!n.absolutePath&&(!i||!i.absolutePath)&&(c=Er(c)),a&&(c=Ea(c,!0)),f===void 0&&c[0]==="/"&&c[1]==="/"&&(c="/%2F"+c.slice(2)),s.push(c)}return r.query!==void 0&&s.push("?",ry(r.query)),r.fragment!==void 0&&s.push("#",ny(r.fragment)),s.join("")}const fy=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,ly=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/,uy=/^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;function dy(t,e){if(e[2]!==void 0&&t.path&&t.path[0]!=="/")return'URI path must start with "/" when authority is present.';if(typeof t.port=="number"&&(t.port<0||t.port>65535))return"URI port is malformed."}function vr(t){if(t===void 0)return!1;let e=t.indexOf("%");for(;e!==-1;){if(e+2>=t.length||!/^[\da-f]{2}$/iu.test(t.slice(e+1,e+3)))return!0;e=t.indexOf("%",e+3)}return!1}function eo(t){return t[0]==="["&&t[t.length-1]==="]"}function py(t){const e=t[4];return vr(t[3])||e!==void 0&&!eo(e)&&vr(e)||vr(t[6])||vr(t[7])||vr(t[8])}function tl(t,e,r,n){if(!e.unicodeSupport&&(!r||!r.unicodeSupport)&&t.host&&!eo(t.host)&&(e.domainHost||r&&r.domainHost)&&n===!1&&iy(t.host))try{t.host=new URL("http://"+t.host).hostname}catch(s){return t.error=t.error||"Host's domain name can not be converted to ASCII: "+s,!0}return!1}function Dn(t,e){const r=Object.assign({},e),n={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let s=!1,i=!1,o=!1,a=!1,f=!1,c=!1,u=!1;r.reference==="suffix"&&(r.scheme?t=r.scheme+":"+t:t="//"+t);const l=t.match(ly);l!==null&&l[1].indexOf("\\")!==-1&&(n.error="URI authority must not contain a literal backslash.",s=!0);const d=t.match(uy);if(d!==null){const h=d[1],y=h.replace(/[\t\n\r]/g,"");y.length>=2&&(y.slice(0,2)!=="//"?(n.error=n.error||"URI authority must not contain a literal backslash.",s=!0):h.length!==y.length&&(n.error=n.error||"URI authority introducer must not contain whitespace.",s=!0))}const p=t.match(fy);if(p){if(n.scheme=p[1],n.userinfo=p[3],n.host=p[4],n.port=parseInt(p[5],10),n.path=p[6]||"",n.query=p[7],n.fragment=p[8],n.scheme!==void 0){const m=unescape(n.scheme);Zf.test(m)?n.scheme=m.toLowerCase():(n.error=n.error||Qf,c=!0)}i=py(p),i&&(n.error=n.error||"URI contains malformed percent-encoding."),isNaN(n.port)&&(n.port=p[5]);const h=dy(n,p);if(h!==void 0&&(n.error=n.error||h,s=!0),n.host)if(Yf(n.host)===!1){const $=eo(n.host),b=n.host.indexOf("[")!==-1||n.host.indexOf("]")!==-1,w=Wf(n.host);u=w.isIPV6||w.isIPVFuture===!0,f=b&&(!$||w.error===!0),n.host=u?w.host:w.host.toLowerCase(),f&&(n.error=n.error||"URI host is malformed.",s=!0)}else u=!0;n.scheme===void 0&&n.userinfo===void 0&&n.host===void 0&&n.port===void 0&&n.query===void 0&&!n.path?n.reference="same-document":n.scheme===void 0?n.reference="relative":n.fragment===void 0?n.reference="absolute":n.reference="uri",r.reference&&r.reference!=="suffix"&&r.reference!==n.reference&&(n.error=n.error||"URI is not a "+r.reference+" reference.");const y=Qi(r.scheme||n.scheme);if(f||(a=tl(n,r,y,u)),t.indexOf("%")!==-1&&n.host!==void 0&&!f){let m=u?n.host:ni(n.host,!0);u||(m=ni(m.toLowerCase())),n.host=sy(m,u)}(!y||y&&!y.skipNormalize)&&(n.path&&(n.path=ty(n.path)),n.query&&(n.query=Sa(n.query)),n.fragment&&(n.fragment=Sa(n.fragment))),y&&y.parse&&(y.parse(n,r),y===Xf.urn&&n.nid===void 0&&(o=!0))}else n.error=n.error||"URI can not be parsed.";return{parsed:n,malformedAuthorityOrPort:s,malformedPercentEncoding:i,malformedSchemeSpecific:o,malformedHost:a,malformedScheme:c}}function Ln(t,e){return Dn(t,e).parsed}function my(t,e){return rl(t,e).normalized}function rl(t,e){const{parsed:r,malformedAuthorityOrPort:n,malformedPercentEncoding:s,malformedSchemeSpecific:i,malformedHost:o,malformedScheme:a}=Dn(t,e);return{normalized:n||s||i||o||a?t:_t(r,e),malformedAuthorityOrPort:n,malformedPercentEncoding:s,malformedSchemeSpecific:i,malformedHost:o,malformedScheme:a}}function Oa(t,e){if(typeof t!="string"&&typeof t!="object")return;let r;try{r=typeof t=="string"?t:_t(t,e)}catch{return}const{normalized:n,malformedAuthorityOrPort:s,malformedPercentEncoding:i,malformedSchemeSpecific:o,malformedHost:a,malformedScheme:f}=rl(r,e);return s||i||o||a||f?void 0:n}const to={SCHEMES:Xf,normalize:oy,resolve:ay,resolveComponent:el,equal:cy,serialize:_t,parse:Ln};rs.exports=to;rs.exports.default=to;rs.exports.fastUri=to;var hy=rs.exports;Object.defineProperty(Gi,"__esModule",{value:!0});const nl=hy;nl.code='require("ajv/dist/runtime/uri").default';Gi.default=nl;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var e=Te;Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return e.KeywordCxt}});var r=B;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const n=tr,s=St,i=wt,o=_e,a=B,f=ye,c=de,u=T,l=bh,d=Gi,p=(A,_)=>new RegExp(A,_);p.code="new RegExp";const h=["removeAdditional","useDefaults","coerceTypes"],y=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),m={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},$={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},b=200;function w(A){var _,k,P,g,v,S,q,F,Z,Q,ue,Ye,ar,cr,fr,lr,ur,dr,kt,pr,mr,It,At,hr,yr;const ct=A.strict,gr=(_=A.code)===null||_===void 0?void 0:_.optimize,nn=gr===!0||gr===void 0?1:gr||0,sn=(P=(k=A.code)===null||k===void 0?void 0:k.regExp)!==null&&P!==void 0?P:p,bs=(g=A.uriResolver)!==null&&g!==void 0?g:d.default;return{strictSchema:(S=(v=A.strictSchema)!==null&&v!==void 0?v:ct)!==null&&S!==void 0?S:!0,strictNumbers:(F=(q=A.strictNumbers)!==null&&q!==void 0?q:ct)!==null&&F!==void 0?F:!0,strictTypes:(Q=(Z=A.strictTypes)!==null&&Z!==void 0?Z:ct)!==null&&Q!==void 0?Q:"log",strictTuples:(Ye=(ue=A.strictTuples)!==null&&ue!==void 0?ue:ct)!==null&&Ye!==void 0?Ye:"log",strictRequired:(cr=(ar=A.strictRequired)!==null&&ar!==void 0?ar:ct)!==null&&cr!==void 0?cr:!1,code:A.code?{...A.code,optimize:nn,regExp:sn}:{optimize:nn,regExp:sn},loopRequired:(fr=A.loopRequired)!==null&&fr!==void 0?fr:b,loopEnum:(lr=A.loopEnum)!==null&&lr!==void 0?lr:b,meta:(ur=A.meta)!==null&&ur!==void 0?ur:!0,messages:(dr=A.messages)!==null&&dr!==void 0?dr:!0,inlineRefs:(kt=A.inlineRefs)!==null&&kt!==void 0?kt:!0,schemaId:(pr=A.schemaId)!==null&&pr!==void 0?pr:"$id",addUsedSchema:(mr=A.addUsedSchema)!==null&&mr!==void 0?mr:!0,validateSchema:(It=A.validateSchema)!==null&&It!==void 0?It:!0,validateFormats:(At=A.validateFormats)!==null&&At!==void 0?At:!0,unicodeRegExp:(hr=A.unicodeRegExp)!==null&&hr!==void 0?hr:!0,int32range:(yr=A.int32range)!==null&&yr!==void 0?yr:!0,uriResolver:bs}}class E{constructor(_={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,_=this.opts={..._,...w(_)};const{es5:k,lines:P}=this.opts.code;this.scope=new a.ValueScope({scope:{},prefixes:y,es5:k,lines:P}),this.logger=L(_.logger);const g=_.validateFormats;_.validateFormats=!1,this.RULES=(0,i.getRules)(),O.call(this,m,_,"NOT SUPPORTED"),O.call(this,$,_,"DEPRECATED","warn"),this._metaOpts=X.call(this),_.formats&&N.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),_.keywords&&z.call(this,_.keywords),typeof _.meta=="object"&&this.addMetaSchema(_.meta),C.call(this),_.validateFormats=g}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:_,meta:k,schemaId:P}=this.opts;let g=l;P==="id"&&(g={...l},g.id=g.$id,delete g.$id),k&&_&&this.addMetaSchema(g,g[P],!1)}defaultMeta(){const{meta:_,schemaId:k}=this.opts;return this.opts.defaultMeta=typeof _=="object"?_[k]||_:void 0}validate(_,k){let P;if(typeof _=="string"){if(P=this.getSchema(_),!P)throw new Error(`no schema with key or ref "${_}"`)}else P=this.compile(_);const g=P(k);return"$async"in P||(this.errors=P.errors),g}compile(_,k){const P=this._addSchema(_,k);return P.validate||this._compileSchemaEnv(P)}compileAsync(_,k){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:P}=this.opts;return g.call(this,_,k);async function g(Q,ue){await v.call(this,Q.$schema);const Ye=this._addSchema(Q,ue);return Ye.validate||S.call(this,Ye)}async function v(Q){Q&&!this.getSchema(Q)&&await g.call(this,{$ref:Q},!0)}async function S(Q){try{return this._compileSchemaEnv(Q)}catch(ue){if(!(ue instanceof s.default))throw ue;return q.call(this,ue),await F.call(this,ue.missingSchema),S.call(this,Q)}}function q({missingSchema:Q,missingRef:ue}){if(this.refs[Q])throw new Error(`AnySchema ${Q} is loaded but ${ue} cannot be resolved`)}async function F(Q){const ue=await Z.call(this,Q);this.refs[Q]||await v.call(this,ue.$schema),this.refs[Q]||this.addSchema(ue,Q,k)}async function Z(Q){const ue=this._loading[Q];if(ue)return ue;try{return await(this._loading[Q]=P(Q))}finally{delete this._loading[Q]}}}addSchema(_,k,P,g=this.opts.validateSchema){if(Array.isArray(_)){for(const S of _)this.addSchema(S,void 0,P,g);return this}let v;if(typeof _=="object"){const{schemaId:S}=this.opts;if(v=_[S],v!==void 0&&typeof v!="string")throw new Error(`schema ${S} must be string`)}return k=(0,f.normalizeId)(k||v),this._checkUnique(k),this.schemas[k]=this._addSchema(_,P,k,g,!0),this}addMetaSchema(_,k,P=this.opts.validateSchema){return this.addSchema(_,k,!0,P),this}validateSchema(_,k){if(typeof _=="boolean")return!0;let P;if(P=_.$schema,P!==void 0&&typeof P!="string")throw new Error("$schema must be a string");if(P=P||this.opts.defaultMeta||this.defaultMeta(),!P)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const g=this.validate(P,_);if(!g&&k){const v="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(v);else throw new Error(v)}return g}getSchema(_){let k;for(;typeof(k=M.call(this,_))=="string";)_=k;if(k===void 0){const{schemaId:P}=this.opts,g=new o.SchemaEnv({schema:{},schemaId:P});if(k=o.resolveSchema.call(this,g,_),!k)return;this.refs[_]=k}return k.validate||this._compileSchemaEnv(k)}removeSchema(_){if(_ instanceof RegExp)return this._removeAllSchemas(this.schemas,_),this._removeAllSchemas(this.refs,_),this;switch(typeof _){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const k=M.call(this,_);return typeof k=="object"&&this._cache.delete(k.schema),delete this.schemas[_],delete this.refs[_],this}case"object":{const k=_;this._cache.delete(k);let P=_[this.opts.schemaId];return P&&(P=(0,f.normalizeId)(P),delete this.schemas[P],delete this.refs[P]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(_){for(const k of _)this.addKeyword(k);return this}addKeyword(_,k){let P;if(typeof _=="string")P=_,typeof k=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),k.keyword=P);else if(typeof _=="object"&&k===void 0){if(k=_,P=k.keyword,Array.isArray(P)&&!P.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(U.call(this,P,k),!k)return(0,u.eachItem)(P,v=>te.call(this,v)),this;pe.call(this,k);const g={...k,type:(0,c.getJSONTypes)(k.type),schemaType:(0,c.getJSONTypes)(k.schemaType)};return(0,u.eachItem)(P,g.type.length===0?v=>te.call(this,v,g):v=>g.type.forEach(S=>te.call(this,v,g,S))),this}getKeyword(_){const k=this.RULES.all[_];return typeof k=="object"?k.definition:!!k}removeKeyword(_){const{RULES:k}=this;delete k.keywords[_],delete k.all[_];for(const P of k.rules){const g=P.rules.findIndex(v=>v.keyword===_);g>=0&&P.rules.splice(g,1)}return this}addFormat(_,k){return typeof k=="string"&&(k=new RegExp(k)),this.formats[_]=k,this}errorsText(_=this.errors,{separator:k=", ",dataVar:P="data"}={}){return!_||_.length===0?"No errors":_.map(g=>`${P}${g.instancePath} ${g.message}`).reduce((g,v)=>g+k+v)}$dataMetaSchema(_,k){const P=this.RULES.all;_=JSON.parse(JSON.stringify(_));for(const g of k){const v=g.split("/").slice(1);let S=_;for(const q of v)S=S[q];for(const q in P){const F=P[q];if(typeof F!="object")continue;const{$data:Z}=F.definition,Q=S[q];Z&&Q&&(S[q]=ke(Q))}}return _}_removeAllSchemas(_,k){for(const P in _){const g=_[P];(!k||k.test(P))&&(typeof g=="string"?delete _[P]:g&&!g.meta&&(this._cache.delete(g.schema),delete _[P]))}}_addSchema(_,k,P,g=this.opts.validateSchema,v=this.opts.addUsedSchema){let S;const{schemaId:q}=this.opts;if(typeof _=="object")S=_[q];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof _!="boolean")throw new Error("schema must be object or boolean")}let F=this._cache.get(_);if(F!==void 0)return F;P=(0,f.normalizeId)(S||P);const Z=f.getSchemaRefs.call(this,_,P);return F=new o.SchemaEnv({schema:_,schemaId:q,meta:k,baseId:P,localRefs:Z}),this._cache.set(F.schema,F),v&&!P.startsWith("#")&&(P&&this._checkUnique(P),this.refs[P]=F),g&&this.validateSchema(_,!0),F}_checkUnique(_){if(this.schemas[_]||this.refs[_])throw new Error(`schema with key or id "${_}" already exists`)}_compileSchemaEnv(_){if(_.meta?this._compileMetaSchema(_):o.compileSchema.call(this,_),!_.validate)throw new Error("ajv implementation error");return _.validate}_compileMetaSchema(_){const k=this.opts;this.opts=this._metaOpts;try{o.compileSchema.call(this,_)}finally{this.opts=k}}}E.ValidationError=n.default,E.MissingRefError=s.default,t.default=E;function O(A,_,k,P="error"){for(const g in A){const v=g;v in _&&this.logger[P](`${k}: option ${g}. ${A[v]}`)}}function M(A){return A=(0,f.normalizeId)(A),this.schemas[A]||this.refs[A]}function C(){const A=this.opts.schemas;if(A)if(Array.isArray(A))this.addSchema(A);else for(const _ in A)this.addSchema(A[_],_)}function N(){for(const A in this.opts.formats){const _=this.opts.formats[A];_&&this.addFormat(A,_)}}function z(A){if(Array.isArray(A)){this.addVocabulary(A);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const _ in A){const k=A[_];k.keyword||(k.keyword=_),this.addKeyword(k)}}function X(){const A={...this.opts};for(const _ of h)delete A[_];return A}const x={log(){},warn(){},error(){}};function L(A){if(A===!1)return x;if(A===void 0)return console;if(A.log&&A.warn&&A.error)return A;throw new Error("logger must implement log, warn and error methods")}const H=/^[a-z_$][a-z0-9_$:-]*$/i;function U(A,_){const{RULES:k}=this;if((0,u.eachItem)(A,P=>{if(k.keywords[P])throw new Error(`Keyword ${P} is already defined`);if(!H.test(P))throw new Error(`Keyword ${P} has invalid name`)}),!!_&&_.$data&&!("code"in _||"validate"in _))throw new Error('$data keyword must have "code" or "validate" function')}function te(A,_,k){var P;const g=_==null?void 0:_.post;if(k&&g)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:v}=this;let S=g?v.post:v.rules.find(({type:F})=>F===k);if(S||(S={type:k,rules:[]},v.rules.push(S)),v.keywords[A]=!0,!_)return;const q={keyword:A,definition:{..._,type:(0,c.getJSONTypes)(_.type),schemaType:(0,c.getJSONTypes)(_.schemaType)}};_.before?ie.call(this,S,q,_.before):S.rules.push(q),v.all[A]=q,(P=_.implements)===null||P===void 0||P.forEach(F=>this.addKeyword(F))}function ie(A,_,k){const P=A.rules.findIndex(g=>g.keyword===k);P>=0?A.rules.splice(P,0,_):(A.rules.push(_),this.logger.warn(`rule ${k} is not defined`))}function pe(A){let{metaSchema:_}=A;_!==void 0&&(A.$data&&this.opts.$data&&(_=ke(_)),A.validateSchema=this.compile(_,!0))}const Oe={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function ke(A){return{anyOf:[A,Oe]}}})(bt);var ro={},ns={},no={};Object.defineProperty(no,"__esModule",{value:!0});const yy={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};no.default=yy;var Be={};Object.defineProperty(Be,"__esModule",{value:!0});Be.callRef=Be.getValidate=void 0;const gy=St,ka=Y,Ee=B,Rt=je,Ia=_e,dn=T,$y={keyword:"$ref",schemaType:"string",code(t){const{gen:e,schema:r,it:n}=t,{baseId:s,schemaEnv:i,validateName:o,opts:a,self:f}=n,{root:c}=i;if((r==="#"||r==="#/")&&s===c.baseId)return l();const u=Ia.resolveRef.call(f,c,s,r);if(u===void 0)throw new gy.default(n.opts.uriResolver,s,r);if(u instanceof Ia.SchemaEnv)return d(u);return p(u);function l(){if(i===c)return jn(t,o,i,i.$async);const h=e.scopeValue("root",{ref:c});return jn(t,(0,Ee._)`${h}.validate`,c,c.$async)}function d(h){const y=sl(t,h);jn(t,y,h,h.$async)}function p(h){const y=e.scopeValue("schema",a.code.source===!0?{ref:h,code:(0,Ee.stringify)(h)}:{ref:h}),m=e.name("valid"),$=t.subschema({schema:h,dataTypes:[],schemaPath:Ee.nil,topSchemaRef:y,errSchemaPath:r},m);t.mergeEvaluated($),t.ok(m)}}};function sl(t,e){const{gen:r}=t;return e.validate?r.scopeValue("validate",{ref:e.validate}):(0,Ee._)`${r.scopeValue("wrapper",{ref:e})}.validate`}Be.getValidate=sl;function jn(t,e,r,n){const{gen:s,it:i}=t,{allErrors:o,schemaEnv:a,opts:f}=i,c=f.passContext?Rt.default.this:Ee.nil;n?u():l();function u(){if(!a.$async)throw new Error("async schema referenced by sync schema");const h=s.let("valid");s.try(()=>{s.code((0,Ee._)`await ${(0,ka.callValidateCode)(t,e,c)}`),p(e),o||s.assign(h,!0)},y=>{s.if((0,Ee._)`!(${y} instanceof ${i.ValidationError})`,()=>s.throw(y)),d(y),o||s.assign(h,!1)}),t.ok(h)}function l(){t.result((0,ka.callValidateCode)(t,e,c),()=>p(e),()=>d(e))}function d(h){const y=(0,Ee._)`${h}.errors`;s.assign(Rt.default.vErrors,(0,Ee._)`${Rt.default.vErrors} === null ? ${y} : ${Rt.default.vErrors}.concat(${y})`),s.assign(Rt.default.errors,(0,Ee._)`${Rt.default.vErrors}.length`)}function p(h){var y;if(!i.opts.unevaluated)return;const m=(y=r==null?void 0:r.validate)===null||y===void 0?void 0:y.evaluated;if(i.props!==!0)if(m&&!m.dynamicProps)m.props!==void 0&&(i.props=dn.mergeEvaluated.props(s,m.props,i.props));else{const $=s.var("props",(0,Ee._)`${h}.evaluated.props`);i.props=dn.mergeEvaluated.props(s,$,i.props,Ee.Name)}if(i.items!==!0)if(m&&!m.dynamicItems)m.items!==void 0&&(i.items=dn.mergeEvaluated.items(s,m.items,i.items));else{const $=s.var("items",(0,Ee._)`${h}.evaluated.items`);i.items=dn.mergeEvaluated.items(s,$,i.items,Ee.Name)}}}Be.callRef=jn;Be.default=$y;Object.defineProperty(ns,"__esModule",{value:!0});const by=no,vy=Be,wy=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",by.default,vy.default];ns.default=wy;var ss={},so={};Object.defineProperty(so,"__esModule",{value:!0});const Fn=B,et=Fn.operators,Vn={maximum:{okStr:"<=",ok:et.LTE,fail:et.GT},minimum:{okStr:">=",ok:et.GTE,fail:et.LT},exclusiveMaximum:{okStr:"<",ok:et.LT,fail:et.GTE},exclusiveMinimum:{okStr:">",ok:et.GT,fail:et.LTE}},_y={message:({keyword:t,schemaCode:e})=>(0,Fn.str)`must be ${Vn[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,Fn._)`{comparison: ${Vn[t].okStr}, limit: ${e}}`},Py={keyword:Object.keys(Vn),type:"number",schemaType:"number",$data:!0,error:_y,code(t){const{keyword:e,data:r,schemaCode:n}=t;t.fail$data((0,Fn._)`${r} ${Vn[e].fail} ${n} || isNaN(${r})`)}};so.default=Py;var is={};Object.defineProperty(is,"__esModule",{value:!0});const Ir=B,Ey={message:({schemaCode:t})=>(0,Ir.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,Ir._)`{multipleOf: ${t}}`},Sy={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:Ey,code(t){const{gen:e,data:r,schemaCode:n,it:s}=t,i=s.opts.multipleOfPrecision,o=e.let("res"),a=i?(0,Ir._)`Math.abs(Math.round(${o}) - ${o}) > 1e-${i}`:(0,Ir._)`${o} !== parseInt(${o})`;t.fail$data((0,Ir._)`(${n} === 0 || (${o} = ${r}/${n}, ${a}))`)}};is.default=Sy;var os={},io={};Object.defineProperty(io,"__esModule",{value:!0});function il(t){const e=t.length;let r=0,n=0,s;for(;n<e;)r++,s=t.charCodeAt(n++),s>=55296&&s<=56319&&n<e&&(s=t.charCodeAt(n),(s&64512)===56320&&n++);return r}io.default=il;il.code='require("ajv/dist/runtime/ucs2length").default';Object.defineProperty(os,"__esModule",{value:!0});const dt=B,jy=T,Oy=io,ky={message({keyword:t,schemaCode:e}){const r=t==="maxLength"?"more":"fewer";return(0,dt.str)`must NOT have ${r} than ${e} characters`},params:({schemaCode:t})=>(0,dt._)`{limit: ${t}}`},Iy={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:ky,code(t){const{keyword:e,data:r,schemaCode:n,it:s}=t,i=e==="maxLength"?dt.operators.GT:dt.operators.LT,o=s.opts.unicode===!1?(0,dt._)`${r}.length`:(0,dt._)`${(0,jy.useFunc)(t.gen,Oy.default)}(${r})`;t.fail$data((0,dt._)`${o} ${i} ${n}`)}};os.default=Iy;var as={};Object.defineProperty(as,"__esModule",{value:!0});const Ay=Y,Ny=T,Lt=B,Ty={message:({schemaCode:t})=>(0,Lt.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,Lt._)`{pattern: ${t}}`},xy={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:Ty,code(t){const{gen:e,data:r,$data:n,schema:s,schemaCode:i,it:o}=t,a=o.opts.unicodeRegExp?"u":"";if(n){const{regExp:f}=o.opts.code,c=f.code==="new RegExp"?(0,Lt._)`new RegExp`:(0,Ny.useFunc)(e,f),u=e.let("valid");e.try(()=>e.assign(u,(0,Lt._)`${c}(${i}, ${a}).test(${r})`),()=>e.assign(u,!1)),t.fail$data((0,Lt._)`!${u}`)}else{const f=(0,Ay.usePattern)(t,s);t.fail$data((0,Lt._)`!${f}.test(${r})`)}}};as.default=xy;var cs={};Object.defineProperty(cs,"__esModule",{value:!0});const Ar=B,Ry={message({keyword:t,schemaCode:e}){const r=t==="maxProperties"?"more":"fewer";return(0,Ar.str)`must NOT have ${r} than ${e} properties`},params:({schemaCode:t})=>(0,Ar._)`{limit: ${t}}`},Cy={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:Ry,code(t){const{keyword:e,data:r,schemaCode:n}=t,s=e==="maxProperties"?Ar.operators.GT:Ar.operators.LT;t.fail$data((0,Ar._)`Object.keys(${r}).length ${s} ${n}`)}};cs.default=Cy;var fs={};Object.defineProperty(fs,"__esModule",{value:!0});const wr=Y,Nr=B,My=T,qy={message:({params:{missingProperty:t}})=>(0,Nr.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,Nr._)`{missingProperty: ${t}}`},Dy={keyword:"required",type:"object",schemaType:"array",$data:!0,error:qy,code(t){const{gen:e,schema:r,schemaCode:n,data:s,$data:i,it:o}=t,{opts:a}=o;if(!i&&r.length===0)return;const f=r.length>=a.loopRequired;if(o.allErrors?c():u(),a.strictRequired){const p=t.parentSchema.properties,{definedProperties:h}=t.it;for(const y of r)if((p==null?void 0:p[y])===void 0&&!h.has(y)){const m=o.schemaEnv.baseId+o.errSchemaPath,$=`required property "${y}" is not defined at "${m}" (strictRequired)`;(0,My.checkStrictMode)(o,$,o.opts.strictRequired)}}function c(){if(f||i)t.block$data(Nr.nil,l);else for(const p of r)(0,wr.checkReportMissingProp)(t,p)}function u(){const p=e.let("missing");if(f||i){const h=e.let("valid",!0);t.block$data(h,()=>d(p,h)),t.ok(h)}else e.if((0,wr.checkMissingProp)(t,r,p)),(0,wr.reportMissingProp)(t,p),e.else()}function l(){e.forOf("prop",n,p=>{t.setParams({missingProperty:p}),e.if((0,wr.noPropertyInData)(e,s,p,a.ownProperties),()=>t.error())})}function d(p,h){t.setParams({missingProperty:p}),e.forOf(p,n,()=>{e.assign(h,(0,wr.propertyInData)(e,s,p,a.ownProperties)),e.if((0,Nr.not)(h),()=>{t.error(),e.break()})},Nr.nil)}}};fs.default=Dy;var ls={};Object.defineProperty(ls,"__esModule",{value:!0});const Tr=B,Ly={message({keyword:t,schemaCode:e}){const r=t==="maxItems"?"more":"fewer";return(0,Tr.str)`must NOT have ${r} than ${e} items`},params:({schemaCode:t})=>(0,Tr._)`{limit: ${t}}`},Fy={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:Ly,code(t){const{keyword:e,data:r,schemaCode:n}=t,s=e==="maxItems"?Tr.operators.GT:Tr.operators.LT;t.fail$data((0,Tr._)`${r}.length ${s} ${n}`)}};ls.default=Fy;var us={},Hr={};Object.defineProperty(Hr,"__esModule",{value:!0});const ol=Pf;ol.code='require("ajv/dist/runtime/equal").default';Hr.default=ol;Object.defineProperty(us,"__esModule",{value:!0});const xs=de,me=B,Vy=T,Uy=Hr,zy={message:({params:{i:t,j:e}})=>(0,me.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>(0,me._)`{i: ${t}, j: ${e}}`},Ky={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:zy,code(t){const{gen:e,data:r,$data:n,schema:s,parentSchema:i,schemaCode:o,it:a}=t;if(!n&&!s)return;const f=e.let("valid"),c=i.items?(0,xs.getSchemaTypes)(i.items):[];t.block$data(f,u,(0,me._)`${o} === false`),t.ok(f);function u(){const h=e.let("i",(0,me._)`${r}.length`),y=e.let("j");t.setParams({i:h,j:y}),e.assign(f,!0),e.if((0,me._)`${h} > 1`,()=>(l()?d:p)(h,y))}function l(){return c.length>0&&!c.some(h=>h==="object"||h==="array")}function d(h,y){const m=e.name("item"),$=(0,xs.checkDataTypes)(c,m,a.opts.strictNumbers,xs.DataType.Wrong),b=e.const("indices",(0,me._)`{}`);e.for((0,me._)`;${h}--;`,()=>{e.let(m,(0,me._)`${r}[${h}]`),e.if($,(0,me._)`continue`),c.length>1&&e.if((0,me._)`typeof ${m} == "string"`,(0,me._)`${m} += "_"`),e.if((0,me._)`typeof ${b}[${m}] == "number"`,()=>{e.assign(y,(0,me._)`${b}[${m}]`),t.error(),e.assign(f,!1).break()}).code((0,me._)`${b}[${m}] = ${h}`)})}function p(h,y){const m=(0,Vy.useFunc)(e,Uy.default),$=e.name("outer");e.label($).for((0,me._)`;${h}--;`,()=>e.for((0,me._)`${y} = ${h}; ${y}--;`,()=>e.if((0,me._)`${m}(${r}[${h}], ${r}[${y}])`,()=>{t.error(),e.assign(f,!1).break($)})))}}};us.default=Ky;var ds={};Object.defineProperty(ds,"__esModule",{value:!0});const si=B,By=T,Hy=Hr,Gy={message:"must be equal to constant",params:({schemaCode:t})=>(0,si._)`{allowedValue: ${t}}`},Jy={keyword:"const",$data:!0,error:Gy,code(t){const{gen:e,data:r,$data:n,schemaCode:s,schema:i}=t;n||i&&typeof i=="object"?t.fail$data((0,si._)`!${(0,By.useFunc)(e,Hy.default)}(${r}, ${s})`):t.fail((0,si._)`${i} !== ${r}`)}};ds.default=Jy;var ps={};Object.defineProperty(ps,"__esModule",{value:!0});const Sr=B,Wy=T,Yy=Hr,Xy={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,Sr._)`{allowedValues: ${t}}`},Zy={keyword:"enum",schemaType:"array",$data:!0,error:Xy,code(t){const{gen:e,data:r,$data:n,schema:s,schemaCode:i,it:o}=t;if(!n&&s.length===0)throw new Error("enum must have non-empty array");const a=s.length>=o.opts.loopEnum;let f;const c=()=>f??(f=(0,Wy.useFunc)(e,Yy.default));let u;if(a||n)u=e.let("valid"),t.block$data(u,l);else{if(!Array.isArray(s))throw new Error("ajv implementation error");const p=e.const("vSchema",i);u=(0,Sr.or)(...s.map((h,y)=>d(p,y)))}t.pass(u);function l(){e.assign(u,!1),e.forOf("v",i,p=>e.if((0,Sr._)`${c()}(${r}, ${p})`,()=>e.assign(u,!0).break()))}function d(p,h){const y=s[h];return typeof y=="object"&&y!==null?(0,Sr._)`${c()}(${r}, ${p}[${h}])`:(0,Sr._)`${r} === ${y}`}}};ps.default=Zy;Object.defineProperty(ss,"__esModule",{value:!0});const Qy=so,eg=is,tg=os,rg=as,ng=cs,sg=fs,ig=ls,og=us,ag=ds,cg=ps,fg=[Qy.default,eg.default,tg.default,rg.default,ng.default,sg.default,ig.default,og.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},ag.default,cg.default];ss.default=fg;var Gr={},nr={};Object.defineProperty(nr,"__esModule",{value:!0});nr.validateAdditionalItems=void 0;const pt=B,ii=T,lg={message:({params:{len:t}})=>(0,pt.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,pt._)`{limit: ${t}}`},ug={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:lg,code(t){const{parentSchema:e,it:r}=t,{items:n}=e;if(!Array.isArray(n)){(0,ii.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}al(t,n)}};function al(t,e){const{gen:r,schema:n,data:s,keyword:i,it:o}=t;o.items=!0;const a=r.const("len",(0,pt._)`${s}.length`);if(n===!1)t.setParams({len:e.length}),t.pass((0,pt._)`${a} <= ${e.length}`);else if(typeof n=="object"&&!(0,ii.alwaysValidSchema)(o,n)){const c=r.var("valid",(0,pt._)`${a} <= ${e.length}`);r.if((0,pt.not)(c),()=>f(c)),t.ok(c)}function f(c){r.forRange("i",e.length,a,u=>{t.subschema({keyword:i,dataProp:u,dataPropType:ii.Type.Num},c),o.allErrors||r.if((0,pt.not)(c),()=>r.break())})}}nr.validateAdditionalItems=al;nr.default=ug;var oo={},sr={};Object.defineProperty(sr,"__esModule",{value:!0});sr.validateTuple=void 0;const Aa=B,On=T,dg=Y,pg={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){const{schema:e,it:r}=t;if(Array.isArray(e))return cl(t,"additionalItems",e);r.items=!0,!(0,On.alwaysValidSchema)(r,e)&&t.ok((0,dg.validateArray)(t))}};function cl(t,e,r=t.schema){const{gen:n,parentSchema:s,data:i,keyword:o,it:a}=t;u(s),a.opts.unevaluated&&r.length&&a.items!==!0&&(a.items=On.mergeEvaluated.items(n,r.length,a.items));const f=n.name("valid"),c=n.const("len",(0,Aa._)`${i}.length`);r.forEach((l,d)=>{(0,On.alwaysValidSchema)(a,l)||(n.if((0,Aa._)`${c} > ${d}`,()=>t.subschema({keyword:o,schemaProp:d,dataProp:d},f)),t.ok(f))});function u(l){const{opts:d,errSchemaPath:p}=a,h=r.length,y=h===l.minItems&&(h===l.maxItems||l[e]===!1);if(d.strictTuples&&!y){const m=`"${o}" is ${h}-tuple, but minItems or maxItems/${e} are not specified or different at path "${p}"`;(0,On.checkStrictMode)(a,m,d.strictTuples)}}}sr.validateTuple=cl;sr.default=pg;Object.defineProperty(oo,"__esModule",{value:!0});const mg=sr,hg={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,mg.validateTuple)(t,"items")};oo.default=hg;var ao={};Object.defineProperty(ao,"__esModule",{value:!0});const Na=B,yg=T,gg=Y,$g=nr,bg={message:({params:{len:t}})=>(0,Na.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Na._)`{limit: ${t}}`},vg={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:bg,code(t){const{schema:e,parentSchema:r,it:n}=t,{prefixItems:s}=r;n.items=!0,!(0,yg.alwaysValidSchema)(n,e)&&(s?(0,$g.validateAdditionalItems)(t,s):t.ok((0,gg.validateArray)(t)))}};ao.default=vg;var co={};Object.defineProperty(co,"__esModule",{value:!0});const Ie=B,pn=T,wg={message:({params:{min:t,max:e}})=>e===void 0?(0,Ie.str)`must contain at least ${t} valid item(s)`:(0,Ie.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,Ie._)`{minContains: ${t}}`:(0,Ie._)`{minContains: ${t}, maxContains: ${e}}`},_g={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:wg,code(t){const{gen:e,schema:r,parentSchema:n,data:s,it:i}=t;let o,a;const{minContains:f,maxContains:c}=n;i.opts.next?(o=f===void 0?1:f,a=c):o=1;const u=e.const("len",(0,Ie._)`${s}.length`);if(t.setParams({min:o,max:a}),a===void 0&&o===0){(0,pn.checkStrictMode)(i,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&o>a){(0,pn.checkStrictMode)(i,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,pn.alwaysValidSchema)(i,r)){let y=(0,Ie._)`${u} >= ${o}`;a!==void 0&&(y=(0,Ie._)`${y} && ${u} <= ${a}`),t.pass(y);return}i.items=!0;const l=e.name("valid");a===void 0&&o===1?p(l,()=>e.if(l,()=>e.break())):o===0?(e.let(l,!0),a!==void 0&&e.if((0,Ie._)`${s}.length > 0`,d)):(e.let(l,!1),d()),t.result(l,()=>t.reset());function d(){const y=e.name("_valid"),m=e.let("count",0);p(y,()=>e.if(y,()=>h(m)))}function p(y,m){e.forRange("i",0,u,$=>{t.subschema({keyword:"contains",dataProp:$,dataPropType:pn.Type.Num,compositeRule:!0},y),m()})}function h(y){e.code((0,Ie._)`${y}++`),a===void 0?e.if((0,Ie._)`${y} >= ${o}`,()=>e.assign(l,!0).break()):(e.if((0,Ie._)`${y} > ${a}`,()=>e.assign(l,!1).break()),o===1?e.assign(l,!0):e.if((0,Ie._)`${y} >= ${o}`,()=>e.assign(l,!0)))}}};co.default=_g;var ms={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const e=B,r=T,n=Y;t.error={message:({params:{property:f,depsCount:c,deps:u}})=>{const l=c===1?"property":"properties";return(0,e.str)`must have ${l} ${u} when property ${f} is present`},params:({params:{property:f,depsCount:c,deps:u,missingProperty:l}})=>(0,e._)`{property: ${f},
135
+ missingProperty: ${l},
136
+ depsCount: ${c},
137
+ deps: ${u}}`};const s={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(f){const[c,u]=i(f);o(f,c),a(f,u)}};function i({schema:f}){const c={},u={};for(const l in f){if(l==="__proto__")continue;const d=Array.isArray(f[l])?c:u;d[l]=f[l]}return[c,u]}function o(f,c=f.schema){const{gen:u,data:l,it:d}=f;if(Object.keys(c).length===0)return;const p=u.let("missing");for(const h in c){const y=c[h];if(y.length===0)continue;const m=(0,n.propertyInData)(u,l,h,d.opts.ownProperties);f.setParams({property:h,depsCount:y.length,deps:y.join(", ")}),d.allErrors?u.if(m,()=>{for(const $ of y)(0,n.checkReportMissingProp)(f,$)}):(u.if((0,e._)`${m} && (${(0,n.checkMissingProp)(f,y,p)})`),(0,n.reportMissingProp)(f,p),u.else())}}t.validatePropertyDeps=o;function a(f,c=f.schema){const{gen:u,data:l,keyword:d,it:p}=f,h=u.name("valid");for(const y in c)(0,r.alwaysValidSchema)(p,c[y])||(u.if((0,n.propertyInData)(u,l,y,p.opts.ownProperties),()=>{const m=f.subschema({keyword:d,schemaProp:y},h);f.mergeValidEvaluated(m,h)},()=>u.var(h,!0)),f.ok(h))}t.validateSchemaDeps=a,t.default=s})(ms);var fo={};Object.defineProperty(fo,"__esModule",{value:!0});const fl=B,Pg=T,Eg={message:"property name must be valid",params:({params:t})=>(0,fl._)`{propertyName: ${t.propertyName}}`},Sg={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:Eg,code(t){const{gen:e,schema:r,data:n,it:s}=t;if((0,Pg.alwaysValidSchema)(s,r))return;const i=e.name("valid");e.forIn("key",n,o=>{t.setParams({propertyName:o}),t.subschema({keyword:"propertyNames",data:o,dataTypes:["string"],propertyName:o,compositeRule:!0},i),e.if((0,fl.not)(i),()=>{t.error(!0),s.allErrors||e.break()})}),t.ok(i)}};fo.default=Sg;var hs={};Object.defineProperty(hs,"__esModule",{value:!0});const mn=Y,qe=B,jg=je,hn=T,Og={message:"must NOT have additional properties",params:({params:t})=>(0,qe._)`{additionalProperty: ${t.additionalProperty}}`},kg={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:Og,code(t){const{gen:e,schema:r,parentSchema:n,data:s,errsCount:i,it:o}=t;if(!i)throw new Error("ajv implementation error");const{allErrors:a,opts:f}=o;if(o.props=!0,f.removeAdditional!=="all"&&(0,hn.alwaysValidSchema)(o,r))return;const c=(0,mn.allSchemaProperties)(n.properties),u=(0,mn.allSchemaProperties)(n.patternProperties);l(),t.ok((0,qe._)`${i} === ${jg.default.errors}`);function l(){e.forIn("key",s,m=>{!c.length&&!u.length?h(m):e.if(d(m),()=>h(m))})}function d(m){let $;if(c.length>8){const b=(0,hn.schemaRefOrVal)(o,n.properties,"properties");$=(0,mn.isOwnProperty)(e,b,m)}else c.length?$=(0,qe.or)(...c.map(b=>(0,qe._)`${m} === ${b}`)):$=qe.nil;return u.length&&($=(0,qe.or)($,...u.map(b=>(0,qe._)`${(0,mn.usePattern)(t,b)}.test(${m})`))),(0,qe.not)($)}function p(m){e.code((0,qe._)`delete ${s}[${m}]`)}function h(m){if(f.removeAdditional==="all"||f.removeAdditional&&r===!1){p(m);return}if(r===!1){t.setParams({additionalProperty:m}),t.error(),a||e.break();return}if(typeof r=="object"&&!(0,hn.alwaysValidSchema)(o,r)){const $=e.name("valid");f.removeAdditional==="failing"?(y(m,$,!1),e.if((0,qe.not)($),()=>{t.reset(),p(m)})):(y(m,$),a||e.if((0,qe.not)($),()=>e.break()))}}function y(m,$,b){const w={keyword:"additionalProperties",dataProp:m,dataPropType:hn.Type.Str};b===!1&&Object.assign(w,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(w,$)}}};hs.default=kg;var lo={};Object.defineProperty(lo,"__esModule",{value:!0});const Ig=Te,Ta=Y,Rs=T,xa=hs,Ag={keyword:"properties",type:"object",schemaType:"object",code(t){const{gen:e,schema:r,parentSchema:n,data:s,it:i}=t;i.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&xa.default.code(new Ig.KeywordCxt(i,xa.default,"additionalProperties"));const o=(0,Ta.allSchemaProperties)(r);for(const l of o)i.definedProperties.add(l);i.opts.unevaluated&&o.length&&i.props!==!0&&(i.props=Rs.mergeEvaluated.props(e,(0,Rs.toHash)(o),i.props));const a=o.filter(l=>!(0,Rs.alwaysValidSchema)(i,r[l]));if(a.length===0)return;const f=e.name("valid");for(const l of a)c(l)?u(l):(e.if((0,Ta.propertyInData)(e,s,l,i.opts.ownProperties)),u(l),i.allErrors||e.else().var(f,!0),e.endIf()),t.it.definedProperties.add(l),t.ok(f);function c(l){return i.opts.useDefaults&&!i.compositeRule&&r[l].default!==void 0}function u(l){t.subschema({keyword:"properties",schemaProp:l,dataProp:l},f)}}};lo.default=Ag;var uo={};Object.defineProperty(uo,"__esModule",{value:!0});const Ra=Y,yn=B,Ca=T,Ma=T,Ng={keyword:"patternProperties",type:"object",schemaType:"object",code(t){const{gen:e,schema:r,data:n,parentSchema:s,it:i}=t,{opts:o}=i,a=(0,Ra.allSchemaProperties)(r),f=a.filter(y=>(0,Ca.alwaysValidSchema)(i,r[y]));if(a.length===0||f.length===a.length&&(!i.opts.unevaluated||i.props===!0))return;const c=o.strictSchema&&!o.allowMatchingProperties&&s.properties,u=e.name("valid");i.props!==!0&&!(i.props instanceof yn.Name)&&(i.props=(0,Ma.evaluatedPropsToName)(e,i.props));const{props:l}=i;d();function d(){for(const y of a)c&&p(y),i.allErrors?h(y):(e.var(u,!0),h(y),e.if(u))}function p(y){for(const m in c)new RegExp(y).test(m)&&(0,Ca.checkStrictMode)(i,`property ${m} matches pattern ${y} (use allowMatchingProperties)`)}function h(y){e.forIn("key",n,m=>{e.if((0,yn._)`${(0,Ra.usePattern)(t,y)}.test(${m})`,()=>{const $=f.includes(y);$||t.subschema({keyword:"patternProperties",schemaProp:y,dataProp:m,dataPropType:Ma.Type.Str},u),i.opts.unevaluated&&l!==!0?e.assign((0,yn._)`${l}[${m}]`,!0):!$&&!i.allErrors&&e.if((0,yn.not)(u),()=>e.break())})})}}};uo.default=Ng;var po={};Object.defineProperty(po,"__esModule",{value:!0});const Tg=T,xg={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){const{gen:e,schema:r,it:n}=t;if((0,Tg.alwaysValidSchema)(n,r)){t.fail();return}const s=e.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},s),t.failResult(s,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}};po.default=xg;var mo={};Object.defineProperty(mo,"__esModule",{value:!0});const Rg=Y,Cg={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Rg.validateUnion,error:{message:"must match a schema in anyOf"}};mo.default=Cg;var ho={};Object.defineProperty(ho,"__esModule",{value:!0});const kn=B,Mg=T,qg={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,kn._)`{passingSchemas: ${t.passing}}`},Dg={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:qg,code(t){const{gen:e,schema:r,parentSchema:n,it:s}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(s.opts.discriminator&&n.discriminator)return;const i=r,o=e.let("valid",!1),a=e.let("passing",null),f=e.name("_valid");t.setParams({passing:a}),e.block(c),t.result(o,()=>t.reset(),()=>t.error(!0));function c(){i.forEach((u,l)=>{let d;(0,Mg.alwaysValidSchema)(s,u)?e.var(f,!0):d=t.subschema({keyword:"oneOf",schemaProp:l,compositeRule:!0},f),l>0&&e.if((0,kn._)`${f} && ${o}`).assign(o,!1).assign(a,(0,kn._)`[${a}, ${l}]`).else(),e.if(f,()=>{e.assign(o,!0),e.assign(a,l),d&&t.mergeEvaluated(d,kn.Name)})})}}};ho.default=Dg;var yo={};Object.defineProperty(yo,"__esModule",{value:!0});const Lg=T,Fg={keyword:"allOf",schemaType:"array",code(t){const{gen:e,schema:r,it:n}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");const s=e.name("valid");r.forEach((i,o)=>{if((0,Lg.alwaysValidSchema)(n,i))return;const a=t.subschema({keyword:"allOf",schemaProp:o},s);t.ok(s),t.mergeEvaluated(a)})}};yo.default=Fg;var go={};Object.defineProperty(go,"__esModule",{value:!0});const Un=B,ll=T,Vg={message:({params:t})=>(0,Un.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,Un._)`{failingKeyword: ${t.ifClause}}`},Ug={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:Vg,code(t){const{gen:e,parentSchema:r,it:n}=t;r.then===void 0&&r.else===void 0&&(0,ll.checkStrictMode)(n,'"if" without "then" and "else" is ignored');const s=qa(n,"then"),i=qa(n,"else");if(!s&&!i)return;const o=e.let("valid",!0),a=e.name("_valid");if(f(),t.reset(),s&&i){const u=e.let("ifClause");t.setParams({ifClause:u}),e.if(a,c("then",u),c("else",u))}else s?e.if(a,c("then")):e.if((0,Un.not)(a),c("else"));t.pass(o,()=>t.error(!0));function f(){const u=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);t.mergeEvaluated(u)}function c(u,l){return()=>{const d=t.subschema({keyword:u},a);e.assign(o,a),t.mergeValidEvaluated(d,o),l?e.assign(l,(0,Un._)`${u}`):t.setParams({ifClause:u})}}}};function qa(t,e){const r=t.schema[e];return r!==void 0&&!(0,ll.alwaysValidSchema)(t,r)}go.default=Ug;var $o={};Object.defineProperty($o,"__esModule",{value:!0});const zg=T,Kg={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:r}){e.if===void 0&&(0,zg.checkStrictMode)(r,`"${t}" without "if" is ignored`)}};$o.default=Kg;Object.defineProperty(Gr,"__esModule",{value:!0});const Bg=nr,Hg=oo,Gg=sr,Jg=ao,Wg=co,Yg=ms,Xg=fo,Zg=hs,Qg=lo,e$=uo,t$=po,r$=mo,n$=ho,s$=yo,i$=go,o$=$o;function a$(t=!1){const e=[t$.default,r$.default,n$.default,s$.default,i$.default,o$.default,Xg.default,Zg.default,Yg.default,Qg.default,e$.default];return t?e.push(Hg.default,Jg.default):e.push(Bg.default,Gg.default),e.push(Wg.default),e}Gr.default=a$;var Jr={},bo={};Object.defineProperty(bo,"__esModule",{value:!0});const ae=B,c$={message:({schemaCode:t})=>(0,ae.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,ae._)`{format: ${t}}`},f$={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:c$,code(t,e){const{gen:r,data:n,$data:s,schema:i,schemaCode:o,it:a}=t,{opts:f,errSchemaPath:c,schemaEnv:u,self:l}=a;if(!f.validateFormats)return;s?d():p();function d(){const h=r.scopeValue("formats",{ref:l.formats,code:f.code.formats}),y=r.const("fDef",(0,ae._)`${h}[${o}]`),m=r.let("fType"),$=r.let("format");r.if((0,ae._)`typeof ${y} == "object" && !(${y} instanceof RegExp)`,()=>r.assign(m,(0,ae._)`${y}.type || "string"`).assign($,(0,ae._)`${y}.validate`),()=>r.assign(m,(0,ae._)`"string"`).assign($,y)),t.fail$data((0,ae.or)(b(),w()));function b(){return f.strictSchema===!1?ae.nil:(0,ae._)`${o} && !${$}`}function w(){const E=u.$async?(0,ae._)`(${y}.async ? await ${$}(${n}) : ${$}(${n}))`:(0,ae._)`${$}(${n})`,O=(0,ae._)`(typeof ${$} == "function" ? ${E} : ${$}.test(${n}))`;return(0,ae._)`${$} && ${$} !== true && ${m} === ${e} && !${O}`}}function p(){const h=l.formats[i];if(!h){b();return}if(h===!0)return;const[y,m,$]=w(h);y===e&&t.pass(E());function b(){if(f.strictSchema===!1){l.logger.warn(O());return}throw new Error(O());function O(){return`unknown format "${i}" ignored in schema at path "${c}"`}}function w(O){const M=O instanceof RegExp?(0,ae.regexpCode)(O):f.code.formats?(0,ae._)`${f.code.formats}${(0,ae.getProperty)(i)}`:void 0,C=r.scopeValue("formats",{key:i,ref:O,code:M});return typeof O=="object"&&!(O instanceof RegExp)?[O.type||"string",O.validate,(0,ae._)`${C}.validate`]:["string",O,C]}function E(){if(typeof h=="object"&&!(h instanceof RegExp)&&h.async){if(!u.$async)throw new Error("async format in sync schema");return(0,ae._)`await ${$}(${n})`}return typeof m=="function"?(0,ae._)`${$}(${n})`:(0,ae._)`${$}.test(${n})`}}}};bo.default=f$;Object.defineProperty(Jr,"__esModule",{value:!0});const l$=bo,u$=[l$.default];Jr.default=u$;var Pt={};Object.defineProperty(Pt,"__esModule",{value:!0});Pt.contentVocabulary=Pt.metadataVocabulary=void 0;Pt.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Pt.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"];Object.defineProperty(ro,"__esModule",{value:!0});const d$=ns,p$=ss,m$=Gr,h$=Jr,Da=Pt,y$=[d$.default,p$.default,(0,m$.default)(),h$.default,Da.metadataVocabulary,Da.contentVocabulary];ro.default=y$;var Wr={},ys={};Object.defineProperty(ys,"__esModule",{value:!0});ys.DiscrError=void 0;var La;(function(t){t.Tag="tag",t.Mapping="mapping"})(La||(ys.DiscrError=La={}));Object.defineProperty(Wr,"__esModule",{value:!0});const Ct=B,oi=ys,Fa=_e,g$=St,$$=T,b$={message:({params:{discrError:t,tagName:e}})=>t===oi.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:r}})=>(0,Ct._)`{error: ${t}, tag: ${r}, tagValue: ${e}}`},v$={keyword:"discriminator",type:"object",schemaType:"object",error:b$,code(t){const{gen:e,data:r,schema:n,parentSchema:s,it:i}=t,{oneOf:o}=s;if(!i.opts.discriminator)throw new Error("discriminator: requires discriminator option");const a=n.propertyName;if(typeof a!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!o)throw new Error("discriminator: requires oneOf keyword");const f=e.let("valid",!1),c=e.const("tag",(0,Ct._)`${r}${(0,Ct.getProperty)(a)}`);e.if((0,Ct._)`typeof ${c} == "string"`,()=>u(),()=>t.error(!1,{discrError:oi.DiscrError.Tag,tag:c,tagName:a})),t.ok(f);function u(){const p=d();e.if(!1);for(const h in p)e.elseIf((0,Ct._)`${c} === ${h}`),e.assign(f,l(p[h]));e.else(),t.error(!1,{discrError:oi.DiscrError.Mapping,tag:c,tagName:a}),e.endIf()}function l(p){const h=e.name("valid"),y=t.subschema({keyword:"oneOf",schemaProp:p},h);return t.mergeEvaluated(y,Ct.Name),h}function d(){var p;const h={},y=$(s);let m=!0;for(let E=0;E<o.length;E++){let O=o[E];if(O!=null&&O.$ref&&!(0,$$.schemaHasRulesButRef)(O,i.self.RULES)){const C=O.$ref;if(O=Fa.resolveRef.call(i.self,i.schemaEnv.root,i.baseId,C),O instanceof Fa.SchemaEnv&&(O=O.schema),O===void 0)throw new g$.default(i.opts.uriResolver,i.baseId,C)}const M=(p=O==null?void 0:O.properties)===null||p===void 0?void 0:p[a];if(typeof M!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);m=m&&(y||$(O)),b(M,E)}if(!m)throw new Error(`discriminator: "${a}" must be required`);return h;function $({required:E}){return Array.isArray(E)&&E.includes(a)}function b(E,O){if(E.const)w(E.const,O);else if(E.enum)for(const M of E.enum)w(M,O);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function w(E,O){if(typeof E!="string"||E in h)throw new Error(`discriminator: "${a}" values must be unique strings`);h[E]=O}}}};Wr.default=v$;const w$="http://json-schema.org/draft-07/schema#",_$="http://json-schema.org/draft-07/schema#",P$="Core schema meta-schema",E$={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},S$=["object","boolean"],j$={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},O$={$schema:w$,$id:_$,title:P$,definitions:E$,type:S$,properties:j$,default:!0};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv=void 0;const r=bt,n=ro,s=Wr,i=O$,o=["/properties"],a="http://json-schema.org/draft-07/schema";class f extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach(h=>this.addVocabulary(h)),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const h=this.opts.$data?this.$dataMetaSchema(i,o):i;this.addMetaSchema(h,a,!1),this.refs["http://json-schema.org/schema"]=a}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}}e.Ajv=f,t.exports=e=f,t.exports.Ajv=f,Object.defineProperty(e,"__esModule",{value:!0}),e.default=f;var c=Te;Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var u=B;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var l=tr;Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return l.default}});var d=St;Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return d.default}})})(Xs,Xs.exports);var ul=Xs.exports;const k$=zn.getDefaultExportFromCjs(ul);var ai={exports:{}},vo={},wo={},ir={};Object.defineProperty(ir,"__esModule",{value:!0});ir.dynamicAnchor=void 0;const Cs=B,I$=je,Va=_e,A$=Be,N$={keyword:"$dynamicAnchor",schemaType:"string",code:t=>dl(t,t.schema)};function dl(t,e){const{gen:r,it:n}=t;n.schemaEnv.root.dynamicAnchors[e]=!0;const s=(0,Cs._)`${I$.default.dynamicAnchors}${(0,Cs.getProperty)(e)}`,i=n.errSchemaPath==="#"?n.validateName:T$(t);r.if((0,Cs._)`!${s}`,()=>r.assign(s,i))}ir.dynamicAnchor=dl;function T$(t){const{schemaEnv:e,schema:r,self:n}=t.it,{root:s,baseId:i,localRefs:o,meta:a}=e.root,{schemaId:f}=n.opts,c=new Va.SchemaEnv({schema:r,schemaId:f,root:s,baseId:i,localRefs:o,meta:a});return Va.compileSchema.call(n,c),(0,A$.getValidate)(t,c)}ir.default=N$;var or={};Object.defineProperty(or,"__esModule",{value:!0});or.dynamicRef=void 0;const Ua=B,x$=je,za=Be,R$={keyword:"$dynamicRef",schemaType:"string",code:t=>pl(t,t.schema)};function pl(t,e){const{gen:r,keyword:n,it:s}=t;if(e[0]!=="#")throw new Error(`"${n}" only supports hash fragment reference`);const i=e.slice(1);if(s.allErrors)o();else{const f=r.let("valid",!1);o(f),t.ok(f)}function o(f){if(s.schemaEnv.root.dynamicAnchors[i]){const c=r.let("_v",(0,Ua._)`${x$.default.dynamicAnchors}${(0,Ua.getProperty)(i)}`);r.if(c,a(c,f),a(s.validateName,f))}else a(s.validateName,f)()}function a(f,c){return c?()=>r.block(()=>{(0,za.callRef)(t,f),r.let(c,!0)}):()=>(0,za.callRef)(t,f)}}or.dynamicRef=pl;or.default=R$;var _o={};Object.defineProperty(_o,"__esModule",{value:!0});const C$=ir,M$=T,q$={keyword:"$recursiveAnchor",schemaType:"boolean",code(t){t.schema?(0,C$.dynamicAnchor)(t,""):(0,M$.checkStrictMode)(t.it,"$recursiveAnchor: false is ignored")}};_o.default=q$;var Po={};Object.defineProperty(Po,"__esModule",{value:!0});const D$=or,L$={keyword:"$recursiveRef",schemaType:"string",code:t=>(0,D$.dynamicRef)(t,t.schema)};Po.default=L$;Object.defineProperty(wo,"__esModule",{value:!0});const F$=ir,V$=or,U$=_o,z$=Po,K$=[F$.default,V$.default,U$.default,z$.default];wo.default=K$;var Eo={},So={};Object.defineProperty(So,"__esModule",{value:!0});const Ka=ms,B$={keyword:"dependentRequired",type:"object",schemaType:"object",error:Ka.error,code:t=>(0,Ka.validatePropertyDeps)(t)};So.default=B$;var jo={};Object.defineProperty(jo,"__esModule",{value:!0});const H$=ms,G$={keyword:"dependentSchemas",type:"object",schemaType:"object",code:t=>(0,H$.validateSchemaDeps)(t)};jo.default=G$;var Oo={};Object.defineProperty(Oo,"__esModule",{value:!0});const J$=T,W$={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:t,parentSchema:e,it:r}){e.contains===void 0&&(0,J$.checkStrictMode)(r,`"${t}" without "contains" is ignored`)}};Oo.default=W$;Object.defineProperty(Eo,"__esModule",{value:!0});const Y$=So,X$=jo,Z$=Oo,Q$=[Y$.default,X$.default,Z$.default];Eo.default=Q$;var ko={},Io={};Object.defineProperty(Io,"__esModule",{value:!0});const rt=B,Ba=T,e0=je,t0={message:"must NOT have unevaluated properties",params:({params:t})=>(0,rt._)`{unevaluatedProperty: ${t.unevaluatedProperty}}`},r0={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:t0,code(t){const{gen:e,schema:r,data:n,errsCount:s,it:i}=t;if(!s)throw new Error("ajv implementation error");const{allErrors:o,props:a}=i;a instanceof rt.Name?e.if((0,rt._)`${a} !== true`,()=>e.forIn("key",n,l=>e.if(c(a,l),()=>f(l)))):a!==!0&&e.forIn("key",n,l=>a===void 0?f(l):e.if(u(a,l),()=>f(l))),i.props=!0,t.ok((0,rt._)`${s} === ${e0.default.errors}`);function f(l){if(r===!1){t.setParams({unevaluatedProperty:l}),t.error(),o||e.break();return}if(!(0,Ba.alwaysValidSchema)(i,r)){const d=e.name("valid");t.subschema({keyword:"unevaluatedProperties",dataProp:l,dataPropType:Ba.Type.Str},d),o||e.if((0,rt.not)(d),()=>e.break())}}function c(l,d){return(0,rt._)`!${l} || !${l}[${d}]`}function u(l,d){const p=[];for(const h in l)l[h]===!0&&p.push((0,rt._)`${d} !== ${h}`);return(0,rt.and)(...p)}}};Io.default=r0;var Ao={};Object.defineProperty(Ao,"__esModule",{value:!0});const mt=B,Ha=T,n0={message:({params:{len:t}})=>(0,mt.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,mt._)`{limit: ${t}}`},s0={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:n0,code(t){const{gen:e,schema:r,data:n,it:s}=t,i=s.items||0;if(i===!0)return;const o=e.const("len",(0,mt._)`${n}.length`);if(r===!1)t.setParams({len:i}),t.fail((0,mt._)`${o} > ${i}`);else if(typeof r=="object"&&!(0,Ha.alwaysValidSchema)(s,r)){const f=e.var("valid",(0,mt._)`${o} <= ${i}`);e.if((0,mt.not)(f),()=>a(f,i)),t.ok(f)}s.items=!0;function a(f,c){e.forRange("i",c,o,u=>{t.subschema({keyword:"unevaluatedItems",dataProp:u,dataPropType:Ha.Type.Num},f),s.allErrors||e.if((0,mt.not)(f),()=>e.break())})}}};Ao.default=s0;Object.defineProperty(ko,"__esModule",{value:!0});const i0=Io,o0=Ao,a0=[i0.default,o0.default];ko.default=a0;Object.defineProperty(vo,"__esModule",{value:!0});const c0=ns,f0=ss,l0=Gr,u0=wo,d0=Eo,p0=ko,m0=Jr,Ga=Pt,h0=[u0.default,c0.default,f0.default,(0,l0.default)(!0),m0.default,Ga.metadataVocabulary,Ga.contentVocabulary,d0.default,p0.default];vo.default=h0;var No={};const y0="https://json-schema.org/draft/2020-12/schema",g0="https://json-schema.org/draft/2020-12/schema",$0={"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},b0="meta",v0="Core and Validation specifications meta-schema",w0=[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],_0=["object","boolean"],P0="This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",E0={definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}},S0={$schema:y0,$id:g0,$vocabulary:$0,$dynamicAnchor:b0,title:v0,allOf:w0,type:_0,$comment:P0,properties:E0},j0="https://json-schema.org/draft/2020-12/schema",O0="https://json-schema.org/draft/2020-12/meta/applicator",k0={"https://json-schema.org/draft/2020-12/vocab/applicator":!0},I0="meta",A0="Applicator vocabulary meta-schema",N0=["object","boolean"],T0={prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},x0={schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}},R0={$schema:j0,$id:O0,$vocabulary:k0,$dynamicAnchor:I0,title:A0,type:N0,properties:T0,$defs:x0},C0="https://json-schema.org/draft/2020-12/schema",M0="https://json-schema.org/draft/2020-12/meta/unevaluated",q0={"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},D0="meta",L0="Unevaluated applicator vocabulary meta-schema",F0=["object","boolean"],V0={unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}},U0={$schema:C0,$id:M0,$vocabulary:q0,$dynamicAnchor:D0,title:L0,type:F0,properties:V0},z0="https://json-schema.org/draft/2020-12/schema",K0="https://json-schema.org/draft/2020-12/meta/content",B0={"https://json-schema.org/draft/2020-12/vocab/content":!0},H0="meta",G0="Content vocabulary meta-schema",J0=["object","boolean"],W0={contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}},Y0={$schema:z0,$id:K0,$vocabulary:B0,$dynamicAnchor:H0,title:G0,type:J0,properties:W0},X0="https://json-schema.org/draft/2020-12/schema",Z0="https://json-schema.org/draft/2020-12/meta/core",Q0={"https://json-schema.org/draft/2020-12/vocab/core":!0},eb="meta",tb="Core vocabulary meta-schema",rb=["object","boolean"],nb={$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},sb={anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}},ib={$schema:X0,$id:Z0,$vocabulary:Q0,$dynamicAnchor:eb,title:tb,type:rb,properties:nb,$defs:sb},ob="https://json-schema.org/draft/2020-12/schema",ab="https://json-schema.org/draft/2020-12/meta/format-annotation",cb={"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},fb="meta",lb="Format vocabulary meta-schema for annotation results",ub=["object","boolean"],db={format:{type:"string"}},pb={$schema:ob,$id:ab,$vocabulary:cb,$dynamicAnchor:fb,title:lb,type:ub,properties:db},mb="https://json-schema.org/draft/2020-12/schema",hb="https://json-schema.org/draft/2020-12/meta/meta-data",yb={"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},gb="meta",$b="Meta-data vocabulary meta-schema",bb=["object","boolean"],vb={title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}},wb={$schema:mb,$id:hb,$vocabulary:yb,$dynamicAnchor:gb,title:$b,type:bb,properties:vb},_b="https://json-schema.org/draft/2020-12/schema",Pb="https://json-schema.org/draft/2020-12/meta/validation",Eb={"https://json-schema.org/draft/2020-12/vocab/validation":!0},Sb="meta",jb="Validation vocabulary meta-schema",Ob=["object","boolean"],kb={type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},Ib={nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},Ab={$schema:_b,$id:Pb,$vocabulary:Eb,$dynamicAnchor:Sb,title:jb,type:Ob,properties:kb,$defs:Ib};Object.defineProperty(No,"__esModule",{value:!0});const Nb=S0,Tb=R0,xb=U0,Rb=Y0,Cb=ib,Mb=pb,qb=wb,Db=Ab,Lb=["/properties"];function Fb(t){return[Nb,Tb,xb,Rb,Cb,e(this,Mb),qb,e(this,Db)].forEach(r=>this.addMetaSchema(r,void 0,!1)),this;function e(r,n){return t?r.$dataMetaSchema(n,Lb):n}}No.default=Fb;(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv2020=void 0;const r=bt,n=vo,s=Wr,i=No,o="https://json-schema.org/draft/2020-12/schema";class a extends r.default{constructor(p={}){super({...p,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),n.default.forEach(p=>this.addVocabulary(p)),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:p,meta:h}=this.opts;h&&(i.default.call(this,p),this.refs["http://json-schema.org/schema"]=o)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(o)?o:void 0)}}e.Ajv2020=a,t.exports=e=a,t.exports.Ajv2020=a,Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var f=Te;Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return f.KeywordCxt}});var c=B;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return c._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return c.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return c.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return c.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return c.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return c.CodeGen}});var u=tr;Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return u.default}});var l=St;Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return l.default}})})(ai,ai.exports);var Vb=ai.exports;const Ub=zn.getDefaultExportFromCjs(Vb);var ci={exports:{}},To={},xo={};Object.defineProperty(xo,"__esModule",{value:!0});const zb=Be,Kb=["$schema","id","$defs",{keyword:"$comment"},"definitions",zb.default];xo.default=Kb;var Ro={},Co={};Object.defineProperty(Co,"__esModule",{value:!0});const fi=bt,Bb=B,tt=Bb.operators,li={maximum:{exclusive:"exclusiveMaximum",ops:[{okStr:"<=",ok:tt.LTE,fail:tt.GT},{okStr:"<",ok:tt.LT,fail:tt.GTE}]},minimum:{exclusive:"exclusiveMinimum",ops:[{okStr:">=",ok:tt.GTE,fail:tt.LT},{okStr:">",ok:tt.GT,fail:tt.LTE}]}},Hb={message:t=>fi.str`must be ${ui(t).okStr} ${t.schemaCode}`,params:t=>fi._`{comparison: ${ui(t).okStr}, limit: ${t.schemaCode}}`},Gb={keyword:Object.keys(li),type:"number",schemaType:"number",$data:!0,error:Hb,code(t){const{data:e,schemaCode:r}=t;t.fail$data(fi._`${e} ${ui(t).fail} ${r} || isNaN(${e})`)}};function ui(t){var e;const r=t.keyword,n=!((e=t.parentSchema)===null||e===void 0)&&e[li[r].exclusive]?1:0;return li[r].ops[n]}Co.default=Gb;var Mo={};Object.defineProperty(Mo,"__esModule",{value:!0});const Ja={exclusiveMaximum:"maximum",exclusiveMinimum:"minimum"},Jb={keyword:Object.keys(Ja),type:"number",schemaType:"boolean",code({keyword:t,parentSchema:e}){const r=Ja[t];if(e[r]===void 0)throw new Error(`${t} can only be used with ${r}`)}};Mo.default=Jb;Object.defineProperty(Ro,"__esModule",{value:!0});const Wb=Co,Yb=Mo,Xb=is,Zb=os,Qb=as,ev=cs,tv=fs,rv=ls,nv=us,sv=ds,iv=ps,ov=[Wb.default,Yb.default,Xb.default,Zb.default,Qb.default,ev.default,tv.default,rv.default,nv.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},sv.default,iv.default];Ro.default=ov;Object.defineProperty(To,"__esModule",{value:!0});const av=xo,cv=Ro,fv=Gr,lv=Jr,uv=["title","description","default"],dv=[av.default,cv.default,fv.default(),lv.default,uv];To.default=dv;const pv="http://json-schema.org/draft-04/schema#",mv="http://json-schema.org/draft-04/schema#",hv="Core schema meta-schema",yv={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},gv="object",$v={id:{type:"string",format:"uri"},$schema:{type:"string",format:"uri"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{$ref:"#/definitions/positiveInteger"},minLength:{$ref:"#/definitions/positiveIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{$ref:"#/definitions/positiveInteger"},minItems:{$ref:"#/definitions/positiveIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxProperties:{$ref:"#/definitions/positiveInteger"},minProperties:{$ref:"#/definitions/positiveIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},bv={exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},vv={id:pv,$schema:mv,description:hv,definitions:yv,type:gv,properties:$v,dependencies:bv,default:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;const r=bt,n=To,s=Wr,i=vv,o=["/properties"],a="http://json-schema.org/draft-04/schema";class f extends r.default{constructor(d={}){super({...d,schemaId:"id"})}_addVocabularies(){super._addVocabularies(),n.default.forEach(d=>this.addVocabulary(d)),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const d=this.opts.$data?this.$dataMetaSchema(i,o):i;this.addMetaSchema(d,a,!1),this.refs["http://json-schema.org/schema"]=a}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}}t.exports=e=f,Object.defineProperty(e,"__esModule",{value:!0}),e.default=f;var c=bt;Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var u=bt;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}})})(ci,ci.exports);var wv=ci.exports;const _v=zn.getDefaultExportFromCjs(wv);var di={exports:{}},ml={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatNames=t.fastFormats=t.fullFormats=void 0;function e(x,L){return{validate:x,compare:L}}t.fullFormats={date:e(i,o),time:e(f(!0),c),"date-time":e(d(!0),p),"iso-time":e(f(),u),"iso-date-time":e(d(),h),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:$,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:X,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:w,int32:{type:"number",validate:M},int64:{type:"number",validate:C},float:{type:"number",validate:N},double:{type:"number",validate:N},password:!0,binary:!0},t.fastFormats={...t.fullFormats,date:e(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,o),time:e(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,c),"date-time":e(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,p),"iso-time":e(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,u),"iso-date-time":e(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,h),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},t.formatNames=Object.keys(t.fullFormats);function r(x){return x%4===0&&(x%100!==0||x%400===0)}const n=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,s=[0,31,28,31,30,31,30,31,31,30,31,30,31];function i(x){const L=n.exec(x);if(!L)return!1;const H=+L[1],U=+L[2],te=+L[3];return U>=1&&U<=12&&te>=1&&te<=(U===2&&r(H)?29:s[U])}function o(x,L){if(x&&L)return x>L?1:x<L?-1:0}const a=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function f(x){return function(H){const U=a.exec(H);if(!U)return!1;const te=+U[1],ie=+U[2],pe=+U[3],Oe=U[4],ke=U[5]==="-"?-1:1,A=+(U[6]||0),_=+(U[7]||0);if(A>23||_>59||x&&!Oe)return!1;if(te<=23&&ie<=59&&pe<60)return!0;const k=ie-_*ke,P=te-A*ke-(k<0?1:0);return(P===23||P===-1)&&(k===59||k===-1)&&pe<61}}function c(x,L){if(!(x&&L))return;const H=new Date("2020-01-01T"+x).valueOf(),U=new Date("2020-01-01T"+L).valueOf();if(H&&U)return H-U}function u(x,L){if(!(x&&L))return;const H=a.exec(x),U=a.exec(L);if(H&&U)return x=H[1]+H[2]+H[3],L=U[1]+U[2]+U[3],x>L?1:x<L?-1:0}const l=/t|\s/i;function d(x){const L=f(x);return function(U){const te=U.split(l);return te.length===2&&i(te[0])&&L(te[1])}}function p(x,L){if(!(x&&L))return;const H=new Date(x).valueOf(),U=new Date(L).valueOf();if(H&&U)return H-U}function h(x,L){if(!(x&&L))return;const[H,U]=x.split(l),[te,ie]=L.split(l),pe=o(H,te);if(pe!==void 0)return pe||c(U,ie)}const y=/\/|:/,m=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function $(x){return y.test(x)&&m.test(x)}const b=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function w(x){return b.lastIndex=0,b.test(x)}const E=-2147483648,O=2**31-1;function M(x){return Number.isInteger(x)&&x<=O&&x>=E}function C(x){return Number.isInteger(x)}function N(){return!0}const z=/[^\\]\\Z/;function X(x){if(z.test(x))return!1;try{return new RegExp(x),!0}catch{return!1}}})(ml);var hl={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatLimitDefinition=void 0;const e=ul,r=B,n=r.operators,s={formatMaximum:{okStr:"<=",ok:n.LTE,fail:n.GT},formatMinimum:{okStr:">=",ok:n.GTE,fail:n.LT},formatExclusiveMaximum:{okStr:"<",ok:n.LT,fail:n.GTE},formatExclusiveMinimum:{okStr:">",ok:n.GT,fail:n.LTE}},i={message:({keyword:a,schemaCode:f})=>(0,r.str)`should be ${s[a].okStr} ${f}`,params:({keyword:a,schemaCode:f})=>(0,r._)`{comparison: ${s[a].okStr}, limit: ${f}}`};t.formatLimitDefinition={keyword:Object.keys(s),type:"string",schemaType:"string",$data:!0,error:i,code(a){const{gen:f,data:c,schemaCode:u,keyword:l,it:d}=a,{opts:p,self:h}=d;if(!p.validateFormats)return;const y=new e.KeywordCxt(d,h.RULES.all.format.definition,"format");y.$data?m():$();function m(){const w=f.scopeValue("formats",{ref:h.formats,code:p.code.formats}),E=f.const("fmt",(0,r._)`${w}[${y.schemaCode}]`);a.fail$data((0,r.or)((0,r._)`typeof ${E} != "object"`,(0,r._)`${E} instanceof RegExp`,(0,r._)`typeof ${E}.compare != "function"`,b(E)))}function $(){const w=y.schema,E=h.formats[w];if(!E||E===!0)return;if(typeof E!="object"||E instanceof RegExp||typeof E.compare!="function")throw new Error(`"${l}": format "${w}" does not define "compare" function`);const O=f.scopeValue("formats",{key:w,ref:E,code:p.code.formats?(0,r._)`${p.code.formats}${(0,r.getProperty)(w)}`:void 0});a.fail$data(b(O))}function b(w){return(0,r._)`${w}.compare(${c}, ${u}) ${s[l].fail} 0`}},dependencies:["format"]};const o=a=>(a.addKeyword(t.formatLimitDefinition),a);t.default=o})(hl);(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const r=ml,n=hl,s=B,i=new s.Name("fullFormats"),o=new s.Name("fastFormats"),a=(c,u={keywords:!0})=>{if(Array.isArray(u))return f(c,u,r.fullFormats,i),c;const[l,d]=u.mode==="fast"?[r.fastFormats,o]:[r.fullFormats,i],p=u.formats||r.formatNames;return f(c,p,l,d),u.keywords&&(0,n.default)(c),c};a.get=(c,u="full")=>{const d=(u==="fast"?r.fastFormats:r.fullFormats)[c];if(!d)throw new Error(`Unknown format "${c}"`);return d};function f(c,u,l,d){var p,h;(p=(h=c.opts.code).formats)!==null&&p!==void 0||(h.formats=(0,s._)`require("ajv-formats/dist/formats").${d}`);for(const y of u)c.addFormat(y,l[y])}t.exports=e=a,Object.defineProperty(e,"__esModule",{value:!0}),e.default=a})(di,di.exports);var Pv=di.exports;const Ev=zn.getDefaultExportFromCjs(Pv),Sv=t=>e=>t===e,jv=t=>e=>!t(e),Ov=t=>Object.values(t),kv=t=>t!==void 0,jt=t=>e=>e.keyword===t,gn=jt("required"),Iv=jt("anyOf"),$n=jt("oneOf"),Wa=jt("if"),yl=jt("enum"),Av=jt("additionalProperties"),Nv=jt("unevaluatedProperties"),In=t=>(t==null?void 0:t.errors)||[],gl=t=>t&&Ov(t.children)||[],Tv=t=>e=>gl(t).filter(jv(Sv(e))),Ya=t=>e=>e.reduce((r,n)=>r.concat(n),t);class Ot{constructor(e={isIdentifierLocation:!1},{data:r,schema:n,jsonAst:s,jsonRaw:i}){this.options=e,this.data=r,this.schema=n,this.jsonAst=s,this.jsonRaw=i}get instancePath(){return typeof this.options.instancePath<"u"?this.options.instancePath:this.options.dataPath}getError(){throw new Error(`Implement the 'getError' method inside ${this.constructor.name}!`)}}class xv extends Ot{constructor(...e){super(...e),this.name="AdditionalPropValidationError",this.options.isIdentifierLocation=!0}getError(){const{params:e}=this.options;return{message:`Property ${e.additionalProperty} is not expected to be here`,path:this.instancePath}}}class Rv extends Ot{constructor(...e){super(...e),this.name="DefaultValidationError",this.options.isSkipEndLocation=!0}getError(){const{keyword:e,message:r}=this.options;return{message:`${e} ${r}`,path:this.instancePath}}}var gs={},Cv=/~/,Mv=/~[01]/g;function qv(t){switch(t){case"~1":return"/";case"~0":return"~"}throw new Error("Invalid tilde escape: "+t)}function $l(t){return Cv.test(t)?t.replace(Mv,qv):t}function Dv(t,e,r){for(var n,s,i=1,o=e.length;i<o;){if(e[i]==="constructor"||e[i]==="prototype"||e[i]==="__proto__")return t;if(n=$l(e[i++]),s=o>i,typeof t[n]>"u"&&(Array.isArray(t)&&n==="-"&&(n=t.length),s&&(e[i]!==""&&e[i]<1/0||e[i]==="-"?t[n]=[]:t[n]={})),!s)break;t=t[n]}var a=t[n];return r===void 0?delete t[n]:t[n]=r,a}function qo(t){if(typeof t=="string"){if(t=t.split("/"),t[0]==="")return t;throw new Error("Invalid JSON pointer.")}else if(Array.isArray(t)){for(const e of t)if(typeof e!="string"&&typeof e!="number")throw new Error("Invalid JSON pointer. Must be of type string or number.");return t}throw new Error("Invalid JSON pointer.")}function bl(t,e){if(typeof t!="object")throw new Error("Invalid input object.");e=qo(e);var r=e.length;if(r===1)return t;for(var n=1;n<r;){if(t=t[$l(e[n++])],r===n)return t;if(typeof t!="object"||t===null)return}}function vl(t,e,r){if(typeof t!="object")throw new Error("Invalid input object.");if(e=qo(e),e.length===0)throw new Error("Invalid JSON pointer for set.");return Dv(t,e,r)}function Lv(t){var e=qo(t);return{get:function(r){return bl(r,e)},set:function(r,n){return vl(r,e,n)}}}gs.get=bl;gs.set=vl;gs.compile=Lv;const bn=[],Ms=[];function Fv(t,e,r){if(t===e)return 0;const n=r==null?void 0:r.maxDistance,s=t;t.length>e.length&&(t=e,e=s);let i=t.length,o=e.length;for(;i>0&&t.charCodeAt(~-i)===e.charCodeAt(~-o);)i--,o--;let a=0;for(;a<i&&t.charCodeAt(a)===e.charCodeAt(a);)a++;if(i-=a,o-=a,i===0)return n!==void 0&&o>n?n:o;let f,c,u,l,d=0,p=0;for(;d<i;)Ms[d]=t.charCodeAt(a+d),bn[d]=++d;for(;p<o;)for(f=e.charCodeAt(a+p),u=p++,c=p,d=0;d<i;d++)l=f===Ms[d]?u:u+1,u=bn[d],c=bn[d]=u>c?l>c?c+1:l:l>u?u+1:l;return bn.length=i,Ms.length=i,n!==void 0&&c>n?n:c}class Vv extends Ot{constructor(...e){super(...e),this.name="EnumValidationError"}getError(){const{message:e,params:r}=this.options,n=this.findBestMatch(),s=r.allowedValues.join(", "),i={message:`${e}: ${s}`,path:this.instancePath};return n!==null&&(i.suggestion=`Did you mean ${n}?`),i}findBestMatch(){const{params:{allowedValues:e}}=this.options,r=this.instancePath===""?this.data:gs.get(this.data,this.instancePath);if(!r)return null;const n=e.map(s=>({value:s,weight:Fv(s,r.toString())})).sort((s,i)=>s.weight>i.weight?1:s.weight<i.weight?-1:0)[0];return e.length===1||n.weight<n.value.length?n.value:null}}class Uv extends Ot{constructor(...e){super(...e),this.name="FormatValidationError",this.options.isSkipEndLocation=!0}getError(){const{keyword:e,message:r,params:n,instancePath:s}=this.options,i=this.instancePath;return(n==null?void 0:n.format)==="uri-reference"&&(i!=null&&i.endsWith("/$ref"))?{message:this._getUriReferenceMessage(),path:i}:{message:`${e} ${r}`,path:i}}_getUriReferenceMessage(){const e=this._extractRefValue();return e&&/[^\x00-\x7F]/.test(e)?`$ref "${e}" contains non-ASCII characters`:e?`$ref "${e}" is not a valid URI reference`:"$ref is not a valid URI reference"}_extractRefValue(){const e=this.schema;if(!e||typeof e!="object")return null;const r=this.instancePath;if(!r)return null;const n=r.split("/").filter(Boolean).map(i=>i.replace(/~1/g,"/").replace(/~0/g,"~"));let s=e;for(const i of n){if(s==null||typeof s!="object")return null;s=s[i]}return typeof s=="string"?s:null}}class zv extends Ot{constructor(...e){super(...e),this.name="PatternValidationError",this.options.isIdentifierLocation=!0}getError(){const{params:e,propertyName:r}=this.options;return{message:`Property "${r}" must match pattern ${e.pattern}`,path:this.instancePath}}}class Kv extends Ot{constructor(...e){super(...e),this.name="RequiredValidationError"}getError(){const{message:e}=this.options;return{message:`${e}`,path:this.instancePath}}}class Bv extends Ot{constructor(...e){super(...e),this.name="UnevaluatedPropValidationError",this.options.isIdentifierLocation=!0}getError(){const{params:e}=this.options;return{message:`Property ${e.unevaluatedProperty} is not expected to be here`,path:this.instancePath}}}const Hv=/\/[\w$_-]+(\/\d+)?/g;function Gv(t=[]){const e={children:{}};return t.forEach(r=>{const n=typeof r.instancePath<"u"?r.instancePath:r.dataPath,s=n===""?[""]:n.match(Hv);s&&s.reduce((i,o,a)=>(i.children[o]=i.children[o]||{children:{},errors:[]},a===s.length-1&&i.children[o].errors.push(r),i.children[o]),e)}),e}function wl(t,e,r){var l;const n=In(t),s=n.some($n),i=n.some(Iv),o=n.some(gn),a=n.some(Wa),f=n.some(Av),c=n.some(Nv),u=Object.keys(t.children||{}).length>0;if(a&&(f||c)&&(t.errors=n.filter(d=>!Wa(d))),s&&o)if(f||c)t.errors=n.filter(d=>!gn(d)&&!$n(d));else if(u)delete t.errors;else{const d=n.filter(p=>{var h;return gn(p)&&((h=p.params)==null?void 0:h.missingProperty)!=="$ref"});t.errors=d.length>0?d:n.filter($n)}else if(s&&!o&&u)delete t.errors;else if(s&&!o&&!u){const d=n.filter($n);d.length>1&&(t.errors=[d[0]])}else o&&!s&&(t.errors=n.filter(gn),t.children={});i&&Object.keys(t.children).length>0&&delete t.errors,(l=t.errors)!=null&&l.length&&In(t).every(yl)&&Tv(e)(t).filter(kv).some(In)&&delete e.children[r],Object.entries(t.children).forEach(([d,p])=>wl(p,t,d))}function _l(t,e){const r=In(t);if(r.length&&r.every(yl)){const s=[...new Set(Ya([])(r.map(o=>o.params.allowedValues)))],i=r[0];return[new Vv({...i,params:{allowedValues:s}},e)]}return Ya(r.reduce((n,s)=>{switch(s.keyword){case"additionalProperties":return n.concat(new xv(s,e));case"pattern":return n.concat(new zv(s,e));case"format":return n.concat(new Uv(s,e));case"required":return n.concat(new Kv(s,e));case"unevaluatedProperties":return n.concat(new Bv(s,e));default:return n.concat(new Rv(s,e))}},[]))(gl(t).map(n=>_l(n,e)))}function Jv(t,e){const r=Gv(t||[]);return wl(r),_l(r,e)}function Wv(t,e,r,n={}){const{indent:s=null,json:i=null}=n,o=i||JSON.stringify(e,null,s),a=c=>c.getError();return Jv(r,{data:e,schema:t,jsonRaw:o}).map(a)}function vn(t,e){if(typeof e=="string")return[{message:e}];if(!t||typeof t!="object")return[{message:"Invalid specification"}];let r;try{r=Wv(t,null,e,{indent:2}).map(s=>(s.message=s.message.trim(),s))}catch(s){return console.error(s),Array.isArray(e)?e.map(i=>{var a;let o=i.message||"Validation error";return i.keyword==="additionalProperties"&&((a=i.params)!=null&&a.additionalProperty)&&(o=`Property ${i.params.additionalProperty} is not expected to be here`),{message:o,path:i.dataPath||i.instancePath}}):[{message:"Validation failed"}]}const n=new Set;return r.filter(s=>{const i=`${s.message}||${s.path}`;return n.has(i)?!1:(n.add(i),!0)})}const Yv=new Set(["get","put","post","delete","options","head","patch","trace"]),Xv=/{([^}]+)}/g;function Zv(t){const e=t==null?void 0:t.paths;if(!e||typeof e!="object")return[];const r=[];for(const[n,s]of Object.entries(e)){if(!pi(s))continue;const i=Object.entries(s).filter(([f,c])=>Yv.has(f)&&pi(c));if(i.length===0)continue;const o=new Set(Qv(n)),a=Xa(s.parameters,["paths",n,"parameters"]);for(const f of a)o.has(f.name)||r.push({path:f.path,message:`Path parameter "${f.name}" must have the corresponding {${f.name}} segment in the "${n}" path`});for(const[f,c]of i){const u=Xa(c.parameters,["paths",n,f,"parameters"]);for(const d of u)o.has(d.name)||r.push({path:d.path,message:`Path parameter "${d.name}" must have the corresponding {${d.name}} segment in the "${n}" path`});const l=new Set([...a,...u].map(d=>d.name));for(const d of o)l.has(d)||r.push({path:["paths",n,f],message:`Declared path parameter "${d}" needs to be defined as a path parameter at either the path or operation level`})}}return tw(r)}function Qv(t){return[...t.matchAll(Xv)].map(e=>ew(e[1]))}function ew(t){return t.endsWith("+")?t.slice(0,-1):t}function Xa(t,e){return Array.isArray(t)?t.flatMap((r,n)=>!pi(r)||r.in!=="path"||typeof r.name!="string"?[]:[{name:r.name,path:[...e,String(n),"name"]}]):[]}function tw(t){const e=new Set;return t.filter(r=>{var s;const n=`${r.message}||${((s=r.path)==null?void 0:s.join("."))??""}`;return e.has(n)?!1:(e.add(n),!0)})}function pi(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}const rw={"http://json-schema.org/draft-04/schema#":_v,"http://json-schema.org/draft-07/schema#":k$,"https://json-schema.org/draft/2020-12/schema":Ub};class Pl{constructor(){Xe(this,"version");Xe(this,"ajvValidators",{});Xe(this,"errors");Xe(this,"specificationVersion");Xe(this,"specificationType");Xe(this,"specification")}isMutableRecord(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}validate(e,r){const n=e.find(i=>i.isEntrypoint),s=n==null?void 0:n.specification;this.specification=s,this.isMutableRecord(this.specification)&&this.isMutableRecord(this.specification.info)&&typeof this.specification.info.version!="string"&&(this.specification.info.version="0.0.1");try{if(s==null){if(r!=null&&r.throwOnError)throw new Error($e.EMPTY_OR_INVALID);return{valid:!1,errors:vn(s,$e.EMPTY_OR_INVALID)}}const{version:i,specificationType:o,specificationVersion:a}=hi(s);if(this.version=i,this.specificationVersion=a,this.specificationType=o,!i){if(r!=null&&r.throwOnError)throw new Error($e.OPENAPI_VERSION_NOT_SUPPORTED);return{valid:!1,errors:vn(s,$e.OPENAPI_VERSION_NOT_SUPPORTED)}}const f=this.getAjvValidator(i),c=f(s);if(f.errors&&f.errors.length>0){if(r!=null&&r.throwOnError)throw new Error(f.errors[0].message);return{valid:!1,errors:vn(s,f.errors)}}const u=Jc(e,r),l=Zv(u.schema),d=[...u.errors,...l];return c&&u.valid&&l.length===0?{valid:!0,errors:d,schema:u.schema}:{valid:!1,errors:d,schema:u.schema}}catch(i){if(r!=null&&r.throwOnError)throw i;return{valid:!1,errors:vn(s,i.message??i)}}}getAjvValidator(e){if(this.ajvValidators[e])return this.ajvValidators[e];const r=ic[e],n=rw[r.$schema],s=new n({strict:!1,discriminator:!0,allErrors:!0});return Ev(s),(e==="3.1"||e==="3.2")&&s.addFormat("media-range",!0),this.ajvValidators[e]=s.compile(r)}}Xe(Pl,"supportedVersions",oc);const nw=(t,e)=>{if(!(!t||typeof t!="object")&&(e==="2.0"&&t.swagger==="2.0"||(e==="3.0"||e==="3.1"||e==="3.2")&&typeof t.openapi=="string"))return t};function El(t,e){try{const r=Kr(t),n=new Pl,s=n.validate(r,e);if(s.valid){const i=nw(n.specification,n.version);return i?Promise.resolve({...s,specification:i,version:n.version}):Promise.resolve({valid:!1,errors:[{message:`Validated OpenAPI ${n.version} document is missing required top-level version field.`}],schema:s.schema,specification:n.specification,version:n.version})}return Promise.resolve({valid:!1,errors:s.errors,schema:s.schema,specification:n.specification,version:n.version})}catch(r){return Promise.reject(r)}}async function Yr(t){const{input:e}={...t};let r={};for(const n of t.tasks){const s=n.name,i="options"in n?n.options:void 0,o=r.specification?r.specification:typeof e=="object"?structuredClone(e):e;s==="load"?r={...r,...await Mi(e,i)}:s==="filter"?r={...r,...Xc(o,i)}:s==="dereference"?r={...r,...Yc(o,i)}:s==="upgrade"?r={...r,...Ci(o)}:s==="validate"&&(r={...r,...await El(o,i)})}return r}async function Xr(t){const{filesystem:e}=await Yr(t);return hi(Le(e).specification)}async function Zr(t){const{filesystem:e}=await Yr(t);return e}async function Qr(t){return{filesystem:[],...await Yr(t)}}const Sl=t=>JSON.stringify(t,null,2);async function en(t){const{filesystem:e}=await Yr(t);return Sl(Le(e).specification)}const jl=t=>Td(t);async function tn(t){const{filesystem:e}=await Yr(t);return jl(Le(e).specification)}function rn(t,e){return{...t,tasks:[...t.tasks,e]}}function $s(t,e){var s;const r={name:"dereference",options:{throwOnError:(s=t.options)==null?void 0:s.throwOnError,...e??{}}},n=rn(t,r);return{details:()=>Xr(n),files:()=>Zr(n),get:()=>Qr(n),toJson:()=>en(n),toYaml:()=>tn(n)}}function Do(t,e){const n=rn(t,{name:"filter",options:e});return{dereference:s=>$s(n,s),details:()=>Xr(n),files:()=>Zr(n),get:()=>Qr(n),toJson:()=>en(n),toYaml:()=>tn(n)}}function Ol(t,e){var s;const r={name:"validate",options:{throwOnError:(s=t.options)==null?void 0:s.throwOnError,...e??{}}},n=rn(t,r);return{dereference:i=>$s(n,i),details:()=>Xr(n),files:()=>Zr(n),filter:i=>Do(n,i),get:()=>Qr(n),toJson:()=>en(n),toYaml:()=>tn(n),upgrade:()=>kl(n)}}function kl(t){const r=rn(t,{name:"upgrade"});return{dereference:n=>$s(r,n),details:()=>Xr(r),files:()=>Zr(r),filter:n=>Do(r,n),get:()=>Qr(r),toJson:()=>en(r),toYaml:()=>tn(r),validate:n=>Ol(r,n)}}function sw(t,e,r){var i;const n={name:"load",options:{throwOnError:(i=t.options)==null?void 0:i.throwOnError,...r}},s={...rn(t,n),input:e};return{dereference:o=>$s(s,o),details:()=>Xr(s),files:()=>Zr(s),filter:o=>Do(s,o),get:()=>Qr(s),upgrade:()=>kl(s),toJson:()=>en(s),toYaml:()=>tn(s),validate:o=>Ol(s,o)}}function iw(t){const e={input:null,options:t,tasks:[]};return{load:(r,n)=>sw(e,r,n)}}const ow="API",aw="1.0",cw=t=>{var e,r;return{...t,info:{...t.info,title:((e=t.info)==null?void 0:e.title)??ow,version:((r=t.info)==null?void 0:r.version)??aw}}},fw="3.1.1",lw=t=>({openapi:t.openapi??fw,...t}),uw=t=>{if(!t.paths)return t;const e=new Set;for(const s of Object.values(t.paths))if(typeof s=="object"&&s!==null){for(const i of Object.values(s))if(typeof i=="object"&&i!==null&&"tags"in i){const o=i.tags;Array.isArray(o)&&o.forEach(a=>e.add(String(a)))}}const r=new Set((Array.isArray(t.tags)?t.tags:[]).map(s=>typeof s=="object"&&s!==null?String(s.name):null).filter(Boolean)),n=[...e].filter(s=>!r.has(s)).map(s=>({name:s}));return{...t,tags:[...Array.isArray(t.tags)?t.tags:[],...n]}},dw=t=>{var r;if(!((r=t.components)!=null&&r.securitySchemes))return t;const e={...t.components.securitySchemes};for(const n of Object.values(e))if(typeof n=="object"&&n!==null&&"type"in n){const s=String(n.type).toLowerCase();n.type={apikey:"apiKey",oauth2:"oauth2",http:"http",mutualtls:"mutualTLS",openidconnect:"openIdConnect"}[s]??s}for(const n of Object.values(e))if(typeof n=="object"&&n!==null&&"type"in n&&n.type==="oauth2"&&"flows"in n){const s=n.flows;for(const i of Object.values(s))typeof i=="object"&&i!==null&&"scopes"in i&&Array.isArray(i.scopes)&&(i.scopes=i.scopes.reduce((o,a)=>(o[a]="",o),{}))}return{...t,components:{...t.components,securitySchemes:e}}},pw=t=>{if("swagger"in t)throw new Error("Swagger 2.0 documents are not supported. Please upgrade to OpenAPI 3.x.");return t};function mw(t){return[pw,lw,cw,uw,dw].reduce((r,n)=>n(r),t)}exports.dereference=Yc;exports.escapeJsonPointer=Kn;exports.filter=Xc;exports.isJson=Rd;exports.isYaml=Cd;exports.join=vp;exports.load=Mi;exports.normalize=Mr;exports.openapi=iw;exports.sanitize=mw;exports.toJson=Sl;exports.toYaml=jl;exports.traverse=xr;exports.unescapeJsonPointer=Gc;exports.upgrade=Ci;exports.upgradeFromThreeToThreeOne=sc;exports.upgradeFromTwoToThree=ec;exports.validate=El;