apiuikit 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (311) hide show
  1. package/THIRD_PARTY_NOTICES.md +44 -0
  2. package/dist/App.d.ts +2 -0
  3. package/dist/apiuikit.cjs.js +1 -0
  4. package/dist/apiuikit.css +1 -0
  5. package/dist/apiuikit.es.js +12 -0
  6. package/dist/components/Authorization.d.ts +27 -0
  7. package/dist/components/Bindings.d.ts +7 -0
  8. package/dist/components/ChannelAddress.d.ts +10 -0
  9. package/dist/components/CodeBlock.d.ts +6 -0
  10. package/dist/components/ContentTab.d.ts +9 -0
  11. package/dist/components/CopyButton.d.ts +6 -0
  12. package/dist/components/DefinitionListItem.d.ts +16 -0
  13. package/dist/components/Examples.d.ts +6 -0
  14. package/dist/components/InfoMetadata.d.ts +2 -0
  15. package/dist/components/Markdown.d.ts +5 -0
  16. package/dist/components/Navigation.d.ts +21 -0
  17. package/dist/components/Reply.d.ts +10 -0
  18. package/dist/components/Section.d.ts +11 -0
  19. package/dist/components/SidePanel.d.ts +10 -0
  20. package/dist/components/TabToggle.d.ts +11 -0
  21. package/dist/components/Tabs.d.ts +17 -0
  22. package/dist/components/Tag.d.ts +7 -0
  23. package/dist/components/VerticalNavigation.d.ts +7 -0
  24. package/dist/components/schema/ExpandToggle.d.ts +8 -0
  25. package/dist/components/schema/SchemaCaseDetail.d.ts +6 -0
  26. package/dist/components/schema/SchemaConstraints.d.ts +10 -0
  27. package/dist/components/schema/SchemaFieldMeta.d.ts +11 -0
  28. package/dist/components/schema/SchemaIfThenElseBranch.d.ts +11 -0
  29. package/dist/components/schema/SchemaMapBranch.d.ts +8 -0
  30. package/dist/components/schema/SchemaNode.d.ts +18 -0
  31. package/dist/components/schema/SchemaNotBranch.d.ts +12 -0
  32. package/dist/components/schema/SchemaTab.d.ts +9 -0
  33. package/dist/components/schema/SchemaTree.d.ts +8 -0
  34. package/dist/components/schema/SchemaTreeBranch.d.ts +8 -0
  35. package/dist/components/schema/SchemaTreeRow.d.ts +18 -0
  36. package/dist/components/schema/SchemaTypeLabel.d.ts +8 -0
  37. package/dist/components/schema/SchemaUnionBranch.d.ts +12 -0
  38. package/dist/components/schema/depthColors.d.ts +20 -0
  39. package/dist/components/schema/index.d.ts +10 -0
  40. package/dist/components/schema/schemaDisplayUtils.d.ts +10 -0
  41. package/dist/components/schema/schemaUtils.d.ts +74 -0
  42. package/dist/components/schema/tests/SchemaTab.test.d.ts +1 -0
  43. package/dist/components/schema/tests/schemaUtils.test.d.ts +1 -0
  44. package/dist/config/config.d.ts +62 -0
  45. package/dist/config/default.d.ts +2 -0
  46. package/dist/config/index.d.ts +2 -0
  47. package/dist/containers/AsyncAPI/AsyncAPI.d.ts +12 -0
  48. package/dist/containers/AsyncAPI/AsyncAPIRenderer.d.ts +8 -0
  49. package/dist/containers/AsyncAPI/Layout.d.ts +7 -0
  50. package/dist/containers/AsyncAPI/tests/AsyncAPI.test.d.ts +1 -0
  51. package/dist/containers/AsyncAPI/tests/AsyncAPIRenderer.test.d.ts +1 -0
  52. package/dist/containers/Information/Information.d.ts +4 -0
  53. package/dist/containers/Messages/Message.d.ts +8 -0
  54. package/dist/containers/Messages/MessageDetails.d.ts +9 -0
  55. package/dist/containers/Messages/Messages.d.ts +7 -0
  56. package/dist/containers/Operation/Operation.d.ts +7 -0
  57. package/dist/containers/Operation/Operations.d.ts +8 -0
  58. package/dist/containers/Schema/SchemaViewer.d.ts +7 -0
  59. package/dist/containers/Schema/Schemas.d.ts +7 -0
  60. package/dist/containers/Server/Server.d.ts +2 -0
  61. package/dist/containers/Server/Servers.d.ts +6 -0
  62. package/dist/contants.d.ts +26 -0
  63. package/dist/contexts/index.d.ts +1 -0
  64. package/dist/contexts/useSpec.d.ts +14 -0
  65. package/dist/helpers/avro/avroSchemaParser.d.ts +8 -0
  66. package/dist/helpers/avro/avroToJsonSchema.d.ts +4 -0
  67. package/dist/helpers/avro/index.d.ts +3 -0
  68. package/dist/helpers/avro/tests/avroToJsonSchema.test.d.ts +1 -0
  69. package/dist/helpers/avro/types.d.ts +70 -0
  70. package/dist/helpers/avro/validateAvroStructure.d.ts +2 -0
  71. package/dist/helpers/bindingsSelector.d.ts +2 -0
  72. package/dist/helpers/classNames.d.ts +1 -0
  73. package/dist/helpers/common.d.ts +6 -0
  74. package/dist/helpers/formatEnumDescription.d.ts +3 -0
  75. package/dist/helpers/marked.d.ts +3 -0
  76. package/dist/helpers/parser.d.ts +10 -0
  77. package/dist/helpers/protobuf/googleTypes.d.ts +1 -0
  78. package/dist/helpers/protobuf/index.d.ts +10 -0
  79. package/dist/helpers/protobuf/pathUtils.d.ts +13 -0
  80. package/dist/helpers/protobuf/primitiveTypes.d.ts +16 -0
  81. package/dist/helpers/protobuf/protoToJsonSchema.d.ts +7 -0
  82. package/dist/helpers/protobuf/protobufSchemaParser.d.ts +9 -0
  83. package/dist/helpers/protobuf/protocGenValidate.d.ts +3 -0
  84. package/dist/helpers/protobuf/protovalidate.d.ts +8 -0
  85. package/dist/helpers/protobuf/tests/protoToJsonSchema.test.d.ts +1 -0
  86. package/dist/helpers/protobuf/tests/protobufSchemaParser.test.d.ts +1 -0
  87. package/dist/helpers/protobuf/validateProtobufStructure.d.ts +5 -0
  88. package/dist/helpers/schemaFormat.d.ts +53 -0
  89. package/dist/helpers/schemaParserRegistry.d.ts +18 -0
  90. package/dist/helpers/tests/schemaFormat.test.d.ts +1 -0
  91. package/dist/icons/ArrowDown.d.ts +5 -0
  92. package/dist/icons/ArrowRight.d.ts +5 -0
  93. package/dist/icons/AtSymbol.d.ts +5 -0
  94. package/dist/icons/BookOpen.d.ts +4 -0
  95. package/dist/icons/Check.d.ts +5 -0
  96. package/dist/icons/Clipboard.d.ts +5 -0
  97. package/dist/icons/Connection.d.ts +5 -0
  98. package/dist/icons/ExternalLink.d.ts +5 -0
  99. package/dist/icons/Globe.d.ts +5 -0
  100. package/dist/icons/IconWrapper.d.ts +6 -0
  101. package/dist/icons/Link.d.ts +4 -0
  102. package/dist/icons/Message.d.ts +5 -0
  103. package/dist/icons/Operation.d.ts +5 -0
  104. package/dist/icons/Scale.d.ts +6 -0
  105. package/dist/icons/Schema.d.ts +5 -0
  106. package/dist/icons/Server.d.ts +4 -0
  107. package/dist/icons/ShieldCheck.d.ts +4 -0
  108. package/dist/icons/SideBar.d.ts +6 -0
  109. package/dist/icons/Tag.d.ts +5 -0
  110. package/dist/icons/Variable.d.ts +4 -0
  111. package/dist/index-BNxgjuJI.cjs +107 -0
  112. package/dist/index-CCaYgYrJ.js +15316 -0
  113. package/dist/index-Dg7zwvip.cjs +155 -0
  114. package/dist/index-aiNXwruk.js +25414 -0
  115. package/dist/index.d.ts +10 -0
  116. package/dist/main.d.ts +0 -0
  117. package/dist/stories/AsyncAPI.stories.d.ts +8 -0
  118. package/dist/stories/AsyncAPIRenderer.stories.d.ts +11 -0
  119. package/dist/stories/Button.d.ts +14 -0
  120. package/dist/stories/Button.stories.d.ts +23 -0
  121. package/dist/stories/Information.stories.d.ts +8 -0
  122. package/dist/stories/SchemaTree.stories.d.ts +23 -0
  123. package/dist/stories/Server.stories.d.ts +9 -0
  124. package/dist/types/asyncapi/AnySchemaObject.d.ts +60 -0
  125. package/dist/types/asyncapi/ApiKey.d.ts +9 -0
  126. package/dist/types/asyncapi/ApiKeyHttpSecurityScheme.d.ts +10 -0
  127. package/dist/types/asyncapi/ApiKeyHttpSecuritySchemeIn.d.ts +6 -0
  128. package/dist/types/asyncapi/ApiKeyHttpSecuritySchemeType.d.ts +4 -0
  129. package/dist/types/asyncapi/ApiKeyIn.d.ts +5 -0
  130. package/dist/types/asyncapi/ApiKeyType.d.ts +4 -0
  131. package/dist/types/asyncapi/AsymmetricEncryption.d.ts +7 -0
  132. package/dist/types/asyncapi/AsymmetricEncryptionType.d.ts +4 -0
  133. package/dist/types/asyncapi/AsyncApi_3Dot_0Dot_0SchemaDot.d.ts +18 -0
  134. package/dist/types/asyncapi/BearerHttpSecurityScheme.d.ts +10 -0
  135. package/dist/types/asyncapi/BearerHttpSecuritySchemeScheme.d.ts +4 -0
  136. package/dist/types/asyncapi/BearerHttpSecuritySchemeType.d.ts +4 -0
  137. package/dist/types/asyncapi/BindingsMinusAmqpMinus_0Dot_3Dot_0MinusOperationDeliveryMode.d.ts +5 -0
  138. package/dist/types/asyncapi/BindingsMinusAnypointmqMinus_0Dot_0Dot_1MinusChannelDestinationType.d.ts +6 -0
  139. package/dist/types/asyncapi/BindingsMinusGooglepubsubMinus_0Dot_2Dot_0MinusChannelMessageStoragePolicy.d.ts +4 -0
  140. package/dist/types/asyncapi/BindingsMinusGooglepubsubMinus_0Dot_2Dot_0MinusChannelSchemaSettings.d.ts +8 -0
  141. package/dist/types/asyncapi/BindingsMinusGooglepubsubMinus_0Dot_2Dot_0MinusMessageSchema.d.ts +5 -0
  142. package/dist/types/asyncapi/BindingsMinusHttpMinus_0Dot_3Dot_0MinusOperationMethod.d.ts +12 -0
  143. package/dist/types/asyncapi/BindingsMinusJmsMinus_0Dot_0Dot_1MinusChannelDestinationType.d.ts +5 -0
  144. package/dist/types/asyncapi/BindingsMinusJmsMinus_0Dot_0Dot_1MinusServerProperty.d.ts +6 -0
  145. package/dist/types/asyncapi/BindingsMinusKafkaMinus_0Dot_5Dot_0MinusChannelTopicConfiguration.d.ts +14 -0
  146. package/dist/types/asyncapi/BindingsMinusKafkaMinus_0Dot_5Dot_0MinusChannelTopicConfigurationCleanupDotPolicyItem.d.ts +5 -0
  147. package/dist/types/asyncapi/BindingsMinusKafkaMinus_0Dot_5Dot_0MinusMessageSchemaIdLocation.d.ts +5 -0
  148. package/dist/types/asyncapi/BindingsMinusMqttMinus_0Dot_2Dot_0MinusMessagePayloadFormatIndicator.d.ts +5 -0
  149. package/dist/types/asyncapi/BindingsMinusMqttMinus_0Dot_2Dot_0MinusOperationQos.d.ts +6 -0
  150. package/dist/types/asyncapi/BindingsMinusMqttMinus_0Dot_2Dot_0MinusServerLastWill.d.ts +9 -0
  151. package/dist/types/asyncapi/BindingsMinusMqttMinus_0Dot_2Dot_0MinusServerLastWillQos.d.ts +6 -0
  152. package/dist/types/asyncapi/BindingsMinusPulsarMinus_0Dot_1Dot_0MinusChannelPersistence.d.ts +5 -0
  153. package/dist/types/asyncapi/BindingsMinusPulsarMinus_0Dot_1Dot_0MinusChannelRetention.d.ts +5 -0
  154. package/dist/types/asyncapi/BindingsMinusSnsMinus_0Dot_1Dot_0MinusChannelOrdering.d.ts +7 -0
  155. package/dist/types/asyncapi/BindingsMinusSnsMinus_0Dot_1Dot_0MinusChannelOrderingType.d.ts +5 -0
  156. package/dist/types/asyncapi/BindingsMinusSnsMinus_0Dot_1Dot_0MinusChannelPolicy.d.ts +6 -0
  157. package/dist/types/asyncapi/BindingsMinusSnsMinus_0Dot_1Dot_0MinusChannelStatement.d.ts +8 -0
  158. package/dist/types/asyncapi/BindingsMinusSnsMinus_0Dot_1Dot_0MinusChannelStatementEffect.d.ts +5 -0
  159. package/dist/types/asyncapi/BindingsMinusSnsMinus_0Dot_1Dot_0MinusOperationConsumer.d.ts +17 -0
  160. package/dist/types/asyncapi/BindingsMinusSnsMinus_0Dot_1Dot_0MinusOperationConsumerFilterPolicyScope.d.ts +5 -0
  161. package/dist/types/asyncapi/BindingsMinusSnsMinus_0Dot_1Dot_0MinusOperationConsumerProtocol.d.ts +12 -0
  162. package/dist/types/asyncapi/BindingsMinusSnsMinus_0Dot_1Dot_0MinusOperationDeliveryPolicy.d.ts +13 -0
  163. package/dist/types/asyncapi/BindingsMinusSnsMinus_0Dot_1Dot_0MinusOperationDeliveryPolicyBackoffFunction.d.ts +7 -0
  164. package/dist/types/asyncapi/BindingsMinusSnsMinus_0Dot_1Dot_0MinusOperationIdentifier.d.ts +9 -0
  165. package/dist/types/asyncapi/BindingsMinusSnsMinus_0Dot_1Dot_0MinusOperationRedrivePolicy.d.ts +7 -0
  166. package/dist/types/asyncapi/BindingsMinusSolaceMinus_0Dot_4Dot_0MinusOperationDestinationsItemDeliveryMode.d.ts +5 -0
  167. package/dist/types/asyncapi/BindingsMinusSolaceMinus_0Dot_4Dot_0MinusOperationDestinationsItemOneOf_0.d.ts +9 -0
  168. package/dist/types/asyncapi/BindingsMinusSolaceMinus_0Dot_4Dot_0MinusOperationDestinationsItemOneOf_0Queue.d.ts +10 -0
  169. package/dist/types/asyncapi/BindingsMinusSolaceMinus_0Dot_4Dot_0MinusOperationDestinationsItemOneOf_0QueueAccessType.d.ts +5 -0
  170. package/dist/types/asyncapi/BindingsMinusSolaceMinus_0Dot_4Dot_0MinusOperationDestinationsItemOneOf_1.d.ts +8 -0
  171. package/dist/types/asyncapi/BindingsMinusSqsMinus_0Dot_2Dot_0MinusChannelIdentifier.d.ts +6 -0
  172. package/dist/types/asyncapi/BindingsMinusSqsMinus_0Dot_2Dot_0MinusChannelPolicy.d.ts +6 -0
  173. package/dist/types/asyncapi/BindingsMinusSqsMinus_0Dot_2Dot_0MinusChannelQueue.d.ts +19 -0
  174. package/dist/types/asyncapi/BindingsMinusSqsMinus_0Dot_2Dot_0MinusChannelQueueDeduplicationScope.d.ts +5 -0
  175. package/dist/types/asyncapi/BindingsMinusSqsMinus_0Dot_2Dot_0MinusChannelQueueFifoThroughputLimit.d.ts +5 -0
  176. package/dist/types/asyncapi/BindingsMinusSqsMinus_0Dot_2Dot_0MinusChannelRedrivePolicy.d.ts +7 -0
  177. package/dist/types/asyncapi/BindingsMinusSqsMinus_0Dot_2Dot_0MinusChannelStatement.d.ts +8 -0
  178. package/dist/types/asyncapi/BindingsMinusSqsMinus_0Dot_2Dot_0MinusChannelStatementEffect.d.ts +5 -0
  179. package/dist/types/asyncapi/BindingsMinusSqsMinus_0Dot_2Dot_0MinusOperationIdentifier.d.ts +6 -0
  180. package/dist/types/asyncapi/BindingsMinusSqsMinus_0Dot_2Dot_0MinusOperationPolicy.d.ts +6 -0
  181. package/dist/types/asyncapi/BindingsMinusSqsMinus_0Dot_2Dot_0MinusOperationQueue.d.ts +20 -0
  182. package/dist/types/asyncapi/BindingsMinusSqsMinus_0Dot_2Dot_0MinusOperationQueueDeduplicationScope.d.ts +5 -0
  183. package/dist/types/asyncapi/BindingsMinusSqsMinus_0Dot_2Dot_0MinusOperationQueueFifoThroughputLimit.d.ts +5 -0
  184. package/dist/types/asyncapi/BindingsMinusSqsMinus_0Dot_2Dot_0MinusOperationRedrivePolicy.d.ts +7 -0
  185. package/dist/types/asyncapi/BindingsMinusSqsMinus_0Dot_2Dot_0MinusOperationStatement.d.ts +8 -0
  186. package/dist/types/asyncapi/BindingsMinusSqsMinus_0Dot_2Dot_0MinusOperationStatementEffect.d.ts +5 -0
  187. package/dist/types/asyncapi/BindingsMinusWebsocketsMinus_0Dot_1Dot_0MinusChannelMethod.d.ts +5 -0
  188. package/dist/types/asyncapi/Channel.d.ts +20 -0
  189. package/dist/types/asyncapi/ChannelBindingsObject.d.ts +31 -0
  190. package/dist/types/asyncapi/ChannelBindingsObjectAmqp.d.ts +6 -0
  191. package/dist/types/asyncapi/ChannelBindingsObjectAmqpBindingVersion.d.ts +4 -0
  192. package/dist/types/asyncapi/ChannelBindingsObjectAnypointmq.d.ts +9 -0
  193. package/dist/types/asyncapi/ChannelBindingsObjectAnypointmqBindingVersion.d.ts +4 -0
  194. package/dist/types/asyncapi/ChannelBindingsObjectGooglepubsub.d.ts +12 -0
  195. package/dist/types/asyncapi/ChannelBindingsObjectGooglepubsubBindingVersion.d.ts +4 -0
  196. package/dist/types/asyncapi/ChannelBindingsObjectIbmmq.d.ts +6 -0
  197. package/dist/types/asyncapi/ChannelBindingsObjectIbmmqBindingVersion.d.ts +4 -0
  198. package/dist/types/asyncapi/ChannelBindingsObjectJms.d.ts +9 -0
  199. package/dist/types/asyncapi/ChannelBindingsObjectJmsBindingVersion.d.ts +4 -0
  200. package/dist/types/asyncapi/ChannelBindingsObjectKafka.d.ts +11 -0
  201. package/dist/types/asyncapi/ChannelBindingsObjectKafkaBindingVersion.d.ts +6 -0
  202. package/dist/types/asyncapi/ChannelBindingsObjectPulsar.d.ts +15 -0
  203. package/dist/types/asyncapi/ChannelBindingsObjectPulsarBindingVersion.d.ts +4 -0
  204. package/dist/types/asyncapi/ChannelBindingsObjectSns.d.ts +12 -0
  205. package/dist/types/asyncapi/ChannelBindingsObjectSnsBindingVersion.d.ts +4 -0
  206. package/dist/types/asyncapi/ChannelBindingsObjectSqs.d.ts +9 -0
  207. package/dist/types/asyncapi/ChannelBindingsObjectSqsBindingVersion.d.ts +5 -0
  208. package/dist/types/asyncapi/ChannelBindingsObjectWs.d.ts +12 -0
  209. package/dist/types/asyncapi/ChannelBindingsObjectWsBindingVersion.d.ts +4 -0
  210. package/dist/types/asyncapi/Components.d.ts +54 -0
  211. package/dist/types/asyncapi/Contact.d.ts +7 -0
  212. package/dist/types/asyncapi/CoreSchemaMetaMinusSchemaObject.d.ts +52 -0
  213. package/dist/types/asyncapi/CorrelationId.d.ts +6 -0
  214. package/dist/types/asyncapi/ExternalDocs.d.ts +6 -0
  215. package/dist/types/asyncapi/Info.d.ts +19 -0
  216. package/dist/types/asyncapi/JsonMinusSchemaMinusDraftMinus_07MinusSchemaSimpleTypes.d.ts +10 -0
  217. package/dist/types/asyncapi/License.d.ts +6 -0
  218. package/dist/types/asyncapi/MessageBindingsObject.d.ts +28 -0
  219. package/dist/types/asyncapi/MessageBindingsObjectAmqp.d.ts +8 -0
  220. package/dist/types/asyncapi/MessageBindingsObjectAmqpBindingVersion.d.ts +4 -0
  221. package/dist/types/asyncapi/MessageBindingsObjectAnypointmq.d.ts +9 -0
  222. package/dist/types/asyncapi/MessageBindingsObjectAnypointmqBindingVersion.d.ts +4 -0
  223. package/dist/types/asyncapi/MessageBindingsObjectGooglepubsub.d.ts +10 -0
  224. package/dist/types/asyncapi/MessageBindingsObjectGooglepubsubBindingVersion.d.ts +4 -0
  225. package/dist/types/asyncapi/MessageBindingsObjectHttp.d.ts +9 -0
  226. package/dist/types/asyncapi/MessageBindingsObjectHttpBindingVersion.d.ts +5 -0
  227. package/dist/types/asyncapi/MessageBindingsObjectIbmmq.d.ts +6 -0
  228. package/dist/types/asyncapi/MessageBindingsObjectIbmmqBindingVersion.d.ts +4 -0
  229. package/dist/types/asyncapi/MessageBindingsObjectJms.d.ts +8 -0
  230. package/dist/types/asyncapi/MessageBindingsObjectJmsBindingVersion.d.ts +4 -0
  231. package/dist/types/asyncapi/MessageBindingsObjectKafka.d.ts +13 -0
  232. package/dist/types/asyncapi/MessageBindingsObjectKafkaBindingVersion.d.ts +6 -0
  233. package/dist/types/asyncapi/MessageBindingsObjectMqtt.d.ts +13 -0
  234. package/dist/types/asyncapi/MessageBindingsObjectMqttBindingVersion.d.ts +4 -0
  235. package/dist/types/asyncapi/MessageObject.d.ts +25 -0
  236. package/dist/types/asyncapi/MessageTrait.d.ts +22 -0
  237. package/dist/types/asyncapi/MultiFormatSchemaElseSchemaFormatAnyOf_1.d.ts +8 -0
  238. package/dist/types/asyncapi/MultiFormatSchemaElseSchemaFormatAnyOf_2.d.ts +10 -0
  239. package/dist/types/asyncapi/Oauth2Flows.d.ts +10 -0
  240. package/dist/types/asyncapi/Oauth2FlowsFlows.d.ts +11 -0
  241. package/dist/types/asyncapi/Oauth2FlowsFlowsAuthorizationCode.d.ts +8 -0
  242. package/dist/types/asyncapi/Oauth2FlowsFlowsClientCredentials.d.ts +8 -0
  243. package/dist/types/asyncapi/Oauth2FlowsFlowsImplicit.d.ts +8 -0
  244. package/dist/types/asyncapi/Oauth2FlowsFlowsPassword.d.ts +8 -0
  245. package/dist/types/asyncapi/Oauth2FlowsType.d.ts +4 -0
  246. package/dist/types/asyncapi/OpenIdConnect.d.ts +9 -0
  247. package/dist/types/asyncapi/OpenIdConnectType.d.ts +4 -0
  248. package/dist/types/asyncapi/Operation.d.ts +35 -0
  249. package/dist/types/asyncapi/OperationAction.d.ts +5 -0
  250. package/dist/types/asyncapi/OperationBindingsObject.d.ts +28 -0
  251. package/dist/types/asyncapi/OperationBindingsObjectAmqp.d.ts +16 -0
  252. package/dist/types/asyncapi/OperationBindingsObjectAmqpBindingVersion.d.ts +4 -0
  253. package/dist/types/asyncapi/OperationBindingsObjectHttp.d.ts +10 -0
  254. package/dist/types/asyncapi/OperationBindingsObjectHttpBindingVersion.d.ts +5 -0
  255. package/dist/types/asyncapi/OperationBindingsObjectKafka.d.ts +9 -0
  256. package/dist/types/asyncapi/OperationBindingsObjectKafkaBindingVersion.d.ts +6 -0
  257. package/dist/types/asyncapi/OperationBindingsObjectMqtt.d.ts +12 -0
  258. package/dist/types/asyncapi/OperationBindingsObjectMqttBindingVersion.d.ts +4 -0
  259. package/dist/types/asyncapi/OperationBindingsObjectNats.d.ts +7 -0
  260. package/dist/types/asyncapi/OperationBindingsObjectNatsBindingVersion.d.ts +4 -0
  261. package/dist/types/asyncapi/OperationBindingsObjectSns.d.ts +12 -0
  262. package/dist/types/asyncapi/OperationBindingsObjectSnsBindingVersion.d.ts +4 -0
  263. package/dist/types/asyncapi/OperationBindingsObjectSolace.d.ts +11 -0
  264. package/dist/types/asyncapi/OperationBindingsObjectSolaceBindingVersion.d.ts +6 -0
  265. package/dist/types/asyncapi/OperationBindingsObjectSqs.d.ts +8 -0
  266. package/dist/types/asyncapi/OperationBindingsObjectSqsBindingVersion.d.ts +5 -0
  267. package/dist/types/asyncapi/OperationReply.d.ts +9 -0
  268. package/dist/types/asyncapi/OperationReplyAddress.d.ts +6 -0
  269. package/dist/types/asyncapi/OperationTrait.d.ts +27 -0
  270. package/dist/types/asyncapi/Parameter.d.ts +9 -0
  271. package/dist/types/asyncapi/Reference.d.ts +5 -0
  272. package/dist/types/asyncapi/SaslGssapiSecurityScheme.d.ts +7 -0
  273. package/dist/types/asyncapi/SaslGssapiSecuritySchemeType.d.ts +4 -0
  274. package/dist/types/asyncapi/SaslPlainSecurityScheme.d.ts +7 -0
  275. package/dist/types/asyncapi/SaslPlainSecuritySchemeType.d.ts +4 -0
  276. package/dist/types/asyncapi/SaslScramSecurityScheme.d.ts +7 -0
  277. package/dist/types/asyncapi/SaslScramSecuritySchemeType.d.ts +5 -0
  278. package/dist/types/asyncapi/SchemaObject.d.ts +58 -0
  279. package/dist/types/asyncapi/Server.d.ts +33 -0
  280. package/dist/types/asyncapi/ServerBindingsObject.d.ts +27 -0
  281. package/dist/types/asyncapi/ServerBindingsObjectIbmmq.d.ts +11 -0
  282. package/dist/types/asyncapi/ServerBindingsObjectIbmmqBindingVersion.d.ts +4 -0
  283. package/dist/types/asyncapi/ServerBindingsObjectJms.d.ts +10 -0
  284. package/dist/types/asyncapi/ServerBindingsObjectJmsBindingVersion.d.ts +4 -0
  285. package/dist/types/asyncapi/ServerBindingsObjectKafka.d.ts +8 -0
  286. package/dist/types/asyncapi/ServerBindingsObjectKafkaBindingVersion.d.ts +6 -0
  287. package/dist/types/asyncapi/ServerBindingsObjectMqtt.d.ts +15 -0
  288. package/dist/types/asyncapi/ServerBindingsObjectMqttBindingVersion.d.ts +4 -0
  289. package/dist/types/asyncapi/ServerBindingsObjectPulsar.d.ts +7 -0
  290. package/dist/types/asyncapi/ServerBindingsObjectPulsarBindingVersion.d.ts +4 -0
  291. package/dist/types/asyncapi/ServerBindingsObjectSolace.d.ts +9 -0
  292. package/dist/types/asyncapi/ServerBindingsObjectSolaceBindingVersion.d.ts +6 -0
  293. package/dist/types/asyncapi/ServerVariable.d.ts +8 -0
  294. package/dist/types/asyncapi/SymmetricEncryption.d.ts +7 -0
  295. package/dist/types/asyncapi/SymmetricEncryptionType.d.ts +4 -0
  296. package/dist/types/asyncapi/Tag.d.ts +9 -0
  297. package/dist/types/asyncapi/UserPassword.d.ts +7 -0
  298. package/dist/types/asyncapi/UserPasswordType.d.ts +4 -0
  299. package/dist/types/asyncapi/X509.d.ts +7 -0
  300. package/dist/types/asyncapi/X509Type.d.ts +4 -0
  301. package/dist/types/schema.d.ts +36 -0
  302. package/dist/utils/hasRef.d.ts +4 -0
  303. package/dist/utils/scrollLock.d.ts +12 -0
  304. package/dist/utils/tests/hasRef.test.d.ts +1 -0
  305. package/dist/utils/tests/theme.test.d.ts +1 -0
  306. package/dist/utils/tests/useElementRect.test.d.ts +1 -0
  307. package/dist/utils/theme.d.ts +2 -0
  308. package/dist/utils/useAutoHideOnScroll.d.ts +16 -0
  309. package/dist/utils/useElementRect.d.ts +7 -0
  310. package/dist/vite.svg +1 -0
  311. package/package.json +108 -0
@@ -0,0 +1,155 @@
1
+ "use strict";var Qc=Object.defineProperty;var Gc=(e,t,n)=>t in e?Qc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var _e=(e,t,n)=>Gc(e,typeof t!="symbol"?t+"":t,n);const u=require("react/jsx-runtime"),se=require("react"),hl=require("react-dom"),ml={show:{sidebar:!0,info:!0,servers:!0,operations:!0,messages:!0,messageExamples:!1,schemas:!0},theme:{colors:{primary:{50:"#ebf1fe",100:"#d6e3fd",200:"#adc7fb",300:"#85abf9",500:"#7aa2f7",600:"#5a7ef0",700:"#3d5bc4"}},dark:{background:"#1a1b26",surface:"#24283b",border:"#414868",textPrimary:"#c0caf5",textSecondary:"#a9b1d6",textMuted:"#666c86"}},expand:{schemas:!1},sidebar:{useChannelAddressAsIdentifier:!1}},gl=se.createContext(null),Zt=()=>{const e=se.useContext(gl);if(!e)throw new Error("useAsyncAPIDocument must be used within an AsyncAPIDocumentProvider");return e};function Fn({title:e,content:t,sideContent:n,stickySideContent:i=!1,info:r=!1,reverseLayoutOnMobile:s=!1}){return u.jsxs("div",{className:"w-full @lg:max-w-[calc(70ch+28rem)] @lg:mx-auto mt-6",children:[e&&u.jsx("h1",{className:`${r?"text-4xl inline-block text-3xl font-extrabold text-foreground tracking-tight":"text-2xl"} mb-4 @lg:mb-0 font-bold`,children:e}),u.jsxs("section",{className:`border-border text-lg flex gap-6 @lg:gap-0 ${n&&s?"flex-col-reverse @lg:flex-row":"flex-col @lg:flex-row"}`,children:[u.jsx("div",{className:"@lg:w-prose min-w-0",children:t}),u.jsx("div",{className:"@lg:pl-12 @lg:w-[400px] shrink-0",children:u.jsx("div",{className:`${i&&"@lg:sticky @lg:top-4"}`,children:n})})]})]})}function Mn(...e){return e.filter(Boolean).join(" ")}function Rs({tabs:e,current:t,onChange:n=()=>{},ariaLabel:i="Tabs",selectLabel:r="Select a tab"}){var l;const s=se.useId(),o=t??((l=e[0])==null?void 0:l.id)??"",a=e.some(c=>!!c.icon);return e.length?u.jsxs("div",{children:[u.jsxs("div",{className:"@sm:hidden",children:[u.jsx("label",{htmlFor:s,className:"sr-only",children:r}),u.jsx("select",{id:s,name:"tabs",value:o,onChange:c=>n(c.target.value),className:Mn("block w-full rounded-md border-neutral-300 bg-neutral-200 focus:border-secondary-500 focus:ring-secondary-500",a?"mt-0":"mt-4"),children:e.map(c=>u.jsx("option",{value:c.id,children:c.name},c.id))})]}),u.jsx("div",{className:Mn("hidden @sm:block",a?"":"mt-6"),children:a?u.jsx("div",{className:"border-b border-border",role:"tablist","aria-label":i,children:u.jsx("div",{className:"flex flex-wrap gap-6",children:e.map(c=>{const d=c.id===t,f=c.icon;return u.jsx("button",{id:`tab-${c.id}`,type:"button",role:"tab","aria-selected":d,"aria-controls":`panel-${c.id}`,onClick:()=>n(c.id),className:Mn("border-b-2 px-1 py-3 text-sm font-semibold transition-colors",d?"border-primary-500 text-primary-600":"border-transparent text-foreground-muted hover:text-foreground"),children:u.jsxs("span",{className:"inline-flex items-center gap-2",children:[f?u.jsx(f,{className:"h-4 w-4 shrink-0"}):null,u.jsx("span",{children:c.name})]})},c.id)})})}):u.jsx("nav",{className:"relative z-0 flex divide-x divide-border rounded-lg shadow","aria-label":i,children:e.map((c,d)=>u.jsxs("button",{onClick:()=>n(c.id),className:Mn(c.id===t?"text-foreground":"text-foreground-muted hover:text-foreground-secondary",d===0?"rounded-l-lg":"",d===e.length-1?"rounded-r-lg":"","group relative min-w-0 flex-1 overflow-hidden bg-surface px-4 py-4 text-center text-sm font-medium hover:bg-neutral-50 focus:z-10"),"aria-current":c.id===t?"page":void 0,children:[u.jsx("span",{children:c.name}),u.jsx("span",{"aria-hidden":"true",className:Mn(c.id===t?"bg-primary-500":"bg-transparent","absolute inset-x-0 bottom-0 h-0.5")})]},c.id))})})]}):null}function eu({tabs:e,current:t,onChange:n}){if(!e.length)return null;const i=u.jsx("div",{className:"w-full mt-10 @lg:mt-0",children:u.jsx(Rs,{tabs:e,current:t,onChange:n,ariaLabel:"AsyncAPI sections",selectLabel:"Select an AsyncAPI section"})});return u.jsx("div",{className:"sticky top-0 z-10 flex w-full justify-center bg-background",children:u.jsx(Fn,{content:i,stickySideContent:!1})})}const tu=({isCollapsed:e})=>u.jsxs("svg",{width:22,height:22,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",children:[u.jsx("path",{d:"M14 2a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1zM2 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V3a2 2 0 0 0-2-2z"}),u.jsx("rect",{className:`panel-icon-rect ${e?"panel-icon-rect-collapsed":""}`,x:"2",y:"3",height:"10",rx:"1"})]});function nu(e){const t=getComputedStyle(e).overflowY;return(t==="auto"||t==="scroll")&&e.scrollHeight>e.clientHeight}function ru(e){let t=e;for(;t&&t!==document.body;){if(nu(t))return t;t=t.parentElement}return document.documentElement}function iu(e){const t=e.style.overflow,n=e.style.paddingRight,i=e.offsetWidth-e.clientWidth;if(e.style.overflow="hidden",i>0){const r=parseFloat(getComputedStyle(e).paddingRight)||0;e.style.paddingRight=`${r+i}px`}return()=>{e.style.overflow=t,e.style.paddingRight=n}}function yl(e,t){const[n,i]=se.useState(null);return se.useLayoutEffect(()=>{if(!e||!t){i(null);return}let r=null;const s=()=>{r===null&&(r=requestAnimationFrame(()=>{r=null,i(e.getBoundingClientRect())}))};i(e.getBoundingClientRect());const o=new ResizeObserver(s);return o.observe(e),window.addEventListener("scroll",s,!0),window.addEventListener("resize",s),()=>{r!==null&&cancelAnimationFrame(r),o.disconnect(),window.removeEventListener("scroll",s,!0),window.removeEventListener("resize",s)}},[e,t]),n}const xl=se.forwardRef(function({isOpen:t,side:n,onClose:i,title:r,children:s,width:o="w-[50rem]"},a){se.useEffect(()=>{const g=v=>{v.key==="Escape"&&i()};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[i]);const l=n==="right"?"translate-x-full":"-translate-x-full",c=n==="right"?"right-0":"left-0",{portalHost:d,rootElement:f}=Zt();se.useEffect(()=>{if(!(!t||!d))return iu(ru(d))},[t,d]);const p=yl(f,!0),h=p?{position:"fixed",top:0,left:p.left,width:p.width,height:"100vh"}:{position:"fixed",inset:0};return d?hl.createPortal(u.jsxs("div",{className:"z-50 overflow-hidden",style:{...h,pointerEvents:t?"auto":"none"},children:[u.jsx("div",{onClick:i,className:`absolute inset-0 bg-black/30 transition-opacity duration-300 ${t?"opacity-100":"opacity-0"}`,style:{pointerEvents:t?"auto":"none"}}),u.jsxs("div",{ref:a,className:`absolute top-0 ${c} h-full ${o} max-w-[100cqw] bg-surface shadow-xl flex flex-col transition-transform duration-300 ease-in-out ${t?"translate-x-0":l}`,children:[r&&u.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-border",children:[u.jsx("div",{className:"text-sm font-semibold text-foreground min-w-0 flex-1 overflow-hidden",children:typeof r=="string"?u.jsx("span",{className:"truncate block",children:r}):r}),u.jsx("button",{onClick:i,className:"ml-4 p-1 rounded hover:bg-neutral-100 text-foreground-muted hover:text-foreground-secondary transition-colors","aria-label":"Close panel",children:u.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",children:u.jsx("path",{d:"M2 2l12 12M14 2L2 14"})})})]}),u.jsx("div",{className:"flex-1 overflow-y-auto px-5 py-4",children:s})]})]}),d):null});function bl({className:e}){return u.jsx("svg",{className:e||"inline-block",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",children:u.jsx("path",{d:"M389.44 768a96.064 96.064 0 0 1 181.12 0H896v64H570.56a96.064 96.064 0 0 1-181.12 0H128v-64h261.44zm192-288a96.064 96.064 0 0 1 181.12 0H896v64H762.56a96.064 96.064 0 0 1-181.12 0H128v-64h453.44zm-320-288a96.064 96.064 0 0 1 181.12 0H896v64H442.56a96.064 96.064 0 0 1-181.12 0H128v-64h133.44z"})})}function vl({className:e}){return u.jsxs("svg",{className:e||"inline-block",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",children:[u.jsx("path",{d:"M128 224v512a64 64 0 0 0 64 64h640a64 64 0 0 0 64-64V224H128zm0-64h768a64 64 0 0 1 64 64v512a128 128 0 0 1-128 128H192A128 128 0 0 1 64 736V224a64 64 0 0 1 64-64z"}),u.jsx("path",{d:"M904 224 656.512 506.88a192 192 0 0 1-289.024 0L120 224h784zm-698.944 0 210.56 240.704a128 128 0 0 0 192.704 0L818.944 224H205.056z"})]})}function wl({className:e}){return u.jsxs("svg",{className:e||"inline-block",viewBox:"0 0 28 28",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",children:[u.jsx("path",{clipRule:"evenodd",fillRule:"evenodd",d:"M14 20C17.3137 20 20 17.3137 20 14C20 10.6863 17.3137 8 14 8C10.6863 8 8 10.6863 8 14C8 17.3137 10.6863 20 14 20ZM18 14C18 16.2091 16.2091 18 14 18C11.7909 18 10 16.2091 10 14C10 11.7909 11.7909 10 14 10C16.2091 10 18 11.7909 18 14Z"}),u.jsx("path",{clipRule:"evenodd",fillRule:"evenodd",d:"M0 12.9996V14.9996C0 16.5478 1.17261 17.822 2.67809 17.9826C2.80588 18.3459 2.95062 18.7011 3.11133 19.0473C2.12484 20.226 2.18536 21.984 3.29291 23.0916L4.70712 24.5058C5.78946 25.5881 7.49305 25.6706 8.67003 24.7531C9.1044 24.9688 9.55383 25.159 10.0163 25.3218C10.1769 26.8273 11.4511 28 12.9993 28H14.9993C16.5471 28 17.8211 26.8279 17.9821 25.3228C18.4024 25.175 18.8119 25.0046 19.2091 24.8129C20.3823 25.6664 22.0344 25.564 23.0926 24.5058L24.5068 23.0916C25.565 22.0334 25.6674 20.3813 24.814 19.2081C25.0054 18.8113 25.1757 18.4023 25.3234 17.9824C26.8282 17.8211 28 16.5472 28 14.9996V12.9996C28 11.452 26.8282 10.1782 25.3234 10.0169C25.1605 9.55375 24.9701 9.10374 24.7541 8.66883C25.6708 7.49189 25.5882 5.78888 24.5061 4.70681L23.0919 3.29259C21.9846 2.18531 20.2271 2.12455 19.0485 3.1103C18.7017 2.94935 18.3459 2.80441 17.982 2.67647C17.8207 1.17177 16.5468 0 14.9993 0H12.9993C11.4514 0 10.1773 1.17231 10.0164 2.6775C9.60779 2.8213 9.20936 2.98653 8.82251 3.17181C7.64444 2.12251 5.83764 2.16276 4.70782 3.29259L3.2936 4.7068C2.16377 5.83664 2.12352 7.64345 3.17285 8.82152C2.98737 9.20877 2.82199 9.60763 2.67809 10.0167C1.17261 10.1773 0 11.4515 0 12.9996ZM15.9993 3C15.9993 2.44772 15.5516 2 14.9993 2H12.9993C12.447 2 11.9993 2.44772 11.9993 3V3.38269C11.9993 3.85823 11.6626 4.26276 11.2059 4.39542C10.4966 4.60148 9.81974 4.88401 9.18495 5.23348C8.76836 5.46282 8.24425 5.41481 7.90799 5.07855L7.53624 4.70681C7.14572 4.31628 6.51256 4.31628 6.12203 4.7068L4.70782 6.12102C4.31729 6.51154 4.31729 7.14471 4.70782 7.53523L5.07958 7.90699C5.41584 8.24325 5.46385 8.76736 5.23451 9.18395C4.88485 9.8191 4.6022 10.4963 4.39611 11.2061C4.2635 11.6629 3.85894 11.9996 3.38334 11.9996H3C2.44772 11.9996 2 12.4474 2 12.9996V14.9996C2 15.5519 2.44772 15.9996 3 15.9996H3.38334C3.85894 15.9996 4.26349 16.3364 4.39611 16.7931C4.58954 17.4594 4.85042 18.0969 5.17085 18.6979C5.39202 19.1127 5.34095 19.6293 5.00855 19.9617L4.70712 20.2632C4.3166 20.6537 4.3166 21.2868 4.70712 21.6774L6.12134 23.0916C6.51186 23.4821 7.14503 23.4821 7.53555 23.0916L7.77887 22.8483C8.11899 22.5081 8.65055 22.4633 9.06879 22.7008C9.73695 23.0804 10.4531 23.3852 11.2059 23.6039C11.6626 23.7365 11.9993 24.1411 11.9993 24.6166V25C11.9993 25.5523 12.447 26 12.9993 26H14.9993C15.5516 26 15.9993 25.5523 15.9993 25V24.6174C15.9993 24.1418 16.3361 23.7372 16.7929 23.6046C17.5032 23.3985 18.1809 23.1157 18.8164 22.7658C19.233 22.5365 19.7571 22.5845 20.0934 22.9208L20.2642 23.0916C20.6547 23.4821 21.2879 23.4821 21.6784 23.0916L23.0926 21.6774C23.4831 21.2868 23.4831 20.6537 23.0926 20.2632L22.9218 20.0924C22.5855 19.7561 22.5375 19.232 22.7669 18.8154C23.1166 18.1802 23.3992 17.503 23.6053 16.7931C23.7379 16.3364 24.1425 15.9996 24.6181 15.9996H25C25.5523 15.9996 26 15.5519 26 14.9996V12.9996C26 12.4474 25.5523 11.9996 25 11.9996H24.6181C24.1425 11.9996 23.7379 11.6629 23.6053 11.2061C23.3866 10.4529 23.0817 9.73627 22.7019 9.06773C22.4643 8.64949 22.5092 8.11793 22.8493 7.77781L23.0919 7.53523C23.4824 7.14471 23.4824 6.51154 23.0919 6.12102L21.6777 4.7068C21.2872 4.31628 20.654 4.31628 20.2635 4.7068L19.9628 5.00748C19.6304 5.33988 19.1137 5.39096 18.6989 5.16979C18.0976 4.84915 17.4596 4.58815 16.7929 4.39467C16.3361 4.2621 15.9993 3.85752 15.9993 3.38187V3Z"})]})}var tn=(e=>(e.SEND="send",e.RECEIVE="receive",e))(tn||{});const _l=e=>typeof e=="object"&&e!==null&&"$ref"in e&&typeof e.$ref=="string",Jr=(e,t,n=new Set)=>{for(;_l(e);){const i=t(e.$ref),r=e;Object.keys(r).forEach(s=>delete r[s]),Object.assign(r,i)}if(Array.isArray(e))n.add(e),e.forEach((i,r)=>{n.has(i)||(e[r]=Jr(i,t,n))});else if(typeof e=="object"&&e!==null){n.add(e);const i=e;for(const[r,s]of Object.entries(i))typeof s=="object"&&s!==null&&n.has(s)||(i[r]=Jr(s,t,n))}return e};function su(e,t){const[n,i]=se.useState("docked"),r=se.useRef(t);return r.current=t,se.useEffect(()=>{if(!e)return;let s=null,o=null;const a=()=>{o=null;const c=e.getBoundingClientRect().top,d=s===null?0:c-s;s=c,c>=0?i("docked"):r.current||d>0?i("pinned"):d<0?i("hidden"):i(f=>f==="docked"?"hidden":f)},l=()=>{o===null&&(o=requestAnimationFrame(a))};return a(),window.addEventListener("scroll",l,!0),window.addEventListener("resize",l),()=>{o!==null&&cancelAnimationFrame(o),window.removeEventListener("scroll",l,!0),window.removeEventListener("resize",l)}},[e]),se.useEffect(()=>{t&&i(s=>s==="hidden"?"pinned":s)},[t]),n}const ou="Contact",au="Email",Oo="License",To="External Documentation",lu="Tags",cu="Implicit",uu=`The Implicit flow is a simplified OAuth flow previously recommended
2
+ for native apps and JavaScript apps where the access token is returned
3
+ immediately without an extra authorization code exchange step.`,fu="Client Credentials",du="The Client Credentials grant type is used by clients to obtain an access token outside of the context of a user.",pu="Password",hu="The Password grant type is a legacy way to exchange a user's credentials for an access token.",mu="Authorization Code",gu="The Authorization Code grant type is used by confidential and public clients to exchange an authorization code for an access token.",yu="Connecting to a server",xu="",Ao=["text-blue-600","text-indigo-600","text-purple-600","text-pink-600","text-green-700"],bu=[50,100,200,300,500,600,700],vu={kafka:{label:"Kafka",color:"bg-primary-100 text-primary-700 border-primary-200"},mqtt:{label:"MQTT",color:"bg-purple-100 text-purple-700 border-purple-200"},http:{label:"HTTP",color:"bg-blue-100 text-blue-700 border-blue-200"},https:{label:"HTTPS",color:"bg-blue-100 text-blue-700 border-blue-200"},ws:{label:"WebSocket",color:"bg-green-100 text-green-700 border-green-200"},wss:{label:"WebSocket Secure",color:"bg-green-100 text-green-700 border-green-200"},amqp:{label:"AMQP",color:"bg-yellow-100 text-yellow-700 border-yellow-200"},amqps:{label:"AMQPS",color:"bg-yellow-100 text-yellow-700 border-yellow-200"},ibmmq:{label:"IBM MQ",color:"bg-indigo-100 text-indigo-700 border-indigo-200"},solace:{label:"Solace",color:"bg-pink-100 text-pink-700 border-pink-200"},nats:{label:"NATS",color:"bg-teal-100 text-teal-700 border-teal-200"}};function wu(e){if(e.length===0)return u.jsx("span",{children:"No allowed values."});if(e.length===1)return u.jsxs("span",{children:["Allowed value is ",u.jsx("code",{children:e[0]})]});const t=e.slice(0,-1).map((i,r)=>u.jsxs(se.Fragment,{children:[u.jsx("code",{children:i}),", "," "]},r)),n=u.jsx("code",{children:e[e.length-1]},"last");return u.jsxs("span",{children:["Allowed values are ",t," and ",n]})}function _u(e){return e.map(t=>`\`${t}\``).join(", ")}function Eu(e){const t=[],n=/\{([^}]+)\}/g;let i=0,r;for(;(r=n.exec(e))!==null;)r.index>i&&t.push({type:"text",value:e.slice(i,r.index)}),t.push({type:"param",value:r[1]}),i=r.index+r[0].length;return i<e.length&&t.push({type:"text",value:e.slice(i)}),t}function dr({address:e,parameters:t,className:n="text-xs",truncate:i=!1}){const{portalHost:r}=Zt(),[s,o]=se.useState(null),[a,l]=se.useState({top:0,left:0,placement:"top"}),[c,d]=se.useState(!1),f=se.useRef(null),p=Eu(e);let h=0;const g=40;se.useEffect(()=>{if(!i)return;const _=f.current;if(!_)return;const w=()=>d(_.scrollWidth>_.clientWidth);w();const y=new ResizeObserver(w);return y.observe(_),()=>y.disconnect()},[i,e]);const v=(_,w)=>{const y=w.getBoundingClientRect(),O=y.top<g?"bottom":"top";l({top:O==="top"?y.top-8:y.bottom+8,left:y.left+y.width/2,placement:O}),o(_)},E=p.map((_,w)=>{if(_.type==="text")return u.jsx("span",{children:_.value},w);const y=t==null?void 0:t[_.value],O=Ao[h++%Ao.length],I=s===w,j=!!y&&(y.description||y.default||y.enum&&y.enum.length>0||y.examples&&y.examples.length>0);return u.jsxs("span",{className:"inline-block",onMouseEnter:M=>v(w,M.currentTarget),onMouseLeave:()=>o(null),children:[u.jsx("span",{className:`font-semibold ${O} ${j?"cursor-help underline decoration-dotted":""}`,children:`{${_.value}}`}),j&&I&&r&&hl.createPortal(u.jsxs("div",{className:`fixed -translate-x-1/2 max-w-xs px-2.5 py-1.5 bg-neutral-50 text-foreground-muted text-xs rounded pointer-events-none z-[60] shadow-lg text-left leading-snug ${a.placement==="top"?"-translate-y-full":""}`,style:{top:a.top,left:a.left},children:[y.description&&u.jsx("div",{children:y.description}),y.default&&u.jsxs("div",{className:"mt-1",children:[u.jsx("span",{className:"font-semibold text-foreground-secondary",children:"Default:"})," ",u.jsx("code",{children:y.default})]}),y.enum&&y.enum.length>0&&u.jsx("div",{className:"mt-1",children:wu(y.enum)}),y.examples&&y.examples.length>0&&u.jsxs("div",{className:"mt-1",children:[u.jsx("span",{className:"font-semibold text-foreground-secondary",children:"Examples:"})," ",y.examples.join(", ")]})]}),r)]},w)});return i?u.jsxs("code",{className:`px-2 py-1 rounded text-foreground-secondary flex items-center min-w-0 ${n}`,children:[u.jsx("span",{ref:f,className:"overflow-hidden whitespace-nowrap min-w-0",children:E}),c&&u.jsx("span",{"aria-hidden":!0,className:"shrink-0",children:"..."})]}):u.jsx("code",{className:`px-2 py-1 rounded text-foreground-secondary break-all ${n}`,children:E})}function ku({info:e,operations:t={},messages:n={},schemas:i={},activeTab:r,onTabChange:s,onItemSelect:o,selectedItem:a,sidebarConfig:l}){const[c,d]=se.useState(!1),[f,p]=se.useState(0),[h,g]=se.useState(null),{deref:v,rootElement:E}=Zt(),_=su(E,c),w=_!=="docked",y=yl(E,w),I={transform:`translate(${c&&f?f-2:0}px, ${_==="hidden"?"-150%":"0px"})`,...w?{position:"fixed",top:10,left:((y==null?void 0:y.left)??0)+12,pointerEvents:_==="hidden"?"none":void 0}:{}};se.useEffect(()=>{if(!h)return;const q=new ResizeObserver(([Y])=>p(Y.contentRect.width));return q.observe(h),()=>q.disconnect()},[h]);const j=q=>{if(!(l!=null&&l.useChannelAddressAsIdentifier))return null;const Y=t[q];let U=Y==null?void 0:Y.channel;return _l(U)&&(U=v(U.$ref)),U??null},M=[{id:"operations",label:"Operations",icon:bl,items:Object.keys(t)},{id:"messages",label:"Messages",icon:vl,items:Object.keys(n)},{id:"schemas",label:"Schemas",icon:wl,items:Object.keys(i)}],ee=(q,Y)=>{s(q),Y&&setTimeout(()=>{var U;(U=document.getElementById(Y))==null||U.scrollIntoView({behavior:"smooth",block:"start"})},50)};return u.jsxs(u.Fragment,{children:[u.jsx("button",{onClick:()=>d(q=>!q),title:c?"Close navigation":"Open navigation",className:"panel-toggle-btn bg-neutral-100",style:I,children:u.jsx(tu,{isCollapsed:c})}),u.jsx(xl,{ref:g,isOpen:c,side:"left",onClose:()=>d(!1),width:"min-w-[450px] w-auto",children:u.jsxs("nav",{className:"space-y-1",children:[u.jsxs("div",{className:"flex items-center gap-2 pb-4 mb-2 border-b border-border",children:[u.jsx("span",{className:"text-sm font-semibold text-foreground truncate",children:e.title}),e.version&&u.jsxs("span",{className:"shrink-0 text-xs font-mono bg-primary-50 text-primary-600 border border-primary-200 px-1.5 py-0.5 rounded",children:["v",e.version]})]}),M.map(({id:q,label:Y,icon:U,items:pe})=>{const R=r===q;if(!(pe.length<1))return u.jsxs("div",{className:"pb-1",children:[u.jsxs("button",{onClick:()=>ee(q),className:`flex items-center gap-2 w-full text-left px-2 py-2 rounded-md group transition-colors ${R?"bg-primary-50":"hover:bg-neutral-50"}`,children:[u.jsx(U,{className:`w-3.5 h-3.5 shrink-0 transition-colors ${R?"text-primary-500":"text-foreground-muted group-hover:text-foreground-secondary"}`}),u.jsx("span",{className:`text-xs font-semibold uppercase tracking-wider transition-colors ${R?"text-primary-600":"text-foreground-muted group-hover:text-foreground-secondary"}`,children:Y}),u.jsx("span",{className:`ml-auto text-[10px] font-mono px-1.5 py-0.5 rounded transition-colors ${R?"bg-primary-100 text-primary-500 border border-primary-200":"bg-neutral-100 text-foreground-muted"}`,children:pe.length})]}),pe.length>0&&u.jsx("ul",{className:"mt-0.5 space-y-0.5 pl-3 border-l border-border ml-4",children:pe.map(k=>{const m=q==="operations"?t[k]:null,T=q==="operations"?j(k):null,S=m==null?void 0:m.action,W=S===tn.SEND?"bg-green-100 text-green-700":S===tn.RECEIVE?"bg-blue-100 text-blue-700":null,B=(a==null?void 0:a.tab)===q&&(a==null?void 0:a.key)===k;return u.jsx("li",{children:u.jsxs("button",{onClick:()=>{ee(q,`${q.slice(0,-1)}-${k}`),o==null||o(q,k)},className:`w-full text-left flex items-center gap-2 text-xs py-1.5 px-2 rounded-md transition-colors ${B?"bg-primary-50 text-primary-500 font-medium":R?"text-foreground-secondary hover:text-foreground hover:bg-primary-50":"text-foreground-muted hover:text-foreground-secondary hover:bg-neutral-50"}`,children:[W&&u.jsx("span",{className:`shrink-0 text-[10px] font-medium uppercase px-1.5 py-0.5 rounded ${W}`,children:S}),T!=null&&T.address?u.jsx(dr,{address:T.address,parameters:T.parameters,className:"text-xs bg-transparent p-0"}):u.jsx("span",{className:"truncate",children:k})]})},k)})})]},q)})]})})]})}function El(e){const t=e.replace("#","").padEnd(6,"0"),n=parseInt(t.slice(0,2),16),i=parseInt(t.slice(2,4),16),r=parseInt(t.slice(4,6),16);return`${n} ${i} ${r}`}function yi(e,t,n){if(e)for(const i of bu){const r=e[i];r&&(n[`--color-${t}-${i}`]=El(r))}}const Ou=[["background","--color-background"],["surface","--color-surface"],["border","--color-border"],["textPrimary","--color-text-primary"],["textSecondary","--color-text-secondary"],["textMuted","--color-text-muted"]],Tu={50:"15 23 42",100:"30 41 59",200:"51 65 85",300:"71 85 105",500:"148 163 184",600:"203 213 225",700:"226 232 240",800:"241 245 249",900:"248 250 252"};function Au(e){const t={},n=e.dark?"dark":e.light?"light":null,i=n==="dark"?e.dark:n==="light"?e.light:void 0;if(n==="dark")for(const[r,s]of Object.entries(Tu))t[`--color-neutral-${r}`]=s;if(i)for(const[r,s]of Ou){const o=i[r];o&&(t[s]=El(o))}return e.colors&&(yi(e.colors.primary,"primary",t),yi(e.colors.secondary,"secondary",t),yi(e.colors.neutral,"neutral",t)),t}var In=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Is(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Nu(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function i(){return this instanceof i?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(i){var r=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(n,i,r.get?r:{enumerable:!0,get:function(){return e[i]}})}),n}/*! @license DOMPurify 3.4.11 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.11/LICENSE */var xi,No;function jo(){if(No)return xi;No=1;function e(P,z){(z==null||z>P.length)&&(z=P.length);for(var Z=0,b=Array(z);Z<z;Z++)b[Z]=P[Z];return b}function t(P){if(Array.isArray(P))return P}function n(P,z){var Z=P==null?null:typeof Symbol<"u"&&P[Symbol.iterator]||P["@@iterator"];if(Z!=null){var b,A,D,le,Ie=[],ke=!0,re=!1;try{if(D=(Z=Z.call(P)).next,z!==0)for(;!(ke=(b=D.call(Z)).done)&&(Ie.push(b.value),Ie.length!==z);ke=!0);}catch(te){re=!0,A=te}finally{try{if(!ke&&Z.return!=null&&(le=Z.return(),Object(le)!==le))return}finally{if(re)throw A}}return Ie}}function i(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
4
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function r(P,z){return t(P)||n(P,z)||s(P,z)||i()}function s(P,z){if(P){if(typeof P=="string")return e(P,z);var Z={}.toString.call(P).slice(8,-1);return Z==="Object"&&P.constructor&&(Z=P.constructor.name),Z==="Map"||Z==="Set"?Array.from(P):Z==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Z)?e(P,z):void 0}}const o=Object.entries,a=Object.setPrototypeOf,l=Object.isFrozen,c=Object.getPrototypeOf,d=Object.getOwnPropertyDescriptor;let f=Object.freeze,p=Object.seal,h=Object.create,g=typeof Reflect<"u"&&Reflect,v=g.apply,E=g.construct;f||(f=function(z){return z}),p||(p=function(z){return z}),v||(v=function(z,Z){for(var b=arguments.length,A=new Array(b>2?b-2:0),D=2;D<b;D++)A[D-2]=arguments[D];return z.apply(Z,A)}),E||(E=function(z){for(var Z=arguments.length,b=new Array(Z>1?Z-1:0),A=1;A<Z;A++)b[A-1]=arguments[A];return new z(...b)});const _=ne(Array.prototype.forEach),w=ne(Array.prototype.lastIndexOf),y=ne(Array.prototype.pop),O=ne(Array.prototype.push),I=ne(Array.prototype.splice),j=Array.isArray,M=ne(String.prototype.toLowerCase),ee=ne(String.prototype.toString),q=ne(String.prototype.match),Y=ne(String.prototype.replace),U=ne(String.prototype.indexOf),pe=ne(String.prototype.trim),R=ne(Number.prototype.toString),k=ne(Boolean.prototype.toString),m=typeof BigInt>"u"?null:ne(BigInt.prototype.toString),T=typeof Symbol>"u"?null:ne(Symbol.prototype.toString),S=ne(Object.prototype.hasOwnProperty),W=ne(Object.prototype.toString),B=ne(RegExp.prototype.test),K=be(TypeError);function ne(P){return function(z){z instanceof RegExp&&(z.lastIndex=0);for(var Z=arguments.length,b=new Array(Z>1?Z-1:0),A=1;A<Z;A++)b[A-1]=arguments[A];return v(P,z,b)}}function be(P){return function(){for(var z=arguments.length,Z=new Array(z),b=0;b<z;b++)Z[b]=arguments[b];return E(P,Z)}}function Q(P,z){let Z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:M;if(a&&a(P,null),!j(z))return P;let b=z.length;for(;b--;){let A=z[b];if(typeof A=="string"){const D=Z(A);D!==A&&(l(z)||(z[b]=D),A=D)}P[A]=!0}return P}function we(P){for(let z=0;z<P.length;z++)S(P,z)||(P[z]=null);return P}function de(P){const z=h(null);for(const b of o(P)){var Z=r(b,2);const A=Z[0],D=Z[1];S(P,A)&&(j(D)?z[A]=we(D):D&&typeof D=="object"&&D.constructor===Object?z[A]=de(D):z[A]=D)}return z}function G(P){switch(typeof P){case"string":return P;case"number":return R(P);case"boolean":return k(P);case"bigint":return m?m(P):"0";case"symbol":return T?T(P):"Symbol()";case"undefined":return W(P);case"function":case"object":{if(P===null)return W(P);const z=P,Z=Ee(z,"toString");if(typeof Z=="function"){const b=Z(z);return typeof b=="string"?b:W(b)}return W(P)}default:return W(P)}}function Ee(P,z){for(;P!==null;){const b=d(P,z);if(b){if(b.get)return ne(b.get);if(typeof b.value=="function")return ne(b.value)}P=c(P)}function Z(){return null}return Z}function at(P){try{return B(P,""),!0}catch{return!1}}const vt=f(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Be=f(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Xe=f(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),jt=f(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),nn=f(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Un=f(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),wn=f(["#text"]),Xt=f(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),$e=f(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),rn=f(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),We=f(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),_n=p(/{{[\w\W]*|^[\w\W]*}}/g),Hn=p(/<%[\w\W]*|^[\w\W]*%>/g),Vn=p(/\${[\w\W]*/g),sn=p(/^data-[\-\w.\u00B7-\uFFFF]+$/),wt=p(/^aria-[\-\w]+$/),Ke=p(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),_t=p(/^(?:\w+script|data):/i),St=p(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),En=p(/^html$/i),Yt=p(/^[a-z][.\w]*(-[.\w]+)+$/i),kn=p(/<[/\w!]/g),Wn=p(/<[/\w]/g),Jn=p(/<\/no(script|embed|frames)/i),Ue=p(/\/>/i),C={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},L=function(){return typeof window>"u"?null:window},F=function(z,Z){if(typeof z!="object"||typeof z.createPolicy!="function")return null;let b=null;const A="data-tt-policy-suffix";Z&&Z.hasAttribute(A)&&(b=Z.getAttribute(A));const D="dompurify"+(b?"#"+b:"");try{return z.createPolicy(D,{createHTML(le){return le},createScriptURL(le){return le}})}catch{return console.warn("TrustedTypes policy "+D+" could not be created."),null}},H=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},oe=function(z,Z,b,A){return S(z,Z)&&j(z[Z])?Q(A.base?de(A.base):{},z[Z],A.transform):b};function ae(){let P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:L();const z=X=>ae(X);if(z.version="3.4.11",z.removed=[],!P||!P.document||P.document.nodeType!==C.document||!P.Element)return z.isSupported=!1,z;let Z=P.document;const b=Z,A=b.currentScript;P.DocumentFragment;const D=P.HTMLTemplateElement,le=P.Node,Ie=P.Element,ke=P.NodeFilter,re=P.NamedNodeMap;re===void 0&&(P.NamedNodeMap||P.MozNamedAttrMap),P.HTMLFormElement;const te=P.DOMParser,he=P.trustedTypes,Me=Ie.prototype,ze=Ee(Me,"cloneNode"),$t=Ee(Me,"remove"),Zn=Ee(Me,"nextSibling"),zt=Ee(Me,"childNodes"),on=Ee(Me,"parentNode"),On=Ee(Me,"shadowRoot"),Xn=Ee(Me,"attributes"),nt=le&&le.prototype?Ee(le.prototype,"nodeType"):null,Rt=le&&le.prototype?Ee(le.prototype,"nodeName"):null;if(typeof D=="function"){const X=Z.createElement("template");X.content&&X.content.ownerDocument&&(Z=X.content.ownerDocument)}let Qe,gt="",Yn,kr=!1,an=0;const Et=function(){if(an>0)throw K('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},qt=function(x){Et(),an++;try{return Qe.createHTML(x)}finally{an--}},Or=function(x){Et(),an++;try{return Qe.createScriptURL(x)}finally{an--}},ii=function(){return kr||(Yn=F(he,A),kr=!0),Yn},Tn=Z,$n=Tn.implementation,ln=Tn.createNodeIterator,si=Tn.createDocumentFragment,V=Tn.getElementsByTagName,fe=b.importNode;let ue=H();z.isSupported=typeof o=="function"&&typeof on=="function"&&$n&&$n.createHTMLDocument!==void 0;const Se=_n,He=Hn,ut=Vn,It=sn,An=wt,rt=_t,ft=St,Tr=Yt;let Kn=Ke,Le=null;const Ar=Q({},[...vt,...Be,...Xe,...nn,...wn]);let Pe=null;const Nr=Q({},[...Xt,...$e,...rn,...We]);let De=Object.seal(h(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Mt=null,Qn=null;const Je=Object.seal(h(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let jr=!0,cn=!0,me=!1,Gn=!0,Ce=!1,Ae=!0,yt=!1,kt=!1,un=null,fn=null,$=!1,ie=!1,xe=!1,Oe=!1,Ze=!0,xt=!1;const Sr="user-content-";let er=!0,oi=!1,Nn={},Ct=null;const ai=Q({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let co=null;const uo=Q({},["audio","video","img","source","image","track"]);let li=null;const fo=Q({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Rr="http://www.w3.org/1998/Math/MathML",Ir="http://www.w3.org/2000/svg",Lt="http://www.w3.org/1999/xhtml";let jn=Lt,ci=!1,ui=null;const Pc=Q({},[Rr,Ir,Lt],ee),po=f(["mi","mo","mn","ms","mtext"]);let fi=Q({},po);const ho=f(["annotation-xml"]);let di=Q({},ho);const Dc=Q({},["title","style","font","a","script"]);let tr=null;const Fc=["application/xhtml+xml","text/html"],Bc="text/html";let qe=null,Sn=null;const zc=Z.createElement("form"),mo=function(x){return x instanceof RegExp||x instanceof Function},pi=function(){let x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Sn&&Sn===x)return;(!x||typeof x!="object")&&(x={}),x=de(x),tr=Fc.indexOf(x.PARSER_MEDIA_TYPE)===-1?Bc:x.PARSER_MEDIA_TYPE,qe=tr==="application/xhtml+xml"?ee:M,Le=oe(x,"ALLOWED_TAGS",Ar,{transform:qe}),Pe=oe(x,"ALLOWED_ATTR",Nr,{transform:qe}),ui=oe(x,"ALLOWED_NAMESPACES",Pc,{transform:ee}),li=oe(x,"ADD_URI_SAFE_ATTR",fo,{transform:qe,base:fo}),co=oe(x,"ADD_DATA_URI_TAGS",uo,{transform:qe,base:uo}),Ct=oe(x,"FORBID_CONTENTS",ai,{transform:qe}),Mt=oe(x,"FORBID_TAGS",de({}),{transform:qe}),Qn=oe(x,"FORBID_ATTR",de({}),{transform:qe}),Nn=S(x,"USE_PROFILES")?x.USE_PROFILES&&typeof x.USE_PROFILES=="object"?de(x.USE_PROFILES):x.USE_PROFILES:!1,jr=x.ALLOW_ARIA_ATTR!==!1,cn=x.ALLOW_DATA_ATTR!==!1,me=x.ALLOW_UNKNOWN_PROTOCOLS||!1,Gn=x.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ce=x.SAFE_FOR_TEMPLATES||!1,Ae=x.SAFE_FOR_XML!==!1,yt=x.WHOLE_DOCUMENT||!1,ie=x.RETURN_DOM||!1,xe=x.RETURN_DOM_FRAGMENT||!1,Oe=x.RETURN_TRUSTED_TYPE||!1,$=x.FORCE_BODY||!1,Ze=x.SANITIZE_DOM!==!1,xt=x.SANITIZE_NAMED_PROPS||!1,er=x.KEEP_CONTENT!==!1,oi=x.IN_PLACE||!1,Kn=at(x.ALLOWED_URI_REGEXP)?x.ALLOWED_URI_REGEXP:Ke,jn=typeof x.NAMESPACE=="string"?x.NAMESPACE:Lt,fi=S(x,"MATHML_TEXT_INTEGRATION_POINTS")&&x.MATHML_TEXT_INTEGRATION_POINTS&&typeof x.MATHML_TEXT_INTEGRATION_POINTS=="object"?de(x.MATHML_TEXT_INTEGRATION_POINTS):Q({},po),di=S(x,"HTML_INTEGRATION_POINTS")&&x.HTML_INTEGRATION_POINTS&&typeof x.HTML_INTEGRATION_POINTS=="object"?de(x.HTML_INTEGRATION_POINTS):Q({},ho);const N=S(x,"CUSTOM_ELEMENT_HANDLING")&&x.CUSTOM_ELEMENT_HANDLING&&typeof x.CUSTOM_ELEMENT_HANDLING=="object"?de(x.CUSTOM_ELEMENT_HANDLING):h(null);if(De=h(null),S(N,"tagNameCheck")&&mo(N.tagNameCheck)&&(De.tagNameCheck=N.tagNameCheck),S(N,"attributeNameCheck")&&mo(N.attributeNameCheck)&&(De.attributeNameCheck=N.attributeNameCheck),S(N,"allowCustomizedBuiltInElements")&&typeof N.allowCustomizedBuiltInElements=="boolean"&&(De.allowCustomizedBuiltInElements=N.allowCustomizedBuiltInElements),p(De),Ce&&(cn=!1),xe&&(ie=!0),Nn&&(Le=Q({},wn),Pe=h(null),Nn.html===!0&&(Q(Le,vt),Q(Pe,Xt)),Nn.svg===!0&&(Q(Le,Be),Q(Pe,$e),Q(Pe,We)),Nn.svgFilters===!0&&(Q(Le,Xe),Q(Pe,$e),Q(Pe,We)),Nn.mathMl===!0&&(Q(Le,nn),Q(Pe,rn),Q(Pe,We))),Je.tagCheck=null,Je.attributeCheck=null,S(x,"ADD_TAGS")&&(typeof x.ADD_TAGS=="function"?Je.tagCheck=x.ADD_TAGS:j(x.ADD_TAGS)&&(Le===Ar&&(Le=de(Le)),Q(Le,x.ADD_TAGS,qe))),S(x,"ADD_ATTR")&&(typeof x.ADD_ATTR=="function"?Je.attributeCheck=x.ADD_ATTR:j(x.ADD_ATTR)&&(Pe===Nr&&(Pe=de(Pe)),Q(Pe,x.ADD_ATTR,qe))),S(x,"ADD_URI_SAFE_ATTR")&&j(x.ADD_URI_SAFE_ATTR)&&Q(li,x.ADD_URI_SAFE_ATTR,qe),S(x,"FORBID_CONTENTS")&&j(x.FORBID_CONTENTS)&&(Ct===ai&&(Ct=de(Ct)),Q(Ct,x.FORBID_CONTENTS,qe)),S(x,"ADD_FORBID_CONTENTS")&&j(x.ADD_FORBID_CONTENTS)&&(Ct===ai&&(Ct=de(Ct)),Q(Ct,x.ADD_FORBID_CONTENTS,qe)),er&&(Le["#text"]=!0),yt&&Q(Le,["html","head","body"]),Le.table&&(Q(Le,["tbody"]),delete Mt.tbody),x.TRUSTED_TYPES_POLICY){if(typeof x.TRUSTED_TYPES_POLICY.createHTML!="function")throw K('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof x.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw K('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const J=Qe;Qe=x.TRUSTED_TYPES_POLICY;try{gt=qt("")}catch(ce){throw Qe=J,ce}}else x.TRUSTED_TYPES_POLICY===null?(Qe=void 0,gt=""):(Qe===void 0&&(Qe=ii()),Qe&&typeof gt=="string"&&(gt=qt("")));f&&f(x),Sn=x},go=Q({},[...Be,...Xe,...jt]),yo=Q({},[...nn,...Un]),qc=function(x,N,J){return N.namespaceURI===Lt?x==="svg":N.namespaceURI===Rr?x==="svg"&&(J==="annotation-xml"||fi[J]):!!go[x]},Uc=function(x,N,J){return N.namespaceURI===Lt?x==="math":N.namespaceURI===Ir?x==="math"&&di[J]:!!yo[x]},Hc=function(x,N,J){return N.namespaceURI===Ir&&!di[J]||N.namespaceURI===Rr&&!fi[J]?!1:!yo[x]&&(Dc[x]||!go[x])},Vc=function(x){let N=on(x);(!N||!N.tagName)&&(N={namespaceURI:jn,tagName:"template"});const J=M(x.tagName),ce=M(N.tagName);return ui[x.namespaceURI]?x.namespaceURI===Ir?qc(J,N,ce):x.namespaceURI===Rr?Uc(J,N,ce):x.namespaceURI===Lt?Hc(J,N,ce):!!(tr==="application/xhtml+xml"&&ui[x.namespaceURI]):!1},Kt=function(x){O(z.removed,{element:x});try{on(x).removeChild(x)}catch{if($t(x),!on(x))throw K("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},xo=function(x){const N=zt(x);if(N){const ce=[];_(N,ve=>{O(ce,ve)}),_(ce,ve=>{try{$t(ve)}catch{}})}const J=Xn(x);if(J)for(let ce=J.length-1;ce>=0;--ce){const ve=J[ce],Te=ve&&ve.name;if(typeof Te=="string")try{x.removeAttribute(Te)}catch{}}},dn=function(x,N){try{O(z.removed,{attribute:N.getAttributeNode(x),from:N})}catch{O(z.removed,{attribute:null,from:N})}if(N.removeAttribute(x),x==="is")if(ie||xe)try{Kt(N)}catch{}else try{N.setAttribute(x,"")}catch{}},Wc=function(x){const N=Xn(x);if(N)for(let J=N.length-1;J>=0;--J){const ce=N[J],ve=ce&&ce.name;if(!(typeof ve!="string"||Pe[qe(ve)]))try{x.removeAttribute(ve)}catch{}}},Jc=function(x){const N=[x];for(;N.length>0;){const J=N.pop();(nt?nt(J):J.nodeType)===C.element&&Wc(J);const ve=zt(J);if(ve)for(let Te=ve.length-1;Te>=0;--Te)N.push(ve[Te])}},bo=function(x){let N=null,J=null;if($)x="<remove></remove>"+x;else{const Te=q(x,/^[\r\n\t ]+/);J=Te&&Te[0]}tr==="application/xhtml+xml"&&jn===Lt&&(x='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+x+"</body></html>");const ce=Qe?qt(x):x;if(jn===Lt)try{N=new te().parseFromString(ce,tr)}catch{}if(!N||!N.documentElement){N=$n.createDocument(jn,"template",null);try{N.documentElement.innerHTML=ci?gt:ce}catch{}}const ve=N.body||N.documentElement;return x&&J&&ve.insertBefore(Z.createTextNode(J),ve.childNodes[0]||null),jn===Lt?V.call(N,yt?"html":"body")[0]:yt?N.documentElement:ve},vo=function(x){return ln.call(x.ownerDocument||x,x,ke.SHOW_ELEMENT|ke.SHOW_COMMENT|ke.SHOW_TEXT|ke.SHOW_PROCESSING_INSTRUCTION|ke.SHOW_CDATA_SECTION,null)},Mr=function(x){return x=Y(x,Se," "),x=Y(x,He," "),x=Y(x,ut," "),x},hi=function(x){var N;x.normalize();const J=ln.call(x.ownerDocument||x,x,ke.SHOW_TEXT|ke.SHOW_COMMENT|ke.SHOW_CDATA_SECTION|ke.SHOW_PROCESSING_INSTRUCTION,null);let ce=J.nextNode();for(;ce;)ce.data=Mr(ce.data),ce=J.nextNode();const ve=(N=x.querySelectorAll)===null||N===void 0?void 0:N.call(x,"template");ve&&_(ve,Te=>{Rn(Te.content)&&hi(Te.content)})},Cr=function(x){const N=Rt?Rt(x):null;return typeof N!="string"||qe(N)!=="form"?!1:typeof x.nodeName!="string"||typeof x.textContent!="string"||typeof x.removeChild!="function"||x.attributes!==Xn(x)||typeof x.removeAttribute!="function"||typeof x.setAttribute!="function"||typeof x.namespaceURI!="string"||typeof x.insertBefore!="function"||typeof x.hasChildNodes!="function"||x.nodeType!==nt(x)||x.childNodes!==zt(x)},Rn=function(x){if(!nt||typeof x!="object"||x===null)return!1;try{return nt(x)===C.documentFragment}catch{return!1}},nr=function(x){if(!nt||typeof x!="object"||x===null)return!1;try{return typeof nt(x)=="number"}catch{return!1}};function Ut(X,x,N){X.length!==0&&_(X,J=>{J.call(z,x,N,Sn)})}const Zc=function(x,N){return!!(Ae&&x.hasChildNodes()&&!nr(x.firstElementChild)&&B(kn,x.textContent)&&B(kn,x.innerHTML)||Ae&&x.namespaceURI===Lt&&N==="style"&&nr(x.firstElementChild)||x.nodeType===C.processingInstruction||Ae&&x.nodeType===C.comment&&B(Wn,x.data))},Xc=function(x,N){if(!Mt[N]&&Eo(N)&&(De.tagNameCheck instanceof RegExp&&B(De.tagNameCheck,N)||De.tagNameCheck instanceof Function&&De.tagNameCheck(N)))return!1;if(er&&!Ct[N]){const J=on(x),ce=zt(x);if(ce&&J){const ve=ce.length;for(let Te=ve-1;Te>=0;--Te){const Ye=oi?ce[Te]:ze(ce[Te],!0);J.insertBefore(Ye,Zn(x))}}}return Kt(x),!0},wo=function(x){if(Ut(ue.beforeSanitizeElements,x,null),Cr(x))return Kt(x),!0;const N=qe(Rt?Rt(x):x.nodeName);if(Ut(ue.uponSanitizeElement,x,{tagName:N,allowedTags:Le}),Zc(x,N))return Kt(x),!0;if(Mt[N]||!(Je.tagCheck instanceof Function&&Je.tagCheck(N))&&!Le[N])return Xc(x,N);if((nt?nt(x):x.nodeType)===C.element&&!Vc(x)||(N==="noscript"||N==="noembed"||N==="noframes")&&B(Jn,x.innerHTML))return Kt(x),!0;if(Ce&&x.nodeType===C.text){const ce=Mr(x.textContent);x.textContent!==ce&&(O(z.removed,{element:x.cloneNode()}),x.textContent=ce)}return Ut(ue.afterSanitizeElements,x,null),!1},_o=function(x,N,J){if(Qn[N]||Ze&&(N==="id"||N==="name")&&(J in Z||J in zc))return!1;const ce=Pe[N]||Je.attributeCheck instanceof Function&&Je.attributeCheck(N,x);if(!(cn&&B(It,N))){if(!(jr&&B(An,N))){if(ce){if(!li[N]){if(!B(Kn,Y(J,ft,""))){if(!((N==="src"||N==="xlink:href"||N==="href")&&x!=="script"&&U(J,"data:")===0&&co[x])){if(!(me&&!B(rt,Y(J,ft,"")))){if(J)return!1}}}}}else if(!(Eo(x)&&(De.tagNameCheck instanceof RegExp&&B(De.tagNameCheck,x)||De.tagNameCheck instanceof Function&&De.tagNameCheck(x))&&(De.attributeNameCheck instanceof RegExp&&B(De.attributeNameCheck,N)||De.attributeNameCheck instanceof Function&&De.attributeNameCheck(N,x))||N==="is"&&De.allowCustomizedBuiltInElements&&(De.tagNameCheck instanceof RegExp&&B(De.tagNameCheck,J)||De.tagNameCheck instanceof Function&&De.tagNameCheck(J))))return!1}}return!0},Yc=Q({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Eo=function(x){return!Yc[M(x)]&&B(Tr,x)},$c=function(x,N,J,ce){if(Qe&&typeof he=="object"&&typeof he.getAttributeType=="function"&&!J)switch(he.getAttributeType(x,N)){case"TrustedHTML":return qt(ce);case"TrustedScriptURL":return Or(ce)}return ce},Kc=function(x,N,J,ce){try{J?x.setAttributeNS(J,N,ce):x.setAttribute(N,ce),Cr(x)?Kt(x):y(z.removed)}catch{dn(N,x)}},ko=function(x){Ut(ue.beforeSanitizeAttributes,x,null);const N=x.attributes;if(!N||Cr(x))return;const J={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Pe,forceKeepAttr:void 0};let ce=N.length;const ve=qe(x.nodeName);for(;ce--;){const Te=N[ce],Ye=Te.name,Ve=Te.namespaceURI,bt=Te.value,Ot=qe(Ye),gi=bt;let it=Ye==="value"?gi:pe(gi);if(J.attrName=Ot,J.attrValue=it,J.keepAttr=!0,J.forceKeepAttr=void 0,Ut(ue.uponSanitizeAttribute,x,J),it=J.attrValue,xt&&(Ot==="id"||Ot==="name")&&U(it,Sr)!==0&&(dn(Ye,x),it=Sr+it),Ae&&B(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,it)){dn(Ye,x);continue}if(Ot==="attributename"&&q(it,"href")){dn(Ye,x);continue}if(!J.forceKeepAttr){if(!J.keepAttr){dn(Ye,x);continue}if(!Gn&&B(Ue,it)){dn(Ye,x);continue}if(Ce&&(it=Mr(it)),!_o(ve,Ot,it)){dn(Ye,x);continue}it=$c(ve,Ot,Ve,it),it!==gi&&Kc(x,Ye,Ve,it)}}Ut(ue.afterSanitizeAttributes,x,null)},Lr=function(x){let N=null;const J=vo(x);for(Ut(ue.beforeSanitizeShadowDOM,x,null);N=J.nextNode();)if(Ut(ue.uponSanitizeShadowNode,N,null),wo(N),ko(N),Rn(N.content)&&Lr(N.content),(nt?nt(N):N.nodeType)===C.element){const ve=On(N);Rn(ve)&&(mi(ve),Lr(ve))}Ut(ue.afterSanitizeShadowDOM,x,null)},mi=function(x){const N=[{node:x,shadow:null}];for(;N.length>0;){const J=N.pop();if(J.shadow){Lr(J.shadow);continue}const ce=J.node,Te=(nt?nt(ce):ce.nodeType)===C.element,Ye=zt(ce);if(Ye)for(let Ve=Ye.length-1;Ve>=0;--Ve)N.push({node:Ye[Ve],shadow:null});if(Te){const Ve=Rt?Rt(ce):null;if(typeof Ve=="string"&&qe(Ve)==="template"){const bt=ce.content;Rn(bt)&&N.push({node:bt,shadow:null})}}if(Te){const Ve=On(ce);Rn(Ve)&&N.push({node:null,shadow:Ve},{node:Ve,shadow:null})}}};return z.sanitize=function(X){let x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},N=null,J=null,ce=null,ve=null;if(ci=!X,ci&&(X="<!-->"),typeof X!="string"&&!nr(X)&&(X=G(X),typeof X!="string"))throw K("dirty is not a string, aborting");if(!z.isSupported)return X;kt?(Le=un,Pe=fn):pi(x),(ue.uponSanitizeElement.length>0||ue.uponSanitizeAttribute.length>0)&&(Le=de(Le)),ue.uponSanitizeAttribute.length>0&&(Pe=de(Pe)),z.removed=[];const Te=oi&&typeof X!="string"&&nr(X);if(Te){const bt=Rt?Rt(X):X.nodeName;if(typeof bt=="string"){const Ot=qe(bt);if(!Le[Ot]||Mt[Ot])throw K("root node is forbidden and cannot be sanitized in-place")}if(Cr(X))throw K("root node is clobbered and cannot be sanitized in-place");try{mi(X)}catch(Ot){throw xo(X),Ot}}else if(nr(X))N=bo("<!---->"),J=N.ownerDocument.importNode(X,!0),J.nodeType===C.element&&J.nodeName==="BODY"||J.nodeName==="HTML"?N=J:N.appendChild(J),mi(J);else{if(!ie&&!Ce&&!yt&&X.indexOf("<")===-1)return Qe&&Oe?qt(X):X;if(N=bo(X),!N)return ie?null:Oe?gt:""}N&&$&&Kt(N.firstChild);const Ye=vo(Te?X:N);try{for(;ce=Ye.nextNode();)wo(ce),ko(ce),Rn(ce.content)&&Lr(ce.content)}catch(bt){throw Te&&xo(X),bt}if(Te)return _(z.removed,bt=>{bt.element&&Jc(bt.element)}),Ce&&hi(X),X;if(ie){if(Ce&&hi(N),xe)for(ve=si.call(N.ownerDocument);N.firstChild;)ve.appendChild(N.firstChild);else ve=N;return(Pe.shadowroot||Pe.shadowrootmode)&&(ve=fe.call(b,ve,!0)),ve}let Ve=yt?N.outerHTML:N.innerHTML;return yt&&Le["!doctype"]&&N.ownerDocument&&N.ownerDocument.doctype&&N.ownerDocument.doctype.name&&B(En,N.ownerDocument.doctype.name)&&(Ve="<!DOCTYPE "+N.ownerDocument.doctype.name+`>
5
+ `+Ve),Ce&&(Ve=Mr(Ve)),Qe&&Oe?qt(Ve):Ve},z.setConfig=function(){let X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};pi(X),kt=!0,un=Le,fn=Pe},z.clearConfig=function(){Sn=null,kt=!1,un=null,fn=null,Qe=Yn,gt=""},z.isValidAttribute=function(X,x,N){Sn||pi({});const J=qe(X),ce=qe(x);return _o(J,ce,N)},z.addHook=function(X,x){typeof x=="function"&&S(ue,X)&&O(ue[X],x)},z.removeHook=function(X,x){if(S(ue,X)){if(x!==void 0){const N=w(ue[X],x);return N===-1?void 0:I(ue[X],N,1)[0]}return y(ue[X])}},z.removeHooks=function(X){S(ue,X)&&(ue[X]=[])},z.removeAllHooks=function(){ue=H()},z}var ye=ae();return xi=ye,xi}var bi,So;function ju(){return So||(So=1,bi=self.DOMPurify||(self.DOMPurify=jo().default||jo())),bi}var Su=ju();const kl=Is(Su);function Ms(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var yn=Ms();function Ol(e){yn=e}var cr={exec:()=>null};function je(e,t=""){let n=typeof e=="string"?e:e.source;const i={replace:(r,s)=>{let o=typeof s=="string"?s:s.source;return o=o.replace(ot.caret,"$1"),n=n.replace(r,o),i},getRegex:()=>new RegExp(n,t)};return i}var ot={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},Ru=/^(?:[ \t]*(?:\n|$))+/,Iu=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Mu=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,gr=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Cu=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Cs=/(?:[*+-]|\d{1,9}[.)])/,Tl=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Al=je(Tl).replace(/bull/g,Cs).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Lu=je(Tl).replace(/bull/g,Cs).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Ls=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Pu=/^[^\n]+/,Ps=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Du=je(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Ps).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Fu=je(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Cs).getRegex(),Gr="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Ds=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Bu=je("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Ds).replace("tag",Gr).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Nl=je(Ls).replace("hr",gr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Gr).getRegex(),zu=je(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Nl).getRegex(),Fs={blockquote:zu,code:Iu,def:Du,fences:Mu,heading:Cu,hr:gr,html:Bu,lheading:Al,list:Fu,newline:Ru,paragraph:Nl,table:cr,text:Pu},Ro=je("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",gr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Gr).getRegex(),qu={...Fs,lheading:Lu,table:Ro,paragraph:je(Ls).replace("hr",gr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ro).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Gr).getRegex()},Uu={...Fs,html:je(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ds).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:cr,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:je(Ls).replace("hr",gr).replace("heading",` *#{1,6} *[^
6
+ ]`).replace("lheading",Al).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Hu=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Vu=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,jl=/^( {2,}|\\)\n(?!\s*$)/,Wu=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,ei=/[\p{P}\p{S}]/u,Bs=/[\s\p{P}\p{S}]/u,Sl=/[^\s\p{P}\p{S}]/u,Ju=je(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Bs).getRegex(),Rl=/(?!~)[\p{P}\p{S}]/u,Zu=/(?!~)[\s\p{P}\p{S}]/u,Xu=/(?:[^\s\p{P}\p{S}]|~)/u,Yu=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,Il=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,$u=je(Il,"u").replace(/punct/g,ei).getRegex(),Ku=je(Il,"u").replace(/punct/g,Rl).getRegex(),Ml="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Qu=je(Ml,"gu").replace(/notPunctSpace/g,Sl).replace(/punctSpace/g,Bs).replace(/punct/g,ei).getRegex(),Gu=je(Ml,"gu").replace(/notPunctSpace/g,Xu).replace(/punctSpace/g,Zu).replace(/punct/g,Rl).getRegex(),ef=je("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Sl).replace(/punctSpace/g,Bs).replace(/punct/g,ei).getRegex(),tf=je(/\\(punct)/,"gu").replace(/punct/g,ei).getRegex(),nf=je(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),rf=je(Ds).replace("(?:-->|$)","-->").getRegex(),sf=je("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",rf).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Zr=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,of=je(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Zr).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Cl=je(/^!?\[(label)\]\[(ref)\]/).replace("label",Zr).replace("ref",Ps).getRegex(),Ll=je(/^!?\[(ref)\](?:\[\])?/).replace("ref",Ps).getRegex(),af=je("reflink|nolink(?!\\()","g").replace("reflink",Cl).replace("nolink",Ll).getRegex(),zs={_backpedal:cr,anyPunctuation:tf,autolink:nf,blockSkip:Yu,br:jl,code:Vu,del:cr,emStrongLDelim:$u,emStrongRDelimAst:Qu,emStrongRDelimUnd:ef,escape:Hu,link:of,nolink:Ll,punctuation:Ju,reflink:Cl,reflinkSearch:af,tag:sf,text:Wu,url:cr},lf={...zs,link:je(/^!?\[(label)\]\((.*?)\)/).replace("label",Zr).getRegex(),reflink:je(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Zr).getRegex()},xs={...zs,emStrongRDelimAst:Gu,emStrongLDelim:Ku,url:je(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},cf={...xs,br:je(jl).replace("{2,}","*").getRegex(),text:je(xs.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Pr={normal:Fs,gfm:qu,pedantic:Uu},rr={normal:zs,gfm:xs,breaks:cf,pedantic:lf},uf={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Io=e=>uf[e];function Pt(e,t){if(t){if(ot.escapeTest.test(e))return e.replace(ot.escapeReplace,Io)}else if(ot.escapeTestNoEncode.test(e))return e.replace(ot.escapeReplaceNoEncode,Io);return e}function Mo(e){try{e=encodeURI(e).replace(ot.percentDecode,"%")}catch{return null}return e}function Co(e,t){var s;const n=e.replace(ot.findPipe,(o,a,l)=>{let c=!1,d=a;for(;--d>=0&&l[d]==="\\";)c=!c;return c?"|":" |"}),i=n.split(ot.splitPipe);let r=0;if(i[0].trim()||i.shift(),i.length>0&&!((s=i.at(-1))!=null&&s.trim())&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;r<i.length;r++)i[r]=i[r].trim().replace(ot.slashPipe,"|");return i}function ir(e,t,n){const i=e.length;if(i===0)return"";let r=0;for(;r<i&&e.charAt(i-r-1)===t;)r++;return e.slice(0,i-r)}function ff(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let i=0;i<e.length;i++)if(e[i]==="\\")i++;else if(e[i]===t[0])n++;else if(e[i]===t[1]&&(n--,n<0))return i;return n>0?-2:-1}function Lo(e,t,n,i,r){const s=t.href,o=t.title||null,a=e[1].replace(r.other.outputLinkReplace,"$1");i.state.inLink=!0;const l={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:s,title:o,text:a,tokens:i.inlineTokens(a)};return i.state.inLink=!1,l}function df(e,t,n){const i=e.match(n.other.indentCodeCompensation);if(i===null)return t;const r=i[1];return t.split(`
7
+ `).map(s=>{const o=s.match(n.other.beginningSpace);if(o===null)return s;const[a]=o;return a.length>=r.length?s.slice(r.length):s}).join(`
8
+ `)}var Xr=class{constructor(e){_e(this,"options");_e(this,"rules");_e(this,"lexer");this.options=e||yn}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:ir(n,`
9
+ `)}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const n=t[0],i=df(n,t[3]||"",this.rules);return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:i}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(this.rules.other.endingHash.test(n)){const i=ir(n,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceChar.test(i))&&(n=i.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:ir(t[0],`
10
+ `)}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let n=ir(t[0],`
11
+ `).split(`
12
+ `),i="",r="";const s=[];for(;n.length>0;){let o=!1;const a=[];let l;for(l=0;l<n.length;l++)if(this.rules.other.blockquoteStart.test(n[l]))a.push(n[l]),o=!0;else if(!o)a.push(n[l]);else break;n=n.slice(l);const c=a.join(`
13
+ `),d=c.replace(this.rules.other.blockquoteSetextReplace,`
14
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");i=i?`${i}
15
+ ${c}`:c,r=r?`${r}
16
+ ${d}`:d;const f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,s,!0),this.lexer.state.top=f,n.length===0)break;const p=s.at(-1);if((p==null?void 0:p.type)==="code")break;if((p==null?void 0:p.type)==="blockquote"){const h=p,g=h.raw+`
17
+ `+n.join(`
18
+ `),v=this.blockquote(g);s[s.length-1]=v,i=i.substring(0,i.length-h.raw.length)+v.raw,r=r.substring(0,r.length-h.text.length)+v.text;break}else if((p==null?void 0:p.type)==="list"){const h=p,g=h.raw+`
19
+ `+n.join(`
20
+ `),v=this.list(g);s[s.length-1]=v,i=i.substring(0,i.length-p.raw.length)+v.raw,r=r.substring(0,r.length-h.raw.length)+v.raw,n=g.substring(s.at(-1).raw.length).split(`
21
+ `);continue}}return{type:"blockquote",raw:i,tokens:s,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim();const i=n.length>1,r={type:"list",raw:"",ordered:i,start:i?+n.slice(0,-1):"",loose:!1,items:[]};n=i?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=i?n:"[*+-]");const s=this.rules.other.listItemRegex(n);let o=!1;for(;e;){let l=!1,c="",d="";if(!(t=s.exec(e))||this.rules.block.hr.test(e))break;c=t[0],e=e.substring(c.length);let f=t[2].split(`
22
+ `,1)[0].replace(this.rules.other.listReplaceTabs,_=>" ".repeat(3*_.length)),p=e.split(`
23
+ `,1)[0],h=!f.trim(),g=0;if(this.options.pedantic?(g=2,d=f.trimStart()):h?g=t[1].length+1:(g=t[2].search(this.rules.other.nonSpaceChar),g=g>4?1:g,d=f.slice(g),g+=t[1].length),h&&this.rules.other.blankLine.test(p)&&(c+=p+`
24
+ `,e=e.substring(p.length+1),l=!0),!l){const _=this.rules.other.nextBulletRegex(g),w=this.rules.other.hrRegex(g),y=this.rules.other.fencesBeginRegex(g),O=this.rules.other.headingBeginRegex(g),I=this.rules.other.htmlBeginRegex(g);for(;e;){const j=e.split(`
25
+ `,1)[0];let M;if(p=j,this.options.pedantic?(p=p.replace(this.rules.other.listReplaceNesting," "),M=p):M=p.replace(this.rules.other.tabCharGlobal," "),y.test(p)||O.test(p)||I.test(p)||_.test(p)||w.test(p))break;if(M.search(this.rules.other.nonSpaceChar)>=g||!p.trim())d+=`
26
+ `+M.slice(g);else{if(h||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||y.test(f)||O.test(f)||w.test(f))break;d+=`
27
+ `+p}!h&&!p.trim()&&(h=!0),c+=j+`
28
+ `,e=e.substring(j.length+1),f=M.slice(g)}}r.loose||(o?r.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(o=!0));let v=null,E;this.options.gfm&&(v=this.rules.other.listIsTask.exec(d),v&&(E=v[0]!=="[ ] ",d=d.replace(this.rules.other.listReplaceTask,""))),r.items.push({type:"list_item",raw:c,task:!!v,checked:E,loose:!1,text:d,tokens:[]}),r.raw+=c}const a=r.items.at(-1);if(a)a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd();else return;r.raw=r.raw.trimEnd();for(let l=0;l<r.items.length;l++)if(this.lexer.state.top=!1,r.items[l].tokens=this.lexer.blockTokens(r.items[l].text,[]),!r.loose){const c=r.items[l].tokens.filter(f=>f.type==="space"),d=c.length>0&&c.some(f=>this.rules.other.anyLine.test(f.raw));r.loose=d}if(r.loose)for(let l=0;l<r.items.length;l++)r.items[l].loose=!0;return r}}html(e){const t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){const t=this.rules.block.def.exec(e);if(t){const n=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),i=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:t[0],href:i,title:r}}}table(e){var o;const t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;const n=Co(t[1]),i=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),r=(o=t[3])!=null&&o.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
29
+ `):[],s={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===i.length){for(const a of i)this.rules.other.tableAlignRight.test(a)?s.align.push("right"):this.rules.other.tableAlignCenter.test(a)?s.align.push("center"):this.rules.other.tableAlignLeft.test(a)?s.align.push("left"):s.align.push(null);for(let a=0;a<n.length;a++)s.header.push({text:n[a],tokens:this.lexer.inline(n[a]),header:!0,align:s.align[a]});for(const a of r)s.rows.push(Co(a,s.header.length).map((l,c)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:s.align[c]})));return s}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const n=t[1].charAt(t[1].length-1)===`
30
+ `?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;const s=ir(n.slice(0,-1),"\\");if((n.length-s.length)%2===0)return}else{const s=ff(t[2],"()");if(s===-2)return;if(s>-1){const a=(t[0].indexOf("!")===0?5:4)+t[1].length+s;t[2]=t[2].substring(0,s),t[0]=t[0].substring(0,a).trim(),t[3]=""}}let i=t[2],r="";if(this.options.pedantic){const s=this.rules.other.pedanticHrefTitle.exec(i);s&&(i=s[1],r=s[3])}else r=t[3]?t[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?i=i.slice(1):i=i.slice(1,-1)),Lo(t,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const i=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),r=t[i.toLowerCase()];if(!r){const s=n[0].charAt(0);return{type:"text",raw:s,text:s}}return Lo(n,r,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let i=this.rules.inline.emStrongLDelim.exec(e);if(!i||i[3]&&n.match(this.rules.other.unicodeAlphaNumeric))return;if(!(i[1]||i[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const s=[...i[0]].length-1;let o,a,l=s,c=0;const d=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,t=t.slice(-1*e.length+s);(i=d.exec(t))!=null;){if(o=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!o)continue;if(a=[...o].length,i[3]||i[4]){l+=a;continue}else if((i[5]||i[6])&&s%3&&!((s+a)%3)){c+=a;continue}if(l-=a,l>0)continue;a=Math.min(a,a+l+c);const f=[...i[0]][0].length,p=e.slice(0,s+i.index+f+a);if(Math.min(s,a)%2){const g=p.slice(1,-1);return{type:"em",raw:p,text:g,tokens:this.lexer.inlineTokens(g)}}const h=p.slice(2,-2);return{type:"strong",raw:p,text:h,tokens:this.lexer.inlineTokens(h)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(this.rules.other.newLineCharGlobal," ");const i=this.rules.other.nonSpaceChar.test(n),r=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return i&&r&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let n,i;return t[2]==="@"?(n=t[1],i="mailto:"+n):(n=t[1],i=n),{type:"link",raw:t[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}url(e){var n;let t;if(t=this.rules.inline.url.exec(e)){let i,r;if(t[2]==="@")i=t[0],r="mailto:"+i;else{let s;do s=t[0],t[0]=((n=this.rules.inline._backpedal.exec(t[0]))==null?void 0:n[0])??"";while(s!==t[0]);i=t[0],t[1]==="www."?r="http://"+t[0]:r=t[0]}return{type:"link",raw:t[0],text:i,href:r,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){const n=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:n}}}},Wt=class bs{constructor(t){_e(this,"tokens");_e(this,"options");_e(this,"state");_e(this,"tokenizer");_e(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||yn,this.options.tokenizer=this.options.tokenizer||new Xr,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const n={other:ot,block:Pr.normal,inline:rr.normal};this.options.pedantic?(n.block=Pr.pedantic,n.inline=rr.pedantic):this.options.gfm&&(n.block=Pr.gfm,this.options.breaks?n.inline=rr.breaks:n.inline=rr.gfm),this.tokenizer.rules=n}static get rules(){return{block:Pr,inline:rr}}static lex(t,n){return new bs(n).lex(t)}static lexInline(t,n){return new bs(n).inlineTokens(t)}lex(t){t=t.replace(ot.carriageReturn,`
31
+ `),this.blockTokens(t,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){const i=this.inlineQueue[n];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,n=[],i=!1){var r,s,o;for(this.options.pedantic&&(t=t.replace(ot.tabCharGlobal," ").replace(ot.spaceLine,""));t;){let a;if((s=(r=this.options.extensions)==null?void 0:r.block)!=null&&s.some(c=>(a=c.call({lexer:this},t,n))?(t=t.substring(a.raw.length),n.push(a),!0):!1))continue;if(a=this.tokenizer.space(t)){t=t.substring(a.raw.length);const c=n.at(-1);a.raw.length===1&&c!==void 0?c.raw+=`
32
+ `:n.push(a);continue}if(a=this.tokenizer.code(t)){t=t.substring(a.raw.length);const c=n.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=`
33
+ `+a.raw,c.text+=`
34
+ `+a.text,this.inlineQueue.at(-1).src=c.text):n.push(a);continue}if(a=this.tokenizer.fences(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.heading(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.hr(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.blockquote(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.list(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.html(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.def(t)){t=t.substring(a.raw.length);const c=n.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=`
35
+ `+a.raw,c.text+=`
36
+ `+a.raw,this.inlineQueue.at(-1).src=c.text):this.tokens.links[a.tag]||(this.tokens.links[a.tag]={href:a.href,title:a.title});continue}if(a=this.tokenizer.table(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.lheading(t)){t=t.substring(a.raw.length),n.push(a);continue}let l=t;if((o=this.options.extensions)!=null&&o.startBlock){let c=1/0;const d=t.slice(1);let f;this.options.extensions.startBlock.forEach(p=>{f=p.call({lexer:this},d),typeof f=="number"&&f>=0&&(c=Math.min(c,f))}),c<1/0&&c>=0&&(l=t.substring(0,c+1))}if(this.state.top&&(a=this.tokenizer.paragraph(l))){const c=n.at(-1);i&&(c==null?void 0:c.type)==="paragraph"?(c.raw+=`
37
+ `+a.raw,c.text+=`
38
+ `+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):n.push(a),i=l.length!==t.length,t=t.substring(a.raw.length);continue}if(a=this.tokenizer.text(t)){t=t.substring(a.raw.length);const c=n.at(-1);(c==null?void 0:c.type)==="text"?(c.raw+=`
39
+ `+a.raw,c.text+=`
40
+ `+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):n.push(a);continue}if(t){const c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){var a,l,c;let i=t,r=null;if(this.tokens.links){const d=Object.keys(this.tokens.links);if(d.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)d.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,r.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(r=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)i=i.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let s=!1,o="";for(;t;){s||(o=""),s=!1;let d;if((l=(a=this.options.extensions)==null?void 0:a.inline)!=null&&l.some(p=>(d=p.call({lexer:this},t,n))?(t=t.substring(d.raw.length),n.push(d),!0):!1))continue;if(d=this.tokenizer.escape(t)){t=t.substring(d.raw.length),n.push(d);continue}if(d=this.tokenizer.tag(t)){t=t.substring(d.raw.length),n.push(d);continue}if(d=this.tokenizer.link(t)){t=t.substring(d.raw.length),n.push(d);continue}if(d=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(d.raw.length);const p=n.at(-1);d.type==="text"&&(p==null?void 0:p.type)==="text"?(p.raw+=d.raw,p.text+=d.text):n.push(d);continue}if(d=this.tokenizer.emStrong(t,i,o)){t=t.substring(d.raw.length),n.push(d);continue}if(d=this.tokenizer.codespan(t)){t=t.substring(d.raw.length),n.push(d);continue}if(d=this.tokenizer.br(t)){t=t.substring(d.raw.length),n.push(d);continue}if(d=this.tokenizer.del(t)){t=t.substring(d.raw.length),n.push(d);continue}if(d=this.tokenizer.autolink(t)){t=t.substring(d.raw.length),n.push(d);continue}if(!this.state.inLink&&(d=this.tokenizer.url(t))){t=t.substring(d.raw.length),n.push(d);continue}let f=t;if((c=this.options.extensions)!=null&&c.startInline){let p=1/0;const h=t.slice(1);let g;this.options.extensions.startInline.forEach(v=>{g=v.call({lexer:this},h),typeof g=="number"&&g>=0&&(p=Math.min(p,g))}),p<1/0&&p>=0&&(f=t.substring(0,p+1))}if(d=this.tokenizer.inlineText(f)){t=t.substring(d.raw.length),d.raw.slice(-1)!=="_"&&(o=d.raw.slice(-1)),s=!0;const p=n.at(-1);(p==null?void 0:p.type)==="text"?(p.raw+=d.raw,p.text+=d.text):n.push(d);continue}if(t){const p="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(p);break}else throw new Error(p)}}return n}},Yr=class{constructor(e){_e(this,"options");_e(this,"parser");this.options=e||yn}space(e){return""}code({text:e,lang:t,escaped:n}){var s;const i=(s=(t||"").match(ot.notSpaceStart))==null?void 0:s[0],r=e.replace(ot.endingNewline,"")+`
41
+ `;return i?'<pre><code class="language-'+Pt(i)+'">'+(n?r:Pt(r,!0))+`</code></pre>
42
+ `:"<pre><code>"+(n?r:Pt(r,!0))+`</code></pre>
43
+ `}blockquote({tokens:e}){return`<blockquote>
44
+ ${this.parser.parse(e)}</blockquote>
45
+ `}html({text:e}){return e}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
46
+ `}hr(e){return`<hr>
47
+ `}list(e){const t=e.ordered,n=e.start;let i="";for(let o=0;o<e.items.length;o++){const a=e.items[o];i+=this.listitem(a)}const r=t?"ol":"ul",s=t&&n!==1?' start="'+n+'"':"";return"<"+r+s+`>
48
+ `+i+"</"+r+`>
49
+ `}listitem(e){var n;let t="";if(e.task){const i=this.checkbox({checked:!!e.checked});e.loose?((n=e.tokens[0])==null?void 0:n.type)==="paragraph"?(e.tokens[0].text=i+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=i+" "+Pt(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:i+" ",text:i+" ",escaped:!0}):t+=i+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`<li>${t}</li>
50
+ `}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
51
+ `}table(e){let t="",n="";for(let r=0;r<e.header.length;r++)n+=this.tablecell(e.header[r]);t+=this.tablerow({text:n});let i="";for(let r=0;r<e.rows.length;r++){const s=e.rows[r];n="";for(let o=0;o<s.length;o++)n+=this.tablecell(s[o]);i+=this.tablerow({text:n})}return i&&(i=`<tbody>${i}</tbody>`),`<table>
52
+ <thead>
53
+ `+t+`</thead>
54
+ `+i+`</table>
55
+ `}tablerow({text:e}){return`<tr>
56
+ ${e}</tr>
57
+ `}tablecell(e){const t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
58
+ `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Pt(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){const i=this.parser.parseInline(n),r=Mo(e);if(r===null)return i;e=r;let s='<a href="'+e+'"';return t&&(s+=' title="'+Pt(t)+'"'),s+=">"+i+"</a>",s}image({href:e,title:t,text:n,tokens:i}){i&&(n=this.parser.parseInline(i,this.parser.textRenderer));const r=Mo(e);if(r===null)return Pt(n);e=r;let s=`<img src="${e}" alt="${n}"`;return t&&(s+=` title="${Pt(t)}"`),s+=">",s}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Pt(e.text)}},qs=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}},Jt=class vs{constructor(t){_e(this,"options");_e(this,"renderer");_e(this,"textRenderer");this.options=t||yn,this.options.renderer=this.options.renderer||new Yr,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new qs}static parse(t,n){return new vs(n).parse(t)}static parseInline(t,n){return new vs(n).parseInline(t)}parse(t,n=!0){var r,s;let i="";for(let o=0;o<t.length;o++){const a=t[o];if((s=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&s[a.type]){const c=a,d=this.options.extensions.renderers[c.type].call({parser:this},c);if(d!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(c.type)){i+=d||"";continue}}const l=a;switch(l.type){case"space":{i+=this.renderer.space(l);continue}case"hr":{i+=this.renderer.hr(l);continue}case"heading":{i+=this.renderer.heading(l);continue}case"code":{i+=this.renderer.code(l);continue}case"table":{i+=this.renderer.table(l);continue}case"blockquote":{i+=this.renderer.blockquote(l);continue}case"list":{i+=this.renderer.list(l);continue}case"html":{i+=this.renderer.html(l);continue}case"paragraph":{i+=this.renderer.paragraph(l);continue}case"text":{let c=l,d=this.renderer.text(c);for(;o+1<t.length&&t[o+1].type==="text";)c=t[++o],d+=`
59
+ `+this.renderer.text(c);n?i+=this.renderer.paragraph({type:"paragraph",raw:d,text:d,tokens:[{type:"text",raw:d,text:d,escaped:!0}]}):i+=d;continue}default:{const c='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return i}parseInline(t,n=this.renderer){var r,s;let i="";for(let o=0;o<t.length;o++){const a=t[o];if((s=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&s[a.type]){const c=this.options.extensions.renderers[a.type].call({parser:this},a);if(c!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){i+=c||"";continue}}const l=a;switch(l.type){case"escape":{i+=n.text(l);break}case"html":{i+=n.html(l);break}case"link":{i+=n.link(l);break}case"image":{i+=n.image(l);break}case"strong":{i+=n.strong(l);break}case"em":{i+=n.em(l);break}case"codespan":{i+=n.codespan(l);break}case"br":{i+=n.br(l);break}case"del":{i+=n.del(l);break}case"text":{i+=n.text(l);break}default:{const c='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return i}},ys,Vr=(ys=class{constructor(e){_e(this,"options");_e(this,"block");this.options=e||yn}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?Wt.lex:Wt.lexInline}provideParser(){return this.block?Jt.parse:Jt.parseInline}},_e(ys,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),ys),Pl=class{constructor(...e){_e(this,"defaults",Ms());_e(this,"options",this.setOptions);_e(this,"parse",this.parseMarkdown(!0));_e(this,"parseInline",this.parseMarkdown(!1));_e(this,"Parser",Jt);_e(this,"Renderer",Yr);_e(this,"TextRenderer",qs);_e(this,"Lexer",Wt);_e(this,"Tokenizer",Xr);_e(this,"Hooks",Vr);this.use(...e)}walkTokens(e,t){var i,r;let n=[];for(const s of e)switch(n=n.concat(t.call(this,s)),s.type){case"table":{const o=s;for(const a of o.header)n=n.concat(this.walkTokens(a.tokens,t));for(const a of o.rows)for(const l of a)n=n.concat(this.walkTokens(l.tokens,t));break}case"list":{const o=s;n=n.concat(this.walkTokens(o.items,t));break}default:{const o=s;(r=(i=this.defaults.extensions)==null?void 0:i.childTokens)!=null&&r[o.type]?this.defaults.extensions.childTokens[o.type].forEach(a=>{const l=o[a].flat(1/0);n=n.concat(this.walkTokens(l,t))}):o.tokens&&(n=n.concat(this.walkTokens(o.tokens,t)))}}return n}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{const i={...n};if(i.async=this.defaults.async||i.async||!1,n.extensions&&(n.extensions.forEach(r=>{if(!r.name)throw new Error("extension name required");if("renderer"in r){const s=t.renderers[r.name];s?t.renderers[r.name]=function(...o){let a=r.renderer.apply(this,o);return a===!1&&(a=s.apply(this,o)),a}:t.renderers[r.name]=r.renderer}if("tokenizer"in r){if(!r.level||r.level!=="block"&&r.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const s=t[r.level];s?s.unshift(r.tokenizer):t[r.level]=[r.tokenizer],r.start&&(r.level==="block"?t.startBlock?t.startBlock.push(r.start):t.startBlock=[r.start]:r.level==="inline"&&(t.startInline?t.startInline.push(r.start):t.startInline=[r.start]))}"childTokens"in r&&r.childTokens&&(t.childTokens[r.name]=r.childTokens)}),i.extensions=t),n.renderer){const r=this.defaults.renderer||new Yr(this.defaults);for(const s in n.renderer){if(!(s in r))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;const o=s,a=n.renderer[o],l=r[o];r[o]=(...c)=>{let d=a.apply(r,c);return d===!1&&(d=l.apply(r,c)),d||""}}i.renderer=r}if(n.tokenizer){const r=this.defaults.tokenizer||new Xr(this.defaults);for(const s in n.tokenizer){if(!(s in r))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;const o=s,a=n.tokenizer[o],l=r[o];r[o]=(...c)=>{let d=a.apply(r,c);return d===!1&&(d=l.apply(r,c)),d}}i.tokenizer=r}if(n.hooks){const r=this.defaults.hooks||new Vr;for(const s in n.hooks){if(!(s in r))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;const o=s,a=n.hooks[o],l=r[o];Vr.passThroughHooks.has(s)?r[o]=c=>{if(this.defaults.async)return Promise.resolve(a.call(r,c)).then(f=>l.call(r,f));const d=a.call(r,c);return l.call(r,d)}:r[o]=(...c)=>{let d=a.apply(r,c);return d===!1&&(d=l.apply(r,c)),d}}i.hooks=r}if(n.walkTokens){const r=this.defaults.walkTokens,s=n.walkTokens;i.walkTokens=function(o){let a=[];return a.push(s.call(this,o)),r&&(a=a.concat(r.call(this,o))),a}}this.defaults={...this.defaults,...i}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return Wt.lex(e,t??this.defaults)}parser(e,t){return Jt.parse(e,t??this.defaults)}parseMarkdown(e){return(n,i)=>{const r={...i},s={...this.defaults,...r},o=this.onError(!!s.silent,!!s.async);if(this.defaults.async===!0&&r.async===!1)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof n>"u"||n===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));s.hooks&&(s.hooks.options=s,s.hooks.block=e);const a=s.hooks?s.hooks.provideLexer():e?Wt.lex:Wt.lexInline,l=s.hooks?s.hooks.provideParser():e?Jt.parse:Jt.parseInline;if(s.async)return Promise.resolve(s.hooks?s.hooks.preprocess(n):n).then(c=>a(c,s)).then(c=>s.hooks?s.hooks.processAllTokens(c):c).then(c=>s.walkTokens?Promise.all(this.walkTokens(c,s.walkTokens)).then(()=>c):c).then(c=>l(c,s)).then(c=>s.hooks?s.hooks.postprocess(c):c).catch(o);try{s.hooks&&(n=s.hooks.preprocess(n));let c=a(n,s);s.hooks&&(c=s.hooks.processAllTokens(c)),s.walkTokens&&this.walkTokens(c,s.walkTokens);let d=l(c,s);return s.hooks&&(d=s.hooks.postprocess(d)),d}catch(c){return o(c)}}}onError(e,t){return n=>{if(n.message+=`
60
+ Please report this to https://github.com/markedjs/marked.`,e){const i="<p>An error occurred:</p><pre>"+Pt(n.message+"",!0)+"</pre>";return t?Promise.resolve(i):i}if(t)return Promise.reject(n);throw n}}},mn=new Pl;function Re(e,t){return mn.parse(e,t)}Re.options=Re.setOptions=function(e){return mn.setOptions(e),Re.defaults=mn.defaults,Ol(Re.defaults),Re};Re.getDefaults=Ms;Re.defaults=yn;Re.use=function(...e){return mn.use(...e),Re.defaults=mn.defaults,Ol(Re.defaults),Re};Re.walkTokens=function(e,t){return mn.walkTokens(e,t)};Re.parseInline=mn.parseInline;Re.Parser=Jt;Re.parser=Jt.parse;Re.Renderer=Yr;Re.TextRenderer=qs;Re.Lexer=Wt;Re.lexer=Wt.lex;Re.Tokenizer=Xr;Re.Hooks=Vr;Re.parse=Re;Re.options;Re.setOptions;Re.use;Re.walkTokens;Re.parseInline;Jt.parse;Wt.lex;function pf(e){if(typeof e=="function"&&(e={highlight:e}),!e||typeof e.highlight!="function")throw new Error("Must provide highlight function");return typeof e.langPrefix!="string"&&(e.langPrefix="language-"),typeof e.emptyLangClass!="string"&&(e.emptyLangClass=""),{async:!!e.async,walkTokens(t){if(t.type!=="code")return;const n=Po(t.lang);if(e.async)return Promise.resolve(e.highlight(t.text,n,t.lang||"")).then(Do(t));const i=e.highlight(t.text,n,t.lang||"");if(i instanceof Promise)throw new Error("markedHighlight is not set to async but the highlight function is async. Set the async option to true on markedHighlight to await the async highlight function.");Do(t)(i)},useNewRenderer:!0,renderer:{code(t,n,i){typeof t=="object"&&(i=t.escaped,n=t.lang,t=t.text);const r=Po(n),s=r?e.langPrefix+Bo(r):e.emptyLangClass,o=s?` class="${s}"`:"";return t=t.replace(/\n$/,""),`<pre><code${o}>${i?t:Bo(t,!0)}
61
+ </code></pre>`}}}}function Po(e){return(e||"").match(/\S*/)[0]}function Do(e){return t=>{typeof t=="string"&&t!==e.text&&(e.escaped=!0,e.text=t)}}const Dl=/[&<>"']/,hf=new RegExp(Dl.source,"g"),Fl=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,mf=new RegExp(Fl.source,"g"),gf={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Fo=e=>gf[e];function Bo(e,t){if(t){if(Dl.test(e))return e.replace(hf,Fo)}else if(Fl.test(e))return e.replace(mf,Fo);return e}var vi,zo;function yf(){if(zo)return vi;zo=1;function e(b){return b instanceof Map?b.clear=b.delete=b.set=function(){throw new Error("map is read-only")}:b instanceof Set&&(b.add=b.clear=b.delete=function(){throw new Error("set is read-only")}),Object.freeze(b),Object.getOwnPropertyNames(b).forEach(A=>{const D=b[A],le=typeof D;(le==="object"||le==="function")&&!Object.isFrozen(D)&&e(D)}),b}class t{constructor(A){A.data===void 0&&(A.data={}),this.data=A.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function n(b){return b.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function i(b,...A){const D=Object.create(null);for(const le in b)D[le]=b[le];return A.forEach(function(le){for(const Ie in le)D[Ie]=le[Ie]}),D}const r="</span>",s=b=>!!b.scope,o=(b,{prefix:A})=>{if(b.startsWith("language:"))return b.replace("language:","language-");if(b.includes(".")){const D=b.split(".");return[`${A}${D.shift()}`,...D.map((le,Ie)=>`${le}${"_".repeat(Ie+1)}`)].join(" ")}return`${A}${b}`};class a{constructor(A,D){this.buffer="",this.classPrefix=D.classPrefix,A.walk(this)}addText(A){this.buffer+=n(A)}openNode(A){if(!s(A))return;const D=o(A.scope,{prefix:this.classPrefix});this.span(D)}closeNode(A){s(A)&&(this.buffer+=r)}value(){return this.buffer}span(A){this.buffer+=`<span class="${A}">`}}const l=(b={})=>{const A={children:[]};return Object.assign(A,b),A};class c{constructor(){this.rootNode=l(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(A){this.top.children.push(A)}openNode(A){const D=l({scope:A});this.add(D),this.stack.push(D)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(A){return this.constructor._walk(A,this.rootNode)}static _walk(A,D){return typeof D=="string"?A.addText(D):D.children&&(A.openNode(D),D.children.forEach(le=>this._walk(A,le)),A.closeNode(D)),A}static _collapse(A){typeof A!="string"&&A.children&&(A.children.every(D=>typeof D=="string")?A.children=[A.children.join("")]:A.children.forEach(D=>{c._collapse(D)}))}}class d extends c{constructor(A){super(),this.options=A}addText(A){A!==""&&this.add(A)}startScope(A){this.openNode(A)}endScope(){this.closeNode()}__addSublanguage(A,D){const le=A.root;D&&(le.scope=`language:${D}`),this.add(le)}toHTML(){return new a(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function f(b){return b?typeof b=="string"?b:b.source:null}function p(b){return v("(?=",b,")")}function h(b){return v("(?:",b,")*")}function g(b){return v("(?:",b,")?")}function v(...b){return b.map(D=>f(D)).join("")}function E(b){const A=b[b.length-1];return typeof A=="object"&&A.constructor===Object?(b.splice(b.length-1,1),A):{}}function _(...b){return"("+(E(b).capture?"":"?:")+b.map(le=>f(le)).join("|")+")"}function w(b){return new RegExp(b.toString()+"|").exec("").length-1}function y(b,A){const D=b&&b.exec(A);return D&&D.index===0}const O=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function I(b,{joinWith:A}){let D=0;return b.map(le=>{D+=1;const Ie=D;let ke=f(le),re="";for(;ke.length>0;){const te=O.exec(ke);if(!te){re+=ke;break}re+=ke.substring(0,te.index),ke=ke.substring(te.index+te[0].length),te[0][0]==="\\"&&te[1]?re+="\\"+String(Number(te[1])+Ie):(re+=te[0],te[0]==="("&&D++)}return re}).map(le=>`(${le})`).join(A)}const j=/\b\B/,M="[a-zA-Z]\\w*",ee="[a-zA-Z_]\\w*",q="\\b\\d+(\\.\\d+)?",Y="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",U="\\b(0b[01]+)",pe="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",R=(b={})=>{const A=/^#![ ]*\//;return b.binary&&(b.begin=v(A,/.*\b/,b.binary,/\b.*/)),i({scope:"meta",begin:A,end:/$/,relevance:0,"on:begin":(D,le)=>{D.index!==0&&le.ignoreMatch()}},b)},k={begin:"\\\\[\\s\\S]",relevance:0},m={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[k]},T={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[k]},S={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},W=function(b,A,D={}){const le=i({scope:"comment",begin:b,end:A,contains:[]},D);le.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const Ie=_("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return le.contains.push({begin:v(/[ ]+/,"(",Ie,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),le},B=W("//","$"),K=W("/\\*","\\*/"),ne=W("#","$"),be={scope:"number",begin:q,relevance:0},Q={scope:"number",begin:Y,relevance:0},we={scope:"number",begin:U,relevance:0},de={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[k,{begin:/\[/,end:/\]/,relevance:0,contains:[k]}]},G={scope:"title",begin:M,relevance:0},Ee={scope:"title",begin:ee,relevance:0},at={begin:"\\.\\s*"+ee,relevance:0};var Be=Object.freeze({__proto__:null,APOS_STRING_MODE:m,BACKSLASH_ESCAPE:k,BINARY_NUMBER_MODE:we,BINARY_NUMBER_RE:U,COMMENT:W,C_BLOCK_COMMENT_MODE:K,C_LINE_COMMENT_MODE:B,C_NUMBER_MODE:Q,C_NUMBER_RE:Y,END_SAME_AS_BEGIN:function(b){return Object.assign(b,{"on:begin":(A,D)=>{D.data._beginMatch=A[1]},"on:end":(A,D)=>{D.data._beginMatch!==A[1]&&D.ignoreMatch()}})},HASH_COMMENT_MODE:ne,IDENT_RE:M,MATCH_NOTHING_RE:j,METHOD_GUARD:at,NUMBER_MODE:be,NUMBER_RE:q,PHRASAL_WORDS_MODE:S,QUOTE_STRING_MODE:T,REGEXP_MODE:de,RE_STARTERS_RE:pe,SHEBANG:R,TITLE_MODE:G,UNDERSCORE_IDENT_RE:ee,UNDERSCORE_TITLE_MODE:Ee});function Xe(b,A){b.input[b.index-1]==="."&&A.ignoreMatch()}function jt(b,A){b.className!==void 0&&(b.scope=b.className,delete b.className)}function nn(b,A){A&&b.beginKeywords&&(b.begin="\\b("+b.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",b.__beforeBegin=Xe,b.keywords=b.keywords||b.beginKeywords,delete b.beginKeywords,b.relevance===void 0&&(b.relevance=0))}function Un(b,A){Array.isArray(b.illegal)&&(b.illegal=_(...b.illegal))}function wn(b,A){if(b.match){if(b.begin||b.end)throw new Error("begin & end are not supported with match");b.begin=b.match,delete b.match}}function Xt(b,A){b.relevance===void 0&&(b.relevance=1)}const $e=(b,A)=>{if(!b.beforeMatch)return;if(b.starts)throw new Error("beforeMatch cannot be used with starts");const D=Object.assign({},b);Object.keys(b).forEach(le=>{delete b[le]}),b.keywords=D.keywords,b.begin=v(D.beforeMatch,p(D.begin)),b.starts={relevance:0,contains:[Object.assign(D,{endsParent:!0})]},b.relevance=0,delete D.beforeMatch},rn=["of","and","for","in","not","or","if","then","parent","list","value"],We="keyword";function _n(b,A,D=We){const le=Object.create(null);return typeof b=="string"?Ie(D,b.split(" ")):Array.isArray(b)?Ie(D,b):Object.keys(b).forEach(function(ke){Object.assign(le,_n(b[ke],A,ke))}),le;function Ie(ke,re){A&&(re=re.map(te=>te.toLowerCase())),re.forEach(function(te){const he=te.split("|");le[he[0]]=[ke,Hn(he[0],he[1])]})}}function Hn(b,A){return A?Number(A):Vn(b)?0:1}function Vn(b){return rn.includes(b.toLowerCase())}const sn={},wt=b=>{console.error(b)},Ke=(b,...A)=>{console.log(`WARN: ${b}`,...A)},_t=(b,A)=>{sn[`${b}/${A}`]||(console.log(`Deprecated as of ${b}. ${A}`),sn[`${b}/${A}`]=!0)},St=new Error;function En(b,A,{key:D}){let le=0;const Ie=b[D],ke={},re={};for(let te=1;te<=A.length;te++)re[te+le]=Ie[te],ke[te+le]=!0,le+=w(A[te-1]);b[D]=re,b[D]._emit=ke,b[D]._multi=!0}function Yt(b){if(Array.isArray(b.begin)){if(b.skip||b.excludeBegin||b.returnBegin)throw wt("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),St;if(typeof b.beginScope!="object"||b.beginScope===null)throw wt("beginScope must be object"),St;En(b,b.begin,{key:"beginScope"}),b.begin=I(b.begin,{joinWith:""})}}function kn(b){if(Array.isArray(b.end)){if(b.skip||b.excludeEnd||b.returnEnd)throw wt("skip, excludeEnd, returnEnd not compatible with endScope: {}"),St;if(typeof b.endScope!="object"||b.endScope===null)throw wt("endScope must be object"),St;En(b,b.end,{key:"endScope"}),b.end=I(b.end,{joinWith:""})}}function Wn(b){b.scope&&typeof b.scope=="object"&&b.scope!==null&&(b.beginScope=b.scope,delete b.scope)}function Jn(b){Wn(b),typeof b.beginScope=="string"&&(b.beginScope={_wrap:b.beginScope}),typeof b.endScope=="string"&&(b.endScope={_wrap:b.endScope}),Yt(b),kn(b)}function Ue(b){function A(re,te){return new RegExp(f(re),"m"+(b.case_insensitive?"i":"")+(b.unicodeRegex?"u":"")+(te?"g":""))}class D{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(te,he){he.position=this.position++,this.matchIndexes[this.matchAt]=he,this.regexes.push([he,te]),this.matchAt+=w(te)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const te=this.regexes.map(he=>he[1]);this.matcherRe=A(I(te,{joinWith:"|"}),!0),this.lastIndex=0}exec(te){this.matcherRe.lastIndex=this.lastIndex;const he=this.matcherRe.exec(te);if(!he)return null;const Me=he.findIndex(($t,Zn)=>Zn>0&&$t!==void 0),ze=this.matchIndexes[Me];return he.splice(0,Me),Object.assign(he,ze)}}class le{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(te){if(this.multiRegexes[te])return this.multiRegexes[te];const he=new D;return this.rules.slice(te).forEach(([Me,ze])=>he.addRule(Me,ze)),he.compile(),this.multiRegexes[te]=he,he}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(te,he){this.rules.push([te,he]),he.type==="begin"&&this.count++}exec(te){const he=this.getMatcher(this.regexIndex);he.lastIndex=this.lastIndex;let Me=he.exec(te);if(this.resumingScanAtSamePosition()&&!(Me&&Me.index===this.lastIndex)){const ze=this.getMatcher(0);ze.lastIndex=this.lastIndex+1,Me=ze.exec(te)}return Me&&(this.regexIndex+=Me.position+1,this.regexIndex===this.count&&this.considerAll()),Me}}function Ie(re){const te=new le;return re.contains.forEach(he=>te.addRule(he.begin,{rule:he,type:"begin"})),re.terminatorEnd&&te.addRule(re.terminatorEnd,{type:"end"}),re.illegal&&te.addRule(re.illegal,{type:"illegal"}),te}function ke(re,te){const he=re;if(re.isCompiled)return he;[jt,wn,Jn,$e].forEach(ze=>ze(re,te)),b.compilerExtensions.forEach(ze=>ze(re,te)),re.__beforeBegin=null,[nn,Un,Xt].forEach(ze=>ze(re,te)),re.isCompiled=!0;let Me=null;return typeof re.keywords=="object"&&re.keywords.$pattern&&(re.keywords=Object.assign({},re.keywords),Me=re.keywords.$pattern,delete re.keywords.$pattern),Me=Me||/\w+/,re.keywords&&(re.keywords=_n(re.keywords,b.case_insensitive)),he.keywordPatternRe=A(Me,!0),te&&(re.begin||(re.begin=/\B|\b/),he.beginRe=A(he.begin),!re.end&&!re.endsWithParent&&(re.end=/\B|\b/),re.end&&(he.endRe=A(he.end)),he.terminatorEnd=f(he.end)||"",re.endsWithParent&&te.terminatorEnd&&(he.terminatorEnd+=(re.end?"|":"")+te.terminatorEnd)),re.illegal&&(he.illegalRe=A(re.illegal)),re.contains||(re.contains=[]),re.contains=[].concat(...re.contains.map(function(ze){return L(ze==="self"?re:ze)})),re.contains.forEach(function(ze){ke(ze,he)}),re.starts&&ke(re.starts,te),he.matcher=Ie(he),he}if(b.compilerExtensions||(b.compilerExtensions=[]),b.contains&&b.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return b.classNameAliases=i(b.classNameAliases||{}),ke(b)}function C(b){return b?b.endsWithParent||C(b.starts):!1}function L(b){return b.variants&&!b.cachedVariants&&(b.cachedVariants=b.variants.map(function(A){return i(b,{variants:null},A)})),b.cachedVariants?b.cachedVariants:C(b)?i(b,{starts:b.starts?i(b.starts):null}):Object.isFrozen(b)?i(b):b}var F="11.11.1";class H extends Error{constructor(A,D){super(A),this.name="HTMLInjectionError",this.html=D}}const oe=n,ae=i,ye=Symbol("nomatch"),P=7,z=function(b){const A=Object.create(null),D=Object.create(null),le=[];let Ie=!0;const ke="Could not find the language '{}', did you forget to load/include a language module?",re={disableAutodetect:!0,name:"Plain text",contains:[]};let te={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:d};function he(V){return te.noHighlightRe.test(V)}function Me(V){let fe=V.className+" ";fe+=V.parentNode?V.parentNode.className:"";const ue=te.languageDetectRe.exec(fe);if(ue){const Se=Et(ue[1]);return Se||(Ke(ke.replace("{}",ue[1])),Ke("Falling back to no-highlight mode for this block.",V)),Se?ue[1]:"no-highlight"}return fe.split(/\s+/).find(Se=>he(Se)||Et(Se))}function ze(V,fe,ue){let Se="",He="";typeof fe=="object"?(Se=V,ue=fe.ignoreIllegals,He=fe.language):(_t("10.7.0","highlight(lang, code, ...args) has been deprecated."),_t("10.7.0",`Please use highlight(code, options) instead.
62
+ https://github.com/highlightjs/highlight.js/issues/2277`),He=V,Se=fe),ue===void 0&&(ue=!0);const ut={code:Se,language:He};ln("before:highlight",ut);const It=ut.result?ut.result:$t(ut.language,ut.code,ue);return It.code=ut.code,ln("after:highlight",It),It}function $t(V,fe,ue,Se){const He=Object.create(null);function ut($,ie){return $.keywords[ie]}function It(){if(!me.keywords){Ce.addText(Ae);return}let $=0;me.keywordPatternRe.lastIndex=0;let ie=me.keywordPatternRe.exec(Ae),xe="";for(;ie;){xe+=Ae.substring($,ie.index);const Oe=Je.case_insensitive?ie[0].toLowerCase():ie[0],Ze=ut(me,Oe);if(Ze){const[xt,Sr]=Ze;if(Ce.addText(xe),xe="",He[Oe]=(He[Oe]||0)+1,He[Oe]<=P&&(yt+=Sr),xt.startsWith("_"))xe+=ie[0];else{const er=Je.classNameAliases[xt]||xt;ft(ie[0],er)}}else xe+=ie[0];$=me.keywordPatternRe.lastIndex,ie=me.keywordPatternRe.exec(Ae)}xe+=Ae.substring($),Ce.addText(xe)}function An(){if(Ae==="")return;let $=null;if(typeof me.subLanguage=="string"){if(!A[me.subLanguage]){Ce.addText(Ae);return}$=$t(me.subLanguage,Ae,!0,Gn[me.subLanguage]),Gn[me.subLanguage]=$._top}else $=zt(Ae,me.subLanguage.length?me.subLanguage:null);me.relevance>0&&(yt+=$.relevance),Ce.__addSublanguage($._emitter,$.language)}function rt(){me.subLanguage!=null?An():It(),Ae=""}function ft($,ie){$!==""&&(Ce.startScope(ie),Ce.addText($),Ce.endScope())}function Tr($,ie){let xe=1;const Oe=ie.length-1;for(;xe<=Oe;){if(!$._emit[xe]){xe++;continue}const Ze=Je.classNameAliases[$[xe]]||$[xe],xt=ie[xe];Ze?ft(xt,Ze):(Ae=xt,It(),Ae=""),xe++}}function Kn($,ie){return $.scope&&typeof $.scope=="string"&&Ce.openNode(Je.classNameAliases[$.scope]||$.scope),$.beginScope&&($.beginScope._wrap?(ft(Ae,Je.classNameAliases[$.beginScope._wrap]||$.beginScope._wrap),Ae=""):$.beginScope._multi&&(Tr($.beginScope,ie),Ae="")),me=Object.create($,{parent:{value:me}}),me}function Le($,ie,xe){let Oe=y($.endRe,xe);if(Oe){if($["on:end"]){const Ze=new t($);$["on:end"](ie,Ze),Ze.isMatchIgnored&&(Oe=!1)}if(Oe){for(;$.endsParent&&$.parent;)$=$.parent;return $}}if($.endsWithParent)return Le($.parent,ie,xe)}function Ar($){return me.matcher.regexIndex===0?(Ae+=$[0],1):(fn=!0,0)}function Pe($){const ie=$[0],xe=$.rule,Oe=new t(xe),Ze=[xe.__beforeBegin,xe["on:begin"]];for(const xt of Ze)if(xt&&(xt($,Oe),Oe.isMatchIgnored))return Ar(ie);return xe.skip?Ae+=ie:(xe.excludeBegin&&(Ae+=ie),rt(),!xe.returnBegin&&!xe.excludeBegin&&(Ae=ie)),Kn(xe,$),xe.returnBegin?0:ie.length}function Nr($){const ie=$[0],xe=fe.substring($.index),Oe=Le(me,$,xe);if(!Oe)return ye;const Ze=me;me.endScope&&me.endScope._wrap?(rt(),ft(ie,me.endScope._wrap)):me.endScope&&me.endScope._multi?(rt(),Tr(me.endScope,$)):Ze.skip?Ae+=ie:(Ze.returnEnd||Ze.excludeEnd||(Ae+=ie),rt(),Ze.excludeEnd&&(Ae=ie));do me.scope&&Ce.closeNode(),!me.skip&&!me.subLanguage&&(yt+=me.relevance),me=me.parent;while(me!==Oe.parent);return Oe.starts&&Kn(Oe.starts,$),Ze.returnEnd?0:ie.length}function De(){const $=[];for(let ie=me;ie!==Je;ie=ie.parent)ie.scope&&$.unshift(ie.scope);$.forEach(ie=>Ce.openNode(ie))}let Mt={};function Qn($,ie){const xe=ie&&ie[0];if(Ae+=$,xe==null)return rt(),0;if(Mt.type==="begin"&&ie.type==="end"&&Mt.index===ie.index&&xe===""){if(Ae+=fe.slice(ie.index,ie.index+1),!Ie){const Oe=new Error(`0 width match regex (${V})`);throw Oe.languageName=V,Oe.badRule=Mt.rule,Oe}return 1}if(Mt=ie,ie.type==="begin")return Pe(ie);if(ie.type==="illegal"&&!ue){const Oe=new Error('Illegal lexeme "'+xe+'" for mode "'+(me.scope||"<unnamed>")+'"');throw Oe.mode=me,Oe}else if(ie.type==="end"){const Oe=Nr(ie);if(Oe!==ye)return Oe}if(ie.type==="illegal"&&xe==="")return Ae+=`
63
+ `,1;if(un>1e5&&un>ie.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Ae+=xe,xe.length}const Je=Et(V);if(!Je)throw wt(ke.replace("{}",V)),new Error('Unknown language: "'+V+'"');const jr=Ue(Je);let cn="",me=Se||jr;const Gn={},Ce=new te.__emitter(te);De();let Ae="",yt=0,kt=0,un=0,fn=!1;try{if(Je.__emitTokens)Je.__emitTokens(fe,Ce);else{for(me.matcher.considerAll();;){un++,fn?fn=!1:me.matcher.considerAll(),me.matcher.lastIndex=kt;const $=me.matcher.exec(fe);if(!$)break;const ie=fe.substring(kt,$.index),xe=Qn(ie,$);kt=$.index+xe}Qn(fe.substring(kt))}return Ce.finalize(),cn=Ce.toHTML(),{language:V,value:cn,relevance:yt,illegal:!1,_emitter:Ce,_top:me}}catch($){if($.message&&$.message.includes("Illegal"))return{language:V,value:oe(fe),illegal:!0,relevance:0,_illegalBy:{message:$.message,index:kt,context:fe.slice(kt-100,kt+100),mode:$.mode,resultSoFar:cn},_emitter:Ce};if(Ie)return{language:V,value:oe(fe),illegal:!1,relevance:0,errorRaised:$,_emitter:Ce,_top:me};throw $}}function Zn(V){const fe={value:oe(V),illegal:!1,relevance:0,_top:re,_emitter:new te.__emitter(te)};return fe._emitter.addText(V),fe}function zt(V,fe){fe=fe||te.languages||Object.keys(A);const ue=Zn(V),Se=fe.filter(Et).filter(Or).map(rt=>$t(rt,V,!1));Se.unshift(ue);const He=Se.sort((rt,ft)=>{if(rt.relevance!==ft.relevance)return ft.relevance-rt.relevance;if(rt.language&&ft.language){if(Et(rt.language).supersetOf===ft.language)return 1;if(Et(ft.language).supersetOf===rt.language)return-1}return 0}),[ut,It]=He,An=ut;return An.secondBest=It,An}function on(V,fe,ue){const Se=fe&&D[fe]||ue;V.classList.add("hljs"),V.classList.add(`language-${Se}`)}function On(V){let fe=null;const ue=Me(V);if(he(ue))return;if(ln("before:highlightElement",{el:V,language:ue}),V.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",V);return}if(V.children.length>0&&(te.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(V)),te.throwUnescapedHTML))throw new H("One of your code blocks includes unescaped HTML.",V.innerHTML);fe=V;const Se=fe.textContent,He=ue?ze(Se,{language:ue,ignoreIllegals:!0}):zt(Se);V.innerHTML=He.value,V.dataset.highlighted="yes",on(V,ue,He.language),V.result={language:He.language,re:He.relevance,relevance:He.relevance},He.secondBest&&(V.secondBest={language:He.secondBest.language,relevance:He.secondBest.relevance}),ln("after:highlightElement",{el:V,result:He,text:Se})}function Xn(V){te=ae(te,V)}const nt=()=>{gt(),_t("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function Rt(){gt(),_t("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let Qe=!1;function gt(){function V(){gt()}if(document.readyState==="loading"){Qe||window.addEventListener("DOMContentLoaded",V,!1),Qe=!0;return}document.querySelectorAll(te.cssSelector).forEach(On)}function Yn(V,fe){let ue=null;try{ue=fe(b)}catch(Se){if(wt("Language definition for '{}' could not be registered.".replace("{}",V)),Ie)wt(Se);else throw Se;ue=re}ue.name||(ue.name=V),A[V]=ue,ue.rawDefinition=fe.bind(null,b),ue.aliases&&qt(ue.aliases,{languageName:V})}function kr(V){delete A[V];for(const fe of Object.keys(D))D[fe]===V&&delete D[fe]}function an(){return Object.keys(A)}function Et(V){return V=(V||"").toLowerCase(),A[V]||A[D[V]]}function qt(V,{languageName:fe}){typeof V=="string"&&(V=[V]),V.forEach(ue=>{D[ue.toLowerCase()]=fe})}function Or(V){const fe=Et(V);return fe&&!fe.disableAutodetect}function ii(V){V["before:highlightBlock"]&&!V["before:highlightElement"]&&(V["before:highlightElement"]=fe=>{V["before:highlightBlock"](Object.assign({block:fe.el},fe))}),V["after:highlightBlock"]&&!V["after:highlightElement"]&&(V["after:highlightElement"]=fe=>{V["after:highlightBlock"](Object.assign({block:fe.el},fe))})}function Tn(V){ii(V),le.push(V)}function $n(V){const fe=le.indexOf(V);fe!==-1&&le.splice(fe,1)}function ln(V,fe){const ue=V;le.forEach(function(Se){Se[ue]&&Se[ue](fe)})}function si(V){return _t("10.7.0","highlightBlock will be removed entirely in v12.0"),_t("10.7.0","Please use highlightElement now."),On(V)}Object.assign(b,{highlight:ze,highlightAuto:zt,highlightAll:gt,highlightElement:On,highlightBlock:si,configure:Xn,initHighlighting:nt,initHighlightingOnLoad:Rt,registerLanguage:Yn,unregisterLanguage:kr,listLanguages:an,getLanguage:Et,registerAliases:qt,autoDetection:Or,inherit:ae,addPlugin:Tn,removePlugin:$n}),b.debugMode=function(){Ie=!1},b.safeMode=function(){Ie=!0},b.versionString=F,b.regex={concat:v,lookahead:p,either:_,optional:g,anyNumberOfTimes:h};for(const V in Be)typeof Be[V]=="object"&&e(Be[V]);return Object.assign(b,Be),b},Z=z({});return Z.newInstance=()=>z({}),vi=Z,Z.HighlightJS=Z,Z.default=Z,vi}var xf=yf();const Dn=Is(xf);function bf(e){const t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},i=["true","false","null"],r={scope:"literal",beginKeywords:i.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:i},contains:[t,n,e.QUOTE_STRING_MODE,r,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}function vf(e){const t="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",i={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},r={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},s={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},o={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,r]},a=e.inherit(o,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),p={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},h={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},g={begin:/\{/,end:/\}/,contains:[h],illegal:"\\n",relevance:0},v={begin:"\\[",end:"\\]",contains:[h],illegal:"\\n",relevance:0},E=[i,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},p,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},g,v,s,o],_=[...E];return _.pop(),_.push(a),h.contains=_,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:E}}function wf(e){const t=e.regex,n={},i={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},i]});const r={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},s=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),o={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},a={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,r]};r.contains.push(a);const l={match:/\\"/},c={className:"string",begin:/'/,end:/'/},d={match:/\\'/},f={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},p=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],h=e.SHEBANG({binary:`(${p.join("|")})`,relevance:10}),g={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},v=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],E=["true","false"],_={match:/(\/[a-z._-]+)+/},w=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],y=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],O=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],I=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:v,literal:E,built_in:[...w,...y,"set","shopt",...O,...I]},contains:[h,e.SHEBANG(),g,f,s,o,_,a,l,c,d,n]}}Dn.registerLanguage("json",bf);Dn.registerLanguage("yaml",vf);Dn.registerLanguage("bash",wf);const Bl=new Pl(pf({emptyLangClass:"hljs",langPrefix:"hljs language-",highlight(e,t){if(!Dn.getLanguage(t))return e;try{return Dn.highlight(e,{language:t}).value}catch{return e}}}));Bl.use({extensions:[{name:"link",renderer(e){return`<a class="hover:underline hover:text-secondary-600" href="${e.href}" rel="noopener noreferrer" target="_blank">${e.text}</a>`}}]});function _f(e){return Bl.parse(e)}const xn=({children:e})=>e?typeof e!="string"?u.jsx(u.Fragment,{children:e}):u.jsx("div",{className:"prose max-w-none text-foreground-muted prose-headings:text-foreground prose-strong:text-foreground prose-a:text-primary-600 prose-code:text-foreground-secondary prose-blockquote:text-foreground-muted prose-blockquote:border-border",dangerouslySetInnerHTML:{__html:kl.sanitize(_f(e))}}):null;function Ef({className:e}){return u.jsx("svg",{className:e||"inline-block",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M16 12a4 4 0 10-8 0 4 4 0 008 0zm0 0v1.5a2.5 2.5 0 005 0V12a9 9 0 10-9 9m4.5-1.206a8.959 8.959 0 01-4.5 1.207"})})}function zl({className:e}){return u.jsx("svg",{className:e||"inline-block",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})})}function kf({className:e}){return u.jsx("svg",{className:e||"inline-block",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3.055 11H5a2 2 0 012 2v1a2 2 0 002 2 2 2 0 012 2v2.945M8 3.935V5.5A2.5 2.5 0 0010.5 8h.5a2 2 0 012 2 2 2 0 104 0 2 2 0 012-2h1.064M15 20.488V18a2 2 0 012-2h3.064M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}function Of({className:e,...t}){return u.jsx("svg",{className:e||"inline-block",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",...t,children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 6l3 1m0 0l-3 9a5.002 5.002 0 006.001 0M6 7l3 9M6 7l6-2m6 2l3-1m-3 1l-3 9a5.002 5.002 0 006.001 0M18 7l3 9m-3-9l-6-2m0-2v2m0 16V5m0 16H9m3 0h3"})})}function Tf({className:e}){return u.jsx("svg",{className:e||"inline-block",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 7h.01M7 3h5c.512 0 1.024.195 1.414.586l7 7a2 2 0 010 2.828l-7 7a2 2 0 01-2.828 0l-7-7A1.994 1.994 0 013 12V7a4 4 0 014-4z"})})}function sr({IconClass:e,term:t,visibleTerm:n=!0,text:i,href:r,vertical:s=!1,className:o=""}){const a=r?l=>u.jsx("a",{href:r,target:"_blank",...l}):l=>u.jsx("div",{...l});return u.jsxs("div",{className:`${!s&&"flex"} ${o}`,children:[u.jsx("dt",{children:u.jsxs(a,{className:"flex",children:[e&&u.jsx(e,{className:"w-5 h-5",title:`${i}`,alt:`${i}`}),n?u.jsx("span",{className:"pl-2 text-sm",children:t}):u.jsx("span",{className:"sr-only",children:t})]})}),u.jsxs("dd",{className:`${s&&"pt-2"} pl-2 text-sm`,children:[!n&&u.jsx(a,{children:i}),s&&u.jsx(a,{children:i})]})]})}function Us({name:e,href:t,title:n}){return u.jsx("a",{className:`text-xs whitespace-nowrap break-all mt-2 rounded-md bg-neutral-300 py-[2px] px-[4px] mr-1 -mt-1 ${t&&"hover:bg-cyan-500 hover:text-white"}`,href:t,target:"_blank",title:n,children:e})}function Af({license:e,externalDocs:t,contact:n,tags:i}){const r=t,s={licenseName:e&&e.name?e.name:null,licenseUrl:e&&e.url?e.url:null,externalDocsTitle:r&&r.description?r.description:"External documentation",externalDocsUrl:r&&r.url?r.url:null,externalDocsDescription:r&&r.description?r.description:null,contactName:n&&n.name?n.name:null,contactUrl:n&&n.url?n.url:null,contactEmail:n&&n.email?n.email:null,tags:i};return u.jsxs(u.Fragment,{children:[u.jsxs("dl",{className:"flex flex-wrap @lg:flex-unwrap gap-2 ",children:[s.licenseName&&u.jsx(sr,{IconClass:Of,text:`${s.licenseName} ${Oo}`,term:Oo,visibleTerm:!s.licenseName,href:s.licenseUrl,className:"mb-4 text-foreground-secondary hover:text-pink-500"}),s.externalDocsUrl&&u.jsx(sr,{IconClass:zl,text:To,href:s.externalDocsUrl,term:To,visibleTerm:!s.externalDocsTitle,className:"mb-4 text-foreground-secondary hover:text-secondary-500"}),s.contactEmail&&u.jsx(sr,{IconClass:Ef,text:`${s.contactEmail}`,term:au,visibleTerm:!s.contactEmail,href:`mailto:${s.contactEmail}`,className:"mb-4 text-foreground-secondary hover:text-green-500"}),s.contactUrl&&u.jsx(sr,{IconClass:kf,text:`${s.contactName}`,term:ou,visibleTerm:!s.contactName,href:s.contactUrl,className:"mb-4 text-foreground-secondary hover:text-green-500"})]}),u.jsx("dl",{children:s.tags&&u.jsx(sr,{IconClass:Tf,term:lu,className:"mb-2 text-foreground-secondary inline-block",vertical:!0,text:s.tags&&u.jsx("div",{className:"flex flex-wrap gap-1 -ml-2",children:s.tags.map((o,a)=>{const l=o,c=l.externalDocs;return u.jsx(Us,{href:c&&c.url,title:l.description||(c&&c.description?c.description:void 0),name:l.name},a)})})})})]})}const Nf=({title:e,description:t,license:n,externalDocs:i,contact:r,tags:s})=>{const o=u.jsx("div",{className:"mt-4 w-full",children:u.jsx(xn,{children:t})}),a=u.jsx(Af,{license:n,externalDocs:i,contact:r,tags:s});return u.jsx("div",{className:"flex justify-center w-full",children:u.jsx(Fn,{title:e,content:o,sideContent:a,stickySideContent:!0,reverseLayoutOnMobile:!0,info:!0})})};function ti({className:e}){return u.jsx("svg",{className:e,id:"Layer_1",version:"1.1",viewBox:"0 0 50 50",width:"50px",xmlns:"http://www.w3.org/2000/svg",children:u.jsx("polygon",{points:"47.25,15 45.164,12.914 25,33.078 4.836,12.914 2.75,15 25,37.25 "})})}function jf({className:e}){return u.jsx("svg",{className:e||"inline-block",fill:"currentColor",viewBox:"0 0 20 20",children:u.jsx("path",{d:"M15.6 2l-1.2 3H5.6L4.4 2C3.629 2 3 2.629 3 3.4v15.2c0 .77.629 1.4 1.399 1.4h11.2c.77 0 1.4-.631 1.4-1.4V3.4C17 2.629 16.369 2 15.6 2zm-2 2l.9-2h-2.181L11.6 0H8.4l-.72 2H5.5l.899 2H13.6z"})})}function Sf({className:e}){return u.jsx("svg",{className:e||"inline-block",fill:"currentColor",viewBox:"0 0 20 20",children:u.jsx("path",{d:"M16.704 4.153a.75.75 0 01.143 1.052l-8 10.5a.75.75 0 01-1.127.075l-4.5-4.5a.75.75 0 011.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 011.05-.143z"})})}const Rf=1500;function If(e){const t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.focus(),t.select();try{return document.execCommand("copy")}catch{return!1}finally{document.body.removeChild(t)}}async function Mf(e){try{return await navigator.clipboard.writeText(e),!0}catch{return If(e)}}function ql({code:e,className:t}){const[n,i]=se.useState("idle"),r=se.useRef(void 0);se.useEffect(()=>()=>clearTimeout(r.current),[]);const s=()=>{Mf(e).then(l=>{i(l?"copied":"error"),clearTimeout(r.current),r.current=setTimeout(()=>i("idle"),Rf)})},o=Dn.highlight(e,{language:"json"}).value,a=n==="copied"?"Copied":n==="error"?"Copy failed":"Copy to clipboard";return u.jsxs("div",{className:`relative ${t??""}`,children:[u.jsx("button",{type:"button",onClick:s,"aria-label":a,title:a,className:"absolute top-2 right-2 p-1 rounded text-foreground-muted hover:text-foreground-secondary hover:bg-neutral-100 transition-colors",children:n==="copied"?u.jsx(Sf,{className:"w-4 h-4 text-green-600"}):u.jsx(jf,{className:`w-4 h-4 ${n==="error"?"text-red-500":""}`})}),u.jsx("pre",{className:"text-xs rounded overflow-x-auto",children:u.jsx("code",{className:"hljs language-json",dangerouslySetInnerHTML:{__html:kl.sanitize(o)}})})]})}const Cf=/^x-parser-/i;function ws(e){if(Array.isArray(e))return e.map(ws);if(e!==null&&typeof e=="object"){const t={};for(const[n,i]of Object.entries(e))Cf.test(n)||(t[n]=ws(i));return t}return e}const Ul=({schema:e})=>{const t=JSON.stringify(ws(e),null,2);return u.jsx(ql,{code:t})},ge=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),Ht=e=>ge(e)?e:null,qo="^[\0-ÿ]*$",Lf=Math.pow(-2,31),Pf=Math.pow(2,31)-1,Df=Math.pow(-2,63),Ff=Math.pow(2,63)-1,Bf={null:"null",boolean:"boolean",int:"integer",long:"integer",float:"number",double:"number",bytes:"string",string:"string",fixed:"string",map:"object",array:"array",enum:"string",record:"object",uuid:"string"},Hs=e=>typeof e=="object"&&e!==null&&!Array.isArray(e)?e:{};function pr(e){const t=Hs(e);if(typeof t.name=="string")return typeof t.namespace=="string"?`${t.namespace}.${t.name}`:t.name}function _s(e,t,n){e.doc&&(t.description=e.doc),e.default!==void 0&&(t.default=e.default);const i=pr(e);i!==void 0&&n[i]&&(t["x-parser-schema-id"]=i)}function Uo(e,t,n){!(Array.isArray(e.type)&&e.type.includes("null"))&&!n&&(t.required=t.required||[],t.required.push(e.name))}function zf(e,t){let n=e,i=t;if(Array.isArray(e)&&e.length>0){const r=e.length>1&&e[0]==="null";n=e[+r],i.oneOf!==void 0&&(i=i.oneOf[0])}return{type:n,jsonSchema:i}}function qf(e,t,n){if(!(t===void 0||n.examples||Array.isArray(e)))switch(e){case"boolean":n.examples=[typeof t=="boolean"?t:t==="true"];break;case"int":n.examples=[parseInt(t,10)];break;default:n.examples=[t]}}function Es(e){return Object.keys(e).some(t=>t!=="type"&&t!=="name"&&t!=="namespace")}function ks(e,t,n){const{type:i,jsonSchema:r}=zf(e,n);qf(i,t.example,r);function s(...o){o.forEach(a=>{let l=!0;a==="minLength"||a==="maxLength"?l=t[a]>-1:a==="multipleOf"&&(l=t[a]>0),t[a]!==void 0&&l&&(r[a]=t[a])})}switch(i){case"int":case"long":case"float":case"double":s("minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf");break;case"string":t.logicalType&&(r.format=t.logicalType),s("pattern","minLength","maxLength");break;case"array":s("minItems","maxItems","uniqueItems");break}}function Vs(e,t,n){t!==void 0&&(e[t]=n)}function hr(e,t){let n={};if(Array.isArray(e))return Hf(n,e,t);const i=Hs(e),r=typeof e=="string"?e:i.type;switch(n.type=Bf[r],r){case"int":{n.minimum=Lf,n.maximum=Pf;break}case"long":{n.minimum=Df,n.maximum=Ff;break}case"bytes":{n.pattern=qo;break}case"fixed":{n.pattern=qo,n.minLength=i.size,n.maxLength=i.size;break}case"map":{n.additionalProperties=hr(i.values,t);break}case"array":{n.items=hr(i.items,t);break}case"enum":{n.enum=i.symbols;break}case"float":case"double":{n.format=r;break}case"record":{const s=Uf(i,t,n);Vs(t,pr(e),n),n.properties=Object.fromEntries(s.entries());break}default:{const s=t[pr(e)]??(typeof r=="string"?t[r]:void 0);s&&(n=Es(i)?{...s}:s);break}}return _s(i,n,t),ks(r,i,n),n}function Uf(e,t,n){const i=new Map;for(const r of e.fields??[]){const s=typeof r.type=="string"?t[r.type]:void 0;if(s){const o=Es(r)?{...s}:s;Uo(r,n,r.default!==void 0),Es(r)&&(_s(r,o,t),ks(r.type,r,o)),i.set(r.name,o)}else{const o=hr(r.type,t);Uo(r,n,r.default!==void 0),_s(r,o,t),ks(r.type,r,o),i.set(r.name,o),Vs(t,pr(r.type),o)}}return i}function Hf(e,t,n){const i=[];let r=null;for(const s of t){const o=hr(s,n);(typeof s=="string"?s:Hs(s).type)==="null"?r=o:(i.push(o),Vs(n,pr(s),o))}return r&&i.push(r),e.oneOf=i,e}function Os(e){return hr(e,{})}const Ho=new Set(["null","boolean","int","long","float","double","bytes","string","uuid"]),Vf=new Set(["record","enum","array","map","fixed"]),Vo=/^[A-Za-z_][A-Za-z0-9_]*(\.[A-Za-z_][A-Za-z0-9_]*)*$/;function Ws(e){const t=[];return Cn(e,"schema",t,new Set),t}function Cn(e,t,n,i){if(typeof e=="string"){!Ho.has(e)&&!Vo.test(e)&&n.push(`${t}: "${e}" is not a valid Avro type name`);return}if(Array.isArray(e)){e.length===0&&n.push(`${t}: union must have at least one alternative`),e.forEach((s,o)=>Cn(s,`${t}[${o}]`,n,i));return}if(!ge(e)){n.push(`${t}: expected an Avro type string, object, or union`);return}if(i.has(e))return;i.add(e);const r=e.type;if(typeof r!="string"){Array.isArray(r)||ge(r)?Cn(r,`${t}.type`,n,i):n.push(`${t}: missing "type"`);return}if(!Ho.has(r)&&!Vf.has(r)&&!Vo.test(r)){n.push(`${t}: unknown Avro type "${r}"`);return}switch(r){case"record":{if(!Array.isArray(e.fields)){n.push(`${t}: record must have a "fields" array`);return}e.fields.forEach((s,o)=>{const a=`${t}.fields[${o}]`;if(!ge(s)||typeof s.name!="string"){n.push(`${a}: field must have a string "name"`);return}Cn(s.type,`${a}.type`,n,i)});break}case"enum":{const s=e.symbols;(!Array.isArray(s)||s.some(o=>typeof o!="string"))&&n.push(`${t}: enum must have a "symbols" array of strings`);break}case"array":{e.items===void 0?n.push(`${t}: array must have "items"`):Cn(e.items,`${t}.items`,n,i);break}case"map":{e.values===void 0?n.push(`${t}: map must have "values"`):Cn(e.values,`${t}.values`,n,i);break}case"fixed":{typeof e.size!="number"&&n.push(`${t}: fixed must have a numeric "size"`);break}}}var wi={exports:{}},_i={exports:{}},Ei={},Dr={},ki,Wo;function Hl(){if(Wo)return ki;Wo=1,ki=e;function e(t,n){for(var i=new Array(arguments.length-1),r=0,s=2,o=!0;s<arguments.length;)i[r++]=arguments[s++];return new Promise(function(l,c){i[r]=function(f){if(o)if(o=!1,f)c(f);else{for(var p=new Array(arguments.length-1),h=0;h<p.length;)p[h++]=arguments[h];l.apply(null,p)}};try{t.apply(n||null,i)}catch(d){o&&(o=!1,c(d))}})}return ki}var Oi={},Jo;function Wf(){return Jo||(Jo=1,(function(e){var t=e;t.length=function(a){var l=a.length;if(!l)return 0;for(var c=0;--l%4>1&&a.charAt(l)==="=";)++c;return Math.ceil(a.length*3)/4-c};for(var n=new Array(64),i=new Array(123),r=0;r<64;)i[n[r]=r<26?r+65:r<52?r+71:r<62?r-4:r-59|43]=r++;t.encode=function(a,l,c){for(var d=null,f=[],p=0,h=0,g;l<c;){var v=a[l++];switch(h){case 0:f[p++]=n[v>>2],g=(v&3)<<4,h=1;break;case 1:f[p++]=n[g|v>>4],g=(v&15)<<2,h=2;break;case 2:f[p++]=n[g|v>>6],f[p++]=n[v&63],h=0;break}p>8191&&((d||(d=[])).push(String.fromCharCode.apply(String,f)),p=0)}return h&&(f[p++]=n[g],f[p++]=61,h===1&&(f[p++]=61)),d?(p&&d.push(String.fromCharCode.apply(String,f.slice(0,p))),d.join("")):String.fromCharCode.apply(String,f.slice(0,p))};var s="invalid encoding";t.decode=function(a,l,c){for(var d=c,f=0,p,h=0;h<a.length;){var g=a.charCodeAt(h++);if(g===61&&f>1)break;if((g=i[g])===void 0)throw Error(s);switch(f){case 0:p=g,f=1;break;case 1:l[c++]=p<<2|(g&48)>>4,p=g,f=2;break;case 2:l[c++]=(p&15)<<4|(g&60)>>2,p=g,f=3;break;case 3:l[c++]=(p&3)<<6|g,f=0;break}}if(f===1)throw Error(s);return c-d},t.test=function(a){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(a)}})(Oi)),Oi}var Ti,Zo;function Jf(){if(Zo)return Ti;Zo=1,Ti=e;function e(){this._listeners=Object.create(null)}return e.prototype.on=function(n,i,r){return(this._listeners[n]||(this._listeners[n]=[])).push({fn:i,ctx:r||this}),this},e.prototype.off=function(n,i){if(n===void 0)this._listeners=Object.create(null);else if(i===void 0)this._listeners[n]=[];else{var r=this._listeners[n];if(!r)return this;for(var s=0;s<r.length;)r[s].fn===i?r.splice(s,1):++s}return this},e.prototype.emit=function(n){var i=this._listeners[n];if(i){for(var r=[],s=1;s<arguments.length;)r.push(arguments[s++]);for(s=0;s<i.length;)i[s].fn.apply(i[s++].ctx,r)}return this},Ti}var Ai,Xo;function Zf(){if(Xo)return Ai;Xo=1,Ai=e(e);function e(s){return typeof Float32Array<"u"?(function(){var o=new Float32Array([-0]),a=new Uint8Array(o.buffer),l=a[3]===128;function c(h,g,v){o[0]=h,g[v]=a[0],g[v+1]=a[1],g[v+2]=a[2],g[v+3]=a[3]}function d(h,g,v){o[0]=h,g[v]=a[3],g[v+1]=a[2],g[v+2]=a[1],g[v+3]=a[0]}s.writeFloatLE=l?c:d,s.writeFloatBE=l?d:c;function f(h,g){return a[0]=h[g],a[1]=h[g+1],a[2]=h[g+2],a[3]=h[g+3],o[0]}function p(h,g){return a[3]=h[g],a[2]=h[g+1],a[1]=h[g+2],a[0]=h[g+3],o[0]}s.readFloatLE=l?f:p,s.readFloatBE=l?p:f})():(function(){function o(l,c,d,f){var p=c<0?1:0;if(p&&(c=-c),c===0)l(1/c>0?0:2147483648,d,f);else if(isNaN(c))l(2143289344,d,f);else if(c>34028234663852886e22)l((p<<31|2139095040)>>>0,d,f);else if(c<11754943508222875e-54)l((p<<31|Math.round(c/1401298464324817e-60))>>>0,d,f);else{var h=Math.floor(Math.log(c)/Math.LN2),g=Math.round(c*Math.pow(2,-h)*8388608)&8388607;l((p<<31|h+127<<23|g)>>>0,d,f)}}s.writeFloatLE=o.bind(null,t),s.writeFloatBE=o.bind(null,n);function a(l,c,d){var f=l(c,d),p=(f>>31)*2+1,h=f>>>23&255,g=f&8388607;return h===255?g?NaN:p*(1/0):h===0?p*1401298464324817e-60*g:p*Math.pow(2,h-150)*(g+8388608)}s.readFloatLE=a.bind(null,i),s.readFloatBE=a.bind(null,r)})(),typeof Float64Array<"u"?(function(){var o=new Float64Array([-0]),a=new Uint8Array(o.buffer),l=a[7]===128;function c(h,g,v){o[0]=h,g[v]=a[0],g[v+1]=a[1],g[v+2]=a[2],g[v+3]=a[3],g[v+4]=a[4],g[v+5]=a[5],g[v+6]=a[6],g[v+7]=a[7]}function d(h,g,v){o[0]=h,g[v]=a[7],g[v+1]=a[6],g[v+2]=a[5],g[v+3]=a[4],g[v+4]=a[3],g[v+5]=a[2],g[v+6]=a[1],g[v+7]=a[0]}s.writeDoubleLE=l?c:d,s.writeDoubleBE=l?d:c;function f(h,g){return a[0]=h[g],a[1]=h[g+1],a[2]=h[g+2],a[3]=h[g+3],a[4]=h[g+4],a[5]=h[g+5],a[6]=h[g+6],a[7]=h[g+7],o[0]}function p(h,g){return a[7]=h[g],a[6]=h[g+1],a[5]=h[g+2],a[4]=h[g+3],a[3]=h[g+4],a[2]=h[g+5],a[1]=h[g+6],a[0]=h[g+7],o[0]}s.readDoubleLE=l?f:p,s.readDoubleBE=l?p:f})():(function(){function o(l,c,d,f,p,h){var g=f<0?1:0;if(g&&(f=-f),f===0)l(0,p,h+c),l(1/f>0?0:2147483648,p,h+d);else if(isNaN(f))l(0,p,h+c),l(2146959360,p,h+d);else if(f>17976931348623157e292)l(0,p,h+c),l((g<<31|2146435072)>>>0,p,h+d);else{var v;if(f<22250738585072014e-324)v=f/5e-324,l(v>>>0,p,h+c),l((g<<31|v/4294967296)>>>0,p,h+d);else{var E=Math.floor(Math.log(f)/Math.LN2);E===1024&&(E=1023),v=f*Math.pow(2,-E),l(v*4503599627370496>>>0,p,h+c),l((g<<31|E+1023<<20|v*1048576&1048575)>>>0,p,h+d)}}}s.writeDoubleLE=o.bind(null,t,0,4),s.writeDoubleBE=o.bind(null,n,4,0);function a(l,c,d,f,p){var h=l(f,p+c),g=l(f,p+d),v=(g>>31)*2+1,E=g>>>20&2047,_=4294967296*(g&1048575)+h;return E===2047?_?NaN:v*(1/0):E===0?v*5e-324*_:v*Math.pow(2,E-1075)*(_+4503599627370496)}s.readDoubleLE=a.bind(null,i,0,4),s.readDoubleBE=a.bind(null,r,4,0)})(),s}function t(s,o,a){o[a]=s&255,o[a+1]=s>>>8&255,o[a+2]=s>>>16&255,o[a+3]=s>>>24}function n(s,o,a){o[a]=s>>>24,o[a+1]=s>>>16&255,o[a+2]=s>>>8&255,o[a+3]=s&255}function i(s,o){return(s[o]|s[o+1]<<8|s[o+2]<<16|s[o+3]<<24)>>>0}function r(s,o){return(s[o]<<24|s[o+1]<<16|s[o+2]<<8|s[o+3])>>>0}return Ai}var Ni={},Yo;function Xf(){return Yo||(Yo=1,(function(e){var t=e,n=65533;t.length=function(r){for(var s=0,o=0,a=0;a<r.length;++a)o=r.charCodeAt(a),o<128?s+=1:o<2048?s+=2:(o&64512)===55296&&(r.charCodeAt(a+1)&64512)===56320?(++a,s+=4):s+=3;return s},t.read=function(r,s,o){if(o-s<1)return"";for(var a=null,l=[],c=0,d,f,p,h;s<o;)d=r[s++],d<=127?l[c++]=d:d>=192&&d<224?(p=(d&31)<<6|r[s++]&63,l[c++]=p>=128?p:n):d>=224&&d<240?(h=(d&15)<<12|(r[s++]&63)<<6|r[s++]&63,l[c++]=h>=2048?h:n):d>=240&&(f=(d&7)<<18|(r[s++]&63)<<12|(r[s++]&63)<<6|r[s++]&63,f<65536||f>1114111?l[c++]=n:(f-=65536,l[c++]=55296+(f>>10),l[c++]=56320+(f&1023))),c>8191&&((a||(a=[])).push(String.fromCharCode.apply(String,l.slice(0,c))),c=0);return a?(c&&a.push(String.fromCharCode.apply(String,l.slice(0,c))),a.join("")):String.fromCharCode.apply(String,l.slice(0,c))},t.write=function(r,s,o){for(var a=o,l,c,d=0;d<r.length;++d)l=r.charCodeAt(d),l<128?s[o++]=l:l<2048?(s[o++]=l>>6|192,s[o++]=l&63|128):(l&64512)===55296&&((c=r.charCodeAt(d+1))&64512)===56320?(l=65536+((l&1023)<<10)+(c&1023),++d,s[o++]=l>>18|240,s[o++]=l>>12&63|128,s[o++]=l>>6&63|128,s[o++]=l&63|128):(s[o++]=l>>12|224,s[o++]=l>>6&63|128,s[o++]=l&63|128);return o-a}})(Ni)),Ni}var ji,$o;function Yf(){if($o)return ji;$o=1,ji=e;function e(t,n,i){var r=i||8192,s=r>>>1,o=null,a=r;return function(c){if(c<1||c>s)return t(c);a+c>r&&(o=t(r),a=0);var d=n.call(o,a,a+=c);return a&7&&(a=(a|7)+1),d}}return ji}var Si,Ko;function $f(){if(Ko)return Si;Ko=1,Si=t;var e=Ft();function t(s,o){this.lo=s>>>0,this.hi=o>>>0}var n=t.zero=new t(0,0);n.toNumber=function(){return 0},n.zzEncode=n.zzDecode=function(){return this},n.length=function(){return 1};var i=t.zeroHash="\0\0\0\0\0\0\0\0";t.fromNumber=function(o){if(o===0)return n;var a=o<0;a&&(o=-o);var l=o>>>0,c=(o-l)/4294967296>>>0;return a&&(c=~c>>>0,l=~l>>>0,++l>4294967295&&(l=0,++c>4294967295&&(c=0))),new t(l,c)},t.from=function(o){if(typeof o=="number")return t.fromNumber(o);if(e.isString(o))if(e.Long)o=e.Long.fromString(o);else return t.fromNumber(parseInt(o,10));return o.low||o.high?new t(o.low>>>0,o.high>>>0):n},t.prototype.toNumber=function(o){if(!o&&this.hi>>>31){var a=~this.lo+1>>>0,l=~this.hi>>>0;return a||(l=l+1>>>0),-(a+l*4294967296)}return this.lo+this.hi*4294967296},t.prototype.toLong=function(o){return e.Long?new e.Long(this.lo|0,this.hi|0,!!o):{low:this.lo|0,high:this.hi|0,unsigned:!!o}};var r=String.prototype.charCodeAt;return t.fromHash=function(o){return o===i?n:new t((r.call(o,0)|r.call(o,1)<<8|r.call(o,2)<<16|r.call(o,3)<<24)>>>0,(r.call(o,4)|r.call(o,5)<<8|r.call(o,6)<<16|r.call(o,7)<<24)>>>0)},t.prototype.toHash=function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},t.prototype.zzEncode=function(){var o=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^o)>>>0,this.lo=(this.lo<<1^o)>>>0,this},t.prototype.zzDecode=function(){var o=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^o)>>>0,this.hi=(this.hi>>>1^o)>>>0,this},t.prototype.length=function(){var o=this.lo,a=(this.lo>>>28|this.hi<<4)>>>0,l=this.hi>>>24;return l===0?a===0?o<16384?o<128?1:2:o<2097152?3:4:a<16384?a<128?5:6:a<2097152?7:8:l<128?9:10},Si}var ar={exports:{}},Kf=ar.exports,Qo;function Qf(){return Qo||(Qo=1,(function(e,t){(function(n,i){function r(s){return s.default||s}i(t),e.exports=r(t)})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:Kf,function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;/**
64
+ * @license
65
+ * Copyright 2009 The Closure Library Authors
66
+ * Copyright 2020 Daniel Wirtz / The long.js Authors.
67
+ *
68
+ * Licensed under the Apache License, Version 2.0 (the "License");
69
+ * you may not use this file except in compliance with the License.
70
+ * You may obtain a copy of the License at
71
+ *
72
+ * http://www.apache.org/licenses/LICENSE-2.0
73
+ *
74
+ * Unless required by applicable law or agreed to in writing, software
75
+ * distributed under the License is distributed on an "AS IS" BASIS,
76
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
77
+ * See the License for the specific language governing permissions and
78
+ * limitations under the License.
79
+ *
80
+ * SPDX-License-Identifier: Apache-2.0
81
+ */var i=null;try{i=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}function r(k,m,T){this.low=k|0,this.high=m|0,this.unsigned=!!T}r.prototype.__isLong__,Object.defineProperty(r.prototype,"__isLong__",{value:!0});function s(k){return(k&&k.__isLong__)===!0}function o(k){var m=Math.clz32(k&-k);return k?31-m:m}r.isLong=s;var a={},l={};function c(k,m){var T,S,W;return m?(k>>>=0,(W=0<=k&&k<256)&&(S=l[k],S)?S:(T=f(k,0,!0),W&&(l[k]=T),T)):(k|=0,(W=-128<=k&&k<128)&&(S=a[k],S)?S:(T=f(k,k<0?-1:0,!1),W&&(a[k]=T),T))}r.fromInt=c;function d(k,m){if(isNaN(k))return m?j:I;if(m){if(k<0)return j;if(k>=w)return U}else{if(k<=-y)return pe;if(k+1>=y)return Y}return k<0?d(-k,m).neg():f(k%_|0,k/_|0,m)}r.fromNumber=d;function f(k,m,T){return new r(k,m,T)}r.fromBits=f;var p=Math.pow;function h(k,m,T){if(k.length===0)throw Error("empty string");if(typeof m=="number"?(T=m,m=!1):m=!!m,k==="NaN"||k==="Infinity"||k==="+Infinity"||k==="-Infinity")return m?j:I;if(T=T||10,T<2||36<T)throw RangeError("radix");var S;if((S=k.indexOf("-"))>0)throw Error("interior hyphen");if(S===0)return h(k.substring(1),m,T).neg();for(var W=d(p(T,8)),B=I,K=0;K<k.length;K+=8){var ne=Math.min(8,k.length-K),be=parseInt(k.substring(K,K+ne),T);if(ne<8){var Q=d(p(T,ne));B=B.mul(Q).add(d(be))}else B=B.mul(W),B=B.add(d(be))}return B.unsigned=m,B}r.fromString=h;function g(k,m){return typeof k=="number"?d(k,m):typeof k=="string"?h(k,m):f(k.low,k.high,typeof m=="boolean"?m:k.unsigned)}r.fromValue=g;var v=65536,E=1<<24,_=v*v,w=_*_,y=w/2,O=c(E),I=c(0);r.ZERO=I;var j=c(0,!0);r.UZERO=j;var M=c(1);r.ONE=M;var ee=c(1,!0);r.UONE=ee;var q=c(-1);r.NEG_ONE=q;var Y=f(-1,2147483647,!1);r.MAX_VALUE=Y;var U=f(-1,-1,!0);r.MAX_UNSIGNED_VALUE=U;var pe=f(0,-2147483648,!1);r.MIN_VALUE=pe;var R=r.prototype;R.toInt=function(){return this.unsigned?this.low>>>0:this.low},R.toNumber=function(){return this.unsigned?(this.high>>>0)*_+(this.low>>>0):this.high*_+(this.low>>>0)},R.toString=function(m){if(m=m||10,m<2||36<m)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(pe)){var T=d(m),S=this.div(T),W=S.mul(T).sub(this);return S.toString(m)+W.toInt().toString(m)}else return"-"+this.neg().toString(m);for(var B=d(p(m,6),this.unsigned),K=this,ne="";;){var be=K.div(B),Q=K.sub(be.mul(B)).toInt()>>>0,we=Q.toString(m);if(K=be,K.isZero())return we+ne;for(;we.length<6;)we="0"+we;ne=""+we+ne}},R.getHighBits=function(){return this.high},R.getHighBitsUnsigned=function(){return this.high>>>0},R.getLowBits=function(){return this.low},R.getLowBitsUnsigned=function(){return this.low>>>0},R.getNumBitsAbs=function(){if(this.isNegative())return this.eq(pe)?64:this.neg().getNumBitsAbs();for(var m=this.high!=0?this.high:this.low,T=31;T>0&&(m&1<<T)==0;T--);return this.high!=0?T+33:T+1},R.isSafeInteger=function(){var m=this.high>>21;return m?this.unsigned?!1:m===-1&&!(this.low===0&&this.high===-2097152):!0},R.isZero=function(){return this.high===0&&this.low===0},R.eqz=R.isZero,R.isNegative=function(){return!this.unsigned&&this.high<0},R.isPositive=function(){return this.unsigned||this.high>=0},R.isOdd=function(){return(this.low&1)===1},R.isEven=function(){return(this.low&1)===0},R.equals=function(m){return s(m)||(m=g(m)),this.unsigned!==m.unsigned&&this.high>>>31===1&&m.high>>>31===1?!1:this.high===m.high&&this.low===m.low},R.eq=R.equals,R.notEquals=function(m){return!this.eq(m)},R.neq=R.notEquals,R.ne=R.notEquals,R.lessThan=function(m){return this.comp(m)<0},R.lt=R.lessThan,R.lessThanOrEqual=function(m){return this.comp(m)<=0},R.lte=R.lessThanOrEqual,R.le=R.lessThanOrEqual,R.greaterThan=function(m){return this.comp(m)>0},R.gt=R.greaterThan,R.greaterThanOrEqual=function(m){return this.comp(m)>=0},R.gte=R.greaterThanOrEqual,R.ge=R.greaterThanOrEqual,R.compare=function(m){if(s(m)||(m=g(m)),this.eq(m))return 0;var T=this.isNegative(),S=m.isNegative();return T&&!S?-1:!T&&S?1:this.unsigned?m.high>>>0>this.high>>>0||m.high===this.high&&m.low>>>0>this.low>>>0?-1:1:this.sub(m).isNegative()?-1:1},R.comp=R.compare,R.negate=function(){return!this.unsigned&&this.eq(pe)?pe:this.not().add(M)},R.neg=R.negate,R.add=function(m){s(m)||(m=g(m));var T=this.high>>>16,S=this.high&65535,W=this.low>>>16,B=this.low&65535,K=m.high>>>16,ne=m.high&65535,be=m.low>>>16,Q=m.low&65535,we=0,de=0,G=0,Ee=0;return Ee+=B+Q,G+=Ee>>>16,Ee&=65535,G+=W+be,de+=G>>>16,G&=65535,de+=S+ne,we+=de>>>16,de&=65535,we+=T+K,we&=65535,f(G<<16|Ee,we<<16|de,this.unsigned)},R.subtract=function(m){return s(m)||(m=g(m)),this.add(m.neg())},R.sub=R.subtract,R.multiply=function(m){if(this.isZero())return this;if(s(m)||(m=g(m)),i){var T=i.mul(this.low,this.high,m.low,m.high);return f(T,i.get_high(),this.unsigned)}if(m.isZero())return this.unsigned?j:I;if(this.eq(pe))return m.isOdd()?pe:I;if(m.eq(pe))return this.isOdd()?pe:I;if(this.isNegative())return m.isNegative()?this.neg().mul(m.neg()):this.neg().mul(m).neg();if(m.isNegative())return this.mul(m.neg()).neg();if(this.lt(O)&&m.lt(O))return d(this.toNumber()*m.toNumber(),this.unsigned);var S=this.high>>>16,W=this.high&65535,B=this.low>>>16,K=this.low&65535,ne=m.high>>>16,be=m.high&65535,Q=m.low>>>16,we=m.low&65535,de=0,G=0,Ee=0,at=0;return at+=K*we,Ee+=at>>>16,at&=65535,Ee+=B*we,G+=Ee>>>16,Ee&=65535,Ee+=K*Q,G+=Ee>>>16,Ee&=65535,G+=W*we,de+=G>>>16,G&=65535,G+=B*Q,de+=G>>>16,G&=65535,G+=K*be,de+=G>>>16,G&=65535,de+=S*we+W*Q+B*be+K*ne,de&=65535,f(Ee<<16|at,de<<16|G,this.unsigned)},R.mul=R.multiply,R.divide=function(m){if(s(m)||(m=g(m)),m.isZero())throw Error("division by zero");if(i){if(!this.unsigned&&this.high===-2147483648&&m.low===-1&&m.high===-1)return this;var T=(this.unsigned?i.div_u:i.div_s)(this.low,this.high,m.low,m.high);return f(T,i.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?j:I;var S,W,B;if(this.unsigned){if(m.unsigned||(m=m.toUnsigned()),m.gt(this))return j;if(m.gt(this.shru(1)))return ee;B=j}else{if(this.eq(pe)){if(m.eq(M)||m.eq(q))return pe;if(m.eq(pe))return M;var K=this.shr(1);return S=K.div(m).shl(1),S.eq(I)?m.isNegative()?M:q:(W=this.sub(m.mul(S)),B=S.add(W.div(m)),B)}else if(m.eq(pe))return this.unsigned?j:I;if(this.isNegative())return m.isNegative()?this.neg().div(m.neg()):this.neg().div(m).neg();if(m.isNegative())return this.div(m.neg()).neg();B=I}for(W=this;W.gte(m);){S=Math.max(1,Math.floor(W.toNumber()/m.toNumber()));for(var ne=Math.ceil(Math.log(S)/Math.LN2),be=ne<=48?1:p(2,ne-48),Q=d(S),we=Q.mul(m);we.isNegative()||we.gt(W);)S-=be,Q=d(S,this.unsigned),we=Q.mul(m);Q.isZero()&&(Q=M),B=B.add(Q),W=W.sub(we)}return B},R.div=R.divide,R.modulo=function(m){if(s(m)||(m=g(m)),i){var T=(this.unsigned?i.rem_u:i.rem_s)(this.low,this.high,m.low,m.high);return f(T,i.get_high(),this.unsigned)}return this.sub(this.div(m).mul(m))},R.mod=R.modulo,R.rem=R.modulo,R.not=function(){return f(~this.low,~this.high,this.unsigned)},R.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},R.clz=R.countLeadingZeros,R.countTrailingZeros=function(){return this.low?o(this.low):o(this.high)+32},R.ctz=R.countTrailingZeros,R.and=function(m){return s(m)||(m=g(m)),f(this.low&m.low,this.high&m.high,this.unsigned)},R.or=function(m){return s(m)||(m=g(m)),f(this.low|m.low,this.high|m.high,this.unsigned)},R.xor=function(m){return s(m)||(m=g(m)),f(this.low^m.low,this.high^m.high,this.unsigned)},R.shiftLeft=function(m){return s(m)&&(m=m.toInt()),(m&=63)===0?this:m<32?f(this.low<<m,this.high<<m|this.low>>>32-m,this.unsigned):f(0,this.low<<m-32,this.unsigned)},R.shl=R.shiftLeft,R.shiftRight=function(m){return s(m)&&(m=m.toInt()),(m&=63)===0?this:m<32?f(this.low>>>m|this.high<<32-m,this.high>>m,this.unsigned):f(this.high>>m-32,this.high>=0?0:-1,this.unsigned)},R.shr=R.shiftRight,R.shiftRightUnsigned=function(m){return s(m)&&(m=m.toInt()),(m&=63)===0?this:m<32?f(this.low>>>m|this.high<<32-m,this.high>>>m,this.unsigned):m===32?f(this.high,0,this.unsigned):f(this.high>>>m-32,0,this.unsigned)},R.shru=R.shiftRightUnsigned,R.shr_u=R.shiftRightUnsigned,R.rotateLeft=function(m){var T;return s(m)&&(m=m.toInt()),(m&=63)===0?this:m===32?f(this.high,this.low,this.unsigned):m<32?(T=32-m,f(this.low<<m|this.high>>>T,this.high<<m|this.low>>>T,this.unsigned)):(m-=32,T=32-m,f(this.high<<m|this.low>>>T,this.low<<m|this.high>>>T,this.unsigned))},R.rotl=R.rotateLeft,R.rotateRight=function(m){var T;return s(m)&&(m=m.toInt()),(m&=63)===0?this:m===32?f(this.high,this.low,this.unsigned):m<32?(T=32-m,f(this.high<<T|this.low>>>m,this.low<<T|this.high>>>m,this.unsigned)):(m-=32,T=32-m,f(this.low<<T|this.high>>>m,this.high<<T|this.low>>>m,this.unsigned))},R.rotr=R.rotateRight,R.toSigned=function(){return this.unsigned?f(this.low,this.high,!1):this},R.toUnsigned=function(){return this.unsigned?this:f(this.low,this.high,!0)},R.toBytes=function(m){return m?this.toBytesLE():this.toBytesBE()},R.toBytesLE=function(){var m=this.high,T=this.low;return[T&255,T>>>8&255,T>>>16&255,T>>>24,m&255,m>>>8&255,m>>>16&255,m>>>24]},R.toBytesBE=function(){var m=this.high,T=this.low;return[m>>>24,m>>>16&255,m>>>8&255,m&255,T>>>24,T>>>16&255,T>>>8&255,T&255]},r.fromBytes=function(m,T,S){return S?r.fromBytesLE(m,T):r.fromBytesBE(m,T)},r.fromBytesLE=function(m,T){return new r(m[0]|m[1]<<8|m[2]<<16|m[3]<<24,m[4]|m[5]<<8|m[6]<<16|m[7]<<24,T)},r.fromBytesBE=function(m,T){return new r(m[4]<<24|m[5]<<16|m[6]<<8|m[7],m[0]<<24|m[1]<<16|m[2]<<8|m[3],T)},typeof BigInt=="function"&&(r.fromBigInt=function(m,T){var S=Number(BigInt.asIntN(32,m)),W=Number(BigInt.asIntN(32,m>>BigInt(32)));return f(S,W,T)},r.fromValue=function(m,T){return typeof m=="bigint"?r.fromBigInt(m,T):g(m,T)},R.toBigInt=function(){var m=BigInt(this.low>>>0),T=BigInt(this.unsigned?this.high>>>0:this.high);return T<<BigInt(32)|m}),n.default=r})})(ar,ar.exports)),ar.exports}var Go;function Ft(){return Go||(Go=1,(function(e){var t=e;t.asPromise=Hl(),t.base64=Wf(),t.EventEmitter=Jf(),t.float=Zf(),t.utf8=Xf(),t.pool=Yf(),t.LongBits=$f();function n(s){return s==="__proto__"||s==="prototype"||s==="constructor"}t.isUnsafeProperty=n,t.isNode=!!(typeof In<"u"&&In&&In.process&&In.process.versions&&In.process.versions.node),t.global=t.isNode&&In||typeof window<"u"&&window||typeof self<"u"&&self||Dr,t.emptyArray=Object.freeze?Object.freeze([]):[],t.emptyObject=Object.freeze?Object.freeze({}):{},t.isInteger=Number.isInteger||function(o){return typeof o=="number"&&isFinite(o)&&Math.floor(o)===o},t.isString=function(o){return typeof o=="string"||o instanceof String},t.isObject=function(o){return o&&typeof o=="object"},t.isset=t.isSet=function(o,a){var l=o[a];return l!=null&&Object.hasOwnProperty.call(o,a)?typeof l!="object"||(Array.isArray(l)?l.length:Object.keys(l).length)>0:!1},t.Buffer=(function(){try{var s=t.global.Buffer;return s.prototype.utf8Write?s:null}catch{return null}})(),t._Buffer_from=null,t._Buffer_allocUnsafe=null,t.newBuffer=function(o){return typeof o=="number"?t.Buffer?t._Buffer_allocUnsafe(o):new t.Array(o):t.Buffer?t._Buffer_from(o):typeof Uint8Array>"u"?o:new Uint8Array(o)},t.Array=typeof Uint8Array<"u"?Uint8Array:Array,t.Long=t.global.dcodeIO&&t.global.dcodeIO.Long||t.global.Long||(function(){try{var s=Qf();return s&&s.isLong?s:null}catch{return null}})(),t.key2Re=/^true|false|0|1$/,t.key32Re=/^-?(?:0|[1-9][0-9]*)$/,t.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,t.longToHash=function(o){return o?t.LongBits.from(o).toHash():t.LongBits.zeroHash},t.longFromHash=function(o,a){var l=t.LongBits.fromHash(o);return t.Long?t.Long.fromBits(l.lo,l.hi,a):l.toNumber(!!a)};function i(s){var o=typeof arguments[arguments.length-1]=="boolean",a=o?arguments.length-1:arguments.length;o=o&&arguments[arguments.length-1];for(var l=1;l<a;++l){var c=arguments[l];if(c)for(var d=Object.keys(c),f=0;f<d.length;++f)!n(d[f])&&(s[d[f]]===void 0||!o)&&(s[d[f]]=c[d[f]])}return s}t.merge=i,t.nestingLimit=32,t.recursionLimit=100,t.makeProp=function(o,a){Object.defineProperty(o,a,{enumerable:!0,configurable:!0,writable:!0})},t.lcFirst=function(o){return o.charAt(0).toLowerCase()+o.substring(1)};function r(s){function o(a,l){if(!(this instanceof o))return new o(a,l);Object.defineProperty(this,"message",{get:function(){return a}}),Error.captureStackTrace?Error.captureStackTrace(this,o):Object.defineProperty(this,"stack",{value:new Error().stack||""}),l&&i(this,l)}return o.prototype=Object.create(Error.prototype,{constructor:{value:o,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return s},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),o}t.newError=r,t.ProtocolError=r("ProtocolError"),t.oneOfGetter=function(o){for(var a={},l=0;l<o.length;++l)a[o[l]]=1;return function(){for(var c=Object.keys(this),d=c.length-1;d>-1;--d)if(a[c[d]]===1&&this[c[d]]!==void 0&&this[c[d]]!==null)return c[d]}},t.oneOfSetter=function(o){return function(a){for(var l=0;l<o.length;++l)o[l]!==a&&delete this[o[l]]}},t.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},t._configure=function(){var s=t.Buffer;if(!s){t._Buffer_from=t._Buffer_allocUnsafe=null;return}t._Buffer_from=s.from!==Uint8Array.from&&s.from||function(a,l){return new s(a,l)},t._Buffer_allocUnsafe=s.allocUnsafe||function(a){return new s(a)}}})(Dr)),Dr}var Ri,ea;function Js(){if(ea)return Ri;ea=1,Ri=l;var e=Ft(),t,n=e.LongBits,i=e.base64,r=e.utf8;function s(E,_,w){this.fn=E,this.len=_,this.next=void 0,this.val=w}function o(){}function a(E){this.head=E.head,this.tail=E.tail,this.len=E.len,this.next=E.states}function l(){this.len=0,this.head=new s(o,0,0),this.tail=this.head,this.states=null}var c=function(){return e.Buffer?function(){return(l.create=function(){return new t})()}:function(){return new l}};l.create=c(),l.alloc=function(_){return new e.Array(_)},e.Array!==Array&&(l.alloc=e.pool(l.alloc,e.Array.prototype.subarray)),l.prototype._push=function(_,w,y){return this.tail=this.tail.next=new s(_,w,y),this.len+=w,this};function d(E,_,w){_[w]=E&255}function f(E,_,w){for(;E>127;)_[w++]=E&127|128,E>>>=7;_[w]=E}function p(E,_){this.len=E,this.next=void 0,this.val=_}p.prototype=Object.create(s.prototype),p.prototype.fn=f,l.prototype.uint32=function(_){return this.len+=(this.tail=this.tail.next=new p((_=_>>>0)<128?1:_<16384?2:_<2097152?3:_<268435456?4:5,_)).len,this},l.prototype.int32=function(_){return(_|=0)<0?this._push(h,10,n.fromNumber(_)):this.uint32(_)},l.prototype.sint32=function(_){return this.uint32((_<<1^_>>31)>>>0)};function h(E,_,w){for(var y=E.lo,O=E.hi;O;)_[w++]=y&127|128,y=(y>>>7|O<<25)>>>0,O>>>=7;for(;y>127;)_[w++]=y&127|128,y=y>>>7;_[w++]=y}l.prototype.uint64=function(_){var w=n.from(_);return this._push(h,w.length(),w)},l.prototype.int64=l.prototype.uint64,l.prototype.sint64=function(_){var w=n.from(_).zzEncode();return this._push(h,w.length(),w)},l.prototype.bool=function(_){return this._push(d,1,_?1:0)};function g(E,_,w){_[w]=E&255,_[w+1]=E>>>8&255,_[w+2]=E>>>16&255,_[w+3]=E>>>24}l.prototype.fixed32=function(_){return this._push(g,4,_>>>0)},l.prototype.sfixed32=l.prototype.fixed32,l.prototype.fixed64=function(_){var w=n.from(_);return this._push(g,4,w.lo)._push(g,4,w.hi)},l.prototype.sfixed64=l.prototype.fixed64,l.prototype.float=function(_){return this._push(e.float.writeFloatLE,4,_)},l.prototype.double=function(_){return this._push(e.float.writeDoubleLE,8,_)};var v=e.Array.prototype.set?function(_,w,y){w.set(_,y)}:function(_,w,y){for(var O=0;O<_.length;++O)w[y+O]=_[O]};return l.prototype.bytes=function(_){var w=_.length>>>0;if(!w)return this._push(d,1,0);if(e.isString(_)){var y=l.alloc(w=i.length(_));i.decode(_,y,0),_=y}return this.uint32(w)._push(v,w,_)},l.prototype.string=function(_){var w=r.length(_);return w?this.uint32(w)._push(r.write,w,_):this._push(d,1,0)},l.prototype.fork=function(){return this.states=new a(this),this.head=this.tail=new s(o,0,0),this.len=0,this},l.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new s(o,0,0),this.len=0),this},l.prototype.ldelim=function(){var _=this.head,w=this.tail,y=this.len;return this.reset().uint32(y),y&&(this.tail.next=_.next,this.tail=w,this.len+=y),this},l.prototype.finish=function(){for(var _=this.head.next,w=this.constructor.alloc(this.len),y=0;_;)_.fn(_.val,w,y),y+=_.len,_=_.next;return w},l._configure=function(E){t=E,l.create=c(),t._configure()},Ri}var Ii,ta;function Gf(){if(ta)return Ii;ta=1,Ii=n;var e=Js();(n.prototype=Object.create(e.prototype)).constructor=n;var t=Ft();function n(){e.call(this)}n._configure=function(){n.alloc=t._Buffer_allocUnsafe,n.writeBytesBuffer=t.Buffer&&t.Buffer.prototype instanceof Uint8Array&&t.Buffer.prototype.set.name==="set"?function(s,o,a){o.set(s,a)}:function(s,o,a){if(s.copy)s.copy(o,a,0,s.length);else for(var l=0;l<s.length;)o[a++]=s[l++]}},n.prototype.bytes=function(s){t.isString(s)&&(s=t._Buffer_from(s,"base64"));var o=s.length>>>0;return this.uint32(o),o&&this._push(n.writeBytesBuffer,o,s),this};function i(r,s,o){r.length<40?t.utf8.write(r,s,o):s.utf8Write?s.utf8Write(r,o):s.write(r,o)}return n.prototype.string=function(s){var o=t.Buffer.byteLength(s);return this.uint32(o),o&&this._push(i,o,s),this},n._configure(),Ii}var Mi,na;function Zs(){if(na)return Mi;na=1,Mi=s;var e=Ft(),t,n=e.LongBits,i=e.utf8;function r(f,p){return RangeError("index out of range: "+f.pos+" + "+(p||1)+" > "+f.len)}function s(f){this.buf=f,this.pos=0,this.len=f.length}var o=typeof Uint8Array<"u"?function(p){if(p instanceof Uint8Array||Array.isArray(p))return new s(p);throw Error("illegal buffer")}:function(p){if(Array.isArray(p))return new s(p);throw Error("illegal buffer")},a=function(){return e.Buffer?function(h){return(s.create=function(v){return e.Buffer.isBuffer(v)?new t(v):o(v)})(h)}:o};s.create=a(),s.prototype._slice=e.Array.prototype.subarray||e.Array.prototype.slice,s.prototype.uint32=(function(){var p=4294967295;return function(){if(p=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(p=(p|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(p=(p|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(p=(p|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(p=(p|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return p;if((this.pos+=5)>this.len)throw this.pos=this.len,r(this,10);return p}})(),s.prototype.int32=function(){return this.uint32()|0},s.prototype.sint32=function(){var p=this.uint32();return p>>>1^-(p&1)|0};function l(){var f=new n(0,0),p=0;if(this.len-this.pos>4){for(;p<4;++p)if(f.lo=(f.lo|(this.buf[this.pos]&127)<<p*7)>>>0,this.buf[this.pos++]<128)return f;if(f.lo=(f.lo|(this.buf[this.pos]&127)<<28)>>>0,f.hi=(f.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return f;p=0}else{for(;p<3;++p){if(this.pos>=this.len)throw r(this);if(f.lo=(f.lo|(this.buf[this.pos]&127)<<p*7)>>>0,this.buf[this.pos++]<128)return f}return f.lo=(f.lo|(this.buf[this.pos++]&127)<<p*7)>>>0,f}if(this.len-this.pos>4){for(;p<5;++p)if(f.hi=(f.hi|(this.buf[this.pos]&127)<<p*7+3)>>>0,this.buf[this.pos++]<128)return f}else for(;p<5;++p){if(this.pos>=this.len)throw r(this);if(f.hi=(f.hi|(this.buf[this.pos]&127)<<p*7+3)>>>0,this.buf[this.pos++]<128)return f}throw Error("invalid varint encoding")}s.prototype.bool=function(){return this.uint32()!==0};function c(f,p){return(f[p-4]|f[p-3]<<8|f[p-2]<<16|f[p-1]<<24)>>>0}s.prototype.fixed32=function(){if(this.pos+4>this.len)throw r(this,4);return c(this.buf,this.pos+=4)},s.prototype.sfixed32=function(){if(this.pos+4>this.len)throw r(this,4);return c(this.buf,this.pos+=4)|0};function d(){if(this.pos+8>this.len)throw r(this,8);return new n(c(this.buf,this.pos+=4),c(this.buf,this.pos+=4))}return s.prototype.float=function(){if(this.pos+4>this.len)throw r(this,4);var p=e.float.readFloatLE(this.buf,this.pos);return this.pos+=4,p},s.prototype.double=function(){if(this.pos+8>this.len)throw r(this,4);var p=e.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,p},s.prototype.bytes=function(){var p=this.uint32(),h=this.pos,g=this.pos+p;if(g>this.len)throw r(this,p);if(this.pos+=p,Array.isArray(this.buf))return this.buf.slice(h,g);if(h===g){var v=e.Buffer;return v?v.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,h,g)},s.prototype.string=function(){var p=this.bytes();return i.read(p,0,p.length)},s.prototype.skip=function(p){if(typeof p=="number"){if(this.pos+p>this.len)throw r(this,p);this.pos+=p}else do if(this.pos>=this.len)throw r(this);while(this.buf[this.pos++]&128);return this},s.recursionLimit=e.recursionLimit,s.prototype.skipType=function(f,p){if(p===void 0&&(p=0),p>s.recursionLimit)throw Error("maximum nesting depth exceeded");switch(f){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(f=this.uint32()&7)!==4;)this.skipType(f,p+1);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+f+" at offset "+this.pos)}return this},s._configure=function(f){t=f,s.create=a(),t._configure();var p=e.Long?"toLong":"toNumber";e.merge(s.prototype,{int64:function(){return l.call(this)[p](!1)},uint64:function(){return l.call(this)[p](!0)},sint64:function(){return l.call(this).zzDecode()[p](!1)},fixed64:function(){return d.call(this)[p](!0)},sfixed64:function(){return d.call(this)[p](!1)}})},Mi}var Ci,ra;function ed(){if(ra)return Ci;ra=1,Ci=n;var e=Zs();(n.prototype=Object.create(e.prototype)).constructor=n;var t=Ft();function n(i){e.call(this,i)}return n._configure=function(){t.Buffer&&(n.prototype._slice=t.Buffer.prototype.slice)},n.prototype.string=function(){var r=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+r,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+r,this.len))},n._configure(),Ci}var Li={},Pi,ia;function td(){if(ia)return Pi;ia=1,Pi=t;var e=Ft();(t.prototype=Object.create(e.EventEmitter.prototype)).constructor=t;function t(n,i,r){if(typeof n!="function")throw TypeError("rpcImpl must be a function");e.EventEmitter.call(this),this.rpcImpl=n,this.requestDelimited=!!i,this.responseDelimited=!!r}return t.prototype.rpcCall=function n(i,r,s,o,a){if(!o)throw TypeError("request must be specified");var l=this;if(!a)return e.asPromise(n,l,i,r,s,o);if(!l.rpcImpl){setTimeout(function(){a(Error("already ended"))},0);return}try{return l.rpcImpl(i,r[l.requestDelimited?"encodeDelimited":"encode"](o).finish(),function(d,f){if(d)return l.emit("error",d,i),a(d);if(f===null){l.end(!0);return}if(!(f instanceof s))try{f=s[l.responseDelimited?"decodeDelimited":"decode"](f)}catch(p){return l.emit("error",p,i),a(p)}return l.emit("data",f,i),a(null,f)})}catch(c){l.emit("error",c,i),setTimeout(function(){a(c)},0);return}},t.prototype.end=function(i){return this.rpcImpl&&(i||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this},Pi}var sa;function Vl(){return sa||(sa=1,(function(e){var t=e;t.Service=td()})(Li)),Li}var Di,oa;function Wl(){return oa||(oa=1,Di=Object.create(null)),Di}var aa;function nd(){return aa||(aa=1,(function(e){var t=e;t.build="minimal",t.Writer=Js(),t.BufferWriter=Gf(),t.Reader=Zs(),t.BufferReader=ed(),t.util=Ft(),t.rpc=Vl(),t.roots=Wl(),t.configure=n;function n(){t.util._configure(),t.Writer._configure(t.BufferWriter),t.Reader._configure(t.BufferReader)}n()})(Ei)),Ei}var Fi={},Bi={exports:{}},zi,la;function rd(){if(la)return zi;la=1,zi=t;var e=/^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/;function t(i,r){typeof i=="string"&&(r=i,i=void 0);var s=[];function o(l){if(typeof l!="string"){var c=a();if(t.verbose&&console.log("codegen: "+c),c="return "+c,l){for(var d=Object.keys(l),f=new Array(d.length+1),p=new Array(d.length),h=0;h<d.length;)f[h]=d[h],p[h]=l[d[h++]];return f[h]=c,Function.apply(null,f).apply(null,p)}return Function(c)()}for(var g=new Array(arguments.length-1),v=0;v<g.length;)g[v]=arguments[++v];if(v=0,l=l.replace(/%([%dfijs])/g,function(_,w){var y=g[v++];switch(w){case"d":case"f":return String(Number(y));case"i":return String(Math.floor(y));case"j":return JSON.stringify(y);case"s":return String(y)}return"%"}),v!==g.length)throw Error("parameter count mismatch");return s.push(l),o}function a(l){return"function "+n(l||r)+"("+(i&&i.join(",")||"")+`){
82
+ `+s.join(`
83
+ `)+`
84
+ }`}return o.toString=a,o}t.verbose=!1;function n(i){return!i||(i=String(i).replace(/[^\w$]/g,""),!i)?"":(/^\d/.test(i)&&(i="_"+i),e.test(i)?i+"_":i)}return zi}const id={},sd=Object.freeze(Object.defineProperty({__proto__:null,default:id},Symbol.toStringTag,{value:"Module"})),Jl=Nu(sd);var qi,ca;function od(){if(ca)return qi;ca=1;var e=null;try{e=Jl,(!e||!e.readFile||!e.readFileSync)&&(e=null)}catch{}return qi=e,qi}var Ui,ua;function ad(){if(ua)return Ui;ua=1,Ui=n;var e=Hl(),t=od();function n(i,r,s){return typeof r=="function"?(s=r,r={}):r||(r={}),s?!r.xhr&&t&&t.readFile?t.readFile(i,function(a,l){return a&&typeof XMLHttpRequest<"u"?n.xhr(i,r,s):a?s(a):s(null,r.binary?l:l.toString("utf8"))}):n.xhr(i,r,s):e(n,this,i,r)}return n.xhr=function(r,s,o){var a=new XMLHttpRequest;a.onreadystatechange=function(){if(a.readyState===4){if(a.status!==0&&a.status!==200)return o(Error("status "+a.status));if(s.binary){var c=a.response;if(!c){c=[];for(var d=0;d<a.responseText.length;++d)c.push(a.responseText.charCodeAt(d)&255)}return o(null,typeof Uint8Array<"u"?new Uint8Array(c):c)}return o(null,a.responseText)}},s.binary&&("overrideMimeType"in a&&a.overrideMimeType("text/plain; charset=x-user-defined"),a.responseType="arraybuffer"),a.open("GET",r),a.send()},Ui}var Hi={},fa;function ld(){return fa||(fa=1,(function(e){var t=e,n=t.isAbsolute=function(s){return/^(?:\/|\w+:)/.test(s)},i=t.normalize=function(s){s=s.replace(/\\/g,"/").replace(/\/{2,}/g,"/");var o=s.split("/"),a=n(s),l="";a&&(l=o.shift()+"/");for(var c=0;c<o.length;)o[c]===".."?c>0&&o[c-1]!==".."?o.splice(--c,2):a?o.splice(c,1):++c:o[c]==="."?o.splice(c,1):++c;return l+o.join("/")};t.resolve=function(s,o,a){return a||(o=i(o)),n(o)?o:(a||(s=i(s)),(s=s.replace(/(?:\/|^)[^/]+$/,"")).length?i(s+"/"+o):o)}})(Hi)),Hi}var Vi={},da;function cd(){return da||(da=1,(function(e){var t=e;t.numberRe=/^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/,t.typeRefRe=/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/,t.reservedRe=/^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/})(Vi)),Vi}var Wi,pa;function ud(){if(pa)return Wi;pa=1;var e=null;try{e=Jl,(!e||!e.readFile||!e.readFileSync)&&(e=null)}catch{}return Wi=e,Wi}var Ji,ha;function yr(){if(ha)return Ji;ha=1,Ji=l;var e=vn();((l.prototype=Object.create(e.prototype)).constructor=l).className="Namespace";var t=bn(),n=tt(),i=zn(),r,s,o;l.fromJSON=function(f,p,h){return h=n.checkDepth(h),new l(f,p.options).addJSON(p.nested,h)};function a(d,f){if(d&&d.length){for(var p={},h=0;h<d.length;++h)p[d[h].name]=d[h].toJSON(f);return p}}l.arrayToJSON=a,l.isReservedId=function(f,p){if(f){for(var h=0;h<f.length;++h)if(typeof f[h]!="string"&&f[h][0]<=p&&f[h][1]>p)return!0}return!1},l.isReservedName=function(f,p){if(f){for(var h=0;h<f.length;++h)if(f[h]===p)return!0}return!1};function l(d,f){e.call(this,d,f),this.nested=void 0,this._nestedArray=null,this._lookupCache=Object.create(null),this._needsRecursiveFeatureResolution=!0,this._needsRecursiveResolve=!0}function c(d){d._nestedArray=null,d._lookupCache=Object.create(null);for(var f=d;f=f.parent;)f._lookupCache=Object.create(null);return d}return Object.defineProperty(l.prototype,"nestedArray",{get:function(){return this._nestedArray||(this._nestedArray=n.toArray(this.nested))}}),l.prototype.toJSON=function(f){return n.toObject(["options",this.options,"nested",a(this.nestedArray,f)])},l.prototype.addJSON=function(f,p){p=n.checkDepth(p);var h=this;if(f)for(var g=Object.keys(f),v=0,E;v<g.length;++v)E=f[g[v]],h.add((E.fields!==void 0?r.fromJSON:E.values!==void 0?o.fromJSON:E.methods!==void 0?s.fromJSON:E.id!==void 0?t.fromJSON:l.fromJSON)(g[v],E,p+1));return this},l.prototype.get=function(f){return this.nested&&Object.prototype.hasOwnProperty.call(this.nested,f)?this.nested[f]:null},l.prototype.getEnum=function(f){if(this.nested&&Object.prototype.hasOwnProperty.call(this.nested,f)&&this.nested[f]instanceof o)return this.nested[f].values;throw Error("no such enum: "+f)},l.prototype.add=function(f){if(!(f instanceof t&&f.extend!==void 0||f instanceof r||f instanceof i||f instanceof o||f instanceof s||f instanceof l))throw TypeError("object must be a valid nested object");if(f.name==="__proto__")return this;if(!this.nested)this.nested={};else{var p=this.get(f.name);if(p)if(p instanceof l&&f instanceof l&&!(p instanceof r||p instanceof s)){for(var h=p.nestedArray,g=0;g<h.length;++g)f.add(h[g]);this.remove(p),this.nested||(this.nested={}),f.setOptions(p.options,!0)}else throw Error("duplicate name '"+f.name+"' in "+this)}this.nested[f.name]=f,this instanceof r||this instanceof s||this instanceof o||this instanceof t||f._edition||(f._edition=f._defaultEdition),this._needsRecursiveFeatureResolution=!0,this._needsRecursiveResolve=!0;for(var v=this;v=v.parent;)v._needsRecursiveFeatureResolution=!0,v._needsRecursiveResolve=!0;return f.onAdd(this),c(this)},l.prototype.remove=function(f){if(!(f instanceof e))throw TypeError("object must be a ReflectionObject");if(f.parent!==this)throw Error(f+" is not a member of "+this);return delete this.nested[f.name],Object.keys(this.nested).length||(this.nested=void 0),f.onRemove(this),c(this)},l.prototype.define=function(f,p){if(n.isString(f))f=f.split(".");else if(!Array.isArray(f))throw TypeError("illegal path");if(f&&f.length&&f[0]==="")throw Error("path must be relative");if(f.length>n.recursionLimit)throw Error("max depth exceeded");for(var h=this;f.length>0;){var g=f.shift();if(h.nested&&h.nested[g]){if(h=h.nested[g],!(h instanceof l))throw Error("path conflicts with non-namespace objects")}else h.add(h=new l(g))}return p&&h.addJSON(p),h},l.prototype.resolveAll=function(){if(!this._needsRecursiveResolve)return this;this._resolveFeaturesRecursive(this._edition);var f=this.nestedArray,p=0;for(this.resolve();p<f.length;)f[p]instanceof l?f[p++].resolveAll():f[p++].resolve();return this._needsRecursiveResolve=!1,this},l.prototype._resolveFeaturesRecursive=function(f){return this._needsRecursiveFeatureResolution?(this._needsRecursiveFeatureResolution=!1,f=this._edition||f,e.prototype._resolveFeaturesRecursive.call(this,f),this.nestedArray.forEach(p=>{p._resolveFeaturesRecursive(f)}),this):this},l.prototype.lookup=function(f,p,h){if(typeof p=="boolean"?(h=p,p=void 0):p&&!Array.isArray(p)&&(p=[p]),n.isString(f)&&f.length){if(f===".")return this.root;f=f.split(".")}else if(!f.length)return this;var g=f.join(".");if(f[0]==="")return this.root.lookup(f.slice(1),p);var v=this.root._fullyQualifiedObjects&&this.root._fullyQualifiedObjects["."+g];if(v&&(!p||p.indexOf(v.constructor)>-1)||(v=this._lookupImpl(f,g),v&&(!p||p.indexOf(v.constructor)>-1)))return v;if(h)return null;for(var E=this;E.parent;){if(v=E.parent._lookupImpl(f,g),v&&(!p||p.indexOf(v.constructor)>-1))return v;E=E.parent}return null},l.prototype._lookupImpl=function(f,p){if(Object.prototype.hasOwnProperty.call(this._lookupCache,p))return this._lookupCache[p];var h=this.get(f[0]),g=null;if(h)f.length===1?g=h:h instanceof l&&(f=f.slice(1),g=h._lookupImpl(f,f.join(".")));else for(var v=0;v<this.nestedArray.length;++v)if(this._nestedArray[v]instanceof l&&(h=this._nestedArray[v]._lookupImpl(f,p))){g=h;break}return this._lookupCache[p]=g,g},l.prototype.lookupType=function(f){var p=this.lookup(f,[r]);if(!p)throw Error("no such type: "+f);return p},l.prototype.lookupEnum=function(f){var p=this.lookup(f,[o]);if(!p)throw Error("no such Enum '"+f+"' in "+this);return p},l.prototype.lookupTypeOrEnum=function(f){var p=this.lookup(f,[r,o]);if(!p)throw Error("no such Type or Enum '"+f+"' in "+this);return p},l.prototype.lookupService=function(f){var p=this.lookup(f,[s]);if(!p)throw Error("no such Service '"+f+"' in "+this);return p},l._configure=function(d,f,p){r=d,s=f,o=p},Ji}var Zi,ma;function Xs(){if(ma)return Zi;ma=1,Zi=i;var e=bn();((i.prototype=Object.create(e.prototype)).constructor=i).className="MapField";var t=Bn(),n=tt();function i(r,s,o,a,l,c){if(e.call(this,r,s,a,void 0,void 0,l,c),!n.isString(o))throw TypeError("keyType must be a string");this.keyType=o,this.resolvedKeyType=null,this.map=!0}return i.fromJSON=function(s,o){return new i(s,o.id,o.keyType,o.type,o.options,o.comment)},i.prototype.toJSON=function(s){var o=s?!!s.keepComments:!1;return n.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",o?this.comment:void 0])},i.prototype.resolve=function(){if(this.resolved)return this;if(t.mapKey[this.keyType]===void 0)throw Error("invalid key type: "+this.keyType);return e.prototype.resolve.call(this)},i.d=function(s,o,a){return typeof a=="function"?a=n.decorateType(a).name:a&&typeof a=="object"&&(a=n.decorateEnum(a).name),function(c,d){n.decorateType(c.constructor).add(new i(d,s,o,a))}},Zi}var Xi,ga;function Ys(){if(ga)return Xi;ga=1,Xi=n;var e=vn();((n.prototype=Object.create(e.prototype)).constructor=n).className="Method";var t=tt();function n(i,r,s,o,a,l,c,d,f){if(t.isObject(a)?(c=a,a=l=void 0):t.isObject(l)&&(c=l,l=void 0),!(r===void 0||t.isString(r)))throw TypeError("type must be a string");if(!t.isString(s))throw TypeError("requestType must be a string");if(!t.isString(o))throw TypeError("responseType must be a string");e.call(this,i,c),this.type=r||"rpc",this.requestType=s,this.requestStream=a?!0:void 0,this.responseType=o,this.responseStream=l?!0:void 0,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=d,this.parsedOptions=f}return n.fromJSON=function(r,s){return new n(r,s.type,s.requestType,s.responseType,s.requestStream,s.responseStream,s.options,s.comment,s.parsedOptions)},n.prototype.toJSON=function(r){var s=r?!!r.keepComments:!1;return t.toObject(["type",this.type!=="rpc"&&this.type||void 0,"requestType",this.requestType,"requestStream",this.requestStream,"responseType",this.responseType,"responseStream",this.responseStream,"options",this.options,"comment",s?this.comment:void 0,"parsedOptions",this.parsedOptions])},n.prototype.resolve=function(){return this.resolved?this:(this.resolvedRequestType=this.parent.lookupType(this.requestType),this.resolvedResponseType=this.parent.lookupType(this.responseType),e.prototype.resolve.call(this))},Xi}var Yi,ya;function $s(){if(ya)return Yi;ya=1,Yi=r;var e=yr();((r.prototype=Object.create(e.prototype)).constructor=r).className="Service";var t=Ys(),n=tt(),i=Vl();function r(o,a){e.call(this,o,a),this.methods={},this._methodsArray=null}r.fromJSON=function(a,l,c){c=n.checkDepth(c);var d=new r(a,l.options);if(l.methods)for(var f=Object.keys(l.methods),p=0;p<f.length;++p)d.add(t.fromJSON(f[p],l.methods[f[p]]));return l.nested&&d.addJSON(l.nested,c),l.edition&&(d._edition=l.edition),d.comment=l.comment,d._defaultEdition="proto3",d},r.prototype.toJSON=function(a){var l=e.prototype.toJSON.call(this,a),c=a?!!a.keepComments:!1;return n.toObject(["edition",this._editionToJSON(),"options",l&&l.options||void 0,"methods",e.arrayToJSON(this.methodsArray,a)||{},"nested",l&&l.nested||void 0,"comment",c?this.comment:void 0])},Object.defineProperty(r.prototype,"methodsArray",{get:function(){return this._methodsArray||(this._methodsArray=n.toArray(this.methods))}});function s(o){return o._methodsArray=null,o}return r.prototype.get=function(a){return Object.prototype.hasOwnProperty.call(this.methods,a)?this.methods[a]:e.prototype.get.call(this,a)},r.prototype.resolveAll=function(){if(!this._needsRecursiveResolve)return this;e.prototype.resolve.call(this);for(var a=this.methodsArray,l=0;l<a.length;++l)a[l].resolve();return this},r.prototype._resolveFeaturesRecursive=function(a){return this._needsRecursiveFeatureResolution?(a=this._edition||a,e.prototype._resolveFeaturesRecursive.call(this,a),this.methodsArray.forEach(l=>{l._resolveFeaturesRecursive(a)}),this):this},r.prototype.add=function(a){if(this.get(a.name))throw Error("duplicate name '"+a.name+"' in "+this);return a instanceof t?a.name==="__proto__"?this:(this.methods[a.name]=a,a.parent=this,s(this)):e.prototype.add.call(this,a)},r.prototype.remove=function(a){if(a instanceof t){if(this.methods[a.name]!==a)throw Error(a+" is not a member of "+this);return delete this.methods[a.name],a.parent=null,s(this)}return e.prototype.remove.call(this,a)},r.prototype.create=function(a,l,c){for(var d=new i.Service(a,l,c),f=0,p;f<this.methodsArray.length;++f){var h=n.lcFirst((p=this._methodsArray[f]).resolve().name).replace(/[^$\w_]/g,"");d[h]=(function(g,v,E){return function(w,y){return i.Service.prototype.rpcCall.call(this,g,v,E,w,y)}})(p,p.resolvedRequestType.ctor,p.resolvedResponseType.ctor)}return d},Yi}var $i,xa;function Ks(){if(xa)return $i;xa=1,$i=t;var e=Ft();function t(n){if(n)for(var i=Object.keys(n),r=0;r<i.length;++r){var s=i[r];s!=="__proto__"&&(this[s]=n[s])}}return t.create=function(i){return this.$type.create(i)},t.encode=function(i,r){return this.$type.encode(i,r)},t.encodeDelimited=function(i,r){return this.$type.encodeDelimited(i,r)},t.decode=function(i){return this.$type.decode(i)},t.decodeDelimited=function(i){return this.$type.decodeDelimited(i)},t.verify=function(i){return this.$type.verify(i)},t.fromObject=function(i){return this.$type.fromObject(i)},t.toObject=function(i,r){return this.$type.toObject(i,r)},t.prototype.toJSON=function(){return this.$type.toObject(this,e.toJSONOptions)},$i}var Ki,ba;function Zl(){if(ba)return Ki;ba=1,Ki=r;var e=Bt(),t=Bn(),n=tt();function i(s){return"missing required '"+s.name+"'"}function r(s){for(var o=n.codegen(["r","l","e","n"],s.name+"$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("if(n===undefined)n=0")("if(n>Reader.recursionLimit)")('throw Error("maximum nesting depth exceeded")')("var c=l===undefined?r.len:r.pos+l,m=new this.ctor"+(s.fieldsArray.filter(function(p){return p.map}).length?",k,value":""))("while(r.pos<c){")("var t=r.uint32()")("if(t===e)")("break")("switch(t>>>3){"),a=0;a<s.fieldsArray.length;++a){var l=s._fieldsArray[a].resolve(),c=l.resolvedType instanceof e?"int32":l.type,d="m"+n.safeProp(l.name);o("case %i: {",l.id),l.map?(o("if(%s===util.emptyObject)",d)("%s={}",d)("var c2 = r.uint32()+r.pos"),t.defaults[l.keyType]!==void 0?o("k=%j",t.defaults[l.keyType]):o("k=null"),t.defaults[c]!==void 0?o("value=%j",t.defaults[c]):o("value=null"),o("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")("case 1: k=r.%s(); break",l.keyType)("case 2:"),t.basic[c]===void 0?o("value=types[%i].decode(r,r.uint32(),undefined,n+1)",a):o("value=r.%s()",c),o("break")("default:")("r.skipType(tag2&7,n)")("break")("}")("}"),t.long[l.keyType]!==void 0?o('%s[typeof k==="object"?util.longToHash(k):k]=value',d):(l.keyType==="string"&&o('if(k==="__proto__")')("util.makeProp(%s,k)",d),o("%s[k]=value",d))):l.repeated?(o("if(!(%s&&%s.length))",d,d)("%s=[]",d),t.packed[c]!==void 0&&o("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",d,c)("}else"),t.basic[c]===void 0?o(l.delimited?"%s.push(types[%i].decode(r,undefined,((t&~7)|4),n+1))":"%s.push(types[%i].decode(r,r.uint32(),undefined,n+1))",d,a):o("%s.push(r.%s())",d,c)):t.basic[c]===void 0?o(l.delimited?"%s=types[%i].decode(r,undefined,((t&~7)|4),n+1)":"%s=types[%i].decode(r,r.uint32(),undefined,n+1)",d,a):o("%s=r.%s()",d,c),o("break")("}")}for(o("default:")("r.skipType(t&7,n)")("break")("}")("}"),a=0;a<s._fieldsArray.length;++a){var f=s._fieldsArray[a];f.required&&o("if(!Object.hasOwnProperty.call(m,%j))",f.name)("throw util.ProtocolError(%j,{instance:m})",i(f))}return o("return m")}return Ki}var Qi,va;function Xl(){if(va)return Qi;va=1,Qi=s;var e=Bt(),t=tt();function n(o,a){return o.name+": "+a+(o.repeated&&a!=="array"?"[]":o.map&&a!=="object"?"{k:"+o.keyType+"}":"")+" expected"}function i(o,a,l,c){if(a.resolvedType)if(a.resolvedType instanceof e){o("switch(%s){",c)("default:")("return%j",n(a,"enum value"));for(var d=Object.keys(a.resolvedType.values),f=0;f<d.length;++f)o("case %i:",a.resolvedType.values[d[f]]);o("break")("}")}else o("{")("var e=types[%i].verify(%s,n+1);",l,c)("if(e)")("return%j+e",a.name+".")("}");else switch(a.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":o("if(!util.isInteger(%s))",c)("return%j",n(a,"integer"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":o("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))",c,c,c,c)("return%j",n(a,"integer|Long"));break;case"float":case"double":o('if(typeof %s!=="number")',c)("return%j",n(a,"number"));break;case"bool":o('if(typeof %s!=="boolean")',c)("return%j",n(a,"boolean"));break;case"string":o("if(!util.isString(%s))",c)("return%j",n(a,"string"));break;case"bytes":o('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',c,c,c)("return%j",n(a,"buffer"));break}return o}function r(o,a,l){switch(a.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":o("if(!util.key32Re.test(%s))",l)("return%j",n(a,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":o("if(!util.key64Re.test(%s))",l)("return%j",n(a,"integer|Long key"));break;case"bool":o("if(!util.key2Re.test(%s))",l)("return%j",n(a,"boolean key"));break}return o}function s(o){var a=t.codegen(["m","n"],o.name+"$verify")('if(typeof m!=="object"||m===null)')("return%j","object expected")("if(n===undefined)n=0")("if(n>util.recursionLimit)")("return%j","maximum nesting depth exceeded"),l=o.oneofsArray,c={};l.length&&a("var p={}");for(var d=0;d<o.fieldsArray.length;++d){var f=o._fieldsArray[d].resolve(),p="m"+t.safeProp(f.name);if(f.optional&&a("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){",p,f.name),f.map)a("if(!util.isObject(%s))",p)("return%j",n(f,"object"))("var k=Object.keys(%s)",p)("for(var i=0;i<k.length;++i){"),r(a,f,"k[i]"),i(a,f,d,p+"[k[i]]")("}");else if(f.repeated)a("if(!Array.isArray(%s))",p)("return%j",n(f,"array"))("for(var i=0;i<%s.length;++i){",p),i(a,f,d,p+"[i]")("}");else{if(f.partOf){var h=t.safeProp(f.partOf.name);c[f.partOf.name]===1&&a("if(p%s===1)",h)("return%j",f.partOf.name+": multiple values"),c[f.partOf.name]=1,a("p%s=1",h)}i(a,f,d,p)}f.optional&&a("}")}return a("return null")}return Qi}var Gi={},wa;function Yl(){return wa||(wa=1,(function(e){var t=e,n=Bt(),i=tt();function r(o,a,l,c){var d=!1;if(a.resolvedType)if(a.resolvedType instanceof n){o("switch(d%s){",c);for(var f=a.resolvedType.values,p=Object.keys(f),h=0;h<p.length;++h)f[p[h]]===a.typeDefault&&!d&&(o("default:")('if(typeof(d%s)==="number"){m%s=d%s;break}',c,c,c),a.repeated||o("break"),d=!0),o("case%j:",p[h])("case %i:",f[p[h]])("m%s=%j",c,f[p[h]])("break");o("}")}else o("if(!util.isObject(d%s))",c)("throw TypeError(%j)",a.fullName+": object expected")("m%s=types[%i].fromObject(d%s,n+1)",c,l,c);else{var g=!1;switch(a.type){case"double":case"float":o("m%s=Number(d%s)",c,c);break;case"uint32":case"fixed32":o("m%s=d%s>>>0",c,c);break;case"int32":case"sint32":case"sfixed32":o("m%s=d%s|0",c,c);break;case"uint64":case"fixed64":g=!0;case"int64":case"sint64":case"sfixed64":o("if(util.Long)")("m%s=util.Long.fromValue(d%s,%j)",c,c,g)('else if(typeof d%s==="string")',c)("m%s=parseInt(d%s,10)",c,c)('else if(typeof d%s==="number")',c)("m%s=d%s",c,c)('else if(typeof d%s==="object")',c)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)",c,c,c,g?"true":"");break;case"bytes":o('if(typeof d%s==="string")',c)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",c,c,c)("else if(d%s.length >= 0)",c)("m%s=d%s",c,c);break;case"string":o("m%s=String(d%s)",c,c);break;case"bool":o("m%s=Boolean(d%s)",c,c);break}}return o}t.fromObject=function(a){var l=a.fieldsArray,c=i.codegen(["d","n"],a.name+"$fromObject")("if(d instanceof this.ctor)")("return d");if(!l.length)return c("return new this.ctor");c("if(!util.isObject(d))")("throw TypeError(%j)",a.fullName+": object expected")("if(n===undefined)n=0")("if(n>util.recursionLimit)")('throw Error("maximum nesting depth exceeded")'),c("var m=new this.ctor");for(var d=0;d<l.length;++d){var f=l[d].resolve(),p=i.safeProp(f.name);f.map?(c("if(d%s){",p)("if(!util.isObject(d%s))",p)("throw TypeError(%j)",f.fullName+": object expected")("m%s={}",p)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",p),c('if(ks[i]==="__proto__")')("util.makeProp(m%s,ks[i])",p),r(c,f,d,p+"[ks[i]]")("}")("}")):f.repeated?(c("if(d%s){",p)("if(!Array.isArray(d%s))",p)("throw TypeError(%j)",f.fullName+": array expected")("m%s=[]",p)("for(var i=0;i<d%s.length;++i){",p),r(c,f,d,p+"[i]")("}")("}")):(f.resolvedType instanceof n||c("if(d%s!=null){",p),r(c,f,d,p),f.resolvedType instanceof n||c("}"))}return c("return m")};function s(o,a,l,c){if(a.resolvedType)a.resolvedType instanceof n?o("d%s=o.enums===String?(types[%i].values[m%s]===undefined?m%s:types[%i].values[m%s]):m%s",c,l,c,c,l,c,c):o("d%s=types[%i].toObject(m%s,o,q+1)",c,l,c);else{var d=!1;switch(a.type){case"double":case"float":o("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s",c,c,c,c);break;case"uint64":case"fixed64":d=!0;case"int64":case"sint64":case"sfixed64":o('if(typeof BigInt!=="undefined"&&o.longs===BigInt)')('d%s=typeof m%s==="number"?BigInt(m%s):util.Long.fromBits(m%s.low>>>0,m%s.high>>>0,%j).toBigInt()',c,c,c,c,c,d)('else if(typeof m%s==="number")',c)("d%s=o.longs===String?String(m%s):m%s",c,c,c)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s",c,c,c,c,d?"true":"",c);break;case"bytes":o("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s",c,c,c,c,c);break;default:o("d%s=m%s",c,c);break}}return o}t.toObject=function(a){var l=a.fieldsArray.slice().sort(i.compareFieldsById);if(!l.length)return i.codegen()("return {}");for(var c=i.codegen(["m","o","q"],a.name+"$toObject")("if(!o)")("o={}")("if(q===undefined)q=0")("if(q>util.recursionLimit)")('throw Error("max depth exceeded")')("var d={}"),d=[],f=[],p=[],h=0;h<l.length;++h)l[h].partOf||(l[h].resolve().repeated?d:l[h].map?f:p).push(l[h]);if(d.length){for(c("if(o.arrays||o.defaults){"),h=0;h<d.length;++h)c("d%s=[]",i.safeProp(d[h].name));c("}")}if(f.length){for(c("if(o.objects||o.defaults){"),h=0;h<f.length;++h)c("d%s={}",i.safeProp(f[h].name));c("}")}if(p.length){for(c("if(o.defaults){"),h=0;h<p.length;++h){var g=p[h],v=i.safeProp(g.name);if(g.resolvedType instanceof n)c("d%s=o.enums===String?%j:%j",v,g.resolvedType.valuesById[g.typeDefault],g.typeDefault);else if(g.long)c("if(util.Long){")("var n=new util.Long(%i,%i,%j)",g.typeDefault.low,g.typeDefault.high,g.typeDefault.unsigned)('d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():typeof BigInt!=="undefined"&&o.longs===BigInt?n.toBigInt():n',v)("}else")('d%s=o.longs===String?%j:typeof BigInt!=="undefined"&&o.longs===BigInt?BigInt(%j):%i',v,g.typeDefault.toString(),g.typeDefault.toString(),g.typeDefault.toNumber());else if(g.bytes){var E=Array.prototype.slice.call(g.typeDefault);c("if(o.bytes===String)d%s=%j",v,String.fromCharCode.apply(String,g.typeDefault))("else{")("d%s=%j",v,E)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)",v,v)("}")}else c("d%s=%j",v,g.typeDefault)}c("}")}var _=!1;for(h=0;h<l.length;++h){var g=l[h],w=a._fieldsArray.indexOf(g),v=i.safeProp(g.name);g.map?(_||(_=!0,c("var ks2")),c("if(m%s&&(ks2=Object.keys(m%s)).length){",v,v)("d%s={}",v)("for(var j=0;j<ks2.length;++j){"),c('if(ks2[j]==="__proto__")')("util.makeProp(d%s,ks2[j])",v),s(c,g,w,v+"[ks2[j]]")("}")):g.repeated?(c("if(m%s&&m%s.length){",v,v)("d%s=[]",v)("for(var j=0;j<m%s.length;++j){",v),s(c,g,w,v+"[j]")("}")):(c("if(m%s!=null&&Object.hasOwnProperty.call(m,%j)){",v,g.name),s(c,g,w,v),g.partOf&&c("if(o.oneofs)")("d%s=%j",i.safeProp(g.partOf.name),g.name)),c("}")}return c("return d")}})(Gi)),Gi}var es={},_a;function $l(){return _a||(_a=1,(function(e){var t=e,n=Ks(),i=Ft();t[".google.protobuf.Any"]={fromObject:function(r,s){if(r&&r["@type"]){var o=r["@type"].substring(r["@type"].lastIndexOf("/")+1),a=this.lookup(o);if(a){var l=r["@type"].charAt(0)==="."?r["@type"].slice(1):r["@type"];return l.indexOf("/")===-1&&(l="/"+l),this.create({type_url:l,value:a.encode(a.fromObject(r,s===void 0?1:s+1)).finish()})}}return this.fromObject(r,s)},toObject:function(r,s,o){if(o===void 0&&(o=0),o>i.recursionLimit)throw Error("max depth exceeded");var a="type.googleapis.com/",l="",c="";if(s&&s.json&&r.type_url&&r.value){c=r.type_url.substring(r.type_url.lastIndexOf("/")+1),l=r.type_url.substring(0,r.type_url.lastIndexOf("/")+1);var d=this.lookup(c);d&&(r=d.decode(r.value,void 0,void 0,o+1))}if(!(r instanceof this.ctor)&&r instanceof n){var f=r.$type.toObject(r,s,o+1),p=r.$type.fullName[0]==="."?r.$type.fullName.slice(1):r.$type.fullName;return l===""&&(l=a),c=l+p,f["@type"]=c,f}return this.toObject(r,s,o)}}})(es)),es}var ts,Ea;function Qs(){if(Ea)return ts;Ea=1,ts=v;var e=yr();((v.prototype=Object.create(e.prototype)).constructor=v).className="Type";var t=Bt(),n=zn(),i=bn(),r=Xs(),s=$s(),o=Ks(),a=Zs(),l=Js(),c=tt(),d=Kl(),f=Zl(),p=Xl(),h=Yl(),g=$l();function v(_,w){_=_.replace(/\W/g,""),e.call(this,_,w),this.fields={},this.oneofs=void 0,this.extensions=void 0,this.reserved=void 0,this.group=void 0,this._fieldsById=null,this._fieldsArray=null,this._oneofsArray=null,this._ctor=null}Object.defineProperties(v.prototype,{fieldsById:{get:function(){if(this._fieldsById)return this._fieldsById;this._fieldsById={};for(var _=Object.keys(this.fields),w=0;w<_.length;++w){var y=this.fields[_[w]],O=y.id;if(this._fieldsById[O])throw Error("duplicate id "+O+" in "+this);this._fieldsById[O]=y}return this._fieldsById}},fieldsArray:{get:function(){return this._fieldsArray||(this._fieldsArray=c.toArray(this.fields))}},oneofsArray:{get:function(){return this._oneofsArray||(this._oneofsArray=c.toArray(this.oneofs))}},ctor:{get:function(){return this._ctor||(this.ctor=v.generateConstructor(this)())},set:function(_){var w=_.prototype;w instanceof o||((_.prototype=new o).constructor=_,c.merge(_.prototype,w)),_.$type=_.prototype.$type=this,c.merge(_,o,!0),this._ctor=_;for(var y=0;y<this.fieldsArray.length;++y)this._fieldsArray[y].resolve();var O={};for(y=0;y<this.oneofsArray.length;++y)O[this._oneofsArray[y].resolve().name]={get:c.oneOfGetter(this._oneofsArray[y].oneof),set:c.oneOfSetter(this._oneofsArray[y].oneof)};y&&Object.defineProperties(_.prototype,O)}}}),v.generateConstructor=function(w){for(var y=c.codegen(["p"],w.name),O=0,I;O<w.fieldsArray.length;++O)(I=w._fieldsArray[O]).map?y("this%s={}",c.safeProp(I.name)):I.repeated&&y("this%s=[]",c.safeProp(I.name));return y('if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null&&ks[i]!=="__proto__")')("this[ks[i]]=p[ks[i]]")};function E(_){return _._fieldsById=_._fieldsArray=_._oneofsArray=null,delete _.encode,delete _.decode,delete _.verify,_}return v.fromJSON=function(w,y,O){if(O===void 0&&(O=0),O>c.nestingLimit)throw Error("max depth exceeded");var I=new v(w,y.options);I.extensions=y.extensions,I.reserved=y.reserved;for(var j=Object.keys(y.fields),M=0;M<j.length;++M)I.add((typeof y.fields[j[M]].keyType<"u"?r.fromJSON:i.fromJSON)(j[M],y.fields[j[M]]));if(y.oneofs)for(j=Object.keys(y.oneofs),M=0;M<j.length;++M)I.add(n.fromJSON(j[M],y.oneofs[j[M]]));if(y.nested)for(j=Object.keys(y.nested),M=0;M<j.length;++M){var ee=y.nested[j[M]];I.add((ee.id!==void 0?i.fromJSON:ee.fields!==void 0?v.fromJSON:ee.values!==void 0?t.fromJSON:ee.methods!==void 0?s.fromJSON:e.fromJSON)(j[M],ee,O+1))}return y.extensions&&y.extensions.length&&(I.extensions=y.extensions),y.reserved&&y.reserved.length&&(I.reserved=y.reserved),y.group&&(I.group=!0),y.comment&&(I.comment=y.comment),y.edition&&(I._edition=y.edition),I._defaultEdition="proto3",I},v.prototype.toJSON=function(w){var y=e.prototype.toJSON.call(this,w),O=w?!!w.keepComments:!1;return c.toObject(["edition",this._editionToJSON(),"options",y&&y.options||void 0,"oneofs",e.arrayToJSON(this.oneofsArray,w),"fields",e.arrayToJSON(this.fieldsArray.filter(function(I){return!I.declaringField}),w)||{},"extensions",this.extensions&&this.extensions.length?this.extensions:void 0,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"group",this.group||void 0,"nested",y&&y.nested||void 0,"comment",O?this.comment:void 0])},v.prototype.resolveAll=function(){if(!this._needsRecursiveResolve)return this;e.prototype.resolveAll.call(this);var w=this.oneofsArray;for(O=0;O<w.length;)w[O++].resolve();for(var y=this.fieldsArray,O=0;O<y.length;)y[O++].resolve();return this},v.prototype._resolveFeaturesRecursive=function(w){return this._needsRecursiveFeatureResolution?(w=this._edition||w,e.prototype._resolveFeaturesRecursive.call(this,w),this.oneofsArray.forEach(y=>{y._resolveFeatures(w)}),this.fieldsArray.forEach(y=>{y._resolveFeatures(w)}),this):this},v.prototype.get=function(w){return Object.prototype.hasOwnProperty.call(this.fields,w)?this.fields[w]:this.oneofs&&Object.prototype.hasOwnProperty.call(this.oneofs,w)?this.oneofs[w]:this.nested&&Object.prototype.hasOwnProperty.call(this.nested,w)?this.nested[w]:null},v.prototype.add=function(w){if(this.get(w.name))throw Error("duplicate name '"+w.name+"' in "+this);if(w instanceof i&&w.extend===void 0){if(this._fieldsById?this._fieldsById[w.id]:this.fieldsById[w.id])throw Error("duplicate id "+w.id+" in "+this);if(this.isReservedId(w.id))throw Error("id "+w.id+" is reserved in "+this);if(this.isReservedName(w.name)||w.name.charAt(0)==="$")throw Error("name '"+w.name+"' is reserved in "+this);return w.name==="__proto__"?this:(w.parent&&w.parent.remove(w),this.fields[w.name]=w,w.message=this,w.onAdd(this),E(this))}if(w instanceof n){if(w.name.charAt(0)==="$")throw Error("name '"+w.name+"' is reserved in "+this);return w.name==="__proto__"?this:(this.oneofs||(this.oneofs={}),this.oneofs[w.name]=w,w.onAdd(this),E(this))}return e.prototype.add.call(this,w)},v.prototype.remove=function(w){if(w instanceof i&&w.extend===void 0){if(!this.fields||this.fields[w.name]!==w)throw Error(w+" is not a member of "+this);return delete this.fields[w.name],w.parent=null,w.onRemove(this),E(this)}if(w instanceof n){if(!this.oneofs||this.oneofs[w.name]!==w)throw Error(w+" is not a member of "+this);return delete this.oneofs[w.name],w.parent=null,w.onRemove(this),E(this)}return e.prototype.remove.call(this,w)},v.prototype.isReservedId=function(w){return e.isReservedId(this.reserved,w)},v.prototype.isReservedName=function(w){return e.isReservedName(this.reserved,w)},v.prototype.create=function(w){return new this.ctor(w)},v.prototype.setup=function(){for(var w=this.fullName,y=[],O=0;O<this.fieldsArray.length;++O)y.push(this._fieldsArray[O].resolve().resolvedType);this.encode=d(this)({Writer:l,types:y,util:c}),this.decode=f(this)({Reader:a,types:y,util:c}),this.verify=p(this)({types:y,util:c}),this.fromObject=h.fromObject(this)({types:y,util:c}),this.toObject=h.toObject(this)({types:y,util:c});var I=g[w];if(I){var j=Object.create(this);j.fromObject=this.fromObject,this.fromObject=I.fromObject.bind(j),j.toObject=this.toObject,this.toObject=I.toObject.bind(j)}return this},v.prototype.encode=function(w,y){return this.setup().encode.apply(this,arguments)},v.prototype.encodeDelimited=function(w,y){return this.encode(w,y&&y.len?y.fork():y).ldelim()},v.prototype.decode=function(w,y,O,I){return this.setup().decode(w,y,O,I)},v.prototype.decodeDelimited=function(w){return w instanceof a||(w=a.create(w)),this.decode(w,w.uint32())},v.prototype.verify=function(w,y){return this.setup().verify(w,y)},v.prototype.fromObject=function(w,y){return this.setup().fromObject(w,y)},v.prototype.toObject=function(w,y){return this.setup().toObject.apply(this,arguments)},v.d=function(w){return function(O){c.decorateType(O,w)}},ts}var ns,ka;function Gs(){if(ka)return ns;ka=1,ns=l;var e=yr();((l.prototype=Object.create(e.prototype)).constructor=l).className="Root";var t=bn(),n=Bt(),i=zn(),r=tt(),s,o,a;function l(p){e.call(this,"",p),this.deferred=[],this.files=[],this._edition="proto2",this._fullyQualifiedObjects={}}l.fromJSON=function(h,g,v){return v=r.checkDepth(v),g||(g=new l),h.options&&g.setOptions(h.options),g.addJSON(h.nested,v).resolveAll()},l.prototype.resolvePath=r.path.resolve,l.prototype.fetch=r.fetch;function c(){}l.prototype.load=function p(h,g,v){typeof g=="function"&&(v=g,g=void 0);var E=this;if(!v)return r.asPromise(p,E,h,g);var _=v===c;function w(q,Y){if(v){if(_)throw q;Y&&Y.resolveAll();var U=v;v=null,U(q,Y)}}function y(q){var Y=q.lastIndexOf("google/protobuf/");if(Y>-1){var U=q.substring(Y);if(U in a)return U}return null}function O(q,Y,U){U===void 0&&(U=0);try{if(U>r.recursionLimit)throw Error("max depth exceeded");if(r.isString(Y)&&Y.charAt(0)==="{"&&(Y=JSON.parse(Y)),!r.isString(Y))E.setOptions(Y.options).addJSON(Y.nested);else{o.filename=q;var pe=o(Y,E,g),R,k=0;if(pe.imports)for(;k<pe.imports.length;++k)(R=y(pe.imports[k])||E.resolvePath(q,pe.imports[k]))&&I(R,!1,U+1);if(pe.weakImports)for(k=0;k<pe.weakImports.length;++k)(R=y(pe.weakImports[k])||E.resolvePath(q,pe.weakImports[k]))&&I(R,!0,U+1)}}catch(m){w(m)}!_&&!j&&w(null,E)}function I(q,Y,U){if(U===void 0&&(U=0),q=y(q)||q,!(E.files.indexOf(q)>-1)){if(E.files.push(q),q in a){_?O(q,a[q],U):(++j,setTimeout(function(){--j,O(q,a[q],U)}));return}if(_){var pe;try{pe=r.fs.readFileSync(q).toString("utf8")}catch(R){Y||w(R);return}O(q,pe,U)}else++j,E.fetch(q,function(R,k){if(--j,!!v){if(R){Y?j||w(null,E):w(R);return}O(q,k,U)}})}}var j=0;r.isString(h)&&(h=[h]);for(var M=0,ee;M<h.length;++M)(ee=E.resolvePath("",h[M]))&&I(ee);return _?(E.resolveAll(),E):(j||w(null,E),E)},l.prototype.loadSync=function(h,g){if(!r.isNode)throw Error("not supported");return this.load(h,g,c)},l.prototype.resolveAll=function(){if(!this._needsRecursiveResolve)return this;if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map(function(h){return"'extend "+h.extend+"' in "+h.parent.fullName}).join(", "));return e.prototype.resolveAll.call(this)};var d=/^[A-Z]/;function f(p,h){var g=h.parent.lookup(h.extend);if(g){var v=new t(h.fullName,h.id,h.type,h.rule,void 0,h.options);return g.get(v.name)||(v.declaringField=h,h.extensionField=v,g.add(v)),!0}return!1}return l.prototype._handleAdd=function(h){if(h instanceof t)h.extend!==void 0&&!h.extensionField&&(f(this,h)||this.deferred.push(h));else if(h instanceof n)d.test(h.name)&&(h.parent[h.name]=h.values);else if(!(h instanceof i)){if(h instanceof s)for(var g=0;g<this.deferred.length;)f(this,this.deferred[g])?this.deferred.splice(g,1):++g;for(var v=0;v<h.nestedArray.length;++v)this._handleAdd(h._nestedArray[v]);d.test(h.name)&&(h.parent[h.name]=h)}(h instanceof s||h instanceof n||h instanceof t)&&(this._fullyQualifiedObjects[h.fullName]=h)},l.prototype._handleRemove=function(h){if(h instanceof t){if(h.extend!==void 0)if(h.extensionField)h.extensionField.parent.remove(h.extensionField),h.extensionField=null;else{var g=this.deferred.indexOf(h);g>-1&&this.deferred.splice(g,1)}}else if(h instanceof n)d.test(h.name)&&delete h.parent[h.name];else if(h instanceof e){for(var v=0;v<h.nestedArray.length;++v)this._handleRemove(h._nestedArray[v]);d.test(h.name)&&delete h.parent[h.name]}delete this._fullyQualifiedObjects[h.fullName]},l._configure=function(p,h,g){s=p,o=h,a=g},ns}var Oa;function tt(){if(Oa)return Bi.exports;Oa=1;var e=Bi.exports=Ft(),t=Wl(),n,i;e.codegen=rd(),e.fetch=ad(),e.path=ld(),e.patterns=cd();var r=e.patterns.reservedRe;e.fs=ud(),e.checkDepth=function(l){if(l===void 0&&(l=0),l>e.recursionLimit)throw Error("max depth exceeded");return l},e.toArray=function(l){if(l){for(var c=Object.keys(l),d=new Array(c.length),f=0;f<c.length;)d[f]=l[c[f++]];return d}return[]},e.toObject=function(l){for(var c={},d=0;d<l.length;){var f=l[d++],p=l[d++];p!==void 0&&(c[f]=p)}return c},e.isReserved=function(l){return r.test(l)},e.safeProp=function(l){return!/^[$\w_]+$/.test(l)||r.test(l)?"["+JSON.stringify(l)+"]":"."+l},e.ucFirst=function(l){return l.charAt(0).toUpperCase()+l.substring(1)};var s=/_([a-z])/g;e.camelCase=function(l){return l.substring(0,1)+l.substring(1).replace(s,function(c,d){return d.toUpperCase()})},e.compareFieldsById=function(l,c){return l.id-c.id},e.decorateType=function(l,c){if(l.$type)return c&&l.$type.name!==c&&(e.decorateRoot.remove(l.$type),l.$type.name=c,e.decorateRoot.add(l.$type)),l.$type;n||(n=Qs());var d=new n(c||l.name);return e.decorateRoot.add(d),d.ctor=l,Object.defineProperty(l,"$type",{value:d,enumerable:!1}),Object.defineProperty(l.prototype,"$type",{value:d,enumerable:!1}),d};var o=0;return e.decorateEnum=function(l){if(l.$type)return l.$type;i||(i=Bt());var c=new i("Enum"+o++,l);return e.decorateRoot.add(c),Object.defineProperty(l,"$type",{value:c,enumerable:!1}),c},e.setProperty=function(l,c,d,f){function p(h,g,v){var E=g.shift();if(e.isUnsafeProperty(E))return h;if(g.length>0)h[E]=p(h[E]||{},g,v);else{var _=h[E];if(_&&f)return h;_&&(v=[].concat(_).concat(v)),h[E]=v}return h}if(typeof l!="object")throw TypeError("dst must be an object");if(!c)throw TypeError("path must be specified");if(c=c.split("."),c.length>e.recursionLimit)throw Error("max depth exceeded");return p(l,c,d)},Object.defineProperty(e,"decorateRoot",{get:function(){return t.decorated||(t.decorated=new(Gs()))}}),Bi.exports}var Ta;function Bn(){return Ta||(Ta=1,(function(e){var t=e,n=tt(),i=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];function r(s,o){var a=0,l=Object.create(null);for(o|=0;a<s.length;)l[i[a+o]]=s[a++];return l}t.basic=r([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),t.defaults=r([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",n.emptyArray,null]),t.long=r([0,0,0,1,1],7),t.mapKey=r([0,0,0,5,5,0,0,0,1,1,0,2],2),t.packed=r([1,5,0,0,0,5,5,0,0,0,1,1,0])})(Fi)),Fi}var rs,Aa;function bn(){if(Aa)return rs;Aa=1,rs=o;var e=vn();((o.prototype=Object.create(e.prototype)).constructor=o).className="Field";var t=Bt(),n=Bn(),i=tt(),r,s=/^required|optional|repeated$/;o.fromJSON=function(l,c){var d=new o(l,c.id,c.type,c.rule,c.extend,c.options,c.comment);return c.edition&&(d._edition=c.edition),d._defaultEdition="proto3",d};function o(a,l,c,d,f,p,h){if(i.isObject(d)?(h=f,p=d,d=f=void 0):i.isObject(f)&&(h=p,p=f,f=void 0),e.call(this,a,p),!i.isInteger(l)||l<0)throw TypeError("id must be a non-negative integer");if(!i.isString(c))throw TypeError("type must be a string");if(d!==void 0&&!s.test(d=d.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(f!==void 0&&!i.isString(f))throw TypeError("extend must be a string");d==="proto3_optional"&&(d="optional"),this.rule=d&&d!=="optional"?d:void 0,this.type=c,this.id=l,this.extend=f||void 0,this.repeated=d==="repeated",this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=i.Long?n.long[c]!==void 0:!1,this.bytes=c==="bytes",this.resolvedType=null,this.extensionField=null,this.declaringField=null,this.comment=h}return Object.defineProperty(o.prototype,"required",{get:function(){return this._features.field_presence==="LEGACY_REQUIRED"}}),Object.defineProperty(o.prototype,"optional",{get:function(){return!this.required}}),Object.defineProperty(o.prototype,"delimited",{get:function(){return this.resolvedType instanceof r&&this._features.message_encoding==="DELIMITED"}}),Object.defineProperty(o.prototype,"packed",{get:function(){return this._features.repeated_field_encoding==="PACKED"}}),Object.defineProperty(o.prototype,"hasPresence",{get:function(){return this.repeated||this.map?!1:this.partOf||this.declaringField||this.extensionField||this._features.field_presence!=="IMPLICIT"}}),o.prototype.setOption=function(l,c,d){return e.prototype.setOption.call(this,l,c,d)},o.prototype.toJSON=function(l){var c=l?!!l.keepComments:!1;return i.toObject(["edition",this._editionToJSON(),"rule",this.rule!=="optional"&&this.rule||void 0,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",c?this.comment:void 0])},o.prototype.resolve=function(){if(this.resolved)return this;if((this.typeDefault=n.defaults[this.type])===void 0?(this.resolvedType=(this.declaringField?this.declaringField.parent:this.parent).lookupTypeOrEnum(this.type),this.resolvedType instanceof r?this.typeDefault=null:this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]):this.options&&this.options.proto3_optional&&(this.typeDefault=null),this.options&&this.options.default!=null&&(this.typeDefault=this.options.default,this.resolvedType instanceof t&&typeof this.typeDefault=="string"&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.options&&(this.options.packed!==void 0&&this.resolvedType&&!(this.resolvedType instanceof t)&&delete this.options.packed,Object.keys(this.options).length||(this.options=void 0)),this.long)this.typeDefault=i.Long.fromNumber(this.typeDefault,this.type==="uint64"||this.type==="fixed64"),Object.freeze&&Object.freeze(this.typeDefault);else if(this.bytes&&typeof this.typeDefault=="string"){var l;i.base64.test(this.typeDefault)?i.base64.decode(this.typeDefault,l=i.newBuffer(i.base64.length(this.typeDefault)),0):i.utf8.write(this.typeDefault,l=i.newBuffer(i.utf8.length(this.typeDefault)),0),this.typeDefault=l}return this.map?this.defaultValue=i.emptyObject:this.repeated?this.defaultValue=i.emptyArray:this.defaultValue=this.typeDefault,this.parent instanceof r&&(this.parent.ctor.prototype[this.name]=this.defaultValue),e.prototype.resolve.call(this)},o.prototype._inferLegacyProtoFeatures=function(l){if(l!=="proto2"&&l!=="proto3")return{};var c={};if(this.rule==="required"&&(c.field_presence="LEGACY_REQUIRED"),this.parent&&n.defaults[this.type]===void 0){var d=this.parent.get(this.type.split(".").pop());d&&d instanceof r&&d.group&&(c.message_encoding="DELIMITED")}return this.getOption("packed")===!0?c.repeated_field_encoding="PACKED":this.getOption("packed")===!1&&(c.repeated_field_encoding="EXPANDED"),c},o.prototype._resolveFeatures=function(l){return e.prototype._resolveFeatures.call(this,this._edition||l)},o.d=function(l,c,d,f){return typeof c=="function"?c=i.decorateType(c).name:c&&typeof c=="object"&&(c=i.decorateEnum(c).name),function(h,g){i.decorateType(h.constructor).add(new o(g,l,c,d,{default:f}))}},o._configure=function(l){r=l},rs}var is,Na;function zn(){if(Na)return is;Na=1,is=i;var e=vn();((i.prototype=Object.create(e.prototype)).constructor=i).className="OneOf";var t=bn(),n=tt();function i(s,o,a,l){if(Array.isArray(o)||(a=o,o=void 0),e.call(this,s,a),!(o===void 0||Array.isArray(o)))throw TypeError("fieldNames must be an Array");this.oneof=o||[],this.fieldsArray=[],this.comment=l}i.fromJSON=function(o,a){return new i(o,a.oneof,a.options,a.comment)},i.prototype.toJSON=function(o){var a=o?!!o.keepComments:!1;return n.toObject(["options",this.options,"oneof",this.oneof,"comment",a?this.comment:void 0])};function r(s){if(s.parent)for(var o=0;o<s.fieldsArray.length;++o)s.fieldsArray[o].parent||s.parent.add(s.fieldsArray[o])}return i.prototype.add=function(o){if(!(o instanceof t))throw TypeError("field must be a Field");return o.parent&&o.parent!==this.parent&&o.parent.remove(o),this.oneof.push(o.name),this.fieldsArray.push(o),o.partOf=this,r(this),this},i.prototype.remove=function(o){if(!(o instanceof t))throw TypeError("field must be a Field");var a=this.fieldsArray.indexOf(o);if(a<0)throw Error(o+" is not a member of "+this);return this.fieldsArray.splice(a,1),a=this.oneof.indexOf(o.name),a>-1&&this.oneof.splice(a,1),o.partOf=null,this},i.prototype.onAdd=function(o){e.prototype.onAdd.call(this,o);for(var a=this,l=0;l<this.oneof.length;++l){var c=o.get(this.oneof[l]);c&&!c.partOf&&(c.partOf=a,a.fieldsArray.push(c))}r(this)},i.prototype.onRemove=function(o){for(var a=0,l;a<this.fieldsArray.length;++a)(l=this.fieldsArray[a]).parent&&l.parent.remove(l);e.prototype.onRemove.call(this,o)},Object.defineProperty(i.prototype,"isProto3Optional",{get:function(){if(this.fieldsArray==null||this.fieldsArray.length!==1)return!1;var s=this.fieldsArray[0];return s.options!=null&&s.options.proto3_optional===!0}}),i.d=function(){for(var o=new Array(arguments.length),a=0;a<arguments.length;)o[a]=arguments[a++];return function(c,d){n.decorateType(c.constructor).add(new i(d,o)),Object.defineProperty(c,d,{get:n.oneOfGetter(o),set:n.oneOfSetter(o)})}},is}var ss,ja;function vn(){if(ja)return ss;ja=1,ss=o,o.className="ReflectionObject";const e=zn();var t=tt(),n,i={enum_type:"OPEN",field_presence:"EXPLICIT",json_format:"ALLOW",message_encoding:"LENGTH_PREFIXED",repeated_field_encoding:"PACKED",utf8_validation:"VERIFY"},r={enum_type:"CLOSED",field_presence:"EXPLICIT",json_format:"LEGACY_BEST_EFFORT",message_encoding:"LENGTH_PREFIXED",repeated_field_encoding:"EXPANDED",utf8_validation:"NONE"},s={enum_type:"OPEN",field_presence:"IMPLICIT",json_format:"ALLOW",message_encoding:"LENGTH_PREFIXED",repeated_field_encoding:"PACKED",utf8_validation:"VERIFY"};function o(a,l){if(!t.isString(a))throw TypeError("name must be a string");if(l&&!t.isObject(l))throw TypeError("options must be an object");this.options=l,this.parsedOptions=null,this.name=a,this._edition=null,this._defaultEdition="proto2",this._features={},this._featuresResolved=!1,this.parent=null,this.resolved=!1,this.comment=null,this.filename=null}return Object.defineProperties(o.prototype,{root:{get:function(){for(var a=this;a.parent!==null;)a=a.parent;return a}},fullName:{get:function(){for(var a=[this.name],l=this.parent;l;)a.unshift(l.name),l=l.parent;return a.join(".")}}}),o.prototype.toJSON=function(){throw Error()},o.prototype.onAdd=function(l){this.parent&&this.parent!==l&&this.parent.remove(this),this.parent=l,this.resolved=!1;var c=l.root;c instanceof n&&c._handleAdd(this)},o.prototype.onRemove=function(l){var c=l.root;c instanceof n&&c._handleRemove(this),this.parent=null,this.resolved=!1},o.prototype.resolve=function(){return this.resolved?this:(this.root instanceof n&&(this.resolved=!0),this)},o.prototype._resolveFeaturesRecursive=function(l){return this._resolveFeatures(this._edition||l)},o.prototype._resolveFeatures=function(l){if(!this._featuresResolved){var c={};if(!l)throw new Error("Unknown edition for "+this.fullName);var d=t.merge({},this.options&&this.options.features,this._inferLegacyProtoFeatures(l));if(this._edition){if(l==="proto2")c=Object.assign({},r);else if(l==="proto3")c=Object.assign({},s);else if(l==="2023")c=Object.assign({},i);else throw new Error("Unknown edition: "+l);this._features=t.merge(c,d),this._featuresResolved=!0;return}if(this.partOf instanceof e){var f=t.merge({},this.partOf._features);this._features=t.merge(f,d)}else if(!this.declaringField)if(this.parent){var p=t.merge({},this.parent._features);this._features=t.merge(p,d)}else throw new Error("Unable to find a parent for "+this.fullName);this.extensionField&&(this.extensionField._features=this._features),this._featuresResolved=!0}},o.prototype._inferLegacyProtoFeatures=function(){return{}},o.prototype.getOption=function(l){if(this.options)return this.options[l]},o.prototype.setOption=function(l,c,d){return l==="__proto__"?this:(this.options||(this.options={}),/^features\./.test(l)?t.setProperty(this.options,l,c,d):(!d||this.options[l]===void 0)&&(this.getOption(l)!==c&&(this.resolved=!1),this.options[l]=c),this)},o.prototype.setParsedOption=function(l,c,d){if(l==="__proto__")return this;this.parsedOptions||(this.parsedOptions=[]);var f=this.parsedOptions;if(d){var p=f.find(function(v){return Object.prototype.hasOwnProperty.call(v,l)});if(p){var h=p[l];t.setProperty(h,d,c)}else p={},p[l]=t.setProperty({},d,c),f.push(p)}else{var g={};g[l]=c,f.push(g)}return this},o.prototype.setOptions=function(l,c){if(l)for(var d=Object.keys(l),f=0;f<d.length;++f)this.setOption(d[f],l[d[f]],c);return this},o.prototype.toString=function(){var l=this.constructor.className,c=this.fullName;return c.length?l+" "+c:l},o.prototype._editionToJSON=function(){if(!(!this._edition||this._edition==="proto3"))return this._edition},o._configure=function(a){n=a},ss}var os,Sa;function Bt(){if(Sa)return os;Sa=1,os=i;var e=vn();((i.prototype=Object.create(e.prototype)).constructor=i).className="Enum";var t=yr(),n=tt();function i(r,s,o,a,l,c){if(e.call(this,r,o),s&&typeof s!="object")throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comment=a,this.comments=l||{},this.valuesOptions=c,this._valuesFeatures={},this.reserved=void 0,s)for(var d=Object.keys(s),f=0;f<d.length;++f)d[f]!=="__proto__"&&typeof s[d[f]]=="number"&&(this.valuesById[this.values[d[f]]=s[d[f]]]=d[f])}return i.prototype._resolveFeatures=function(s){return s=this._edition||s,e.prototype._resolveFeatures.call(this,s),Object.keys(this.values).forEach(o=>{var a=n.merge({},this._features);this._valuesFeatures[o]=n.merge(a,this.valuesOptions&&this.valuesOptions[o]&&this.valuesOptions[o].features||{})}),this},i.fromJSON=function(s,o){var a=new i(s,o.values,o.options,o.comment,o.comments);return a.reserved=o.reserved,o.edition&&(a._edition=o.edition),a._defaultEdition="proto3",a},i.prototype.toJSON=function(s){var o=s?!!s.keepComments:!1;return n.toObject(["edition",this._editionToJSON(),"options",this.options,"valuesOptions",this.valuesOptions,"values",this.values,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"comment",o?this.comment:void 0,"comments",o?this.comments:void 0])},i.prototype.add=function(s,o,a,l){if(!n.isString(s))throw TypeError("name must be a string");if(!n.isInteger(o))throw TypeError("id must be an integer");if(s==="__proto__")return this;if(this.values[s]!==void 0)throw Error("duplicate name '"+s+"' in "+this);if(this.isReservedId(o))throw Error("id "+o+" is reserved in "+this);if(this.isReservedName(s))throw Error("name '"+s+"' is reserved in "+this);if(this.valuesById[o]!==void 0){if(!(this.options&&this.options.allow_alias))throw Error("duplicate id "+o+" in "+this);this.values[s]=o}else this.valuesById[this.values[s]=o]=s;return l&&(this.valuesOptions===void 0&&(this.valuesOptions={}),this.valuesOptions[s]=l||null),this.comments[s]=a||null,this},i.prototype.remove=function(s){if(!n.isString(s))throw TypeError("name must be a string");var o=this.values[s];if(o==null)throw Error("name '"+s+"' does not exist in "+this);return delete this.valuesById[o],delete this.values[s],delete this.comments[s],this.valuesOptions&&delete this.valuesOptions[s],this},i.prototype.isReservedId=function(s){return t.isReservedId(this.reserved,s)},i.prototype.isReservedName=function(s){return t.isReservedName(this.reserved,s)},os}var as,Ra;function Kl(){if(Ra)return as;Ra=1,as=r;var e=Bt(),t=Bn(),n=tt();function i(s,o,a,l){return o.delimited?s("types[%i].encode(%s,w.uint32(%i),q+1).uint32(%i)",a,l,(o.id<<3|3)>>>0,(o.id<<3|4)>>>0):s("types[%i].encode(%s,w.uint32(%i).fork(),q+1).ldelim()",a,l,(o.id<<3|2)>>>0)}function r(s){for(var o=n.codegen(["m","w","q"],s.name+"$encode")("if(!w)")("w=Writer.create()")("if(q===undefined)q=0")("if(q>util.recursionLimit)")('throw Error("max depth exceeded")'),a,l,c=s.fieldsArray.slice().sort(n.compareFieldsById),a=0;a<c.length;++a){var d=c[a].resolve(),f=s._fieldsArray.indexOf(d),p=d.resolvedType instanceof e?"int32":d.type,h=t.basic[p];l="m"+n.safeProp(d.name),d.map?(o("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){",l,d.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",l)("w.uint32(%i).fork().uint32(%i).%s(ks[i])",(d.id<<3|2)>>>0,8|t.mapKey[d.keyType],d.keyType),h===void 0?o("types[%i].encode(%s[ks[i]],w.uint32(18).fork(),q+1).ldelim().ldelim()",f,l):o(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|h,p,l),o("}")("}")):d.repeated?(o("if(%s!=null&&%s.length){",l,l),d.packed&&t.packed[p]!==void 0?o("w.uint32(%i).fork()",(d.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",l)("w.%s(%s[i])",p,l)("w.ldelim()"):(o("for(var i=0;i<%s.length;++i)",l),h===void 0?i(o,d,f,l+"[i]"):o("w.uint32(%i).%s(%s[i])",(d.id<<3|h)>>>0,p,l)),o("}")):(d.optional&&o("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",l,d.name),h===void 0?i(o,d,f,l):o("w.uint32(%i).%s(%s)",(d.id<<3|h)>>>0,p,l))}return o("return w")}return as}var Ia;function fd(){if(Ia)return _i.exports;Ia=1;var e=_i.exports=nd();e.build="light";function t(i,r,s){return typeof r=="function"?(s=r,r=new e.Root):r||(r=new e.Root),r.load(i,s)}e.load=t;function n(i,r){return r||(r=new e.Root),r.loadSync(i)}return e.loadSync=n,e.encoder=Kl(),e.decoder=Zl(),e.verifier=Xl(),e.converter=Yl(),e.ReflectionObject=vn(),e.Namespace=yr(),e.Root=Gs(),e.Enum=Bt(),e.Type=Qs(),e.Field=bn(),e.OneOf=zn(),e.MapField=Xs(),e.Service=$s(),e.Method=Ys(),e.Message=Ks(),e.wrappers=$l(),e.types=Bn(),e.util=tt(),e.ReflectionObject._configure(e.Root),e.Namespace._configure(e.Type,e.Service,e.Enum),e.Root._configure(e.Type),e.Field._configure(e.Type),_i.exports}var ls,Ma;function Ql(){if(Ma)return ls;Ma=1,ls=d;var e=/[\s{}=;:[\],'"()<>]/g,t=/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,n=/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,i=/^ *[*/]+ */,r=/^\s*\*?\/*/,s=/\n/g,o=/\s/,a=/\\(.?)/g,l={0:"\0",r:"\r",n:`
85
+ `,t:" "};function c(f){return f.replace(a,function(p,h){switch(h){case"\\":case"":return h;default:return l[h]||""}})}d.unescape=c;function d(f,p){f=f.toString();var h=0,g=f.length,v=1,E=0,_={},w=[],y=null;function O(m){return Error("illegal "+m+" (line "+v+")")}function I(){var m=y==="'"?n:t;m.lastIndex=h-1;var T=m.exec(f);if(!T)throw O("string");return h=m.lastIndex,U(y),y=null,c(T[1])}function j(m){return f.charAt(m)}function M(m,T,S){var W={type:f.charAt(m++),lineEmpty:!1,leading:S},B;p?B=2:B=3;var K=m-B,ne;do if(--K<0||(ne=f.charAt(K))===`
86
+ `){W.lineEmpty=!0;break}while(ne===" "||ne===" ");for(var be=f.substring(m,T).split(s),Q=0;Q<be.length;++Q)be[Q]=be[Q].replace(p?r:i,"").trim();W.text=be.join(`
87
+ `).trim(),_[v]=W,E=v}function ee(m){var T=q(m),S=f.substring(m,T),W=/^\s*\/\//.test(S);return W}function q(m){for(var T=m;T<g&&j(T)!==`
88
+ `;)T++;return T}function Y(){if(w.length>0)return w.shift();if(y)return I();var m,T,S,W,B,K=h===0;do{if(h===g)return null;for(m=!1;o.test(S=j(h));)if(S===`
89
+ `&&(K=!0,++v),++h===g)return null;if(j(h)==="/"){if(++h===g)throw O("comment");if(j(h)==="/")if(p){if(W=h,B=!1,ee(h-1)){B=!0;do if(h=q(h),h===g||(h++,!K))break;while(ee(h))}else h=Math.min(g,q(h)+1);B&&(M(W,h,K),K=!0),v++,m=!0}else{for(B=j(W=h+1)==="/";j(++h)!==`
90
+ `;)if(h===g)return null;++h,B&&(M(W,h-1,K),K=!0),++v,m=!0}else if((S=j(h))==="*"){W=h+1,B=p||j(W)==="*";do{if(S===`
91
+ `&&++v,++h===g)throw O("comment");T=S,S=j(h)}while(T!=="*"||S!=="/");++h,B&&(M(W,h-2,K),K=!0),m=!0}else return"/"}}while(m);var ne=h;e.lastIndex=0;var be=e.test(j(ne++));if(!be)for(;ne<g&&!e.test(j(ne));)++ne;var Q=f.substring(h,h=ne);return(Q==='"'||Q==="'")&&(y=Q),Q}function U(m){w.push(m)}function pe(){if(!w.length){var m=Y();if(m===null)return null;U(m)}return w[0]}function R(m,T){var S=pe(),W=S===m;if(W)return Y(),!0;if(!T)throw O("token '"+S+"', '"+m+"' expected");return!1}function k(m){var T=null,S;return m===void 0?(S=_[v-1],delete _[v-1],S&&(p||S.type==="*"||S.lineEmpty)&&(T=S.leading?S.text:null)):(E<m&&pe(),S=_[m],delete _[m],S&&!S.lineEmpty&&(p||S.type==="/")&&(T=S.leading?null:S.text)),T}return Object.defineProperty({next:Y,peek:pe,push:U,skip:R,cmnt:k},"line",{get:function(){return v}})}return ls}var cs,Ca;function dd(){if(Ca)return cs;Ca=1,cs=I,I.filename=null,I.defaults={keepCase:!1};var e=Ql(),t=Gs(),n=Qs(),i=bn(),r=Xs(),s=zn(),o=Bt(),a=$s(),l=Ys(),c=vn(),d=Bn(),f=tt(),p=/^[1-9][0-9]*$/,h=/^-?[1-9][0-9]*$/,g=/^0[x][0-9a-fA-F]+$/,v=/^-?0[x][0-9a-fA-F]+$/,E=/^0[0-7]+$/,_=/^-?0[0-7]+$/,w=f.patterns.numberRe,y=/^[a-zA-Z_][a-zA-Z_0-9]*$/,O=f.patterns.typeRefRe;function I(j,M,ee){M instanceof t||(ee=M,M=new t),ee||(ee=I.defaults);var q=ee.preferTrailingComment||!1,Y=e(j,ee.alternateCommentMode||!1),U=Y.next,pe=Y.push,R=Y.peek,k=Y.skip,m=Y.cmnt,T=!0,S,W,B,K="proto2",ne=M,be=[],Q={},we=ee.keepCase?function(C){return C}:f.camelCase;function de(){be.forEach(C=>{C._edition=K,Object.keys(Q).forEach(L=>{C.getOption(L)===void 0&&C.setOption(L,Q[L],!0)})})}function G(C,L,F){var H=I.filename;return F||(I.filename=null),Error("illegal "+(L||"token")+" '"+C+"' ("+(H?H+", ":"")+"line "+Y.line+")")}function Ee(){var C=[],L;do{if((L=U())!=='"'&&L!=="'")throw G(L);C.push(U()),k(L),L=R()}while(L==='"'||L==="'");return C.join("")}function at(C){var L=U();switch(L){case"'":case'"':return pe(L),Ee();case"true":case"TRUE":return!0;case"false":case"FALSE":return!1}try{return Be(L,!0)}catch{if(O.test(L))return L;throw G(L,"value")}}function vt(C,L){var F,H;do if(L&&((F=R())==='"'||F==="'")){var oe=Ee();if(C.push(oe),K>=2023)throw G(oe,"id")}else try{C.push([H=Xe(U()),k("to",!0)?Xe(U()):H])}catch(ye){if(L&&O.test(F)&&K>=2023)C.push(F);else throw ye}while(k(",",!0));var ae={options:void 0};ae.setOption=function(ye,P){this.options===void 0&&(this.options={}),this.options[ye]=P},$e(ae,function(P){if(P==="option")Ke(ae,P),k(";");else throw G(P)},function(){Yt(ae)})}function Be(C,L){var F=1;switch(C.charAt(0)==="-"&&(F=-1,C=C.substring(1)),C){case"inf":case"INF":case"Inf":return F*(1/0);case"nan":case"NAN":case"Nan":case"NaN":return NaN;case"0":return 0}if(p.test(C))return F*parseInt(C,10);if(g.test(C))return F*parseInt(C,16);if(E.test(C))return F*parseInt(C,8);if(w.test(C))return F*parseFloat(C);throw G(C,"number",L)}function Xe(C,L){switch(C){case"max":case"MAX":case"Max":return 536870911;case"0":return 0}if(!L&&C.charAt(0)==="-")throw G(C,"id");if(h.test(C))return parseInt(C,10);if(v.test(C))return parseInt(C,16);if(_.test(C))return parseInt(C,8);throw G(C,"id")}function jt(){if(S!==void 0)throw G("package");if(S=U(),!O.test(S))throw G(S,"name");ne=ne.define(S),k(";")}function nn(){var C=R(),L;switch(C){case"weak":L=B||(B=[]),U();break;case"public":U();default:L=W||(W=[]);break}C=Ee(),k(";"),L.push(C)}function Un(){if(k("="),K=Ee(),K<2023)throw G(K,"syntax");k(";")}function wn(){if(k("="),K=Ee(),!["2023"].includes(K))throw G(K,"edition");k(";")}function Xt(C,L,F){switch(F===void 0&&(F=0),L){case"option":return Ke(C,L),k(";"),!0;case"message":return rn(C,L,F+1),!0;case"enum":return sn(C,L),!0;case"service":return kn(C,L,F+1),!0;case"extend":return Jn(C,L,F),!0}return!1}function $e(C,L,F){var H=Y.line;if(C&&(typeof C.comment!="string"&&(C.comment=m()),C.filename=I.filename),k("{",!0)){for(var oe;(oe=U())!=="}";)L(oe);k(";",!0)}else F&&F(),k(";"),C&&(typeof C.comment!="string"||q)&&(C.comment=m(H)||C.comment)}function rn(C,L,F){if(F===void 0&&(F=0),F>f.nestingLimit)throw Error("max depth exceeded");if(!y.test(L=U()))throw G(L,"type name");var H=new n(L);$e(H,function(ae){if(!Xt(H,ae,F))switch(ae){case"map":Hn(H);break;case"required":if(K!=="proto2")throw G(ae);case"repeated":We(H,ae,void 0,F+1);break;case"optional":if(K==="proto3")We(H,"proto3_optional",void 0,F+1);else{if(K!=="proto2")throw G(ae);We(H,"optional",void 0,F+1)}break;case"oneof":Vn(H,ae,F+1);break;case"extensions":vt(H.extensions||(H.extensions=[]));break;case"reserved":vt(H.reserved||(H.reserved=[]),!0);break;default:if(K==="proto2"||!O.test(ae))throw G(ae);pe(ae),We(H,"optional",void 0,F+1);break}}),C.add(H),C===ne&&be.push(H)}function We(C,L,F,H){var oe=U();if(oe==="group"){_n(C,L,H);return}for(;oe.endsWith(".")||R().startsWith(".");)oe+=U();if(!O.test(oe))throw G(oe,"type");var ae=U();if(!y.test(ae))throw G(ae,"name");ae=we(ae),k("=");var ye=new i(ae,Xe(U()),oe,L,F);if($e(ye,function(Z){if(Z==="option")Ke(ye,Z),k(";");else throw G(Z)},function(){Yt(ye)}),L==="proto3_optional"){var P=new s("_"+ae);ye.setOption("proto3_optional",!0),P.add(ye),C.add(P)}else C.add(ye);C===ne&&be.push(ye)}function _n(C,L,F){if(F===void 0&&(F=0),F>f.nestingLimit)throw Error("max depth exceeded");if(K>=2023)throw G("group");var H=U();if(!y.test(H))throw G(H,"name");var oe=f.lcFirst(H);H===oe&&(H=f.ucFirst(H)),k("=");var ae=Xe(U()),ye=new n(H);ye.group=!0;var P=new i(oe,ae,H,L);P.filename=I.filename,$e(ye,function(Z){switch(Z){case"option":Ke(ye,Z),k(";");break;case"required":case"repeated":We(ye,Z,void 0,F+1);break;case"optional":K==="proto3"?We(ye,"proto3_optional",void 0,F+1):We(ye,"optional",void 0,F+1);break;case"message":rn(ye,Z,F+1);break;case"enum":sn(ye,Z);break;case"reserved":vt(ye.reserved||(ye.reserved=[]),!0);break;default:throw G(Z)}}),C.add(ye).add(P)}function Hn(C){k("<");var L=U();if(d.mapKey[L]===void 0)throw G(L,"type");k(",");var F=U();if(!O.test(F))throw G(F,"type");k(">");var H=U();if(!y.test(H))throw G(H,"name");k("=");var oe=new r(we(H),Xe(U()),L,F);$e(oe,function(ye){if(ye==="option")Ke(oe,ye),k(";");else throw G(ye)},function(){Yt(oe)}),C.add(oe)}function Vn(C,L,F){if(!y.test(L=U()))throw G(L,"name");var H=new s(we(L));$e(H,function(ae){ae==="option"?(Ke(H,ae),k(";")):(pe(ae),We(H,"optional",void 0,F))}),C.add(H)}function sn(C,L){if(!y.test(L=U()))throw G(L,"name");var F=new o(L);$e(F,function(oe){switch(oe){case"option":Ke(F,oe),k(";");break;case"reserved":vt(F.reserved||(F.reserved=[]),!0),F.reserved===void 0&&(F.reserved=[]);break;default:wt(F,oe)}}),C.add(F),C===ne&&be.push(F)}function wt(C,L){if(!y.test(L))throw G(L,"name");k("=");var F=Xe(U(),!0),H={options:void 0};H.getOption=function(oe){return this.options[oe]},H.setOption=function(oe,ae){c.prototype.setOption.call(H,oe,ae)},H.setParsedOption=function(){},$e(H,function(ae){if(ae==="option")Ke(H,ae),k(";");else throw G(ae)},function(){Yt(H)}),C.add(L,F,H.comment,H.parsedOptions||H.options)}function Ke(C,L){var F,H,oe=!0;for(L==="option"&&(L=U());L!=="=";){if(L===null)throw G(L,"end of input");if(L==="("){var ae=U();k(")"),L="("+ae+")"}if(oe){if(oe=!1,L.includes(".")&&!L.includes("(")){var ye=L.split(".");F=ye[0]+".",L=ye[1];continue}F=L}else H=H?H+=L:L;L=U()}var P=H?F.concat(H):F,z=_t(C,P);H=H&&H[0]==="."?H.slice(1):H,F=F&&F[F.length-1]==="."?F.slice(0,-1):F,En(C,F,z,H)}function _t(C,L,F){if(F===void 0&&(F=0),F>f.recursionLimit)throw Error("max depth exceeded");if(k("{",!0)){for(var H={};!k("}",!0);){if(!y.test(Ue=U()))throw G(Ue,"name");if(Ue===null)throw G(Ue,"end of input");var oe,ae=Ue;if(k(":",!0),R()==="{")oe=_t(C,L+"."+Ue,F+1);else if(R()==="["){oe=[];var ye;if(k("[",!0)){do ye=at(),oe.push(ye);while(k(",",!0));k("]"),typeof ye<"u"&&St(C,L+"."+Ue,ye)}}else oe=at(),St(C,L+"."+Ue,oe);var P=H[ae];P&&(oe=[].concat(P).concat(oe)),ae!=="__proto__"&&(H[ae]=oe),k(",",!0),k(";",!0)}return H}var z=at();return St(C,L,z),z}function St(C,L,F){if(ne===C&&/^features\./.test(L)){Q[L]=F;return}C.setOption&&C.setOption(L,F)}function En(C,L,F,H){C.setParsedOption&&C.setParsedOption(L,F,H)}function Yt(C){if(k("[",!0)){do Ke(C,"option");while(k(",",!0));k("]")}return C}function kn(C,L,F){if(F===void 0&&(F=0),F>f.recursionLimit)throw Error("max depth exceeded");if(!y.test(L=U()))throw G(L,"service name");var H=new a(L);$e(H,function(ae){if(!Xt(H,ae,F))if(ae==="rpc")Wn(H,ae);else throw G(ae)}),C.add(H),C===ne&&be.push(H)}function Wn(C,L){var F=m(),H=L;if(!y.test(L=U()))throw G(L,"name");var oe=L,ae,ye,P,z;if(k("("),k("stream",!0)&&(ye=!0),!O.test(L=U())||(ae=L,k(")"),k("returns"),k("("),k("stream",!0)&&(z=!0),!O.test(L=U())))throw G(L);P=L,k(")");var Z=new l(oe,H,ae,P,ye,z);Z.comment=F,$e(Z,function(A){if(A==="option")Ke(Z,A),k(";");else throw G(A)}),C.add(Z)}function Jn(C,L,F){if(!O.test(L=U()))throw G(L,"reference");var H=L;$e(null,function(ae){switch(ae){case"required":case"repeated":We(C,ae,H,F+1);break;case"optional":K==="proto3"?We(C,"proto3_optional",H,F+1):We(C,"optional",H,F+1);break;default:if(K==="proto2"||!O.test(ae))throw G(ae);pe(ae),We(C,"optional",H,F+1);break}})}for(var Ue;(Ue=U())!==null;)switch(Ue){case"package":if(!T)throw G(Ue);jt();break;case"import":if(!T)throw G(Ue);nn();break;case"syntax":if(!T)throw G(Ue);Un();break;case"edition":if(!T)throw G(Ue);wn();break;case"option":Ke(ne,Ue),k(";",!0);break;default:if(Xt(ne,Ue,0)){T=!1;continue}throw G(Ue)}return de(),I.filename=null,{package:S,imports:W,weakImports:B,root:M}}return cs}var us,La;function pd(){if(La)return us;La=1,us=t;var e=/\/|\./;function t(i,r){e.test(i)||(i="google/protobuf/"+i+".proto",r={nested:{google:{nested:{protobuf:{nested:r}}}}}),t[i]=r}t("any",{Any:{fields:{type_url:{type:"string",id:1},value:{type:"bytes",id:2}}}});var n;return t("duration",{Duration:n={fields:{seconds:{type:"int64",id:1},nanos:{type:"int32",id:2}}}}),t("timestamp",{Timestamp:n}),t("empty",{Empty:{fields:{}}}),t("struct",{Struct:{fields:{fields:{keyType:"string",type:"Value",id:1}}},Value:{oneofs:{kind:{oneof:["nullValue","numberValue","stringValue","boolValue","structValue","listValue"]}},fields:{nullValue:{type:"NullValue",id:1},numberValue:{type:"double",id:2},stringValue:{type:"string",id:3},boolValue:{type:"bool",id:4},structValue:{type:"Struct",id:5},listValue:{type:"ListValue",id:6}}},NullValue:{values:{NULL_VALUE:0}},ListValue:{fields:{values:{rule:"repeated",type:"Value",id:1}}}}),t("wrappers",{DoubleValue:{fields:{value:{type:"double",id:1}}},FloatValue:{fields:{value:{type:"float",id:1}}},Int64Value:{fields:{value:{type:"int64",id:1}}},UInt64Value:{fields:{value:{type:"uint64",id:1}}},Int32Value:{fields:{value:{type:"int32",id:1}}},UInt32Value:{fields:{value:{type:"uint32",id:1}}},BoolValue:{fields:{value:{type:"bool",id:1}}},StringValue:{fields:{value:{type:"string",id:1}}},BytesValue:{fields:{value:{type:"bytes",id:1}}}}),t("field_mask",{FieldMask:{fields:{paths:{rule:"repeated",type:"string",id:1}}}}),t.get=function(r){return t[r]||null},us}var Pa;function hd(){if(Pa)return wi.exports;Pa=1;var e=wi.exports=fd();return e.build="full",e.tokenize=Ql(),e.parse=dd(),e.common=pd(),e.Root._configure(e.Type,e.parse,e.common),wi.exports}var fs,Da;function md(){return Da||(Da=1,fs=hd()),fs}var Ln=md();const Ge="com.google.type",ds={"google/type/calendar_period.proto":{nested:{google:{nested:{type:{options:{go_package:"google.golang.org/genproto/googleapis/type/calendarperiod;calendarperiod",java_multiple_files:!0,java_outer_classname:"CalendarPeriodProto",java_package:Ge,objc_class_prefix:"GTP"},nested:{CalendarPeriod:{values:{CALENDAR_PERIOD_UNSPECIFIED:0,DAY:1,WEEK:2,FORTNIGHT:3,MONTH:4,QUARTER:5,HALF:6,YEAR:7}}},comment:'A `CalendarPeriod` represents the abstract concept of a time period that has a canonical start. Grammatically, "the start of the current `CalendarPeriod`." All calendar times begin at midnight UTC.'}}}}},"google/type/color.proto":{nested:{google:{nested:{protobufNested:{nested:{DoubleValue:{fields:{value:{type:"double",id:1}}},FloatValue:{fields:{value:{type:"float",id:1}}},Int64Value:{fields:{value:{type:"int64",id:1}}},UInt64Value:{fields:{value:{type:"uint64",id:1}}},Int32Value:{fields:{value:{type:"int32",id:1}}},UInt32Value:{fields:{value:{type:"uint32",id:1}}},BoolValue:{fields:{value:{type:"bool",id:1}}},StringValue:{fields:{value:{type:"string",id:1}}},BytesValue:{fields:{value:{type:"bytes",id:1}}}}},type:{options:{cc_enable_arenas:!0,go_package:"google.golang.org/genproto/googleapis/type/color;color",java_multiple_files:!0,java_outer_classname:"ColorProto",java_package:Ge,objc_class_prefix:"GTP"},nested:{Color:{fields:{red:{type:"float",comment:`The amount of red in the color as a value in the interval.
92
+ @Min 0
93
+ @Max 1`,id:1},green:{type:"float",comment:`The amount of green in the color as a value in the interval.
94
+ @Min 0
95
+ @Max 1`,id:2},blue:{type:"float",comment:`The amount of blue in the color as a value in the interval.
96
+ @Min 0
97
+ @Max 1`,id:3},alpha:{type:"google.protobufNested.FloatValue",comment:`This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color.
98
+ @Min 0
99
+ @Max 1`,id:4}}}}}}}}},"google/type/date.proto":{nested:{google:{nested:{type:{options:{cc_enable_arenas:!0,go_package:"google.golang.org/genproto/googleapis/type/date;date",java_multiple_files:!0,java_outer_classname:"DateProto",java_package:Ge,objc_class_prefix:"GTP"},nested:{Date:{fields:{year:{type:"int32",comment:`Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year
100
+ @Min 0
101
+ @Max 9999`,id:1},month:{type:"int32",comment:`Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
102
+ @Min 0
103
+ @Max 12`,id:2},day:{type:"int32",comment:`Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.
104
+ @Min 0
105
+ @Max 31`,id:3}}}}}}}}},"google/type/datetime.proto":{nested:{google:{nested:{protobufNested:{nested:{Duration:{fields:{seconds:{type:"int64",id:1},nanos:{type:"int32",id:2}}}}},type:{options:{cc_enable_arenas:!0,go_package:"google.golang.org/genproto/googleapis/type/datetime;datetime",java_multiple_files:!0,java_outer_classname:"DateTimeProto",java_package:Ge,objc_class_prefix:"GTP"},nested:{DateTime:{oneofs:{timeOffset:{oneof:["utcOffset","timeZone"]}},fields:{year:{type:"int32",comment:`Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year
106
+ @Min 0
107
+ @Max 9999`,id:1},month:{type:"int32",comment:`Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
108
+ @Min 0
109
+ @Max 12`,id:2},day:{type:"int32",comment:`Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.
110
+ @Min 0
111
+ @Max 31`,id:3},hours:{type:"int32",comment:`Hours of day in 24 hour format.
112
+ @Min 0
113
+ @Max 23`,id:4},minutes:{type:"int32",comment:`Minutes of hour of day.
114
+ @Min 0
115
+ @Max 59`,id:5},seconds:{type:"int32",comment:`Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds.
116
+ @Min 0
117
+ @Max 60`,id:6},nanos:{type:"int32",comment:`Fractions of seconds in nanoseconds.
118
+ @Min 0
119
+ @Max 999999999`,id:7},utcOffset:{type:"google.protobufNested.Duration",id:8},timeZone:{type:"TimeZone",id:9}}},TimeZone:{fields:{id:{type:"string",comment:"IANA Time Zone Database time zone. @Example: America/New_York",id:1},version:{type:"string",comment:"IANA Time Zone Database version number. @Example: 2019a",id:2}}}}}}}}},"google/type/dayofweek.proto":{nested:{google:{nested:{type:{options:{go_package:"google.golang.org/genproto/googleapis/type/dayofweek;dayofweek",java_multiple_files:!0,java_outer_classname:"DayOfWeekProto",java_package:Ge,objc_class_prefix:"GTP"},nested:{DayOfWeek:{values:{DAY_OF_WEEK_UNSPECIFIED:0,MONDAY:1,TUESDAY:2,WEDNESDAY:3,THURSDAY:4,FRIDAY:5,SATURDAY:6,SUNDAY:7}}}}}}}},"google/type/decimal.proto":{nested:{google:{nested:{type:{options:{cc_enable_arenas:!0,go_package:"google.golang.org/genproto/googleapis/type/decimal;decimal",java_multiple_files:!0,java_outer_classname:"DecimalProto",java_package:Ge,objc_class_prefix:"GTP"},nested:{Decimal:{fields:{value:{type:"string",comment:"A representation of a decimal value, such as 2.5. Clients may convert values into language-native decimal formats, such as Java's [BigDecimal][] or Python's [decimal.Decimal][].\n\nThe string representation consists of an optional sign, `+` (`U+002B`) or `-` (`U+002D`), followed by a sequence of zero or more decimal digits (\"the integer\"), optionally followed by a fraction, optionally followed by an exponent.\n\nThe fraction consists of a decimal point followed by zero or more decimal digits. The string must contain at least one digit in either the integer or the fraction. The number formed by the sign, the integer and the fraction is referred to as the significand.\n\nServices **should** normalize decimal values before storing them by:\n- Removing an explicitly-provided `+` sign (`+2.5` -> `2.5`).\n- Replacing a zero-length integer value with `0` (`.5` -> `0.5`).\n- Coercing the exponent character to lower-case (`2.5E8` -> `2.5e8`).\n- Removing an explicitly-provided zero exponent (`2.5e0` -> `2.5`).\n@Example 2.5e8\n@Example -2.5e8\n@Example 2.5",id:1}}}}}}}}},"google/type/expr.proto":{nested:{google:{nested:{type:{options:{go_package:"google.golang.org/genproto/googleapis/type/expr;expr",java_multiple_files:!0,java_outer_classname:"ExprProto",java_package:Ge,objc_class_prefix:"GTP"},nested:{Expr:{fields:{expression:{type:"string",comment:`Textual representation of an expression in Common Expression Language syntax
120
+ @Example 'New message received at ' + string(document.create_time)
121
+ @Example document.type != 'private' && document.type != 'internal'`,id:1},title:{type:"string",comment:`Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression
122
+ @Example Notification string
123
+ @Example Public documents`,id:2},description:{type:"string",comment:`Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
124
+ @Example Determine whether the document should be publicly visible
125
+ @Example Create a notification string with a timestamp.`,id:3},location:{type:"string",comment:"String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.",id:4}},comment:"Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec."}}}}}}},"google/type/fraction.proto":{nested:{google:{nested:{type:{options:{go_package:"google.golang.org/genproto/googleapis/type/fraction;fraction",java_multiple_files:!0,java_outer_classname:"FractionProto",java_package:Ge,objc_class_prefix:"GTP"},nested:{Fraction:{fields:{numerator:{type:"int64",comment:"The numerator in the fraction, e.g. 2 in 2/3.",id:1},denominator:{type:"int64",comment:"The value by which the numerator is divided, e.g. 3 in 2/3.",id:2}}}}}}}}},"google/type/interval.proto":{nested:{google:{nested:{protobufNested:{nested:{Timestamp:{fields:{seconds:{type:"int64",id:1},nanos:{type:"int32",id:2}}}}},type:{options:{cc_enable_arenas:!0,go_package:"google.golang.org/genproto/googleapis/type/interval;interval",java_multiple_files:!0,java_outer_classname:"IntervalProto",java_package:Ge,objc_class_prefix:"GTP"},nested:{Interval:{fields:{startTime:{type:"google.protobufNested.Timestamp",comment:"If specified, a Timestamp matching this interval will have to be the same or after the start.",id:1},endTime:{type:"google.protobufNested.Timestamp",comment:"If specified, a Timestamp matching this interval will have to be before the end.",id:2}}}}}}}}},"google/type/latlng.proto":{nested:{google:{nested:{type:{options:{cc_enable_arenas:!0,go_package:"google.golang.org/genproto/googleapis/type/latlng;latlng",java_multiple_files:!0,java_outer_classname:"LatLngProto",java_package:Ge,objc_class_prefix:"GTP"},nested:{LatLng:{fields:{latitude:{type:"double",comment:`The latitude in degrees.
126
+ @Min -90
127
+ @Max +90`,id:1},longitude:{type:"double",comment:`The longitude in degrees.
128
+ @Min -180
129
+ @Max +180`,id:2}},comment:'An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this must conform to the <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84 standard</a>. Values must be within normalized ranges.'}}}}}}},"google/type/localized_text.proto":{nested:{google:{nested:{type:{options:{cc_enable_arenas:!0,go_package:"google.golang.org/genproto/googleapis/type/localized_text;localized_text",java_multiple_files:!0,java_outer_classname:"LocalizedTextProto",java_package:Ge,objc_class_prefix:"GTP"},nested:{LocalizedText:{fields:{text:{type:"string",comment:"Localized string in the language corresponding to 'language_code'",id:1},languageCode:{type:"string",comment:`The text's BCP-47 language code, such as "en-US" or "sr-Latn".
130
+ @Example en-US
131
+ @Example sr-Latn`,id:2}},comment:"Localized variant of a text in a particular language."}}}}}}},"google/type/money.proto":{nested:{google:{nested:{type:{options:{cc_enable_arenas:!0,go_package:"google.golang.org/genproto/googleapis/type/money;money",java_multiple_files:!0,java_outer_classname:"MoneyProto",java_package:Ge,objc_class_prefix:"GTP"},nested:{Money:{fields:{currencyCode:{type:"string",comment:`The three-letter currency code defined in ISO 4217.
132
+ @Example USD
133
+ @Example EUR`,id:1},units:{type:"int64",comment:"The whole units of the amount.",id:2},nanos:{type:"int32",comment:"Number of nano (10^-9) units of the amount",id:3}},comment:"Represents an amount of money with its currency type."}}}}}}},"google/type/month.proto":{nested:{google:{nested:{type:{options:{go_package:"google.golang.org/genproto/googleapis/type/month;month",java_multiple_files:!0,java_outer_classname:"MonthProto",java_package:Ge,objc_class_prefix:"GTP"},nested:{Month:{values:{MONTH_UNSPECIFIED:0,JANUARY:1,FEBRUARY:2,MARCH:3,APRIL:4,MAY:5,JUNE:6,JULY:7,AUGUST:8,SEPTEMBER:9,OCTOBER:10,NOVEMBER:11,DECEMBER:12}}}}}}}},"google/type/phone_number.proto":{nested:{google:{nested:{type:{options:{cc_enable_arenas:!0,go_package:"google.golang.org/genproto/googleapis/type/phone_number;phone_number",java_multiple_files:!0,java_outer_classname:"PhoneNumberProto",java_package:Ge,objc_class_prefix:"GTP"},nested:{PhoneNumber:{oneofs:{kind:{oneof:["e164Number","shortCode"]}},fields:{e164Number:{type:"string",id:1},shortCode:{type:"ShortCode",id:2},extension:{type:"string",id:3}},nested:{ShortCode:{fields:{regionCode:{type:"string",id:1},number:{type:"string",id:2}}}}}}}}}}},"google/type/postal_address.proto":{nested:{google:{nested:{type:{options:{cc_enable_arenas:!0,go_package:"google.golang.org/genproto/googleapis/type/postaladdress;postaladdress",java_multiple_files:!0,java_outer_classname:"PostalAddressProto",java_package:Ge,objc_class_prefix:"GTP"},nested:{PostalAddress:{fields:{revision:{type:"int32",comment:`The schema revision of the \`PostalAddress\`. This must be set to 0, which is the latest revision.
134
+ @Min 0
135
+ @Max 0
136
+ @Default 0`,id:1},regionCode:{type:"string",comment:`CLDR region code of the country/region of the address. This is never inferred and it is up to the user to ensure the value is correct. See http://cldr.unicode.org/ and http://www.unicode.org/cldr/charts/30/supplemental/territory_information.html for details.
137
+ @Example CH`,id:2},languageCode:{type:"string",comment:`BCP-47 language code of the contents of this address (if known). This is often the UI language of the input form or is expected to match one of the languages used in the address country/region, or their transliterated equivalents. This can affect formatting in certain countries, but is not critical to the correctness of the data and will never affect any validation or other non-formatting related operations.
138
+ @Example zh-Hant
139
+ @Example ja
140
+ @Example ja-Latn
141
+ @Example en`,id:3},postalCode:{type:"string",comment:`Postal code of the address. Not all countries use or require postal codes to be present, but where they are used, they may trigger additional validation with other parts of the address (e.g. state/zip validation in the U.S.A.).
142
+ @Example 3600`,id:4},sortingCode:{type:"string",comment:`Additional, country-specific, sorting code. This is not used in most regions. Where it is used, the value is either a string like "CEDEX", optionally followed by a number (e.g. "CEDEX 7"), or just a number alone, representing the "sector code" (Jamaica), "delivery area indicator" (Malawi) or "post office indicator" (e.g. Côte d'Ivoire).
143
+ @Example CEDEX 7`,id:5},administrativeArea:{type:"string",comment:`Highest administrative subdivision which is used for postal addresses of a country or region. For example, this can be a state, a province, an oblast, or a prefecture. Specifically, for Spain this is the province and not the autonomous community (e.g. "Barcelona" and not "Catalonia"). Many countries don't use an administrative area in postal addresses. E.g. in Switzerland this should be left unpopulated.`,id:6},locality:{type:"string",comment:"Generally refers to the city/town portion of the address. Examples: US city, IT comune, UK post town. In regions of the world where localities are not well defined or do not fit into this structure well, leave locality empty and use address_lines.",id:7},sublocality:{type:"string",comment:"Sublocality of the address. For example, this can be neighborhoods, boroughs, districts.",id:8},addressLines:{rule:"repeated",type:"string",comment:'Unstructured address lines describing the lower levels of an address. Because values in address_lines do not have type information and may sometimes contain multiple values in a single field (e.g. "Austin, TX")',id:9},recipients:{rule:"repeated",type:"string",comment:'The recipient at the address. This field may, under certain circumstances, contain multiline information. For example, it might contain "care of" information.',id:10},organization:{type:"string",comment:"The name of the organization at the address.",id:11}},comment:"Represents a postal address, e.g. for postal delivery or payments addresses. Given a postal address, a postal service can deliver items to a premise, P.O. Box or similar. It is not intended to model geographical locations (roads, towns, mountains)."}}}}}}},"google/type/quaternion.proto":{nested:{google:{nested:{type:{options:{cc_enable_arenas:!0,go_package:"google.golang.org/genproto/googleapis/type/quaternion;quaternion",java_multiple_files:!0,java_outer_classname:"QuaternionProto",java_package:Ge,objc_class_prefix:"GTP"},nested:{Quaternion:{fields:{x:{type:"double",id:1},y:{type:"double",id:2},z:{type:"double",id:3},w:{type:"double",id:4}}}},comment:"A quaternion is defined as the quotient of two directed lines in a three-dimensional space or equivalently as the quotient of two Euclidean vectors (https://en.wikipedia.org/wiki/Quaternion)."}}}}},"google/type/timeofday.proto":{nested:{google:{nested:{type:{options:{cc_enable_arenas:!0,go_package:"google.golang.org/genproto/googleapis/type/timeofday;timeofday",java_multiple_files:!0,java_outer_classname:"TimeOfDayProto",java_package:Ge,objc_class_prefix:"GTP"},nested:{TimeOfDay:{fields:{hours:{type:"int32",id:1},minutes:{type:"int32",id:2},seconds:{type:"int32",id:3},nanos:{type:"int32",id:4}}}}}}}}},"validate/validate.proto":{},"buf/validate/validate.proto":{}};class gd{static isAbsolute(t){return/^(?:\/|\w+:|\\\\\w+)/.test(t)}static normalize(t){const n=t.substring(0,2);let i="";n==="\\\\"&&(i=n,t=t.substring(2)),t=t.replace(/\\/g,"/").replace(/\/{2,}/g,"/");const r=t.split("/"),s=this.isAbsolute(t);let o="";s&&(o=`${r.shift()}/`);for(let a=0;a<r.length;)r[a]===".."?a>0&&r[a-1]!==".."?r.splice(--a,2):s?r.splice(a,1):++a:r[a]==="."?r.splice(a,1):++a;return i+o+r.join("/")}static resolve(t,n,i=!1){return i||(n=this.normalize(n)),this.isAbsolute(n)?n:(i||(t=this.normalize(t)),(t=t.replace(/(?:\/|^)[^/]+$/,"")).length?this.normalize(`${t}/${n}`):n)}}const lt=class lt{static withoutRangeLimits(t){const n={};for(const i of Object.keys(t)){const r={...t[i]};delete r.minimum,delete r.maximum,n[i]=r}return n}};_e(lt,"MAX_SAFE_INTEGER",Math.pow(2,53)-1),_e(lt,"MIN_SAFE_INTEGER",-lt.MAX_SAFE_INTEGER),_e(lt,"PRIMITIVE_TYPES_WITH_LIMITS",{bytes:{type:"string",format:"bytes","x-primitive":"bytes"},string:{type:"string","x-primitive":"string"},bool:{type:"boolean","x-primitive":"bool"},int32:{type:"integer",format:"int32",minimum:-2147483648,maximum:2147483647,"x-primitive":"int32"},sint32:{type:"integer",format:"sint32",minimum:-2147483648,maximum:2147483647,"x-primitive":"sint32"},uint32:{type:"integer",format:"uint32",minimum:0,maximum:4294967295,"x-primitive":"uint32"},int64:{type:"integer",format:"int64",minimum:lt.MIN_SAFE_INTEGER,maximum:lt.MAX_SAFE_INTEGER,"x-primitive":"int64"},sint64:{type:"integer",format:"sint64",minimum:lt.MIN_SAFE_INTEGER,maximum:lt.MAX_SAFE_INTEGER,"x-primitive":"sint64"},uint64:{type:"integer",format:"uint64",minimum:0,maximum:lt.MAX_SAFE_INTEGER,"x-primitive":"uint64"},fixed32:{type:"number",format:"fixed32","x-primitive":"fixed32"},fixed64:{type:"number",format:"fixed64","x-primitive":"fixed64"},sfixed32:{type:"number",format:"sfixed32","x-primitive":"sfixed32"},sfixed64:{type:"number",format:"sfixed64","x-primitive":"sfixed64"},float:{type:"number",format:"float","x-primitive":"float"},double:{type:"number",format:"double","x-primitive":"double"}}),_e(lt,"PRIMITIVE_TYPES_MINIMAL",lt.withoutRangeLimits(lt.PRIMITIVE_TYPES_WITH_LIMITS));let ur=lt;const Gl="(buf.validate.field)",Fa=e=>typeof e=="object"&&e!==null&&!Array.isArray(e);function Ba(e,t){const n=eo(t,Gl);n!==null&&to(n,e)}function eo(e,t){const n=e.parsedOptions;if(n&&!Array.isArray(n)&&n[t])return n[t];if(n&&Array.isArray(n)){for(const i of n)if(i[t])return i[t]}return null}function to(e,t){for(const[n,i]of Object.entries(e))switch(n){case"float":case"double":case"int32":case"int64":case"uint32":case"uint64":case"sint32":case"sint64":case"fixed32":case"fixed64":case"sfixed32":case"sfixed64":Pn.handle(t,i);break;case"bool":yd.handle(t,i);break;case"string":case"bytes":Fe.handle(t,i);break;case"repeated":fr.handle(t,i);break}}class Pn{static handle(t,n){for(const[i,r]of Object.entries(n))switch(i){case"const":hn.constValue(t,r);break;case"lt":Pn.lessThan(t,r);break;case"lte":Pn.lessEqualThan(t,r);break;case"gt":Pn.greaterThan(t,r);break;case"gte":Pn.greaterEqualThan(t,r);break;case"ignore_empty":break;case"in":hn.inArray(t,r);break;case"not_in":hn.notInArray(t,r);break}}static lessThan(t,n){delete t.maximum,t.exclusiveMaximum=n}static lessEqualThan(t,n){t.maximum=n}static greaterThan(t,n){delete t.minimum,t.exclusiveMinimum=n}static greaterEqualThan(t,n){t.minimum=n}}class yd{static handle(t,n){for(const[i,r]of Object.entries(n))switch(i){case"const":hn.constValue(t,r);break}}}class Fe{static handle(t,n){for(const[i,r]of Object.entries(n))switch(i){case"const":hn.constValue(t,r);break;case"in":hn.inArray(t,r);break;case"not_in":hn.notInArray(t,r);break;case"len":Fe.len(t,r);break;case"min_len":Fe.minLen(t,r);break;case"max_len":Fe.maxLen(t,r);break;case"len_bytes":Fe.len(t,r);break;case"min_bytes":Fe.minLen(t,r);break;case"max_bytes":Fe.maxLen(t,r);break;case"pattern":Fe.pattern(t,r);break;case"prefix":Fe.prefix(t,r);break;case"contains":Fe.contains(t,r);break;case"not_contains":Fe.notContains(t,r);break;case"suffix":Fe.suffix(t,r);break;case"email":r&&Fe.email(t);break;case"address":r&&Fe.address(t);break;case"hostname":r&&Fe.hostname(t);break;case"ip":r&&Fe.ip(t);break;case"ipv4":r&&Fe.ipv4(t);break;case"ipv6":r&&Fe.ipv6(t);break;case"uri":r&&Fe.uri(t);break;case"uri_ref":r&&Fe.uriRef(t);break;case"uuid":r&&Fe.uuid(t);break;case"well_known_regex":Fe.wellKnownRegex(t,r);break}}static len(t,n){t.minLength=n,t.maxLength=n}static minLen(t,n){t.minLength=n}static maxLen(t,n){t.maxLength=n}static pattern(t,n){t.pattern=n}static prefix(t,n){t.pattern=`^${Fr(n)}.*`}static contains(t,n){t.pattern=`.*${Fr(n)}.*`}static notContains(t,n){t.pattern=`^((?!${Fr(n)}).)*$`}static suffix(t,n){t.pattern=`.*${Fr(n)}$`}static email(t){t.format="email"}static hostname(t){t.format="hostname"}static address(t){t.anyOf=[{format:"hostname"},{format:"ipv4"},{format:"ipv6"}]}static ip(t){t.anyOf=[{format:"ipv4"},{format:"ipv6"}]}static ipv4(t){t.format="ipv4"}static ipv6(t){t.format="ipv6"}static uri(t){t.format="uri"}static uriRef(t){t.format="uri-reference"}static uuid(t){t.format="uuid"}static wellKnownRegex(t,n){switch(n){case"HTTP_HEADER_NAME":t.pattern="^:?[0-9a-zA-Z!#$%&'*+-.^_|~`]+$";break;case"HTTP_HEADER_VALUE":t.pattern="^[^\\u0000-\\u0008\\u000A-\\u001F\\u007F]*$";break}}}class fr{static handle(t,n){for(const[i,r]of Object.entries(n))switch(i){case"min_items":fr.minLen(t,r);break;case"max_items":fr.maxLen(t,r);break;case"unique":r&&fr.unique(t);break;case"items":t.items&&to(r,t.items);break}}static minLen(t,n){t.minItems=n}static maxLen(t,n){t.maxItems=n}static unique(t){t.uniqueItems=!0}}class hn{static constValue(t,n){t.const=n,delete t.maximum,delete t.minimum}static inArray(t,n){if(!Array.isArray(n))throw new Error(`Expect value to be an array: ${n}`);t.oneOf=n.map(i=>({const:i}))}static notInArray(t,n){if(!Array.isArray(n))throw new Error(`Expect value to be an array: ${n}`);t.not={oneOf:n.map(i=>({const:i}))}}}function xd(e){const t=eo(e,Gl);if(t!==null){for(const[n,i]of Object.entries(t))if(Fa(i)){if(n==="repeated"){if(Fa(i.items)){for(const[r,s]of Object.entries(i.items))if(r==="ignore_empty"&&s)return!0}}else for(const[r,s]of Object.entries(i))if(r==="ignore_empty"&&s)return!0}}return!1}function Fr(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}const bd="(validate.rules)";function za(e,t){const n=eo(t,bd);n!==null&&to(n,e)}const qa="root",Ua="@RootNode",vd="@Option",Ha="@Example",Va="@Default",Wa=Ln.common;class wd{constructor(t){_e(this,"root",new Ln.Root);_e(this,"proto3");_e(this,"protoParseOptions",{keepCase:!0,alternateCommentMode:!0});_e(this,"mapperOptions",{primitiveTypesWithLimits:!0});this.proto3=/syntax\s*=\s*['"]proto3['"]/.test(t),this.parseOptionsAnnotation(t),this.process(qa,t)}parseOptionsAnnotation(t){const n=/(\/\/|\*)\s*@Option\s+(?<key>\w{1,50})\s+(?<value>\S[^\r\n]{0,199})/g;let i;for(;(i=n.exec(t))!==null&&(i.index===n.lastIndex&&n.lastIndex++,i.groups!==void 0);)i.groups.value==="true"?this.mapperOptions[i.groups.key]=!0:i.groups.value==="false"?this.mapperOptions[i.groups.key]=!1:this.mapperOptions[i.groups.key]=i.groups.value}process(t,n){if(typeof n!="string")this.root.setOptions(n.options),this.root.addJSON(n.nested);else{Ln.parse.filename=t;const i=Ln.parse(n,this.root,this.protoParseOptions);let r=0;if(i.imports)for(;r<i.imports.length;++r)this.fetch(i.imports[r],t,!1);if(i.weakImports)for(r=0;r<i.weakImports.length;++r)this.fetch(i.weakImports[r],t,!0)}}getBundledFileName(t){if(t==="validate/validate.proto"||t==="/validate/validate.proto")return"validate/validate.proto";if(t==="buf/validate/validate.proto"||t==="/buf/validate/validate.proto")return"buf/validate/validate.proto";let n=t.lastIndexOf("google/protobuf/");if(n>-1){const i=t.substring(n);if(i in Wa)return i}if(n=t.lastIndexOf("google/type/"),n>-1){const i=t.substring(n);if(i in ds)return i}return null}fetch(t,n,i){const r=this.getBundledFileName(t)||t;if(this.root.files.indexOf(r)>-1)return;this.root.files.push(r);const s=Wa[r];if(s!==void 0){this.process(r,s);return}if(r in ds){this.process(r,ds[r]);return}const o=gd.resolve(n,r);if(!i)throw new Error(`Imports are currently not implemented. Can not load: ${o} defined in as ${t} in ${n}`)}compile(){this.root.resolveAll();const t=this.resolveByFilename(qa,this.root.nested),n=this.findRootItem(t);return this.compileMessage(n,[])}resolveByFilename(t,n){const i=[];for(const r in n){const s=n[r];s.filename===t&&s instanceof Ln.Type&&i.push(s);const o=s.nested;o&&i.push(...this.resolveByFilename(t,o))}return i}findRootItem(t){var s;const n=new Map;for(const o of t)for(const a in o.fields)n.has(o.fields[a].type)?(s=n.get(o.fields[a].type))==null||s.add(o.name):n.set(o.fields[a].type,new Set([o.name]));const i=[];for(const o of t){const a=n.get(o.name);a&&((a==null?void 0:a.size)>1||!a.has(o.name))||i.push(o)}if(i.length<1)throw new Error("Not found a root proto messages");if(i.length===1)return i[0];for(const o of i)if(o.comment&&o.comment.indexOf(Ua)!==-1)return o;const r=i.map(o=>o.name).join(", ");throw new Error(`Found more than one root proto messages: ${r}`)}isProto3(){return this.proto3}isProto3Required(t){var n;return xd(t)?!1:((n=t.options)==null?void 0:n.proto3_optional)!==!0&&this.isProto3()}hasRequiredAnnotation(t){return t!==null&&/@Required\b/i.test(t)}compileMessage(t,n){var a,l;const i={},r={title:t.name,type:"object",required:[],properties:i},s=this.extractDescription(t.comment);if(s!==null&&s.length>0&&(r.description=s),n.filter(c=>c===t.name).length>=2)return r;n.push(t.name);for(const c in t.fields){const d=t.fields[c];if(!(d.partOf&&d.partOf.oneof.length>1))if((d.required||this.isProto3Required(d)||this.hasRequiredAnnotation(d.comment))&&((a=r.required)==null||a.push(c)),d.repeated){i[d.name]={type:"array",items:this.compileField(d,t,n.slice())};const f=this.extractDescription(d.comment);if(f!==null&&f.length>0&&(i[d.name].description=f),d.comment){const p=/@MinItems\s(\d+)/i,h=/@MaxItems\s(\d+)/i;let g;(g=p.exec(d.comment))!==null&&(i[d.name].minItems=Number.parseInt(g[1],10)),(g=h.exec(d.comment))!==null&&(i[d.name].maxItems=Number.parseInt(g[1],10))}za(i[d.name],d),Ba(i[d.name],d)}else i[d.name]=this.compileField(d,t,n.slice())}for(const c of t.oneofsArray){if(c.fieldsArray.length<2)continue;i[c.name]||(i[c.name]={oneOf:[]});const d=i[c.name].oneOf;for(const f of c.oneof){const p=this.compileField(t.fields[f],t,n.slice());p["x-oneof-item"]=f,d.push(p)}}return(((l=r.required)==null?void 0:l.length)??0)<1&&delete r.required,r}compileEnum(t){const n={};for(const r of Object.keys(t.values))n[r]=t.values[r];const i={title:t.name,type:"string",enum:Object.keys(t.values),"x-enum-mapping":n};return this.addDefaultFromCommentAnnotations(i,t.comment),i}compileField(t,n,i){let r={};if(ur.PRIMITIVE_TYPES_WITH_LIMITS[t.type.toLowerCase()])r=this.mapperOptions.primitiveTypesWithLimits?Object.assign(r,ur.PRIMITIVE_TYPES_WITH_LIMITS[t.type.toLowerCase()]):Object.assign(r,ur.PRIMITIVE_TYPES_MINIMAL[t.type.toLowerCase()]),r["x-primitive"]=t.type;else{const a=n.lookupTypeOrEnum(t.type);if(!a)throw new Error(`Unable to resolve type "${t.type}" @ ${n.fullName}`);a instanceof Ln.Enum?r=Object.assign(r,this.compileEnum(a)):r=Object.assign(r,this.compileMessage(a,i)),t.type&&(r["x-type"]=t.type)}this.addValidatorFromCommentAnnotations(r,t.comment),this.addDefaultFromCommentAnnotations(r,t.comment),t.repeated||(za(r,t),Ba(r,t));const s=this.extractDescription(t.comment);s!==null&&s.length>0&&(r.description?r.description=`${s}
144
+ ${r.description}`.trim():r.description=s);const o=this.extractExamples(t.comment);return o!==null&&(r.examples=o),r}extractDescription(t){return!t||(t==null?void 0:t.length)<1||(t=t.replace(new RegExp(`\\s{0,15}${Ha}\\s{0,15}(.+)`,"ig"),"").replace(new RegExp(`\\s{0,15}${Va}\\s{0,15}(.+)`,"ig"),"").replace(new RegExp(`\\s{0,15}${vd}\\s{0,15}(.+)`,"ig"),"").replace(new RegExp(`\\s{0,15}${Ua}`,"ig"),"").replace(/\s{0,15}@Required/gi,"").replace(/\s{0,15}@Pattern\s{0,15}[^\r\n]{1,200}/gi,"").replace(/\s{0,15}@(Min|Max|Minimum|Maximum|ExclusiveMinimum|ExclusiveMaximum|MultipleOf|MaxLength|MinLength|MaxItems|MinItems)\s{0,15}[\d.]{1,20}/gi,"").trim(),t.length<1)?null:t}extractExamples(t){if(!t)return null;const n=[];let i;const r=new RegExp(`\\s*${Ha}\\s(.+)$`,"i");for(const s of t.split(`
145
+ `))(i=r.exec(s))!==null&&n.push(Ja(i[1].trim()));return n.length<1?null:n}addValidatorFromCommentAnnotations(t,n){if(n===null||(n==null?void 0:n.length)<1)return;const i=/@Min\s([+-]?\d+(\.\d+)?)/i,r=/@Max\s([+-]?\d+(\.\d+)?)/i,s=/@Pattern\s([^\n]+)/i,o=new Map([["minimum",/@Minimum\s([+-]?\d+(\.\d+)?)/i],["maximum",/@Maximum\s([+-]?\d+(\.\d+)?)/i],["exclusiveMinimum",/@ExclusiveMinimum\s([+-]?\d+(\.\d+)?)/i],["exclusiveMaximum",/@ExclusiveMaximum\s([+-]?\d+(\.\d+)?)/i],["multipleOf",/@MultipleOf\s(\d+(\.\d+)?)/i],["maxLength",/@MaxLength\s(\d+)/i],["minLength",/@MinLength\s(\d+)/i]]);let a;(a=i.exec(n))!==null&&(t.minimum=parseFloat(a[1])),(a=r.exec(n))!==null&&(t.maximum=parseFloat(a[1])),(a=s.exec(n))!==null&&(t.pattern=a[1].trim());for(const l of o.entries())(a=l[1].exec(n))!==null&&(t[l[0]]=parseFloat(a[1]))}addDefaultFromCommentAnnotations(t,n){if(n===null||(n==null?void 0:n.length)<1)return;const i=new RegExp(`\\s*${Va}\\s(.+)$`,"i");let r;(r=i.exec(n))!==null&&(t.default=Ja(r[1]))}}function no(e){return new wd(e).compile()}function Ja(e){if(e.charAt(0)==="{")try{const t=JSON.parse(e);if(t)return t}catch{}return e}function _d(e){if(typeof e!="string")return["Protobuf schema must be a string of .proto source"];try{return no(e),[]}catch(t){return[t instanceof Error?t.message:"Failed to parse protobuf schema"]}}const Ed="x-parser-original-payload",mr="x-lib-conversion-error",kd=/^application\/vnd\.apache\.avro(\+(json|yaml))?(\s*;\s*version=.+)?$/i,Od=/^application\/vnd\.google\.protobuf(\s*;\s*version=.+)?$/i;function xr(e){return typeof e=="string"&&kd.test(e)}function br(e){return typeof e=="string"&&Od.test(e)}function ec(e){return ge(e)&&typeof e.schemaFormat=="string"&&"schema"in e}function tc(e){var t,n;if(typeof e!="string")return null;if(xr(e)){const i=(t=/;\s*version=([^;\s]+)/.exec(e))==null?void 0:t[1];return i?`avro ${i}`:"avro"}if(br(e)){const i=(n=/;\s*version=([^;\s]+)/.exec(e))==null?void 0:n[1];return i?`protobuf ${i}`:"protobuf"}return e.startsWith("application/vnd.aai.asyncapi")||e.startsWith("application/schema")?null:e}function nc(e){return xr(e)?"Avro":br(e)?"Protobuf":null}function Td(e,t){return t?!1:!e||xr(e)||br(e)?!0:e.startsWith("application/vnd.aai.asyncapi")||e.startsWith("application/schema")}const Ad=["properties","oneOf","anyOf","allOf","not","$ref","additionalProperties","patternProperties","x-parser-schema-id"],Nd=new Set(["record","enum","fixed","map","int","long","float","double","bytes","uuid"]);function jd(e){return typeof e=="string"||Array.isArray(e)?!0:ge(e)?typeof e.type=="string"&&Nd.has(e.type)||Array.isArray(e.fields)||Array.isArray(e.symbols)?!0:!Ad.some(t=>t in e):!1}function $r(e,t){let n=e;if(t&&ge(n)&&typeof n.$ref=="string"){const o=t(n.$ref);o!==void 0&&(n=o)}const i=Sd(n),r=i.schema.description;if(typeof r=="string")return{...i,description:r};const s=ec(n)?n.description:void 0;return typeof s=="string"?{...i,description:s}:i}function Sd(e){var o;if(!ec(e))return{schema:Ht(e)??e};const{schemaFormat:t}=e,n=e.schema,i=e[Ed],r=(o=Ht(n))==null?void 0:o[mr];if(typeof r=="string")return{schema:Ht(i)??{},schemaFormat:t,originalSchema:i,conversionError:r};if(i!==void 0)return{schema:Ht(n)??{},schemaFormat:t,originalSchema:i};if(xr(t)&&jd(n)){const a=Ws(n);if(a.length>0)return{schema:Ht(n)??{},schemaFormat:t,originalSchema:n,conversionError:a[0]};try{return{schema:Os(n),schemaFormat:t,originalSchema:n}}catch(l){return{schema:Ht(n)??{},schemaFormat:t,originalSchema:n,conversionError:l instanceof Error?l.message:"Failed to convert Avro schema"}}}if(br(t)&&typeof n=="string")try{return{schema:no(n),schemaFormat:t,originalSchema:n}}catch(a){return{schema:{},schemaFormat:t,originalSchema:n,conversionError:a instanceof Error?a.message:"Failed to convert Protobuf schema"}}const s=Ht(n);return s?{schema:s,schemaFormat:t}:{schema:{},schemaFormat:t,originalSchema:n}}const Za=new Set,ro=e=>e.replace(/^#\//,"").split("/").pop()??e,Vt=(e,t,n)=>{if(!e.$ref)return{schema:e};const i=e.$ref,r=ro(i);if(n.has(i))return{schema:e,refLabel:r,circular:!0};const s=Ht(t(i));if(!s)return{schema:e,refLabel:r};const{schema:o}=$r(s);n.add(i);try{const a=Vt(o,t,n);return{schema:a.schema,refLabel:a.circular?void 0:r,circular:a.circular}}finally{n.delete(i)}},gn=e=>{const t=e.items,n=Array.isArray(t)?t[0]:t;return ge(n)?n:null},rc=e=>{const t=e.items;if(!Array.isArray(t)||t.length===0)return null;const n=t.filter(i=>ge(i));return n.length>0?n:null},Rd=e=>!Array.isArray(e.items)||e.additionalItems===void 0?null:typeof e.additionalItems=="boolean"||ge(e.additionalItems)?e.additionalItems:null,Id=e=>e.contains===void 0?null:typeof e.contains=="boolean"||ge(e.contains)?e.contains:null,ic=e=>e.contains!==void 0,Kr=(e,t)=>{if(!(!e&&!t))return!t||e===t?e??t:e?`${e}
146
+
147
+ ${t}`:t},Md=new Set(["allOf","oneOf","anyOf","not","if","then","else","_allOfConditionals","$ref","properties","patternProperties","propertyNames","additionalProperties","required","description","items"]),en=(e,t,n,i)=>{const r={...e};if(t.description&&(r.description=Kr(typeof r.description=="string"?r.description:void 0,typeof t.description=="string"?t.description:void 0)),t.required&&(r.required=Array.from(new Set([...r.required??[],...t.required]))),t.properties){r.properties={...r.properties??{}};for(const[s,o]of Object.entries(t.properties)){if(!ge(o))continue;const a=r.properties[s];ge(a)?r.properties[s]=en(a,o):r.properties[s]=o}}if(t.items)if(Array.isArray(t.items))Array.isArray(r.items)?r.items=t.items.map((s,o)=>{const a=r.items[o];return ge(s)&&ge(a)?en(a,s):ge(s)?s:a}):r.items=t.items;else{const s=gn(t),o=gn(r);s&&o?r.items=en(o,s):s&&(r.items=t.items)}if(t.patternProperties&&ge(t.patternProperties)){const s={...ge(r.patternProperties)?r.patternProperties:{}};for(const[o,a]of Object.entries(t.patternProperties)){if(!ge(a)){s[o]=a;continue}const l=s[o];ge(l)?s[o]=en(l,a):s[o]=a}r.patternProperties=s}if(t.propertyNames!==void 0)if(ge(t.propertyNames)){const s=r.propertyNames;r.propertyNames=ge(s)?en(s,t.propertyNames):t.propertyNames}else r.propertyNames=t.propertyNames;if(t.additionalProperties!==void 0)if(ge(t.additionalProperties)){const s=r.additionalProperties;r.additionalProperties=ge(s)?en(s,t.additionalProperties):t.additionalProperties}else r.additionalProperties=t.additionalProperties;for(const[s,o]of Object.entries(t))Md.has(s)||o===void 0||(r[s]=o);return r},Xa=(e,t,n)=>{const i={...e};delete i.allOf,i.properties&&(i.properties=Object.fromEntries(Object.entries(i.properties).map(([l,c])=>ge(c)?[l,st(c,t,n)]:[l,c])));const r=gn(i);r&&(i.items=st(r,t,n));const s=_r(i);s!==null&&ge(s)&&(i.propertyNames=st(s,t,n));const o=qn(i);o!==null&&ge(o)&&(i.additionalProperties=st(o,t,n));const a=io(i);return a.length>0&&(i.patternProperties=Object.fromEntries(a.map(([l,c])=>[l,st(c,t,n)]))),i},st=(e,t,n)=>{const i=e.allOf;if(Array.isArray(i)&&i.length>0){const r=[];let s={};for(const c of i){if(!ge(c))continue;const{schema:d,circular:f}=Vt(c,t,n);if(f)continue;const p=st(d,t,n);if(p.if!==void 0){const h={if:p.if};p.then!==void 0&&(h.then=p.then),p.else!==void 0&&(h.else=p.else),r.push(h)}r.push(...ac(p)),s=en(s,p)}if(e.if!==void 0){const c={if:e.if};e.then!==void 0&&(c.then=e.then),e.else!==void 0&&(c.else=e.else),r.push(c)}const o={...e};delete o.allOf;const a=Object.keys(o).length>0?en(s,o):s,l=Xa(a,t,n);if(r.length===1){const c=r[0];l.if=c.if,c.then!==void 0&&(l.then=c.then),c.else!==void 0&&(l.else=c.else)}else r.length>1&&(l._allOfConditionals=r);return l}return Xa(e,t,n)},vr=e=>{const t=e.oneOf;if(!Array.isArray(t)||t.length===0)return null;const n=t.filter(i=>ge(i));return n.length>0?n:null},wr=e=>{const t=e.anyOf;if(!Array.isArray(t)||t.length===0)return null;const n=t.filter(i=>ge(i));return n.length>0?n:null},sc=e=>e.not===void 0?null:typeof e.not=="boolean"||ge(e.not)?e.not:null,ct=e=>sc(e)!==null,oc=e=>{const{not:t,...n}=e;return n},Cd=e=>{const{if:t,then:n,else:i,...r}=e;return r},pt=e=>e.if!==void 0,ps=e=>e===void 0?null:typeof e=="boolean"||ge(e)?e:null,ac=e=>Array.isArray(e._allOfConditionals)?e._allOfConditionals.filter(t=>ge(t)):[],ht=e=>Array.isArray(e._allOfConditionals)&&e._allOfConditionals.length>0,_r=e=>e.propertyNames===void 0?null:typeof e.propertyNames=="boolean"||ge(e.propertyNames)?e.propertyNames:null,qn=e=>e.additionalProperties===void 0?null:typeof e.additionalProperties=="boolean"||ge(e.additionalProperties)?e.additionalProperties:null,io=e=>{const t=e.patternProperties;return ge(t)?Object.entries(t).flatMap(([n,i])=>ge(i)?[[n,i]]:[]):[]},Ld=(e,t)=>`${e}.[pattern:${t}]`,Er=e=>e.properties!==void 0&&Object.keys(e.properties).length>0,ni=e=>{const t=_r(e);if(t!==null&&ge(t))return!0;const n=qn(e);return n!==null&&ge(n)?!0:io(e).length>0},lc=e=>!!(vr(e)||wr(e)||Er(e)||ni(e)||e.type==="array"||e.items||e.type!==void 0),At=e=>!(ct(e)||pt(e)||ht(e)||vr(e)||wr(e)||Er(e)||ni(e)||e.items||ic(e)||e.type==="array"||e.type==="object");function Pd(e){if(typeof qn(e)=="boolean")return!0;const n=_r(e);return!!(typeof n=="boolean"||n!==null&&ge(n)&&At(n)&&typeof n.pattern=="string"&&n.pattern.length>0)}function Ya(e){return typeof e.multipleOf=="number"||typeof e.minimum=="number"||typeof e.exclusiveMinimum=="number"||typeof e.maximum=="number"||typeof e.exclusiveMaximum=="number"||typeof e.minLength=="number"||typeof e.maxLength=="number"||typeof e.minItems=="number"||typeof e.maxItems=="number"||typeof e.minProperties=="number"||typeof e.maxProperties=="number"||typeof e.pattern=="string"&&e.pattern.length>0||Array.isArray(e.enum)&&e.enum.length>0||e.const!==void 0||e.uniqueItems===!0||Pd(e)}const cc=(e,t)=>Ya(e)?!0:t?Ya(t):!1,Dd=(e,t)=>{if(ct(e)||pt(e)||ht(e)||vr(e)||wr(e)||Er(e)||ni(e))return!0;if(e.type==="array"||e.items){if(ic(e)||rc(e)!==null)return!0;const n=gn(e);if(!n)return!1;if(n.$ref&&t){const{schema:i}=Vt(n,t,Za),r=st(i,t,Za);return!At(r)}return!At(n)}return!1};function uc(e){return JSON.stringify(e)}function $a(e){return typeof e=="string"?e:JSON.stringify(e)}function mt({children:e}){return u.jsx("span",{className:"text-xs text-gray-500",children:e})}function fc({children:e,mono:t=!1,title:n}){return u.jsx("span",{className:"inline-flex items-center rounded-md bg-gray-100 px-2 py-1 text-xs font-medium text-gray-600",title:n,children:t?u.jsx("span",{className:"font-mono text-gray-700",children:e}):e})}function Fd(e){return typeof e.exclusiveMinimum=="number"?{value:e.exclusiveMinimum,op:"<"}:typeof e.minimum=="number"?{value:e.minimum,op:"≤"}:null}function Bd(e){return typeof e.exclusiveMaximum=="number"?{value:e.exclusiveMaximum,op:"<"}:typeof e.maximum=="number"?{value:e.maximum,op:"≤"}:null}function zd(e){return typeof e.minLength=="number"?{value:e.minLength,op:"≤"}:null}function qd(e){return typeof e.maxLength=="number"?{value:e.maxLength,op:"≤"}:null}function Ka(e,t){const n=e[t];return typeof n=="number"?{value:n,op:"≤"}:null}function Qa(e,t){const n=e[t];return typeof n=="number"?{value:n,op:"≤"}:null}function Br({name:e,lower:t,upper:n,suffix:i}){return!t&&!n?null:u.jsxs("span",{className:"inline-flex items-center gap-1",children:[t&&u.jsxs(u.Fragment,{children:[u.jsx(mt,{children:String(t.value)}),u.jsx(mt,{children:t.op})]}),u.jsx(mt,{children:e}),n&&u.jsxs(u.Fragment,{children:[u.jsx(mt,{children:n.op}),u.jsx(mt,{children:String(n.value)})]}),i&&u.jsx(mt,{children:i})]})}function Wr({value:e,displayValue:t}){const n=()=>{var s;(s=window.getSelection())!=null&&s.toString()||navigator.clipboard.writeText($a(e))},i=r=>{r.key!=="Enter"&&r.key!==" "||(r.preventDefault(),navigator.clipboard.writeText($a(e)))};return u.jsx("span",{role:"button",tabIndex:0,className:"inline-flex cursor-pointer select-text items-center rounded-md bg-gray-100 px-2 py-1 font-mono text-xs font-medium text-gray-700 hover:bg-gray-200",title:"Click to copy",onClick:n,onKeyDown:i,children:t??uc(e)})}function Ud({schema:e}){const t=qn(e);return typeof t!="boolean"?null:u.jsx(mt,{children:t?"additional properties allowed":"additional properties not allowed"})}function Hd({schema:e}){const t=_r(e);return typeof t=="boolean"?u.jsx(fc,{children:t?"any property name":"no property names"}):t!==null&&ge(t)&&At(t)&&typeof t.pattern=="string"&&t.pattern.length>0?u.jsxs("span",{className:"inline-flex items-center gap-1",children:[u.jsx(mt,{children:"property name pattern:"}),u.jsx(Wr,{value:t.pattern,displayValue:t.pattern})]}):null}function Ga({schema:e,rangeName:t="value"}){const n=Array.isArray(e.enum)&&e.enum.length>0?e.enum:null,i=Fd(e),r=Bd(e),s=zd(e),o=qd(e),a=Ka(e,"minItems"),l=Qa(e,"maxItems"),c=Ka(e,"minProperties"),d=Qa(e,"maxProperties");return u.jsxs(u.Fragment,{children:[typeof e.multipleOf=="number"&&u.jsxs("span",{className:"inline-flex items-center gap-1",children:[u.jsx(mt,{children:"multiple of :"}),u.jsx(fc,{children:String(e.multipleOf)})]}),(i||r)&&u.jsx(Br,{name:t,lower:i,upper:r}),(s||o)&&u.jsx(Br,{name:t,lower:s,upper:o,suffix:"chars"}),(a||l)&&u.jsx(Br,{name:t,lower:a,upper:l,suffix:"items"}),(c||d)&&u.jsx(Br,{name:t,lower:c,upper:d,suffix:"props"}),typeof e.pattern=="string"&&e.pattern.length>0&&u.jsxs("span",{className:"inline-flex items-center gap-1",children:[u.jsx(mt,{children:"regex pattern:"}),u.jsx(Wr,{value:e.pattern,displayValue:e.pattern})]}),n&&u.jsxs("span",{className:"inline-flex flex-wrap items-center gap-1",children:[u.jsx(mt,{children:"enum values:"}),n.map((f,p)=>u.jsx(Wr,{value:f},`${p}-${uc(f)}`))]}),e.const!==void 0&&u.jsxs("span",{className:"inline-flex items-center gap-1",children:[u.jsx(mt,{children:"const value:"}),u.jsx(Wr,{value:e.const})]}),e.uniqueItems===!0&&u.jsx(mt,{children:"unique"}),u.jsx(Ud,{schema:e}),u.jsx(Hd,{schema:e})]})}function dc({schema:e,itemSchema:t,fieldName:n,className:i="flex flex-col gap-1"}){const r=t!=null&&At(t),s=n??"value";return u.jsxs("div",{className:i,children:[u.jsx(Ga,{schema:e,rangeName:s}),r&&u.jsx(Ga,{schema:t,rangeName:"item"})]})}const pc=(e,t)=>{const n=vr(e);if(n)return{text:`one of (${n.length})`};const i=wr(e);if(i)return{text:`any of (${i.length})`};if(ct(e)&&!lc(oc(e)))return{text:"not"};if(e.type==="array"||e.items){const c=gn(e);if(c){const d=c.type;if(d==="object"){const f=c.$ref?ro(c.$ref):t;return f?{text:"Array of objects",refHint:f}:{text:"Array of objects"}}if(typeof d=="string"){const f=typeof c.format=="string"?c.format:void 0;return{text:`Array of ${d}`,format:f}}}return{text:"array"}}const r=Array.isArray(e.type)?e.type.join(" | "):e.type;let s=r?`${r}`:"type: unknown";const o=qn(e);!Er(e)&&o!==null&&ge(o)&&(r==="object"||s==="type: unknown")&&(s=r==="object"?"object (map)":"map");const a=typeof e.format=="string"?e.format:void 0,l=t&&(r==="object"||s.startsWith("object"))?t:void 0;return{text:s,format:a,refHint:l}},Vd=(e,t)=>{if(!t)return!1;const n=pc(e,t);return!n.refHint&&!n.text.includes(`(${t})`)};function hc({schema:e,refLabel:t,className:n="text-xs text-gray-500"}){const{text:i,format:r,refHint:s}=pc(e,t);return u.jsxs("span",{className:n,children:[r??i,s&&!i.includes(`(${s})`)&&u.jsxs("span",{className:"text-gray-400",children:[" (",s,")"]})]})}const el="ml-6";function zr({schema:e,showBorder:t=!0}){const n=typeof e.description=="string"?e.description:void 0;return u.jsxs("div",{className:`py-2 ${t?"border-b border-gray-200 last:border-b-0":""}`,children:[u.jsxs("div",{className:"flex items-center gap-2 min-h-[24px]",children:[u.jsx("span",{className:"w-4 shrink-0","aria-hidden":"true"}),u.jsx(hc,{schema:e})]}),cc(e)&&u.jsx(dc,{schema:e,className:`flex flex-col gap-1 mt-1 ${el}`}),n&&n.split(`
148
+
149
+ `).map((i,r)=>u.jsx("p",{className:`text-xs text-gray-500 mt-1 ${el} leading-relaxed`,children:i},r))]})}function hs({children:e}){return u.jsxs("div",{className:"py-2",children:[u.jsxs("div",{className:"flex flex-col items-start",children:[u.jsx("span",{className:"inline-block px-2 py-0.5 text-xs font-medium text-gray-700 border border-gray-300 rounded-md bg-white",children:"Should Not match:"}),u.jsx("div",{className:"w-px h-3 bg-gray-300 ml-[1.125rem]","aria-hidden":"true"})]}),e]})}function Wd({value:e}){const t=e?"any value":"false schema";return u.jsx("span",{className:"inline-flex items-center rounded-md bg-gray-100 px-2 py-1 text-xs font-medium text-gray-600",children:t})}function mc({tabs:e,selected:t,onChange:n,ariaLabel:i}){return u.jsx("div",{className:"inline-flex items-center gap-0.5 p-0.5 bg-gray-100 rounded-md border border-gray-200",role:"tablist","aria-label":i,children:e.map(({id:r,label:s})=>{const o=r===t;return u.jsx("button",{type:"button",role:"tab","aria-selected":o,onClick:()=>n(r),className:o?"px-3 py-1 text-xs font-semibold text-gray-900 bg-white rounded-md shadow-sm border border-gray-200":"px-3 py-1 text-xs font-medium text-gray-400 hover:text-gray-600 rounded-md",children:s},r)})})}function Jd({variant:e="oneOf",caseCount:t,caseLabels:n,selectedCase:i,onSelectCase:r,children:s}){if(t===0)return null;const o=(n==null?void 0:n.length)===t?n:Array.from({length:t},(c,d)=>`case ${d+1}`),a=e==="anyOf"?"Any of:":"One of:",l=e==="anyOf"?"Any of cases":"One of cases";return u.jsxs("div",{className:"py-2",children:[u.jsxs("div",{className:"flex flex-col items-start",children:[u.jsx("span",{className:"inline-block px-2 py-0.5 text-xs font-medium text-gray-700 border border-gray-300 rounded-md bg-white",children:a}),u.jsx("div",{className:"w-px h-3 bg-gray-300 ml-[1.125rem]","aria-hidden":"true"})]}),u.jsx(mc,{tabs:o.map((c,d)=>({id:String(d),label:c})),selected:String(i),onChange:c=>r(Number(c)),ariaLabel:l}),u.jsx("div",{role:"tabpanel",className:"mt-2",children:s})]})}const tl=[{line:"border-teal-500",text:"text-teal-600"},{line:"border-green-500",text:"text-green-600"},{line:"border-lime-500",text:"text-lime-600"},{line:"border-blue-500",text:"text-blue-600"},{line:"border-cyan-500",text:"text-cyan-600"},{line:"border-violet-500",text:"text-violet-600"}],so=e=>tl[e%tl.length],Zd="ml-0 border-dashed border-gray-300";function pn({depth:e,children:t,lineVariant:n="depth"}){if(n==="none")return u.jsx("div",{children:t});const i=n==="muted"?Zd:`ml-1.5 ${so(e).line}`;return u.jsx("div",{className:`pl-3 border-l-2 ${i}`,children:t})}function Xd({depth:e,expanded:t,onToggle:n}){const i=so(e);return u.jsxs("button",{type:"button",onClick:n,"aria-expanded":t,"aria-label":t?"Hide details":void 0,className:"cursor-pointer mt-1 flex items-center gap-1.5 shrink-0 text-left hover:opacity-80",children:[u.jsx("span",{"aria-hidden":"true",className:`w-4 h-4 rounded-full border-2 flex items-center justify-center text-[10px] leading-none font-bold ${i.line} ${i.text} hover:bg-gray-50`,children:t?"−":"+"}),!t&&u.jsx("span",{className:"text-xs text-gray-500",children:"Show details"})]})}const Yd="ml-6";function dt({path:e,depth:t,schema:n,refLabel:i,itemSchema:r,typeLabelOverride:s,required:o,description:a,expandable:l,expanded:c,onToggle:d,showBorder:f=!0}){const p=so(t),h=n&&Vd(n,i),g=l?Yd:"";let v="",E=e;if(e.endsWith("[]")){const _=e.slice(0,-2),w=_.lastIndexOf(".");w>=0?(v=_.slice(0,w+1),E=`${_.slice(w+1)}[]`):E=e}else{const _=e.lastIndexOf("."),w=e.lastIndexOf("[]"),y=Math.max(_,w);y>=0&&(v=e.slice(0,y+(e[y]==="."?1:2)),E=e.slice(y+(e[y]==="."?1:2)))}return f=f&&!c,u.jsxs("div",{className:`py-2 ${f?"border-b border-gray-200 last:border-b-0":""}`,children:[u.jsxs("div",{className:"flex items-center gap-2 min-h-[24px]",children:[u.jsxs("span",{className:"text-xs font-mono flex-1 min-w-0 flex items-center",children:[u.jsxs("span",{className:"truncate min-w-0",children:[v&&u.jsx("span",{className:"text-gray-400",children:v}),u.jsx("span",{className:`font-semibold ${p.text}`,children:E})]}),o&&u.jsx("span",{className:"shrink-0 text-red-500 ml-2 text-[10px]",children:"required"}),(n==null?void 0:n.readOnly)===!0&&u.jsx("span",{className:"shrink-0 text-gray-500 ml-2 text-[10px]",children:"readOnly"}),(n==null?void 0:n.writeOnly)===!0&&u.jsx("span",{className:"shrink-0 text-gray-500 ml-2 text-[10px]",children:"writeOnly"}),(n==null?void 0:n.deprecated)===!0&&u.jsx("span",{className:"shrink-0 text-amber-600 ml-2 text-[10px]",children:"deprecated"})]}),n?u.jsxs("div",{className:"shrink-0 text-right",children:[u.jsx(hc,{schema:n,refLabel:i}),h&&u.jsxs("span",{className:"text-xs text-gray-400",children:[" (ref: ",i,")"]})]}):s&&u.jsx("span",{className:"text-xs text-gray-500 shrink-0",children:s})]}),n&&cc(n,r)&&u.jsx(dc,{schema:n,itemSchema:r,fieldName:E,className:`flex flex-col gap-1 mt-1 ${g}`}),a&&a.split(`
150
+
151
+ `).map((_,w)=>u.jsx("p",{className:`text-xs text-gray-500 mt-1 ${g} leading-relaxed`,children:_},w)),l&&u.jsx(Xd,{depth:t,expanded:c,onToggle:d})]})}function ms({label:e,children:t}){return u.jsxs("div",{children:[u.jsx("div",{className:"pt-2 pb-0.5 first:pt-0",children:u.jsx("span",{className:"text-xs font-medium text-gray-700",children:e})}),u.jsx("div",{children:t})]})}function $d({ifContent:e,thenContent:t,elseContent:n}){return u.jsxs("div",{className:"py-2 pt-5 px-1",children:[u.jsx("div",{className:"flex flex-col items-start",children:u.jsx("span",{className:"inline-block px-2 py-0.5 text-xs font-medium text-gray-700 border-2 border-dashed border-gray-300 rounded-md bg-white",children:"Conditions apply:"})}),u.jsx(pn,{depth:0,lineVariant:"muted",children:u.jsxs("div",{className:"divide-y divide-gray-100",children:[u.jsx(ms,{label:"If schema matches:",children:e}),t!=null&&u.jsx(ms,{label:"Then schema should follow:",children:t}),n!=null&&u.jsx(ms,{label:"Else schema should follow:",children:n})]})})]})}function qr({label:e,children:t}){return u.jsxs("div",{className:"py-2",children:[u.jsxs("div",{className:"flex flex-col items-start",children:[u.jsx("span",{className:"inline-block px-2 py-0.5 text-xs font-medium text-gray-700 border border-gray-300 rounded-md bg-white",children:e}),u.jsx("div",{className:"w-px h-3 bg-gray-300 ml-[1.125rem]","aria-hidden":"true"})]}),t]})}const Kd=e=>e==="none"?"depth":e;function Tt({schema:e,path:t,depth:n,required:i,refStack:r,deref:s,suppressRow:o=!1,branchLineVariant:a="depth",defaultExpanded:l=!1}){const c=Kd(a),[d,f]=se.useState(l),[p,h]=se.useState(l);p!==l&&(h(l),f(l));const[g,v]=se.useState(0),{schema:E,refLabel:_,circular:w}=se.useMemo(()=>{const T=Vt(e,s,r);return T.circular?T:{...T,schema:st(T.schema,s,r)}},[e,s,r]),y=oc(Cd(E)),O=!lc(y)&&(ct(E)||pt(E)||ht(E)),I=()=>{const T=sc(E);if(T===null)return null;if(typeof T=="boolean")return u.jsx(hs,{children:u.jsx(Wd,{value:T})});const S=Vt(T,s,r);if(S.circular)return u.jsx(hs,{children:u.jsx(dt,{path:t,depth:n+1,typeLabelOverride:`↩ ${T.$ref}`,expandable:!1,expanded:!1,onToggle:()=>{},showBorder:!1})});const W=st(S.schema,s,r),B=At(W);return u.jsx(hs,{children:B?u.jsx(zr,{schema:W,showBorder:!1}):u.jsx(Tt,{schema:T,path:t,depth:n+1,refStack:r,deref:s,suppressRow:!0,branchLineVariant:c,defaultExpanded:l})})},j=(T,S)=>{if(typeof T=="boolean")return u.jsx("span",{className:"inline-flex items-center rounded-md bg-gray-100 px-2 py-1 text-xs font-medium text-gray-600",children:T?"any value":"false schema"});const W=Vt(T,s,r);if(W.circular)return u.jsx(dt,{path:S,depth:n+1,typeLabelOverride:`↩ ${T.$ref}`,expandable:!1,expanded:!1,onToggle:()=>{},showBorder:!1});const B=st(W.schema,s,r);return At(B)?u.jsx(zr,{schema:B,showBorder:!1}):u.jsx(Tt,{schema:T,path:S,depth:n+1,refStack:r,deref:s,suppressRow:!0,branchLineVariant:"none",defaultExpanded:l})},M=T=>{const S=ps(T.if);if(S===null)return null;const W=ps(T.then),B=ps(T.else);return u.jsx($d,{ifContent:j(S,t),thenContent:W!==null?j(W,t):void 0,elseContent:B!==null?j(B,t):void 0})},ee=()=>{const T=ac(E);return T.length===0?null:u.jsx(u.Fragment,{children:T.map((S,W)=>u.jsx("div",{children:M(S)},W))})};if(w)return u.jsx(dt,{path:t,depth:n,typeLabelOverride:`↩ ${e.$ref}`,expandable:!1,expanded:!1,onToggle:()=>{}});if(O){const T=u.jsxs(u.Fragment,{children:[ct(E)&&I(),pt(E)&&M(E),ht(E)&&ee()]});return o?T:u.jsxs(u.Fragment,{children:[u.jsx(dt,{path:t,depth:n,schema:E,refLabel:_,required:i,description:E.description,expandable:!0,expanded:d,onToggle:()=>f(S=>!S)}),d&&u.jsx(pn,{depth:n,lineVariant:a,children:T})]})}const q=vr(y),Y=wr(y),U=q??Y,pe=q?"oneOf":"anyOf";if(U){const T=U.map((de,G)=>typeof de.title=="string"?de.title:`case ${G+1}`),S=o?1:n+1,W=U[g],B=Vt(W,s,r),K=B.circular?B.schema:st(B.schema,s,r),be=!B.circular&&At(K)?u.jsx(zr,{schema:K,showBorder:!1}):u.jsx(Tt,{schema:W,path:t,depth:S-1,refStack:r,deref:s,suppressRow:!0,branchLineVariant:"none",defaultExpanded:l},g),Q=u.jsx(Jd,{variant:pe,caseCount:U.length,caseLabels:T,selectedCase:g,onSelectCase:v,children:be}),we=u.jsxs(u.Fragment,{children:[Q,ct(E)&&I(),pt(E)&&M(E),ht(E)&&ee()]});return o?we:u.jsxs(u.Fragment,{children:[u.jsx(dt,{path:t,depth:n,schema:E,refLabel:_,required:i,description:E.description,expandable:!0,expanded:d,onToggle:()=>f(de=>!de)}),d&&u.jsx(pn,{depth:n,lineVariant:a,children:we})]})}const R=(T,S,W)=>{const B=Vt(T,s,r);if(B.circular)return u.jsx(dt,{path:S,depth:W,typeLabelOverride:`↩ ${T.$ref}`,expandable:!1,expanded:!1,onToggle:()=>{},showBorder:!1});const K=st(B.schema,s,r);return At(K)?u.jsx(zr,{schema:K,showBorder:!1}):u.jsx(Tt,{schema:T,path:S,depth:W,refStack:r,deref:s,branchLineVariant:c,defaultExpanded:l})},k=T=>{const S=y.properties??{},W=new Set(y.required??[]),B=_r(y),K=qn(y),ne=io(y);return u.jsxs(u.Fragment,{children:[Object.entries(S).map(([be,Q])=>ge(Q)?u.jsx(Tt,{schema:Q,path:`${t}.${be}`,depth:T,required:W.has(be),refStack:r,deref:s,branchLineVariant:c,defaultExpanded:l},be):null),B!==null&&ge(B)&&u.jsx(qr,{label:"Property names must adhere to:",children:R(B,`${t}.[propertyName]`,T)}),ne.map(([be,Q])=>u.jsx(Tt,{schema:Q,path:Ld(t,be),depth:T,refStack:r,deref:s,branchLineVariant:c,defaultExpanded:l},be)),K!==null&&ge(K)&&u.jsx(qr,{label:"Additional properties must adhere to:",children:R(K,`${t}.[additionalProperty]`,T)}),ct(E)&&I(),pt(E)&&M(E),ht(E)&&ee()]})};if(Er(y)||ni(y))return o?k(n+1):u.jsxs(u.Fragment,{children:[u.jsx(dt,{path:t,depth:n,schema:E,refLabel:_,required:i,description:E.description,expandable:!0,expanded:d,onToggle:()=>f(T=>!T)}),d&&u.jsx(pn,{depth:n,lineVariant:a,children:k(n+1)})]});if(y.type==="array"||y.items){const T=rc(y),S=T!==null,W=S?Rd(y):null,B=Id(y),K=B!==null,ne=S?null:gn(y),be=ne!==null,Q=S||be||K||ct(E)||pt(E)||ht(E),we=`${t}[]`,de=be?st(Vt(ne,s,r).schema,s,r):null,G=!S&&!K&&de!==null&&At(de),Ee=de!=null&&de.properties?Object.entries(de.properties).filter(([,Be])=>ge(Be)):[],at=new Set(de&&Array.isArray(de.required)?de.required:[]),vt=Be=>u.jsxs(u.Fragment,{children:[S?u.jsxs(u.Fragment,{children:[T.map((Xe,jt)=>u.jsx(Tt,{schema:Xe,path:`${t}[${jt}]`,depth:Be,refStack:r,deref:s,branchLineVariant:c,defaultExpanded:l},jt)),W!==null&&typeof W!="boolean"&&u.jsx(qr,{label:"Additional items:",children:R(W,`${t}[*]`,Be)}),W===!1&&u.jsx("div",{className:"py-1 pl-6 text-xs text-gray-400",children:"no additional items allowed"})]}):be&&(Ee.length>0?Ee.map(([Xe,jt])=>u.jsx(Tt,{schema:jt,path:`${t}[].${Xe}`,depth:Be,required:at.has(Xe),refStack:r,deref:s,branchLineVariant:c,defaultExpanded:l},Xe)):u.jsx(Tt,{schema:ne,path:we,depth:Be,refStack:r,deref:s,branchLineVariant:c,defaultExpanded:l})),K&&u.jsx(qr,{label:"Contains at least one:",children:typeof B=="boolean"?u.jsx("span",{className:"inline-flex items-center rounded-md bg-gray-100 px-2 py-1 text-xs font-medium text-gray-600",children:B?"any item":"impossible constraint"}):R(B,`${t}[contains]`,Be)}),ct(E)&&I(),pt(E)&&M(E),ht(E)&&ee()]});return G&&!ct(E)&&!pt(E)&&!ht(E)?u.jsx(dt,{path:we,depth:n,schema:E,itemSchema:de,refLabel:_,required:i,description:Kr(E.description,de.description),expandable:!1,expanded:!1,onToggle:()=>{}}):G?u.jsxs(u.Fragment,{children:[u.jsx(dt,{path:we,depth:n,schema:E,itemSchema:de,refLabel:_,required:i,description:Kr(E.description,de.description),expandable:!0,expanded:d,onToggle:()=>f(Be=>!Be)}),d&&u.jsxs(pn,{depth:n,lineVariant:a,children:[ct(E)&&I(),pt(E)&&M(E),ht(E)&&ee()]})]}):o?Q?vt(n+1):null:u.jsxs(u.Fragment,{children:[u.jsx(dt,{path:we,depth:n,schema:E,itemSchema:de,refLabel:_,required:i,description:E.description,expandable:S||be||K||ct(E)||pt(E)||ht(E),expanded:d,onToggle:()=>f(Be=>!Be)}),d&&u.jsx(pn,{depth:n,lineVariant:a,children:vt(n+1)})]})}if(ct(E)||pt(E)||ht(E)){const T=u.jsxs(u.Fragment,{children:[ct(E)&&I(),pt(E)&&M(E),ht(E)&&ee()]});return o?T:u.jsxs(u.Fragment,{children:[u.jsx(dt,{path:t,depth:n,schema:E,refLabel:_,required:i,description:E.description,expandable:!0,expanded:d,onToggle:()=>f(S=>!S)}),d&&u.jsx(pn,{depth:n,lineVariant:a,children:T})]})}return o?null:u.jsx(dt,{path:t,depth:n,schema:E,refLabel:_,required:i,description:E.description,expandable:!1,expanded:!1,onToggle:()=>{}})}function oo({schema:e,rootName:t,className:n=""}){const{deref:i,defaultSchemaExpanded:r=!1}=Zt(),s=se.useMemo(()=>new Set,[]),o=Ht(e),a=se.useMemo(()=>o?st(o,i,s):null,[o,i,s]);if(!o||!a)return u.jsx("p",{className:"text-xs text-gray-400 italic",children:"No schema details available."});const l=t??(o.$ref?ro(o.$ref):void 0)??"schema",c=!!t;if(!Dd(a,i)&&!o.$ref){if(c)return a.type==="array"||a.items?u.jsx("div",{className:n,children:u.jsx(Tt,{schema:o,path:l,depth:0,refStack:s,deref:i,defaultExpanded:r})}):null;const f=a.type==="array"||a.items?`${l}[]`:l,p=gn(a),h=p?st(p,i,s):null,g=h!==null&&At(h);return u.jsx("div",{className:n,children:u.jsx(dt,{path:f,depth:0,schema:a,itemSchema:g?h:void 0,description:a.type==="array"||a.items?Kr(a.description,p==null?void 0:p.description):a.description,expandable:!1,expanded:!1,onToggle:()=>{}})})}return u.jsx("div",{className:n,children:u.jsx(Tt,{schema:o,path:l,depth:0,refStack:s,deref:i,suppressRow:c,defaultExpanded:r})})}function Qd(e){let t=e|0;return()=>{t=t+1831565813|0;let n=Math.imul(t^t>>>15,1|t);return n=n+Math.imul(n^n>>>7,61|n)^n,((n^n>>>14)>>>0)/4294967296}}function gc(e){let t=Qd(e),n={next(){return t()},int(i,r){return i+Math.floor(n.next()*(r-i+1))},bool(i=.5){return n.next()<i},pick(i){return i[n.int(0,i.length-1)]},shuffle(i){let r=[...i];for(let s=r.length-1;s>0;s--){let o=n.int(0,s);[r[s],r[o]]=[r[o],r[s]]}return r},fork(){let i=Math.floor(n.next()*4294967296);return gc(i)}};return n}function Gd(e){return null}function ep(e){return e.random.bool()}function yc(e,t,n=!1){let i=-1e3,r=1e3,s=!1,o=!1;if(e.minimum!==void 0&&(i=e.minimum),e.maximum!==void 0&&(r=e.maximum),e.exclusiveMinimum!==void 0&&(i=e.exclusiveMinimum,s=!0),e.exclusiveMaximum!==void 0&&(r=e.exclusiveMaximum,o=!0),e.multipleOf!==void 0)return tp(e.multipleOf,i,r,s,o,t);if(n){let c=s?Math.floor(i)+1:Math.ceil(i),d=o?Math.ceil(r)-1:Math.floor(r);return t.random.int(c,d)}let a=s?i+Number.EPSILON:i,l=o?r-Number.EPSILON:r;return a+t.random.next()*(l-a)}function tp(e,t,n,i,r,s){let o=Math.ceil(t/e),a=Math.floor(n/e);return i&&o*e===t&&o++,r&&a*e===n&&a--,o>a?o*e:s.random.int(o,a)*e}function np(e,t){if(e.autoIncrement){let n=e.initialOffset??1,i=rp(t.path),r=t.autoIncrementCounters??new Map,s=(r.get(i)??n-1)+1;return r.set(i,s),t.autoIncrementCounters&&t.autoIncrementCounters.set(i,s),s}return yc(e,t,!0)}function rp(e){return e.split("/").filter(t=>t!==""&&!/^\d+$/.test(t)).join("/")}function nl(e,t){let n=xc(e,0);return lr(n.node,t)}function lr(e,t){switch(e.type){case"literal":return e.value;case"dot":return t.pick([..."abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#%&*()-_=+[]{}|;:',.<>/? "]);case"anchor":return"";case"charClass":return ip(e,t);case"sequence":return e.nodes.map(n=>lr(n,t)).join("");case"alternation":return lr(t.pick(e.branches),t);case"quantifier":{let n=t.int(e.min,Math.min(e.max,e.min+5));return Array.from({length:n},()=>lr(e.node,t)).join("")}case"group":return lr(e.node,t)}}function ip(e,t){if(!e.negated)return t.pick(e.chars);let n=new Set(e.chars),i=[..."abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#%&*()-_=+[]{}|;:',.<>/? "].filter(r=>!n.has(r));return i.length>0?t.pick(i):"a"}function xc(e,t){let n=[],i=[];for(;t<e.length;){let r=e[t];if(r===")")break;if(r==="|"){n.push(rl(i)),i=[],t++;continue}if(r==="("){let a=t+1;if(e[a]==="?")if(e[a+1]===":")a+=2;else if(e[a+1]==="="||e[a+1]==="!"){let f=1,p=a;for(;p<e.length&&f>0;)p++,e[p]==="("&&f++,e[p]===")"&&f--;t=p+1;continue}else{for(a+=2;a<e.length&&e[a]!==">";)a++;a++}let l=xc(e,a),c={type:"group",node:l.node};t=l.pos+1;let d=or(e,t,c);i.push(d.node),t=d.pos;continue}if(r==="["){let a=op(e,t),l=or(e,a.pos,a.node);i.push(l.node),t=l.pos;continue}if(r==="."){let a={type:"dot"};t++;let l=or(e,t,a);i.push(l.node),t=l.pos;continue}if(r==="^"||r==="$"){i.push({type:"anchor"}),t++;continue}if(r==="\\"){t++;let a=sp(e,t);t=a.pos;let l=or(e,t,a.node);i.push(l.node),t=l.pos;continue}let s={type:"literal",value:r};t++;let o=or(e,t,s);i.push(o.node),t=o.pos}return n.push(rl(i)),{node:n.length===1?n[0]:{type:"alternation",branches:n},pos:t}}function rl(e){return e.length===0?{type:"literal",value:""}:e.length===1?e[0]:{type:"sequence",nodes:e}}function sp(e,t){let n=e[t];switch(t++,n){case"d":return{node:{type:"charClass",chars:[..."0123456789"],negated:!1},pos:t};case"D":return{node:{type:"charClass",chars:[..."0123456789"],negated:!0},pos:t};case"w":return{node:{type:"charClass",chars:[..."abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_"],negated:!1},pos:t};case"W":return{node:{type:"charClass",chars:[..."abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_"],negated:!0},pos:t};case"s":return{node:{type:"charClass",chars:[...`
152
+ `],negated:!1},pos:t};case"S":return{node:{type:"charClass",chars:[...`
153
+ `],negated:!0},pos:t};case"b":case"B":return{node:{type:"anchor"},pos:t};default:return{node:{type:"literal",value:n},pos:t}}}function op(e,t){t++;let n=!1;e[t]==="^"&&(n=!0,t++);let i=[];for(;t<e.length&&e[t]!=="]";){if(e[t]==="\\"&&t+1<e.length){t++;let r=e[t];switch(r){case"d":i.push(..."0123456789");break;case"w":i.push(..."abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_");break;case"s":i.push(...`
154
+ `);break;default:i.push(r)}t++;continue}if(t+2<e.length&&e[t+1]==="-"&&e[t+2]!=="]"){let r=e.charCodeAt(t),s=e.charCodeAt(t+2);for(let o=r;o<=s;o++)i.push(String.fromCharCode(o));t+=3;continue}i.push(e[t]),t++}return t++,{node:{type:"charClass",chars:i,negated:n},pos:t}}function or(e,t,n){if(t>=e.length)return{node:n,pos:t};let i=e[t],r,s;switch(i){case"*":r=0,s=5,t++;break;case"+":r=1,s=5,t++;break;case"?":r=0,s=1,t++;break;case"{":{let o=ap(e,t);if(o)r=o.min,s=o.max,t=o.pos;else return{node:n,pos:t};break}default:return{node:n,pos:t}}return t<e.length&&(e[t]==="?"||e[t]==="+")&&t++,{node:{type:"quantifier",node:n,min:r,max:s},pos:t}}function ap(e,t){let n=e.slice(t).match(/^\{(\d+)(?:,(\d*))?\}/);if(!n)return null;let i=parseInt(n[1],10),r;return n[2]===void 0?r=i:n[2]===""?r=i+5:r=parseInt(n[2],10),{min:i,max:r,pos:t+n[0].length}}function Nt(e){return e<10?`0${e}`:`${e}`}function lp(e,t){return new Date(e,t,0).getDate()}var bc="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";function cp(e){return!(e==="^"||e==="$"||e==="^$")}function up(e,t){if(e.format){if(e.format==="date-time"&&(t.minDateTime!==void 0||t.maxDateTime!==void 0))return fp(t);let o=t.formatRegistry.get(e.format);if(o){let a=o(t.random),l=t.minLength??e.minLength,c=t.maxLength??e.maxLength;return l!==void 0&&a.length<l?gs(a,l,t):c!==void 0&&a.length>c?a.slice(0,c):a}}if(e.pattern){let o=t.minLength??e.minLength,a=t.maxLength??e.maxLength;for(let d=0;d<50;d++){let f=nl(e.pattern,t.random);if(!(o!==void 0&&f.length<o)&&!(a!==void 0&&f.length>a))return f}let l=nl(e.pattern,t.random),c=cp(e.pattern);return o!==void 0&&l.length<o&&c?gs(l,o,t):a!==void 0&&l.length>a?l.slice(0,a):l}let n=e.minLength??0,i=e.maxLength??Math.max(n+10,10),r=t.random.int(n,i),s="";for(let o=0;o<r;o++)s+=t.random.pick([...bc]);return t.maxLength!==void 0&&s.length>t.maxLength&&(s=s.slice(0,t.maxLength)),t.minLength!==void 0&&s.length<t.minLength&&(s=gs(s,t.minLength,t)),s}function gs(e,t,n){for(;e.length<t;)e+=n.random.pick([...bc]);return e}function fp(e){let t=e.minDateTime?new Date(e.minDateTime):new Date("1970-01-01"),n=e.maxDateTime?new Date(e.maxDateTime):new Date,i=t.getTime(),r=n.getTime(),s=i+e.random.next()*(r-i),o=new Date(s),a=o.getFullYear(),l=Nt(o.getMonth()+1),c=Nt(o.getDate());return`${a}-${l}-${c}T01:01:01.0Z`}function il(e,t){if(e.const!==void 0)return structuredClone(e.const);if(e.enum!==void 0&&e.enum.length>0){let n=e.enum;if(e.minimum!==void 0||e.maximum!==void 0||e.exclusiveMinimum!==void 0||e.exclusiveMaximum!==void 0||e.multipleOf!==void 0){let r=e.exclusiveMinimum??e.minimum??-1/0,s=e.exclusiveMaximum??e.maximum??1/0,o=e.exclusiveMinimum!==void 0,a=e.exclusiveMaximum!==void 0;n=n.filter(l=>{if(typeof l!="number")return!0;let c=o?l>r:l>=r,d=a?l<s:l<=s;if(!c||!d)return!1;if(e.multipleOf!==void 0){let f=e.multipleOf,p=f.toString().includes(".")?f.toString().split(".")[1].length:0,h=Math.pow(10,p),g=Math.round(l*h),v=Math.round(f*h);if(g%v!==0)return!1}return!0})}if(e.minLength!==void 0||e.maxLength!==void 0){let r=e.minLength??0,s=e.maxLength??1/0;n=n.filter(o=>typeof o!="string"?!0:o.length>=r&&o.length<=s)}if(e.minItems!==void 0||e.maxItems!==void 0){let r=e.minItems??0,s=e.maxItems??1/0;n=n.filter(o=>Array.isArray(o)?o.length>=r&&o.length<=s:!0)}if(e.minProperties!==void 0||e.maxProperties!==void 0){let r=e.minProperties??0,s=e.maxProperties??1/0;n=n.filter(o=>typeof o!="object"||o===null||Array.isArray(o)?!0:Object.keys(o).length>=r&&Object.keys(o).length<=s)}if(n.length===0){let r=[];throw e.minLength!==void 0&&r.push(`minLength: ${e.minLength}`),e.maxLength!==void 0&&r.push(`maxLength: ${e.maxLength}`),e.minItems!==void 0&&r.push(`minItems: ${e.minItems}`),e.maxItems!==void 0&&r.push(`maxItems: ${e.maxItems}`),e.minProperties!==void 0&&r.push(`minProperties: ${e.minProperties}`),e.maxProperties!==void 0&&r.push(`maxProperties: ${e.maxProperties}`),e.minimum!==void 0&&r.push(`minimum: ${e.minimum}`),e.maximum!==void 0&&r.push(`maximum: ${e.maximum}`),e.exclusiveMinimum!==void 0&&r.push(`exclusiveMinimum: ${e.exclusiveMinimum}`),e.exclusiveMaximum!==void 0&&r.push(`exclusiveMaximum: ${e.exclusiveMaximum}`),e.multipleOf!==void 0&&r.push(`multipleOf: ${e.multipleOf}`),Error(`enum values conflict with constraints [${r.join(", ")}] at ${t.path}`)}let i=t.random.pick(n);return typeof i=="object"&&i!==null?structuredClone(i):i}throw Error(`generateEnumConst called without enum or const at ${t.path}`)}function Dt(e){let t={};for(let n of e){if(typeof n=="boolean"){if(!n)return{not:{}};continue}wc(t,n)}return t}function vc(e,t){if(typeof e=="boolean"||typeof t=="boolean")return{};if(typeof e!="object"||e===null)return typeof t=="object"&&t!==null?t:{};if(typeof t!="object"||t===null)return e;let n={...e};return wc(n,t),n}function wc(e,t){if(t.type!==void 0&&(e.type===void 0?e.type=t.type:e.type=dp(e.type,t.type)),t.minimum!==void 0&&(e.minimum=e.minimum!==void 0?Math.max(e.minimum,t.minimum):t.minimum),t.maximum!==void 0&&(e.maximum=e.maximum!==void 0?Math.min(e.maximum,t.maximum):t.maximum),t.exclusiveMinimum!==void 0&&(e.exclusiveMinimum=e.exclusiveMinimum!==void 0?Math.max(e.exclusiveMinimum,t.exclusiveMinimum):t.exclusiveMinimum),t.exclusiveMaximum!==void 0&&(e.exclusiveMaximum=e.exclusiveMaximum!==void 0?Math.min(e.exclusiveMaximum,t.exclusiveMaximum):t.exclusiveMaximum),t.multipleOf!==void 0&&(e.multipleOf=t.multipleOf),t.minLength!==void 0&&(e.minLength=e.minLength!==void 0?Math.max(e.minLength,t.minLength):t.minLength),t.maxLength!==void 0&&(e.maxLength=e.maxLength!==void 0?Math.min(e.maxLength,t.maxLength):t.maxLength),t.pattern!==void 0&&(e.pattern=t.pattern),t.format!==void 0&&(e.format=t.format),t.minItems!==void 0&&(e.minItems=e.minItems!==void 0?Math.max(e.minItems,t.minItems):t.minItems),t.maxItems!==void 0&&(e.maxItems=e.maxItems!==void 0?Math.min(e.maxItems,t.maxItems):t.maxItems),t.uniqueItems&&(e.uniqueItems=!0),t.items!==void 0&&(e.items=t.items),t.prefixItems!==void 0)if(e.prefixItems===void 0)e.prefixItems=t.prefixItems;else{let n=[],i=Math.max(e.prefixItems.length,t.prefixItems.length);for(let r=0;r<i;r++){let s=e.prefixItems[r],o=t.prefixItems[r];s!==void 0&&o!==void 0?n.push(vc(s,o)):s!==void 0?n.push(s):o!==void 0&&n.push(o)}e.prefixItems=n}if(t.contains!==void 0&&(e.containsAll!==void 0?e.containsAll=[...e.containsAll,t.contains]:e.contains!==void 0?(e.containsAll=[e.contains,t.contains],delete e.contains):e.contains=t.contains),t.properties&&(e.properties=pp(e.properties??{},t.properties)),t.required&&(e.required=[...new Set([...e.required??[],...t.required])]),t.additionalProperties!==void 0&&(e.additionalProperties=t.additionalProperties),t.patternProperties&&(e.patternProperties={...e.patternProperties??{},...t.patternProperties}),t.minProperties!==void 0&&(e.minProperties=e.minProperties!==void 0?Math.max(e.minProperties,t.minProperties):t.minProperties),t.maxProperties!==void 0&&(e.maxProperties=e.maxProperties!==void 0?Math.min(e.maxProperties,t.maxProperties):t.maxProperties),t.const!==void 0&&(e.const=t.const),t.enum!==void 0)if(e.enum!==void 0){let n=new Set(t.enum.map(i=>JSON.stringify(i)));e.enum=e.enum.filter(i=>n.has(JSON.stringify(i)))}else e.enum=t.enum;t.$ref&&(e.$ref=t.$ref),t.$defs&&(e.$defs={...e.$defs??{},...t.$defs}),t.allOf&&(e.allOf=[...e.allOf??[],...t.allOf]),t.anyOf&&(e.anyOf=t.anyOf),t.oneOf&&(e.oneOf=t.oneOf)}function dp(e,t){let n=Array.isArray(e)?e:[e],i=Array.isArray(t)?t:[t],r=n.filter(s=>i.includes(s));return r.length===0?n[0]:r.length===1?r[0]:r}function pp(e,t){let n={...e};for(let[i,r]of Object.entries(t)){let s=e[i];s===void 0?n[i]=r:typeof s=="object"&&typeof r=="object"?n[i]=vc(s,r):n[i]=r}return n}var ri=new Set(["$schema","$id","$ref","$defs","$anchor","$dynamicRef","$dynamicAnchor","$vocabulary","$comment","type","enum","const","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","minLength","maxLength","pattern","format","contentEncoding","contentMediaType","contentSchema","items","prefixItems","contains","minItems","maxItems","uniqueItems","minContains","maxContains","properties","required","additionalProperties","patternProperties","minProperties","maxProperties","propertyNames","dependentRequired","dependentSchemas","allOf","anyOf","oneOf","not","if","then","else","faker","chance","jsonPath","template","default","examples","description","title","readOnly","writeOnly","deprecated"]);function _c(e){return typeof e!="object"||e===null?!1:Object.keys(e).some(t=>ri.has(t))}function sl(e,t){if(typeof t!="object"||t===null)return!1;let n=t;return n.const!==void 0?e===n.const:n.enum!==void 0?n.enum.some(i=>i===e):!1}function hp(e){return typeof e=="boolean"?!e:typeof e!="object"||e===null?!1:e.not===!0||typeof e.not=="object"&&e.not!==null&&Object.keys(e.not).length===0}function mp(e){if(e.properties)return e.properties;if(e.type==="object"||e.type===void 0){let t={},n=!1;for(let[i,r]of Object.entries(e))ri.has(i)||(_c(r)?(t[i]=r,n=!0):(t[i]={const:r},n=!0));if(n)return t}return{}}function gp(e,t){return e.required?e.required:e.properties===void 0&&Object.keys(t).length>0?Object.keys(t):[]}async function yp(e,t){var w;let n=mp(e),i=gp(e,n);if(t.depth>=t.maxDepth){if(i.length===0)return{};let y={};for(let O of i){let I=n[O];if(I&&typeof I=="object"&&I!==null){let j=I;j.const!==void 0?y[O]=j.const:j.default!==void 0?y[O]=j.default:j.enum!==void 0&&j.enum.length>0?y[O]=j.enum[0]:y[O]=wp(j.type)}else y[O]=null}return y}if(e.additionalProperties===!1){let y=Object.keys(n).length>0,O=e.patternProperties&&Object.keys(e.patternProperties).length>0,I=new Set(Object.keys(n)),j=[...new Set(i)].filter(M=>!I.has(M));if((e.minProperties??0)>0&&!y&&!O)throw Error(`missing properties for ${e.minProperties} in ${t.path}: additionalProperties is false but no properties or patternProperties defined`);if(j.length>0&&!O&&!y)throw Error(`missing properties for ${j.join(", ")} in ${t.path}: additionalProperties is false but required properties not defined in properties`)}let r=t.path==="/"?"/properties":`${t.path}/properties`,s={...t,depth:t.depth+1,path:r},o={},a=new Set,l=new Set(i),c=t.alwaysFakeOptionals??!1,d=t.fillProperties??!0,f=t.fixedProbabilities??!1,p=t.optionalsProbability??.5,h=Object.keys(n).filter(y=>!l.has(y)),g;if(f&&!c&&h.length>0){let y=Math.round(h.length*p);g=new Set(h.slice(0,y))}let v=y=>c?!0:g?g.has(y):t.random.bool(p);if(Object.keys(n).length>0)for(let[y,O]of Object.entries(n)){if(hp(O))continue;a.add(y);let I=Qt(s,y),j=l.has(y),M=typeof O=="object"&&O!==null&&O.type==="object",ee=O;if(e.patternProperties&&typeof O=="object"&&O!==null){let q=[];for(let[Y,U]of Object.entries(e.patternProperties))try{new RegExp(Y).test(y)&&q.push(U)}catch{}q.length>0&&(ee=Dt([O,...q]))}if(j){let q=await Ne(ee,I);q!==void 0&&(o[y]=q)}else if(v(y)){let q=await Ne(ee,I);q!==void 0&&(o[y]=q)}else if(M&&!d){let q=O.required??[];if(q.length>0){let Y={};for(let U of q){let pe=(O.properties??{})[U]??{},R=Qt(I,U),k=await Ne(pe,R);k!==void 0&&(Y[U]=k)}o[y]=Y}}}for(let y of l)if(!(o[y]!==void 0||a.has(y))){if(e.patternProperties){let O=[];for(let[I,j]of Object.entries(e.patternProperties))new RegExp(I).test(y)&&O.push(j);if(O.length>0){let I=O.length===1?O[0]:Dt(O),j=Qt(s,y),M=await Ne(I,j);M!==void 0&&(o[y]=M),a.add(y)}}if(!a.has(y)){let O=e.additionalProperties??!0;if(O!==!1){let I=Qt(s,y),j=await Ne(O===!0?{}:O,I);j!==void 0&&(o[y]=j),a.add(y)}}}if(e.dependencies){for(let[y,O]of Object.entries(e.dependencies))if(!(typeof O!="object"||O===null||Array.isArray(O))&&o[y]!==void 0&&!a.has(y+"_dep")){a.add(y+"_dep");let I=O.oneOf??O.anyOf??O.allOf??[O],j=null;for(let M of I){if(typeof M!="object"||M===null)continue;let{properties:ee,not:q}=M;if(ee&&ee[y]){let Y=ee[y],U=o[y];if(sl(U,Y)){j=M;break}}if(q!=null&&q.properties){let Y=q.properties[y];if(Y){let U=o[y];if(!sl(U,Y)){j=M;break}}}}if(!j&&I.length>0&&typeof I[0]=="object"&&(j=I[0]),j!=null&&j.not){let M=j.not;if(M.required&&Array.isArray(M.required))for(let ee of M.required)delete o[ee]}if(j!=null&&j.required)for(let M of j.required){if(M===y||o[M]!==void 0)continue;let ee=((w=j.properties)==null?void 0:w[M])??{type:"object"},q=Qt(s,M),Y=await Ne(ee,q);Y!==void 0&&(o[M]=Y)}if(j&&j.properties)for(let[M,ee]of Object.entries(j.properties)){if(M===y)continue;let q=Qt(s,M),Y=await Ne(ee,q);Y!==void 0&&(o[M]=Y)}}}let E=e.minProperties??0,_=e.maxProperties;if(Object.keys(o).length<E){if(e.patternProperties&&Object.keys(e.patternProperties).length>0){let y=Object.entries(e.patternProperties),O=0,I=1e3;for(;Object.keys(o).length<E&&O<I;){O++;let[j,M]=t.random.pick(y),ee=vp(j,t);if(ee&&!o[ee]){let q=Qt(s,ee),Y=await Ne(M,q);Y!==void 0&&(o[ee]=Y),a.add(ee)}}}if(Object.keys(o).length<E){let y=e.additionalProperties,O=y===void 0||y===!0?{type:"string"}:y;if(O!==!1){let I=0,j=1e3;for(;Object.keys(o).length<E&&I<j;){I++;let M=`prop${t.random.int(0,99999)}`;if(!o[M]){let ee=Qt(s,M),q=await Ne(O,ee);q!==void 0&&(o[M]=q),a.add(M)}}}}if(Object.keys(o).length<E){let y=Object.keys(n).join(", ");throw Error(`properties '${y}' were not found while additionalProperties is false in ${t.path}`)}}if(_!==void 0&&Object.keys(o).length>_){let y=Object.keys(o).filter(O=>!l.has(O));for(t.random.shuffle(y);Object.keys(o).length>_&&y.length>0;){let O=y.pop();delete o[O]}}return t.pruneProperties&&t.pruneProperties.length>0&&Ts(o,t.pruneProperties),bp(o,n),o}function Qt(e,t){let n=xp(t),i=e.outputPath==="/"?`/${n}`:`${e.outputPath}/${n}`;return{...e,path:`${e.path}/${t}`,outputPath:i}}function xp(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function bp(e,t){for(let[n,i]of Object.entries(t)){if(typeof i!="object"||i===null)continue;let r=i;if(r.template===void 0)continue;let s=r.template;if(typeof s!="string")continue;let o=s.replace(/#\{(\w+)\}/g,(a,l)=>{let c=e[l];return c!==void 0?String(c):""});e[n]=o}}function vp(e,t){let n=e.match(/^\^([a-zA-Z]+)(\.\*|\(\?\:.*\))?/);if(n){let l=n[1],c=n[2];if(c===".*"||c!=null&&c.includes("?:")){let d=t.random.int(0,10),f="";for(let p=0;p<d;p++)f+=t.random.pick("abcdefghijklmnopqrstuvwxyz".split(""));return l+f}return l}let i=e.match(/(.*\*)?([a-zA-Z]+)\$$/);if(i){let l=i[2],c=t.random.int(1,10),d="";for(let f=0;f<c;f++)d+=t.random.pick("abcdefghijklmnopqrstuvwxyz".split(""));return d+l}let r=e.match(/^\^([a-zA-Z]+)\$$/);if(r)return r[1];let s=t.random.int(3,10),o="abcdefghijklmnopqrstuvwxyz",a="";for(let l=0;l<s;l++)a+=t.random.pick(o.split(""));try{if(new RegExp(e).test(a))return a}catch{}return null}function Ts(e,t){if(typeof e!="object"||e===null)return;if(Array.isArray(e)){for(let i of e)Ts(i,t);return}let n=e;for(let i of Object.keys(n))t.includes(i)?delete n[i]:Ts(n[i],t)}function wp(e){switch(Array.isArray(e)?e[0]:e){case"string":return"";case"number":case"integer":return 0;case"boolean":return!1;case"null":return null;case"array":return[];case"object":return{};default:return null}}async function _p(e,t){var _;if(t.depth>=t.maxDepth){let w=e.minItems??0;return w>0?Array.from({length:w},()=>null):[]}if(t.refDepthReached){let w=e.minItems??0;return w>0?Array.from({length:w},()=>null):[]}if(e.items===!1&&(e.minItems??0)>0){let w=((_=e.prefixItems)==null?void 0:_.length)??0;if((e.minItems??0)>w)throw Error(`missing items for ${e.minItems} in ${t.path}: items is false but minItems (${e.minItems}) exceeds prefixItems count (${w})`)}let n=t.path==="/"?"/items":`${t.path}/items`,i={...t,depth:t.depth+1,path:n},r=[],s=t.refDepthMax,o=t.minItems??e.minItems??0,a=t.maxItems??e.maxItems??Math.max(o,t.maxDefaultItems);e.maxItems!==void 0&&a>e.maxItems&&(a=e.maxItems),e.minItems!==void 0&&o<e.minItems&&(o=e.minItems),a<o&&(e.maxItems!==void 0?o=a:a=o),t.alwaysFakeOptionals&&(a=Math.max(o,a));let l=e.uniqueItems?new Set:null,c=async(w,y)=>{let O=await Ne(w,y);if(O===void 0)return"omitted";if(l){let I=JSON.stringify(O);if(l.has(I)){for(let j=0;j<50;j++){if(O=await Ne(w,Gt(i,r.length)),O===void 0)continue;let M=JSON.stringify(O);if(!l.has(M))return l.add(M),r.push(O),"added"}return"failed"}l.add(I)}return r.push(O),"added"};if(e.prefixItems)for(let w=0;w<e.prefixItems.length&&r.length<a;w++){let y=Gt(i,w);if(await c(e.prefixItems[w],y)==="failed")break}let d;if(s!==void 0&&t.refDepth>=s-1){let w=e.minItems??0;return w>0?Array.from({length:w},()=>null):[]}let f=t.alwaysFakeOptionals??!1,p=t.fixedProbabilities??!1,h=t.optionalsProbability??.5;if(f)d=a;else if(p){let w=a-Math.max(o,r.length),y=Math.round(w*h);d=Math.max(o,r.length)+y}else d=t.random.int(Math.max(o,r.length),a);e.items;let g=e.prefixItems!==void 0,v=e.additionalItems!==void 0,E;if(g?v?E=e.additionalItems:e.items!==void 0&&(E=e.items):E=e.items,E!==!1&&E!==void 0){let w=E??{},y=0,O=Math.max(d*20,50);for(;r.length<d;){let I=await c(w,Gt(i,r.length));if(I==="added"){y=0;continue}if(y++,I==="failed"||y>=O)break}}if(e.contains){let w=e.minContains??1,y=e.maxContains??Math.max(w,1),O=t.random.int(w,y);for(let I=0;I<O;I++){let j=await Ne(e.contains,Gt(i,r.length));if(j!==void 0){if(l){let M=JSON.stringify(j);if(l.has(M)){let ee=!1;for(let q=0;q<50;q++){if(j=await Ne(e.contains,Gt(i,r.length)),j===void 0)continue;let Y=JSON.stringify(j);if(!l.has(Y)){l.add(Y),ee=!0;break}}if(!ee)continue}else l.add(M)}if(r.length<a){let M=t.random.int(0,r.length);r.splice(M,0,j)}else if(r.length>0){let M=t.random.int(0,r.length-1);r[M]=j}}}for(;r.length>a;)r.pop()}if(e.containsAll){let w=new Set;for(let y of e.containsAll){let O=await Ne(y,Gt(i,r.length));if(O!==void 0){if(l){let I=JSON.stringify(O);if(l.has(I)){let j=!1;for(let M=0;M<50;M++){if(O=await Ne(y,Gt(i,r.length)),O===void 0)continue;let ee=JSON.stringify(O);if(!l.has(ee)){l.add(ee),j=!0;break}}if(!j)continue}else l.add(I)}if(r.length<a){let I=t.random.int(0,r.length);r.splice(I,0,O);let j=new Set;for(let M of w)j.add(M>=I?M+1:M);w.clear();for(let M of j)w.add(M);w.add(I)}else if(r.length>0){let I=Array.from({length:r.length},(j,M)=>M).filter(j=>!w.has(j));if(I.length>0){let j=I[t.random.int(0,I.length-1)];r[j]=O,w.add(j)}else r.push(O),w.add(r.length-1)}}}for(;r.length>a;)r.pop()}return e.uniqueItems&&r.length>0?Ep(r,e,i,o,a,l):r}async function Ep(e,t,n,i,r,s){let o=t.items??{},a=0,l=100;for(;e.length<i&&a<l;){a++;let c=await Ne(o,Gt(n,e.length));if(c===void 0)continue;let d=JSON.stringify(c);s.has(d)||(s.add(d),e.push(c))}for(;e.length>r;)e.pop();return e}function Gt(e,t){let n=e.outputPath==="/"?`/${t}`:`${e.outputPath}/${t}`;return{...e,path:`${e.path}/${t}`,outputPath:n}}function ol(e,t){if(!t||t==="")return e;if(typeof e!="object"||e===null)throw Error(`Cannot resolve fragment "${t}" in non-object schema`);if(t.startsWith("/"))return kp(e,t);throw Error(`Unsupported fragment type: ${t}. Only JSON pointers (starting with /) are supported.`)}function kp(e,t){if(t===""||t==="/")return e;let n=t.slice(1).split("/"),i=e;for(let r of n){let s=r.replace(/~1/g,"/").replace(/~0/g,"~");if(typeof i!="object"||i===null)throw Error(`Cannot resolve JSON pointer "${t}": not an object at "${s}"`);if(Array.isArray(i)){let o=parseInt(s,10);if(isNaN(o)||o<0||o>=i.length)throw Error(`Cannot resolve JSON pointer "${t}": invalid array index "${s}"`);i=i[o]}else{if(!(s in i))throw Error(`Cannot resolve JSON pointer "${t}": property "${s}" not found`);i=i[s]}}return i}function Op(e){let t=new Map;if(typeof e=="boolean")return t;if(e.$id&&typeof e=="object"){let n=e,i=n.$id,{$id:r,...s}=n;t.set(i,s)}if(e.$defs)for(let[n,i]of Object.entries(e.$defs))t.set(`#/$defs/${n}`,i);return t}async function Qr(e,t){let n=e.$ref;if(!n)return{schema:e,ctx:t};let i=t.refDepth+1;if(t.refDepthMax!==void 0&&i>=t.refDepthMax)return{schema:{},ctx:{...t,refDepthReached:!0}};if(t.refStack.has(n)){if(t.refDepthMax!==void 0){if(t.refDepth>=t.refDepthMax)return{schema:{},ctx:{...t,refDepthReached:!0}}}else if(t.depth>=t.maxDepth)return{schema:{type:"null"},ctx:t}}let r,s;if(n.startsWith("#/")){if(r=t.refRegistry.get(n),r===void 0&&n.length>2){let f=t.refRegistry.get("#");if(f!==void 0&&typeof f=="object")try{r=ol(f,n.slice(1))}catch{}}r===void 0&&t.refResolver&&(r=await t.refResolver(n),r!==void 0&&t.refRegistry.set(n,r))}else if(n==="#")r=t.refRegistry.get("#")??{};else if(r=t.refRegistry.get(n),r===void 0&&t.refResolver){s=await t.refResolver(n);let f=n.indexOf("#");if(f!==-1){let p=n.slice(f+1);p?r=ol(s,p):r=s}else r=s;if(s&&typeof s=="object"&&s!==null){let p=s;if(p.$defs)for(let[h,g]of Object.entries(p.$defs))t.refRegistry.set(`#/$defs/${h}`,g)}}if(r===void 0)throw Error(`Unresolved $ref: ${n}`);let o=new Set(["description","title","$comment","readOnly","writeOnly","deprecated"]),{$ref:a,...l}=e,c=Object.fromEntries(Object.entries(l).filter(([f])=>!o.has(f)));Object.keys(c).length>0&&typeof r=="object"&&r!==null&&(r={...r,...c});let d={...t,refStack:new Set([...t.refStack,n]),refDepth:t.refDepth+1};return{schema:r,ctx:d}}function Tp(e,t){typeof e!="boolean"&&(t.set("#",e),As(e,"#",t))}function As(e,t,n){if(e.$id){let{$id:i,...r}=e;n.set(i,r)}if(e.$defs)for(let[i,r]of Object.entries(e.$defs)){let s=`${t}/$defs/${i}`;n.set(s,r),typeof r=="object"&&r!==null&&As(r,s,n)}if(e.properties)for(let[i,r]of Object.entries(e.properties))typeof r=="object"&&r!==null&&As(r,`${t}/properties/${i}`,n)}async function Ap(e,t){return e.$ref?(await Qr(e,t)).schema:e}async function Np(e,t){let n=[];for(let i of e)if(typeof i=="object"&&i!==null&&"$ref"in i){let r=await Ap(i,t);n.push(r)}else typeof i=="object"&&i!==null&&n.push(i);return n}async function jp(e,t){let{allOf:n,anyOf:i,oneOf:r,not:s,if:o,then:a,else:l,...c}=e;if(n){let d=await Np(n,t),f=Dt([c,...d]);return Ne(f,t)}if(r){let d=t.random.shuffle([...r]),f=c.required??[];for(let y of d){let O=typeof y=="object"&&y!==null?y:{};O.$ref&&(O=(await Qr(O,t)).schema);let I=O.required??[],j=[...new Set([...f,...I])],M={...c,required:j},ee=Dt([M,O]),q={...t,optionalsProbability:0,alwaysFakeOptionals:!1};try{return await Ne(ee,q)}catch{}}let p=r[0],h=typeof p=="object"&&p!==null?p:{};h.$ref&&(h=(await Qr(h,t)).schema);let g=h.required??[],v=[...new Set([...f,...g])],E={...c,required:v},_=Dt([E,h]),w={...t,optionalsProbability:0,alwaysFakeOptionals:!1};return Ne(_,w)}if(i){let d=t.random.shuffle([...i]);for(let h of d){let g=Dt([c,h]);try{return await Ne(g,t)}catch{}}let f=i[0],p=Dt([c,f]);return Ne(p,t)}return o!==void 0?Sp(c,o,a,l,t):s?Rp(c,s,t):Ne(c,t)}async function Sp(e,t,n,i,r){if(n!==void 0){let s=Dt([e,t,n]);try{return await Ne(s,r)}catch{}}if(i!==void 0){let s=Dt([e,i]);try{return await Ne(s,r)}catch{}}return Ne(e,r)}async function Rp(e,t,n){if(typeof t=="boolean"){if(t===!0)throw Error(`Cannot generate value for 'not: true' at ${n.path}`);return Ne(e,n)}if(t.type&&!t.enum&&!t.const){let i=Array.isArray(t.type)?t.type:[t.type],r=["string","number","integer","boolean","null","object","array"].filter(s=>!i.includes(s));if(r.length>0){let s=n.random.pick(r),o=Dt([e,{type:s}]);return Ne(o,n)}}if(t.const!==void 0||t.enum!==void 0){let i=t.enum??[t.const],r=new Set(i.map(s=>JSON.stringify(s)));for(let s=0;s<20;s++){let o=await Ne(e,n);if(!r.has(JSON.stringify(o)))return o}}return Ne(e,n)}class Ip{constructor(){_e(this,"extensions",new Map)}define(t,n){this.extensions.set(t,{callback:n,context:{}})}has(t){return this.extensions.has(t)}reset(t){if(t){let n=this.extensions.get(t);n&&(n.context={},this.extensions.delete(t))}else this.extensions.clear()}keys(){return this.extensions.keys()}generate(t,n){let i=Object.keys(t);for(let r=i.length-1;r>=0;r--){let s=i[r],o=s.startsWith("x-")?s.slice(2):s,a=this.extensions.get(o);if(a){let l=t[s],c=a.callback.call(a.context,l,t,n);if(c!==void 0)return c}}}getContext(t){var n;return(n=this.extensions.get(t))==null?void 0:n.context}}var Mp=new Ip;function Cp(e,t){return Mp.generate(e,t)}var Lp=["string","number","integer","boolean","null","object","array"];function al(e,t,n){if(e.faker!==void 0&&e.chance!==void 0)throw Error(`ambiguous generator: both faker and chance are defined in ${t.path}`);if(e.faker!==void 0)try{let i=Pp(e.faker,t),r=cl(i,n??e.type,t.path);return typeof r=="string"&&e.format?ll(r,e.format,t):r}catch{}if(e.chance!==void 0)try{let i=Dp(e.chance,t),r=cl(i,n??e.type,t.path);return typeof r=="string"&&e.format?ll(r,e.format,t):r}catch{}}function ll(e,t,n){if(t==="date"){let i=typeof e=="string"?new Date(e):e;if(i instanceof Date&&!isNaN(i.getTime())){let r=i.getFullYear(),s=Nt(i.getMonth()+1),o=Nt(i.getDate());return`${r}-${s}-${o}`}if(typeof e=="string"){let r=Date.parse(e);if(!isNaN(r)){let s=new Date(r),o=s.getFullYear(),a=Nt(s.getMonth()+1),l=Nt(s.getDate());return`${o}-${a}-${l}`}}}if(t==="date-time"){let i=typeof e=="string"?new Date(e):e;if(i instanceof Date&&!isNaN(i.getTime()))return i.toISOString();if(typeof e=="string"&&Date.parse(e))return new Date(e).toISOString()}return e}function cl(e,t,n){if(t===void 0)return e;let i=Array.isArray(t)?t[0]:t;switch(i){case"string":return e===null?"null":e===void 0?"undefined":String(e);case"number":case"integer":let r=Number(e);return i==="integer"?Math.floor(r):r;case"boolean":return!!e;case"null":return null;default:return e}}function Pp(e,t){var o;if(!((o=t.extensions)!=null&&o.faker)){let a=typeof e=="string"?e:JSON.stringify(e);throw Error(`cannot resolve faker-generator for ${a} in ${t.path}`)}let n,i;if(typeof e=="object"&&e!==null){let a=e,l=Object.keys(a);if(l.length>0)n=l[0],i=a[n];else throw Error(`cannot resolve faker-generator for ${JSON.stringify(e)} in ${t.path}`)}else n=e;let r=n.split("."),s=t.extensions.faker;for(let a of r)try{s=s[a]}catch{throw Error(`failed to resolve .${a} (${n})`)}if(typeof s=="function")return i?s(...i):s();throw Error(`cannot resolve faker-generator for ${n} in ${t.path}`)}function Dp(e,t){var n;if(!((n=t.extensions)!=null&&n.chance)){let i=typeof e=="string"?e:Object.keys(e)[0];throw Error(`cannot resolve chance-generator for ${i} in ${t.path}`)}if(typeof e=="string"){let i=t.extensions.chance[e];if(typeof i=="function")return i.call(t.extensions.chance);throw Error(`cannot resolve chance-generator for ${e} in ${t.path}`)}if(typeof e=="object"&&e!==null){let i=e,r=Object.keys(i)[0],s=i[r],o=t.extensions.chance[r];if(typeof o=="function")return s?o.call(t.extensions.chance,s):o.call(t.extensions.chance)}throw Error(`cannot resolve chance-generator in ${t.path}`)}function Fp(e,t){let n=e.path==="/"?`/${t}`:`${e.path}/${t}`;return{...e,depth:e.depth+1,path:n,refDepthReached:e.refDepthReached}}async function et(e,t,n){return n.outputTransform?n.outputTransform(e,t,n.outputPath):e}async function Ne(e,t){if(e===!0)return Ne({},t);if(e===!1)throw Error(`Cannot generate value for 'false' schema at ${t.path}`);if(t.propAliases&&typeof e=="object"&&e!==null){let s=e,o=null;for(let[a,l]of Object.entries(t.propAliases))a in s&&!(l in s)&&(o||(o={...s}),o[l]=o[a],delete o[a]);o&&(e=o)}let n;if(Array.isArray(e.type)){let s=e.type;n=t.random.pick(s);let o={...t,resolvedType:n},a=al(e,o,n);if(a!==void 0)return typeof a=="string"&&o.maxLength!==void 0&&a.length>o.maxLength?et(a.slice(0,o.maxLength),e,o):et(a,e,o)}else{let s=al(e,t,n);if(s!==void 0)return typeof s=="string"&&t.maxLength!==void 0&&s.length>t.maxLength?et(s.slice(0,t.maxLength),e,t):et(s,e,t)}let i=Cp(e,t);if(i!==void 0)return et(i,e,t);if(e.$ref){let s=await Qr(e,t);return Ne(s.schema,Fp(s.ctx,"$ref"))}if(e.allOf||e.anyOf||e.oneOf||e.not||e.if)return jp(e,t);if(e.const!==void 0)return et(il(e,t),e,t);if(t.useDefaultValue&&e.default!==void 0)return et(e.default,e,t);if(e.enum!==void 0)return et(il(e,t),e,t);if(t.useExamplesValue){if(Array.isArray(e.examples)&&e.examples.length>0)return et(t.random.pick(e.examples),e,t);if(e.example!==void 0)return et(e.example,e,t)}let r=Bp(e,t);if(r===null){if(t.failOnInvalidTypes===!1){if(t.defaultInvalidTypeProduct!==void 0){let s=t.defaultInvalidTypeProduct;return typeof s=="string"?qp(s):s}return null}throw Error(`unknown primitive ${e.type} in ${t.path}/type`)}switch(r){case"null":return et(Gd(),e,t);case"boolean":return et(ep(t),e,t);case"number":return et(yc(e,t),e,t);case"integer":return et(np(e,t),e,t);case"string":return et(up(e,t),e,t);case"object":return et(await yp(e,t),e,t);case"array":return et(await _p(e,t),e,t);default:throw Error(`Unknown type: ${r} at ${t.path}`)}}function Bp(e,t){return t.resolvedType!==void 0?t.resolvedType:typeof e.type=="string"?["string","number","integer","boolean","null","object","array"].includes(e.type)?e.type:null:Array.isArray(e.type)?t.random.pick(e.type):e.properties||e.required||e.additionalProperties!==void 0||e.patternProperties||e.minProperties!==void 0||e.maxProperties!==void 0||zp(e)?"object":e.items||e.prefixItems||e.contains||e.minItems!==void 0||e.maxItems!==void 0||e.uniqueItems?"array":e.minimum!==void 0||e.maximum!==void 0||e.exclusiveMinimum!==void 0||e.exclusiveMaximum!==void 0||e.multipleOf!==void 0?"number":e.minLength!==void 0||e.maxLength!==void 0||e.pattern||e.format||e.faker!==void 0||e.chance!==void 0?"string":t.random.pick(Lp)}function zp(e){if(e.properties||e.type==="object"||e.type==="array")return!1;for(let t of Object.keys(e)){if(ri.has(t))continue;let n=e[t];if(typeof n=="object"&&n!==null&&!Array.isArray(n))return!0}return!1}function qp(e,t){switch(e){case"string":return"";case"number":case"integer":return 0;case"boolean":return!1;case"null":return null;case"object":return{};case"array":return[];default:return null}}function Up(e){let t=Ec(e),n=kc(e);return`${t}T${n}`}function Ec(e){let t=e.int(2e3,2030),n=e.int(1,12),i=lp(t,n),r=e.int(1,i);return`${t}-${Nt(n)}-${Nt(r)}`}function kc(e){let t=e.int(0,23),n=e.int(0,59),i=e.int(0,59);return`${Nt(t)}:${Nt(n)}:${Nt(i)}Z`}var Hp=["alice","bob","charlie","dave","eve","frank","grace","heidi"],Vp=["example.com","test.org","demo.net","sample.io"];function ul(e){let t=e.pick(Hp),n=e.int(1,999),i=e.pick(Vp);return`${t}${n}@${i}`}var Wp=["https"],Jp=["example.com","test.org","demo.net"],Zp=["api","v1","users","items","data","resource"];function Ur(e){let t=e.pick(Wp),n=e.pick(Jp),i=e.int(1,3),r=[];for(let s=0;s<i;s++)r.push(e.pick(Zp));return`${t}://${n}/${r.join("/")}`}var Xp=["alpha","beta","gamma","delta","echo","fox","golf","hotel"],Yp=["com","org","net","io","dev"];function fl(e){let t=e.int(1,3),n=[];for(let i=0;i<t;i++)n.push(e.pick(Xp));return n.push(e.pick(Yp)),n.join(".")}function $p(e){return`${e.int(1,254)}.${e.int(0,255)}.${e.int(0,255)}.${e.int(1,254)}`}function Kp(e){let t=[];for(let n=0;n<8;n++)t.push(e.int(0,65535).toString(16));return t.join(":")}function Qp(e){let t=n=>{let i="";for(let r=0;r<n;r++)i+=e.int(0,15).toString(16);return i};return`${t(8)}-${t(4)}-4${t(3)}-${["8","9","a","b"][e.int(0,3)]}${t(3)}-${t(12)}`}var Gp=["foo","bar","baz","items","0","1","2","name","value"];function dl(e){let t=e.int(1,4),n=[];for(let i=0;i<t;i++)n.push(e.pick(Gp));return"/"+n.join("/")}function eh(e){let t=["P"],n=e.bool(),i=e.bool();return n&&(e.bool()&&t.push(`${e.int(0,100)}Y`),e.bool()&&t.push(`${e.int(0,12)}M`),e.bool()&&t.push(`${e.int(0,30)}D`)),i&&(t.push("T"),e.bool()&&t.push(`${e.int(0,23)}H`),e.bool()&&t.push(`${e.int(0,59)}M`),e.bool()&&t.push(`${e.int(0,59)}S`)),(t.length===1||t.length===2&&t[1]==="T")&&t.push("0D"),t.join("")}var th=new Map([["date-time",Up],["date",Ec],["time",kc],["duration",eh],["email",ul],["idn-email",ul],["uri",Ur],["uri-reference",Ur],["iri",Ur],["iri-reference",Ur],["hostname",fl],["idn-hostname",fl],["ipv4",$p],["ipv6",Kp],["uuid",Qp],["json-pointer",dl],["relative-json-pointer",e=>`${e.int(0,5)}${dl(e)}`]]);function Oc(e){let t=new Map(th);if(e)for(let[n,i]of Object.entries(e))t.set(n,i);return t}function nh(e,t){if(!e.startsWith("$"))throw Error(`Invalid JSONPath: ${e} (must start with $)`);let n=e.slice(1).split(/\.|\[(\d+|\*)\]/).filter(Boolean),i=[t];for(let r of n){if(r==="")continue;let s=[];for(let o of i)if(o!=null)if(r==="*")Array.isArray(o)&&s.push(...o);else if(/^\d+$/.test(r)){let a=parseInt(r,10);Array.isArray(o)&&a<o.length&&s.push(o[a])}else r===""?Ns(o,s):typeof o=="object"&&o!==null&&r in o&&s.push(o[r]);i=s}return i}function Ns(e,t){if(e!=null){if(Array.isArray(e))for(let n of e)t.push(n),Ns(n,t);else if(typeof e=="object")for(let n of Object.values(e))t.push(n),Ns(n,t)}}function rh(e){if(e.properties)return e.properties;if(e.type==="object"||e.type===void 0){let t={},n=!1;for(let[i,r]of Object.entries(e))ri.has(i)||(_c(r)?(t[i]=r,n=!0):(t[i]={const:r},n=!0));if(n)return t}return{}}async function js(e,t,n,i){if(!n.resolveJsonPath)return e;let r=i??e;if(t===!0||t===!1||t.$ref)return e;let s=t;if(s.allOf||s.anyOf||s.oneOf)return e;if(typeof e=="object"&&e!==null&&!Array.isArray(e)){let o={...e},a=rh(s);for(let[l,c]of Object.entries(a))if(l in o){let d=o[l];if(typeof c=="object"&&c!==null&&"jsonPath"in c&&typeof c.jsonPath=="string"){let f=nh(c.jsonPath,r);f.length>0&&(o[l]=n.random.pick(f))}else{let f=await js(d,c,n,r);o[l]=f}}return o}if(Array.isArray(e)&&s.items){let o=[];for(let a of e){let l=await js(a,s.items,n,r);o.push(l)}return o}return e}var ih=Oc(),pl=new Set(["https://json-schema.org/draft/2020-12/schema","https://json-schema.org/draft/2019-09/schema"]);async function sh(e,t){if((t==null?void 0:t.validateSchemaVersion)===!0&&!(t!=null&&t.propAliases)&&typeof e=="object"&&e!==null&&"$schema"in e){let f=e.$schema;if(typeof f=="string"&&!pl.has(f))throw Error(`Unsupported JSON Schema version: ${f}. Supported versions: ${[...pl].join(", ")}`)}let n=ah(t),i=gc((t==null?void 0:t.seed)??1),r=n.propAliases?oh(e,n.propAliases):e,s=Op(r);Tp(r,s);let o=n.formats?Oc(n.formats):new Map(ih),a=n.refDepthMin??n.refDepth,l=n.refDepthMax??n.refDepth;if(a!==void 0&&l!==void 0&&a>l)throw Error(`refDepthMin (${a}) cannot be greater than refDepthMax (${l})`);let c={random:i,maxDepth:n.maxDepth??(l?l+20:5),maxDefaultItems:n.maxDefaultItems??3,optionalsProbability:n.optionalsProbability??.5,depth:0,refRegistry:s,refStack:new Set,formatRegistry:o,refResolver:n.refResolver,minItems:n.minItems,maxItems:n.maxItems,minLength:n.minLength,maxLength:n.maxLength,useDefaultValue:n.useDefaultValue,path:"/",outputPath:"/",alwaysFakeOptionals:n.alwaysFakeOptionals,fixedProbabilities:n.fixedProbabilities,fillProperties:n.fillProperties,extensions:n.extensions,resolveJsonPath:n.resolveJsonPath,autoIncrementCounters:new Map,refDepth:0,refDepthMin:a,refDepthMax:l,useExamplesValue:n.useExamplesValue,pruneProperties:n.pruneProperties,failOnInvalidTypes:n.failOnInvalidTypes,defaultInvalidTypeProduct:n.defaultInvalidTypeProduct,minDateTime:n.minDateTime,maxDateTime:n.maxDateTime,propAliases:n.propAliases,outputTransform:n.outputTransform},d=await Ne(r,c);return n.resolveJsonPath?js(d,e,c,d):d}function oh(e,t){if(typeof e!="object"||e===null)return e;let n=e,i=null;for(let[r,s]of Object.entries(t))r in n&&!(s in n)&&(i||(i={...n}),i[s]=i[r],delete i[r]);return i??e}function ah(e){if(!e)return{};let t=e,n={...e};return t.requiredOnly===!0&&n.optionalsProbability===void 0&&(n={...n,optionalsProbability:0,alwaysFakeOptionals:!1}),t.ignoreProperties&&t.ignoreProperties.length>0&&(n={...n,outputTransform:lh(n.outputTransform,ch(t.ignoreProperties))}),n}function lh(e,t){return e?t?async(n,i,r)=>{let s=await e(n,i,r);return t(s,i,r)}:e:t}function ch(e){return(t,n,i)=>{if(i==="/")return t;let r=uh(i.slice(i.lastIndexOf("/")+1));return e.some(s=>typeof s=="string"?s===r:s instanceof RegExp?s.test(r):s(n))?void 0:t}}function uh(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function Tc(e){if(e.type==="object"&&e.properties&&typeof e.properties=="object"){const t={};for(const[n,i]of Object.entries(e.properties)){const r=/id$/i.test(n)&&i.type==="string"&&!i.format&&!i.examples,s=i.type==="string"&&!i.format&&!i.examples&&!i.enum;t[n]=r?{...i,format:"uuid"}:s?{...i,examples:["string"]}:Tc(i)}return{...e,properties:t}}return e}function fh({schema:e}){const[t,n]=se.useState(null);if(se.useEffect(()=>{let r=!1;return sh(Tc(e),{seed:42,useExamplesValue:!0,optionalsProbability:1}).then(s=>{r||n(s)}),()=>{r=!0}},[e]),t===null)return null;const i=JSON.stringify(t,null,2);return u.jsxs("div",{children:[u.jsx(ql,{code:i}),u.jsx("span",{className:"text-xs text-foreground-muted italic mt-2 font-bold inline-block",children:"This example is auto generated"})]})}function Ss({schema:e,label:t,description:n,schemaFormat:i,originalSchema:r,conversionError:s}){const o=tc(i),a=Td(i,s),[l,c]=se.useState(a?"example":"schema");return se.useEffect(()=>{!a&&l==="example"&&c("schema")},[a,l]),u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center justify-between mb-2",children:[u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("p",{className:"text-xs font-medium text-gray-400 uppercase tracking-wider",children:t}),o&&u.jsx("span",{className:"text-xs font-mono bg-neutral-100 text-foreground-muted px-1.5 py-0.5 rounded",title:i,children:o})]}),n&&u.jsx("p",{className:"text-sm text-gray-600 leading-relaxed mt-2 mb-2",children:n})]}),u.jsx(mc,{tabs:[...a?[{id:"example",label:"Example"}]:[],{id:"schema",label:"Schema"},{id:"json",label:"JSON"}],selected:l,onChange:d=>c(d),ariaLabel:"Schema view toggle"})]}),s&&u.jsxs("p",{className:"text-xs text-amber-700 bg-amber-50 border border-amber-200 rounded px-2 py-1.5 mb-2",children:["Could not convert ",nc(i)??"the"," schema — showing raw definition. ",s]}),l==="schema"&&u.jsx(oo,{schema:e,rootName:t}),l==="json"&&u.jsx(Ul,{schema:r??e}),l==="example"&&a&&u.jsx(fh,{schema:e})]})}function Ac({message:e,expanded:t,onToggleExpanded:n,paddingX:i="px-4"}){const[r,s]=se.useState("payload"),{deref:o}=Zt(),a=se.useMemo(()=>e.payload?$r(e.payload,o):null,[e.payload,o]),l=se.useMemo(()=>e.headers?$r(e.headers,o):null,[e.headers,o]),c=e.description||e.payload||e.headers||e.deprecated||e.tags&&e.tags.length>0;return u.jsxs(u.Fragment,{children:[u.jsx("div",{className:`grid transition-all duration-200 ease-in-out ${t?"grid-rows-[1fr]":"grid-rows-[0fr]"}`,children:u.jsx("div",{className:"overflow-hidden",children:u.jsxs("div",{className:`${i} pb-4 space-y-4 border-t border-border pt-3`,children:[e.description&&u.jsx("p",{className:"text-sm text-foreground-secondary leading-relaxed",children:e.description}),(e.payload||e.headers)&&u.jsxs("div",{children:[e.payload&&e.headers&&u.jsx(Rs,{tabs:[{id:"payload",name:"Payload"},{id:"headers",name:"Headers"}],current:r,onChange:d=>s(d)}),u.jsxs("div",{className:"mt-4",children:[(r==="payload"||!e.headers)&&a&&u.jsx(Ss,{schema:a.schema,label:"Payload",description:a.description,schemaFormat:a.schemaFormat,originalSchema:a.originalSchema,conversionError:a.conversionError}),(r==="headers"||!e.payload)&&l&&u.jsx(Ss,{schema:l.schema,label:"Headers",description:l.description,schemaFormat:l.schemaFormat,originalSchema:l.originalSchema,conversionError:l.conversionError})]})]}),e.tags&&e.tags.length>0&&u.jsx("div",{className:"flex flex-wrap gap-1",children:e.tags.map((d,f)=>u.jsx(Us,{name:`#${d.name}`},f))})]})})}),c&&u.jsxs("button",{onClick:n,className:"w-full flex items-center justify-center gap-1.5 py-2 border-t border-border bg-neutral-50 hover:bg-neutral-100 transition-colors text-xs text-foreground-muted hover:text-foreground-secondary",children:[u.jsx("span",{children:t?"Show less":"Show more"}),u.jsx(ti,{className:`w-3 h-3 transition-transform duration-200 ${t?"rotate-180":""}`})]})]})}function dh({messageKey:e,message:t,first:n,isSelected:i}){const[r,s]=se.useState(!1);return se.useEffect(()=>{i&&s(!0)},[i]),u.jsxs("tbody",{className:`${n?"":"border-t border-border"} ${i?"bg-primary-50/60 outline outline-1 outline-primary-300":""}`,children:[u.jsxs("tr",{id:`message-${e}`,className:"",children:[u.jsx("td",{className:"px-6 py-4",children:u.jsxs("div",{className:"flex flex-col gap-1.5",children:[u.jsx("span",{className:"text-sm font-medium text-foreground",children:t.title??t.name??e}),u.jsx("span",{className:"w-fit text-xs font-mono bg-primary-50 text-primary-600 border border-primary-200 px-1.5 py-0.5 rounded",children:e})]})}),u.jsx("td",{className:"px-6 py-4 text-sm text-foreground-muted",children:t.summary??"—"}),u.jsx("td",{className:"px-6 py-4",children:u.jsxs("div",{className:"flex flex-col items-start gap-1.5",children:[u.jsxs("div",{className:"flex justify-between w-full",children:[u.jsx("div",{}),u.jsx("div",{children:t.contentType&&u.jsx("span",{className:"text-xs font-mono bg-neutral-100 text-foreground-muted px-1.5 py-0.5 rounded",children:t.contentType??"—"})})]}),t.deprecated&&u.jsx("span",{className:"text-xs bg-red-50 text-red-500 px-1.5 py-0.5 rounded border border-red-200",children:"deprecated"}),u.jsxs("div",{className:"flex justify-between w-full",children:[u.jsx("div",{}),u.jsx("div",{children:t.correlationId&&u.jsx("span",{className:"text-xs bg-secondary-50 text-secondary-500 px-1.5 py-0.5 rounded border border-secondary-200",title:t.correlationId.description??t.correlationId.location,children:t.correlationId.location})})]})]})})]}),u.jsx("tr",{children:u.jsx("td",{colSpan:3,className:"p-0",children:u.jsx(Ac,{message:t,expanded:r,onToggleExpanded:()=>s(o=>!o),paddingX:"px-6"})})})]})}function ph({messages:e,selectedKey:t}){const n=Object.entries(e),i=n.length?u.jsx("div",{className:"bg-surface rounded-lg border border-border overflow-hidden",children:u.jsxs("table",{className:"w-full",children:[u.jsx("thead",{className:"bg-neutral-100",children:u.jsxs("tr",{children:[u.jsx("th",{className:"px-6 py-5 text-left text-xs font-medium text-foreground-muted uppercase tracking-wider",children:"Message"}),u.jsx("th",{className:"px-6 py-5 text-left text-xs font-medium text-foreground-muted uppercase tracking-wider",children:"Summary"}),u.jsx("th",{className:"px-6 py-5 text-left text-xs font-medium text-foreground-muted uppercase tracking-wider",children:"Details"})]})}),n.map(([r,s],o)=>u.jsx(dh,{messageKey:r,message:s,first:o===0,isSelected:t===r},r))]})}):u.jsx("div",{className:"mt-10 rounded-xl border border-dashed border-neutral-300 bg-surface p-8 text-center text-sm text-foreground-muted",children:"No messages defined in this AsyncAPI document."});return u.jsx("div",{className:"flex justify-center w-full",children:u.jsx(Fn,{content:i,stickySideContent:!1})})}function hh({serverNames:e=[],current:t,setCurrent:n}){return u.jsx("nav",{className:"space-y-1 w-max mt-10 @lg:mt-0","aria-label":"Sidebar",children:e.map(i=>u.jsx("a",{onClick:()=>n(i),className:Mn(t===i?"border-l-4 border-neutral-300 text-foreground":"text-foreground-secondary hover:text-foreground","flex items-center px-3 py-2 text-sm font-medium capitalize cursor-pointer"),children:u.jsx("span",{className:"truncate",children:i})},i))})}function Nc({className:e,children:t,...n}){return u.jsx("svg",{className:e||"inline-block",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",...n,children:t})}function mh(e){return u.jsx(Nc,{...e,children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"})})}function gh(e){return u.jsx(Nc,{...e,children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"})})}function ao({className:e}){return u.jsx("svg",{viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",className:e,children:u.jsx("path",{d:"M202.1,450a15,15,0,0,1-10.6-25.61L365.79,250.1,191.5,75.81A15,15,0,0,1,212.71,54.6l184.9,184.9a15,15,0,0,1,0,21.21l-184.9,184.9A15,15,0,0,1,202.1,450Z"})})}const yh=[{id:"userPassword",name:"User/Password"},{id:"oauth2",name:"OAuth2"},{id:"apiKey",name:"API key"},{id:"openIdConnect",name:"OpenID"},{id:"X509",name:"X.509 certificate"},{id:"scramSha256",name:"SASL"},{id:"scramSha512",name:"SASL"},{id:"plain",name:"SASL"},{id:"gssapi",name:"SASL"}];function jc({securities:e}){var a;const{deref:t}=Zt();Jr(e,t);const n=se.useMemo(()=>yh.filter(l=>{const c=l.id;return e==null?void 0:e.some(d=>d.type.toLowerCase()===c.toLowerCase())}),[e]),[i,r]=se.useState(n.length>0?n[0].id:null);se.useEffect(()=>{n.length>0&&r(n[0].id)},[n]);function s(l){return e.find(c=>c.type===l)}const o=i?(a=s(i))==null?void 0:a.description:void 0;return u.jsxs("div",{children:[u.jsx(Rs,{tabs:n,current:i,onChange:r}),u.jsxs("div",{className:"py-4 prose text-foreground-muted",children:[i==="userPassword"&&u.jsxs(Hr,{children:["You have to"," ",u.jsx("strong",{className:"text-foreground-secondary",children:"provide user and password"})," ","to connect to this server."]}),i&&["scramSha256","scramSha512","plain"].includes(i)&&u.jsxs(Hr,{description:o,children:["You have to"," ",u.jsx("strong",{className:"text-foreground-secondary",children:"provide username and password"})," ","to connect to this server."]}),i==="gssapi"&&u.jsxs(Hr,{children:["You have to"," ",u.jsx("strong",{className:"text-foreground-secondary",children:"authenticate using Kerberos (GSSAPI)"})," ","to connect to this server."]}),i==="X509"&&u.jsxs(Hr,{children:["You have to"," ",u.jsx("strong",{className:"text-foreground-secondary",children:"download the certificate file"})," ","from the service provider to connect to this server."]}),i==="apiKey"&&u.jsx(xh,{security:s("apiKey")}),i==="openIdConnect"&&u.jsx(bh,{security:s("openIdConnect")}),i==="oauth2"&&u.jsx(vh,{security:s("oauth2")})]})]})}const Hr=({description:e,children:t})=>e?u.jsx(u.Fragment,{children:u.jsx(xn,{children:e})}):u.jsx("span",{children:t}),xh=({security:e})=>e!=null&&e.description?u.jsx(xn,{children:e.description}):(e==null?void 0:e.in)==="password"?u.jsxs("span",{children:["You have to"," ",u.jsx("strong",{className:"text-foreground-secondary",children:"provide your API key as the password and leave the user name empty"})," ","to connect to this server."]}):u.jsxs("span",{children:["You have to"," ",u.jsx("strong",{className:"text-foreground-secondary",children:"provide your API key as the user name and leave the password empty"})," ","to connect to this server."]}),bh=({security:e})=>u.jsxs(u.Fragment,{children:[e!=null&&e.description?u.jsx(xn,{children:e.description}):u.jsx("p",{children:"You can use OpenID to connect to this server."}),u.jsxs("p",{children:["The OpenID Connect URL is"," ",u.jsx("a",{href:e.openIdConnectUrl,target:"_blank",rel:"noreferrer",children:e.openIdConnectUrl}),"."]}),(e==null?void 0:e.scopes)&&u.jsxs("div",{className:"py-4 @sm:py-5 @sm:grid @sm:grid-cols-3 items-center @sm:gap-4",children:[u.jsx("dt",{className:"text-sm font-medium text-foreground-muted",children:"Scopes"}),u.jsx("dd",{className:"mt-1 text-sm text-foreground @sm:mt-0 @sm:col-span-2",children:u.jsx("code",{children:_u(e.scopes)})})]})]}),vh=({security:e})=>{const t=e==null?void 0:e.flows;return u.jsxs(u.Fragment,{children:[(e==null?void 0:e.description)&&u.jsx(xn,{children:e.description}),t&&Object.entries(t).map(([n,i])=>{let r="",s="";switch(n){case"clientCredentials":r=fu,s=du;break;case"implicit":r=cu,s=uu;break;case"password":r=pu,s=hu;break;case"authorizationCode":r=mu,s=gu;break}return u.jsxs("div",{children:[u.jsxs("div",{children:[u.jsx("h4",{className:"text-lg leading-6 font-bold text-foreground",children:r}),u.jsx("p",{className:"mt-1 max-w-2xl text-sm text-foreground-muted",children:s})]}),u.jsx("div",{className:"mt-5 border-t border-border",children:u.jsxs("dl",{className:"@sm:divide-y @sm:divide-border",children:[i.authorizationUrl&&u.jsxs("div",{className:"py-4 @sm:py-5 @sm:grid @sm:grid-cols-3 @sm:gap-4 items-center",children:[u.jsx("dt",{className:"text-sm font-medium text-foreground-muted",children:"Authorization URL"}),u.jsx("dd",{className:"mt-1 text-sm text-foreground @sm:mt-0 @sm:col-span-2",children:u.jsx("a",{href:i.authorizationUrl,target:"_blank",rel:"noreferrer",className:"text-foreground",children:i.authorizationUrl})})]}),i.tokenUrl&&u.jsxs("div",{className:"py-4 @sm:py-5 @sm:grid @sm:grid-cols-3 @sm:gap-4 items-center",children:[u.jsx("dt",{className:"text-sm font-medium text-foreground-muted",children:"Token URL"}),u.jsx("dd",{className:"mt-1 text-sm text-foreground @sm:mt-0 @sm:col-span-2",children:u.jsx("a",{href:i.tokenUrl,target:"_blank",rel:"noreferrer",className:"text-foreground",children:i.tokenUrl})})]}),i.refreshUrl&&u.jsxs("div",{className:"py-4 @sm:py-5 @sm:grid @sm:grid-cols-3 @sm:gap-4 items-center",children:[u.jsx("dt",{className:"text-sm font-medium text-foreground-muted",children:"Refresh URL"}),u.jsx("dd",{className:"mt-1 text-sm text-foreground @sm:mt-0 @sm:col-span-2",children:u.jsx("a",{href:i.refreshUrl,target:"_blank",rel:"noreferrer",className:"text-foreground",children:i.refreshUrl})})]}),i.availableScopes&&u.jsxs("div",{className:"py-4 @sm:py-5 @sm:grid @sm:grid-cols-3 @sm:gap-4 items-center",children:[u.jsx("dt",{className:"text-sm font-medium text-foreground-muted",children:"Scopes"}),u.jsx("dd",{className:"mt-1 text-sm text-foreground @sm:mt-0 @sm:col-span-2",children:u.jsx("div",{className:"flex flex-wrap gap-1.5",children:(Array.isArray(i.availableScopes)?i.availableScopes:Object.keys(i.availableScopes)).map(o=>u.jsx("code",{className:"text-xs bg-neutral-100 text-foreground-secondary px-1.5 py-0.5 rounded",children:o},o))})})]})]})})]},n)})]})};function wh({className:e}){return u.jsxs("svg",{className:e||"inline-block",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:[u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 5v14m7-7H5m10-3l-3 3 3 3m-6-6l3 3-3 3"}),u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 6.873a9 9 0 011 4.127 9 9 0 01-1 4.127M5 6.873a9 9 0 00-1 4.127 9 9 0 001 4.127"}),u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M16 8.873a6 6 0 011 3.127 6 6 0 01-1 3.127M8 8.873a6 6 0 00-1 3.127 6 6 0 001 3.127"})]})}function _h(e){return e.startsWith("http://")||e.startsWith("https://")}function Sc(e){return e.replace(/([A-Z])/g," $1").replace(/^(.)/,t=>t.toUpperCase()).trim()}function Rc({value:e}){if(e==null)return null;if(typeof e=="string"&&_h(e))return u.jsx("a",{href:e,target:"_blank",rel:"noreferrer",className:"text-xs text-blue-600 underline underline-offset-2 break-all hover:text-blue-800",children:e});if(typeof e=="boolean")return u.jsx("span",{className:`text-xs font-medium ${e?"text-green-600":"text-red-500"}`,children:e?"true":"false"});if(typeof e=="number")return u.jsx("span",{className:"text-xs font-mono text-blue-600",children:e});if(typeof e=="object"){const t=e;return"type"in t&&Array.isArray(t.enum)?u.jsx("div",{className:"flex flex-wrap gap-1",children:t.enum.map((n,i)=>u.jsx("span",{className:"text-xs font-mono bg-neutral-100 text-foreground-secondary px-1.5 py-0.5 rounded",children:String(n)},i))}):u.jsx("div",{className:"mt-1 border-l-2 border-border pl-3 space-y-2",children:Object.entries(t).map(([n,i])=>u.jsxs("div",{className:"flex items-start gap-2",children:[u.jsx("span",{className:"text-xs text-foreground-muted shrink-0 w-36",children:Sc(n)}),u.jsx(Rc,{value:i})]},n))})}return u.jsx("span",{className:"text-xs text-foreground-secondary",children:String(e)})}function Ic({bindings:e,expand:t=!1,protocol:n}){const[i,r]=se.useState(t),s=vu[n.toLowerCase()]??{label:n,color:"bg-neutral-100 text-foreground-secondary border-border"},o=Object.entries(e??{}).filter(([a,l])=>a!=="bindingVersion"&&l!==void 0&&l!==null);return o.length===0?null:u.jsxs("div",{className:"mt-2 rounded-lg border border-border overflow-hidden",children:[u.jsxs("div",{className:"flex items-center justify-between px-4 py-3 bg-neutral-50 cursor-pointer hover:bg-neutral-100 transition-colors",onClick:()=>r(a=>!a),children:[u.jsx("div",{className:"flex items-center gap-2",children:u.jsx("span",{className:`text-xs font-medium px-2 py-0.5 rounded border ${s.color}`,children:s.label})}),i?u.jsx(ti,{className:"w-4 h-4 text-foreground-muted"}):u.jsx(ao,{className:"w-4 h-4 text-foreground-muted"})]}),i&&u.jsx("div",{className:"divide-y divide-neutral-100",children:o.length===0?u.jsx("p",{className:"px-4 py-3 text-xs text-foreground-muted italic",children:"No binding properties defined."}):o.map(([a,l])=>u.jsxs("div",{className:"flex items-center items-start gap-4 px-4 py-3",children:[u.jsx("span",{className:"text-xs font-medium text-foreground-muted w-40 shrink-0 pt-0.5",children:Sc(a)}),u.jsx("div",{className:"flex-1 min-w-0",children:u.jsx(Rc,{value:l})})]},a))})]})}function Eh({host:e,protocol:t,description:n,tags:i,variables:r,security:s,bindings:o}){const a=r,[l,c]=se.useState(!1);return u.jsxs("div",{children:[u.jsxs("div",{className:"font-bold text-foreground-secondary mt-8 mb-4 bg-neutral-200 border border-neutral-500 p-4 rounded-lg",children:[u.jsxs("div",{className:"border border-dotted border-black p-2 rounded-lg bg-surface",children:[u.jsx(mh,{className:"inline-block mr-1 -mt-1 h-6 text-foreground-muted"}),e&&u.jsx(dr,{address:e,parameters:a,className:"font-bold leading-tight tracking-tight px-0"})]}),u.jsx("div",{className:"mt-2",children:i&&i.map((d,f)=>{const p=d,h=p.externalDocs;return u.jsx(Us,{href:h&&h.url,title:p.description||(h&&h.description?h.description:void 0),name:p.name},f)})})]}),u.jsx(xn,{children:n}),s&&s.length>0&&u.jsxs("div",{children:[u.jsxs("h3",{className:"font-bold text-foreground-secondary mt-8",children:[u.jsx(gh,{className:"inline-block mr-2 -mt-1 h-6 text-foreground-muted"}),"Authorization"]}),u.jsx("p",{className:"prose text-foreground-muted mt-4",children:"This server accepts the following authorization mechanisms:"}),u.jsxs("div",{className:"mt-4 rounded-lg border border-border overflow-hidden",children:[u.jsxs("div",{className:"flex items-center justify-between px-4 py-3 bg-neutral-50 cursor-pointer hover:bg-neutral-100 transition-colors",onClick:()=>c(d=>!d),children:[u.jsx("span",{className:"text-xs font-normal text-foreground-muted bg-neutral-100 border border-border rounded-full px-2 py-0.5",children:s.length}),l?u.jsx(ti,{className:"w-4 h-4 text-foreground-muted shrink-0"}):u.jsx(ao,{className:"w-4 h-4 text-foreground-muted shrink-0"})]}),l&&u.jsx("div",{className:"px-4 py-2 border-t border-border",children:u.jsx(jc,{securities:s})})]})]}),(()=>{const d=o==null?void 0:o[t];return d&&Object.keys(d).some(p=>p!=="bindingVersion")?u.jsxs("div",{children:[u.jsxs("h3",{className:"font-bold text-foreground-secondary mt-8",children:[u.jsx(wh,{className:"inline-block mr-2 -mt-1 h-6 text-foreground-muted"}),"Connection Settings"]}),u.jsx("p",{className:"prose text-foreground-muted mt-4",children:"This server accepts the following connection configuration:"}),u.jsx(Ic,{bindings:d,protocol:t})]}):null})()]})}function kh({servers:e}){const t=[...Object.keys(e)],[n,i]=se.useState(void 0),r=n&&t.includes(n)?n:t[0],s=u.jsx(Eh,{...e[r]});return u.jsx("div",{className:"flex justify-center w-full",children:u.jsx(Fn,{title:yu,content:s,sideContent:u.jsx(hh,{serverNames:t,current:r,setCurrent:i}),stickySideContent:!0,reverseLayoutOnMobile:!0})})}function Mc({message:e,messageId:t,i:n}){const[i,r]=se.useState(!1);return u.jsxs("div",{className:"border border-border rounded-lg overflow-hidden",children:[u.jsxs("div",{className:"px-4 py-3",children:[u.jsxs("div",{className:"flex items-start justify-between gap-3",children:[u.jsx("p",{className:"text-sm font-medium text-foreground",children:e.title??e.name??`Message ${n+1}`}),(t??e.name)&&u.jsx("span",{className:"text-xs font-mono bg-primary-50 text-primary-600 border border-primary-200 p-0.5 rounded shrink-0",children:t??e.name})]}),e.summary&&u.jsx("p",{className:"text-xs text-foreground-muted mt-1.5 leading-relaxed",children:e.summary}),u.jsxs("div",{className:"flex items-center gap-1.5 shrink-0 mt-4",children:[e.contentType&&u.jsx("span",{className:"text-xs font-mono bg-neutral-100 text-foreground-muted px-1.5 py-0.5 rounded",children:e.contentType}),e.correlationId&&u.jsx("span",{className:"text-xs bg-secondary-50 text-secondary-500 px-1.5 py-0.5 rounded border border-secondary-200",title:e.correlationId.description??e.correlationId.location,children:e.correlationId.location}),e.deprecated&&u.jsx("span",{className:"text-xs bg-red-50 text-red-500 px-1.5 py-0.5 rounded border border-red-200",children:"deprecated"})]})]}),u.jsx(Ac,{message:e,expanded:i,onToggleExpanded:()=>r(s=>!s)})]})}function Oh({requestMessages:e,reply:t,isSend:n,operationId:i}){const[r,s]=se.useState("request"),o=t.messages??[],a=t.channel,l=t.address,c=r==="request"?e:o,d=r==="request"?n?"accepts":"expects":u.jsxs(u.Fragment,{children:["replies to"," ",l?u.jsxs(u.Fragment,{children:["a channel in"," ",u.jsx("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-xs font-semibold bg-surface border border-border text-foreground-secondary",children:l.location})]}):(a==null?void 0:a.address)&&u.jsx(dr,{address:a.address,parameters:a.parameters,className:"inline-flex items-center px-1.5 py-0.5 rounded text-xs font-semibold bg-surface border border-border text-foreground-secondary"})]});return u.jsxs("div",{children:[u.jsx("div",{className:"flex items-end gap-0.5 -ml-2",children:["request","reply"].map(f=>u.jsx("button",{onClick:()=>s(f),className:`px-3 py-1.5 text-sm font-medium rounded-t-md transition-colors capitalize
155
+ ${r===f?"bg-neutral-100 text-foreground border border-b-0 border-border":"text-foreground-muted hover:text-foreground-secondary"}`,children:f},f))}),u.jsx("div",{className:"-mx-5 px-5 py-4 bg-neutral-100 border-t border-border min-h-32",children:c.length>0?u.jsxs(u.Fragment,{children:[u.jsxs("p",{className:"text-sm text-foreground-secondary mb-3",children:[u.jsx("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-xs font-semibold bg-surface border border-border text-foreground-secondary",children:i})," ",d,c.length>1?u.jsxs(u.Fragment,{children:[u.jsx("span",{className:"inline-flex items-center px-1.5 py-0.5 font-bold text-foreground-secondary",children:"one of"}),"the following messages:"]}):u.jsxs("span",{children:[" "," with the following message:"]})]}),u.jsx("div",{className:"space-y-2",children:c.map((f,p)=>u.jsx(Mc,{message:f,messageId:f.name,i:p},p))})]}):u.jsx("p",{className:"text-xs text-foreground-muted italic",children:"No messages defined."})})]})}function Th({op:e,id:t}){var g;const[n,i]=se.useState(!1),r=e.messages??[],s=e.tags??[],o=e.bindings,a=e.traits,l=e.reply,c=e.externalDocs,d=e.security,f=o??(Array.isArray(a)?(g=a.find(v=>v.bindings))==null?void 0:g.bindings:void 0),p=e.action===tn.SEND,h=u.jsx("div",{className:"space-y-2",children:r.map((v,E)=>u.jsx(Mc,{message:v,messageId:v.name,i:E},E))});return u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsxs("span",{className:"inline-flex items-center px-2.5 py-1 rounded-md text-xs font-mono bg-primary-50 text-primary-600 border border-primary-200",children:["ID: ",t]}),(c==null?void 0:c.url)&&u.jsxs("a",{href:c.url,target:"_blank",rel:"noreferrer",title:c.description||c.url,className:"inline-flex items-center gap-1.5 px-2.5 py-1 rounded-md text-xs font-medium bg-neutral-100 text-foreground-secondary border border-border hover:bg-neutral-200 transition-colors",children:["External Documentation",u.jsx(zl,{className:"w-3.5 h-3.5"})]})]}),e.description&&u.jsx("div",{children:u.jsx(xn,{children:e.description})}),e.summary&&u.jsx("div",{children:u.jsx("p",{className:"text-sm text-foreground-secondary",children:e.summary})}),d&&d.length>0&&u.jsxs("div",{children:[u.jsx("p",{className:"text-xs font-medium text-foreground-muted uppercase tracking-wider mb-2",children:"Operation Authorization"}),u.jsxs("div",{className:"rounded-lg border border-border overflow-hidden",children:[u.jsxs("div",{className:"flex items-center justify-between px-4 py-3 bg-neutral-50 cursor-pointer hover:bg-neutral-100 transition-colors",onClick:()=>i(v=>!v),children:[u.jsx("span",{className:"text-xs font-normal text-foreground-muted bg-neutral-100 border border-border rounded-full px-2 py-0.5",children:d.length}),n?u.jsx(ti,{className:"w-4 h-4 text-foreground-muted shrink-0"}):u.jsx(ao,{className:"w-4 h-4 text-foreground-muted shrink-0"})]}),n&&u.jsx("div",{className:"px-4 py-2 border-t border-border",children:u.jsx(jc,{securities:d})})]})]}),f&&Object.entries(f).map(([v,E])=>E?u.jsxs("div",{children:[u.jsx("p",{className:"text-xs font-medium text-foreground-muted uppercase tracking-wider mb-1",children:"Operation configuration"}),u.jsx(Ic,{protocol:v,bindings:E},v)]}):null),l?u.jsx(Oh,{requestMessages:r,reply:l,isSend:p,operationId:t}):r.length>0&&u.jsxs("div",{children:[u.jsxs("p",{className:"text-xs font-medium text-foreground-muted uppercase tracking-wider mb-2",children:[u.jsx("span",{className:"font-bold",children:t})," ",p?"accepts":"expects",r.length>1?u.jsxs(u.Fragment,{children:[u.jsx("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-xs font-bold text-foreground-mute",children:"one of"}),"the following messages:"]}):" the following message:"]}),h]}),s.length>0&&u.jsxs("div",{children:[u.jsx("p",{className:"text-xs font-medium text-foreground-muted uppercase tracking-wider mb-2",children:"Tags"}),u.jsx("div",{className:"flex flex-wrap gap-1.5",children:s.map((v,E)=>u.jsx("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs bg-neutral-100 text-foreground-secondary",children:v.name},E))})]})]})}function Ah({operations:e,selectedKey:t=null,onSelectKey:n}){const i=p=>n==null?void 0:n(p),{deref:r}=Zt();if(!Object.keys(e).length)return null;const s=t?e[t]:null,o=Object.keys(e).map(p=>{var I;const h=e[p];Jr(h,r);const g=h.channel,v=g==null?void 0:g.address,E=g==null?void 0:g.parameters,_=h.action===tn.SEND,w=((I=h.action)==null?void 0:I.toUpperCase())??"",y=_?"bg-green-100 text-green-800":h.action===tn.RECEIVE?"bg-blue-100 text-blue-800":"bg-neutral-100 text-foreground-secondary",O=t===p;return u.jsxs("tr",{id:`operation-${p}`,onClick:()=>i(p),className:`group cursor-pointer ${O?"bg-neutral-50":""}`,children:[u.jsx("td",{className:"px-6 py-4 max-w-0 w-full group-hover:bg-neutral-50",children:v&&u.jsx(dr,{address:v,parameters:E,truncate:!0})}),u.jsx("td",{className:"px-6 py-4 w-32 group-hover:bg-neutral-50",children:u.jsx("div",{className:`inline-flex w-24 items-center justify-center px-2 py-1 text-center rounded-md text-xs font-medium uppercase ${y}`,children:w})}),u.jsx("td",{className:"group-hover:bg-neutral-50"})]},p)}),a=s?s.channel:null,c=(s==null?void 0:s.action)===tn.SEND?"bg-green-100 text-green-800":(s==null?void 0:s.action)===tn.RECEIVE?"bg-blue-100 text-blue-800":"bg-neutral-100 text-foreground-secondary",d=s&&(a!=null&&a.address)?u.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[u.jsx("span",{className:`inline-flex items-center px-2.5 py-1 rounded-md text-xs font-medium uppercase ${c}`,children:s.action}),u.jsx("div",{className:"min-w-0 flex-1 overflow-hidden",children:u.jsx(dr,{address:a.address,parameters:a.parameters})})]}):t??"Operation",f=u.jsx("div",{className:"bg-surface rounded-lg border border-border overflow-hidden",children:u.jsxs("table",{className:"w-full",children:[u.jsx("thead",{className:"bg-neutral-100 w-full",children:u.jsxs("tr",{children:[u.jsx("th",{className:"px-6 py-5 text-left text-xs font-medium text-foreground-muted uppercase tracking-wider",children:"Operation"}),u.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-foreground-muted uppercase tracking-wider",children:"Method"}),u.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-foreground-muted uppercase tracking-wider"})]})}),u.jsx("tbody",{className:"bg-surface divide-y divide-border",children:o})]})});return u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"flex justify-center w-full",children:u.jsx(Fn,{title:xu,content:f,stickySideContent:!1})}),u.jsx(xl,{isOpen:!!s,side:"right",onClose:()=>i(null),title:d,children:s&&u.jsx(Th,{op:s,id:t})})]})}function Nh({schemas:e,selectedKey:t}){const{deref:n}=Zt(),i=se.useMemo(()=>Object.entries(e).map(([s,o])=>[s,$r(o,n)]),[e,n]),r=i.length?u.jsx("div",{className:"grid gap-6 w-full",children:i.map(([s,o])=>{const a=o.schema,l=tc(o.schemaFormat),c=a.properties?Object.keys(a.properties).length:0;return u.jsxs("article",{id:`schema-${s}`,className:`rounded-xl border bg-surface p-5 shadow-sm transition-colors ${t===s?"border-primary-300 ring-1 ring-primary-200":"border-border"}`,children:[u.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[u.jsxs("div",{children:[u.jsx("h3",{className:"text-base font-semibold text-foreground",children:s}),o.description&&u.jsx("p",{className:"mt-1 text-sm text-foreground-secondary",children:o.description})]}),u.jsx("span",{className:"inline-flex rounded-full bg-neutral-100 px-3 py-1 text-xs font-semibold uppercase tracking-wide text-foreground-secondary",children:a.type??"unknown"})]}),(a.format||l||c>0)&&u.jsxs("div",{className:"mt-4 flex flex-wrap gap-2 text-xs text-foreground-secondary",children:[a.format&&u.jsxs("span",{className:"rounded-full bg-neutral-100 px-3 py-1",children:["Format: ",a.format]}),l&&u.jsx("span",{className:"rounded-full bg-neutral-100 px-3 py-1",title:o.schemaFormat,children:l}),c>0&&u.jsxs("span",{className:"rounded-full bg-neutral-100 px-3 py-1",children:[c," properties"]})]}),o.conversionError&&u.jsxs("p",{className:"mt-4 text-xs text-amber-700 bg-amber-50 border border-amber-200 rounded px-2 py-1.5",children:["Could not convert"," ",nc(o.schemaFormat)??"the"," schema — showing raw definition. ",o.conversionError]}),o.conversionError&&typeof o.originalSchema=="string"?u.jsx("div",{className:"mt-4",children:u.jsx(Ul,{schema:o.originalSchema})}):u.jsx(oo,{schema:a,rootName:s,className:"mt-4"})]},s)})}):u.jsx("div",{className:"mt-10 rounded-xl border border-dashed border-neutral-300 bg-surface p-8 text-center text-sm text-foreground-muted",children:"No schemas defined in this AsyncAPI document."});return u.jsx("div",{className:"flex justify-center w-full",children:u.jsx(Fn,{content:r,stickySideContent:!1})})}const jh=e=>typeof e=="object"&&e!==null,Sh=e=>e==="operations"||e==="messages"||e==="schemas";function Rh({asyncapi:e,config:t}){var U,pe,R,k,m,T;const n=t.show??{},i=[...n.operations!==!1?[{id:"operations",name:"Operations",icon:bl}]:[],...n.messages!==!1?[{id:"messages",name:"Messages",icon:vl}]:[],...n.schemas!==!1?[{id:"schemas",name:"Schemas",icon:wl}]:[]],r=((U=i[0])==null?void 0:U.id)??"operations",[s,o]=se.useState(r),[a,l]=se.useState(null),[c,d]=se.useState(null),[f,p]=se.useState(null),h=i.some(S=>S.id===s)?s:r,g=n.operations!==!1?a:null,v=n.messages!==!1?c:null,E=n.schemas!==!1?f:null,_=se.useMemo(()=>new Map,[]),[w,y]=se.useState(null),[O,I]=se.useState(null);se.useEffect(()=>{_.clear()},[e,_]);const j=se.useCallback(S=>{if(_.has(S))return _.get(S);const W=S.replace(/^#\//,"").split("/");let B=e;for(const K of W){if(!jh(B)){B=void 0;break}const ne=K.replace(/~1/g,"/").replace(/~0/g,"~");if(B=B[ne],B==null)break}return B!==void 0&&_.set(S,B),B},[e,_]),M=((pe=t.expand)==null?void 0:pe.schemas)===!0,ee=se.useMemo(()=>({document:e,deref:j,portalHost:w,rootElement:O,defaultSchemaExpanded:M}),[e,j,w,O,M]),q=h==="operations"?u.jsx(Ah,{operations:e.operations??{},selectedKey:g,onSelectKey:l}):h==="messages"?u.jsx(ph,{messages:((R=e.components)==null?void 0:R.messages)??{},selectedKey:v}):u.jsx(Nh,{schemas:((k=e.components)==null?void 0:k.schemas)??{},selectedKey:E}),Y=t.theme?Au(t.theme):{};return u.jsx(gl.Provider,{value:ee,children:u.jsxs("div",{ref:I,style:Y,className:`relative @container bg-background text-foreground p-2 ${n.sidebar!==!1?"pt-14":""}`,children:[u.jsx("div",{ref:y,className:"asyncapi-portal-root"}),n.info!==!1&&u.jsx(Nf,{...e.info}),n.servers!==!1&&e.servers&&Object.keys(e.servers).length>0&&u.jsx(kh,{servers:e.servers}),n.sidebar!==!1&&u.jsx(ku,{info:e.info,operations:n.operations!==!1?e.operations:void 0,messages:n.messages!==!1?(m=e.components)==null?void 0:m.messages:void 0,schemas:n.schemas!==!1?(T=e.components)==null?void 0:T.schemas:void 0,sidebarConfig:t.sidebar,activeTab:h,onTabChange:o,onItemSelect:(S,W)=>{o(S),l(S==="operations"?W:null),d(S==="messages"?W:null),p(S==="schemas"?W:null)},selectedItem:g?{tab:"operations",key:g}:v?{tab:"messages",key:v}:E?{tab:"schemas",key:E}:null}),u.jsx(eu,{tabs:i,current:h,onChange:S=>{Sh(S)&&o(S)}}),u.jsx("div",{id:`panel-${h}`,role:"tabpanel","aria-labelledby":`tab-${h}`,children:q})]})})}const lo=e=>{const t="doc"in e?e.doc:e.asyncapi,n=e.config??ml;return u.jsx(Rh,{asyncapi:t,config:n})};function Cc(e,t,n){e.registerSchemaParser(t);const i=e.parserRegistry,r=i.get.bind(i);i.get=s=>{const o=r(s);return o!==void 0?o:n(s)?t:void 0}}const Ih=["application/vnd.apache.avro","application/vnd.apache.avro+json","application/vnd.apache.avro+yaml","application/vnd.apache.avro;version=1.9.0","application/vnd.apache.avro+json;version=1.9.0","application/vnd.apache.avro+yaml;version=1.9.0","application/vnd.apache.avro;version=1.8.2","application/vnd.apache.avro+json;version=1.8.2","application/vnd.apache.avro+yaml;version=1.8.2"];function Mh(){return{validate:Lh,parse:Ph,getMimeTypes:()=>Ih}}function Ch(e){Cc(e,Mh(),xr)}function Lh(e){return Ws(e.data).map(t=>({message:t,path:e.path}))}function Ph(e){var n,i;const t=Ws(e.data);if(t.length>0)return{[mr]:t[0]};try{const r=Os(e.data),s=e.meta.message,o=(i=(n=s==null?void 0:s.bindings)==null?void 0:n.kafka)==null?void 0:i.key;return o&&s&&(s["x-parser-original-bindings-kafka-key"]=o,s.bindings.kafka.key=Os(o)),r}catch(r){return{[mr]:r instanceof Error?r.message:"Failed to convert Avro schema"}}}const Dh=["application/vnd.google.protobuf","application/vnd.google.protobuf;version=2","application/vnd.google.protobuf;version=3"];function Fh(){return{validate:zh,parse:qh,getMimeTypes:()=>Dh}}function Bh(e){Cc(e,Fh(),br)}function zh(e){return _d(e.data).map(t=>({message:t,path:e.path}))}function qh(e){if(typeof e.data!="string")return{[mr]:"Protobuf schema must be a string of .proto source"};try{return no(e.data)}catch(t){return{[mr]:t instanceof Error?t.message:"Failed to convert Protobuf schema"}}}async function Uh(){try{const e=await Promise.resolve().then(()=>require("./index-BNxgjuJI.cjs")).then(n=>n.index),t=e.default??e;if(typeof t!="function")throw new Error("Unexpected export shape from '@asyncapi/parser/browser'.");return t}catch(e){throw console.error("[apiuikit] Failed to load '@asyncapi/parser/browser':",e),new Error("[apiuikit] The parsed entry requires '@asyncapi/parser'. Install it (`npm i @asyncapi/parser`), or use the `AsyncAPI` component with a pre-resolved document instead.")}}async function Lc(e){const t=await Uh(),n=new t;Ch(n),Bh(n);try{const{document:i,diagnostics:r}=await n.parse(e);return{diagnostics:r,document:i?Vh(i):null}}catch(i){return{diagnostics:[{message:i instanceof Error?i.message:"Failed to parse document",path:[],severity:0}],document:null}}}async function Hh(e,t){const{diagnostics:n,document:i}=await Lc(e);return{diagnostics:n,view:i?u.jsx(lo,{kind:"resolved",doc:i,config:t}):null}}function Vh(e){return e.json()}function Wh({raw:e,config:t,onDiagnostics:n}){const[i,r]=se.useState(null),s=se.useRef(n);return s.current=n,se.useEffect(()=>{let o=!0;return Lc(e).then(({document:a,diagnostics:l})=>{var c;o&&(r(a),(c=s.current)==null||c.call(s,l))}),()=>{o=!1}},[e]),i?u.jsx(lo,{kind:"resolved",doc:i,config:t}):null}exports.AsyncAPI=lo;exports.AsyncAPIRenderer=Wh;exports.SchemaTabs=Ss;exports.SchemaTree=oo;exports.defaultConfig=ml;exports.getDefaultExportFromCjs=Is;exports.parseAndRender=Hh;exports.useAsyncAPIDocument=Zt;