@cdklabs/cdk-ssm-documents 0.0.64 → 0.0.66

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 (601) hide show
  1. package/.jsii +11 -11
  2. package/lib/construct/synth-utils.js +1 -1
  3. package/lib/document/automation-document.js +1 -1
  4. package/lib/document/command-document.js +1 -1
  5. package/lib/document/document-builder.js +2 -2
  6. package/lib/document/ssm-document.js +1 -1
  7. package/lib/domain/aws-service.js +1 -1
  8. package/lib/domain/choice.js +1 -1
  9. package/lib/domain/data-type.js +1 -1
  10. package/lib/domain/enum/install-action.js +2 -2
  11. package/lib/domain/enum/install-uninstall-repair.js +2 -2
  12. package/lib/domain/enum/installation-type.js +2 -2
  13. package/lib/domain/enum/package-name.js +2 -2
  14. package/lib/domain/input.js +1 -1
  15. package/lib/domain/operation.js +1 -1
  16. package/lib/domain/platform.js +1 -1
  17. package/lib/domain/precondition.js +1 -1
  18. package/lib/incident-response/incident-response.js +3 -3
  19. package/lib/interface/approve-hook.js +2 -2
  20. package/lib/interface/auth-method.js +3 -3
  21. package/lib/interface/aws-invoker.js +2 -2
  22. package/lib/interface/downloadable-content.js +8 -8
  23. package/lib/interface/environment.js +3 -3
  24. package/lib/interface/execute-automation-hook/api-execute-automation-hook.js +1 -1
  25. package/lib/interface/observer.js +1 -1
  26. package/lib/interface/on-failure.js +6 -6
  27. package/lib/interface/pause-hook.js +2 -2
  28. package/lib/interface/run-command-hook/api-run-command-hook.js +1 -1
  29. package/lib/interface/run-document-location.js +2 -2
  30. package/lib/interface/sleep-hook.js +2 -2
  31. package/lib/interface/step-ref.js +1 -1
  32. package/lib/interface/variables/boolean-variable.js +2 -2
  33. package/lib/interface/variables/map-list-variable.js +2 -2
  34. package/lib/interface/variables/number-variable.js +2 -2
  35. package/lib/interface/variables/secure-string-variable.js +4 -4
  36. package/lib/interface/variables/string-list-variable.js +2 -2
  37. package/lib/interface/variables/string-map-variable.js +2 -2
  38. package/lib/interface/variables/string-variable.js +4 -4
  39. package/lib/interface/variables/variable.js +2 -2
  40. package/lib/interface/webhook.js +1 -1
  41. package/lib/parent-steps/automation/approve-step.js +1 -1
  42. package/lib/parent-steps/automation/assert-aws-resource-step.js +1 -1
  43. package/lib/parent-steps/automation/aws-api-step.js +1 -1
  44. package/lib/parent-steps/automation/branch-step.js +1 -1
  45. package/lib/parent-steps/automation/change-instance-state-step.js +3 -3
  46. package/lib/parent-steps/automation/copy-image-step.js +1 -1
  47. package/lib/parent-steps/automation/create-image-step.js +1 -1
  48. package/lib/parent-steps/automation/create-stack-step.js +3 -3
  49. package/lib/parent-steps/automation/create-tags-step.js +3 -3
  50. package/lib/parent-steps/automation/delete-image-step.js +1 -1
  51. package/lib/parent-steps/automation/delete-stack-step.js +1 -1
  52. package/lib/parent-steps/automation/execute-automation-step.js +1 -1
  53. package/lib/parent-steps/automation/execute-script-step.js +5 -5
  54. package/lib/parent-steps/automation/execute-state-machine-step.js +1 -1
  55. package/lib/parent-steps/automation/invoke-lambda-function-step.js +1 -1
  56. package/lib/parent-steps/automation/invoke-webhook-step.js +1 -1
  57. package/lib/parent-steps/automation/pause-step.js +1 -1
  58. package/lib/parent-steps/automation/run-command-step.js +3 -3
  59. package/lib/parent-steps/automation/run-instance-step.js +1 -1
  60. package/lib/parent-steps/automation/sleep-step.js +1 -1
  61. package/lib/parent-steps/automation/update-variable.js +1 -1
  62. package/lib/parent-steps/automation/wait-for-resource-step.js +1 -1
  63. package/lib/parent-steps/automation-step.js +1 -1
  64. package/lib/parent-steps/command/applications-step.js +1 -1
  65. package/lib/parent-steps/command/configure-docker-step.js +1 -1
  66. package/lib/parent-steps/command/configure-package-step.js +1 -1
  67. package/lib/parent-steps/command/domain-join-step.js +1 -1
  68. package/lib/parent-steps/command/download-content-step.js +1 -1
  69. package/lib/parent-steps/command/ps-module-step.js +1 -1
  70. package/lib/parent-steps/command/run-docker-action-step.js +1 -1
  71. package/lib/parent-steps/command/run-document-step.js +1 -1
  72. package/lib/parent-steps/command/run-powershell-script-step.js +1 -1
  73. package/lib/parent-steps/command/run-shell-script-step.js +1 -1
  74. package/lib/parent-steps/command/software-inventory-step.js +1 -1
  75. package/lib/parent-steps/command/update-agent-step.js +1 -1
  76. package/lib/parent-steps/command/update-ssm-agent-step.js +1 -1
  77. package/lib/parent-steps/command-step.js +1 -1
  78. package/lib/parent-steps/step.js +1 -1
  79. package/lib/patterns/automation/composite-step.js +2 -2
  80. package/lib/patterns/automation/reboot-instance-and-wait.js +1 -1
  81. package/lib/patterns/automation/string-step.js +1 -1
  82. package/lib/patterns/document/string-document.js +1 -1
  83. package/lib/patterns/document/timed-document.js +1 -1
  84. package/lib/samples/hello-world.js +1 -1
  85. package/lib/simulation/automation/approve-simulation.js +1 -1
  86. package/lib/simulation/automation/assert-aws-resource-simulation.js +1 -1
  87. package/lib/simulation/automation/automation-simulation-base.js +1 -1
  88. package/lib/simulation/automation/aws-api-simulation.js +1 -1
  89. package/lib/simulation/automation/branch-simulation.js +1 -1
  90. package/lib/simulation/automation/change-instance-state-simulation.js +1 -1
  91. package/lib/simulation/automation/copy-image-simulation.js +1 -1
  92. package/lib/simulation/automation/create-image-simulation.js +1 -1
  93. package/lib/simulation/automation/create-stack-simulation.js +1 -1
  94. package/lib/simulation/automation/create-tags-simulation.js +1 -1
  95. package/lib/simulation/automation/delete-image-simulation.js +1 -1
  96. package/lib/simulation/automation/delete-stack-simulation.js +1 -1
  97. package/lib/simulation/automation/execute-script-simulation.js +1 -1
  98. package/lib/simulation/automation/execute-state-machine-simulation.js +1 -1
  99. package/lib/simulation/automation/invoke-lambda-function-simulation.js +1 -1
  100. package/lib/simulation/automation/invoke-webhook-simulation.js +1 -1
  101. package/lib/simulation/automation/pause-simulation.js +1 -1
  102. package/lib/simulation/automation/run-command-simulation.js +1 -1
  103. package/lib/simulation/automation/run-instance-simulation.js +1 -1
  104. package/lib/simulation/automation/sleep-simulation.js +1 -1
  105. package/lib/simulation/automation/update-variable-simulation.js +1 -1
  106. package/lib/simulation/automation/wait-for-resource-simulation.js +1 -1
  107. package/lib/simulation/automation-step-simulation.js +1 -1
  108. package/lib/simulation/command/command-simulation-base.js +1 -1
  109. package/lib/simulation/command/ps-module-simulation.js +1 -1
  110. package/lib/simulation/command/run-powershell-script-simulation.js +1 -1
  111. package/lib/simulation/command/run-shell-script-simulation.js +1 -1
  112. package/lib/simulation/command-step-simulation.js +1 -1
  113. package/lib/simulation/document/automation-simulation.js +1 -1
  114. package/lib/simulation/document/command-simulation.js +1 -1
  115. package/lib/simulation/simulation.js +1 -1
  116. package/node_modules/@aws-sdk/checksums/dist-cjs/flexible-checksums/getCrc32ChecksumAlgorithmFunction.browser.js +2 -6
  117. package/node_modules/@aws-sdk/checksums/dist-cjs/flexible-checksums/getCrc32ChecksumAlgorithmFunction.js +6 -11
  118. package/node_modules/@aws-sdk/checksums/dist-cjs/index.js +56 -56
  119. package/node_modules/@aws-sdk/checksums/package.json +7 -7
  120. package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/auth/httpAuthSchemeProvider.js +9 -15
  121. package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/endpoint/bdd.js +2 -5
  122. package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/endpoint/endpointResolver.js +7 -11
  123. package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/index.js +449 -469
  124. package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/models/CloudFormationServiceException.js +4 -8
  125. package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/models/errors.js +59 -91
  126. package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/runtimeConfig.browser.js +22 -26
  127. package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/runtimeConfig.js +30 -34
  128. package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/runtimeConfig.native.js +4 -7
  129. package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/runtimeConfig.shared.js +20 -24
  130. package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/schemas/schemas_0.js +814 -533
  131. package/node_modules/@aws-sdk/client-cloudformation/package.json +9 -9
  132. package/node_modules/@aws-sdk/client-cloudwatch/README.md +21 -0
  133. package/node_modules/@aws-sdk/client-cloudwatch/dist-cjs/auth/httpAuthSchemeProvider.js +9 -15
  134. package/node_modules/@aws-sdk/client-cloudwatch/dist-cjs/endpoint/bdd.js +2 -5
  135. package/node_modules/@aws-sdk/client-cloudwatch/dist-cjs/endpoint/endpointResolver.js +7 -11
  136. package/node_modules/@aws-sdk/client-cloudwatch/dist-cjs/index.js +255 -233
  137. package/node_modules/@aws-sdk/client-cloudwatch/dist-cjs/models/CloudWatchServiceException.js +4 -8
  138. package/node_modules/@aws-sdk/client-cloudwatch/dist-cjs/models/errors.js +93 -68
  139. package/node_modules/@aws-sdk/client-cloudwatch/dist-cjs/runtimeConfig.browser.js +25 -29
  140. package/node_modules/@aws-sdk/client-cloudwatch/dist-cjs/runtimeConfig.js +33 -37
  141. package/node_modules/@aws-sdk/client-cloudwatch/dist-cjs/runtimeConfig.native.js +4 -7
  142. package/node_modules/@aws-sdk/client-cloudwatch/dist-cjs/runtimeConfig.shared.js +20 -24
  143. package/node_modules/@aws-sdk/client-cloudwatch/dist-cjs/schemas/schemas_0.js +476 -259
  144. package/node_modules/@aws-sdk/client-cloudwatch/dist-es/CloudWatch.js +6 -0
  145. package/node_modules/@aws-sdk/client-cloudwatch/dist-es/commands/AssociateDatasetKmsKeyCommand.js +16 -0
  146. package/node_modules/@aws-sdk/client-cloudwatch/dist-es/commands/DisassociateDatasetKmsKeyCommand.js +16 -0
  147. package/node_modules/@aws-sdk/client-cloudwatch/dist-es/commands/GetDatasetCommand.js +16 -0
  148. package/node_modules/@aws-sdk/client-cloudwatch/dist-es/commands/index.js +3 -0
  149. package/node_modules/@aws-sdk/client-cloudwatch/dist-es/models/errors.js +68 -26
  150. package/node_modules/@aws-sdk/client-cloudwatch/dist-es/schemas/schemas_0.js +73 -1
  151. package/node_modules/@aws-sdk/client-cloudwatch/dist-types/CloudWatch.d.ts +21 -0
  152. package/node_modules/@aws-sdk/client-cloudwatch/dist-types/CloudWatchClient.d.ts +5 -2
  153. package/node_modules/@aws-sdk/client-cloudwatch/dist-types/commands/AssociateDatasetKmsKeyCommand.d.ts +161 -0
  154. package/node_modules/@aws-sdk/client-cloudwatch/dist-types/commands/DisassociateDatasetKmsKeyCommand.d.ts +105 -0
  155. package/node_modules/@aws-sdk/client-cloudwatch/dist-types/commands/GetDatasetCommand.d.ts +91 -0
  156. package/node_modules/@aws-sdk/client-cloudwatch/dist-types/commands/index.d.ts +3 -0
  157. package/node_modules/@aws-sdk/client-cloudwatch/dist-types/models/errors.d.ts +74 -23
  158. package/node_modules/@aws-sdk/client-cloudwatch/dist-types/models/models_0.d.ts +90 -0
  159. package/node_modules/@aws-sdk/client-cloudwatch/dist-types/schemas/schemas_0.d.ts +12 -0
  160. package/node_modules/@aws-sdk/client-cloudwatch/dist-types/ts3.4/CloudWatch.d.ts +51 -0
  161. package/node_modules/@aws-sdk/client-cloudwatch/dist-types/ts3.4/CloudWatchClient.d.ts +18 -0
  162. package/node_modules/@aws-sdk/client-cloudwatch/dist-types/ts3.4/commands/AssociateDatasetKmsKeyCommand.d.ts +53 -0
  163. package/node_modules/@aws-sdk/client-cloudwatch/dist-types/ts3.4/commands/DisassociateDatasetKmsKeyCommand.d.ts +53 -0
  164. package/node_modules/@aws-sdk/client-cloudwatch/dist-types/ts3.4/commands/GetDatasetCommand.d.ts +49 -0
  165. package/node_modules/@aws-sdk/client-cloudwatch/dist-types/ts3.4/commands/index.d.ts +3 -0
  166. package/node_modules/@aws-sdk/client-cloudwatch/dist-types/ts3.4/models/errors.d.ts +40 -16
  167. package/node_modules/@aws-sdk/client-cloudwatch/dist-types/ts3.4/models/models_0.d.ts +17 -0
  168. package/node_modules/@aws-sdk/client-cloudwatch/dist-types/ts3.4/schemas/schemas_0.d.ts +12 -0
  169. package/node_modules/@aws-sdk/client-cloudwatch/package.json +13 -13
  170. package/node_modules/@aws-sdk/client-ec2/README.md +14 -0
  171. package/node_modules/@aws-sdk/client-ec2/dist-cjs/auth/httpAuthSchemeProvider.js +9 -15
  172. package/node_modules/@aws-sdk/client-ec2/dist-cjs/endpoint/bdd.js +2 -5
  173. package/node_modules/@aws-sdk/client-ec2/dist-cjs/endpoint/endpointResolver.js +7 -11
  174. package/node_modules/@aws-sdk/client-ec2/dist-cjs/index.js +2903 -2879
  175. package/node_modules/@aws-sdk/client-ec2/dist-cjs/models/EC2ServiceException.js +4 -8
  176. package/node_modules/@aws-sdk/client-ec2/dist-cjs/runtimeConfig.browser.js +22 -26
  177. package/node_modules/@aws-sdk/client-ec2/dist-cjs/runtimeConfig.js +30 -34
  178. package/node_modules/@aws-sdk/client-ec2/dist-cjs/runtimeConfig.native.js +4 -7
  179. package/node_modules/@aws-sdk/client-ec2/dist-cjs/runtimeConfig.shared.js +20 -24
  180. package/node_modules/@aws-sdk/client-ec2/dist-cjs/schemas/schemas_0.js +6980 -4554
  181. package/node_modules/@aws-sdk/client-ec2/dist-es/EC2.js +4 -0
  182. package/node_modules/@aws-sdk/client-ec2/dist-es/commands/AttachImageWatermarkCommand.js +16 -0
  183. package/node_modules/@aws-sdk/client-ec2/dist-es/commands/DetachImageWatermarkCommand.js +16 -0
  184. package/node_modules/@aws-sdk/client-ec2/dist-es/commands/index.js +2 -0
  185. package/node_modules/@aws-sdk/client-ec2/dist-es/models/enums.js +5 -0
  186. package/node_modules/@aws-sdk/client-ec2/dist-es/schemas/schemas_0.js +108 -13
  187. package/node_modules/@aws-sdk/client-ec2/dist-types/EC2.d.ts +14 -0
  188. package/node_modules/@aws-sdk/client-ec2/dist-types/EC2Client.d.ts +4 -2
  189. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/AttachImageWatermarkCommand.d.ts +84 -0
  190. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/CancelCapacityReservationCommand.d.ts +16 -10
  191. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/CreateCapacityReservationFleetCommand.d.ts +1 -1
  192. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/CreateDefaultSubnetCommand.d.ts +2 -1
  193. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/CreateDefaultVpcCommand.d.ts +1 -2
  194. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/CreateFlowLogsCommand.d.ts +8 -0
  195. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/CreateRouteServerPeerCommand.d.ts +2 -1
  196. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/CreateRouteTableCommand.d.ts +1 -2
  197. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DeleteSecurityGroupCommand.d.ts +2 -1
  198. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DeleteSnapshotCommand.d.ts +1 -1
  199. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DeleteSpotDatafeedSubscriptionCommand.d.ts +1 -1
  200. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DescribeFlowLogsCommand.d.ts +8 -0
  201. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DescribeImagesCommand.d.ts +9 -0
  202. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DescribeImportSnapshotTasksCommand.d.ts +1 -1
  203. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DescribeInstanceAttributeCommand.d.ts +1 -2
  204. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DescribeInstanceImageMetadataCommand.d.ts +9 -0
  205. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DescribeSpotInstanceRequestsCommand.d.ts +2 -1
  206. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DescribeSpotPriceHistoryCommand.d.ts +1 -1
  207. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DescribeStaleSecurityGroupsCommand.d.ts +1 -2
  208. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DescribeVolumesModificationsCommand.d.ts +0 -5
  209. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DetachImageWatermarkCommand.d.ts +82 -0
  210. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetCapacityManagerAttributesCommand.d.ts +1 -1
  211. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetCapacityManagerMetricDataCommand.d.ts +1 -2
  212. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/ModifyIpamScopeCommand.d.ts +2 -1
  213. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/ModifyLaunchTemplateCommand.d.ts +1 -1
  214. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/ModifyLocalGatewayRouteCommand.d.ts +1 -1
  215. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/ModifyManagedPrefixListCommand.d.ts +1 -2
  216. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/ModifyVolumeCommand.d.ts +0 -5
  217. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/index.d.ts +2 -0
  218. package/node_modules/@aws-sdk/client-ec2/dist-types/models/enums.d.ts +13 -0
  219. package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_0.d.ts +38 -23
  220. package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_1.d.ts +45 -128
  221. package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_2.d.ts +128 -48
  222. package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_3.d.ts +109 -161
  223. package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_4.d.ts +169 -219
  224. package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_5.d.ts +250 -353
  225. package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_6.d.ts +351 -182
  226. package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_7.d.ts +178 -2
  227. package/node_modules/@aws-sdk/client-ec2/dist-types/schemas/schemas_0.d.ts +9 -0
  228. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/EC2.d.ts +34 -0
  229. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/EC2Client.d.ts +12 -0
  230. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/AttachImageWatermarkCommand.d.ts +53 -0
  231. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/CreateDefaultSubnetCommand.d.ts +2 -4
  232. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/CreateDefaultVpcCommand.d.ts +4 -2
  233. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/CreateRouteServerPeerCommand.d.ts +2 -4
  234. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/CreateRouteTableCommand.d.ts +4 -2
  235. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/DeleteSecurityGroupCommand.d.ts +2 -4
  236. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/DeleteSnapshotCommand.d.ts +1 -1
  237. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/DeleteSpotDatafeedSubscriptionCommand.d.ts +1 -1
  238. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/DescribeImportSnapshotTasksCommand.d.ts +1 -1
  239. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/DescribeInstanceAttributeCommand.d.ts +4 -2
  240. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/DescribeSpotInstanceRequestsCommand.d.ts +2 -4
  241. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/DescribeSpotPriceHistoryCommand.d.ts +1 -1
  242. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/DescribeStaleSecurityGroupsCommand.d.ts +4 -2
  243. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/DetachImageWatermarkCommand.d.ts +53 -0
  244. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/GetCapacityManagerAttributesCommand.d.ts +1 -1
  245. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/GetCapacityManagerMetricDataCommand.d.ts +4 -2
  246. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/ModifyIpamScopeCommand.d.ts +2 -4
  247. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/ModifyLaunchTemplateCommand.d.ts +1 -1
  248. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/ModifyLocalGatewayRouteCommand.d.ts +1 -1
  249. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/ModifyManagedPrefixListCommand.d.ts +4 -2
  250. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/index.d.ts +2 -0
  251. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/enums.d.ts +7 -0
  252. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_0.d.ts +9 -7
  253. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_1.d.ts +13 -26
  254. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_2.d.ts +29 -12
  255. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_3.d.ts +25 -36
  256. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_4.d.ts +40 -35
  257. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_5.d.ts +49 -67
  258. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_6.d.ts +66 -47
  259. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_7.d.ts +40 -0
  260. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/schemas/schemas_0.d.ts +9 -0
  261. package/node_modules/@aws-sdk/client-ec2/package.json +15 -15
  262. package/node_modules/@aws-sdk/client-iam/dist-cjs/auth/httpAuthSchemeProvider.js +9 -15
  263. package/node_modules/@aws-sdk/client-iam/dist-cjs/endpoint/bdd.js +2 -5
  264. package/node_modules/@aws-sdk/client-iam/dist-cjs/endpoint/endpointResolver.js +7 -11
  265. package/node_modules/@aws-sdk/client-iam/dist-cjs/index.js +634 -654
  266. package/node_modules/@aws-sdk/client-iam/dist-cjs/models/IAMServiceException.js +4 -8
  267. package/node_modules/@aws-sdk/client-iam/dist-cjs/models/errors.js +71 -109
  268. package/node_modules/@aws-sdk/client-iam/dist-cjs/runtimeConfig.browser.js +22 -26
  269. package/node_modules/@aws-sdk/client-iam/dist-cjs/runtimeConfig.js +30 -34
  270. package/node_modules/@aws-sdk/client-iam/dist-cjs/runtimeConfig.native.js +4 -7
  271. package/node_modules/@aws-sdk/client-iam/dist-cjs/runtimeConfig.shared.js +20 -24
  272. package/node_modules/@aws-sdk/client-iam/dist-cjs/schemas/schemas_0.js +1006 -665
  273. package/node_modules/@aws-sdk/client-iam/dist-types/commands/CreateServiceSpecificCredentialCommand.d.ts +18 -3
  274. package/node_modules/@aws-sdk/client-iam/dist-types/commands/ListServiceSpecificCredentialsCommand.d.ts +17 -2
  275. package/node_modules/@aws-sdk/client-iam/dist-types/models/models_0.d.ts +5 -2
  276. package/node_modules/@aws-sdk/client-iam/package.json +14 -14
  277. package/node_modules/@aws-sdk/client-lambda/dist-cjs/auth/httpAuthSchemeProvider.js +9 -15
  278. package/node_modules/@aws-sdk/client-lambda/dist-cjs/endpoint/bdd.js +2 -5
  279. package/node_modules/@aws-sdk/client-lambda/dist-cjs/endpoint/endpointResolver.js +7 -11
  280. package/node_modules/@aws-sdk/client-lambda/dist-cjs/index.js +368 -386
  281. package/node_modules/@aws-sdk/client-lambda/dist-cjs/models/LambdaServiceException.js +4 -8
  282. package/node_modules/@aws-sdk/client-lambda/dist-cjs/models/errors.js +229 -145
  283. package/node_modules/@aws-sdk/client-lambda/dist-cjs/runtimeConfig.browser.js +24 -28
  284. package/node_modules/@aws-sdk/client-lambda/dist-cjs/runtimeConfig.js +32 -36
  285. package/node_modules/@aws-sdk/client-lambda/dist-cjs/runtimeConfig.native.js +4 -7
  286. package/node_modules/@aws-sdk/client-lambda/dist-cjs/runtimeConfig.shared.js +20 -24
  287. package/node_modules/@aws-sdk/client-lambda/dist-cjs/schemas/schemas_0.js +959 -581
  288. package/node_modules/@aws-sdk/client-lambda/dist-es/models/enums.js +2 -0
  289. package/node_modules/@aws-sdk/client-lambda/dist-es/models/errors.js +134 -0
  290. package/node_modules/@aws-sdk/client-lambda/dist-es/schemas/schemas_0.js +100 -31
  291. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/AddPermissionCommand.d.ts +5 -2
  292. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/CreateAliasCommand.d.ts +3 -0
  293. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/CreateEventSourceMappingCommand.d.ts +28 -28
  294. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/CreateFunctionCommand.d.ts +14 -14
  295. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/DeleteAliasCommand.d.ts +3 -0
  296. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/DeleteEventSourceMappingCommand.d.ts +16 -16
  297. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/DeleteFunctionUrlConfigCommand.d.ts +3 -0
  298. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/DeleteLayerVersionCommand.d.ts +6 -0
  299. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/GetEventSourceMappingCommand.d.ts +16 -16
  300. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/GetFunctionCodeSigningConfigCommand.d.ts +3 -0
  301. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/GetFunctionCommand.d.ts +8 -8
  302. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/GetFunctionConfigurationCommand.d.ts +8 -8
  303. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/GetLayerVersionByArnCommand.d.ts +4 -4
  304. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/GetLayerVersionCommand.d.ts +4 -4
  305. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/GetRuntimeManagementConfigCommand.d.ts +1 -1
  306. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/InvokeAsyncCommand.d.ts +72 -0
  307. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/InvokeCommand.d.ts +21 -0
  308. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/InvokeWithResponseStreamCommand.d.ts +6 -0
  309. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/ListEventSourceMappingsCommand.d.ts +16 -16
  310. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/ListFunctionsCommand.d.ts +8 -8
  311. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/ListLayerVersionsCommand.d.ts +6 -6
  312. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/ListLayersCommand.d.ts +6 -6
  313. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/ListVersionsByFunctionCommand.d.ts +8 -8
  314. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/PublishLayerVersionCommand.d.ts +8 -8
  315. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/PublishVersionCommand.d.ts +8 -8
  316. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/PutProvisionedConcurrencyConfigCommand.d.ts +1 -1
  317. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/RemovePermissionCommand.d.ts +3 -0
  318. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/SendDurableExecutionCallbackFailureCommand.d.ts +3 -0
  319. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/SendDurableExecutionCallbackHeartbeatCommand.d.ts +3 -0
  320. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/SendDurableExecutionCallbackSuccessCommand.d.ts +3 -0
  321. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/UpdateEventSourceMappingCommand.d.ts +32 -32
  322. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/UpdateFunctionCodeCommand.d.ts +12 -12
  323. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/UpdateFunctionConfigurationCommand.d.ts +9 -9
  324. package/node_modules/@aws-sdk/client-lambda/dist-types/models/enums.d.ts +2 -0
  325. package/node_modules/@aws-sdk/client-lambda/dist-types/models/errors.d.ts +173 -0
  326. package/node_modules/@aws-sdk/client-lambda/dist-types/models/models_0.d.ts +158 -158
  327. package/node_modules/@aws-sdk/client-lambda/dist-types/schemas/schemas_0.d.ts +9 -0
  328. package/node_modules/@aws-sdk/client-lambda/dist-types/ts3.4/models/enums.d.ts +2 -0
  329. package/node_modules/@aws-sdk/client-lambda/dist-types/ts3.4/models/errors.d.ts +88 -0
  330. package/node_modules/@aws-sdk/client-lambda/dist-types/ts3.4/models/models_0.d.ts +33 -33
  331. package/node_modules/@aws-sdk/client-lambda/dist-types/ts3.4/schemas/schemas_0.d.ts +9 -0
  332. package/node_modules/@aws-sdk/client-lambda/package.json +13 -13
  333. package/node_modules/@aws-sdk/client-s3/README.md +35 -0
  334. package/node_modules/@aws-sdk/client-s3/dist-cjs/auth/httpAuthSchemeProvider.js +15 -19
  335. package/node_modules/@aws-sdk/client-s3/dist-cjs/endpoint/bdd.js +2 -5
  336. package/node_modules/@aws-sdk/client-s3/dist-cjs/endpoint/endpointResolver.js +7 -11
  337. package/node_modules/@aws-sdk/client-s3/dist-cjs/index.js +646 -535
  338. package/node_modules/@aws-sdk/client-s3/dist-cjs/models/S3ServiceException.js +4 -8
  339. package/node_modules/@aws-sdk/client-s3/dist-cjs/models/errors.js +106 -52
  340. package/node_modules/@aws-sdk/client-s3/dist-cjs/runtimeConfig.browser.js +29 -33
  341. package/node_modules/@aws-sdk/client-s3/dist-cjs/runtimeConfig.js +43 -47
  342. package/node_modules/@aws-sdk/client-s3/dist-cjs/runtimeConfig.native.js +4 -7
  343. package/node_modules/@aws-sdk/client-s3/dist-cjs/runtimeConfig.shared.js +25 -29
  344. package/node_modules/@aws-sdk/client-s3/dist-cjs/schemas/schemas_0.js +1256 -740
  345. package/node_modules/@aws-sdk/client-s3/dist-es/S3.js +12 -0
  346. package/node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteObjectAnnotationCommand.js +23 -0
  347. package/node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectAnnotationCommand.js +28 -0
  348. package/node_modules/@aws-sdk/client-s3/dist-es/commands/ListObjectAnnotationsCommand.js +23 -0
  349. package/node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectAnnotationCommand.js +29 -0
  350. package/node_modules/@aws-sdk/client-s3/dist-es/commands/UpdateBucketMetadataAnnotationTableConfigurationCommand.js +27 -0
  351. package/node_modules/@aws-sdk/client-s3/dist-es/commands/index.js +5 -0
  352. package/node_modules/@aws-sdk/client-s3/dist-es/models/enums.js +12 -1
  353. package/node_modules/@aws-sdk/client-s3/dist-es/models/errors.js +76 -4
  354. package/node_modules/@aws-sdk/client-s3/dist-es/pagination/ListObjectAnnotationsPaginator.js +4 -0
  355. package/node_modules/@aws-sdk/client-s3/dist-es/pagination/index.js +1 -0
  356. package/node_modules/@aws-sdk/client-s3/dist-es/schemas/schemas_0.js +260 -100
  357. package/node_modules/@aws-sdk/client-s3/dist-types/S3.d.ts +42 -0
  358. package/node_modules/@aws-sdk/client-s3/dist-types/S3Client.d.ts +7 -2
  359. package/node_modules/@aws-sdk/client-s3/dist-types/commands/CopyObjectCommand.d.ts +1 -0
  360. package/node_modules/@aws-sdk/client-s3/dist-types/commands/CreateBucketMetadataConfigurationCommand.d.ts +27 -0
  361. package/node_modules/@aws-sdk/client-s3/dist-types/commands/DeleteObjectAnnotationCommand.d.ts +119 -0
  362. package/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketMetadataConfigurationCommand.d.ts +11 -0
  363. package/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketNotificationConfigurationCommand.d.ts +3 -3
  364. package/node_modules/@aws-sdk/client-s3/dist-types/commands/GetObjectAnnotationCommand.d.ts +141 -0
  365. package/node_modules/@aws-sdk/client-s3/dist-types/commands/ListObjectAnnotationsCommand.d.ts +138 -0
  366. package/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketNotificationConfigurationCommand.d.ts +3 -3
  367. package/node_modules/@aws-sdk/client-s3/dist-types/commands/PutObjectAnnotationCommand.d.ts +166 -0
  368. package/node_modules/@aws-sdk/client-s3/dist-types/commands/RenameObjectCommand.d.ts +1 -1
  369. package/node_modules/@aws-sdk/client-s3/dist-types/commands/RestoreObjectCommand.d.ts +1 -2
  370. package/node_modules/@aws-sdk/client-s3/dist-types/commands/UpdateBucketMetadataAnnotationTableConfigurationCommand.d.ts +110 -0
  371. package/node_modules/@aws-sdk/client-s3/dist-types/commands/index.d.ts +5 -0
  372. package/node_modules/@aws-sdk/client-s3/dist-types/models/enums.d.ts +29 -2
  373. package/node_modules/@aws-sdk/client-s3/dist-types/models/errors.d.ts +76 -4
  374. package/node_modules/@aws-sdk/client-s3/dist-types/models/models_0.d.ts +925 -549
  375. package/node_modules/@aws-sdk/client-s3/dist-types/models/models_1.d.ts +380 -2
  376. package/node_modules/@aws-sdk/client-s3/dist-types/pagination/ListObjectAnnotationsPaginator.d.ts +7 -0
  377. package/node_modules/@aws-sdk/client-s3/dist-types/pagination/index.d.ts +1 -0
  378. package/node_modules/@aws-sdk/client-s3/dist-types/schemas/schemas_0.d.ts +24 -0
  379. package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/S3.d.ts +98 -0
  380. package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/S3Client.d.ts +30 -0
  381. package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/DeleteObjectAnnotationCommand.d.ts +53 -0
  382. package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/GetObjectAnnotationCommand.d.ts +61 -0
  383. package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/ListObjectAnnotationsCommand.d.ts +53 -0
  384. package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutObjectAnnotationCommand.d.ts +61 -0
  385. package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/RenameObjectCommand.d.ts +1 -1
  386. package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/RestoreObjectCommand.d.ts +1 -2
  387. package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/UpdateBucketMetadataAnnotationTableConfigurationCommand.d.ts +49 -0
  388. package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/index.d.ts +5 -0
  389. package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/models/enums.d.ts +18 -3
  390. package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/models/errors.d.ts +41 -3
  391. package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/models/models_0.d.ts +138 -64
  392. package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/models/models_1.d.ts +75 -5
  393. package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/pagination/ListObjectAnnotationsPaginator.d.ts +11 -0
  394. package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/pagination/index.d.ts +1 -0
  395. package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/schemas/schemas_0.d.ts +24 -0
  396. package/node_modules/@aws-sdk/client-s3/package.json +21 -21
  397. package/node_modules/@aws-sdk/client-sns/dist-cjs/auth/httpAuthSchemeProvider.js +9 -15
  398. package/node_modules/@aws-sdk/client-sns/dist-cjs/endpoint/bdd.js +2 -5
  399. package/node_modules/@aws-sdk/client-sns/dist-cjs/endpoint/endpointResolver.js +7 -11
  400. package/node_modules/@aws-sdk/client-sns/dist-cjs/index.js +174 -194
  401. package/node_modules/@aws-sdk/client-sns/dist-cjs/models/SNSServiceException.js +4 -8
  402. package/node_modules/@aws-sdk/client-sns/dist-cjs/models/errors.js +69 -106
  403. package/node_modules/@aws-sdk/client-sns/dist-cjs/runtimeConfig.browser.js +22 -26
  404. package/node_modules/@aws-sdk/client-sns/dist-cjs/runtimeConfig.js +30 -34
  405. package/node_modules/@aws-sdk/client-sns/dist-cjs/runtimeConfig.native.js +4 -7
  406. package/node_modules/@aws-sdk/client-sns/dist-cjs/runtimeConfig.shared.js +20 -24
  407. package/node_modules/@aws-sdk/client-sns/dist-cjs/schemas/schemas_0.js +331 -218
  408. package/node_modules/@aws-sdk/client-sns/package.json +10 -10
  409. package/node_modules/@aws-sdk/client-sqs/dist-cjs/auth/httpAuthSchemeProvider.js +9 -15
  410. package/node_modules/@aws-sdk/client-sqs/dist-cjs/endpoint/bdd.js +2 -5
  411. package/node_modules/@aws-sdk/client-sqs/dist-cjs/endpoint/endpointResolver.js +7 -11
  412. package/node_modules/@aws-sdk/client-sqs/dist-cjs/index.js +118 -138
  413. package/node_modules/@aws-sdk/client-sqs/dist-cjs/models/SQSServiceException.js +4 -8
  414. package/node_modules/@aws-sdk/client-sqs/dist-cjs/models/errors.js +57 -88
  415. package/node_modules/@aws-sdk/client-sqs/dist-cjs/runtimeConfig.browser.js +24 -28
  416. package/node_modules/@aws-sdk/client-sqs/dist-cjs/runtimeConfig.js +31 -35
  417. package/node_modules/@aws-sdk/client-sqs/dist-cjs/runtimeConfig.native.js +4 -7
  418. package/node_modules/@aws-sdk/client-sqs/dist-cjs/runtimeConfig.shared.js +20 -24
  419. package/node_modules/@aws-sdk/client-sqs/dist-cjs/schemas/schemas_0.js +222 -150
  420. package/node_modules/@aws-sdk/client-sqs/package.json +16 -16
  421. package/node_modules/@aws-sdk/client-ssm/dist-cjs/auth/httpAuthSchemeProvider.js +9 -15
  422. package/node_modules/@aws-sdk/client-ssm/dist-cjs/endpoint/bdd.js +2 -5
  423. package/node_modules/@aws-sdk/client-ssm/dist-cjs/endpoint/endpointResolver.js +7 -11
  424. package/node_modules/@aws-sdk/client-ssm/dist-cjs/index.js +543 -563
  425. package/node_modules/@aws-sdk/client-ssm/dist-cjs/models/SSMServiceException.js +4 -8
  426. package/node_modules/@aws-sdk/client-ssm/dist-cjs/models/errors.js +279 -423
  427. package/node_modules/@aws-sdk/client-ssm/dist-cjs/runtimeConfig.browser.js +22 -26
  428. package/node_modules/@aws-sdk/client-ssm/dist-cjs/runtimeConfig.js +30 -34
  429. package/node_modules/@aws-sdk/client-ssm/dist-cjs/runtimeConfig.native.js +4 -7
  430. package/node_modules/@aws-sdk/client-ssm/dist-cjs/runtimeConfig.shared.js +20 -24
  431. package/node_modules/@aws-sdk/client-ssm/dist-cjs/schemas/schemas_0.js +1693 -1109
  432. package/node_modules/@aws-sdk/client-ssm/package.json +10 -10
  433. package/node_modules/@aws-sdk/core/dist-cjs/index.js +19 -2274
  434. package/node_modules/@aws-sdk/core/dist-cjs/submodules/account-id-endpoint/index.js +2 -4
  435. package/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.browser.js +297 -23
  436. package/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.js +327 -52
  437. package/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.native.js +297 -23
  438. package/node_modules/@aws-sdk/core/dist-cjs/submodules/httpAuthSchemes/index.js +19 -21
  439. package/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +107 -109
  440. package/node_modules/@aws-sdk/core/dist-cjs/submodules/util/index.js +2 -4
  441. package/node_modules/@aws-sdk/core/dist-es/index.js +3 -3
  442. package/node_modules/@aws-sdk/core/dist-es/submodules/client/util-endpoints/lib/aws/partitions.js +276 -1
  443. package/node_modules/@aws-sdk/core/dist-types/index.d.ts +5 -5
  444. package/node_modules/@aws-sdk/core/dist-types/ts3.4/index.d.ts +5 -5
  445. package/node_modules/@aws-sdk/core/package.json +12 -12
  446. package/node_modules/@aws-sdk/credential-provider-env/dist-cjs/index.js +4 -6
  447. package/node_modules/@aws-sdk/credential-provider-env/package.json +7 -7
  448. package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/checkUrl.js +3 -7
  449. package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/fromHttp.browser.js +12 -16
  450. package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/fromHttp.js +16 -21
  451. package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/requestHelpers.js +14 -18
  452. package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/retry-wrapper.js +1 -5
  453. package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/index.browser.js +2 -5
  454. package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/index.js +2 -7
  455. package/node_modules/@aws-sdk/credential-provider-http/package.json +9 -8
  456. package/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js +47 -41
  457. package/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveProcessCredentials.js +8 -4
  458. package/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveWebIdentityCredentials.js +14 -10
  459. package/node_modules/@aws-sdk/credential-provider-ini/package.json +14 -14
  460. package/node_modules/@aws-sdk/credential-provider-login/dist-cjs/index.js +31 -33
  461. package/node_modules/@aws-sdk/credential-provider-login/package.json +8 -8
  462. package/node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js +16 -18
  463. package/node_modules/@aws-sdk/credential-provider-node/package.json +12 -12
  464. package/node_modules/@aws-sdk/credential-provider-process/dist-cjs/index.js +11 -13
  465. package/node_modules/@aws-sdk/credential-provider-process/package.json +7 -7
  466. package/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js +26 -25
  467. package/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/loadSso-BGYXHf8s.js +3 -0
  468. package/node_modules/@aws-sdk/credential-provider-sso/dist-es/resolveSSOCredentials.js +4 -1
  469. package/node_modules/@aws-sdk/credential-provider-sso/package.json +12 -10
  470. package/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromTokenFile.js +10 -14
  471. package/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromWebToken.js +2 -6
  472. package/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/index.js +3 -27
  473. package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +8 -8
  474. package/node_modules/@aws-sdk/middleware-flexible-checksums/dist-cjs/index.js +18 -23
  475. package/node_modules/@aws-sdk/middleware-flexible-checksums/package.json +6 -6
  476. package/node_modules/@aws-sdk/middleware-sdk-ec2/dist-cjs/index.js +11 -13
  477. package/node_modules/@aws-sdk/middleware-sdk-ec2/package.json +7 -7
  478. package/node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/index.js +1 -518
  479. package/node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/submodules/s3/index.browser.js +31 -33
  480. package/node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/submodules/s3/index.js +37 -39
  481. package/node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/submodules/s3-control/index.js +14 -16
  482. package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/index.js +1 -1
  483. package/node_modules/@aws-sdk/middleware-sdk-s3/dist-types/index.d.ts +2 -2
  484. package/node_modules/@aws-sdk/middleware-sdk-s3/dist-types/ts3.4/index.d.ts +2 -2
  485. package/node_modules/@aws-sdk/middleware-sdk-s3/package.json +17 -14
  486. package/node_modules/@aws-sdk/middleware-sdk-s3/s3-control.d.ts +7 -0
  487. package/node_modules/@aws-sdk/middleware-sdk-s3/s3-control.js +5 -0
  488. package/node_modules/@aws-sdk/middleware-sdk-s3/s3.d.ts +7 -0
  489. package/node_modules/@aws-sdk/middleware-sdk-s3/s3.js +5 -0
  490. package/node_modules/@aws-sdk/middleware-sdk-sqs/dist-cjs/index.js +9 -11
  491. package/node_modules/@aws-sdk/middleware-sdk-sqs/package.json +7 -7
  492. package/node_modules/@aws-sdk/nested-clients/dist-cjs/index.js +0 -1
  493. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +82 -84
  494. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +158 -119
  495. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +80 -82
  496. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +80 -82
  497. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +99 -101
  498. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/commands/CreateOAuth2TokenCommand.js +4 -1
  499. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/endpoint/bdd.js +70 -35
  500. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/endpoint/endpointResolver.js +1 -1
  501. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/models/enums.js +3 -0
  502. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/endpoint/EndpointParameters.d.ts +1 -0
  503. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/models/enums.d.ts +12 -0
  504. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/endpoint/EndpointParameters.d.ts +1 -0
  505. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/models/enums.d.ts +3 -0
  506. package/node_modules/@aws-sdk/nested-clients/package.json +11 -10
  507. package/node_modules/@aws-sdk/signature-v4-multi-region/dist-cjs/index.js +4 -6
  508. package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +9 -8
  509. package/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +26 -28
  510. package/node_modules/@aws-sdk/token-providers/package.json +8 -8
  511. package/node_modules/@aws-sdk/types/dist-cjs/index.js +7 -8
  512. package/node_modules/@aws-sdk/types/package.json +5 -5
  513. package/node_modules/@aws-sdk/util-locate-window/dist-cjs/index.js +0 -2
  514. package/node_modules/@aws-sdk/util-locate-window/package.json +5 -5
  515. package/node_modules/@aws-sdk/xml-builder/dist-cjs/index.js +2 -4
  516. package/node_modules/@aws-sdk/xml-builder/dist-cjs/xml-external/nodable_entities.js +4 -7
  517. package/node_modules/@aws-sdk/xml-builder/dist-cjs/xml-parser.browser.js +2 -5
  518. package/node_modules/@aws-sdk/xml-builder/dist-cjs/xml-parser.js +7 -10
  519. package/node_modules/{strnum → @aws-sdk/xml-builder/node_modules/strnum}/CHANGELOG.md +8 -0
  520. package/node_modules/{strnum → @aws-sdk/xml-builder/node_modules/strnum}/README.md +9 -0
  521. package/node_modules/{strnum → @aws-sdk/xml-builder/node_modules/strnum}/package.json +7 -3
  522. package/node_modules/{strnum → @aws-sdk/xml-builder/node_modules/strnum}/strnum.js +9 -1
  523. package/node_modules/@aws-sdk/xml-builder/package.json +5 -5
  524. package/node_modules/@nodable/entities/package.json +4 -1
  525. package/node_modules/@nodable/entities/src/EntityDecoder.js +104 -3
  526. package/node_modules/@nodable/entities/src/index.d.ts +77 -0
  527. package/node_modules/@nodable/entities/src/index.js +1 -1
  528. package/node_modules/@smithy/core/dist-cjs/index.js +13 -15
  529. package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +543 -398
  530. package/node_modules/@smithy/core/dist-cjs/submodules/checksum/index.browser.js +2 -4
  531. package/node_modules/@smithy/core/dist-cjs/submodules/checksum/index.js +7 -9
  532. package/node_modules/@smithy/core/dist-cjs/submodules/checksum/index.native.js +3 -5
  533. package/node_modules/@smithy/core/dist-cjs/submodules/client/index.js +23 -24
  534. package/node_modules/@smithy/core/dist-cjs/submodules/config/index.browser.js +10 -11
  535. package/node_modules/@smithy/core/dist-cjs/submodules/config/index.js +38 -39
  536. package/node_modules/@smithy/core/dist-cjs/submodules/config/index.native.js +10 -11
  537. package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.browser.js +14 -17
  538. package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.js +20 -23
  539. package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.browser.js +9 -11
  540. package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js +11 -13
  541. package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +68 -61
  542. package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.browser.js +26 -27
  543. package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.js +28 -29
  544. package/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +5 -7
  545. package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.browser.js +4 -6
  546. package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +23 -25
  547. package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.native.js +4 -6
  548. package/node_modules/@smithy/core/dist-cjs/submodules/transport/index.js +2 -4
  549. package/node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js +1 -1
  550. package/node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-signing/httpSigningMiddleware.js +1 -1
  551. package/node_modules/@smithy/core/dist-es/submodules/cbor/SmithyRpcV2CborProtocol.js +1 -1
  552. package/node_modules/@smithy/core/dist-es/submodules/cbor/cbor-decode.js +326 -269
  553. package/node_modules/@smithy/core/dist-es/submodules/cbor/cbor-encode.js +192 -103
  554. package/node_modules/@smithy/core/dist-es/submodules/cbor/cbor.js +4 -2
  555. package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/get-value-from-text-node.js +1 -1
  556. package/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/endpointMiddleware.js +1 -1
  557. package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +10 -2
  558. package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/retry-pre-sra-deprecated/StandardRetryStrategy.js +2 -2
  559. package/node_modules/@smithy/core/dist-es/submodules/retry/util-retry/DefaultRateLimiter.js +1 -1
  560. package/node_modules/@smithy/core/dist-types/submodules/cbor/cbor-decode.d.ts +4 -0
  561. package/node_modules/@smithy/core/dist-types/submodules/cbor/cbor-encode.d.ts +8 -4
  562. package/node_modules/@smithy/core/dist-types/submodules/protocols/HttpProtocol.d.ts +6 -0
  563. package/node_modules/@smithy/core/dist-types/submodules/schema/TypeRegistry.d.ts +1 -1
  564. package/node_modules/@smithy/core/package.json +18 -17
  565. package/node_modules/@smithy/credential-provider-imds/dist-cjs/index.js +23 -24
  566. package/node_modules/@smithy/credential-provider-imds/package.json +7 -7
  567. package/node_modules/@smithy/fetch-http-handler/dist-cjs/index.js +6 -8
  568. package/node_modules/@smithy/fetch-http-handler/package.json +10 -10
  569. package/node_modules/@smithy/middleware-compression/dist-cjs/compressStream.browser.js +3 -7
  570. package/node_modules/@smithy/middleware-compression/dist-cjs/compressStream.js +2 -6
  571. package/node_modules/@smithy/middleware-compression/dist-cjs/compressString.browser.js +4 -8
  572. package/node_modules/@smithy/middleware-compression/dist-cjs/compressString.js +7 -11
  573. package/node_modules/@smithy/middleware-compression/dist-cjs/index.js +18 -20
  574. package/node_modules/@smithy/middleware-compression/package.json +6 -6
  575. package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +11 -13
  576. package/node_modules/@smithy/node-http-handler/package.json +8 -8
  577. package/node_modules/@smithy/signature-v4/dist-cjs/index.js +27 -29
  578. package/node_modules/@smithy/signature-v4/package.json +7 -7
  579. package/node_modules/@smithy/types/dist-cjs/index.js +23 -18
  580. package/node_modules/@smithy/types/package.json +10 -10
  581. package/node_modules/anynum/LICENSE +21 -0
  582. package/node_modules/anynum/README.md +142 -0
  583. package/node_modules/anynum/anynum.js +135 -0
  584. package/node_modules/anynum/digitTable.js +116 -0
  585. package/node_modules/anynum/package.json +42 -0
  586. package/node_modules/path-expression-matcher/README.md +82 -7
  587. package/node_modules/path-expression-matcher/lib/pem.cjs +1 -1
  588. package/node_modules/path-expression-matcher/lib/pem.d.cts +83 -2
  589. package/node_modules/path-expression-matcher/lib/pem.min.js +1 -1
  590. package/node_modules/path-expression-matcher/lib/pem.min.js.map +1 -1
  591. package/node_modules/path-expression-matcher/package.json +3 -2
  592. package/node_modules/path-expression-matcher/src/ExpressionSet.js +18 -2
  593. package/node_modules/path-expression-matcher/src/Matcher.js +93 -3
  594. package/node_modules/path-expression-matcher/src/index.d.ts +67 -1
  595. package/package.json +10 -10
  596. package/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/loadSso-BKDNrsal.js +0 -8
  597. package/node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/index.browser.js +0 -34
  598. package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/index.browser.js +0 -1
  599. package/node_modules/@aws-sdk/middleware-sdk-s3/dist-types/index.browser.d.ts +0 -2
  600. package/node_modules/@aws-sdk/middleware-sdk-s3/dist-types/ts3.4/index.browser.d.ts +0 -39
  601. /package/node_modules/{strnum → @aws-sdk/xml-builder/node_modules/strnum}/LICENSE +0 -0
@@ -0,0 +1,116 @@
1
+ /**
2
+ * Flat lookup table: maps Unicode code point → ASCII digit (0-9).
3
+ * Only decimal digit characters (Unicode category Nd) are included.
4
+ *
5
+ * Strategy: Int32Array of size (maxCodePoint - minCodePoint + 1).
6
+ * Value 0xFF means "not a digit". Value 0-9 is the ASCII digit value.
7
+ * This gives O(1) lookup with no branching, no bisect, no loop.
8
+ *
9
+ * Memory: range is 0x0660 to 0x1FBF0 → ~129,936 entries × 1 byte = ~127 KB.
10
+ * Acceptable for a one-time init; lookup is a single array index.
11
+ */
12
+
13
+ // All known Unicode Nd (decimal digit) script zero code points.
14
+ // Each script has exactly 10 consecutive digits: zero+0 .. zero+9.
15
+ const SCRIPT_ZEROS = [
16
+ // Basic Latin (ASCII) — included for completeness / pass-through
17
+ 0x0030, // 0-9
18
+
19
+ // Arabic scripts
20
+ 0x0660, // Arabic-Indic ٠١٢٣٤٥٦٧٨٩
21
+ 0x06F0, // Extended Arabic-Indic (Urdu/Persian/Sindhi) ۰۱۲۳
22
+
23
+ // Indic scripts
24
+ 0x0966, // Devanagari ०१२३४५६७८९
25
+ 0x09E6, // Bengali ০১২৩৪৫৬৭৮৯
26
+ 0x0A66, // Gurmukhi ੦੧੨੩੪੫੬੭੮੯
27
+ 0x0AE6, // Gujarati ૦૧૨૩૪૫૬૭૮૯
28
+ 0x0B66, // Odia ୦୧୨୩୪୫୬୭୮୯
29
+ 0x0BE6, // Tamil ௦௧௨௩௪௫௬௭௮௯
30
+ 0x0C66, // Telugu ౦౧౨౩౪౫౬౭౮౯
31
+ 0x0CE6, // Kannada ೦೧೨೩೪೫೬೭೮೯
32
+ 0x0D66, // Malayalam ൦൧൨൩൪൫൬൭൮൯
33
+ 0x0DE6, // Sinhala Archaic ෦෧෨෩෪෫෬෭෮෯
34
+
35
+ // Southeast Asian scripts
36
+ 0x0E50, // Thai ๐๑๒๓๔๕๖๗๘๙
37
+ 0x0ED0, // Lao ໐໑໒໓໔໕໖໗໘໙
38
+ 0x0F20, // Tibetan ༠༡༢༣༤༥༦༧༨༩
39
+ 0x1040, // Myanmar ၀၁၂၃၄၅၆၇၈၉
40
+ 0x1090, // Myanmar Shan ႐႑႒႓႔႕႖႗႘႙
41
+ 0x17E0, // Khmer ០១២៣៤៥៦៧៨៩
42
+ 0x1810, // Mongolian ᠐᠑᠒᠓᠔᠕᠖᠗᠘᠙
43
+ 0x1946, // Limbu ᥆᥇᥈᥉᥊᥋᥌᥍᥎᥏
44
+ 0x19D0, // New Tai Lue ᧐᧑᧒᧓᧔᧕᧖᧗᧘᧙
45
+ 0x1A80, // Tai Tham Hora ᪀᪁᪂᪃᪄᪅᪆᪇᪈᪉
46
+ 0x1A90, // Tai Tham Tham ᪐᪑᪒᪓᪔᪕᪖᪗᪘᪙
47
+ 0x1B50, // Balinese ᭐᭑᭒᭓᭔᭕᭖᭗᭘᭙
48
+ 0x1BB0, // Sundanese ᮰᮱᮲᮳᮴᮵᮶᮷᮸᮹
49
+ 0x1C40, // Lepcha ᱀᱁᱂᱃᱄᱅᱆᱇᱈᱉
50
+ 0x1C50, // Ol Chiki ᱐᱑᱒᱓᱔᱕᱖᱗᱘᱙
51
+
52
+ // Fullwidth (CJK context)
53
+ 0xFF10, // Fullwidth 0123456789
54
+
55
+ // Mathematical digit variants (Unicode math block)
56
+ 0x1D7CE, // Mathematical Bold
57
+ 0x1D7D8, // Mathematical Double-Struck
58
+ 0x1D7E2, // Mathematical Sans-Serif
59
+ 0x1D7EC, // Mathematical Sans-Serif Bold
60
+ 0x1D7F6, // Mathematical Monospace
61
+
62
+ // Other scripts
63
+ 0x104A0, // Osmanya 𐒠𐒡𐒢𐒣𐒤𐒥𐒦𐒧𐒨𐒩
64
+ 0x10D30, // Hanifi Rohingya 𐴰𐴱𐴲𐴳𐴴𐴵𐴶𐴷𐴸𐴹
65
+ 0x11066, // Brahmi 𑁦𑁧𑁨𑁩𑁪𑁫𑁬𑁭𑁮𑁯
66
+ 0x110F0, // Sora Sompeng 𑃰𑃱𑃲𑃳𑃴𑃵𑃶𑃷𑃸𑃹
67
+ 0x11136, // Chakma 𑄶𑄷𑄸𑄹𑄺𑄻𑄼𑄽𑄾𑄿
68
+ 0x111D0, // Sharada 𑇐𑇑𑇒𑇓𑇔𑇕𑇖𑇗𑇘𑇙
69
+ 0x112F0, // Khudawadi 𑋰𑋱𑋲𑋳𑋴𑋵𑋶𑋷𑋸𑋹
70
+ 0x11450, // Newa 𑑐𑑑𑑒𑑓𑑔𑑕𑑖𑑗𑑘𑑙
71
+ 0x114D0, // Tirhuta 𑓐𑓑𑓒𑓓𑓔𑓕𑓖𑓗𑓘𑓙
72
+ 0x11650, // Modi 𑙐𑙑𑙒𑙓𑙔𑙕𑙖𑙗𑙘𑙙
73
+ 0x116C0, // Takri 𑛀𑛁𑛂𑛃𑛄𑛅𑛆𑛇𑛈𑛉
74
+ 0x11730, // Ahom 𑜰𑜱𑜲𑜳𑜴𑜵𑜶𑜷𑜸𑜹
75
+ 0x118E0, // Warang Citi 𑣠𑣡𑣢𑣣𑣤𑣥𑣦𑣧𑣨𑣩
76
+ 0x11950, // Dives Akuru 𑥐𑥑𑥒𑥓𑥔𑥕𑥖𑥗𑥘𑥙
77
+ 0x11BF0, // Khitan Small Script 𑯰𑯱𑯲𑯳𑯴𑯵𑯶𑯷𑯸𑯹
78
+ 0x11C50, // Bhaiksuki 𑱐𑱑𑱒𑱓𑱔𑱕𑱖𑱗𑱘𑱙
79
+ 0x11D50, // Masaram Gondi 𑵐𑵑𑵒𑵓𑵔𑵕𑵖𑵗𑵘𑵙
80
+ 0x11DA0, // Gunjala Gondi 𑶠𑶡𑶢𑶣𑶤𑶥𑶦𑶧𑶨𑶩
81
+ 0x11F50, // Kawi 𑽐𑽑𑽒𑽓𑽔𑽕𑽖𑽗𑽘𑽙
82
+ 0x16A60, // Mro 𖩠𖩡𖩢𖩣𖩤𖩥𖩦𖩧𖩨𖩩
83
+ 0x16AC0, // Tangsa 𖫀𖫁𖫂𖫃𖫄𖫅𖫆𖫇𖫈𖫉
84
+ 0x16B50, // Pahawh Hmong 𖭐𖭑𖭒𖭓𖭔𖭕𖭖𖭗𖭘𖭙
85
+ 0x1E140, // Nyiakeng Puachue Hmong 𞅀𞅁𞅂𞅃𞅄𞅅𞅆𞅇𞅈𞅉
86
+ 0x1E2F0, // Wancho 𞋰𞋱𞋲𞋳𞋴𞋵𞋶𞋷𞋸𞋹
87
+ 0x1E4F0, // Nag Mundari 𞓰𞓱𞓲𞓳𞓴𞓵𞓶𞓷𞓸𞓹
88
+ 0x1E950, // Adlam 𞥐𞥑𞥒𞥓𞥔𞥕𞥖𞥗𞥘𞥙
89
+ 0x1FBF0, // Segmented digit symbols 🯰🯱🯲🯳🯴🯵🯶🯷🯸🯹
90
+ ];
91
+
92
+ // Build a sparse Map for scripts above 0xFFFF (surrogate-pair range).
93
+ // These can't go into a flat Uint8Array indexed by code point efficiently.
94
+ const NOT_DIGIT = 0xFF;
95
+ const HIGH_MAP = new Map(); // codePoint → digit value (0-9)
96
+
97
+ const LOW_MAX = 0xFFFF;
98
+ const LOW_MIN = 0x0660; // first non-ASCII digit script
99
+
100
+ // Flat Uint8Array covering 0x0660 .. 0xFFFF
101
+ const TABLE_OFFSET = LOW_MIN;
102
+ const TABLE_SIZE = LOW_MAX - LOW_MIN + 1;
103
+ const TABLE = new Uint8Array(TABLE_SIZE).fill(NOT_DIGIT);
104
+
105
+ for (const zero of SCRIPT_ZEROS) {
106
+ for (let d = 0; d < 10; d++) {
107
+ const cp = zero + d;
108
+ if (cp <= LOW_MAX) {
109
+ TABLE[cp - TABLE_OFFSET] = d;
110
+ } else {
111
+ HIGH_MAP.set(cp, d);
112
+ }
113
+ }
114
+ }
115
+
116
+ export { TABLE, TABLE_OFFSET, HIGH_MAP, NOT_DIGIT };
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "anynum",
3
+ "version": "1.0.1",
4
+ "description": "Normalize all Unicode decimal digits (Devanagari, Arabic, Thai, etc.) to ASCII numerals. Zero dependencies, performance-first.",
5
+ "type": "module",
6
+ "main": "./anynum.js",
7
+ "files": [
8
+ "anynum.js",
9
+ "digitTable.js",
10
+ "README.md"
11
+ ],
12
+ "scripts": {
13
+ "test": "jasmine tests/anynum.test.js",
14
+ "bench": "node test/bench.js"
15
+ },
16
+ "keywords": [
17
+ "unicode",
18
+ "digits",
19
+ "normalize",
20
+ "devanagari",
21
+ "arabic",
22
+ "hindi",
23
+ "japanese",
24
+ "indic",
25
+ "asian",
26
+ "math",
27
+ "numerals",
28
+ "strnum"
29
+ ],
30
+ "repository": {
31
+ "type": "git",
32
+ "url": "https://github.com/NaturalIntelligence/anynum"
33
+ },
34
+ "author": "Amit Gupta (https://solothought.work/)",
35
+ "license": "MIT",
36
+ "funding": [
37
+ {
38
+ "type": "github",
39
+ "url": "https://github.com/sponsors/NaturalIntelligence"
40
+ }
41
+ ]
42
+ }
@@ -1,5 +1,9 @@
1
1
  # path-expression-matcher
2
2
 
3
+ [![path-expression-matcher downloads](https://img.shields.io/npm/dw/path-expression-matcher.svg)](https://npm-compare.com/path-expression-matcher)
4
+ [![path-expression-matcher version](https://img.shields.io/npm/v/path-expression-matcher.svg)](https://www.npmjs.com/package/path-expression-matcher)
5
+ [![path-expression-matcher license](https://img.shields.io/npm/l/path-expression-matcher.svg)](https://github.com/NaturalIntelligence/path-expression-matcher)
6
+
3
7
  Efficient path tracking and pattern matching for XML, JSON, YAML or any other parsers.
4
8
 
5
9
  ## 🎯 Purpose
@@ -71,9 +75,10 @@ console.log(matcher.toString()); // "soap:Envelope.soap:Body.ns:UserId"
71
75
  ```javascript
72
76
  "user[id]" // user with "id" attribute
73
77
  "user[type=admin]" // user with type="admin" (current node only)
74
- "root[lang]..user" // user under root that has "lang" attribute
75
78
  ```
76
79
 
80
+ > **Note:** Attribute conditions in expressions only ever look at the **current** (last) node in the path — `..user` matches `user` at any depth, but bracket conditions like `[lang]` still apply to `user` itself, never to an ancestor tag. To check an *ancestor's* attribute (e.g. "is there a `lang` attribute somewhere above this node?"), use `push(..., { keep: [...] })` with `getAnyParentAttr()` / `hasAnyParentAttr()` — see [Ancestor Attributes (`keep`)](#ancestor-attributes-keep) below.
81
+
77
82
  ### Position Selectors
78
83
 
79
84
  ```javascript
@@ -174,7 +179,7 @@ new Matcher(options)
174
179
 
175
180
  #### Path Tracking Methods
176
181
 
177
- ##### `push(tagName, attrValues, namespace)`
182
+ ##### `push(tagName, attrValues, namespace, options)`
178
183
 
179
184
  Add a tag to the current path. Position and counter are automatically calculated.
180
185
 
@@ -182,6 +187,8 @@ Add a tag to the current path. Position and counter are automatically calculated
182
187
  - `tagName` (string): Tag name
183
188
  - `attrValues` (object, optional): Attribute key-value pairs (current node only)
184
189
  - `namespace` (string, optional): Namespace for the tag
190
+ - `options` (object, optional):
191
+ - `keep` (string[], optional): Names of attributes (from `attrValues`) to retain for ancestor lookup via `getAnyParentAttr()` / `hasAnyParentAttr()`, even after this node is no longer the current node. See [Ancestor Attributes (`keep`)](#ancestor-attributes-keep).
185
192
 
186
193
  **Example:**
187
194
  ```javascript
@@ -189,6 +196,7 @@ matcher.push("user", { id: "123", type: "admin" });
189
196
  matcher.push("item"); // No attributes
190
197
  matcher.push("Envelope", null, "soap"); // With namespace
191
198
  matcher.push("Body", { version: "1.1" }, "soap"); // With both
199
+ matcher.push("Body", { version: "1.1" }, "soap", { keep: ["version"] }); // Retain "version" for descendants
192
200
  ```
193
201
 
194
202
  **Position vs Counter:**
@@ -293,6 +301,29 @@ if (matcher.hasAttr("id")) {
293
301
  }
294
302
  ```
295
303
 
304
+ ##### `getAnyParentAttr(attrName)`
305
+
306
+ Get the value of an attribute that was explicitly **kept** (via `push(..., { keep: [...] })`) by the current node or any ancestor. Unlike `getAttrValue()`, this works regardless of how far the path has descended since the attribute was pushed — but only for names that were marked with `keep` at push time. If the same name was kept at multiple depths, the **nearest** (most recent) one wins.
307
+
308
+ ```javascript
309
+ matcher.push("Body", { version: "1.1" }, "soap", { keep: ["version"] });
310
+ matcher.push("GetUserRequest");
311
+ matcher.push("UserId");
312
+
313
+ matcher.getAttrValue("version"); // undefined — Body is no longer current
314
+ matcher.getAnyParentAttr("version"); // "1.1" — still reachable, because it was kept
315
+ ```
316
+
317
+ ##### `hasAnyParentAttr(attrName)`
318
+
319
+ Check whether the current node or any ancestor kept the given attribute via `push(..., { keep: [...] })`.
320
+
321
+ ```javascript
322
+ if (matcher.hasAnyParentAttr("version")) {
323
+ // Some node on the path (current or ancestor) kept "version"
324
+ }
325
+ ```
326
+
296
327
  ##### `getPosition()`
297
328
 
298
329
  Get sibling position of current node (child index in parent).
@@ -528,6 +559,32 @@ const expr2 = new Expression("user[type=admin]");
528
559
  console.log(matcher.matches(expr2)); // true
529
560
  ```
530
561
 
562
+ > Need to check an attribute from an *ancestor* node, not just the current one? See [Example 5b](#example-5b-ancestor-attributes-keep) and [Ancestor Attributes (`keep`)](#ancestor-attributes-keep).
563
+
564
+ ### Example 5b: Ancestor Attributes (`keep`)
565
+
566
+ `getAttrValue()` / `hasAttr()` only ever see the **current** node — by design, ancestor attribute values are discarded as soon as you push past them, to keep memory usage low. If you know in advance that a specific attribute (e.g. a SOAP envelope's `version`, or `xml:space`) will matter much deeper in the tree, mark it to be **kept**:
567
+
568
+ ```javascript
569
+ const matcher = new Matcher();
570
+ matcher.push("Envelope", null, "soap");
571
+ matcher.push("Body", { version: "1.1" }, "soap", { keep: ["version"] });
572
+ matcher.push("GetUserRequest", { id: "42" });
573
+ matcher.push("UserId");
574
+
575
+ // Ordinary attribute access only sees the current node:
576
+ console.log(matcher.getAttrValue("version")); // undefined
577
+
578
+ // getAnyParentAttr/hasAnyParentAttr still see it, however deep we've gone:
579
+ console.log(matcher.hasAnyParentAttr("version")); // true
580
+ console.log(matcher.getAnyParentAttr("version")); // "1.1"
581
+
582
+ matcher.pop(); matcher.pop(); matcher.pop(); // back to Envelope
583
+ console.log(matcher.hasAnyParentAttr("version")); // false — Body (and its kept attrs) was popped
584
+ ```
585
+
586
+ **When to use this:** only for the small number of attributes you specifically know you'll need many levels deeper — not as a general substitute for `getAttrValue()`. Each name passed to `keep` adds a tiny, constant amount of bookkeeping at `push()` time; lookups scan only the kept-attributes list (typically 0-3 entries), never the full path, so cost does not grow with document depth.
587
+
531
588
  ### Example 6: Position vs Counter
532
589
 
533
590
  ```javascript
@@ -634,24 +691,42 @@ console.log(matcher.matches(expr)); // true - matches namespace "ns", tag "first
634
691
 
635
692
  This design minimizes memory usage:
636
693
  - No attribute names stored (derived from values object when needed)
637
- - Attribute values only for current node, not ancestors
638
- - Attribute checking for ancestors is not supported (acceptable trade-off)
694
+ - Attribute values only for current node, not ancestors, **by default**
639
695
  - For 1M nodes with 3 attributes each, saves ~50MB vs storing attribute names
640
696
 
697
+ ### Ancestor Attributes (`keep`)
698
+
699
+ The trade-off above is the right default, but XML/SOAP documents occasionally have a handful of attributes — `xml:space`, a SOAP envelope's `version`, a feature-flag at the document root — that genuinely need to be visible many levels deeper. Rather than retaining *all* attribute values for *every* node (defeating the memory savings above), `push()` accepts an explicit opt-in:
700
+
701
+ ```javascript
702
+ matcher.push("Body", { version: "1.1" }, "soap", { keep: ["version"] });
703
+ ```
704
+
705
+ Only the named attribute(s) are copied into a small side-stack (`_keptAttrs`), independent of the normal per-node `values`. Reachable later via `getAnyParentAttr(name)` / `hasAnyParentAttr(name)` regardless of depth — see [Example 5b](#example-5b-ancestor-attributes-keep).
706
+
707
+ **Why this stays cheap:**
708
+ - Pushing without `options` costs two extra property reads — no allocation, no measurable overhead (benchmarked: within run-to-run noise vs. plain `push()`).
709
+ - Lookups scan only the kept-attributes stack, not the full path — cost is proportional to *how many distinct attributes are currently kept* (typically 0-3 in real usage), not to document depth.
710
+ - `pop()` truncates kept entries belonging to the popped subtree in the same backward-scan style, so the stack never grows unbounded.
711
+ - The core `matches()` / `_matchSegment` pattern-matching path is completely unaffected — `keep` is a separate, opt-in mechanism with no new expression syntax.
712
+
713
+ This is intentionally a narrow escape hatch, not a general "remember everything" toggle — overusing `keep` (e.g. keeping every attribute on every node) reintroduces the same memory cost this library avoids by default.
714
+
641
715
  ### Matching Strategy
642
716
 
643
717
  Matching is performed **bottom-to-top** (from current node toward root):
644
718
  1. Start at current node
645
719
  2. Match segments from pattern end to start
646
- 3. Attribute checking only works for current node (ancestors have no attribute data)
720
+ 3. Attribute *expression* conditions (`[attr=value]`) only apply to the current node ancestors have no attribute data in the path itself. For genuinely ancestor-scoped checks outside of expression matching, use `keep` (above).
647
721
  4. Position selectors use **counter** (occurrence count), not position (child index)
648
722
 
649
723
  ### Performance
650
724
 
651
725
  - **Expression parsing:** One-time cost when Expression is created
652
726
  - **Expression analysis:** Cached (hasDeepWildcard, hasAttributeCondition, hasPositionSelector)
653
- - **Path tracking:** O(1) for push/pop operations
727
+ - **Path tracking:** O(1) for push/pop operations (O(k) additionally when `options.keep` is used, where k = number of kept attribute names — typically 0-3)
654
728
  - **Pattern matching:** O(n*m) where n = path depth, m = pattern segments
729
+ - **Ancestor attribute lookup:** O(k) where k = number of currently-kept attributes, independent of path depth
655
730
  - **Memory per ancestor node:** ~40-60 bytes (tag, position, counter only)
656
731
  - **Memory per current node:** ~80-120 bytes (adds attribute values)
657
732
 
@@ -869,4 +944,4 @@ MIT
869
944
 
870
945
  ## 🤝 Contributing
871
946
 
872
- Issues and PRs welcome! This package is designed to be used by XML/JSON parsers like fast-xml-parser. But can be used with any formar parser.
947
+ Issues and PRs welcome! This package is designed to be used by XML/JSON parsers like fast-xml-parser. But can be used with any formar parser.
@@ -1 +1 @@
1
- (()=>{"use strict";var t={d:(e,s)=>{for(var i in s)t.o(s,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:s[i]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{Expression:()=>s,ExpressionSet:()=>n,Matcher:()=>h,default:()=>r});class s{constructor(t,e={},s){this.pattern=t,this.separator=e.separator||".",this.segments=this._parse(t),this.data=s,this._hasDeepWildcard=this.segments.some(t=>"deep-wildcard"===t.type),this._hasAttributeCondition=this.segments.some(t=>void 0!==t.attrName),this._hasPositionSelector=this.segments.some(t=>void 0!==t.position)}_parse(t){const e=[];let s=0,i="";for(;s<t.length;)t[s]===this.separator?s+1<t.length&&t[s+1]===this.separator?(i.trim()&&(e.push(this._parseSegment(i.trim())),i=""),e.push({type:"deep-wildcard"}),s+=2):(i.trim()&&e.push(this._parseSegment(i.trim())),i="",s++):(i+=t[s],s++);return i.trim()&&e.push(this._parseSegment(i.trim())),e}_parseSegment(t){const e={type:"tag"};let s=null,i=t;const h=t.match(/^([^\[]+)(\[[^\]]*\])(.*)$/);if(h&&(i=h[1]+h[3],h[2])){const t=h[2].slice(1,-1);t&&(s=t)}let n,r,a=i;if(i.includes("::")){const e=i.indexOf("::");if(n=i.substring(0,e).trim(),a=i.substring(e+2).trim(),!n)throw new Error(`Invalid namespace in pattern: ${t}`)}let p=null;if(a.includes(":")){const t=a.lastIndexOf(":"),e=a.substring(0,t).trim(),s=a.substring(t+1).trim();["first","last","odd","even"].includes(s)||/^nth\(\d+\)$/.test(s)?(r=e,p=s):r=a}else r=a;if(!r)throw new Error(`Invalid segment pattern: ${t}`);if(e.tag=r,n&&(e.namespace=n),s)if(s.includes("=")){const t=s.indexOf("=");e.attrName=s.substring(0,t).trim(),e.attrValue=s.substring(t+1).trim()}else e.attrName=s.trim();if(p){const t=p.match(/^nth\((\d+)\)$/);t?(e.position="nth",e.positionValue=parseInt(t[1],10)):e.position=p}return e}get length(){return this.segments.length}hasDeepWildcard(){return this._hasDeepWildcard}hasAttributeCondition(){return this._hasAttributeCondition}hasPositionSelector(){return this._hasPositionSelector}toString(){return this.pattern}}class i{constructor(t){this._matcher=t}get separator(){return this._matcher.separator}getCurrentTag(){const t=this._matcher.path;return t.length>0?t[t.length-1].tag:void 0}getCurrentNamespace(){const t=this._matcher.path;return t.length>0?t[t.length-1].namespace:void 0}getAttrValue(t){const e=this._matcher.path;if(0!==e.length)return e[e.length-1].values?.[t]}hasAttr(t){const e=this._matcher.path;if(0===e.length)return!1;const s=e[e.length-1];return void 0!==s.values&&t in s.values}getPosition(){const t=this._matcher.path;return 0===t.length?-1:t[t.length-1].position??0}getCounter(){const t=this._matcher.path;return 0===t.length?-1:t[t.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this._matcher.path.length}toString(t,e=!0){return this._matcher.toString(t,e)}toArray(){return this._matcher.path.map(t=>t.tag)}matches(t){return this._matcher.matches(t)}matchesAny(t){return t.matchesAny(this._matcher)}}class h{constructor(t={}){this.separator=t.separator||".",this.path=[],this.siblingStacks=[],this._pathStringCache=null,this._view=new i(this)}push(t,e=null,s=null){this._pathStringCache=null,this.path.length>0&&(this.path[this.path.length-1].values=void 0);const i=this.path.length;this.siblingStacks[i]||(this.siblingStacks[i]=new Map);const h=this.siblingStacks[i],n=s?`${s}:${t}`:t,r=h.get(n)||0;let a=0;for(const t of h.values())a+=t;h.set(n,r+1);const p={tag:t,position:a,counter:r};null!=s&&(p.namespace=s),null!=e&&(p.values=e),this.path.push(p)}pop(){if(0===this.path.length)return;this._pathStringCache=null;const t=this.path.pop();return this.siblingStacks.length>this.path.length+1&&(this.siblingStacks.length=this.path.length+1),t}updateCurrent(t){if(this.path.length>0){const e=this.path[this.path.length-1];null!=t&&(e.values=t)}}getCurrentTag(){return this.path.length>0?this.path[this.path.length-1].tag:void 0}getCurrentNamespace(){return this.path.length>0?this.path[this.path.length-1].namespace:void 0}getAttrValue(t){if(0!==this.path.length)return this.path[this.path.length-1].values?.[t]}hasAttr(t){if(0===this.path.length)return!1;const e=this.path[this.path.length-1];return void 0!==e.values&&t in e.values}getPosition(){return 0===this.path.length?-1:this.path[this.path.length-1].position??0}getCounter(){return 0===this.path.length?-1:this.path[this.path.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this.path.length}toString(t,e=!0){const s=t||this.separator;if(s===this.separator&&!0===e){if(null!==this._pathStringCache)return this._pathStringCache;const t=this.path.map(t=>t.namespace?`${t.namespace}:${t.tag}`:t.tag).join(s);return this._pathStringCache=t,t}return this.path.map(t=>e&&t.namespace?`${t.namespace}:${t.tag}`:t.tag).join(s)}toArray(){return this.path.map(t=>t.tag)}reset(){this._pathStringCache=null,this.path=[],this.siblingStacks=[]}matches(t){const e=t.segments;return 0!==e.length&&(t.hasDeepWildcard()?this._matchWithDeepWildcard(e):this._matchSimple(e))}_matchSimple(t){if(this.path.length!==t.length)return!1;for(let e=0;e<t.length;e++)if(!this._matchSegment(t[e],this.path[e],e===this.path.length-1))return!1;return!0}_matchWithDeepWildcard(t){let e=this.path.length-1,s=t.length-1;for(;s>=0&&e>=0;){const i=t[s];if("deep-wildcard"===i.type){if(s--,s<0)return!0;const i=t[s];let h=!1;for(let t=e;t>=0;t--)if(this._matchSegment(i,this.path[t],t===this.path.length-1)){e=t-1,s--,h=!0;break}if(!h)return!1}else{if(!this._matchSegment(i,this.path[e],e===this.path.length-1))return!1;e--,s--}}return s<0}_matchSegment(t,e,s){if("*"!==t.tag&&t.tag!==e.tag)return!1;if(void 0!==t.namespace&&"*"!==t.namespace&&t.namespace!==e.namespace)return!1;if(void 0!==t.attrName){if(!s)return!1;if(!e.values||!(t.attrName in e.values))return!1;if(void 0!==t.attrValue&&String(e.values[t.attrName])!==String(t.attrValue))return!1}if(void 0!==t.position){if(!s)return!1;const i=e.counter??0;if("first"===t.position&&0!==i)return!1;if("odd"===t.position&&i%2!=1)return!1;if("even"===t.position&&i%2!=0)return!1;if("nth"===t.position&&i!==t.positionValue)return!1}return!0}matchesAny(t){return t.matchesAny(this)}snapshot(){return{path:this.path.map(t=>({...t})),siblingStacks:this.siblingStacks.map(t=>new Map(t))}}restore(t){this._pathStringCache=null,this.path=t.path.map(t=>({...t})),this.siblingStacks=t.siblingStacks.map(t=>new Map(t))}readOnly(){return this._view}}class n{constructor(){this._byDepthAndTag=new Map,this._wildcardByDepth=new Map,this._deepWildcards=[],this._patterns=new Set,this._sealed=!1}add(t){if(this._sealed)throw new TypeError("ExpressionSet is sealed. Create a new ExpressionSet to add more expressions.");if(this._patterns.has(t.pattern))return this;if(this._patterns.add(t.pattern),t.hasDeepWildcard())return this._deepWildcards.push(t),this;const e=t.length,s=t.segments[t.segments.length-1],i=s?.tag;if(i&&"*"!==i){const s=`${e}:${i}`;this._byDepthAndTag.has(s)||this._byDepthAndTag.set(s,[]),this._byDepthAndTag.get(s).push(t)}else this._wildcardByDepth.has(e)||this._wildcardByDepth.set(e,[]),this._wildcardByDepth.get(e).push(t);return this}addAll(t){for(const e of t)this.add(e);return this}has(t){return this._patterns.has(t.pattern)}get size(){return this._patterns.size}seal(){return this._sealed=!0,this}get isSealed(){return this._sealed}matchesAny(t){return null!==this.findMatch(t)}findMatch(t){const e=t.getDepth(),s=`${e}:${t.getCurrentTag()}`,i=this._byDepthAndTag.get(s);if(i)for(let e=0;e<i.length;e++)if(t.matches(i[e]))return i[e];const h=this._wildcardByDepth.get(e);if(h)for(let e=0;e<h.length;e++)if(t.matches(h[e]))return h[e];for(let e=0;e<this._deepWildcards.length;e++)if(t.matches(this._deepWildcards[e]))return this._deepWildcards[e];return null}}const r={Expression:s,Matcher:h,ExpressionSet:n};module.exports=e})();
1
+ (()=>{"use strict";var t={d:(e,s)=>{for(var n in s)t.o(s,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:s[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{Expression:()=>s,ExpressionSet:()=>h,Matcher:()=>r,default:()=>i});class s{constructor(t,e={},s){this.pattern=t,this.separator=e.separator||".",this.segments=this._parse(t),this.data=s,this._hasDeepWildcard=this.segments.some(t=>"deep-wildcard"===t.type),this._hasAttributeCondition=this.segments.some(t=>void 0!==t.attrName),this._hasPositionSelector=this.segments.some(t=>void 0!==t.position)}_parse(t){const e=[];let s=0,n="";for(;s<t.length;)t[s]===this.separator?s+1<t.length&&t[s+1]===this.separator?(n.trim()&&(e.push(this._parseSegment(n.trim())),n=""),e.push({type:"deep-wildcard"}),s+=2):(n.trim()&&e.push(this._parseSegment(n.trim())),n="",s++):(n+=t[s],s++);return n.trim()&&e.push(this._parseSegment(n.trim())),e}_parseSegment(t){const e={type:"tag"};let s=null,n=t;const r=t.match(/^([^\[]+)(\[[^\]]*\])(.*)$/);if(r&&(n=r[1]+r[3],r[2])){const t=r[2].slice(1,-1);t&&(s=t)}let h,i,a=n;if(n.includes("::")){const e=n.indexOf("::");if(h=n.substring(0,e).trim(),a=n.substring(e+2).trim(),!h)throw new Error(`Invalid namespace in pattern: ${t}`)}let p=null;if(a.includes(":")){const t=a.lastIndexOf(":"),e=a.substring(0,t).trim(),s=a.substring(t+1).trim();["first","last","odd","even"].includes(s)||/^nth\(\d+\)$/.test(s)?(i=e,p=s):i=a}else i=a;if(!i)throw new Error(`Invalid segment pattern: ${t}`);if(e.tag=i,h&&(e.namespace=h),s)if(s.includes("=")){const t=s.indexOf("=");e.attrName=s.substring(0,t).trim(),e.attrValue=s.substring(t+1).trim()}else e.attrName=s.trim();if(p){const t=p.match(/^nth\((\d+)\)$/);t?(e.position="nth",e.positionValue=parseInt(t[1],10)):e.position=p}return e}get length(){return this.segments.length}hasDeepWildcard(){return this._hasDeepWildcard}hasAttributeCondition(){return this._hasAttributeCondition}hasPositionSelector(){return this._hasPositionSelector}toString(){return this.pattern}}class n{constructor(t){this._matcher=t}get separator(){return this._matcher.separator}getCurrentTag(){const t=this._matcher.path;return t.length>0?t[t.length-1].tag:void 0}getCurrentNamespace(){const t=this._matcher.path;return t.length>0?t[t.length-1].namespace:void 0}getAttrValue(t){const e=this._matcher.path;if(0!==e.length)return e[e.length-1].values?.[t]}hasAttr(t){const e=this._matcher.path;if(0===e.length)return!1;const s=e[e.length-1];return void 0!==s.values&&t in s.values}getAnyParentAttr(t){return this._matcher.getAnyParentAttr(t)}hasAnyParentAttr(t){return this._matcher.hasAnyParentAttr(t)}getPosition(){const t=this._matcher.path;return 0===t.length?-1:t[t.length-1].position??0}getCounter(){const t=this._matcher.path;return 0===t.length?-1:t[t.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this._matcher.path.length}toString(t,e=!0){return this._matcher.toString(t,e)}toArray(){return this._matcher.path.map(t=>t.tag)}matches(t){return this._matcher.matches(t)}matchesAny(t){return t.matchesAny(this._matcher)}}class r{constructor(t={}){this.separator=t.separator||".",this.path=[],this.siblingStacks=[],this._pathStringCache=null,this._view=new n(this),this._keptAttrs=[]}push(t,e=null,s=null,n=null){this._pathStringCache=null,this.path.length>0&&(this.path[this.path.length-1].values=void 0);const r=this.path.length;this.siblingStacks[r]||(this.siblingStacks[r]=new Map);const h=this.siblingStacks[r],i=s?`${s}:${t}`:t,a=h.get(i)||0;let p=0;for(const t of h.values())p+=t;h.set(i,a+1);const l={tag:t,position:p,counter:a};null!=s&&(l.namespace=s),null!=e&&(l.values=e),this.path.push(l);const o=this.path.length,g=null!==n?n.keep:null;if(null!=g&&g.length>0&&e)for(let t=0;t<g.length;t++){const s=g[t];void 0!==e[s]&&this._keptAttrs.push({depth:o,name:s,value:e[s]})}}pop(){if(0===this.path.length)return;this._pathStringCache=null;const t=this.path.pop();this.siblingStacks.length>this.path.length+1&&(this.siblingStacks.length=this.path.length+1);const e=this.path.length+1;for(;this._keptAttrs.length>0&&this._keptAttrs[this._keptAttrs.length-1].depth>=e;)this._keptAttrs.pop();return t}updateCurrent(t){if(this.path.length>0){const e=this.path[this.path.length-1];null!=t&&(e.values=t)}}getCurrentTag(){return this.path.length>0?this.path[this.path.length-1].tag:void 0}getCurrentNamespace(){return this.path.length>0?this.path[this.path.length-1].namespace:void 0}getAttrValue(t){if(0!==this.path.length)return this.path[this.path.length-1].values?.[t]}hasAttr(t){if(0===this.path.length)return!1;const e=this.path[this.path.length-1];return void 0!==e.values&&t in e.values}getAnyParentAttr(t){const e=this._keptAttrs;for(let s=e.length-1;s>=0;s--)if(e[s].name===t)return e[s].value}hasAnyParentAttr(t){const e=this._keptAttrs;for(let s=e.length-1;s>=0;s--)if(e[s].name===t)return!0;return!1}getPosition(){return 0===this.path.length?-1:this.path[this.path.length-1].position??0}getCounter(){return 0===this.path.length?-1:this.path[this.path.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this.path.length}toString(t,e=!0){const s=t||this.separator;if(s===this.separator&&!0===e){if(null!==this._pathStringCache)return this._pathStringCache;const t=this.path.map(t=>t.namespace?`${t.namespace}:${t.tag}`:t.tag).join(s);return this._pathStringCache=t,t}return this.path.map(t=>e&&t.namespace?`${t.namespace}:${t.tag}`:t.tag).join(s)}toArray(){return this.path.map(t=>t.tag)}reset(){this._pathStringCache=null,this.path=[],this.siblingStacks=[],this._keptAttrs=[]}matches(t){const e=t.segments;return 0!==e.length&&(t.hasDeepWildcard()?this._matchWithDeepWildcard(e):this._matchSimple(e))}_matchSimple(t){if(this.path.length!==t.length)return!1;for(let e=0;e<t.length;e++)if(!this._matchSegment(t[e],this.path[e],e===this.path.length-1))return!1;return!0}_matchWithDeepWildcard(t){let e=this.path.length-1,s=t.length-1;for(;s>=0&&e>=0;){const n=t[s];if("deep-wildcard"===n.type){if(s--,s<0)return!0;const n=t[s];let r=!1;for(let t=e;t>=0;t--)if(this._matchSegment(n,this.path[t],t===this.path.length-1)){e=t-1,s--,r=!0;break}if(!r)return!1}else{if(!this._matchSegment(n,this.path[e],e===this.path.length-1))return!1;e--,s--}}return s<0}_matchSegment(t,e,s){if("*"!==t.tag&&t.tag!==e.tag)return!1;if(void 0!==t.namespace&&"*"!==t.namespace&&t.namespace!==e.namespace)return!1;if(void 0!==t.attrName){if(!s)return!1;if(!e.values||!(t.attrName in e.values))return!1;if(void 0!==t.attrValue&&String(e.values[t.attrName])!==String(t.attrValue))return!1}if(void 0!==t.position){if(!s)return!1;const n=e.counter??0;if("first"===t.position&&0!==n)return!1;if("odd"===t.position&&n%2!=1)return!1;if("even"===t.position&&n%2!=0)return!1;if("nth"===t.position&&n!==t.positionValue)return!1}return!0}matchesAny(t){return t.matchesAny(this)}snapshot(){return{path:this.path.map(t=>({...t})),siblingStacks:this.siblingStacks.map(t=>new Map(t)),keptAttrs:this._keptAttrs.map(t=>({...t}))}}restore(t){this._pathStringCache=null,this.path=t.path.map(t=>({...t})),this.siblingStacks=t.siblingStacks.map(t=>new Map(t)),this._keptAttrs=(t.keptAttrs||[]).map(t=>({...t}))}readOnly(){return this._view}}class h{constructor(){this._byDepthAndTag=new Map,this._wildcardByDepth=new Map,this._deepWildcards=[],this._deepByTerminalTag=new Map,this._patterns=new Set,this._sealed=!1}add(t){if(this._sealed)throw new TypeError("ExpressionSet is sealed. Create a new ExpressionSet to add more expressions.");if(this._patterns.has(t.pattern))return this;if(this._patterns.add(t.pattern),t.hasDeepWildcard()){const e=t.segments[t.segments.length-1];if(e&&"deep-wildcard"!==e.type&&"*"!==e.tag){const s=e.tag;this._deepByTerminalTag.has(s)||this._deepByTerminalTag.set(s,[]),this._deepByTerminalTag.get(s).push(t)}else this._deepWildcards.push(t);return this}const e=t.length,s=t.segments[t.segments.length-1],n=s?.tag;if(n&&"*"!==n){const s=`${e}:${n}`;this._byDepthAndTag.has(s)||this._byDepthAndTag.set(s,[]),this._byDepthAndTag.get(s).push(t)}else this._wildcardByDepth.has(e)||this._wildcardByDepth.set(e,[]),this._wildcardByDepth.get(e).push(t);return this}addAll(t){for(const e of t)this.add(e);return this}has(t){return this._patterns.has(t.pattern)}get size(){return this._patterns.size}seal(){return this._sealed=!0,this}get isSealed(){return this._sealed}matchesAny(t){return null!==this.findMatch(t)}findMatch(t){const e=t.getDepth(),s=t.getCurrentTag(),n=`${e}:${s}`,r=this._byDepthAndTag.get(n);if(r)for(let e=0;e<r.length;e++)if(t.matches(r[e]))return r[e];const h=this._wildcardByDepth.get(e);if(h)for(let e=0;e<h.length;e++)if(t.matches(h[e]))return h[e];const i=this._deepByTerminalTag.get(s);if(i)for(let e=0;e<i.length;e++)if(t.matches(i[e]))return i[e];for(let e=0;e<this._deepWildcards.length;e++)if(t.matches(this._deepWildcards[e]))return this._deepWildcards[e];return null}}const i={Expression:s,Matcher:r,ExpressionSet:h};module.exports=e})();
@@ -186,6 +186,42 @@ declare interface MatcherSnapshot {
186
186
  * Copy of sibling tracking maps
187
187
  */
188
188
  siblingStacks: Map<string, number>[];
189
+
190
+ /**
191
+ * Copy of the kept-attrs stack (see {@link PushOptions.keep})
192
+ */
193
+ keptAttrs: KeptAttrEntry[];
194
+ }
195
+
196
+ /**
197
+ * A single entry in the matcher's kept-attrs stack — an attribute value
198
+ * explicitly retained at push time via `{ keep: [...] }` so it remains
199
+ * reachable from descendants after the owning node is no longer current.
200
+ */
201
+ declare interface KeptAttrEntry {
202
+ /** Path depth (1-based) of the node that declared this kept attribute */
203
+ depth: number;
204
+ /** Attribute name */
205
+ name: string;
206
+ /** Attribute value at push time */
207
+ value: any;
208
+ }
209
+
210
+ /**
211
+ * Options for {@link Matcher.push}
212
+ */
213
+ declare interface PushOptions {
214
+ /**
215
+ * Names of attributes (from `attrValues`) to retain for ancestor lookup
216
+ * (`getAnyParentAttr` / `hasAnyParentAttr`) even after this node is no
217
+ * longer the current node.
218
+ *
219
+ * Use sparingly — this is for attributes you know you'll need much deeper
220
+ * in the tree (e.g. `xml:space`, a SOAP envelope's `version`), not a
221
+ * general substitute for `getAttrValue()`. Cost is proportional to
222
+ * `keep.length`, independent of path depth.
223
+ */
224
+ keep?: string[];
189
225
  }
190
226
 
191
227
  /**
@@ -253,6 +289,24 @@ declare interface ReadOnlyMatcher {
253
289
  */
254
290
  hasAttr(attrName: string): boolean;
255
291
 
292
+ /**
293
+ * Get the value of a "kept" attribute from the nearest ancestor (or
294
+ * current node) that declared it via `push(tag, attrs, ns, { keep: [...] })`.
295
+ * Unlike `getAttrValue()`, this works regardless of how deep the path has
296
+ * gone since the attribute was pushed — but only for attribute names that
297
+ * were explicitly marked with `keep` at push time.
298
+ * @param attrName - Attribute name
299
+ * @returns The kept value, or undefined if no ancestor kept this attribute
300
+ */
301
+ getAnyParentAttr(attrName: string): any;
302
+
303
+ /**
304
+ * Check whether any ancestor (or the current node) kept the given
305
+ * attribute via `push(tag, attrs, ns, { keep: [...] })`.
306
+ * @param attrName - Attribute name
307
+ */
308
+ hasAnyParentAttr(attrName: string): boolean;
309
+
256
310
  /**
257
311
  * Get current node's sibling position (child index in parent)
258
312
  * @returns Position index or -1 if path is empty
@@ -386,15 +440,23 @@ declare class Matcher {
386
440
  * @param tagName - Name of the tag
387
441
  * @param attrValues - Attribute key-value pairs for current node (optional)
388
442
  * @param namespace - Namespace for the tag (optional)
443
+ * @param options - Push options, e.g. `{ keep: ['version'] }` to retain
444
+ * specific attributes for ancestor lookup after this node stops being current
389
445
  *
390
446
  * @example
391
447
  * ```javascript
392
448
  * matcher.push("user", { id: "123", type: "admin" });
393
449
  * matcher.push("user", { id: "456" }, "ns");
394
450
  * matcher.push("container", null);
451
+ * matcher.push("Body", { version: "1.1" }, "soap", { keep: ["version"] });
395
452
  * ```
396
453
  */
397
- push(tagName: string, attrValues?: Record<string, any> | null, namespace?: string | null): void;
454
+ push(
455
+ tagName: string,
456
+ attrValues?: Record<string, any> | null,
457
+ namespace?: string | null,
458
+ options?: PushOptions | null
459
+ ): void;
398
460
 
399
461
  /**
400
462
  * Pop the last tag from the path
@@ -434,6 +496,23 @@ declare class Matcher {
434
496
  */
435
497
  hasAttr(attrName: string): boolean;
436
498
 
499
+ /**
500
+ * Get the value of a "kept" attribute from the nearest ancestor (or current
501
+ * node) that declared it via `push(tag, attrs, ns, { keep: [...] })`.
502
+ * Cost is proportional to the number of currently-kept attributes, not
503
+ * path depth.
504
+ * @param attrName - Attribute name
505
+ * @returns The kept value, or undefined if no ancestor kept this attribute
506
+ */
507
+ getAnyParentAttr(attrName: string): any;
508
+
509
+ /**
510
+ * Check whether any ancestor (or the current node) kept the given
511
+ * attribute via `push(tag, attrs, ns, { keep: [...] })`.
512
+ * @param attrName - Attribute name
513
+ */
514
+ hasAnyParentAttr(attrName: string): boolean;
515
+
437
516
  /**
438
517
  * Get current node's sibling position (child index in parent)
439
518
  * @returns Position index or -1 if path is empty
@@ -628,7 +707,9 @@ declare namespace pathExpressionMatcher {
628
707
  Segment,
629
708
  PathNode,
630
709
  MatcherSnapshot,
710
+ KeptAttrEntry,
711
+ PushOptions,
631
712
  };
632
713
  }
633
714
 
634
- export = pathExpressionMatcher;
715
+ export = pathExpressionMatcher;
@@ -1,2 +1,2 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.pem=e():t.pem=e()}(this,()=>(()=>{"use strict";var t={d:(e,s)=>{for(var i in s)t.o(s,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:s[i]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{Expression:()=>s,ExpressionSet:()=>r,Matcher:()=>n,default:()=>h});class s{constructor(t,e={},s){this.pattern=t,this.separator=e.separator||".",this.segments=this._parse(t),this.data=s,this._hasDeepWildcard=this.segments.some(t=>"deep-wildcard"===t.type),this._hasAttributeCondition=this.segments.some(t=>void 0!==t.attrName),this._hasPositionSelector=this.segments.some(t=>void 0!==t.position)}_parse(t){const e=[];let s=0,i="";for(;s<t.length;)t[s]===this.separator?s+1<t.length&&t[s+1]===this.separator?(i.trim()&&(e.push(this._parseSegment(i.trim())),i=""),e.push({type:"deep-wildcard"}),s+=2):(i.trim()&&e.push(this._parseSegment(i.trim())),i="",s++):(i+=t[s],s++);return i.trim()&&e.push(this._parseSegment(i.trim())),e}_parseSegment(t){const e={type:"tag"};let s=null,i=t;const n=t.match(/^([^\[]+)(\[[^\]]*\])(.*)$/);if(n&&(i=n[1]+n[3],n[2])){const t=n[2].slice(1,-1);t&&(s=t)}let r,h,a=i;if(i.includes("::")){const e=i.indexOf("::");if(r=i.substring(0,e).trim(),a=i.substring(e+2).trim(),!r)throw new Error(`Invalid namespace in pattern: ${t}`)}let p=null;if(a.includes(":")){const t=a.lastIndexOf(":"),e=a.substring(0,t).trim(),s=a.substring(t+1).trim();["first","last","odd","even"].includes(s)||/^nth\(\d+\)$/.test(s)?(h=e,p=s):h=a}else h=a;if(!h)throw new Error(`Invalid segment pattern: ${t}`);if(e.tag=h,r&&(e.namespace=r),s)if(s.includes("=")){const t=s.indexOf("=");e.attrName=s.substring(0,t).trim(),e.attrValue=s.substring(t+1).trim()}else e.attrName=s.trim();if(p){const t=p.match(/^nth\((\d+)\)$/);t?(e.position="nth",e.positionValue=parseInt(t[1],10)):e.position=p}return e}get length(){return this.segments.length}hasDeepWildcard(){return this._hasDeepWildcard}hasAttributeCondition(){return this._hasAttributeCondition}hasPositionSelector(){return this._hasPositionSelector}toString(){return this.pattern}}class i{constructor(t){this._matcher=t}get separator(){return this._matcher.separator}getCurrentTag(){const t=this._matcher.path;return t.length>0?t[t.length-1].tag:void 0}getCurrentNamespace(){const t=this._matcher.path;return t.length>0?t[t.length-1].namespace:void 0}getAttrValue(t){const e=this._matcher.path;if(0!==e.length)return e[e.length-1].values?.[t]}hasAttr(t){const e=this._matcher.path;if(0===e.length)return!1;const s=e[e.length-1];return void 0!==s.values&&t in s.values}getPosition(){const t=this._matcher.path;return 0===t.length?-1:t[t.length-1].position??0}getCounter(){const t=this._matcher.path;return 0===t.length?-1:t[t.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this._matcher.path.length}toString(t,e=!0){return this._matcher.toString(t,e)}toArray(){return this._matcher.path.map(t=>t.tag)}matches(t){return this._matcher.matches(t)}matchesAny(t){return t.matchesAny(this._matcher)}}class n{constructor(t={}){this.separator=t.separator||".",this.path=[],this.siblingStacks=[],this._pathStringCache=null,this._view=new i(this)}push(t,e=null,s=null){this._pathStringCache=null,this.path.length>0&&(this.path[this.path.length-1].values=void 0);const i=this.path.length;this.siblingStacks[i]||(this.siblingStacks[i]=new Map);const n=this.siblingStacks[i],r=s?`${s}:${t}`:t,h=n.get(r)||0;let a=0;for(const t of n.values())a+=t;n.set(r,h+1);const p={tag:t,position:a,counter:h};null!=s&&(p.namespace=s),null!=e&&(p.values=e),this.path.push(p)}pop(){if(0===this.path.length)return;this._pathStringCache=null;const t=this.path.pop();return this.siblingStacks.length>this.path.length+1&&(this.siblingStacks.length=this.path.length+1),t}updateCurrent(t){if(this.path.length>0){const e=this.path[this.path.length-1];null!=t&&(e.values=t)}}getCurrentTag(){return this.path.length>0?this.path[this.path.length-1].tag:void 0}getCurrentNamespace(){return this.path.length>0?this.path[this.path.length-1].namespace:void 0}getAttrValue(t){if(0!==this.path.length)return this.path[this.path.length-1].values?.[t]}hasAttr(t){if(0===this.path.length)return!1;const e=this.path[this.path.length-1];return void 0!==e.values&&t in e.values}getPosition(){return 0===this.path.length?-1:this.path[this.path.length-1].position??0}getCounter(){return 0===this.path.length?-1:this.path[this.path.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this.path.length}toString(t,e=!0){const s=t||this.separator;if(s===this.separator&&!0===e){if(null!==this._pathStringCache)return this._pathStringCache;const t=this.path.map(t=>t.namespace?`${t.namespace}:${t.tag}`:t.tag).join(s);return this._pathStringCache=t,t}return this.path.map(t=>e&&t.namespace?`${t.namespace}:${t.tag}`:t.tag).join(s)}toArray(){return this.path.map(t=>t.tag)}reset(){this._pathStringCache=null,this.path=[],this.siblingStacks=[]}matches(t){const e=t.segments;return 0!==e.length&&(t.hasDeepWildcard()?this._matchWithDeepWildcard(e):this._matchSimple(e))}_matchSimple(t){if(this.path.length!==t.length)return!1;for(let e=0;e<t.length;e++)if(!this._matchSegment(t[e],this.path[e],e===this.path.length-1))return!1;return!0}_matchWithDeepWildcard(t){let e=this.path.length-1,s=t.length-1;for(;s>=0&&e>=0;){const i=t[s];if("deep-wildcard"===i.type){if(s--,s<0)return!0;const i=t[s];let n=!1;for(let t=e;t>=0;t--)if(this._matchSegment(i,this.path[t],t===this.path.length-1)){e=t-1,s--,n=!0;break}if(!n)return!1}else{if(!this._matchSegment(i,this.path[e],e===this.path.length-1))return!1;e--,s--}}return s<0}_matchSegment(t,e,s){if("*"!==t.tag&&t.tag!==e.tag)return!1;if(void 0!==t.namespace&&"*"!==t.namespace&&t.namespace!==e.namespace)return!1;if(void 0!==t.attrName){if(!s)return!1;if(!e.values||!(t.attrName in e.values))return!1;if(void 0!==t.attrValue&&String(e.values[t.attrName])!==String(t.attrValue))return!1}if(void 0!==t.position){if(!s)return!1;const i=e.counter??0;if("first"===t.position&&0!==i)return!1;if("odd"===t.position&&i%2!=1)return!1;if("even"===t.position&&i%2!=0)return!1;if("nth"===t.position&&i!==t.positionValue)return!1}return!0}matchesAny(t){return t.matchesAny(this)}snapshot(){return{path:this.path.map(t=>({...t})),siblingStacks:this.siblingStacks.map(t=>new Map(t))}}restore(t){this._pathStringCache=null,this.path=t.path.map(t=>({...t})),this.siblingStacks=t.siblingStacks.map(t=>new Map(t))}readOnly(){return this._view}}class r{constructor(){this._byDepthAndTag=new Map,this._wildcardByDepth=new Map,this._deepWildcards=[],this._patterns=new Set,this._sealed=!1}add(t){if(this._sealed)throw new TypeError("ExpressionSet is sealed. Create a new ExpressionSet to add more expressions.");if(this._patterns.has(t.pattern))return this;if(this._patterns.add(t.pattern),t.hasDeepWildcard())return this._deepWildcards.push(t),this;const e=t.length,s=t.segments[t.segments.length-1],i=s?.tag;if(i&&"*"!==i){const s=`${e}:${i}`;this._byDepthAndTag.has(s)||this._byDepthAndTag.set(s,[]),this._byDepthAndTag.get(s).push(t)}else this._wildcardByDepth.has(e)||this._wildcardByDepth.set(e,[]),this._wildcardByDepth.get(e).push(t);return this}addAll(t){for(const e of t)this.add(e);return this}has(t){return this._patterns.has(t.pattern)}get size(){return this._patterns.size}seal(){return this._sealed=!0,this}get isSealed(){return this._sealed}matchesAny(t){return null!==this.findMatch(t)}findMatch(t){const e=t.getDepth(),s=`${e}:${t.getCurrentTag()}`,i=this._byDepthAndTag.get(s);if(i)for(let e=0;e<i.length;e++)if(t.matches(i[e]))return i[e];const n=this._wildcardByDepth.get(e);if(n)for(let e=0;e<n.length;e++)if(t.matches(n[e]))return n[e];for(let e=0;e<this._deepWildcards.length;e++)if(t.matches(this._deepWildcards[e]))return this._deepWildcards[e];return null}}const h={Expression:s,Matcher:n,ExpressionSet:r};return e})());
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.pem=e():t.pem=e()}(this,()=>(()=>{"use strict";var t={d:(e,s)=>{for(var n in s)t.o(s,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:s[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{Expression:()=>s,ExpressionSet:()=>i,Matcher:()=>r,default:()=>h});class s{constructor(t,e={},s){this.pattern=t,this.separator=e.separator||".",this.segments=this._parse(t),this.data=s,this._hasDeepWildcard=this.segments.some(t=>"deep-wildcard"===t.type),this._hasAttributeCondition=this.segments.some(t=>void 0!==t.attrName),this._hasPositionSelector=this.segments.some(t=>void 0!==t.position)}_parse(t){const e=[];let s=0,n="";for(;s<t.length;)t[s]===this.separator?s+1<t.length&&t[s+1]===this.separator?(n.trim()&&(e.push(this._parseSegment(n.trim())),n=""),e.push({type:"deep-wildcard"}),s+=2):(n.trim()&&e.push(this._parseSegment(n.trim())),n="",s++):(n+=t[s],s++);return n.trim()&&e.push(this._parseSegment(n.trim())),e}_parseSegment(t){const e={type:"tag"};let s=null,n=t;const r=t.match(/^([^\[]+)(\[[^\]]*\])(.*)$/);if(r&&(n=r[1]+r[3],r[2])){const t=r[2].slice(1,-1);t&&(s=t)}let i,h,a=n;if(n.includes("::")){const e=n.indexOf("::");if(i=n.substring(0,e).trim(),a=n.substring(e+2).trim(),!i)throw new Error(`Invalid namespace in pattern: ${t}`)}let p=null;if(a.includes(":")){const t=a.lastIndexOf(":"),e=a.substring(0,t).trim(),s=a.substring(t+1).trim();["first","last","odd","even"].includes(s)||/^nth\(\d+\)$/.test(s)?(h=e,p=s):h=a}else h=a;if(!h)throw new Error(`Invalid segment pattern: ${t}`);if(e.tag=h,i&&(e.namespace=i),s)if(s.includes("=")){const t=s.indexOf("=");e.attrName=s.substring(0,t).trim(),e.attrValue=s.substring(t+1).trim()}else e.attrName=s.trim();if(p){const t=p.match(/^nth\((\d+)\)$/);t?(e.position="nth",e.positionValue=parseInt(t[1],10)):e.position=p}return e}get length(){return this.segments.length}hasDeepWildcard(){return this._hasDeepWildcard}hasAttributeCondition(){return this._hasAttributeCondition}hasPositionSelector(){return this._hasPositionSelector}toString(){return this.pattern}}class n{constructor(t){this._matcher=t}get separator(){return this._matcher.separator}getCurrentTag(){const t=this._matcher.path;return t.length>0?t[t.length-1].tag:void 0}getCurrentNamespace(){const t=this._matcher.path;return t.length>0?t[t.length-1].namespace:void 0}getAttrValue(t){const e=this._matcher.path;if(0!==e.length)return e[e.length-1].values?.[t]}hasAttr(t){const e=this._matcher.path;if(0===e.length)return!1;const s=e[e.length-1];return void 0!==s.values&&t in s.values}getAnyParentAttr(t){return this._matcher.getAnyParentAttr(t)}hasAnyParentAttr(t){return this._matcher.hasAnyParentAttr(t)}getPosition(){const t=this._matcher.path;return 0===t.length?-1:t[t.length-1].position??0}getCounter(){const t=this._matcher.path;return 0===t.length?-1:t[t.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this._matcher.path.length}toString(t,e=!0){return this._matcher.toString(t,e)}toArray(){return this._matcher.path.map(t=>t.tag)}matches(t){return this._matcher.matches(t)}matchesAny(t){return t.matchesAny(this._matcher)}}class r{constructor(t={}){this.separator=t.separator||".",this.path=[],this.siblingStacks=[],this._pathStringCache=null,this._view=new n(this),this._keptAttrs=[]}push(t,e=null,s=null,n=null){this._pathStringCache=null,this.path.length>0&&(this.path[this.path.length-1].values=void 0);const r=this.path.length;this.siblingStacks[r]||(this.siblingStacks[r]=new Map);const i=this.siblingStacks[r],h=s?`${s}:${t}`:t,a=i.get(h)||0;let p=0;for(const t of i.values())p+=t;i.set(h,a+1);const l={tag:t,position:p,counter:a};null!=s&&(l.namespace=s),null!=e&&(l.values=e),this.path.push(l);const o=this.path.length,g=null!==n?n.keep:null;if(null!=g&&g.length>0&&e)for(let t=0;t<g.length;t++){const s=g[t];void 0!==e[s]&&this._keptAttrs.push({depth:o,name:s,value:e[s]})}}pop(){if(0===this.path.length)return;this._pathStringCache=null;const t=this.path.pop();this.siblingStacks.length>this.path.length+1&&(this.siblingStacks.length=this.path.length+1);const e=this.path.length+1;for(;this._keptAttrs.length>0&&this._keptAttrs[this._keptAttrs.length-1].depth>=e;)this._keptAttrs.pop();return t}updateCurrent(t){if(this.path.length>0){const e=this.path[this.path.length-1];null!=t&&(e.values=t)}}getCurrentTag(){return this.path.length>0?this.path[this.path.length-1].tag:void 0}getCurrentNamespace(){return this.path.length>0?this.path[this.path.length-1].namespace:void 0}getAttrValue(t){if(0!==this.path.length)return this.path[this.path.length-1].values?.[t]}hasAttr(t){if(0===this.path.length)return!1;const e=this.path[this.path.length-1];return void 0!==e.values&&t in e.values}getAnyParentAttr(t){const e=this._keptAttrs;for(let s=e.length-1;s>=0;s--)if(e[s].name===t)return e[s].value}hasAnyParentAttr(t){const e=this._keptAttrs;for(let s=e.length-1;s>=0;s--)if(e[s].name===t)return!0;return!1}getPosition(){return 0===this.path.length?-1:this.path[this.path.length-1].position??0}getCounter(){return 0===this.path.length?-1:this.path[this.path.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this.path.length}toString(t,e=!0){const s=t||this.separator;if(s===this.separator&&!0===e){if(null!==this._pathStringCache)return this._pathStringCache;const t=this.path.map(t=>t.namespace?`${t.namespace}:${t.tag}`:t.tag).join(s);return this._pathStringCache=t,t}return this.path.map(t=>e&&t.namespace?`${t.namespace}:${t.tag}`:t.tag).join(s)}toArray(){return this.path.map(t=>t.tag)}reset(){this._pathStringCache=null,this.path=[],this.siblingStacks=[],this._keptAttrs=[]}matches(t){const e=t.segments;return 0!==e.length&&(t.hasDeepWildcard()?this._matchWithDeepWildcard(e):this._matchSimple(e))}_matchSimple(t){if(this.path.length!==t.length)return!1;for(let e=0;e<t.length;e++)if(!this._matchSegment(t[e],this.path[e],e===this.path.length-1))return!1;return!0}_matchWithDeepWildcard(t){let e=this.path.length-1,s=t.length-1;for(;s>=0&&e>=0;){const n=t[s];if("deep-wildcard"===n.type){if(s--,s<0)return!0;const n=t[s];let r=!1;for(let t=e;t>=0;t--)if(this._matchSegment(n,this.path[t],t===this.path.length-1)){e=t-1,s--,r=!0;break}if(!r)return!1}else{if(!this._matchSegment(n,this.path[e],e===this.path.length-1))return!1;e--,s--}}return s<0}_matchSegment(t,e,s){if("*"!==t.tag&&t.tag!==e.tag)return!1;if(void 0!==t.namespace&&"*"!==t.namespace&&t.namespace!==e.namespace)return!1;if(void 0!==t.attrName){if(!s)return!1;if(!e.values||!(t.attrName in e.values))return!1;if(void 0!==t.attrValue&&String(e.values[t.attrName])!==String(t.attrValue))return!1}if(void 0!==t.position){if(!s)return!1;const n=e.counter??0;if("first"===t.position&&0!==n)return!1;if("odd"===t.position&&n%2!=1)return!1;if("even"===t.position&&n%2!=0)return!1;if("nth"===t.position&&n!==t.positionValue)return!1}return!0}matchesAny(t){return t.matchesAny(this)}snapshot(){return{path:this.path.map(t=>({...t})),siblingStacks:this.siblingStacks.map(t=>new Map(t)),keptAttrs:this._keptAttrs.map(t=>({...t}))}}restore(t){this._pathStringCache=null,this.path=t.path.map(t=>({...t})),this.siblingStacks=t.siblingStacks.map(t=>new Map(t)),this._keptAttrs=(t.keptAttrs||[]).map(t=>({...t}))}readOnly(){return this._view}}class i{constructor(){this._byDepthAndTag=new Map,this._wildcardByDepth=new Map,this._deepWildcards=[],this._deepByTerminalTag=new Map,this._patterns=new Set,this._sealed=!1}add(t){if(this._sealed)throw new TypeError("ExpressionSet is sealed. Create a new ExpressionSet to add more expressions.");if(this._patterns.has(t.pattern))return this;if(this._patterns.add(t.pattern),t.hasDeepWildcard()){const e=t.segments[t.segments.length-1];if(e&&"deep-wildcard"!==e.type&&"*"!==e.tag){const s=e.tag;this._deepByTerminalTag.has(s)||this._deepByTerminalTag.set(s,[]),this._deepByTerminalTag.get(s).push(t)}else this._deepWildcards.push(t);return this}const e=t.length,s=t.segments[t.segments.length-1],n=s?.tag;if(n&&"*"!==n){const s=`${e}:${n}`;this._byDepthAndTag.has(s)||this._byDepthAndTag.set(s,[]),this._byDepthAndTag.get(s).push(t)}else this._wildcardByDepth.has(e)||this._wildcardByDepth.set(e,[]),this._wildcardByDepth.get(e).push(t);return this}addAll(t){for(const e of t)this.add(e);return this}has(t){return this._patterns.has(t.pattern)}get size(){return this._patterns.size}seal(){return this._sealed=!0,this}get isSealed(){return this._sealed}matchesAny(t){return null!==this.findMatch(t)}findMatch(t){const e=t.getDepth(),s=t.getCurrentTag(),n=`${e}:${s}`,r=this._byDepthAndTag.get(n);if(r)for(let e=0;e<r.length;e++)if(t.matches(r[e]))return r[e];const i=this._wildcardByDepth.get(e);if(i)for(let e=0;e<i.length;e++)if(t.matches(i[e]))return i[e];const h=this._deepByTerminalTag.get(s);if(h)for(let e=0;e<h.length;e++)if(t.matches(h[e]))return h[e];for(let e=0;e<this._deepWildcards.length;e++)if(t.matches(this._deepWildcards[e]))return this._deepWildcards[e];return null}}const h={Expression:s,Matcher:r,ExpressionSet:i};return e})());
2
2
  //# sourceMappingURL=pem.min.js.map